Commit 5961a841 by huaying

fix: 无权限复制状态现金归0处理

parent 60ff584e
......@@ -68,7 +68,7 @@
<template slot-scope="scope">
<el-popover
popper-class="noClass"
v-if="jifenquanxian == true"
v-if="jifenquanxian"
placement="bottom"
trigger="hover"
content="无积分购现金权限">
......
......@@ -235,7 +235,7 @@
<el-form-item label="现金费用" prop="cashCost">
<el-popover
popper-class="noClass"
v-if="jifenquanxian == true"
v-if="jifenquanxian"
placement="bottom"
trigger="hover"
content="无积分购现金权限">
......@@ -879,7 +879,7 @@ export default {
this.submitLadderList.forEach(item => {
this.list3.forEach(itt => {
if (item.gradeId === itt.gradeId) {
itt.skuList[0].giftProSkuCash = item.skuList[0].giftProSkuCash;
itt.skuList[0].giftProSkuCash = (this.jifenquanxian && this.isCopy) ? 0 : item.skuList[0].giftProSkuCash;
itt.skuList[0].giftProSkuIntegral = item.skuList[0].giftProSkuIntegral;
}
});
......@@ -995,6 +995,12 @@ export default {
// 积分费用包
if (res.data.result.cardCostList) {
this.cardCouponList = res.data.result.cardCostList;
if (this.jifenquanxian && this.isCopy) {
// eslint-disable-next-line array-callback-return
this.cardCouponList.map(item => {
item.cashCost = 0;
});
}
} else {
this.cardCouponList.push({
proRefId: '',
......@@ -1006,7 +1012,7 @@ export default {
// 积分费用
this.couponForm.integralCost = res.data.result.integralCost;
// 现金费用
this.couponForm.cashCost = res.data.result.cashCost;
this.couponForm.cashCost = (this.jifenquanxian && this.isCopy) ? 0 : res.data.result.cashCost;
// 库存
this.couponForm.virtualStock = res.data.result.virtualStock;
this.currentStock = res.data.result.virtualStock;
......
......@@ -195,7 +195,7 @@
<span v-if="item1.length - index2 < 7">
<el-popover
popper-class="noClass"
v-if="jifenquanxian"
v-if="jifenquanxian && item1.length - index2 == 5"
placement="bottom"
trigger="hover"
content="无积分购现金权限">
......@@ -205,7 +205,7 @@
v-model.trim="item2.valueName"
@blur="skuInput(item1, item2, index1, index2)"
@input="setSkuValueName"
:disabled="jifenquanxian && index2 == 2"
:disabled="jifenquanxian && item1.length - index2 ==5"
/>
</el-popover>
<el-input
......@@ -256,6 +256,10 @@ export default {
isStdImg: {
type: Boolean,
},
isCopy: {
type: Boolean,
default: false,
},
giftType: {
type: Number,
},
......@@ -862,6 +866,24 @@ export default {
return r; // r是排列组合后的数据与
},
},
watch: {
skuList: {
handler: function (val) {
if (val) {
console.log(this.jifenquanxian, 'val');
// eslint-disable-next-line array-callback-return
val.map(item1 => {
// eslint-disable-next-line array-callback-return
item1.map((item2, index2) => {
if (item1.length - index2 == 5 && this.jifenquanxian && this.isCopy) {
item2.valueName = 0;
}
});
});
}
},
},
},
};
</script>
<style scoped>
......
......@@ -110,7 +110,7 @@
</div>
<div class="section-content">
<h3>销售信息</h3>
<el-form-item label="礼品规格" v-if="giftType === 1 || submitSkuJson.length">
<el-form-item label="礼品规格11" v-if="giftType === 1 || submitSkuJson.length">
<addSku
:giftId="giftId"
:skuJson="giftProStandardJson"
......@@ -122,6 +122,7 @@
:isStdImg="isStdImg"
:skuList="skuList"
@changeMinIntegral="changeMinIntegral"
:isCopy="isCopy"
/>
</el-form-item>
<el-form-item label="礼品编码">
......@@ -1128,7 +1129,7 @@ export default {
id2.push(itt3.valueId);
});
if (id.length && id2.length && id.join('_') === id2.join('_')) {
itt2.giftProSkuCash = item2.giftProSkuCash;
itt2.giftProSkuCash = (this.jifenquanxian && this.isCopy) ? 0 : item2.giftProSkuCash;
itt2.giftProSkuIntegral = item2.giftProSkuIntegral;
}
}
......@@ -1136,7 +1137,7 @@ export default {
} else {
// itt.skuList.forEach(itt3 => {
// if (!itt3.giftPropValues.length) {
itt.skuList[0].giftProSkuCash = item.skuList[0].giftProSkuCash;
itt.skuList[0].giftProSkuCash = (this.jifenquanxian && this.isCopy) ? 0 : item.skuList[0].giftProSkuCash;
itt.skuList[0].giftProSkuIntegral = item.skuList[0].giftProSkuIntegral;
// }
// });
......@@ -1328,7 +1329,7 @@ export default {
this.giftForm.proCategoryId = data.proCategoryId; // 分类
this.giftForm.proCode = data.proCode; // 编码
this.giftForm.integralCost = data.integralCost; // 积分
this.giftForm.cashCost = data.cashCost; // 现金
this.giftForm.cashCost = (this.isCopy && this.jifenquanxian) ? 0 : data.cashCost; // 现金
this.giftForm.virtualStock = data.virtualStock; // 库存
this.currentStock = data.virtualStock;
if (this.isCopy && data.giftType == 0 && data.changeType == 5) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment