pengjun 2 years ago
parent
commit
e43e39d25f
  1. 16
      src/views/customerOrg/customerOrgGroup.vue

16
src/views/customerOrg/customerOrgGroup.vue

@ -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;
// //

Loading…
Cancel
Save