Pārlūkot izejas kodu

Merge branch 'master' of 121.41.102.225:Nidong/jiufang into hw

mushencc 3 gadi atpakaļ
vecāks
revīzija
0a6130e060

+ 93 - 36
src/views/ChipPrintScreen/ChipPrintScreen.vue

@@ -29,7 +29,7 @@
           完 成
         </Button>
         <Button @click="goCheckPage" size="large" type="primary">
-          查 看
+          补 打
         </Button>
       </div>
     </div>
@@ -460,7 +460,11 @@
           <div>
             <span>数量:</span>
             <InputNumber
-              :max="this.selectedInfo.on_print - this.selectedInfo.on_complete"
+              :max="
+                selectedObj.type == 1
+                  ? selectedObj.on_print - selectedObj.on_complete
+                  : selectedObj.un_complete
+              "
               :min="0"
               size="large"
               v-model="selectedObj.ok_num"
@@ -516,13 +520,13 @@
       </div>
       <div slot="footer">
         <Button
-          @click="roomModal = false"
+          @click="handleRoomCancel"
           type="primary"
           style="margin-right: 10px"
         >
           返回
         </Button>
-        <Button @click="handleOkComfirm(selectedObj)" type="primary">
+        <Button @click="handlePrintComfirm(selectedObj, 1)" type="primary">
           确认
         </Button>
       </div>
@@ -533,6 +537,7 @@
 <script>
 // 这里可以导入其他文件(比如:组件,工具js,第三方插件js,json文件,图片文件等等)
 // 例如:import 《组件名称》 from '《组件路径》';
