Commit 01ba62f5 by caoyanzhi

update: 奥莱抵金券

parent b2fa0086
......@@ -1237,24 +1237,28 @@ export default {
}
};
card.costValueType = this.form.costValueType; //成本费用0固定成本1门店成本
card.costValueProportion = this.form.costValueProportion; //成本比例
card.costValueProportionFlag = this.form.costValueProportionFlag;
if (card.costValueType == 0) {
card.costValue = typeof this.form.costValueProportion == 'number' && typeof this.form.cardDenomination == 'number' ? (this.form.costValueProportion * this.form.cardDenomination) / 100 : 0; //成本
card.costStoreList = [];
}
if (card.costValueType == 1) {
card.costValue = undefined;
if (this.isEdit) {
card.costStoreList = this.selectedStoreList.map(el => {
el.costValue = typeof this.form.cardDenomination == 'number' && typeof el.costValueProportion == 'number' ? (this.form.cardDenomination * el.costValueProportion) / 100 : 0;
return el;
});
} else if (this.isAdd || this.isCopy) {
card.costStoreList = this.originStoreList.map(el => {
el.costValue = typeof this.form.cardDenomination == 'number' && typeof el.costValueProportion == 'number' ? (this.form.cardDenomination * el.costValueProportion) / 100 : 0;
return el;
});
card.costValueProportion = 0;
card.costValue = 0;
if (card.costValueProportionFlag == 1) {
card.costValueProportion = this.form.costValueProportion; //成本比例
if (card.costValueType == 0) {
card.costValue = typeof this.form.costValueProportion == 'number' && typeof this.form.cardDenomination == 'number' ? (this.form.costValueProportion * this.form.cardDenomination) / 100 : 0; //成本
card.costStoreList = [];
}
if (card.costValueType == 1) {
card.costValue = undefined;
if (this.isEdit) {
card.costStoreList = this.selectedStoreList.map(el => {
el.costValue = typeof this.form.cardDenomination == 'number' && typeof el.costValueProportion == 'number' ? (this.form.cardDenomination * el.costValueProportion) / 100 : 0;
return el;
});
} else if (this.isAdd || this.isCopy) {
card.costStoreList = this.originStoreList.map(el => {
el.costValue = typeof this.form.cardDenomination == 'number' && typeof el.costValueProportion == 'number' ? (this.form.cardDenomination * el.costValueProportion) / 100 : 0;
return el;
});
}
}
}
}
......@@ -1311,7 +1315,9 @@ export default {
}
card.useCustomCode = this.form.useCustomCode;
card.costValue = this.form.costValue || 0;
if (this.form.cardType != 3) {
card.costValue = this.form.costValue || 0;
}
//自定义号段
if (card.useCustomCode === 1) {
card.customCodeBegin = this.form.customCodeBegin;
......
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