Commit 5961a841 by huaying

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

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