+import $ from "jquery";
 import "@vant/touch-emulator";
 export default {
   name: "",
@@ -602,6 +607,14 @@ export default {
   },
   // 生命周期 - 创建完成(可以访问当前this实例)
   created() {},
+  beforeRouteEnter(to, from, next) {
+    next((vm) => {
+      if (from.path == "/cms/ChipPrintScreen/ChipPrintScreenCheck") {
+        vm.selectedInfo = JSON.parse(localStorage.getItem("printInfo"));
+        vm.getChipDetail();
+      }
+    });
+  },
   // 生命周期 - 挂载完成(可以访问DOM元素)
   mounted() {},
   methods: {
@@ -637,6 +650,7 @@ export default {
         this.selectedInfo.rows.splice(v, 1);
       } else if (v == "product_id") {
         this.selectedInfo.url_number = "";
+        this.selectedInfo.product_id = "";
       } else {
         this.selectedInfo[v] = "";
       }
@@ -690,24 +704,20 @@ export default {
       this.$forceUpdate();
     },
     handleSelectedRoomClick(list, block) {
-      if (this.modalRoomListSelected.length < this.selectedObj.print_num) {
-        block.isCurrent = !block.isCurrent;
-        this.modalRoomListSelected = this.modalRoomListSelected.concat(
-          this.modalRoomList.filter((v) => v.isCurrent)
+      if (block.isCurrent) {
+        this.modalRoomListSelected = this.modalRoomListSelected.filter(
+          (v) => v.id != block.id
         );
-      } else if (
-        this.modalRoomListSelected.length == this.selectedObj.print_num
-      ) {
-        if (block.isCurrent) {
-          this.modalRoomListSelected = this.modalRoomListSelected.filter(
-            (v) => v.id != block.id
-          );
+        block.isCurrent = !block.isCurrent;
+      } else {
+        if (this.modalRoomListSelected.length < this.selectedObj.print_num) {
           block.isCurrent = !block.isCurrent;
+          this.modalRoomListSelected = this.modalRoomListSelected.concat(
+            this.modalRoomList.filter((v) => v.isCurrent)
+          );
         } else {
           this.$Message.warning("与打印数量不符,请重新选择");
         }
-      } else {
-        this.$Message.warning("与打印数量不符,请重新选择");
       }
       this.modalRoomListSelected = Array.from(
         new Set([...this.modalRoomListSelected])
@@ -864,27 +874,49 @@ export default {
       });
     },
     handlePrint() {
-      // if (!this.selectedObj.isChoosed) {
-      //   return this.$Message.warning("请选择数据");
-      // }
-      this.selectedObj.print_num = this.selectedObj.un_print;
+      if (!this.selectedObj.isChoosed) {
+        return this.$Message.warning("请选择数据");
+      }
+      if (this.selectedObj.type != 1) {
+        return this.$Message.warning("该部件不含芯片,无需打印");
+      }
+      if (this.selectedObj.un_print == 0) {
+        this.selectedObj.print_num = this.selectedObj.on_print;
+      } else {
+        this.selectedObj.print_num = this.selectedObj.un_print;
+      }
       this.printModal = true;
     },
-    handlePrintComfirm(row) {
+    handlePrintComfirm(row, type) {
+      let ids = this.modalRoomListSelected.map((v) => {
+        return v.id;
+      });
+      let data = type
+        ? {
+            order_no: this.selectedInfo.order_no,
+            product_id: this.selectedInfo.product_id,
+            rows: this.selectedInfo.rows,
+            num: this.selectedObj.print_num,
+            id: row.id,
+            ids,
+            type,
+          }
+        : {
+            order_no: this.selectedInfo.order_no,
+            product_id: this.selectedInfo.product_id,
+            rows: this.selectedInfo.rows,
+            num: this.selectedObj.print_num,
+            id: row.id,
+          };
       this.axios({
         method: "post",
         url: "/api/station_print",
-        data: {
-          order_no: this.selectedInfo.order_no,
-          product_id: this.selectedInfo.product_id,
-          rows: this.selectedInfo.rows,
-          num: this.selectedObj.print_num,
-          id: row.id,
-        },
+        data,
       }).then((resp) => {
         if (resp.code == 200) {
           this.handlePrintChips(resp.data);
           this.printModal = false;
+          this.roomModal = false;
         }
       });
     },
@@ -893,11 +925,22 @@ export default {
         return this.$Message.warning("请选择数据");
       }
       if (this.selectedObj.type == 1 && this.selectedObj.un_print == 0) {
+        this.selectedObj.ok_num =
+          this.selectedObj.on_print - this.selectedObj.on_complete;
+        this.okModal = true;
+      } else if (this.selectedObj.type != 1) {
+        this.selectedObj.ok_num = this.selectedObj.un_complete;
+        this.okModal = true;
+      } else {
         return this.$Message.warning("部件存在未打印芯片,请先打印");
       }
-      this.selectedObj.ok_num =
-        this.selectedObj.on_print - this.selectedObj.on_complete;
-      this.okModal = true;
+    },
+    handleRoomCancel() {
+      this.modalRoomList.map((v) => {
+        v.isCurrent = false;
+      });
+      this.modalRoomListSelected = [];
+      this.roomModal = false;
     },
     handleOkComfirm(row) {
       this.axios({
@@ -1183,10 +1226,24 @@ export default {
         // });
         printparamsJsonArray.push({ PTK_CloseConnect: "" });
         data.printparams = printparamsJsonArray;
-        // data.printparams = JSON.stringify(printparamsJsonArray);
-        this.test_content = JSON.stringify(data);
-        this.test_url = url;
-        this.test_modal = true;
+        let sub_data = JSON.parse(JSON.stringify(data));
+        sub_data.printparams = JSON.stringify(sub_data.printparams);
+        let _this = this;
+        $.ajax({
+          type: "post",
+          url,
+          data: sub_data,
+          dataType: "json",
+          timeout: 5000,
+          success: function(result) {
+            if (result.retval == "0") {
+              _this.$Message.success("发送成功");
+              _this.getChipDetail();
+            } else {
+              _this.$Message.error("发送失败,返回结果:" + result.msg);
+            }
+          },
+        });
       });
     },
   },

+ 169 - 11
src/views/ChipPrintScreen/ChipPrintScreenCheck.vue

@@ -424,6 +424,49 @@
         </Button>
       </div>
     </Modal>
+    <Modal
+      class="selection-modal"
+      v-model="roomModal"
+      title="选择房间号"
+      width="80%"
+    >
+      <div class="selection-modal-body">
+        <div
+          :class="[
+            block.isCurrent
+              ? 'selection-modal-body-block selection-modal-body-block-choosen'
+              : 'selection-modal-body-block selection-modal-body-block-unchoosen',
+          ]"
+          v-for="(block, index) in modalRoomList"
+          :key="index"
+          @click="handleSelectedRoomClick(modalRoomList, block)"
+        >
+          <div>
+            <span>{{ block.house }}</span>
+          </div>
+        </div>
+      </div>
+      <div class="fullscreen-content-page">
+        <Page
+          @on-change="changeRoomPage"
+          :current="modal_room_page_index"
+          :page-size="modal_room_page_size"
+          :total="modal_room_total"
+        />
+      </div>
+      <div slot="footer">
+        <Button
+          @click="handleRoomCancel"
+          type="primary"
+          style="margin-right: 10px"
+        >
+          返回
+        </Button>
+        <Button @click="handlePrintComfirm(selectedObj)" type="primary">
+          确认
+        </Button>
+      </div>
+    </Modal>
   </Modal>
 </template>
 
@@ -431,6 +474,7 @@
 // 这里可以导入其他文件(比如:组件,工具js,第三方插件js,json文件,图片文件等等)
 // 例如:import 《组件名称》 from '《组件路径》';
 import "@vant/touch-emulator";
+import $ from "jquery";
 export default {
   name: "",
   components: {},
@@ -447,6 +491,7 @@ export default {
       selectionRownolModal: false,
       selectionDetailModal: false,
       printModal: false,
+      roomModal: false,
       contentData: [],
       selectedObj: {},
       ordernoObj: {
@@ -479,6 +524,9 @@ export default {
       modal_1_page_index: 1,
       modal_1_page_size: 6,
       modal_1_total: 0,
+      modal_room_page_index: 1,
+      modal_room_page_size: 9,
+      modal_room_total: 0,
       modal_2_page_index: 1,
       modal_2_page_size: 60,
       modal_2_total: 0,
@@ -488,6 +536,8 @@ export default {
       chooseLineNo: [{ start: "", end: "" }],
       keyboardObj: {},
       keyboardVal: "",
+      modalRoomList: [],
+      modalRoomListSelected: [],
     };
   },
   // 生命周期 - 创建完成(可以访问当前this实例)
@@ -554,12 +604,6 @@ export default {
       }
       this.selectedObj = row;
     },
-    goCheckPage() {
-      localStorage.setItem("printInfo", JSON.stringify(this.selectedInfo));
-      this.$router.push({
-        path: "/cms/ChipPrintScreen/ChipPrintScreenCheck",
-      });
-    },
     handleSelectionClick(row, obj) {
       row.list.map((v) => (v.isCurrent = false));
       obj.isCurrent = true;
@@ -681,6 +725,62 @@ export default {
         }
       });
     },
+    changeRoomPage(e) {
+      this.modal_room_page_index = e;
+      this.getModalRoomList();
+    },
+    handleSelectionRoom() {
+      this.getModalRoomList();
+      this.roomModal = true;
+    },
+    getModalRoomList() {
+      this.axios({
+        method: "post",
+        url: "/api/station_get_print_house",
+        data: {
+          order_no: this.selectedInfo.order_no,
+          product_id: this.selectedInfo.product_id,
+          rows: this.selectedInfo.rows,
+          page_index: this.modal_room_page_index,
+          page_size: this.modal_room_page_size,
+          id: this.selectedObj.id,
+        },
+      }).then((res) => {
+        if (res.code == 200) {
+          res.data.data.map((v) => {
+            v.isCurrent = false;
+            this.modalRoomListSelected &&
+              this.modalRoomListSelected.map((w) => {
+                if (w.id == v.id) {
+                  v.isCurrent = true;
+                }
+              });
+          });
+          this.modalRoomList = res.data.data;
+          this.modal_room_total = res.data.total;
+        }
+      });
+    },
+    handleSelectedRoomClick(list, block) {
+      if (block.isCurrent) {
+        this.modalRoomListSelected = this.modalRoomListSelected.filter(
+          (v) => v.id != block.id
+        );
+        block.isCurrent = !block.isCurrent;
+      } else {
+        if (this.modalRoomListSelected.length < this.selectedObj.print_num) {
+          block.isCurrent = !block.isCurrent;
+          this.modalRoomListSelected = this.modalRoomListSelected.concat(
+            this.modalRoomList.filter((v) => v.isCurrent)
+          );
+        } else {
+          this.$Message.warning("与打印数量不符,请重新选择");
+        }
+      }
+      this.modalRoomListSelected = Array.from(
+        new Set([...this.modalRoomListSelected])
+      );
+    },
     //项目、图号确认
     handleSelectionComfirm(row) {
       console.log(`row`, row);
@@ -727,7 +827,11 @@ export default {
       if (!this.selectedObj.isChoosed) {
         return this.$Message.warning("请选择数据");
       }
-      this.selectedObj.print_num = this.selectedObj.un_print;
+      if (this.selectedObj.un_print == 0) {
+        this.selectedObj.print_num = this.selectedObj.on_print;
+      } else {
+        this.selectedObj.print_num = this.selectedObj.un_print;
+      }
       this.printModal = true;
     },
     handlePrintComfirm(row) {
@@ -745,6 +849,46 @@ export default {
         if (resp.code == 200) {
           this.handlePrintChips(resp.data);
           this.printModal = false;
+          this.roomModal = false;
+        }
+      });
+    },
+    handleOk() {
+      if (!this.selectedObj.isChoosed) {
+        return this.$Message.warning("请选择数据");
+      }
+      if (this.selectedObj.type == 1 && this.selectedObj.un_print == 0) {
+        return this.$Message.warning("部件存在未打印芯片,请先打印");
+      }
+      this.selectedObj.ok_num =
+        this.selectedObj.on_print - this.selectedObj.on_complete;
+      this.okModal = true;
+    },
+    handleRoomCancel() {
+      this.modalRoomList.map((v) => {
+        v.isCurrent = false;
+      });
+      this.modalRoomListSelected = [];
+      this.roomModal = false;
+    },
+    handleOkComfirm(row) {
+      if (this.modalRoomListSelected.length != this.selectedObj.print_num) {
+        return this.$Message.warning("与打印数量不符,请重新选择");
+      }
+      this.axios({
+        method: "post",
+        url: "/api/station_complete",
+        data: {
+          order_no: this.selectedInfo.order_no,
+          product_id: this.selectedInfo.product_id,
+          rows: this.selectedInfo.rows,
+          num: this.selectedObj.ok_num,
+          id: row.id,
+        },
+      }).then((res) => {
+        if (res.code == 200) {
+          this.okModal = false;
+          this.getChipDetail();
         }
       });
     },
@@ -981,10 +1125,24 @@ export default {
         // });
         printparamsJsonArray.push({ PTK_CloseConnect: "" });
         data.printparams = printparamsJsonArray;
-        // data.printparams = JSON.stringify(printparamsJsonArray);
-        this.test_content = JSON.stringify(data);
-        this.test_url = url;
-        this.test_modal = true;
+        let sub_data = JSON.parse(JSON.stringify(data));
+        sub_data.printparams = JSON.stringify(sub_data.printparams);
+        let _this = this;
+        $.ajax({
+          type: "post",
+          url,
+          data: sub_data,
+          dataType: "json",
+          timeout: 5000,
+          success: function(result) {
+            if (result.retval == "0") {
+              _this.$Message.success("发送成功");
+              _this.getChipDetail();
+            } else {
+              _this.$Message.error("发送失败,返回结果:" + result.msg);
+            }
+          },
+        });
       });
     },
   },

+ 1875 - 0
src/views/ProductionOrderList/ProductionsOrder/Decorationlist.vue

@@ -0,0 +1,1875 @@
+<template>
+  <div>
+    <FullPage
+      title="生产订单详情"
+      :list="list"
+      @init="init"
+      :logList="logList"
+      :loading="loading"
+      @searchData="init"
+      @changePage="changePage"
+      @changeSize="changeSize"
+      @selectTable="selectTable"
+      :tableColums="tableColums"
+      :tableData="tableData"
+      :pageIndex="pageIndex"
+      :total="total"
+    >
+      <div slot="titleButton">
+        <Button @click="back" type="primary" ghost style="margin-right: 10px"
+          >返回</Button
+        >
+        <Button
+          type="primary"
+          ghost
+          style="margin-right: 10px"
+          @click="openMeasureModal(selects)"
+          >修改尺寸</Button
+        >
+        <Button
+          type="primary"
+          ghost
+          style="margin-right: 10px"
+          @click="openShipModal(selects)"
+          >批量打印芯片</Button
+        >
+        <!-- <Button type="primary" ghost style="margin-right:10px;" @click="showBatchModal = true">批量绑定芯片</Button> -->
+        <Button
+          type="primary"
+          ghost
+          style="margin-right: 10px"
+          @click="batchSelectRouter"
+          >批量修改工艺路线</Button
+        >
+        <Button
+          type="primary"
+          ghost
+          style="margin-right: 10px"
+          @click="openModal(selects)"
+          >批量下生产排产</Button
+        >
+        <Button type="primary" ghost>批量打印订单</Button>
+      </div>
+
+      <template slot="set" slot-scope="{ row }">
+        <div class="table-set">
+          <a @click="printChip(row)">打印芯片</a>
+          <!-- <a @click="bingChip(row)">绑定芯片</a> -->
+          <!-- <a @click="bingChip(row)" v-if="row.tagnum&&row.part_tag">更换芯片</a> -->
+          <a @click="openModal(row)" :disabled="row.part_state != 0"
+            >下生产排产</a
+          >
+          <!-- <a @click="downImg(row.url,row.product_title)">下载图纸</a> -->
+        </div>
+      </template>
+      <Modal
+        class-name="vertical-center-modal"
+        title="修改尺寸"
+        v-model="showMeasureModal"
+        :width="500"
+      >
+        <div>
+          <Table
+            border
+            :columns="measureModalColumns"
+            :data="measureModalTableData"
+          >
+          </Table>
+        </div>
+        <div slot="footer">
+          <Button
+            @click="showMeasureModal = false"
+            type="primary"
+            ghost
+            style="margin-right: 10px"
+            >取消</Button
+          >
+          <Button
+            type="primary"
+            ghost
+            style="margin-right: 10px"
+            @click="handleMeasureModalConfirm"
+            >确认</Button
+          >
+        </div>
+      </Modal>
+      <Modal
+        @on-ok="saveChip"
+        class-name="vertical-center-modal"
+        title="绑定芯片"
+        v-model="showChip"
+        :width="300"
+        @on-visible-change="vivibleModal"
+      >
+        <Form>
+          <FormItem label="芯片编号">
+            <Input v-model="chipInfo.tag" placeholder="请输入芯片编号"></Input>
+          </FormItem>
+        </Form>
+      </Modal>
+
+      <Modal
+        title="批量绑定"
+        fullscreen
+        v-model="showBatchModal"
+        @on-visible-change="visibleBatchModal"
+      >
+        <div class="batch-content">
+          <div style="margin-right: 10px; width: 60%">
+            <Table
+              @on-selection-change="batchSelect"
+              border
+              stripe
+              :columns="batchTablePartsColumn"
+              :data="batchTablePartsData"
+            ></Table>
+          </div>
+          <div style="margin-left: 10px; width: 40%">
+            <Table
+              border
+              stripe
+              :columns="batchChipColumns"
+              :data="batchChipData"
+            ></Table>
+          </div>
+        </div>
+        <div class="batch-footer">
+          <Page :total="batchTotal" show-total />
+        </div>
+        <div slot="footer" class="modal-footer">
+          <Button @click="showBatchModal = false">取消</Button>
+          <Button type="primary" @click="batchBindChip">确认绑定</Button>
+        </div>
+      </Modal>
+      <Modal
+        class-name="vertical-center-modal"
+        v-model="show_add"
+        title="选择工艺路线"
+      >
+        <div class="modal_process_route">
+          <div class="modal_process_route_top">
+            <div>
+              <span>工艺路线名称:</span>
+              <Input
+                v-model="tempProcessLine.title"
+                style="width:120px"
+                placeholder="请输入"
+              ></Input>
+            </div>
+            <Button
+              type="primary"
+              @click="handleSearchProcessLine(tempProcessLine.title)"
+              >搜索</Button
+            >
+          </div>
+          <div class="modal_process_route_content">
+            <Table
+              border
+              :columns="processLineColumns"
+              :data="processLineTableData"
+            >
+              <template slot="processLineSet" slot-scope="{ row, index }">
+                <a
+                  style="margin:0 5px"
+                  @click="handleProcessLineSet(row, index)"
+                  >选择</a
+                >
+              </template>
+            </Table>
+          </div>
+        </div>
+      </Modal>
+      <Modal
+        class-name="vertical-center-modal-Process"
+        width="80%"
+        v-model="show_add_detail"
+        :mask-closable="false"
+        title="工艺路线修改"
+      >
+        <div class="modal_process_route-process">
+          <div>
+            <span style="width: 100px">id: </span
+            ><Input
+              v-model="info.id"
+              disabled
+              placeholder="自动生成"
+              style="width: 150px"
+              size="small"
+            />
+          </div>
+          <div>
+            <span style="width: 100px">工艺路线名称: </span
+            ><Input
+              v-model="info.title"
+              placeholder="请输入工艺路线名称"
+              size="small"
+              style="width: 250px"
+            />
+          </div>
+        </div>
+        <div class="modal_content">
+          <div class="modal_content_left">
+            <span>已选:</span>
+            <SlickList
+              :distance="10"
+              :lockToContainerEdges="true"
+              axis="x,y,xy"
+              lockAxis="xy"
+              v-model="selectTags"
+              class="SortableList"
+              @input="getChangeLists"
+            >
+              <SlickItem
+                style="z-index: 9999"
+                v-for="(item, key) of selectTags"
+                :key="key"
+                class="SortableItem"
+                :index="key"
+              >
+                <Tooltip>
+                  <div slot="content">
+                    <p>工时:{{ item.time }}</p>
+                    <p>工价:{{ item.wages }}</p>
+                    <p>产能:{{ item.capacity }}</p>
+                  </div>
+                  <div class="tag-modal">
+                    <div class="before">{{ key + 1 }}</div>
+                    <Tag
+                      @on-close="closeTag(key, selectTags, item)"
+                      color="primary"
+                      type="border"
+                      closable
+                      >{{ item.title }}</Tag
+                    >
+                  </div>
+                </Tooltip>
+              </SlickItem>
+            </SlickList>
+          </div>
+          <div class="modal_content_right">
+            <div v-for="(item, index) of info.bps" :key="index">
+              <div v-if="item.cld && item.cld.length > 0">
+                <span style="font-weight:bold">{{ item.title }}</span>
+                <div
+                  style="display: flex;justify-content: flex-start;flex-wrap: wrap;"
+                >
+                  <div
+                    v-for="(_item, _index) in item.cld"
+                    :key="_index"
+                    :style="
+                      _item.p_id
+                        ? [{ 'margin-left': '10px' }]
+                        : [{ 'margin-left': '10px' }, { width: '100%' }]
+                    "
+                  >
+                    <div v-if="_item.cld && _item.cld.length > 0">
+                      <div>
+                        <div style="font-weight:bold;width:100%">
+                          {{ _item.title }}:
+                        </div>
+                        <div
+                          style="display: flex;justify-content: flex-start;flex-wrap: wrap;"
+                        >
+                          <div
+                            v-for="(__item, __index) in _item.cld"
+                            :key="__index"
+                            :style="
+                              __item.p_id
+                                ? [{ 'margin-left': '10px' }]
+                                : [{ 'margin-left': '10px' }, { width: '100%' }]
+                            "
+                          >
+                            <div v-if="__item.cld && __item.cld.length > 0">
+                              <span style="font-weight:bold"
+                                >{{ __item.title }}:</span
+                              >
+                              <div
+                                style="display: flex;justify-content: flex-start;flex-wrap: wrap;"
+                              >
+                                <Tooltip
+                                  v-for="(___item, ___index) of __item.cld"
+                                  :key="___index"
+                                >
+                                  <div slot="content">
+                                    <p>工时:{{ ___item.time }}</p>
+                                    <p>工价:{{ ___item.wages }}</p>
+                                    <p>产能:{{ ___item.capacity }}</p>
+                                  </div>
+                                  <Checkbox
+                                    @on-change="
+                                      changeCheck($event, ___item, selectTags)
+                                    "
+                                    v-model="___item.show"
+                                    style="padding: 0px 5px"
+                                    >{{ ___item.title }}</Checkbox
+                                  >
+                                </Tooltip>
+                              </div>
+                            </div>
+                            <div v-else>
+                              <Tooltip v-if="__item.p_id">
+                                <div slot="content">
+                                  <p>工时:{{ __item.time }}</p>
+                                  <p>工价:{{ __item.wages }}</p>
+                                  <p>产能:{{ __item.capacity }}</p>
+                                </div>
+                                <Checkbox
+                                  @on-change="
+                                    changeCheck($event, __item, selectTags)
+                                  "
+                                  v-model="__item.show"
+                                  style="padding: 0px 5px"
+                                  >{{ __item.title }}</Checkbox
+                                >
+                              </Tooltip>
+                            </div>
+                          </div>
+                        </div>
+                      </div>
+                    </div>
+                    <div v-else>
+                      <Tooltip v-if="_item.p_id">
+                        <div slot="content">
+                          <p>工时:{{ _item.time }}</p>
+                          <p>工价:{{ _item.wages }}</p>
+                          <p>产能:{{ _item.capacity }}</p>
+                        </div>
+                        <Checkbox
+                          @on-change="changeCheck($event, _item, selectTags)"
+                          v-model="_item.show"
+                          style="padding: 0px 5px"
+                          >{{ _item.title }}</Checkbox
+                        >
+                      </Tooltip>
+                      <!-- <span v-else>{{ _item.title }}</span> -->
+                    </div>
+                  </div>
+                </div>
+              </div>
+              <!-- <div v-else>{{ item.title }}</div> -->
+            </div>
+          </div>
+        </div>
+        <div slot="footer">
+          <Button @click="show_add_detail = false" type="primary" ghost
+            >取消</Button
+          >
+          <Button @click="saveTableData()" type="primary">确定</Button>
+        </div>
+      </Modal>
+    </FullPage>
+    <Modal
+      class-name="vertical-center-modal-PL"
+      v-model="test_modal"
+      title="打印内容"
+      @on-ok="test_run_print(test_url, test_content)"
+    >
+      <Input type="textarea" v-model="test_content" :rows="40" />
+    </Modal>
+  </div>
+</template>
+
+<script>
+import { SlickList, SlickItem } from "vue-slicksort";
+import axios from "axios";
+import $ from "jquery";
+export default {
+  components: {
+    SlickList,
+    SlickItem,
+  },
+  data() {
+    return {
+      measureModalColumns: [
+        {
+          title: "部件名称",
+          key: "part_title",
+          align: "center",
+          minWidth: 120,
+        },
+        {
+          title: "高",
+          key: "high",
+          align: "center",
+          minWidth: 120,
+          render: (h, params) => {
+            const { row, index } = params;
+            const currentRow = this.measureModalTableData[index];
+            return h("Input", {
+              props: {
+                value: currentRow.high,
+                type: "text",
+              },
+              on: {
+                "on-change": (e) => {
+                  currentRow.high = e.target.value;
+                  this.measureModalTableData.splice(index, 1, currentRow);
+                },
+              },
+            });
+          },
+        },
+        {
+          title: "宽",
+          key: "wide",
+          align: "center",
+          minWidth: 120,
+          render: (h, params) => {
+            const { row, index } = params;
+            const currentRow = this.measureModalTableData[index];
+            return h("Input", {
+              props: {
+                value: currentRow.wide,
+                type: "text",
+              },
+              on: {
+                "on-change": (e) => {
+                  currentRow.wide = e.target.value;
+                  this.measureModalTableData.splice(index, 1, currentRow);
+                },
+              },
+            });
+          },
+        },
+        {
+          title: "厚",
+          key: "thick",
+          align: "center",
+          minWidth: 120,
+          render: (h, params) => {
+            const { row, index } = params;
+            const currentRow = this.measureModalTableData[index];
+            return h("Input", {
+              props: {
+                value: currentRow.thick,
+                type: "text",
+              },
+              on: {
+                "on-change": (e) => {
+                  currentRow.thick = e.target.value;
+                  this.measureModalTableData.splice(index, 1, currentRow);
+                },
+              },
+            });
+          },
+        },
+      ],
+      measureModalTableData: [],
+      test_url: "",
+      test_modal: false,
+      test_content: null,
+      list: [
+        {
+          title: "楼幢",
+          name: "Select",
+          multiple: true,
+          filterable: true,
+          value: "",
+          serverName: "house",
+          placeholder: "请选择楼幢",
+          option: [],
+        },
+
+        {
+          title: "单元",
+          name: "Select",
+          multiple: true,
+          filterable: true,
+          value: "",
+          serverName: "unit",
+          placeholder: "请选择单元",
+          option: [],
+        },
+        {
+          title: "楼层",
+          name: "Select",
+          multiple: true,
+          filterable: true,
+          value: "",
+          serverName: "layer",
+          placeholder: "请选择楼层",
+          option: [],
+        },
+        {
+          title: "房号",
+          name: "Select",
+          multiple: true,
+          filterable: true,
+          value: "",
+          serverName: "number_detail",
+          placeholder: "请选择房号",
+          option: [],
+        },
+        {
+          title: "部件",
+          name: "Select",
+          multiple: true,
+          filterable: true,
+          value: "",
+          serverName: "part",
+          placeholder: "请选择部件",
+          option: [],
+        },
+        {
+          title: "产品名称",
+          name: "Select",
+          multiple: true,
+          filterable: true,
+          value: "",
+          serverName: "product",
+          placeholder: "请选择产品",
+          option: [],
+        },
+        {
+          title: "是否存在工艺路线",
+          name: "Select",
+          value: "",
+          serverName: "process_router",
+          option: [
+            { label: "是", value: 1 },
+            { label: "否", value: 0 },
+          ],
+        },
+        // {
+        //   title: "是否贴标签",
+        //   name: "Select",
+        //   value: "",
+        //   serverName: "label",
+        //   option: [
+        //     { label: "是", value: 1 },
+        //     { label: "否", value: 0 },
+        //   ],
+        // },
+        // {
+        //   title: '是否绑定芯片',
+        //   name: 'Select',
+        //   value: '',
+        //   serverName: 'status',
+        //   option: [
+        //     { label: '是', value: 1 },
+        //     { label: '否', value: 0 },
+        //   ],
+        // },
+        {
+          title: "部件状态",
+          name: "Select",
+          value: "",
+          serverName: "part_state",
+          option: [
+            { label: "未下计划", value: 0 },
+            { label: "已下计划", value: 1 },
+          ],
+        },
+        {
+          title: "图号",
+          name: "Select",
+          multiple: true,
+          filterable: true,
+          value: "",
+          serverName: "img_number",
+          placeholder: "请选择图号",
+          option: [],
+        },
+      ],
+      tableColums: [
+        { type: "selection", fixed: "left", width: "100", align: "center" },
+        {
+          title: "房号",
+          align: "center",
+          key: "number_detail",
+          minWidth: 100,
+          render: (h, params) => {
+            const { row } = params;
+            return h(
+              "span",
+              `${row.house ? row.house + "-" : ""}${
+                row.unit ? row.unit + "-" : ""
+              }${row.layer ? row.layer + "-" : ""}${
+                row.number_detail ? row.number_detail : ""
+              }`
+            );
+          },
+        },
+
+        { title: "单价", align: "center", key: "price", minWidth: 100 },
+        { title: "产品", align: "center", key: "product_title", minWidth: 150 },
+        {
+          title: "图纸",
+          align: "center",
+          key: "img_url",
+          minWidth: 100,
+          render: (h, params) => {
+            const { row } = params;
+            return h("img", {
+              attrs: {
+                src:
+                  this.$store.state.ip +
+                  (params.row.url[0] ? params.row.url[0].img_url : ""),
+                style:
+                  "max-width:50px;max-height:50px;position:relative;top:3px;",
+              },
+              on: {
+                click: (e) => {
+                  this.$previewImg({
+                    list: row.url,
+                    baseUrl: this.$store.state.ip,
+                    baseImgField: "img_url",
+                    baseTitleField: "title",
+                  });
+                },
+              },
+            });
+          },
+        },
+
+        {
+          title: "图号",
+          align: "center",
+          key: "url_number",
+          minWidth: 100,
+        },
+        {
+          title: "位置",
+          align: "center",
+          key: "position",
+          minWidth: 100,
+        },
+        { title: "部件名", align: "center", key: "part_title", minWidth: 200 },
+        {
+          title: "部件测量数据",
+          align: "center",
+          key: "measure",
+          minWidth: 200,
+        },
+        {
+          title: "部件相关",
+          align: "center",
+          key: "properties",
+          minWidth: 200,
+        },
+        {
+          title: "芯片",
+          align: "center",
+          key: "chip",
+          minWidth: 200,
+          tooltip: true,
+          tooltipTheme: "light",
+        },
+        {
+          title: "工艺要求",
+          align: "center",
+          key: "rework_require",
+          minWidth: 200,
+        },
+        // {
+        //   title: "部件是否贴标签",
+        //   align: "center",
+        //   minWidth: 150,
+        //   render: (h, params) =>
+        //     h("span", {}, params.row.label == 0 ? "否" : "是"),
+        // },
+        // {
+        //   title: "零部件名称",
+        //   align: "center",
+        //   key: "sub_label",
+        //   minWidth: 200,
+        //   render: (h, params) => {
+        //     const { row } = params;
+        //     return h(
+        //       "Tooltip",
+        //       {
+        //         props: {
+        //           content: row.sub_label,
+        //           placement: "top",
+        //         },
+        //       },
+        //       [
+        //         h(
+        //           "div",
+        //           {
+        //             props: {},
+        //             style: {
+        //               width: "100px",
+        //               overflow: "hidden",
+        //               whiteSpace: "nowrap",
+        //               textOverflow: "ellipsis",
+        //             },
+        //           },
+        //           row.sub_label
+        //         ),
+        //       ]
+        //     );
+        //   },
+        // },
+        // {
+        //   title: "零部件是否贴标签",
+        //   align: "center",
+        //   minWidth: 200,
+        //   render: (h, params) =>
+        //     h("span", {}, params.row.sub_is_tag == 0 ? "否" : "是"),
+        // },
+        {
+          title: "部件状态",
+          align: "center",
+          minWidth: 120,
+          render: (h, params) =>
+            h("span", {}, params.row.part_state == 0 ? "未下计划" : "已下计划"),
+        },
+        {
+          title: "预估完工工期",
+          align: "center",
+          key: "predict_time",
+          minWidth: 200,
+          render: (h, params) =>
+            h("span", `${(params.row.predict_time / 8).toFixed(1)}天`),
+        },
+        {
+          title: "操作",
+          align: "center",
+          slot: "set",
+          width: "200",
+          fixed: "right",
+        },
+      ],
+      tableData: [],
+      pageIndex: 1,
+      pageSize: 10,
+      total: 100,
+      showModal: false,
+      showType: 1,
+      logList: [],
+      classInfo: {},
+      proxyObj: {},
+      showPlan: false,
+      planInfo: {
+        pr_id: null,
+        start_time: "",
+        end_time: "",
+      },
+      selects: [],
+      order_no: null,
+      loading: false,
+      showChip: false,
+      chipInfo: {},
+      showBatchModal: false,
+      batchTablePartsColumn: [
+        { type: "selection", fixed: "left", minWidth: 90, align: "center" },
+        {
+          title: "项目名称",
+          key: "residential_name",
+          align: "center",
+          minWidth: 200,
+        },
+        {
+          title: "房号",
+          align: "center",
+          key: "number_detail",
+          minWidth: 100,
+          render: (h, params) => {
+            const { row } = params;
+            return h(
+              "span",
+              `${row.house}-${row.unit}-${row.layer}-${row.number_detail}`
+            );
+          },
+        },
+        {
+          title: "产品",
+          align: "center",
+          key: "product_title",
+          minWidth: 150,
+        },
+        {
+          title: "位置",
+          align: "center",
+          key: "position",
+          minWidth: 100,
+        },
+        // {
+        //   title: "部件",
+        //   key: "",
+        //   align: "center",
+        //   key: "part_title",
+        //   minWidth: 100,
+        // },
+        // {
+        //   title: "部件是否贴标签",
+        //   key: "",
+        //   align: "center",
+        //   minWidth: 200,
+        //   render: (h, params) =>
+        //     h("span", {}, params.row.label == 1 ? "是" : "否"),
+        // },
+        {
+          title: "零部件是否贴标签",
+          key: "",
+          align: "center",
+          minWidth: 150,
+          render: (h, params) =>
+            h("span", {}, params.row.sub_is_tag == 1 ? "是" : "否"),
+        },
+        {
+          title: "操作",
+          align: "center",
+          width: "100",
+          fixed: "right",
+          render: (h, params) =>
+            h(
+              "a",
+              {
+                on: {
+                  click: () => this.batchTablePartsData.splice(params.index, 1),
+                },
+              },
+              "删除"
+            ),
+        },
+      ],
+      batchTablePartsData: [],
+      batchChipColumns: [
+        { title: "芯片编码", key: "", align: "center", key: "tag" },
+        {
+          title: "扫码时间",
+          key: "",
+          align: "center",
+          minWidth: 100,
+          render: (h, params) =>
+            h("span", {}, this.func.replaceDate(params.row.scan_time * 1)),
+        },
+        {
+          title: "操作",
+          key: "",
+          align: "center",
+          render: (h, params) =>
+            h(
+              "a",
+              {
+                on: {
+                  click: () => this.batchChipData.splice(params.index, 1),
+                },
+              },
+              "删除"
+            ),
+        },
+      ],
+      batchChipData: [],
+      batchPageIndex: 1,
+      batchPageSize: 10,
+      batchTotal: 10,
+      batchSelectArray: [],
+      wxsoect: null,
+      arrList: [],
+      show_add_detail: false,
+      show_add: false,
+      processLineTableData: [],
+      info: {
+        title: "",
+        price: "",
+        parts_id: "",
+        id: null,
+        properties: [], //工序号
+        procedure: [], //工艺属性id
+        list: [],
+        bps: [],
+        procedure_id: "",
+      },
+      selectTags: [], //已选列表
+      tempProcessLine: {
+        title: "",
+      },
+      processLineColumns: [
+        { title: "序号", type: "index", align: "center", key: "" },
+        // { title: 'ID', align: 'center', key: 'id' },
+        { title: "工艺路线名称", align: "center", key: "title" },
+        { title: "操作", align: "center", key: "id", slot: "processLineSet" },
+      ],
+      showMeasureModal: false,
+    };
+  },
+  created() {
+    this.getOptions();
+    // const wxsoect = new WebSocket("ws://localhost:8080");
+    // this.wxsoect = wxsoect;
+    // console.log("this.wxsoect :>> ", this.wxsoect);
+    // wxsoect.onopen = function(evt) {
+    //   console.log(`已成功打开`);
+    // };
+
+    // wxsoect.onclose = function(evt) {
+    //   console.log(`已断开socket连接`);
+    // };
+    // wxsoect.onerror = function(err) {
+    //   throw new Error(err);
+    // };
+    // wxsoect.onmessage = function(message) {
+    //   console.log(message);
+    // };
+    this.axios("/api/bp_list").then((res) => {
+      this.info.bps = res.data;
+    });
+    this.axios("/api/bpp_list").then((res) => {
+      res.data.map((v) => {
+        if (v.select) {
+          v.cld.map((z) => {
+            v.select.map((k) => {
+              z.show = k == z.id ? true : false;
+            });
+          });
+        } else {
+          v.cld.map((v) => (v.show = false));
+        }
+      });
+      this.info.list = res.data;
+    });
+  },
+  methods: {
+    init(row) {
+      this.pageIndex = 1;
+      row.page_index = this.pageIndex;
+      row.page_size = this.pageSize;
+      Object.assign(row, this.$route.query);
+      if (this.func.isType(row.house) == "Array") {
+        row.house = row.house.join(",");
+      }
+      if (this.func.isType(row.unit) == "Array") {
+        row.unit = row.unit.join(",");
+      }
+      if (this.func.isType(row.layer) == "Array") {
+        row.layer = row.layer.join(",");
+      }
+      if (this.func.isType(row.number_detail) == "Array") {
+        row.number_detail = row.number_detail.join(",");
+      }
+      if (this.func.isType(row.part) == "Array") {
+        row.part = row.part.join(",");
+      }
+      if (this.func.isType(row.product) == "Array") {
+        row.product = row.product.join(",");
+      }
+      if (this.func.isType(row.img_number) == "Array") {
+        row.img_number = row.img_number.join(",");
+      }
+      this.proxyObj = row;
+      this.getData(row);
+    },
+    getData(row) {
+      this.loading = true;
+      this.axios("/api/orders_produce_parts_list", { params: row }).then(
+        (res) => {
+          this.loading = false;
+          this.order_no = res.data.order_no;
+          this.logList = res.data.detail;
+          this.tableData = res.data.list;
+          this.total = res.data.total;
+          res.data.house.map((v) => {
+            v.value = v.house;
+            v.label = v.house;
+          });
+          res.data.unit.map((v) => {
+            v.value = v.unit;
+            v.label = v.unit;
+          });
+          res.data.layer.map((v) => {
+            v.value = v.layer;
+            v.label = v.layer;
+          });
+          res.data.number_detail.map((v) => {
+            v.value = v.number;
+            v.label = v.number;
+          });
+          res.data.part.map((v) => {
+            v.value = v.title;
+            v.label = v.title;
+          });
+          res.data.img_number.map((v) => {
+            v.value = v.title;
+            v.label = v.title;
+          });
+          this.list[0].option = res.data.house;
+          this.list[1].option = res.data.unit;
+          this.list[2].option = res.data.layer;
+          this.list[3].option = res.data.number_detail;
+          this.list[4].option = res.data.part;
+          this.list[9].option = res.data.img_number;
+        }
+      );
+    },
+    getOptions() {
+      this.axios("/api/order_detail_word", {
+        params: { order_no: this.$route.query.order_no },
+      }).then((res) => {
+        res.data.part.map((v) => {
+          v.value = v.title;
+          v.label = v.title;
+        });
+        res.data.produce.map((v) => {
+          v.value = v.title;
+          v.label = v.title;
+        });
+        res.data.product.map((v) => {
+          v.value = v.title;
+          v.label = v.title;
+        });
+        // for (let i in res.data.url_number) {
+        //   var j = {};
+        //   j.value = res.data.url_number[i];
+        //   j.title = res.data.url_number[i];
+        //   j.lable = res.data.url_number[i];
+        //   this.arrList.push(j);
+        // }
+        // res.data.url_number.map((v) => {
+        //   var j = {};
+        //   j.value = v;
+        //   j.label = v;
+        //   j.title = v;
+        //   this.arrList.push(j);
+        // });
+        res.data.url_number.map((v) => {
+          v.value = v.url_number;
+          v.label = v.url_number;
+        });
+        // this.list[0].option = res.data.house;
+        // this.list[1].option = res.data.unit;
+        // this.list[2].option = res.data.layer;
+        // this.list[3].option = res.data.number_detail;
+        this.list[4].option = res.data.part;
+        this.list[5].option = res.data.product;
+        this.list[9].option = res.data.url_number;
+      });
+    },
+    changePage(e) {
+      this.pageIndex = e;
+      this.proxyObj.page_index = e;
+      this.getData(this.proxyObj);
+    },
+    changeSize(e) {
+      this.pageSize = e;
+      this.proxyObj.page_size = this.pageSize;
+      this.getData(this.proxyObj);
+    },
+    back() {
+      this.$router.go(-1);
+    },
+    openModal(row) {
+      if (Array.isArray(row)) {
+        //批量下生产操作
+        if (row.length < 1) {
+          return this.$Message.warning("请至少选择一项");
+        }
+        let result = [];
+        row.map((v) => result.push(v.pr_id));
+        this.planInfo.pr_id = result.join(",");
+      } else {
+        //单个下生产
+        this.planInfo.pr_id = row.pr_id;
+      }
+      this.downProduction({
+        title: "下生产排产",
+        type: 1,
+        params: this.planInfo,
+        then: (e) => {
+          this.getData(this.proxyObj);
+        },
+        cancel: (e) => {},
+      });
+    },
+    selectTable(e) {
+      this.selects = e;
+    },
+    vivibleModal(e) {
+      if (!e) {
+        this.planInfo = {
+          order_no: null,
+          start_time: "",
+          end_time: "",
+        };
+      }
+    },
+    downImg(url, filename) {
+      if (!url) {
+        return this.$Message.error("暂无可下载资源");
+      }
+      let img = new Image();
+      img.onload = (e) => {
+        const canvas = document.createElement("canvas");
+        canvas.width = img.width;
+        canvas.height = img.height;
+        if (canvas.getContext) {
+          let context = canvas.getContext("2d");
+          context.drawImage(img, 0, 0, img.width, img.height); //绘制图纸
+          let downUrl = canvas.toDataURL("image/png");
+          let link = document.createElement("a");
+          link.href = downUrl;
+          link.style.display = "none";
+          link.download = filename || "图纸.png"; // 文件名称
+          document.body.appendChild(link);
+          link.click();
+          URL.revokeObjectURL(link.href); //释放URL对象
+          document.body.removeChild(link);
+        }
+      };
+      img.src = this.$store.state.ip + url;
+      img.crossOrigin = "anonymous";
+    },
+    bingChip(row) {
+      this.showChip = true;
+      this.chipInfo.pr_id = row.pr_id;
+    },
+    saveChip() {
+      this.axios.post("/api/tag_bind", this.chipInfo).then((res) => {
+        if (res.code == 200) {
+          this.$Message.success(res.msg || "操作成功");
+          this.getData(this.proxyObj);
+        }
+      });
+    },
+    vivibleModal(e) {
+      if (!e) {
+        this.chipInfo = {};
+      }
+    },
+    getChipData() {
+      this.axios("/api/tag_list", {
+        params: {
+          page_size: this.batchPageSize,
+          page_index: this.pageIndex,
+          status: 0,
+        },
+      }).then((res) => {
+        res.code == 200
+          ? (() => {
+              this.batchChipData = res.data.data;
+              this.batchTotal = res.data.total;
+            })()
+          : "";
+      });
+    },
+    visibleBatchModal(e) {
+      if (e) {
+        this.getChipData();
+        this.batchTablePartsData = this.selects;
+      }
+    },
+    batchSelect(e) {
+      this.batchSelectArray = e;
+    },
+    batchBindChip() {
+      if (!this.batchSelectArray.length) {
+        return false;
+      }
+      let pr_id = "",
+        tag = "";
+      this.batchSelectArray.forEach((v, i) => {
+        this.batchChipData[i].tag
+          ? (() => {
+              pr_id +=
+                v.pr_id + (i == this.batchSelectArray.length - 1 ? "" : ",");
+              tag +=
+                this.batchChipData[i].tag +
+                (i == this.batchSelectArray.length - 1 ? "" : ",");
+            })()
+          : "";
+      });
+      this.axios
+        .post("/api/tag_bind", { pr_id: pr_id, tag: tag })
+        .then((res) => {
+          if (res.code == 200) {
+            this.$Message.success(res.msg || "操作成功");
+            this.getData(this.proxyObj);
+            this.showBatchModal = false;
+          }
+        });
+    },
+    batchSelectRouter() {
+      if (this.selects.length < 1) {
+        return this.$Message.error("请至少选择一项");
+      }
+      this.show_add = true;
+      this.handleSearchProcessLine(this.tempProcessLine.title);
+      return;
+      this.selectProcessRouter({
+        params: {
+          id: this.selects.reduce(
+            (pre, cur, index) =>
+              (pre +=
+                cur.pr_id + `${index == this.selects.length - 1 ? "" : ","}`),
+            ""
+          ),
+        },
+        then: () => {},
+      });
+    },
+    handleProcessLineSet(row, index) {
+      this.info.id = row.id;
+      this.info.title = row.title;
+      this.info.procedure_id = row.procedure_id;
+      this.selectTags = [];
+      const arr = this.info.procedure_id
+        ? this.info.procedure_id.split(",")
+        : [];
+      for (const key in this.info.bps) {
+        const el = this.info.bps[key];
+        el.cld.forEach((z) => {
+          z.show = false;
+          z.cld &&
+            z.cld.length > 0 &&
+            z.cld.forEach((elem) => {
+              elem.show = false;
+              elem.cld &&
+                elem.cld.length > 0 &&
+                elem.cld.forEach((ele) => {
+                  ele.show = false;
+                });
+            });
+        });
+      }
+      this.$nextTick(() => {
+        arr.forEach((element) => {
+          for (const key in this.info.bps) {
+            const el = this.info.bps[key];
+            for (const k in el.cld) {
+              const e = el.cld[k];
+              if (e.id == element) {
+                e.show = true;
+                e.p_id && this.selectTags.push(e);
+              }
+              e.cld &&
+                e.cld.length > 0 &&
+                e.cld.forEach((z) => {
+                  if (z.id == element) {
+                    z.show = true;
+                    z.p_id && this.selectTags.push(z);
+                  }
+                  z.cld &&
+                    z.cld.length > 0 &&
+                    z.cld.forEach((elem) => {
+                      if (elem.id == element) {
+                        elem.show = true;
+                        elem.p_id && this.selectTags.push(elem);
+                      }
+                      elem.cld &&
+                        elem.cld.length > 0 &&
+                        elem.cld.forEach((ele) => {
+                          if (ele.id == element) {
+                            ele.show = true;
+                            ele.p_id && this.selectTags.push(ele);
+                          }
+                        });
+                    });
+                });
+            }
+          }
+        });
+      });
+      this.show_add_detail = true;
+      this.show_add = false;
+    },
+    handleSearchProcessLine(title) {
+      this.axios({
+        method: "get",
+        url: "/api/technological_route",
+        params: {
+          title,
+        },
+      })
+        .then((res) => {
+          this.processLineTableData = res.data.data;
+        })
+        .catch((err) => {});
+    },
+    openMeasureModal(row) {
+      if (row.length < 1) {
+        return this.$Message.warning("请至少选择一项");
+      }
+      this.measureModalTableData = [];
+      row.map((v) => {
+        let measure = v.measure.split("*");
+        this.measureModalTableData.push({
+          id: v.pr_id,
+          part_title: v.part_title,
+          high: measure[0],
+          wide: measure[1],
+          thick: measure[2],
+        });
+      });
+      this.showMeasureModal = true;
+    },
+    handleMeasureModalConfirm() {
+      this.axios
+        .post("/api/update_product_pr_measure", {
+          ...this.measureModalTableData,
+        })
+        .then((res) => {
+          if (res.code == 200) {
+            this.$Message.success("修改成功");
+            this.showMeasureModal = false;
+            this.init(this.proxyObj);
+          }
+        });
+    },
+    openShipModal(row) {
+      // if (this.wxsoect.readyState != 1) {
+      //   return this.$Message.error("打印机未正常连接,请检查");
+      // }
+      // if (Array.isArray(row) && row.length < 1) {
+      //   return this.$Message.warning("请先择");
+      // }
+      const result = row.map((pre) => pre.id);
+      this.confirmDelete({
+        title: "批量打印芯片",
+        type: "primary",
+        content: "确认批量打印么?",
+        then: (res) => {
+          this.axios
+            .post("/api/print_ship", {
+              ...this.proxyObj,
+              ids: result.join(","),
+            })
+            .then((resp) => {
+              if (resp.code == 200) {
+                const result = resp.data;
+                console.log(result, "多打印");
+                this.handlePrintChips(resp.data);
+                // if (result && result.length > 0) {
+                //   result.map((ele) => this.printDemo(ele));
+                // }
+              }
+            });
+        },
+      });
+    },
+    test_run_print(url, data) {
+      let sub_data = JSON.parse(data);
+      sub_data.printparams = JSON.stringify(sub_data.printparams);
+      $.ajax({
+        type: "post",
+        url,
+        data: sub_data,
+        dataType: "json",
+        timeout: 5000,
+        success: function(result) {
+          if (result.retval == "0") {
+            this.$Message.success("发送成功");
+          } else {
+            this.$Message.error("发送失败,返回结果:" + result.msg);
+          }
+        },
+      });
+    },
+    handlePrintChips(contents) {
+      this.axios.get("/api/get_print_url").then((res) => {
+        let data = {};
+        // let url = "http://192.168.0.145:888/postek/print"; //request_url
+        let url = `http://${res.data.request_url}:888/postek/print`; //request_url
+        data.reqParam = "1";
+        let printparamsJsonArray = [];
+        // let IP = "192.168.1.58";//print_url
+        // let IP = "192.168.0.199"; //print_url
+        let IP = res.data.print_url;
+        let port = 9100;
+        let IP_Port = IP + "," + port;
+        printparamsJsonArray.push({ PTK_Connect_Timer: IP_Port + ",1" });
+        printparamsJsonArray.push({ PTK_ClearBuffer: "" });
+        printparamsJsonArray.push({ PTK_SetDirection: "B" });
+        printparamsJsonArray.push({ PTK_SetPrintSpeed: "4" });
+        printparamsJsonArray.push({ PTK_SetDarkness: "10" });
+        printparamsJsonArray.push({
+          PTK_SetLabelHeight: 624 + "," + 24 + ",0,false",
+        });
+        printparamsJsonArray.push({ PTK_SetLabelWidth: 1080 });
+        contents.map((content) => {
+          //贝斯特打印格式
+          //上
+          const printContent_l1 = `项目:${content.client_name}`;
+          printparamsJsonArray.push({
+            PTK_DrawText_TrueType:
+              "100,40,60,0,微软雅黑,1,700,0,0,0," + printContent_l1,
+          });
+          const printContent_l1_2 = `区域:${
+            content.house ? content.house + "-" : ""
+          }${content.layer ? content.layer : ""}${
+            content.position ? content.position : ""
+          }`;
+          printparamsJsonArray.push({
+            PTK_DrawText_TrueType:
+              "600,40,60,0,微软雅黑,1,700,0,0,0," + printContent_l1_2,
+          });
+          const printContent_l2 = `房号:${content.number_detail}`;
+          printparamsJsonArray.push({
+            PTK_DrawText_TrueType:
+              "100,110,60,0,微软雅黑,1,700,0,0,0," + printContent_l2,
+          });
+          const printContent_l2_2 = `产品:${content.product_title}`;
+          printparamsJsonArray.push({
+            PTK_DrawText_TrueType:
+              "600,110,60,0,微软雅黑,1,700,0,0,0," + printContent_l2_2,
+          });
+          const printContent_l3 = `图号:${content.url_number}`;
+          printparamsJsonArray.push({
+            PTK_DrawText_TrueType:
+              "100,180,60,0,微软雅黑,1,700,0,0,0," + printContent_l3,
+          });
+          const printContent_l3_2 = `部件:${content.part_title}`;
+          printparamsJsonArray.push({
+            PTK_DrawText_TrueType:
+              "600,180,60,0,微软雅黑,1,700,0,0,0," + printContent_l3_2,
+          });
+          const printContent_l4 = `木皮:${content.color_title}`;
+          printparamsJsonArray.push({
+            PTK_DrawText_TrueType:
+              "100,320,60,0,微软雅黑,1,700,0,0,0," + printContent_l4,
+          });
+          const printContent_l4_2 = `尺寸:${content.measure}`;
+          printparamsJsonArray.push({
+            PTK_DrawText_TrueType:
+              "100,250,60,0,微软雅黑,1,700,0,0,0," + printContent_l4_2,
+          });
+          //下
+          printparamsJsonArray.push({
+            PTK_DrawText_TrueType:
+              "100,435,45,0,微软雅黑,1,700,0,0,0," + printContent_l1,
+          });
+          printparamsJsonArray.push({
+            PTK_DrawText_TrueType:
+              "600,435,45,0,微软雅黑,1,700,0,0,0," + printContent_l1_2,
+          });
+          printparamsJsonArray.push({
+            PTK_DrawText_TrueType:
+              "100,480,45,0,微软雅黑,1,700,0,0,0," + printContent_l2,
+          });
+          printparamsJsonArray.push({
+            PTK_DrawText_TrueType:
+              "600,480,45,0,微软雅黑,1,700,0,0,0," + printContent_l2_2,
+          });
+          printparamsJsonArray.push({
+            PTK_DrawText_TrueType:
+              "100,525,45,0,微软雅黑,1,700,0,0,0," + printContent_l3,
+          });
+          printparamsJsonArray.push({
+            PTK_DrawText_TrueType:
+              "600,525,45,0,微软雅黑,1,700,0,0,0," + printContent_l3_2,
+          });
+          printparamsJsonArray.push({
+            PTK_DrawText_TrueType:
+              "100,570,45,0,微软雅黑,1,700,0,0,0," + printContent_l4,
+          });
+          printparamsJsonArray.push({
+            PTK_DrawText_TrueType:
+              "600,570,45,0,微软雅黑,1,700,0,0,0," + printContent_l4_2,
+          });
+          // 17,35 420
+          printparamsJsonArray.push({
+            PTK_RWRFIDLabel:
+              "1,0,0," + content.chip.length / 2 + ",1," + content.chip,
+          });
+          printparamsJsonArray.push({ PTK_PrintLabel: "1,1" });
+        });
+        // contents.map((content) => {
+        //   //江山打印格式
+        //   //上
+        //   const printContent_l1 = `单号:${content.order_no}`;
+        //   printparamsJsonArray.push({
+        //     PTK_DrawText_TrueType:
+        //       "100,40,60,0,微软雅黑,1,700,0,0,0," + printContent_l1,
+        //   });
+        //   const printContent_l1_2 = `型号:${content.product_title}`;
+        //   printparamsJsonArray.push({
+        //     PTK_DrawText_TrueType:
+        //       "600,40,60,0,微软雅黑,1,700,0,0,0," + printContent_l1_2,
+        //   });
+        //   const printContent_l2 = `尺寸:${content.measure}`;
+        //   printparamsJsonArray.push({
+        //     PTK_DrawText_TrueType:
+        //       "100,110,60,0,微软雅黑,1,700,0,0,0," + printContent_l2,
+        //   });
+        //   const printContent_l2_2 = `工艺:${content.process_title}`;
+        //   printparamsJsonArray.push({
+        //     PTK_DrawText_TrueType:
+        //       "600,110,60,0,微软雅黑,1,700,0,0,0," + printContent_l2_2,
+        //   });
+        //   const printContent_l3 = `颜色:${content.color_title}`;
+        //   printparamsJsonArray.push({
+        //     PTK_DrawText_TrueType:
+        //       "100,250,60,0,微软雅黑,1,700,0,0,0," + printContent_l3,
+        //   });
+        //   const printContent_l3_2 = `部件:${content.part_title}`;
+        //   printparamsJsonArray.push({
+        //     PTK_DrawText_TrueType:
+        //       "100,180,60,0,微软雅黑,1,700,0,0,0," + printContent_l3_2,
+        //   });
+        //   //下
+        //   printparamsJsonArray.push({
+        //     PTK_DrawText_TrueType:
+        //       "100,435,45,0,微软雅黑,1,700,0,0,0," + printContent_l1,
+        //   });
+        //   printparamsJsonArray.push({
+        //     PTK_DrawText_TrueType:
+        //       "600,435,45,0,微软雅黑,1,700,0,0,0," + printContent_l1_2,
+        //   });
+        //   printparamsJsonArray.push({
+        //     PTK_DrawText_TrueType:
+        //       "100,480,45,0,微软雅黑,1,700,0,0,0," + printContent_l2,
+        //   });
+        //   printparamsJsonArray.push({
+        //     PTK_DrawText_TrueType:
+        //       "600,480,45,0,微软雅黑,1,700,0,0,0," + printContent_l2_2,
+        //   });
+        //   printparamsJsonArray.push({
+        //     PTK_DrawText_TrueType:
+        //       "100,525,45,0,微软雅黑,1,700,0,0,0," + printContent_l3,
+        //   });
+        //   printparamsJsonArray.push({
+        //     PTK_DrawText_TrueType:
+        //       "600,525,45,0,微软雅黑,1,700,0,0,0," + printContent_l3_2,
+        //   });
+        //   printparamsJsonArray.push({
+        //     PTK_RWRFIDLabel:
+        //       "1,0,0," + content.chip.length / 2 + ",1," + content.chip,
+        //   });
+        //   printparamsJsonArray.push({ PTK_PrintLabel: "1,1" });
+        // });
+
+        printparamsJsonArray.push({ PTK_CloseConnect: "" });
+        data.printparams = printparamsJsonArray;
+        // data.printparams = JSON.stringify(printparamsJsonArray);
+        this.test_content = JSON.stringify(data);
+        this.test_url = url;
+        this.test_modal = true;
+      });
+    },
+    handleConnectPrinter() {
+      let data = {};
+      data.reqParam = "1";
+      let printparamsJsonArray = [];
+      //若有且仅有一台POSTEK打印机 不用去获取USB端口号 usbPort=255即可
+      printparamsJsonArray.push({ PTK_OpenUSBPort: 255 });
+      //清空缓存
+      printparamsJsonArray.push({ PTK_ClearBuffer: "" });
+      //设置打印方向 B为从底部开始打印 T为从顶部开始打印
+      printparamsJsonArray.push({ PTK_SetDirection: "B" });
+      //设置打印速度  最高速度由打印机的型号决定
+      printparamsJsonArray.push({ PTK_SetPrintSpeed: "4" });
+      //设置打印黑度 最大打印黑度20 树脂碳带一般设置15左右
+      printparamsJsonArray.push({ PTK_SetDarkness: "10" });
+      //必须正确设置标签的宽高--防止内容打偏     宽高可用尺子量取也可以查看标签的规格   一般桌面型打印机的最大打印宽度为110毫米 实际有效打印宽度根据打印机的参数决定
+      //        {"PTK_SetLabelHeight" : "height,gap,gapOffset,bFlag"}
+      //        height:标签的高度,以点(dots)为单位。取值:0 - 65535 的正整数
+      //       gap:标签间的定位间隙\黑标\穿孔的高度,以点(dots)为单位。
+      // 取值:0 – 65535 的正整数。
+      // 当 gap=0 时,设置标签为连续纸;当实际标签不是连续纸而 gap 设置为 0
+      // 时会出现打印内容偏移的现象
+      //       gapOffset:标签间隙\黑线\穿孔定位偏移值,以点(dots)为单位,参数类型为正
+      // 整数
+      //      bFlag:定位偏移值(gapOffset)是否有效;true - 有效,false - 无效
+      printparamsJsonArray.push({
+        PTK_SetLabelHeight: 75 + "," + 2 + ",0,false",
+      });
+      printparamsJsonArray.push({ PTK_SetLabelWidth: 10 });
+      //打印一行微软雅黑的文字 具体的参数函数请参考开发文档
+      printparamsJsonArray.push({ PTK_SetFontGap: "10" });
+
+      // {"PTK_DrawText" : "x,y,pdirec,pFont,pHorizontal,pVertical,pColor,pstr"}
+
+      // pColor:文本样式,参数值及说明如下 N - 白底黑字,R - 黑底白字
+      printparamsJsonArray.push({
+        PTK_DrawText_TrueType: "10,10,0,6,2,2,N," + $("#printlabel").val(),
+      });
+
+      //执行打印  必须有PTK_PrintLabel 否则不执行打印       {"PTK_PrintLabel" : "number,cpnumber"}
+      // number:打印标签的数量。取值:1 – 65535 的正整数
+      // cpnumber:每张标签的复制份数。取值:1 – 65535 的正整数
+      printparamsJsonArray.push({ PTK_CloseConnect: "" });
+      //执行打印完关闭打印机USB端口
+      printparamsJsonArray.push({ PTK_PrintLabel: "1,1" });
+    },
+    printDemo(data) {
+      if (!data) return 0;
+      const st = this.wxsoect;
+      const {
+        client_name,
+        product_title,
+        part_title,
+        measure,
+        process,
+        url_number,
+        chip,
+        house,
+        unit,
+        layer,
+        number_detail,
+        position,
+      } = data;
+      st.send("OpenPort|255");
+      st.send("ZM_ClearBuffer");
+      st.send("ZM_SetPrintSpeed|4");
+      st.send("ZM_SetDarkness|12");
+
+      if (location.origin.indexOf("121.37.173.82") > -1) {
+        st.send("ZM_SetLabelHeight|136|32");
+      } else {
+        st.send("ZM_SetLabelHeight|160|16");
+      }
+
+      st.send("ZM_SetLabelWidth|664");
+      st.send(
+        `ZM_DrawTextTrueTypeW|70|10|24|0|Arial|1|600|0|0|0|A1| 项目:${client_name ||
+          ""}  图号:${url_number ||
+          ""} 区域: ${house}号楼(${unit}单元)-${layer}层${number_detail} || "}`
+      );
+      st.send(
+        `ZM_DrawTextTrueTypeW|70|40|24|0|Arial|1|600|0|0|0|A2| 产品:${product_title ||
+          ""} 部件:${part_title || ""} `
+      );
+      st.send(
+        `ZM_DrawTextTrueTypeW|70|70|24|0|Arial|1|600|0|0|0|A3| 材料: ${process ||
+          ""} `
+      );
+      st.send(
+        `ZM_DrawTextTrueTypeW|70|100|24|0|Arial|1|600|0|0|0|A4| 尺寸: ${measure ||
+          ""} 位置:${position || ""}`
+      );
+      st.send(`ZM_RW_RfidFormat|1|0|0|${chip.length}|1|${chip}`);
+      st.send("ZM_PrintLabel_R|1|1");
+      st.send("ClosePort");
+    },
+    // printDemo(data) {
+    //   console.log(data);
+    //   if (!data) return 0;
+    //   const st = this.wxsoect;
+    //   const {
+    //     client_name,
+    //     product_title,
+    //     part_title,
+    //     measure,
+    //     process,
+    //     url_number,
+    //     chip,
+    //   } = data;
+    //   st.send("OpenPort|255");
+    //   st.send("ZM_ClearBuffer");
+    //   st.send("ZM_SetPrintSpeed|4");
+    //   st.send("ZM_SetDarkness|12");
+    //   st.send("ZM_SetLabelHeight|160|16");
+    //   st.send("ZM_SetLabelWidth|664");
+    //   st.send(
+    //     `ZM_DrawTextTrueTypeW|40|0|36|0|Arial|1|600|0|0|0|A1|项目名称:${
+    //       client_name || ""
+    //     }  产品名称:${product_title || ""}`
+    //   );
+    //   st.send(
+    //     `ZM_DrawTextTrueTypeW|40|60|36|0|Arial|1|600|0|0|0|A3|部件名称:${
+    //       part_title || ""
+    //     }   规格:${measure || ""}`
+    //   );
+    //   st.send(
+    //     `ZM_DrawTextTrueTypeW|40|120|36|0|Arial|1|600|0|0|0|A2|饰面:${
+    //       process || ""
+    //     }  图号:${url_number || ""}`
+    //   );
+    //   st.send(`ZM_RW_RfidFormat|1|0|0|${chip.length}|1|${chip}`);
+    //   st.send("ZM_PrintLabel_R|1|1");
+    //   st.send("ClosePort");
+    // },
+    printChip(rows) {
+      // if (this.wxsoect.readyState != 1) {
+      //   return this.$Message.error("打印机未正常连接,请检查");
+      // }
+      this.axios("/api/get_sub_part", { params: { id: rows.id } }).then(
+        (res) => {
+          if (res.code == 200) {
+            this.confirmForm({
+              title: "打印芯片",
+              forms: [
+                {
+                  title: "部件",
+                  name: "CheckboxGroup",
+                  serverName: "id",
+                  checklist: [{ label: res.data.title, value: res.data.id }],
+                },
+                {
+                  title: "零部件",
+                  name: "CheckboxGroup",
+                  serverName: "sub_part",
+                  checkName: "spare_parts",
+                  checkValue: "id",
+                  checklist: res.data.sub_part,
+                },
+              ],
+              then: (result) => {
+                const { id, sub_part } = result;
+                const params = {
+                  ids: rows.id,
+                  id: id && id.length > 0 ? id.join(",") : "",
+                  sub_part:
+                    sub_part && sub_part.length > 0 ? sub_part.join(",") : "",
+                  ...this.proxyObj,
+                };
+                this.axios("/api/print_ship", { params: params }).then(
+                  (resp) => {
+                    if (resp.code == 200) {
+                      const result = resp.data;
+                      if (result && result.length > 0) {
+                        result.map((ele) => this.printDemo(ele));
+                      }
+                    }
+                  }
+                );
+              },
+            });
+          }
+        }
+      );
+    },
+    saveTableData() {
+      // this.tableData = JSON.parse(JSON.stringify(this.selectTags));
+      let order_product_part_ids = [];
+      this.selects.map((item) => order_product_part_ids.push(item.parts_id));
+      let produce = [];
+      this.selectTags.map((item) => produce.push(item.id));
+      this.axios({
+        method: "post",
+        url: "/api/order_part_route_edit",
+        data: {
+          order_product_part_ids: order_product_part_ids.join(","),
+          process: this.selects[0].procedure_properties,
+          produce: produce.join(","),
+        },
+      }).then((res) => {
+        this.$Message.success(res.msg);
+        this.init(this.proxyObj);
+      });
+    },
+    closeTag(key, arr, row) {
+      //取消tag标签展示操作并同步下方的复选框ui同步
+      for (const key in this.info.bps) {
+        const element = this.info.bps[key];
+        element.cld.map((p) => {
+          p.id == row.id ? (p.show = false) : "";
+        });
+      }
+      arr.splice(key, 1);
+      return;
+      this.info.bps.map((v) => {
+        v.cld.map((p) => {
+          p.id == row.id ? (p.show = false) : "";
+        });
+      });
+    },
+    changeCheck(e, item, selectArray) {
+      //复选框选中与非选中同时同步tag标签跟随操作
+      item.show = e;
+      if (e) {
+        selectArray.push(item);
+      } else {
+        let id = item.id;
+        let id_index = selectArray.findIndex((v) => v.id == id);
+        selectArray.splice(id_index, 1);
+      }
+      let temparr = [];
+      this.selectTags.forEach((el) => {
+        temparr.push(el.id);
+      });
+    },
+    getChangeLists(e) {},
+  },
+};
+</script>
+
+<style lang="scss" scoped>
+.nav {
+  display: flex;
+  justify-content: space-between;
+  align-items: center;
+}
+.table-set {
+  a {
+    margin: 0 5px;
+  }
+}
+.batch-content {
+  width: 100%;
+  display: flex;
+}
+.batch-footer {
+  display: flex;
+  justify-content: center;
+  padding: 10px 0;
+}
+.vertical-center-modal-PL {
+  display: flex;
+  align-items: center;
+  justify-content: center;
+  .ivu-modal {
+    top: 0;
+  }
+}
+.modal_process_route {
+  div {
+    display: flex;
+    justify-content: space-around;
+    align-items: center;
+    margin: 5px 0;
+  }
+}
+.modal_process_route-process {
+  div {
+    display: flex;
+    justify-content: space-around;
+    align-items: center;
+    margin: 5px 0;
+  }
+}
+.tag-modal {
+  display: flex;
+  align-items: center;
+  .before {
+    width: 20px;
+    background: #3764ff;
+    height: 24px;
+    border-radius: 5px 0 0 5px;
+    display: flex;
+    justify-content: center;
+    align-items: center;
+    color: #fff;
+  }
+}
+/deep/.ivu-modal-body {
+  max-height: 500px;
+  overflow: hidden;
+  overflow-y: auto;
+}
+.modal_content_right {
+  max-height: 700px;
+  padding-left: 10px;
+  overflow: hidden;
+  overflow-y: auto;
+  font-size: 18px;
+}
+.vertical-center-modal-Process {
+  display: flex;
+  align-items: center;
+  justify-content: center;
+  .ivu-modal {
+    top: 0;
+  }
+}
+.modal_content {
+  display: flex;
+  justify-content: space-around;
+  height: 100%;
+  .modal_content_left {
+    position: relative;
+    max-width: 40%;
+    min-width: 30%;
+    border-right: 1px solid #d8d8d8;
+  }
+  .modal_content_right {
+    width: 60%;
+    max-height: 700px;
+    padding-left: 10px;
+    overflow: hidden;
+    overflow-y: auto;
+    font-size: 18px;
+  }
+}
+</style>

+ 138 - 103
src/views/leadMatch/MatchList/matchPage.vue

@@ -35,7 +35,7 @@
         <Col style="margin-right:20px">
           <span>项目名称:</span><span>{{ info.project_name }}</span>
         </Col>
-        <Col  style="margin-right:20px" v-if="currencyTag == 1">
+        <Col style="margin-right:20px" v-if="currencyTag == 1">
           <span>图号:</span>
           <span>
             <Select
@@ -57,7 +57,7 @@
             </Select>
           </span>
         </Col>
-        <Col  style="margin-right:20px" v-if="currencyTag == 1">
+        <Col style="margin-right:20px" v-if="currencyTag == 1">
           <span>产品名称:</span>
           <span>
             <Select
@@ -80,7 +80,13 @@
           </span>
         </Col>
         <Col style="margin-right:20px" v-if="currencyTag == 1">
-          <Button @click="handleSearchUnmatchedInfo" type="primary">
+          <Button
+            @click="
+              handleSearchUnmatchedInfo();
+              isClickMatch = false;
+            "
+            type="primary"
+          >
             确认
           </Button>
         </Col>
@@ -125,7 +131,7 @@
                         <span>批量数:</span>
                         <span>{{ url_info.number }}</span>
                       </Col>
-                       <Col span="2">
+                      <Col span="2">
                         <span>区域:</span>
                         <span>{{ url_info.region }}</span>
                       </Col>
@@ -140,11 +146,11 @@
                       </Col>
                       <Col span="4">
                         <Button
-                          @click="handleShowCurrencySheet(url_info,1)"
+                          @click="handleShowCurrencySheet(url_info, 1)"
                           size="small"
                           type="text"
                         >
-                          {{ url_info.isCurrenct ? "收缩" : "展开" }}
+                          {{ url_info.isCurrenct ? "收缩" : "展开1" }}
                         </Button>
                         <Icon
                           size="20"
@@ -229,7 +235,7 @@
                         </Col>
                         <Col span="6">
                           <Button
-                            @click="getSheetDetailList(url_info,1)"
+                            @click="getSheetDetailList(url_info, 1)"
                             size="small"
                             type="primary"
                           >
@@ -268,7 +274,7 @@
                                 size="small"
                                 type="text"
                               >
-                                {{ !table_info.isHidden ? "展开" : "收缩" }}
+                                {{ !table_info.isHidden ? "展开2" : "收缩" }}
                               </Button>
                             </Col>
                           </Row>
@@ -320,7 +326,7 @@
                       </Col>
                       <Col span="4">
                         <Button
-                          @click="handleShowCurrencySheet(url_info,2)"
+                          @click="handleShowCurrencySheet(url_info, 2)"
                           size="small"
                           type="text"
                           >{{ url_info.isCurrenct ? "收缩" : "展开" }}</Button
@@ -416,7 +422,7 @@
                         </Col>
                         <Col span="12" style="padding:10px 0">
                           <Button
-                            @click="getSheetDetailList(url_info,2)"
+                            @click="getSheetDetailList(url_info, 2)"
                             size="small"
                             type="primary"
                             >搜索</Button
@@ -705,7 +711,7 @@
           :max-height="500"
           :data="unmatchedSelectedList"
         >
-          <template slot="numSlot" slot-scope="{  index }">
+          <template slot="numSlot" slot-scope="{ index }">
             <Input
               @on-change="handleHandingMatchNumChange"
               v-model="unmatchedSelectedList[index].num"
@@ -743,7 +749,7 @@ export default {
         part_name: "",
         region: "",
         wool_size1: "",
-        wool_size2:'',
+        wool_size2: "",
         image_number: [],
         product_name: [],
       },
@@ -818,7 +824,7 @@ export default {
           align: "center",
           minWidth: 80,
           render: (h, params) => {
-            return h("span", {}, params.row.board1 + ';'+params.row.board2);
+            return h("span", {}, params.row.board1 + ";" + params.row.board2);
           },
         },
         { title: "木皮2", align: "center", key: "skin2", minWidth: 60 },
@@ -869,7 +875,7 @@ export default {
           align: "center",
           minWidth: 80,
           render: (h, params) => {
-            return h("span", {}, params.row.board1 +';' +params.row.board2);
+            return h("span", {}, params.row.board1 + ";" + params.row.board2);
           },
         },
         { title: "木皮2", align: "center", key: "skin2", minWidth: 80 },
@@ -903,6 +909,9 @@ export default {
       matchedSelectedList: [],
       showHandingMatchModal: false,
       isMatchedSelectAll: false,
+      matchedReopenTag: "",
+      matchedReopenList: [],
+      isClickMatch: true,
     };
   },
   // 生命周期 - 创建完成(可以访问当前this实例)
