Andy 3 anni fa
parent
commit
86d7090270

+ 55 - 55
src/views/OrderMannage/BusinessOrderlist/edit.vue

@@ -425,60 +425,6 @@
                     style="margin-right: 10px">上传附件</Button>
           </Upload> -->
         </FormItem>
-        <div label="线条:" style="margin-left:20px;width:95%">
-          <div style="font-size:20px">
-            <span>线条:</span>
-            <span v-if="wood_title_count.length < 1">无</span>
-            <span
-              v-else
-              v-for="(item, index) in wood_title_count"
-              :key="item.title + '' + index"
-              >{{ item.title }}:
-              <span v-for="(_item, _index) in item.measure_str" :key="_item.id"
-                >{{ _item.measure }}={{ _item.num }}{{ item.unit }}
-                <span v-show="_index < item.measure_str.length - 1">;</span>
-              </span>
-              <span v-show="index < wood_title_count.length - 1">;</span>
-            </span>
-          </div>
-        </div>
-        <div label="合计:" style="margin-left:20px;width:95%">
-          <div style="font-size:20px">
-            <span>合计:</span>
-            <span v-if="parts_title_count.length < 1">无</span>
-            <span
-              v-else
-              v-for="(item, index) in parts_title_count"
-              :key="item.title + '' + index"
-              v-show="item.title.indexOf('线条') == -1"
-              >{{ item.title }}:{{ item.num }}{{ item.unit }}
-              <span v-show="index < parts_title_count.length - 1">;</span>
-            </span>
-          </div>
-        </div>
-        <div label="五金:" style="margin-left:20px;width:95%">
-          <div style="font-size:20px">
-            <span>五金:</span>
-            <span v-if="parts_title_count.length < 1">无</span>
-            <span
-              v-else
-              v-for="(item, index) in tableData"
-              :key="item.title + '' + index"
-              v-show="item.type == 1"
-              >{{
-                metalList.filter((v) => v.id == item.ext_id).length > 0
-                  ? metalList.filter((v) => v.id == item.ext_id)[0].title
-                  : ""
-              }}:{{ item.num
-              }}{{
-                metalList.filter((v) => v.id == item.ext_id).length > 0
-                  ? metalList.filter((v) => v.id == item.ext_id)[0].unit
-                  : ""
-              }}
-              <span v-show="index < parts_title_count.length - 1">;</span>
-            </span>
-          </div>
-        </div>
       </Form>
       <!-- 户型选择 -->
       <div class="content">
@@ -1260,6 +1206,60 @@
           ></Table>
         </div>
       </div>
+      <div label="线条:" style="margin-left:20px;width:95%">
+        <div style="font-size:20px">
+          <span>线条:</span>
+          <span v-if="wood_title_count.length < 1">无</span>
+          <span
+            v-else
+            v-for="(item, index) in wood_title_count"
+            :key="item.title + '' + index"
+            >{{ item.title }}:
+            <span v-for="(_item, _index) in item.measure_str" :key="_item.id"
+              >{{ _item.measure }}={{ _item.num }}{{ item.unit }}
+              <span v-show="_index < item.measure_str.length - 1">;</span>
+            </span>
+            <span v-show="index < wood_title_count.length - 1">;</span>
+          </span>
+        </div>
+      </div>
+      <div label="合计:" style="margin-left:20px;width:95%">
+        <div style="font-size:20px">
+          <span>合计:</span>
+          <span v-if="parts_title_count.length < 1">无</span>
+          <span
+            v-else
+            v-for="(item, index) in parts_title_count"
+            :key="item.title + '' + index"
+            v-show="item.title.indexOf('线条') == -1"
+            >{{ item.title }}:{{ item.num }}{{ item.unit }}
+            <span v-show="index < parts_title_count.length - 1">;</span>
+          </span>
+        </div>
+      </div>
+      <div label="五金:" style="margin-left:20px;width:95%">
+        <div style="font-size:20px">
+          <span>五金:</span>
+          <span v-if="parts_title_count.length < 1">无</span>
+          <span
+            v-else
+            v-for="(item, index) in tableData"
+            :key="item.title + '' + index"
+            v-show="item.type == 1"
+            >{{
+              metalList.filter((v) => v.id == item.ext_id).length > 0
+                ? metalList.filter((v) => v.id == item.ext_id)[0].title
+                : ""
+            }}:{{ item.num
+            }}{{
+              metalList.filter((v) => v.id == item.ext_id).length > 0
+                ? metalList.filter((v) => v.id == item.ext_id)[0].unit
+                : ""
+            }}
+            <span v-show="index < parts_title_count.length - 1">;</span>
+          </span>
+        </div>
+      </div>
     </div>
     <!-- 选择产品弹层--编辑框 -->
     <Modal
