|
|
@@ -277,7 +277,7 @@
|
|
|
transfer
|
|
|
clearable
|
|
|
filter-by-label
|
|
|
- v-model="matchedInfo.product_title "
|
|
|
+ v-model="matchedInfo.product_title"
|
|
|
:max-tag-count="2"
|
|
|
size="small"
|
|
|
style="width: 100px"
|
|
|
@@ -293,7 +293,7 @@
|
|
|
</Col>
|
|
|
<Col span="2">
|
|
|
<Button
|
|
|
- @click="getMatchedDetailList(matched_info)"
|
|
|
+ @click="getMatchedDetailList(matched_info,1)"
|
|
|
size="small"
|
|
|
type="primary"
|
|
|
>
|
|
|
@@ -302,7 +302,6 @@
|
|
|
</Col>
|
|
|
</Row>
|
|
|
<div v-if="matched_info.isCurrenct">
|
|
|
- <keep-alive>
|
|
|
<Table
|
|
|
ref="selection"
|
|
|
@on-selection-change="checkedDeepen"
|
|
|
@@ -331,7 +330,6 @@
|
|
|
</div>
|
|
|
</template>
|
|
|
</Table>
|
|
|
- </keep-alive>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
@@ -371,13 +369,12 @@
|
|
|
style="display: flex; justify-content: space-between"
|
|
|
span="6"
|
|
|
>
|
|
|
- <span v-if="matched_info.matching_status == 2">
|
|
|
+ <span>
|
|
|
<Button
|
|
|
- @click="handleGoProduction(2, matched_info)"
|
|
|
+ @click="handleMatchedSet(matched_info,1)"
|
|
|
type="primary"
|
|
|
size="small"
|
|
|
- :disabled="matched_info.product_state != 0"
|
|
|
- >下生产通知</Button
|
|
|
+ >撤销匹配</Button
|
|
|
>
|
|
|
</span>
|
|
|
|
|
|
@@ -649,6 +646,24 @@ export default {
|
|
|
resizable: true,
|
|
|
},
|
|
|
{
|
|
|
+ title: "单位",
|
|
|
+ align: "center",
|
|
|
+ key: "unit",
|
|
|
+ resizable: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: "饰面",
|
|
|
+ align: "center",
|
|
|
+ key: "finish",
|
|
|
+ resizable: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: "备注",
|
|
|
+ align: "center",
|
|
|
+ key: "remark",
|
|
|
+ resizable: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
title: "金额",
|
|
|
align: "center",
|
|
|
key: "total_price",
|
|
|
@@ -731,6 +746,24 @@ export default {
|
|
|
resizable: true,
|
|
|
},
|
|
|
{
|
|
|
+ title: "单位",
|
|
|
+ align: "center",
|
|
|
+ key: "unit",
|
|
|
+ resizable: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: "饰面",
|
|
|
+ align: "center",
|
|
|
+ key: "finish",
|
|
|
+ resizable: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: "备注",
|
|
|
+ align: "center",
|
|
|
+ key: "remark",
|
|
|
+ resizable: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
title: "金额",
|
|
|
align: "center",
|
|
|
key: "total_price",
|
|
|
@@ -751,12 +784,12 @@ export default {
|
|
|
checkedContractList: [], //合同选择的数据
|
|
|
checkedDeepenList: [], //深化信息选择的
|
|
|
revocationList: [], //撤销匹配选中的列表
|
|
|
- search:{
|
|
|
- product_title_list:[],
|
|
|
- region_list:[]
|
|
|
+ search: {
|
|
|
+ product_title_list: [],
|
|
|
+ region_list: [],
|
|
|
},
|
|
|
- searchRegionList:[],
|
|
|
- searchProductTitleList:[]
|
|
|
+ searchRegionList: [],
|
|
|
+ searchProductTitleList: [],
|
|
|
};
|
|
|
},
|
|
|
// 生命周期 - 创建完成(可以访问当前this实例)
|
|
|
@@ -778,13 +811,14 @@ export default {
|
|
|
this.matched_detail[row._index].total_price = Number(
|
|
|
this.matched_detail[row._index].total_price
|
|
|
).toFixed(2);
|
|
|
- if (row.total_price > 0) {
|
|
|
- this.matched_detail.forEach((e) => {
|
|
|
- if (e.id == row.id) {
|
|
|
- e.total_price = row.total_price;
|
|
|
- }
|
|
|
- });
|
|
|
+ if (row.total_price > 0) {
|
|
|
+ this.matched_detail.forEach((e) => {
|
|
|
+ if (e.id == row.id) {
|
|
|
+ e.total_price = row.total_price;
|
|
|
+ }
|
|
|
+ });
|
|
|
}
|
|
|
+
|
|
|
return;
|
|
|
}
|
|
|
},
|
|
|
@@ -893,23 +927,34 @@ export default {
|
|
|
|
|
|
return sums;
|
|
|
},
|
|
|
- handleMatchedSet(row, index, type) {
|
|
|
+ handleMatchedSet(row, type) {
|
|
|
console.log(this.matchedSelectedList);
|
|
|
- if (this.matchedSelectedList.length == 0) {
|
|
|
+ if (this.matchedSelectedList.length == 0 && type !=1) {
|
|
|
return this.$Message.warning("请选择");
|
|
|
}
|
|
|
- this.axios
|
|
|
- .post("/api/contract_match_revoke", {
|
|
|
- id: [],
|
|
|
+ let params= {}
|
|
|
+ if(type == 1){
|
|
|
+ params = {
|
|
|
+ id: [],
|
|
|
+ order_no: row.order_no,
|
|
|
+ time: [row.crt_time],
|
|
|
+ }
|
|
|
+ }else{
|
|
|
+ params = {
|
|
|
+ id: [],
|
|
|
order_no: this.matchedSelectedList,
|
|
|
time: this.matchedTimeList,
|
|
|
- })
|
|
|
+ }
|
|
|
+ }
|
|
|
+ console.log(params);
|
|
|
+ this.axios
|
|
|
+ .post("/api/contract_match_revoke", params)
|
|
|
.then((res) => {
|
|
|
if (res.code == 200) {
|
|
|
this.matchedSelectedList = "";
|
|
|
this.matchedTimeList = [];
|
|
|
this.handleMatchedListInit();
|
|
|
- this.isMatchedSelectAll = false
|
|
|
+ this.isMatchedSelectAll = false;
|
|
|
}
|
|
|
});
|
|
|
},
|
|
|
@@ -963,10 +1008,11 @@ export default {
|
|
|
})
|
|
|
.then((res) => {
|
|
|
if (res.code == 200) {
|
|
|
+ console.log(res.data);
|
|
|
this.contractData = res.data.data;
|
|
|
this.contractTotal = res.data.total;
|
|
|
this.searchRegionList = res.data.region_list;
|
|
|
- this.searchProductTitleList = res.data.product_title_list
|
|
|
+ this.searchProductTitleList = res.data.product_title_list;
|
|
|
}
|
|
|
});
|
|
|
},
|
|
|
@@ -975,11 +1021,13 @@ export default {
|
|
|
if (e == false) {
|
|
|
this.isMatchedSelectAll = e;
|
|
|
}
|
|
|
- this.matchedSelectedList = [];
|
|
|
+ // this.matchedSelectedList = [];
|
|
|
+ this.matchedSelectedList = "";
|
|
|
this.matchedTimeList = [];
|
|
|
this.matchedDetailList.forEach((v) => {
|
|
|
if (v.del_isSelect) {
|
|
|
- this.matchedSelectedList.push(v.order_no);
|
|
|
+ // this.matchedSelectedList.push(v.order_no);
|
|
|
+ this.matchedSelectedList = v.order_no;
|
|
|
this.matchedTimeList.push(v.crt_time);
|
|
|
}
|
|
|
});
|
|
|
@@ -1007,8 +1055,21 @@ export default {
|
|
|
);
|
|
|
},
|
|
|
handleTabsClick(name) {
|
|
|
- name == 2 && this.handleMatchedListInit();
|
|
|
- name == 1 && this.contractList();
|
|
|
+ if(name ==2 ){
|
|
|
+ this.isMatchedSelectAll = false
|
|
|
+ this.handleMatchedListInit()
|
|
|
+ }else{
|
|
|
+ this.checkedDeepenList=[]
|
|
|
+ this.matched_detail = []
|
|
|
+ // this.getMatchedDetailList("",1)
|
|
|
+ this.detail();
|
|
|
+ this.deepenList();
|
|
|
+ this.contractList();
|
|
|
+ this.ifMatching = true;
|
|
|
+
|
|
|
+ }
|
|
|
+ // name == 2 && this.handleMatchedListInit();
|
|
|
+ // name == 1 && this.contractList();
|
|
|
},
|
|
|
deepenList() {
|
|
|
//深化信息接口
|
|
|
@@ -1220,7 +1281,7 @@ export default {
|
|
|
checkedDeepen(se) {
|
|
|
this.checkedDeepenList = se;
|
|
|
},
|
|
|
- getMatchedDetailList(row) {
|
|
|
+ getMatchedDetailList(row,type) {
|
|
|
this.matched_detail.forEach((e) => {
|
|
|
if (e.total_price > 0) {
|
|
|
this.checkedDeepenList.push(e);
|
|
|
@@ -1241,14 +1302,18 @@ export default {
|
|
|
this.$set(item, "total_price", 0);
|
|
|
});
|
|
|
this.matched_detail = res.data.data;
|
|
|
- this.matched_detail.forEach((e) => {
|
|
|
- this.checkedDeepenList.forEach((l) => {
|
|
|
- if (e.id == l.id) {
|
|
|
- e._checked = true;
|
|
|
- e.total_price = l.total_price;
|
|
|
- }
|
|
|
+ // type != 1
|
|
|
+ if(this.checkedDeepenList.length>0 || type!=1){
|
|
|
+ this.matched_detail.forEach((e) => {
|
|
|
+ this.checkedDeepenList.forEach((l) => {
|
|
|
+ if (e.id == l.id) {
|
|
|
+ e._checked = true;
|
|
|
+ e.total_price = l.total_price;
|
|
|
+ }
|
|
|
+ });
|
|
|
});
|
|
|
- });
|
|
|
+ }
|
|
|
+
|
|
|
this.regionMatchedList = res.data.region_list; //区域
|
|
|
this.urlMatchedList = res.data.url_number_list; //图号
|
|
|
this.productList = res.data.product_title_list;
|
|
|
@@ -1334,6 +1399,9 @@ export default {
|
|
|
if (this.checkedDeepenList.length < 1) {
|
|
|
return this.$Message.warning("请选择深化信息中的内容");
|
|
|
}
|
|
|
+ if(this.checkedDeepenList.length > 1 && this.checkedContractList.length > 1 ){
|
|
|
+ return this.$Message.warning("多个产品不能对应多个图号");
|
|
|
+ }
|
|
|
let priceValue = 0;
|
|
|
this.checkedContractList.forEach((e) => {
|
|
|
priceValue += e.total_price; //这是合同选择的价格的和
|
|
|
@@ -1386,6 +1454,9 @@ export default {
|
|
|
this.contractList();
|
|
|
this.deepenList();
|
|
|
this.handleShowCurrencyMatched1(false);
|
|
|
+ this.ifMatching = true;
|
|
|
+ this.checkedContractList = [];
|
|
|
+ this.checkedDeepenList=[];
|
|
|
}
|
|
|
});
|
|
|
},
|
|
|
@@ -1421,14 +1492,14 @@ export default {
|
|
|
},
|
|
|
handleMatchedSelectAll() {
|
|
|
this.isMatchedSelectAll = !this.isMatchedSelectAll;
|
|
|
- this.matchedSelectedList = [];
|
|
|
+ this.matchedSelectedList = "";
|
|
|
this.matchedTimeList = [];
|
|
|
this.matchedDetailList.forEach((e) => {
|
|
|
if (this.isMatchedSelectAll) {
|
|
|
e.del_isSelect = true;
|
|
|
e.isSelect = true;
|
|
|
// this.matchedSelectedList.push(e.order_no);
|
|
|
- this.matchedSelectedList = e.order_no
|
|
|
+ this.matchedSelectedList = e.order_no;
|
|
|
this.matchedTimeList.push(e.crt_time);
|
|
|
} else {
|
|
|
e.del_isSelect = false;
|
|
|
@@ -1444,7 +1515,7 @@ export default {
|
|
|
if (v.product_state == 0) {
|
|
|
if (v.isSelect) {
|
|
|
// this.matchedSelectedList.push(v.id);
|
|
|
- this.matchedSelectedList = v.id
|
|
|
+ this.matchedSelectedList = v.id;
|
|
|
} else {
|
|
|
flag = false;
|
|
|
}
|