@@ -948,15 +957,15 @@ export default {
           this.productMatchedList = res.data.product_name;
         });
     },
-    handleShowCurrencySheet(row,type) {
+    handleShowCurrencySheet(row, type) {
       if (row.isCurrenct) {
         row.isCurrenct = !row.isCurrenct;
       } else {
         this.unmatchedObj.urlList.map((v) => (v.isCurrenct = false));
         row.isCurrenct = true;
+        this.matchedReopenTag = row.id;
       }
-     
-      this.getSheetDetailList(row,type);
+      this.getSheetDetailList(row, type);
     },
     handleHiddenSheetDetail(row) {
       if (row.isHidden) {
@@ -964,6 +973,19 @@ export default {
       } else {
         row.isHidden = true;
       }
+      this.matchedReopenList = [];
+      this.unmatchedObj.part_list.map((v) => {
+        if (v.isHidden) {
+          this.matchedReopenList.push(
+            v.key.list
+              .map((w) => {
+                return w.value;
+              })
+              .join("*")
+          );
+        }
+      });
+      console.log(`this.matchedReopenList`, this.matchedReopenList);
       this.$forceUpdate();
     },
     handleHiddenMatchedDetail(row) {
@@ -983,88 +1005,96 @@ export default {
       }
       this.getMatchedDetailList(row);
     },
-    getSheetDetailList(row,type) {
+    getSheetDetailList(row, type) {
       switch (type) {
         case 1:
-           row.isCurrenct &&
-        this.axios
-          .get("/api/bst_matching_un_product_detail", {
-            params: {
-              cut_order_product_id: row.id,
-              id: this.info.id,
-              cut_size: this.info.cut_size,
-              number: this.info.number,
-              part_name: this.info.part_name,
-              region: this.info.region,
-              wool_size1: this.info.wool_size1,
-            },
-          })
-          .then((res) => {
-            this.unmatchedObj.part_list = res.data.part_list;
-            this.unmatchedRoomList.house_list = res.data.house_list;
-            this.unmatchedRoomTableColumnsUsed = this.unmatchedRoomTableColumns.concat(
-              res.data.head_word.map((v) => {
-                return { title: v, align: "center", key: v, minWidth: 60 };
+          row.isCurrenct &&
+            this.axios
+              .post("/api/bst_matching_un_product_detail", {
+                cut_order_product_id: row.id,
+                id: this.info.id,
+                cut_size: this.info.cut_size,
+                number: this.info.number,
+                part_name: this.info.part_name,
+                region: this.info.region,
+                wool_size1: this.info.wool_size1,
+                key: this.matchedReopenList,
               })
-            );
-            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;
-            this.regionList = res.data.search_word.region;
-            this.wool_size1 = res.data.search_word.wool_size1;
-            this.wool_size2 = res.data.search_word.wool_size2;
-          });
+              .then((res) => {
+                this.unmatchedObj.part_list = res.data.part_list;
+                this.unmatchedRoomList.house_list = res.data.house_list;
+                this.unmatchedRoomTableColumnsUsed = this.unmatchedRoomTableColumns.concat(
+                  res.data.head_word.map((v) => {
+                    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;
+                this.regionList = res.data.search_word.region;
+                this.wool_size1 = res.data.search_word.wool_size1;
+                this.wool_size2 = res.data.search_word.wool_size2;
+                this.unmatchedObj.part_list.map((v) => {
+                  if (v.state == 1) {
+                    v.isHidden = true;
+                  }
+                });
+              });
           break;
         case 2:
- row.isCurrenct &&
-        this.axios
-          .get("/api/bst_matching_un_product_detail", {
-            params: {
-              cut_order_product_id: row.id,
-              id: this.info.id,
-              cut_size: this.info.cut_size,
-              number: this.info.number,
-              part_name: this.info.part_name,
-              region: this.info.region,
-              wool_size2: this.info.wool_size2,
-            },
-          })
-          .then((res) => {
-            this.unmatchedRoomList.house_list = res.data.house_list;
-            this.unmatchedRoomTableColumnsUsed = this.unmatchedRoomTableColumns.concat(
-              res.data.head_word.map((v) => {
-                return { title: v, align: "center", key: v, minWidth: 60 };
+          row.isCurrenct &&
+            this.axios
+              .post("/api/bst_matching_un_product_detail", {
+                cut_order_product_id: row.id,
+                id: this.info.id,
+                cut_size: this.info.cut_size,
+                number: this.info.number,
+                part_name: this.info.part_name,
+                region: this.info.region,
+                wool_size2: this.info.wool_size2,
+                key: this.matchedReopenList,
               })
-            );
-            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;
-            this.regionList = res.data.search_word.region;
-            this.wool_size1 = res.data.search_word.wool_size1;
-            this.wool_size2 = res.data.search_word.wool_size2;
-          });
+              .then((res) => {
+                this.unmatchedRoomList.house_list = res.data.house_list;
+                this.unmatchedRoomTableColumnsUsed = this.unmatchedRoomTableColumns.concat(
+                  res.data.head_word.map((v) => {
+                    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;
+                this.regionList = res.data.search_word.region;
+                this.wool_size1 = res.data.search_word.wool_size1;
+                this.wool_size2 = res.data.search_word.wool_size2;
+                this.unmatchedObj.part_list.map((v) => {
+                  if (v.state == 1) {
+                    v.isHidden = true;
+                  }
+                });
+              });
           break;
       }
     },
@@ -1098,17 +1128,21 @@ export default {
         },
       }).then((res) => {
         if (res.code == 200) {
-          let data =[];
+          let data = [];
           res.data.list.map((v) => (v.isCurrenct = false));
-          res.data.list.forEach(element => {
-                if(element.number!=0){
-                  data.push(element)
-                }
+          res.data.list.forEach((element) => {
+            if (element.number != 0) {
+              data.push(element);
+            }
           });
           this.unmatchedObj.urlList = data;
           this.urlSelectList = res.data.image_number;
           this.productList = res.data.product_name;
-          
+          this.unmatchedObj.urlList.map((v) => {
+            if (v.id == this.matchedReopenTag) {
+              v.isCurrenct = true;
+            }
+          });
         }
       });
     },
@@ -1167,12 +1201,13 @@ export default {
           if (res.code == 200) {
             this.$Message.success(res.msg);
             this.showHandingMatchModal = false;
-            this.handleSearchUnmatchedInfo();
             this.currentChooseId = "";
             this.currentChooseNumber = 0;
             this.currentChooseNumberUsed = 0;
             this.currentChooseTitle = "";
             this.unmatchedSelectedList = [];
+            this.isClickMatch = true;
+            this.handleSearchUnmatchedInfo();
           }
         });
     },
@@ -1181,7 +1216,7 @@ export default {
       this.matchedList.map((v) => {
         if (v.produce_status == 0) {
           v.isSelect = this.isMatchedSelectAll;
-          this.matchedSelectedList.push(v.id)
+          this.matchedSelectedList.push(v.id);
         }
       });
     },
@@ -1201,8 +1236,8 @@ export default {
       this.isMatchedSelectAll = flag;
     },
     handleMatchedSet(row, index, type) {
-      if (this.matchedSelectedList.length==0) {
-        return this.$Message.warning('请选择')
+      if (this.matchedSelectedList.length == 0) {
+        return this.$Message.warning("请选择");
       }
       switch (type) {
         case 5:

+ 1 - 1
vue.config.js

@@ -1,6 +1,6 @@
 const axios_default_ip =
   process.env.NODE_ENV == "dev"
-    ? "http://121.41.102.225:82"
+    ? "http://121.37.173.82:82"
     : process.env.NODE_ENV == "test-prd"
     ? "http://121.41.102.225:82" //测试服
     : process.env.NODE_ENV == "prd_other"