|
@@ -1193,34 +1193,36 @@ export default {
|
|
|
}
|
|
|
if (this.activityCard) return
|
|
|
if (changedArr.includes('saleGifts') || changedArr.includes(schemaKeyMap.payment)) {
|
|
|
- // 销售策略变更,清空有效周期(通用规则)
|
|
|
const obj = {}
|
|
|
+ // 销售策略变更,清空有效周期(通用规则)
|
|
|
if (this.value.validityPeriod) {
|
|
|
obj.validityPeriod = {}
|
|
|
}
|
|
|
if (this.value[schemaKeyMap.validityCount]) {
|
|
|
obj[schemaKeyMap.validityCount] = {}
|
|
|
}
|
|
|
+ const buyType = [1, 4].includes(this.value[schemaKeyMap.payment])
|
|
|
+ if (changedArr.includes(schemaKeyMap.payment) && buyType) {
|
|
|
+ obj[schemaKeyMap.relatedOrders] = []
|
|
|
+ }
|
|
|
this.refreshValue(obj)
|
|
|
}
|
|
|
if (changedArr.includes('saleGifts') || changedArr.includes(schemaKeyMap.specification) || changedArr.includes(schemaKeyMap.payment)) {
|
|
|
+ const obj = {}
|
|
|
// 付费类型变更,如果有主账号数量,则清空
|
|
|
if (this.value.subAccountNumbers) {
|
|
|
const subAccountNumbers = { payCount: '', freeCount: '' }
|
|
|
- this.refreshValue({ subAccountNumbers })
|
|
|
+ obj.subAccountNumbers = subAccountNumbers
|
|
|
}
|
|
|
// 清空合同金额
|
|
|
// 销售策略变为赠送,则合同金额默认值改为0
|
|
|
if (this.value.saleGifts === 2) {
|
|
|
// 1售卖 2赠送
|
|
|
- this.refreshValue({
|
|
|
- [schemaKeyMap.contractAmount]: Object.assign({}, this.value[schemaKeyMap.contractAmount], { contractMoney: '0' })
|
|
|
- })
|
|
|
+ obj[schemaKeyMap.contractAmount] = Object.assign({}, this.value[schemaKeyMap.contractAmount], { contractMoney: '0' })
|
|
|
} else {
|
|
|
- this.refreshValue({
|
|
|
- [schemaKeyMap.contractAmount]: Object.assign({}, this.value[schemaKeyMap.contractAmount], { contractMoney: '', standardMoney: '' })
|
|
|
- })
|
|
|
+ obj[schemaKeyMap.contractAmount] = Object.assign({}, this.value[schemaKeyMap.contractAmount], { contractMoney: '', standardMoney: '' })
|
|
|
}
|
|
|
+ this.refreshValue(obj)
|
|
|
}
|
|
|
|
|
|
console.log(`以下字段变更了:${this.productType}`, changedArr)
|