|
|
@ -608,23 +608,27 @@ export default { |
|
|
let customerOrgGroupAsbitems = [] //分组包含的套餐 |
|
|
let customerOrgGroupAsbitems = [] //分组包含的套餐 |
|
|
|
|
|
|
|
|
//编辑 |
|
|
//编辑 |
|
|
putapi(`/api/app/customer-org-group/${this.form.id}`, body).then(res => { |
|
|
|
|
|
if (res.code != -1) { |
|
|
|
|
|
|
|
|
putapi(`/api/app/customer-org-group/${this.form.id}`, body) |
|
|
|
|
|
.then(res => { |
|
|
|
|
|
// console.log(res) |
|
|
|
|
|
if (res.code != -1) { |
|
|
|
|
|
console.log("保存分组成功!"); |
|
|
let lfind = arrayExistObj( |
|
|
let lfind = arrayExistObj( |
|
|
this.customerOrgGroups, |
|
|
this.customerOrgGroups, |
|
|
"id", |
|
|
"id", |
|
|
this.form.id |
|
|
this.form.id |
|
|
); |
|
|
); |
|
|
if (lfind > -1) objCopy(this.form, this.customerOrgGroups[lfind]); |
|
|
if (lfind > -1) objCopy(this.form, this.customerOrgGroups[lfind]); |
|
|
if(this.formOri.price != this.form.price){ |
|
|
|
|
|
|
|
|
console.log('this.formOri.price != this.form.price',this.formOri.price,this.form.price) |
|
|
|
|
|
if(this.formOri.price != this.form.price){ |
|
|
return getapi(`/api/app/customerorggroupdetail/getcustomerorggroupdetailinasbitem?CustomerOrgGroupId=${customerOrgGroupId}`) |
|
|
return getapi(`/api/app/customerorggroupdetail/getcustomerorggroupdetailinasbitem?CustomerOrgGroupId=${customerOrgGroupId}`) |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
}).then(res =>{ |
|
|
}).then(res =>{ |
|
|
if(res.code != -1){ |
|
|
|
|
|
|
|
|
if(res && res.code != -1){ |
|
|
customerOrgGroupAsbitems = res.data; |
|
|
customerOrgGroupAsbitems = res.data; |
|
|
if(customerOrgGroupAsbitems.length < 1){ |
|
|
if(customerOrgGroupAsbitems.length < 1){ |
|
|
console.log("操作成功!"); |
|
|
|
|
|
|
|
|
console.log("该分组暂没有组合项目!"); |
|
|
this.dialogVisible = false; |
|
|
this.dialogVisible = false; |
|
|
}else{ |
|
|
}else{ |
|
|
let detailsBody = { |
|
|
let detailsBody = { |
|
|
@ -635,7 +639,7 @@ export default { |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
}).then(res =>{ |
|
|
}).then(res =>{ |
|
|
if(res.code != -1){ |
|
|
|
|
|
|
|
|
if(res && res.code != -1){ |
|
|
console.log("操作成功!并自动按总价同比折算组合项目价格!"); |
|
|
console.log("操作成功!并自动按总价同比折算组合项目价格!"); |
|
|
this.dialogVisible = false; |
|
|
this.dialogVisible = false; |
|
|
// 刷新明细 |
|
|
// 刷新明细 |
|
|
|