@@ -2834,7 +2834,7 @@ export default {
     debounce(delay) {
       if (this.timeout) {
         // clearTimeout(this.timeout);
-        this.timeout = null
+        this.timeout = null;
       } else {
         this.timeout = setTimeout(() => {
           this.postData();

+ 3 - 1
src/views/ProductionOrderList/ProductionsOrder/Decorationlist.vue

@@ -582,7 +582,9 @@ export default {
             const { row } = params;
             return h(
               "span",
-              `${row.house}-${row.unit}-${row.layer}-${row.number_detail}`
+              `${row.house ? row.house +'-': ""}${row.unit ? row.unit+'-' : ""}${
+                row.layer ? row.layer+'-' : ""
+              }${row.number_detail ? row.number_detail : ""}`
             );
           },
         },

+ 7 - 7
src/views/leadMatch/MatchList/matchList.vue

@@ -31,7 +31,7 @@
             filter-by-label
             clearable
             transfer
-            v-model="SearchInfo.machining_state"
+            v-model="SearchInfo.matching_status"
             style="width: 140px"
             size="small"
           >
@@ -110,15 +110,15 @@ export default {
         {
           title: "匹配状态",
           align: "center",
-          key: "machining_state",
+          key: "matching_status",
           minWidth: 60,
           render: (h, params) => {
             return h(
               "span",
               {},
-              params.row.machining_state == 0
+              params.row.matching_status == 0
                 ? "未匹配"
-                : params.row.machining_state == 1
+                : params.row.matching_status == 1
                 ? "匹配中"
                 : "匹配完成"
             );
@@ -127,15 +127,15 @@ export default {
         {
           title: "下生产状态",
           align: "center",
-          key: "produce_state",
+          key: "produce_status",
           minWidth: 60,
           render: (h, params) => {
             return h(
               "span",
               {},
-              params.row.produce_state == 0
+              params.row.produce_status == 0
                 ? "未下生产"
-                : params.row.produce_state == 1
+                : params.row.produce_status == 1
                 ? "下生产中"
                 : "下生产完成"
             );

+ 141 - 24
src/views/leadMatch/MatchList/matchPage.vue

@@ -74,22 +74,22 @@
     </div>
     <div class="context-tabs">
       <Tabs type="card" @on-click="handleTabsClick" v-model="currencyTag">
-        <!-- <Button
-          @click="back"
+        <Button
+          @click="showHandingMatchModal = true"
           type="primary"
           size="small"
           slot="extra"
           v-show="currencyTag == 1"
         >
           匹配
-        </Button> -->
+        </Button>
         <TabPane label="本次未匹配" name="1">
           <Row>
             <Col
               span="16"
               style="border-top: 1px solid #adb5bd;border-right: 1px solid #adb5bd;padding:10px"
             >
-              <div>
+              <div class="sheet-block">
                 <h1>码单信息</h1>
                 <div class="context-unmatched-sheet">
                   <div
@@ -99,13 +99,18 @@
                   >
                     <Row type="flex" align="middle">
                       <Col span="4">
-                        <span>图号:</span><span>{{ url_info.image_number }}</span>
+                        <span>图号:</span>
+                        <span>{{ url_info.image_number }}</span>
                       </Col>
-                      <Col span="6">
-                        <span>产品名称:</span
-                        ><span>{{ url_info.product_name }}</span>
+                      <Col span="4">
+                        <span>产品名称:</span>
+                        <span>{{ url_info.product_name }}</span>
+                      </Col>
+                      <Col span="4">
+                        <span>批量数:</span>
+                        <span>{{ url_info.house_num }}</span>
                       </Col>
-                      <Col span="4" offset="6">
+                      <Col span="4" offset="4">
                         <span>
                           总计
                           <span style="color:red">{{
@@ -231,17 +236,26 @@
                               </span>
                               <span>{{ table_info.key.num }}组</span>
                             </Col>
-                            <Col span="3" offset="11">
+                            <Col span="3" offset="8">
                               总计{{ table_info.part_list.length }}条数据
                             </Col>
+                            <Col span="3">
+                              <Button
+                                @click="handleHiddenSheetDetail(table_info)"
+                                size="small"
+                                type="text"
+                                >{{
+                                  table_info.isHidden ? "展开" : "收缩"
+                                }}</Button
+                              >
+                            </Col>
                           </Row>
                         </div>
-                        <div>
+                        <div v-show="!table_info.isHidden">
                           <Table
                             :columns="unmatchedSheetTableColumns"
                             border
                             :max-height="500"
-                            @on-selection-change="handleSelectChange"
                             :data="table_info.part_list"
                           ></Table>
                         </div>
@@ -252,7 +266,10 @@
               </div>
             </Col>
             <Col span="8">
-              <div style="border-top: 1px solid #adb5bd;padding:10px">
+              <div
+                class="room-block"
+                style="border-top: 1px solid #adb5bd;padding:10px"
+              >
                 <h1>房间信息</h1>
                 <div class="context-unmatched-room">
                   <div
@@ -262,7 +279,8 @@
                   >
                     <Row type="flex" align="middle">
                       <Col span="4">
-                        <span>图号:</span><span>{{ url_info.image_number }}</span>
+                        <span>图号:</span
+                        ><span>{{ url_info.image_number }}</span>
                       </Col>
                       <Col span="8">
                         <span>产品名称:</span
@@ -295,6 +313,12 @@
                         />
                       </Col>
                     </Row>
+                    <Row>
+                      <Col span="4">
+                        <span>批量数:</span>
+                        <span>{{ url_info.house_num }}</span>
+                      </Col>
+                    </Row>
                     <div
                       v-if="url_info.isCurrenct"
                       class="context-unmatched-room-search"
@@ -560,7 +584,11 @@
                 </span>
               </Col>
               <Col span="2">
-                <Button @click="getMatchedDetailList(matched_info)" size="small" type="primary">
+                <Button
+                  @click="getMatchedDetailList(matched_info)"
+                  size="small"
+                  type="primary"
+                >
                   搜索
                 </Button>
               </Col>
@@ -600,6 +628,35 @@
         </TabPane>
       </Tabs>
     </div>
+    <Modal v-model="showHandingMatchModal" title="手动匹配确认">
+      <div>
+        <Row style="padding:10px 0 ">
+          <Col span="8">部件名称:</Col>
+          <Col span="6">未匹配数量</Col>
+          <Col span="4" offset='6'>
+            <Button size="small" @click="showHandingMatchModal = false">
+              平均分配
+            </Button>
+          </Col>
+        </Row>
+      </div>
+      <div>
+        <Table
+          :columns="unmatchedRoomTableColumnsModal"
+          border
+          :max-height="500"
+          :data="unmatchedSelectedList"
+        >
+          <template slot="numSlot" slot-scope="{ row, index }">
+            <Input v-model="row.num" />
+          </template>
+        </Table>
+      </div>
+      <div slot="footer">
+        <Button @click="showHandingMatchModal = false">取消</Button>
+        <Button type="primary" @click="handleHandingMatch">确定</Button>
+      </div>
+    </Modal>
   </div>
 </template>
 
@@ -656,6 +713,7 @@ export default {
         urlList: [], //图号列表
         house_list: [{ title: 1 }], //当前图号下表格列表
       }, //房间信息
+      currentChooseId: "", //选中码单信息中的ID
       matchedList: [
         {
           number: "123",
@@ -682,7 +740,33 @@ export default {
       ],
       matchedDetailList: [],
       unmatchedSheetTableColumns: [
-        { title: "全选", align: "center", minWidth: 60, type: "selection" },
+        {
+          title: "选择",
+          align: "center",
+          minWidth: 60,
+          render: (h, params) => {
+            let id = params.row.id;
+            let flag = false;
+            if (this.currentChooseId == id) {
+              flag = true;
+            } else {
+              flag = false;
+            }
+            let self = this;
+            return h("div", [
+              h("Radio", {
+                props: {
+                  value: flag,
+                },
+                on: {
+                  "on-change": () => {
+                    self.currentChooseId = params.row.id;
+                  },
+                },
+              }),
+            ]);
+          },
+        },
         { title: "序号", align: "center", type: "index", minWidth: 60 },
         { title: "部件名称", align: "center", key: "part_name", minWidth: 100 },
         { title: "行号", align: "center", key: "line", minWidth: 60 },
@@ -724,7 +808,10 @@ export default {
         { title: "全选", align: "center", minWidth: 60, type: "selection" },
         { title: "序号", align: "center", type: "index", minWidth: 60 },
         { title: "区域", align: "center", key: "region", minWidth: 60 },
-        { title: "房号", align: "center", key: "house_number", minWidth: 60 },
+        { title: "楼栋", align: "center", key: "house", minWidth: 60 },
+        { title: "单元", align: "center", key: "unit", minWidth: 60 },
+        { title: "楼层", align: "center", key: "layer", minWidth: 60 },
+        { title: "房号", align: "center", key: "number", minWidth: 60 },
       ], //未匹配房间表头
       unmatchedRoomTableColumnsUsed: [],
       matchedSheetTableColumns: [
@@ -769,8 +856,10 @@ export default {
           slot: "setSlot",
         },
       ], //匹配表头
+      unmatchedRoomTableColumnsModal: [],
       unmatchedSelectedList: [],
       matchedSelectedList: [],
+      showHandingMatchModal: false,
     };
   },
   // 生命周期 - 创建完成(可以访问当前this实例)
@@ -784,11 +873,7 @@ export default {
       this.$router.go(-1);
     },
     handleSelectChange(selection) {
-      this.unmatchedSelectedList = this.unmatchedSelectedList.concat(
-        selection.map((v) => {
-          return v.product_title;
-        })
-      );
+      this.unmatchedSelectedList = selection;
     },
     handleMatchedSelectChange(selection) {
       this.matchedSelectedList = this.matchedSelectedList.concat(
@@ -796,7 +881,6 @@ export default {
           return v.cut_order_product_id;
         })
       );
-      console.log("this.matchedSelectedList :>> ", this.matchedSelectedList);
     },
     handleTabsClick(name) {
       name == 2 && this.handleMatchedListInit();
@@ -828,6 +912,15 @@ export default {
       }
       this.getSheetDetailList(row);
     },
+    handleHiddenSheetDetail(row) {
+      if (row.isHidden) {
+        row.isHidden = !row.isHidden;
+      } else {
+        row.isHidden = true;
+      }
+      this.$forceUpdate();
+      console.log("row :>> ", row);
+    },
     handleShowCurrencyMatched(row) {
       if (row.isCurrenct) {
         row.isCurrenct = !row.isCurrenct;
@@ -859,6 +952,15 @@ export default {
                 return { title: v, align: "center", key: v, minWidth: 60 };
               })
             );
+            this.unmatchedRoomTableColumnsModal = this.unmatchedRoomTableColumnsUsed.concat(
+              {
+                title: "匹配数量",
+                align: "center",
+                minWidth: 60,
+                slot: "numSlot",
+              }
+            );
+            this.unmatchedRoomTableColumnsModal = this.unmatchedRoomTableColumnsModal.splice(1)
             this.cut_size = res.data.search_word.cut_size;
             this.number = res.data.search_word.number;
             this.part_name = res.data.search_word.part_name;
@@ -896,7 +998,6 @@ export default {
         },
       }).then((res) => {
         if (res.code == 200) {
-          console.log("res :>> ", res);
           res.data.list.map((v) => (v.isCurrenct = false));
           this.unmatchedObj.urlList = res.data.list;
           this.urlSelectList = res.data.image_number;
@@ -918,6 +1019,16 @@ export default {
           }
         });
     },
+    handleHandingMatch() {
+      this.axios
+        .post("/api/bst_hand_matching", {
+          cut_order_product_detail_id: this.currentChooseId,
+          house: [],
+        })
+        .then((res) => {
+          console.log(res);
+        });
+    },
     handleMatchedSelectAll(bool) {
       for (let index = 0; index < this.matchedDetailList.length; index++) {
         // const element = this.matchedDetailList[index];
@@ -996,4 +1107,10 @@ export default {
 /deep/.ivu-table-cell {
   padding: 0;
 }
+.sheet-block,
+.room-block {
+  max-height: 500px;
+  overflow: hidden;
+  overflow-y: auto;
+}
 </style>