|
@@ -1164,6 +1164,7 @@ export default {
|
|
|
const type = this.policyList.filter((k) => {
|
|
|
return k.code === e;
|
|
|
})[0].type;
|
|
|
+ console.log(type=="PROVISION");
|
|
|
if (type == "PROVISION") {
|
|
|
// PROVISION 配提
|
|
|
// 选择销售政策PolidcyId改变获取条件列表
|
|
@@ -1231,27 +1232,10 @@ export default {
|
|
|
})
|
|
|
this.policyList = data.records
|
|
|
if (data.records.length) {
|
|
|
- this.handlePolicy(data.records[0].id);
|
|
|
+ this.handlePolicy(data.records[0].code);
|
|
|
}
|
|
|
},
|
|
|
- // 引用销售政策搜索
|
|
|
- async handlePolicyTypeList() {
|
|
|
- if (!this.screenForm.policyId) {
|
|
|
- this.$errorMsg("请选择销售政策");
|
|
|
- return;
|
|
|
- }
|
|
|
- if (this.popArr.length) {
|
|
|
- this.popDataArr = [];
|
|
|
- this.dataList = [];
|
|
|
|
|
|
- for (let i = 0; i < this.popArr.length; i++) {
|
|
|
- await this.getConditionList(this.policyConditionId, i + 1, false);
|
|
|
- }
|
|
|
- } else {
|
|
|
- // sProvision = true
|
|
|
- this.getMaterialTypeList("sProvision");
|
|
|
- }
|
|
|
- },
|
|
|
// 获取某一个比例下的数据 ,查询popType 当前 this.cusIndex+1
|
|
|
async getConditionList(policyConditionId, popType, fang) {
|
|
|
this.listLoading = true;
|
|
@@ -1290,10 +1274,12 @@ export default {
|
|
|
}
|
|
|
// this.total = data.total;
|
|
|
// console.log(this.goodsList,'4555');
|
|
|
+
|
|
|
if (this.goodsList.length) {
|
|
|
for (let p = 0; p < this.goodsList.length; p++) {
|
|
|
for (let q = 0; q < datas.length; q++) {
|
|
|
- if (this.goodsList[p].id == datas[q].id) {
|
|
|
+ if ((this.goodsList[p].id || this.goodsList[p].policyMaterialId) == datas[q].id ) {
|
|
|
+
|
|
|
this.$set(datas[q], "disabled", true);
|
|
|
}
|
|
|
}
|
|
@@ -1313,6 +1299,7 @@ export default {
|
|
|
if (fang) {
|
|
|
this.popDataArr[popType] = datas;
|
|
|
} else {
|
|
|
+ console.log(datas,'89');
|
|
|
this.popDataArr.push(datas);
|
|
|
}
|
|
|
this.totalArr.push({
|
|
@@ -1354,7 +1341,7 @@ export default {
|
|
|
res.data.records[i].userList = this.userList;
|
|
|
res.data.records[i].policyMaterialId = res.data.records[i].id;
|
|
|
for (let j = 0; j < this.goodsList.length; j++) {
|
|
|
- if (this.goodsList[j].id == res.data.records[i].id) {
|
|
|
+ if ((this.goodsList[j].id || this.goodsList[j].policyMaterialId) == res.data.records[i].id) {
|
|
|
res.data.records[i].disabled = false;
|
|
|
}
|
|
|
}
|
|
@@ -1690,11 +1677,37 @@ export default {
|
|
|
}
|
|
|
|
|
|
this.policyList = res.data.records;
|
|
|
+ console.log( res.data.records);
|
|
|
if (this.policyList.length) {
|
|
|
- this.handlePolicy(this.screenForm.policyId);
|
|
|
+ this.handlePolicy(res.data.records[0].id)
|
|
|
+ // const type = this.policyList.find(e=>e.code==this.screenForm.policyId).type
|
|
|
+
|
|
|
+ // if (type === "PROVISION") {
|
|
|
+ // // this.handlePolicy( res.data.records[0].id);
|
|
|
+ // }else{
|
|
|
+
|
|
|
+ // }
|
|
|
}
|
|
|
});
|
|
|
},
|
|
|
+ // 引用销售政策搜索
|
|
|
+ async handlePolicyTypeList() {
|
|
|
+ if (!this.screenForm.policyId) {
|
|
|
+ this.$errorMsg("请选择销售政策");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ if (this.popArr.length) {
|
|
|
+ this.popDataArr = [];
|
|
|
+ this.dataList = [];
|
|
|
+
|
|
|
+ for (let i = 0; i < this.popArr.length; i++) {
|
|
|
+ await this.getConditionList(this.policyConditionId, i + 1, false);
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ // sProvision = true
|
|
|
+ this.getMaterialTypeList("sProvision");
|
|
|
+ }
|
|
|
+ },
|
|
|
// 获取销售类型
|
|
|
getTypeList() {
|
|
|
const params = {
|