Browse Source

Merge branch 'hw' of http://121.41.102.225:8099/Nidong/jiufang

Andy 3 years ago
parent
commit
e8308a9d06

+ 4 - 3
src/views/BasicSettings/PartSettings/list.vue

@@ -75,7 +75,8 @@
       </Col>
     </Row>
     <div>
-      <Table :columns="tableColumns" border :max-height="500" :data="tableData">
+      <div style="height:600px">
+      <Table :columns="tableColumns" border :max-height="600" :data="tableData" >
         <template slot="setSlot" slot-scope="{ row, index }">
           <div>
             <a style="margin:0 5px;" @click="handleSet(row, 1)">复制</a>
@@ -84,7 +85,7 @@
             <a style="margin:0 5px;" @click="handleSet(row, 4)">删除</a>
           </div>
         </template>
-      </Table>
+      </Table></div>
       <div class="content_body_page">
         <Page
           :page-size-opts="[10, 20, 30, 40, 100]"
@@ -230,6 +231,6 @@ export default {
 .content_body_page {
   display: flex;
   justify-content: center;
-  padding-top: 20px;
+  padding-top: 10px;
 }
 </style>

+ 55 - 16
src/views/leadMatch/MatchList/matchCheck.vue

@@ -1,6 +1,13 @@
 <template>
   <div>
     <Toptitle title="查看">
+       <Button
+        @click="handleMatchedSelectAll()"
+        type="primary"
+        :ghost="!isMatchedSelectAll"
+        style="margin-right: 10px"
+        >{{ isMatchedSelectAll ? "取消选中" : "全部选中" }}</Button
+      >
       <Button
         @click="handleGoProduction"
         type="primary"
@@ -21,7 +28,7 @@
     </Row>
     <div class="context-tabs">
       <Row type="flex" align="middle" style="padding:10px 0">
-        <Col span="4">
+        <Col span="5">
           <span>图号:</span>
           <span>
             <Select
@@ -43,7 +50,7 @@
             </Select>
           </span>
         </Col>
-        <Col span="4">
+        <Col span="5">
           <span>产品名称:</span>
           <span>
             <Select
@@ -76,8 +83,16 @@
         :key="matched_info.number"
         class="matched-block"
       >
-        <Row>
-          <Col span="2">
+        <Row type="flex" justify="space-between" align="top">
+            <Col span="4" v-if="matched_info.matching_status == 1" style="display:flex;justify-content: space-around;">
+               <div v-if="matched_info.matching_status == 2">
+                  <Checkbox
+                  v-show="matched_info.produce_status == 0"
+                  v-model="matched_info.isSelect"
+                  @on-change="(e) => handleMatchedSelect(matched_info, e)"
+                  >选择</Checkbox
+                >
+                  </div>
             <span>图号:{{ matched_info.image_number }}</span>
           </Col>
           <Col span="6">
@@ -92,23 +107,24 @@
                 : "匹配完成"
             }}</span>
           </Col>
-          <Col span="2" offset="8">
-            <span>
+          <Col style="display:flex;justify-content: space-between;" span="6">
+            <span v-if="matched_info.matching_status == 2">
               <Button
                 @click="handleGoProduction(matched_info)"
                 type="primary"
                 size="small"
-                :disabled='(matched_info.matching_status == 0||matched_info.matching_status == 1)?true:false'
+                :disabled='matched_info.produce_status!=0'
                 >下生产</Button
               >
             </span>
-          </Col>
-          <Col span="2">
+         
+          <div>
             总计
             <span style="color:red">{{ matched_info.num }}</span>
             条数据
-          </Col>
-          <Col span="2">
+        
+         </div>
+         <div>
             <Button
               @click="handleShowCurrencyMatched(matched_info)"
               size="small"
@@ -123,7 +139,7 @@
                   : 'md-arrow-dropright'
               "
               style="vertical-align: middle;"
-            />
+            /></div>
           </Col>
         </Row>
         <Row style="margin-top:20px" v-if="matched_info.isCurrenct">
@@ -305,6 +321,7 @@ export default {
     return {
       project_number: this.$route.query.project_number,
       project_name: this.$route.query.project_name,
+      isMatchedSelectAll:false,
       matchedInfo: {
         id: this.$route.query.id,
         image_number: "",
@@ -361,6 +378,7 @@ export default {
       process_end_time: "",
       process_control: false,
       cut_order_product_ids: [],
+      matchedSelectedList:[]
     };
   },
   // 生命周期 - 创建完成(可以访问当前this实例)
@@ -374,16 +392,37 @@ export default {
     this.initData();
   },
   methods: {
+    handleMatchedSelectAll(){
+ this.isMatchedSelectAll = !this.isMatchedSelectAll;
+      this.matchedList.map((v) => {
+        if (v.produce_status == 0) {
+          v.isSelect = this.isMatchedSelectAll;
+        }
+      });
+    },
+   handleMatchedSelect(row, e) {
+      row.isSelect = e;
+      
+      let flag = true;
+      this.matchedSelectedList = [];
+      this.matchedList.map((v) => {
+        if (v.produce_status == 0) {
+          if (v.isSelect) {
+            this.matchedSelectedList.push(v.id);
+          } else {
+            flag = false;
+          }
+        }
+      });
+      this.isMatchedSelectAll = flag;
+      this.cut_order_product_ids = this.matchedSelectedList;
+    },
     back() {
       this.$router.go(-1);
     },
     handleGoProduction(row) {
       if (row) {
         this.cut_order_product_ids = [row.id];
-      } else {
-        this.cut_order_product_ids = this.matchedList.map((v) => {
-          return v.id;
-        });
       }
       this.processModal = true;
     },

+ 1 - 1
src/views/leadMatch/roomList/edit.vue

@@ -67,7 +67,7 @@
               <span>图号:{{item.url_number}}</span>
               <span>产品名称:{{item.product_title}}</span>
               <span>批量数:{{item.number}}</span>
-              <span :style="item.state == 1?'':'color:red;'">{{item.state == 0?'未匹配':item.state == 2?'匹配完成':'匹配中'}}</span>
+              <span :style="item.state == 1?'':'color:red;'" v-show='$route.query.type!=3'>{{item.state == 0?'未匹配':item.state == 2?'匹配完成':'匹配中'}}</span>
             </div>
             <div class="table_header_right">
               <Button type="primary" size="small" :disabled="item.state==0?false:true" @click="del(item,index)" v-if="$route.query.type!=2">删除</Button>