update @核销状态 和 组合按钮置灰

This commit is contained in:
huangzhen 2024-10-25 09:20:50 +08:00
parent bfcd2384d2
commit 4aa2eb4336
4 changed files with 20 additions and 13 deletions

View File

@ -454,6 +454,10 @@ export default {
codes.push(btnHighLight.includes(item.goods.err_code) ? 0 : item.goods.err_code || 0);
orderData.push({ key: this.key, goods_id: item.goods.id });
})
let first = list[0];
if (first.goods.key_code) {
return showToast(first.goods.reson || '活动异常');
}
if (new Set(modes).size !== 1) {
return showToast('不同类型或领取方式不支持一键领取');
}
@ -461,12 +465,8 @@ export default {
if (codes.length !== 1) {
return showToast('不同状态商品不支持一键领取');
} else { // 0
let obj = list[0];
if (obj.goods.key_code) {
return showToast(obj.goods.reson || '活动异常');
}
if (obj.goods.err_code && !this.btnHighLight.includes(obj.goods.err_code)) {
return showToast(obj.goods.reson || '商品异常');
if (first.goods.err_code && !this.btnHighLight.includes(first.goods.err_code)) {
return showToast(first.goods.reson || '商品异常');
}
if (this.btnPoll.includes(codes[0])) {
if (type === 'one') {
@ -661,7 +661,7 @@ export default {
res.data.forEach((item: any) => {
statusList.push(item.status);
})
// 1 2 3 4 5 6
// 1 2 3 4 5 6 7 8
let receiveLength = statusList.filter((e: number) => ![1, 2].includes(e)).length;
if (receiveLength) { // /
return await this.getData('');

View File

@ -58,7 +58,7 @@ export default {
orderNo: this.$route.query.orderNo,
proType: 1, // 1 2
orderData: {
status: 1 // 1 2 3 4 5 6
status: 1 // 1 2 3 4 5 6 7 8
} as any,
dialogType: '',

View File

@ -16,7 +16,13 @@
<li v-for="(item, index) in listData" :key="index">
<div class="top">
<p class="time">{{ item.create_time }}</p>
<p class="status" :style="{ color: item.status === 3 ? '#44d27d' : item.status < 3 ? '#f28542' : '#fd553d' }">{{ statusObj[`${item.type}`][item.status] || '' }}</p>
<p class="status" :style="{
color:
statusObj[`${item.type}`][item.status].includes('成功') ? '#44d27d' :
statusObj[`${item.type}`][item.status].includes('中') ? '#f28542' :
'#fd553d'
}"
>{{ statusObj[`${item.type}`][item.status] || ''}}</p>
</div>
<div class="content">
<img class="proImg" :src="item.icon" alt="">
@ -81,10 +87,11 @@ export default {
[2, '直充/卡密'],
[3, '立减金'],
]),
// 1 2 3 4 5 6 7 8
statusObj: { // status
'1': ['', '发放中', '发放中', '发放成功', '发放失败', '已过期', '已作废'], //
'2': ['', '充值中', '充值中', '充值成功', '充值失败', '已过期', '已作废'], // /
'3': ['', '发放中', '发放中', '发放成功', '发放失败', '已过期', '已作废'], //
'1': ['', '发放中', '发放中', '发放成功', '发放失败', '已过期', '发放失败', '发放成功', '发放成功'], //
'2': ['', '充值中', '充值中', '充值成功', '充值失败', '已过期', '充值失败', '充值成功', '充值成功'], // /
'3': ['', '发放中', '发放中', '发放成功', '发放失败', '已过期', '发放失败', '发放成功', '发放成功'], //
},
dialogType: '',

View File

@ -59,7 +59,7 @@
<div
@click="jumpDetail(pageData && pageData[initialSlide])"
v-if="cssData.contentType === 1"
:class="['btn', pageData && !pageData[initialSlide].goods.group_id && ( pageData[initialSlide].goods.key_code || (pageData[initialSlide].goods.err_code && !btnHighLight.includes(pageData[initialSlide].goods.err_code)) ) && 'btnPlacingAshes']"
:class="['btn', pageData && ( pageData[initialSlide].goods.key_code || (!pageData[initialSlide].goods.group_id && pageData[initialSlide].goods.err_code && !btnHighLight.includes(pageData[initialSlide].goods.err_code)) ) && 'btnPlacingAshes']"
:style="{ color: cssData.btnColor, backgroundColor: cssData.btnBgc }"
>
{{