Ver código fonte

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

mushencc 3 anos atrás
pai
commit
a1f6117743

+ 7 - 2
src/components/product/add/index.js

@@ -3,7 +3,12 @@ import AddProduct from './index.vue'
 import store from '../../../store/index';
 const ReferenceCollner = Vue.extend(AddProduct)
 
-const Content = ({ custom_id, route_id_at_copy, then, cancel }) => {
+const Content = ({
+    custom_id,
+    route_id_at_copy,
+    then,
+    cancel
+}) => {
     const instance = new ReferenceCollner({
         data: {
             custom_id,
@@ -17,7 +22,7 @@ const Content = ({ custom_id, route_id_at_copy, then, cancel }) => {
     document.body.appendChild(instance.vm.$el) // 将dom插入body
     instance.vm.$on('then', () => {
         if (typeof then === 'function') {
-            then(instance.subAddProductData || {})
+            then(instance.subAddProductData || [], instance.support_remark || [])
         }
         instance.showAddProduct = false
         instance.dom.remove();

+ 86 - 43
src/components/product/add/index.vue

@@ -172,9 +172,6 @@
                   clearable
                   :placeholder="ele.e_title"
                   v-model="ele.value"
-                  @on-change="
-                    (e) => handleProductMeasureChange(e, currencyProduct, ele)
-                  "
                   @on-blur="
                     (e) => handleProductMeasureBlur(e, currencyProduct, ele)
                   "
@@ -895,51 +892,52 @@ export default {
                 element.isChoosed = true;
                 if (element.is_null == 1) {
                   element.change_id = "";
+                  element.part_title = "";
+                  element.title = "";
                 } else {
-                  element.part_detail = element.sub_part;
-                  //展示非拆分部件
-                  // 默认替换部件
                   element.change_id = element.change[0].id;
-                  //存计算公式
-                  element.long ? "" : (element.long = 0);
-                  element.wide ? "" : (element.wide = 0);
-                  element.high ? "" : (element.high = 0);
-                  element.longCalc = element.long;
-                  element.wideCalc = element.wide;
-                  element.highCalc = element.high;
-                  element.part_detail.forEach((elem) => {
-                    elem.org_num = elem.num;
-                    elem.material_detail_id = 0;
-                    elem.material_detail_title =
-                      elem.material_detail_list[0].title;
-                    elem.material_detail_id =
-                      elem.material_detail_list[0].material_detail_id;
-                    elem.material_detail_num = elem.num || 0;
-                    elem.material_detail_org_num = elem.num || 0;
-                    elem.long ? "" : (elem.long = 0);
-                    elem.wide ? "" : (elem.wide = 0);
-                    elem.high ? "" : (elem.high = 0);
-                    elem.longCalc = elem.long || "";
-                    elem.wideCalc = elem.wide || "";
-                    elem.highCalc = elem.high || "";
-                    elem.material_detail_list.forEach((el) => {
-                      el.long = el.long || "0";
-                      el.wide = el.wide || "0";
-                      el.high = el.high || "0";
-                    });
+                }
+                element.part_detail = element.sub_part;
+                //展示非拆分部件
+                // 默认替换部件
+                //存计算公式
+                element.long ? "" : (element.long = 0);
+                element.wide ? "" : (element.wide = 0);
+                element.high ? "" : (element.high = 0);
+                element.longCalc = element.long;
+                element.wideCalc = element.wide;
+                element.highCalc = element.high;
+                element.part_detail.forEach((elem) => {
+                  elem.org_num = elem.num;
+                  elem.material_detail_id = 0;
+                  elem.material_detail_title =
+                    elem.material_detail_list[0].title;
+                  elem.material_detail_id =
+                    elem.material_detail_list[0].material_detail_id;
+                  elem.material_detail_num = elem.num || 0;
+                  elem.material_detail_org_num = elem.num || 0;
+                  elem.long ? "" : (elem.long = 0);
+                  elem.wide ? "" : (elem.wide = 0);
+                  elem.high ? "" : (elem.high = 0);
+                  elem.longCalc = elem.long || "";
+                  elem.wideCalc = elem.wide || "";
+                  elem.highCalc = elem.high || "";
+                  elem.material_detail_list.forEach((el) => {
+                    el.long = el.long || "0";
+                    el.wide = el.wide || "0";
+                    el.high = el.high || "0";
                   });
-                  element.part_detail.map((_part_detail) => {
-                    _part_detail.material_detail_org_num =
-                      _part_detail.num || 0;
-                    _part_detail.part_detail_option = [];
-                    _part_detail.material_detail_list.map((v) => {
-                      _part_detail.part_detail_option.push({
-                        label: `${v.long}*${v.wide}*${v.high}`,
-                        value: v.material_detail_id,
-                      });
+                });
+                element.part_detail.map((_part_detail) => {
+                  _part_detail.material_detail_org_num = _part_detail.num || 0;
+                  _part_detail.part_detail_option = [];
+                  _part_detail.material_detail_list.map((v) => {
+                    _part_detail.part_detail_option.push({
+                      label: `${v.long}*${v.wide}*${v.high}`,
+                      value: v.material_detail_id,
                     });
                   });
-                }
+                });
               }
             });
             //测量字段
@@ -1525,6 +1523,7 @@ export default {
       }
     },
     handleProductMeasureBlur(e, product, measure_detail) {
+      this.handleProductMeasureChange(e, product, measure_detail);
       try {
         measure_detail.value = eval(e.target.value);
       } catch (error) {
@@ -1551,6 +1550,50 @@ export default {
             }
           });
       });
+      console.log('product.process :>> ', product.process);
+      const process_ids = product.process.map((v) => {
+        return v.value;
+      });
+      this.axios
+        .post("/api/process_part_for_product", {
+          product_id: product.product_id,
+          process_ids,
+        })
+        .then((res) => {
+          for (const key in res.data) {
+            const element = res.data[key];
+            // 找到部件
+            const part_arr = product.part.filter((v) => v.part_id == key);
+            if (part_arr.length > 0) {
+              for (const k in element) {
+                const elem = element[k];
+                // 找到零部件
+                const part_detail_arr = part_arr[part_arr.length - 1].filter(
+                  (v) => v.part_detail_id == k
+                );
+                elem.map((match_item) => {
+                  const matched_part_detail = part_detail_arr[
+                    part_detail_arr.length - 1
+                  ].material_detail_list.filter(
+                    (v) => v.material_detail_id == match_item.material_detail_id
+                  );
+                  if (
+                    match_item.max > product[match_item.e_title] &&
+                    match_item.min <= product[match_item.e_title]
+                  ) {
+                    part_detail_arr[
+                      part_detail_arr.length - 1
+                    ].material_detail_id =
+                      matched_part_detail[
+                        matched_part_detail.length - 1
+                      ].material_detail_id;
+                  }
+                });
+              }
+            }
+          }
+          console.log(res);
+        });
       this.$forceUpdate();
     },
     handleMaterialChange(val, row) {

+ 2 - 1
src/views/BasicSettings/PartSettings/detail.vue

@@ -296,10 +296,11 @@ export default {
       }
       row.part_detail_list = JSON.parse(JSON.stringify(this.part_detail_list));
       row.part_id = this.formData.part_id;
+      const obj = JSON.parse(JSON.stringify(row));
       switch (type) {
         case 1:
         case 2:
-          this.tableData.splice(index, 0, row);
+          this.tableData.splice(index, 0, obj);
           break;
         case 3:
           this.tableData.splice(index, 1);

+ 8 - 18
src/views/OrderMannage/BusinessOrderlist/edit.vue

@@ -662,7 +662,7 @@
               <Input
                 v-if="!scope.row.is_metal"
                 v-model="scope.row[measure.e_title]"
-                @on-change="(e) => changeEditMeasure(e, scope.row, measure)"
+                @on-blur="(e) => changeEditMeasure(e, scope.row, measure)"
               />
             </template>
             <template #default="{ row }">
@@ -695,6 +695,8 @@
                   <Select
                     clearable
                     transfer
+                    filter
+                    filter-by-label
                     label-in-value
                     v-model="part_detail.change_id"
                     @on-change="
@@ -3470,13 +3472,10 @@ export default {
       this.$addProduct({
         custom_id,
         route_id_at_copy,
-        then: (subAddProductData) => {
-          // console.log("subAddProductData :>> ", subAddProductData);
+        then: (subAddProductData, support_remark) => {
+          console.log("subAddProductData :>> ", subAddProductData);
           this.support_remark = Array.from(
-            new Set([
-              ...subAddProductData[0].support_remark,
-              ...this.support_remark,
-            ])
+            new Set([...support_remark, ...this.support_remark])
           );
           this.modalArray = subAddProductData;
           this.modalArray.map((element) => {
@@ -3626,7 +3625,7 @@ export default {
               type: 2,
               remark: "",
               title: "",
-              id:'',
+              id: "",
               is_metal: true,
             },
           ],
@@ -3946,7 +3945,7 @@ export default {
           v.value = e.target.value;
         }
       });
-      this.handleProductMeasureChange(
+      this.handleProductMeasureBlur(
         e,
         row,
         row.measure.filter((v) => v.id == measure.id)[0]
@@ -4706,7 +4705,6 @@ export default {
             }
           });
       });
-      console.log("product :>> ", product);
       const process_ids = product.process_obj.map((v) => {
         return v.value;
       });
@@ -4747,14 +4745,6 @@ export default {
                 });
               }
             }
-            // product.part.map((part)=>{
-            //   if (element == part.part_id) {
-            //     for (const k in element) {
-            //         const elem = element[k];
-
-            //     }
-            //   }
-            // })
           }
           console.log(res);
         });

+ 27 - 2
src/views/ProductMannage/index.vue

@@ -163,6 +163,21 @@
           </div>
         </div>
         <div class="show_modal_content_right">
+          <div style="margin-top:20px">
+            <span style="padding-right:10px"
+              >默认部件:{{ defaultPart.title }}</span
+            >
+            <span
+              >高:<Input v-model="defaultPart.formula_l" style="width:50px"
+            /></span>
+            <span
+              >宽:<Input v-model="defaultPart.formula_w" style="width:50px"
+            /></span>
+            <span
+              >厚:<Input v-model="defaultPart.formula_h" style="width:50px"
+            /></span>
+            <span>是否为空: <vxe-switch v-model="defaultPart.is_null"></vxe-switch> </span>
+          </div>
           <div class="show_modal_content_right_top">
             <Button type="primary" @click="handleAddChangeable"
               >新增替换部件</Button
@@ -486,6 +501,13 @@ export default {
       attrindex: null,
       attrName: "",
       isSelectAll: false,
+      defaultPart: {
+        title: "",
+        formula_l: "",
+        formula_w: "",
+        formula_h: "",
+        is_null: "",
+      },
     };
   },
   beforeRouteLeave(to, from, next) {
@@ -635,7 +657,9 @@ export default {
         })
         .then((res) => {
           console.log(res);
-          this.changeableTableData = res.data;
+          this.changeableTableData = res.data.list;
+          this.defaultPart = res.data.head;
+          this.defaultPart.title = part.title;
         });
       this.$forceUpdate();
     },
@@ -664,6 +688,7 @@ export default {
           product_id,
           part_id,
           change: this.changeableTableData,
+          head: this.defaultPart,
         })
         .then((res) => {
           if (res.code == 200) {
@@ -774,7 +799,7 @@ export default {
     .show_modal_content_right_top {
       display: flex;
       justify-content: flex-end;
-      margin-top: 50px;
+      margin-top: 30px;
       margin-bottom: 10px;
     }
   }

+ 290 - 33
src/views/leadMatch/MatchList/matchCheck.vue

@@ -1,6 +1,202 @@
 <template>
   <div>
-
+    <Toptitle title="查看">
+      <Button @click="back" type="primary" style="margin-right: 10px"
+        >下生产</Button
+      >
+      <Button @click="back" type="primary" ghost style="margin-right: 10px"
+        >返回</Button
+      >
+    </Toptitle>
+    <div class="context-tabs">
+      <Row type="flex" align="middle" style="padding:10px 0">
+        <Col span="4">
+          <span>图号:</span>
+          <span>
+            <Select
+              filterable
+              multiple
+              filter-by-label
+              transfer
+              v-model="matchedInfo.image_number"
+              :max-tag-count="2"
+              size="small"
+              style="width: 150px"
+            >
+              <Option
+                v-for="(item, index) in urlMatchedList"
+                :key="index"
+                :label="item"
+                :value="item"
+              ></Option>
+            </Select>
+          </span>
+        </Col>
+        <Col span="4">
+          <span>产品名称:</span>
+          <span>
+            <Select
+              filterable
+              multiple
+              filter-by-label
+              transfer
+              v-model="matchedInfo.product_name"
+              :max-tag-count="2"
+              size="small"
+              style="width: 150px"
+            >
+              <Option
+                v-for="(item, index) in productMatchedList"
+                :key="index"
+                :label="item"
+                :value="item"
+              ></Option>
+            </Select>
+          </span>
+        </Col>
+        <Col span="2">
+          <Button @click="back" size="small" type="primary">
+            搜索
+          </Button>
+        </Col>
+      </Row>
+      <div
+        v-for="matched_info in matchedList"
+        :key="matched_info.number"
+        class="matched-block"
+      >
+        <Row>
+          <Col span="2">
+            <Checkbox v-model="matched_info.isSelect">全选</Checkbox>
+          </Col>
+          <Col span="2">
+            <span>图号:{{ matched_info.image_number }}</span>
+          </Col>
+          <Col span="2">
+            <span>产品名称:{{ matched_info.product_name }}</span>
+          </Col>
+          <Col span="2" offset="14">
+            总计
+            <span style="color:red">{{ matched_info.num }}</span>
+            条数据
+          </Col>
+          <Col span="2">
+            <Button
+              @click="handleShowCurrencyMatched(matched_info)"
+              size="small"
+              type="text"
+              >{{ matched_info.isCurrenct ? "收缩" : "展开" }}</Button
+            >
+            <Icon
+              size="20"
+              :type="
+                matched_info.isCurrenct
+                  ? 'md-arrow-dropdown'
+                  : 'md-arrow-dropright'
+              "
+              style="vertical-align: middle;"
+            />
+          </Col>
+        </Row>
+        <Row style="margin-top:20px" v-if="matched_info.isCurrenct">
+          <Col span="4">
+            <span>区域名称:</span>
+            <span>
+              <Select
+                filterable
+                multiple
+                transfer
+                filter-by-label
+                v-model="matchedInfo.region"
+                :max-tag-count="2"
+                size="small"
+                style="width: 150px"
+              >
+                <Option
+                  v-for="(item, index) in regionMatchedList"
+                  :key="index"
+                  :label="item"
+                  :value="item"
+                ></Option>
+              </Select>
+            </span>
+          </Col>
+          <Col span="4">
+            <span>房号:</span>
+            <span>
+              <Select
+                filterable
+                multiple
+                transfer
+                filter-by-label
+                v-model="matchedInfo.number"
+                :max-tag-count="2"
+                size="small"
+                style="width: 150px"
+              >
+                <Option
+                  v-for="(item, index) in numberMatchedList"
+                  :key="index"
+                  :label="item"
+                  :value="item"
+                ></Option>
+              </Select>
+            </span>
+          </Col>
+          <Col span="4">
+            <span>部件名称:</span>
+            <span>
+              <Select
+                filterable
+                multiple
+                transfer
+                filter-by-label
+                v-model="matchedInfo.part_name"
+                :max-tag-count="2"
+                size="small"
+                style="width: 150px"
+              >
+                <Option
+                  v-for="(item, index) in partNameMatchedList"
+                  :key="index"
+                  :label="item"
+                  :value="item"
+                ></Option>
+              </Select>
+            </span>
+          </Col>
+          <Col span="2">
+            <Button @click="back" size="small" type="primary">
+              搜索
+            </Button>
+          </Col>
+        </Row>
+        <div v-if="matched_info.isCurrenct">
+          <div
+            v-for="(matched_detail, index) in matchedDetailList"
+            :key="index"
+          >
+            <Row type="flex" align="middle">
+              <Col span="10" style="padding:10px 0">
+                <span>匹配信息:</span>
+                <span>匹配信息:</span>
+                <span>匹配信息:</span>
+                <span>匹配信息:</span>
+                <span>匹配信息:</span>
+              </Col>
+            </Row>
+            <Table
+              :columns="matchedSheetTableColumns"
+              border
+              :max-height="500"
+              @on-selection-change="handleSelectChange"
+              :data="matched_detail.detail"
+            >
+            </Table>
+          </div>
+        </div>
+      </div>
+    </div>
   </div>
 </template>
 
@@ -9,43 +205,104 @@
 // 例如:import 《组件名称》 from '《组件路径》';
 
 export default {
-  name:'',
-  components:{
-    
-  },
-  props:{},
-// import引入的组件需要注入到对象中才能使用
-  data () {
+  name: "",
+  components: {},
+  props: {},
+  // import引入的组件需要注入到对象中才能使用
+  data() {
     // 这里存放数据
     return {
-
-    }
-  },
-// 生命周期 - 创建完成(可以访问当前this实例)
-  created () {
-
-  },
-// 生命周期 - 挂载完成(可以访问DOM元素)
-  mounted () {
-
+      matchedInfo: {
+        image_number: "",
+        product_name: "",
+        region: [],
+        number: [],
+        part_name: [],
+      },
+      urlMatchedList: [],
+      productMatchedList: [],
+      regionMatchedList: [],
+      numberMatchedList: [],
+      partNameMatchedList: [],
+      matchedList: [],
+      matchedSheetTableColumns: [
+        { title: "全选", align: "center", minWidth: 60, type: "selection" },
+        { title: "序号", align: "center", type: "index", minWidth: 60 },
+        { title: "区域名称", align: "center", key: "region", minWidth: 100 },
+        { title: "房号", align: "center", key: "number", minWidth: 60 },
+        { title: "部件名称", align: "center", key: "part_name", minWidth: 80 },
+        { title: "行号", align: "center", key: "line", minWidth: 60 },
+        { title: "木皮1", align: "center", key: "skin1", minWidth: 60 },
+        {
+          title: "原材料",
+          align: "center",
+          minWidth: 80,
+          render: (h, params) => {
+            return h("span", {}, params.row.board1 + params.row.board2);
+          },
+        },
+        { title: "木皮2", align: "center", key: "skin2", minWidth: 80 },
+        { title: "毛料尺寸", align: "center", key: "wool_size", minWidth: 80 },
+        {
+          title: "原料数量",
+          align: "center",
+          key: "wool_number",
+          minWidth: 80,
+        },
+        { title: "精裁尺寸", align: "center", key: "cut_size", minWidth: 80 },
+        {
+          title: "零部件数量",
+          align: "center",
+          key: "cut_number",
+          minWidth: 90,
+        },
+        { title: "贴皮面积", align: "center", key: "stick", minWidth: 80 },
+        { title: "精裁面积", align: "center", key: "cut", minWidth: 80 },
+        { title: "工艺要求", align: "center", key: "remark", minWidth: 80 },
+      ], //匹配表头
+    };
   },
+  // 生命周期 - 创建完成(可以访问当前this实例)
+  created() {},
+  // 生命周期 - 挂载完成(可以访问DOM元素)
+  mounted() {},
   methods: {
-
+    back() {
+      this.$router.go(-1);
+    },
+    handleShowCurrencyMatched() {},
+    handleSelectChange(selection) {},
   },
-// 监听属性 类似于data概念
-computed: {},
-// 监控data中的数据变化
-watch: {},
-beforeCreate () { }, // 生命周期 - 创建之前
-beforeMount () { }, // 生命周期 - 挂载之前
-beforeUpdate () { }, // 生命周期 - 更新之前
-updated () { }, // 生命周期 - 更新之后
-beforeDestroy () { }, // 生命周期 - 销毁之前
-destroyed () { }, // 生命周期 - 销毁完成
-activated () { }, // 如果页面有keep-alive缓存功能,这个函数会触发
-}
+  // 监听属性 类似于data概念
+  computed: {},
+  // 监控data中的数据变化
+  watch: {},
+  beforeCreate() {}, // 生命周期 - 创建之前
+  beforeMount() {}, // 生命周期 - 挂载之前
+  beforeUpdate() {}, // 生命周期 - 更新之前
+  updated() {}, // 生命周期 - 更新之后
+  beforeDestroy() {}, // 生命周期 - 销毁之前
+  destroyed() {}, // 生命周期 - 销毁完成
+  activated() {}, // 如果页面有keep-alive缓存功能,这个函数会触发
+};
 </script>
 
-<style lang='scss' scoped>
-
+<style lang="scss" scoped>
+.context-tabs {
+  position: relative;
+  max-height: 650px;
+  overflow: hidden;
+  overflow-y: auto;
+  padding: 15px;
+  margin: 10px;
+  margin-bottom: 30px;
+  border-radius: 5px;
+  box-shadow: 1px 1px 5px 1px #999;
+}
+.matched-block {
+  padding: 15px;
+  margin-bottom: 30px;
+  background-color: #e9ecef;
+  border-radius: 5px;
+}
 </style>

+ 39 - 17
src/views/leadMatch/MatchList/matchList.vue

@@ -4,13 +4,13 @@
       <Col span="5">
         <span>项目编号:</span>
         <span>
-          <Input v-model="SearchInfo.order_no" style="width:150px" />
+          <Input v-model="SearchInfo.project_number" style="width:150px" />
         </span>
       </Col>
       <Col span="5">
         <span>项目名称:</span>
         <span>
-          <Input v-model="SearchInfo.project_title" style="width:150px" />
+          <Input v-model="SearchInfo.project_name" style="width:150px" />
         </span>
       </Col>
       <Col span="5">
@@ -36,7 +36,7 @@
         </span>
       </Col>
       <Col span="2" offset="2">
-        <Button @click="back" type="primary" style="margin-right: 10px"
+        <Button @click="initData" type="primary" style="margin-right: 10px"
           >搜索</Button
         >
       </Col>
@@ -45,8 +45,7 @@
       <Table :columns="tableColumns" border :max-height="500" :data="tableData">
         <template slot="setSlot" slot-scope="{ row, index }">
           <a @click="handleSet(row, index, 1)" style="margin: 0 5px">匹配</a>
-          <a @click="handleSet(row, index, 2)" style="margin: 0 5px">查看</a>
-          <a @click="handleSet(row, index, 3)">详情</a>
+          <a @click="handleSet(row, index, 2)">查看</a>
         </template>
       </Table>
       <div class="content_body_page">
@@ -78,13 +77,23 @@ export default {
   data() {
     // 这里存放数据
     return {
-      SearchInfo: { order_no: "", project_title: "" },
+      SearchInfo: {
+        project_short_title: "",
+        project_name: "",
+        project_number: "",
+        matching_status: "",
+      },
       tableColumns: [
-        { title: "项目编号", align: "center", key: "project_no", minWidth: 60 },
+        {
+          title: "项目编号",
+          align: "center",
+          key: "project_number",
+          minWidth: 60,
+        },
         {
           title: "项目名称",
           align: "center",
-          key: "project_title",
+          key: "project_name",
           minWidth: 60,
         },
         {
@@ -127,8 +136,16 @@ export default {
             );
           },
         },
-        { title: "制单日期", align: "center", key: "crt_time", minWidth: 60 },
-        { title: "操作", align: "center", minWidth: 100, slot: "setSlot" },
+        {
+          title: "制单日期",
+          align: "center",
+          key: "crt_time",
+          minWidth: 50,
+          render: (h, params) => {
+            return h("span", {}, this.func.replaceDate(params.row.crt_time));
+          },
+        },
+        { title: "操作", align: "center", minWidth: 60, slot: "setSlot" },
       ],
       tableData: [],
       page_index: 1,
@@ -143,13 +160,11 @@ export default {
     this.initData();
   },
   methods: {
-    back() {
-      this.$router.go(-1);
-    },
     initData() {
       this.axios({
         method: "get",
         url: "/api/bst_matching_list",
+        params: this.SearchInfo,
       }).then((res) => {
         if (res.code == 200) {
           console.log("res :>> ", res);
@@ -166,14 +181,21 @@ export default {
             query: {
               type,
               id: row.id,
-              project_no:row.project_no,
-              project_title:row.project_title
+              project_no: row.project_no,
+              project_name: row.project_name,
             },
           });
           break;
         case 2:
-          break;
-        case 3:
+          this.$router.push({
+            path: "/cms/leadMatch/MatchList/matchCheck",
+            query: {
+              type,
+              id: row.id,
+              project_no: row.project_no,
+              project_name: row.project_name,
+            },
+          });
           break;
       }
     },

+ 37 - 5
src/views/leadMatch/MatchList/matchPage.vue

@@ -2,7 +2,7 @@
   <div>
     <Toptitle title="匹配">
       <Button
-        @click="back"
+        @click="handleAutoMatching"
         v-if="currencyTag == 1"
         type="primary"
         style="margin-right: 10px"
@@ -74,7 +74,13 @@
     </div>
     <div class="context-tabs">
       <Tabs type="card" @on-click="handleTabsClick" v-model="currencyTag">
-        <Button @click="back" type="primary" size="small" slot="extra">
+        <Button
+          @click="back"
+          type="primary"
+          size="small"
+          slot="extra"
+          v-show="currencyTag == 1"
+        >
           匹配
         </Button>
         <TabPane label="本次未匹配" name="1">
@@ -358,7 +364,10 @@
                           </span>
                         </Col>
                         <Col span="12" style="padding:10px 0">
-                          <Button @click="back" size="small" type="primary"
+                          <Button
+                            @click="getSheetDetailList(url_info)"
+                            size="small"
+                            type="primary"
                             >搜索</Button
                           >
                         </Col>
@@ -746,6 +755,7 @@ export default {
           slot: "setSlot",
         },
       ], //匹配表头
+      unmatchedSelectedList: [],
     };
   },
   // 生命周期 - 创建完成(可以访问当前this实例)
@@ -756,7 +766,16 @@ export default {
     back() {
       this.$router.go(-1);
     },
-    handleSelectChange(selection) {},
+    handleSelectChange(selection) {
+      this.unmatchedSelectedList = this.unmatchedSelectedList.concat(
+        selection.map((v) => {
+          return v.product_title;
+        })
+      );
+      //  = Array.from(
+      //         new Set([...res.data.support_remark, ...this.support_remark])
+      //       );
+    },
     handleTabsClick(name) {
       name == 2 &&
         this.axios
@@ -839,7 +858,6 @@ export default {
             this.numberMatchedList = res.data.number;
             this.partNameMatchedList = res.data.part_name;
             this.matchedDetailList = res.data.list;
-            console.log("res :>> ", res);
           });
     },
     handleSearchUnmatchedInfo() {
@@ -861,6 +879,20 @@ export default {
         }
       });
     },
+    handleAutoMatching() {
+      this.axios
+        .post("/api/matching_product_house", {
+          id: this.info.id,
+          image_number: this.info.image_number,
+          product_title: this.info.product_name,
+        })
+        .then((res) => {
+          if (res.code == 200) {
+            this.$Message.success(res.msg);
+            this.handleSearchUnmatchedInfo();
+          }
+        });
+    },
     handleMatchedSet(row, index, type) {},
   },
   // 监听属性 类似于data概念

+ 1 - 1
vue.config.js

@@ -2,7 +2,7 @@ const axios_default_ip =
     process.env.NODE_ENV == 'dev' ?
     'http://121.41.102.225:82' :
     process.env.NODE_ENV == 'test-prd' ?
-    'http://124.71.176.88:882' //测试服
+    'http://121.41.102.225:82' //测试服
     :
     process.env.NODE_ENV == 'prd_other' ?
     'http://121.37.173.82:82' //贝斯特