|
|
@@ -34,8 +34,8 @@
|
|
|
</Row>
|
|
|
<div class="context-tabs">
|
|
|
<div
|
|
|
- v-for="matched_info in matchedList"
|
|
|
- :key="matched_info.number"
|
|
|
+ v-for="(matched_info,index) in matchedList"
|
|
|
+ :key="matched_info.index"
|
|
|
class="matched-block"
|
|
|
>
|
|
|
<Row type="flex" justify="space-between" align="top">
|
|
|
@@ -49,7 +49,8 @@
|
|
|
<div>
|
|
|
<Checkbox
|
|
|
v-model="matched_info.del_isSelect"
|
|
|
- @on-change="(e) => MatchedSelect(matched_info, e)"
|
|
|
+ @on-change="(e) => MatchedSelect(matched_info, index, e)"
|
|
|
+ :disabled="matched_info.product_state == 1"
|
|
|
class="del_check"
|
|
|
>选择</Checkbox
|
|
|
>
|
|
|
@@ -411,7 +412,11 @@ export default {
|
|
|
this.axios({
|
|
|
method: "post",
|
|
|
url: "/api/contract_match_detail_deep",
|
|
|
- params: { order_no: this.$route.query.order_no, state: 1 },
|
|
|
+ params: {
|
|
|
+ order_no: this.$route.query.order_no,
|
|
|
+ state: 1,
|
|
|
+ order_type: 2,
|
|
|
+ },
|
|
|
}).then((res) => {
|
|
|
this.matchedList = [];
|
|
|
res.data.map((v) => {
|
|
|
@@ -440,6 +445,7 @@ export default {
|
|
|
this.deepenList();
|
|
|
setTimeout(() => {
|
|
|
this.process_control = false;
|
|
|
+ this.isMatchedSelectAll = false
|
|
|
}, 500);
|
|
|
}
|
|
|
});
|
|
|
@@ -454,10 +460,12 @@ export default {
|
|
|
this.matchedTimeList = [];
|
|
|
this.matchedList.forEach((e) => {
|
|
|
if (this.isMatchedSelectAll) {
|
|
|
- e.del_isSelect = true;
|
|
|
- e.isSelect = true;
|
|
|
- this.matchedSelectedList.push(e.order_no);
|
|
|
- this.matchedTimeList.push(e.crt_time);
|
|
|
+ if (e.product_state == 0) {
|
|
|
+ e.del_isSelect = true;
|
|
|
+ e.isSelect = true;
|
|
|
+ this.matchedSelectedList.push(e.order_no);
|
|
|
+ this.matchedTimeList.push(e.crt_time);
|
|
|
+ }
|
|
|
} else {
|
|
|
e.del_isSelect = false;
|
|
|
e.isSelect = false;
|
|
|
@@ -484,10 +492,23 @@ export default {
|
|
|
}
|
|
|
this.cut_order_product_ids = this.matchedSelectedList;
|
|
|
},
|
|
|
- MatchedSelect(row, e) {
|
|
|
- row.del_isSelect = e;
|
|
|
- if (e == false) {
|
|
|
- this.isMatchedSelectAll = e;
|
|
|
+ MatchedSelect(row, index, e) {
|
|
|
+ this.matchedList[index].del_isSelect = e;
|
|
|
+ console.log(this.matchedDetailList);
|
|
|
+ if (e) {
|
|
|
+ let sureData = this.matchedList.filter((v) => {
|
|
|
+ return v.del_isSelect == true;
|
|
|
+ });
|
|
|
+ let unSureData = this.matchedList.filter((v) => {
|
|
|
+ return v.product_state == 0;
|
|
|
+ });
|
|
|
+ if (sureData.length == unSureData.length) {
|
|
|
+ this.isMatchedSelectAll = true;
|
|
|
+ } else {
|
|
|
+ this.isMatchedSelectAll = false;
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ this.isMatchedSelectAll = false;
|
|
|
}
|
|
|
this.matchedSelectedList = [];
|
|
|
this.matchedTimeList = [];
|
|
|
@@ -497,11 +518,6 @@ export default {
|
|
|
this.matchedTimeList.push(v.crt_time);
|
|
|
}
|
|
|
});
|
|
|
- if (this.matchedList.every((target) => target.del_isSelect)) {
|
|
|
- this.isMatchedSelectAll = true;
|
|
|
- } else {
|
|
|
- this.isMatchedSelectAll = false;
|
|
|
- }
|
|
|
},
|
|
|
back() {
|
|
|
this.$router.go(-1);
|