Pārlūkot izejas kodu

Merge branch 'cjh' of 121.41.102.225:Nidong/jiufang

mushencc 3 gadi atpakaļ
vecāks
revīzija
14ae84f2ce

+ 1 - 1
src/views/Agreement/deepen/edit.vue

@@ -209,7 +209,7 @@ export default {
             if(this.tableData.length==0){
             return this.$Message.warning('请先导入数据!')
             }
-            if(!this.formData.jtl_id||!this.formData.order_no||!this.formData.project_title||!this.formData.abbreviation){
+            if(!this.formData.order_no||!this.formData.project_title||!this.formData.abbreviation){
                 return this.$Message.warning('请输入完整信息!')
             }
             

+ 1 - 1
src/views/Agreement/edit.vue

@@ -228,7 +228,7 @@ export default {
              editTableColumns:[
                 {title:'序号',type:'index',align:'center',minWidth:80,key:'index'},
                 {title:'区域',minWidth:100,align:'center',key:'region'},
-                {title:'产品分类',minWidth:100,align:'center',key:'bp_id'},
+                {title:'产品分类',minWidth:100,align:'center',key:'product_type_title'},
                 {title:'产品名称',minWidth:100,align:'center',key:'product_title'},
                 {title:'产品图片',minWidth:100,align:'center',key:'product_img',slot:'product_img'},
                 {title:'产品特征',minWidth:100,align:'center',key:'product_feature'},

+ 33 - 17
src/views/Agreement/match/check.vue

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

+ 3 - 13
src/views/Agreement/match/matching.vue

@@ -1046,25 +1046,14 @@ export default {
       } else {
         this.isMatchedSelectAll = false;
       }
-      // this.matchedSelectedList = [];
       this.matchedSelectedList = "";
       this.matchedTimeList = [];
       this.matchedDetailList.forEach((v) => {
         if (v.del_isSelect) {
-          // this.matchedSelectedList.push(v.order_no);
           this.matchedSelectedList = v.order_no;
           this.matchedTimeList.push(v.crt_time);
         }
       });
-      // if (
-      //   this.matchedDetailList.every(
-      //     (target) => target.del_isSelect
-      //   )
-      // ) {
-      //   this.isMatchedSelectAll = true;
-      // } else {
-      //   this.isMatchedSelectAll = false;
-      // }
     },
     ifCheckAll(s) {
       this.revocationList = s;
@@ -1103,7 +1092,7 @@ export default {
       this.axios({
         method: "post",
         url: "/api/contract_match_detail_deep",
-        params: { order_no: this.$route.query.order_no, state: 0 },
+        params: { order_no: this.$route.query.order_no, state: 0,order_type:1 },
       }).then((res) => {
         this.matchedList = [];
         if (this.copy_matchedList.length == 0) {
@@ -1127,6 +1116,7 @@ export default {
         .post("/api/contract_match_detail_deep", {
           order_no: this.$route.query.order_no,
           state: 1,
+          order_type:1
         })
         .then((res) => {
           if (res.code == 200) {
@@ -1459,7 +1449,7 @@ export default {
       }
       let priceValue = 0;
       this.checkedContractList.forEach((e) => {
-        priceValue += e.total_price; //这是合同选择的价格的和
+        priceValue += e.total_price*1; //这是合同选择的价格的和
       });
       let average = parseFloat(
         parseFloat(priceValue) / parseFloat(this.checkedDeepenList.length)