瀏覽代碼

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

mushencc 3 年之前
父節點
當前提交
6e0d42efe2

+ 1 - 1
src/App.vue

@@ -13,7 +13,7 @@ export default {
 html,body,#app{width:100%;height:100%;margin:0;padding:0;overflow: hidden;}
 table-edit-set{margin-right:10px;color:#3764FF;cursor:pointer}
 ::-webkit-scrollbar {
-  width: 3px;
+  width: 10px;
 }
 ::-webkit-scrollbar-thumb {background: #d8d8d8;border-radius: 10px;}
 ::-webkit-scrollbar-track-piece {background: transparent;}

+ 5 - 3
src/components/product/add/index.vue

@@ -804,6 +804,7 @@ export default {
       let idx = this.$refs.tabsRef.activeKey;
       let obj = this.deepClone(this.addProductArray[idx]);
       obj.index = this.addProductArray.length;
+      obj.position = "";
       this.addProductArray.push(obj);
     },
     handleAddProductDele() {
@@ -861,17 +862,17 @@ export default {
               this.pre_process_obj = this.deepClone(_temp_obj);
             }
             // this.process_match_list = res.data.process.list;
-            this.support_remark = res.data.support_remark;
+            this.support_remark = Array.from(
+              new Set([...res.data.support_remark, ...this.support_remark])
+            );
             let modalData = this.currencyProduct;
             modalData.url = res.data.url;
-            modalData.support_remark = res.data.support_remark;
             modalData.total_num = res.data.total_num || 1;
             modalData.ext_price = res.data.ext_price || 0;
             modalData.unit_price = res.data.price || 0;
             modalData.num = res.data.num || 1;
             modalData.num_temp_save = modalData.num;
             modalData.over_price = res.data.over_price || 0;
-            modalData.position = res.data.position || "";
             modalData.unit = res.data.unit || "";
             modalData.remark = res.data.remark || "";
             modalData.url_number = res.data.url_number || "";
@@ -1311,6 +1312,7 @@ export default {
         type,
         remark: "",
         title: "",
+        id: "",
         is_metal: true,
       });
       this.$forceUpdate();

+ 56 - 1
src/routerMap/index.js

@@ -758,7 +758,7 @@ const routerMap = [{
         name: 'BidSystemProductDeOrder', // 报价系统→生产拆单
         meta: {
             index: 3,
-            keepAlive:true
+            keepAlive: true
         },
         component: (resolve) =>
             require(['@/views/BidSystem/ProductDeOrder/list'], resolve),
@@ -1407,6 +1407,61 @@ const routerMap = [{
                 '@/views/newpage/weightMemo/edit',
             ], resolve),
     },
+    {
+        path: '/cms/newPage/MatchList/matchList',
+        name: 'matchList', //匹配列表-->列表
+        meta: {
+            index: 3
+        },
+        component: (resolve) =>
+            require([
+                '@/views/newpage/MatchList/matchList',
+            ], resolve),
+    },
+    {
+        path: '/cms/newPage/MatchList/matchCheck',
+        name: 'matchCheck', //匹配列表-->查看
+        meta: {
+            index: 3
+        },
+        component: (resolve) =>
+            require([
+                '@/views/newpage/MatchList/matchCheck',
+            ], resolve),
+    },
+    {
+        path: '/cms/newPage/MatchList/matchPage',
+        name: 'matchPage', //匹配列表-->匹配
+        meta: {
+            index: 3
+        },
+        component: (resolve) =>
+            require([
+                '@/views/newpage/MatchList/matchPage',
+            ], resolve),
+    },
+    {
+        path: '/cms/BasicSettings/PartSettings/list',
+        name: 'list', //部件配置项-列表
+        meta: {
+            index: 3
+        },
+        component: (resolve) =>
+            require([
+                '@/views/BasicSettings/PartSettings/list',
+            ], resolve),
+    },
+    {
+        path: '/cms/BasicSettings/PartSettings/detail',
+        name: 'detail', //部件配置项-详情
+        meta: {
+            index: 3
+        },
+        component: (resolve) =>
+            require([
+                '@/views/BasicSettings/PartSettings/detail',
+            ], resolve),
+    },
     // 测试用
     {
         path: '/cms/ordermannage/businessorderlist/editcopy',

+ 402 - 0
src/views/BasicSettings/PartSettings/detail.vue

@@ -0,0 +1,402 @@
+<template>
+  <div>
+    <Toptitle
+      :title="
+        type == 1 ? '复制' : type == 2 ? '编辑' : type == 3 ? '查看' : '新增'
+      "
+    >
+      <Button type="primary" style="margin-right:5px" ghost @click="back()"
+        >取消</Button
+      >
+      <Button type="primary" v-show="type != 3" @click="handleSaveData"
+        >保存</Button
+      >
+    </Toptitle>
+    <div>
+      <Row type="flex" justify="space-between" style="padding:10px 0">
+        <Col span="4">
+          <span>ID:</span>
+          <span>
+            <Input
+              type="text"
+              disabled
+              style="width:80px"
+              v-model="formData.id"
+              placeholder="自动生成"
+            />
+          </span>
+        </Col>
+        <Col span="12">
+          <span>工艺属性分类:</span>
+          <span>
+            <Select
+              filterable
+              filter-by-label
+              v-model="formData.process_id"
+              style="width: 100px;margin-right:5px"
+              @on-change="handleProcessSelected"
+            >
+              <Option
+                v-for="(item, index) in basic_process_list"
+                :key="index"
+                :label="item.title"
+                :value="item.id"
+              ></Option>
+            </Select>
+          </span>
+          <span>
+            <Select
+              filterable
+              filter-by-label
+              @on-change="(e) => handleGetProcessIds(formData.process_id, e)"
+              v-model="formData.type_title"
+              style="width: 100px;margin-right:5px"
+            >
+              <Option
+                v-for="(item, index) in type_title_list"
+                :key="index"
+                :label="item"
+                :value="item"
+              ></Option>
+            </Select>
+          </span>
+          <span>
+            <Select
+              filterable
+              filter-by-label
+              multiple
+              :max-tag-count="2"
+              v-model="formData.process_ids"
+              style="width: 300px"
+            >
+              <Option
+                v-for="(item, index) in process_list"
+                :key="index"
+                :label="item.title"
+                :value="item.id"
+              ></Option>
+            </Select>
+          </span>
+        </Col>
+        <Col span="8">
+          <span>部件名称:</span>
+          <span>
+            <Select
+              filterable
+              filter-by-label
+              v-model="formData.part_id"
+              @on-change="handlePartSelected"
+              style="width: 200px"
+            >
+              <Option
+                v-for="(item, index) in parts_list"
+                :key="index"
+                :label="item.title"
+                :value="item.id"
+              ></Option>
+            </Select>
+          </span>
+        </Col>
+      </Row>
+      <Row
+        type="flex"
+        align="bottom"
+        justify="space-between"
+        style="padding-bottom:5px"
+      >
+        <Col><span>规则:</span> </Col>
+        <Col>
+          <Button
+            size="small"
+            type="primary"
+            @click="handleSet({}, tableData.length, 1)"
+            >新增规则</Button
+          >
+        </Col>
+      </Row>
+      <div>
+        <Table
+          :columns="tableColumns"
+          border
+          :max-height="500"
+          :data="tableData"
+        >
+          <template slot="partDetailTitle" slot-scope="{ index }">
+            <Select
+              v-model="tableData[index].parts_detail_id"
+              transfer
+              @on-change="
+                (e) => handlePartDetailSelected(tableData[index], index, e)
+              "
+            >
+              <Option
+                v-for="(item, index) in tableData[index].part_detail_list"
+                :key="index"
+                :label="item.spare_parts"
+                :value="item.id"
+              ></Option>
+            </Select>
+          </template>
+          <template slot="measureSlot" slot-scope="{ index }">
+            <Select v-model="tableData[index].basics_measure_id" transfer>
+              <Option
+                v-for="(item, index) in measure_list"
+                :key="index"
+                :label="item.title"
+                :value="item.id"
+              ></Option>
+            </Select>
+          </template>
+          <template slot="numSlot" slot-scope="{ index }">
+            <Input
+              type="text"
+              style="width:80px"
+              v-model="tableData[index].num"
+            />
+          </template>
+          <template slot="minSlot" slot-scope="{ index }">
+            <Input
+              type="text"
+              style="width:80px"
+              v-model="tableData[index].min"
+            />
+          </template>
+          <template slot="maxSlot" slot-scope="{ index }">
+            <Input
+              type="text"
+              style="width:80px"
+              v-model="tableData[index].max"
+            />
+          </template>
+          <template slot="materialDetailSlot" slot-scope="{ index }">
+            <Select v-model="tableData[index].material_detail_id" transfer>
+              <Option
+                v-for="(item, index) in tableData[index].materialDetailList"
+                :key="index"
+                :label="item.materialDetailShow"
+                :value="item.id"
+              ></Option>
+            </Select>
+          </template>
+          <template slot="setSlot" slot-scope="{ index }">
+            <div>
+              <a
+                style="margin:0 5px;"
+                @click="handleSet(tableData[index], index, 2)"
+                >复制</a
+              >
+              <a
+                style="margin:0 5px;"
+                @click="handleSet(tableData[index], index, 3)"
+                >删除</a
+              >
+            </div>
+          </template>
+        </Table>
+      </div>
+    </div>
+  </div>
+</template>
+
+<script>
+// 这里可以导入其他文件(比如:组件,工具js,第三方插件js,json文件,图片文件等等)
+// 例如:import 《组件名称》 from '《组件路径》';
+
+export default {
+  name: "",
+  components: {},
+  props: {},
+  // import引入的组件需要注入到对象中才能使用
+  data() {
+    // 这里存放数据
+    return {
+      type: this.$route.query.type,
+      id: this.$route.query.id,
+      formData: {
+        id: this.$route.query.id,
+        process_id: "",
+        part_id: "",
+        type_title: "",
+        process_ids: [],
+      },
+      urlSelectList: [],
+      tableColumns: [
+        {
+          title: "零部件名称",
+          align: "center",
+          minWidth: 120,
+          slot: "partDetailTitle",
+        },
+        {
+          title: "物料名称",
+          align: "center",
+          minWidth: 100,
+          key: "parts_detail_title",
+        },
+        {
+          title: "测量字段",
+          align: "center",
+          minWidth: 100,
+          slot: "measureSlot",
+        },
+        {
+          title: "数量",
+          align: "center",
+          minWidth: 70,
+          key: "num",
+          slot: "numSlot",
+        },
+        {
+          title: "最小数值(含)",
+          align: "center",
+          minWidth: 120,
+          slot: "minSlot",
+        },
+        { title: "最大数值", align: "center", minWidth: 120, slot: "maxSlot" },
+        {
+          title: "物料规格",
+          align: "center",
+          minWidth: 100,
+          key: "material_detail_id",
+          slot: "materialDetailSlot",
+        },
+        { title: "操作", align: "center", minWidth: 120, slot: "setSlot" },
+      ],
+      tableData: [{}],
+      basic_process_list: [], //工艺属性分类
+      parts_list: [],
+      type_title_list: [],
+      process_list: [],
+      measure_list: [],
+    };
+  },
+  // 生命周期 - 创建完成(可以访问当前this实例)
+  created() {
+    this.axios.get("/api/basics_properties_index").then((res) => {
+      this.basic_process_list = res.data.data;
+    });
+    this.axios.get("/api/parts_index").then((res) => {
+      this.parts_list = res.data.data;
+    });
+    this.axios.get("/api/basics_measure_index").then((res) => {
+      this.measure_list = res.data.data;
+    });
+  },
+  // 生命周期 - 挂载完成(可以访问DOM元素)
+  mounted() {
+    this.id && this.initData(this.id);
+  },
+  methods: {
+    back() {
+      this.$router.go(-1);
+    },
+    handleSet(row, index, type) {
+      if (!this.formData.part_id) {
+        return this.$Message.warning("请先选择部件");
+      }
+      row.part_detail_list = JSON.parse(JSON.stringify(this.part_detail_list));
+      row.part_id = this.formData.part_id;
+      switch (type) {
+        case 1:
+        case 2:
+          this.tableData.splice(index, 0, row);
+          break;
+        case 3:
+          this.tableData.splice(index, 1);
+          break;
+      }
+    },
+    initData(id) {
+      this.axios
+        .get("/api/process_part_detail", { params: { id } })
+        .then((res) => {
+          this.formData = res.data.detail;
+          this.formData.process_id = this.formData.bp_id;
+          this.tableData = res.data.list;
+          this.handleProcessSelected(res.data.detail.process_id);
+          this.handleGetProcessIds(
+            res.data.detail.process_id,
+            res.data.detail.type_title
+          );
+          this.handlePartSelected(this.formData.part_id, 2);
+        });
+    },
+    handleProcessSelected(p_id) {
+      p_id &&
+        this.axios.post("/api/process_sub_title", { p_id }).then((res) => {
+          this.type_title_list = res.data;
+        });
+    },
+    handleGetProcessIds(p_id, type_title) {
+      this.axios
+        .get("/api/properties_index", { params: { p_id, type_title } })
+        .then((res) => {
+          this.process_list = res.data.data;
+        });
+    },
+    handlePartSelected(id, type) {
+      id &&
+        this.axios.get("/api/parts_detail", { params: { id } }).then((res) => {
+          this.part_detail_list = res.data.detail;
+          if (type == 2) {
+            this.tableData.map((v, k) => {
+              v.part_detail_list = JSON.parse(
+                JSON.stringify(this.part_detail_list)
+              );
+              this.handlePartDetailSelected(v, k, v.parts_detail_id);
+            });
+          } else {
+            this.tableData = [];
+          }
+          this.tableData = JSON.parse(JSON.stringify(this.tableData));
+        });
+    },
+    handlePartDetailSelected(row, index, id) {
+      if (id) {
+        const material_id = row.part_detail_list.filter((v) => v.id == id)[0]
+          .material_id;
+        this.axios
+          .get("/api/material", { params: { id: material_id } })
+          .then((res) => {
+            this.tableData[index].parts_detail_title = res.data[0].title;
+            this.tableData[index].materialDetailList = res.data[0].detail.map(
+              (v) => {
+                return { id: v.id, materialDetailShow: v.long + "*" + v.width };
+              }
+            );
+            this.tableData.splice(index, 1, this.tableData[index]);
+          });
+      }
+    },
+    handleSaveData() {
+      if (this.type == 1) {
+        this.formData.id = "";
+      }
+      this.axios
+        .post("/api/process_part_edit", {
+          ...this.formData,
+          detail: this.tableData,
+        })
+        .then((res) => {
+          if (res.code == 200) {
+            this.$Message.success(res.msg);
+            this.back();
+          }
+        });
+    },
+  },
+  // 监听属性 类似于data概念
+  computed: {},
+  // 监控data中的数据变化
+  watch: {},
+  beforeCreate() {}, // 生命周期 - 创建之前
+  beforeMount() {}, // 生命周期 - 挂载之前
+  beforeUpdate() {}, // 生命周期 - 更新之前
+  updated() {}, // 生命周期 - 更新之后
+  beforeDestroy() {}, // 生命周期 - 销毁之前
+  destroyed() {}, // 生命周期 - 销毁完成
+  activated() {}, // 如果页面有keep-alive缓存功能,这个函数会触发
+};
+</script>
+
+<style lang="scss" scoped></style>

+ 235 - 0
src/views/BasicSettings/PartSettings/list.vue

@@ -0,0 +1,235 @@
+<template>
+  <div>
+    <Toptitle title="线条高度设置">
+      <Button type="primary" @click="handleSet({ id: null }, 5)"
+        >新增方案</Button
+      >
+    </Toptitle>
+    <Row style="padding:10px 0">
+      <Col span="6">
+        <span>工艺属性:</span>
+        <span>
+          <Select
+            filterable
+            multiple
+            clearable
+            filter-by-label
+            v-model="searchData.bp_id"
+            :max-tag-count="2"
+            @on-change="handleProcessSelected"
+            style="width: 200px"
+          >
+            <Option
+              v-for="(item, index) in basic_process_list"
+              :key="index"
+              :label="item.title"
+              :value="item.id"
+            ></Option>
+          </Select>
+        </span>
+      </Col>
+      <Col span="6">
+        <span>分类:</span>
+        <span>
+          <Select
+            filterable
+            multiple
+            clearable
+            filter-by-label
+            v-model="searchData.type_title"
+            :max-tag-count="2"
+            style="width: 200px"
+          >
+            <Option
+              v-for="(item, index) in type_title_list"
+              :key="index"
+              :label="item"
+              :value="item"
+            ></Option>
+          </Select>
+        </span>
+      </Col>
+      <Col span="6">
+        <span>部件名称:</span>
+        <span>
+          <Select
+            filterable
+            multiple
+            clearable
+            filter-by-label
+            v-model="searchData.part_id"
+            :max-tag-count="2"
+            style="width: 200px"
+          >
+            <Option
+              v-for="(item, index) in parts_list"
+              :key="index"
+              :label="item.title"
+              :value="item.id"
+            ></Option>
+          </Select>
+        </span>
+      </Col>
+      <Col span="2" offset="2">
+        <Button @click="initData(searchData)" type="primary">搜索</Button>
+      </Col>
+    </Row>
+    <div>
+      <Table :columns="tableColumns" border :max-height="500" :data="tableData">
+        <template slot="setSlot" slot-scope="{ row, index }">
+          <div>
+            <a style="margin:0 5px;" @click="handleSet(row, 1)">复制</a>
+            <a style="margin:0 5px;" @click="handleSet(row, 2)">编辑</a>
+            <a style="margin:0 5px;" @click="handleSet(row, 3)">查看</a>
+            <a style="margin:0 5px;" @click="handleSet(row, 4)">删除</a>
+          </div>
+        </template>
+      </Table>
+      <div class="content_body_page">
+        <Page
+          :page-size-opts="[10, 20, 30, 40, 100]"
+          @on-page-size-change="changeSize"
+          @on-change="changePage"
+          :current="searchData.page_index"
+          show-total
+          show-elevator
+          :total="total"
+          show-sizer
+          :page-size="searchData.page_size"
+        />
+      </div>
+    </div>
+  </div>
+</template>
+
+<script>
+// 这里可以导入其他文件(比如:组件,工具js,第三方插件js,json文件,图片文件等等)
+// 例如:import 《组件名称》 from '《组件路径》';
+
+export default {
+  name: "",
+  components: {},
+  props: {},
+  // import引入的组件需要注入到对象中才能使用
+  data() {
+    // 这里存放数据
+    return {
+      searchData: {
+        bp_id: "",
+        type_title: "",
+        part_id: [],
+        page_index: 1,
+        page_size: 10,
+      },
+      urlSelectList: [],
+      tableColumns: [
+        { title: "序号", type: "index", align: "center", minWidth: 60 },
+        { title: "工艺属性", align: "center", minWidth: 120, key: "bp_title" },
+        { title: "分类", align: "center", minWidth: 120, key: "type_title" },
+        { title: "部件名称", align: "center", minWidth: 120, key: "title" },
+        { title: "操作", align: "center", minWidth: 180, slot: "setSlot" },
+      ],
+      tableData: [],
+      total: 0,
+      basic_process_list: [],
+      type_title_list: [],
+      parts_list: [],
+    };
+  },
+  // 生命周期 - 创建完成(可以访问当前this实例)
+  created() {
+    this.axios.get("/api/basics_properties_index").then((res) => {
+      this.basic_process_list = res.data.data;
+    });
+    this.axios.get("/api/parts_index").then((res) => {
+      this.parts_list = res.data.data;
+    });
+  },
+  // 生命周期 - 挂载完成(可以访问DOM元素)
+  mounted() {
+    this.initData(this.searchData);
+  },
+  methods: {
+    back() {
+      this.$router.go(-1);
+    },
+    initData(searchData) {
+      this.axios
+        .post("/api/process_part_list", { ...searchData })
+        .then((res) => {
+          this.tableData = res.data.data;
+          this.total = res.data.total;
+        });
+    },
+    handleProcessSelected(p_id) {
+      p_id &&
+        this.axios.post("/api/process_sub_title", { p_id }).then((res) => {
+          this.type_title_list = res.data;
+        });
+    },
+    changeSize(e) {
+      this.searchData.pageSize = e;
+      this.initData();
+    },
+    changePage(e) {
+      this.searchData.pageIndex = e;
+      this.initData();
+    },
+    handleSet(row, type) {
+      // 1复制   2编辑   3查看   4删除   5新增
+      switch (type) {
+        case 1:
+        case 2:
+        case 3:
+        case 5:
+          this.$router.push({
+            path: "/cms/BasicSettings/PartSettings/detail",
+            query: {
+              type,
+              id: row.id,
+            },
+          });
+          break;
+        case 4:
+          this.$Modal.confirm({
+            title: "确认删除?",
+            content: "此操作确认后不可恢复,请确认!",
+            onOk: () => {
+              this.axios({
+                method: "post",
+                url: "/api/process_part_del",
+                data: {
+                  id: row.id,
+                },
+              }).then((res) => {
+                this.$Message.success(res.msg);
+                this.initData(this.searchData);
+              });
+            },
+            onCancel: () => {},
+          });
+          break;
+      }
+    },
+  },
+  // 监听属性 类似于data概念
+  computed: {},
+  // 监控data中的数据变化
+  watch: {},
+  beforeCreate() {}, // 生命周期 - 创建之前
+  beforeMount() {}, // 生命周期 - 挂载之前
+  beforeUpdate() {}, // 生命周期 - 更新之前
+  updated() {}, // 生命周期 - 更新之后
+  beforeDestroy() {}, // 生命周期 - 销毁之前
+  destroyed() {}, // 生命周期 - 销毁完成
+  activated() {}, // 如果页面有keep-alive缓存功能,这个函数会触发
+};
+</script>
+
+<style lang="scss" scoped>
+.content_body_page {
+  display: flex;
+  justify-content: center;
+  padding-top: 20px;
+}
+</style>

+ 3 - 1
src/views/BidSystem/ContractList/info.vue

@@ -735,7 +735,9 @@ export default {
         ],
       },
       tableColumns: [
-        { type: "selection", align: "center", minWidth: 100 },
+        { type: "selection", align: "center", minWidth: 100,
+          key: "selection",
+         },
         { title: "序号", key: "index", align: "center", minWidth: 80 },
         {
           title: "产品名称",

+ 29 - 10
src/views/BidSystem/DeepeningOrder/detail.vue

@@ -357,7 +357,7 @@
                 </Select>
               </FormItem> -->
               <FormItem>
-                <Button @click="getListData" type="primary" size="small"
+                <Button @click="handleSearchData" type="primary" size="small"
                   >搜索</Button
                 >
               </FormItem>
@@ -1059,7 +1059,7 @@ export default {
     handleSelection(selection) {
       this.selected = selection;
     },
-    getListData() {
+    getListData(obj) {
       this.axios
         .get("/api/order_area_detail_list", {
           params: {
@@ -1067,6 +1067,7 @@ export default {
             ...this.searchData,
             type: 2,
             oa_id: this.oa_id,
+            ...obj,
           },
         })
         .then((res) => {
@@ -1091,7 +1092,10 @@ export default {
       this.currencyTab = name;
       this.selected = [];
       if (name == "name2" && this.listTableData.length < 1) {
-        this.getListData();
+        this.getListData({
+          page_index: this.page_index,
+          page_size: this.page_size,
+        });
       }
     },
     handleFinish(status) {
@@ -1114,7 +1118,10 @@ export default {
               },
             }).then((res) => {
               if (res.code == 200) {
-                this.getListData();
+                this.getListData({
+                  page_index: this.page_index,
+                  page_size: this.page_size,
+                });
                 this.$Message.success(res.msg);
                 this.initData(
                   this.formData.order_no,
@@ -1130,22 +1137,34 @@ export default {
     },
     changePage(e) {
       this.page_index = e;
-      this.getListData();
+      this.getListData({
+        page_index: this.page_index,
+        page_size: this.page_size,
+      });
     },
     changeSize(e) {
       this.page_size = e;
-      this.getListData();
+      this.getListData({
+        page_index: this.page_index,
+        page_size: this.page_size,
+      });
     },
     async handleBeforeUpload(row) {
       // row.name
       console.log("row :>> ", row);
-      this.uploadData.order_no = this.$route.query.order_no
-      this.uploadData.oa_id = this.$route.query.oa_id
+      this.uploadData.order_no = this.$route.query.order_no;
+      this.uploadData.oa_id = this.$route.query.oa_id;
       return true;
     },
     onProgress(e) {
       console.log(e);
     },
+    handleSearchData() {
+      this.getListData({
+        page_index: 1,
+        page_size: this.page_size,
+      });
+    },
     initData(order_no, curIndex, oa_id) {
       this.axios({
         method: "get",
@@ -1581,8 +1600,8 @@ export default {
         element.process_property = "";
         element.process_properties = "";
         element.addPDTProcessAttrList.forEach((el, i) => {
-          element.process_property += el.showValue?el.showValue + ",":'';
-          element.process_properties += el.showId?el.showId + ",":'';
+          element.process_property += el.showValue ? el.showValue + "," : "";
+          element.process_properties += el.showId ? el.showId + "," : "";
         });
         element.process_property = element.process_property.substring(
           0,

+ 255 - 183
src/views/Dispatching/Dispatching.vue

@@ -1,53 +1,72 @@
 <template>
   <div>
-    <Toptitle title='派工'>
-      <Button @click="goBack"
-              type='primary'
-              ghost
-              style="margin-right:10px;">返回</Button>
-      <Button @click="handleGoPage"
-              type='primary'
-              ghost
-              style="margin-right:10px;">派工单查询</Button>
-      <Button @click="handleDispatchAllOpen"
-              type='primary'
-              style="margin-right:10px;">全部派工</Button>
+    <Toptitle title="派工">
+      <Button @click="goBack" type="primary" ghost style="margin-right:10px;"
+        >返回</Button
+      >
+      <Button
+        @click="handleGoPage"
+        type="primary"
+        ghost
+        style="margin-right:10px;"
+        >派工单查询</Button
+      >
+      <Button
+        @click="handleDispatchAllOpen"
+        type="primary"
+        style="margin-right:10px;"
+        >全部派工</Button
+      >
     </Toptitle>
     <div class="body">
       <div class="header">
-        <Tabs v-model="currencyTag"
-              @on-click="handleProcedureChange">
-          <TabPane v-for="item in basicsProcedureList"
-                   :key="item.id"
-                   :label="item.title"
-                   :name="item.id+''" />
+        <Tabs v-model="currencyTag" @on-click="handleProcedureChange">
+          <TabPane
+            v-for="item in basicsProcedureList"
+            :key="item.id"
+            :label="item.title"
+            :name="item.id + ''"
+          />
         </Tabs>
       </div>
       <div class="content">
-        <Table :columns="tableColumns"
-               border
-               @on-selection-change="handleSelectionChange"
-               :data="tableData">
-          <template slot="slotGroup"
-                    slot-scope="{row,index}">
-            <Select v-model="row.employee_id"
-                    size="small"
-                    @on-change="(e)=>handleGroupSelect(e,tableData[index],index,tableData[index].employee_id)"
-                    clearable
-                    style="width: 150px">
-              <Option v-for="(sitem) in groupList"
-                      :key="sitem.id"
-                      :label="sitem.nickname"
-                      :value="sitem.id">
+        <Table
+          :columns="tableColumns"
+          border
+          max-height="700"
+          @on-selection-change="handleSelectionChange"
+          :data="tableData"
+        >
+          <template slot="slotGroup" slot-scope="{ row, index }">
+            <Select
+              v-model="row.employee_id"
+              size="small"
+              @on-change="
+                (e) =>
+                  handleGroupSelect(
+                    e,
+                    tableData[index],
+                    index,
+                    tableData[index].employee_id
+                  )
+              "
+              clearable
+              style="width: 150px"
+            >
+              <Option
+                v-for="sitem in groupList"
+                :key="sitem.id"
+                :label="sitem.nickname"
+                :value="sitem.id"
+              >
               </Option>
             </Select>
           </template>
-          <template slot="slotSet"
-                    slot-scope="{row,index}">
-            <a style="margin:0 5px"
-               @click="handleSet(row,index)">详情</a>
-            <a style="margin:0 5px"
-               @click="handleDispatchConfirm(row,index)">派工</a>
+          <template slot="slotSet" slot-scope="{ row, index }">
+            <a style="margin:0 5px" @click="handleSet(row, index)">详情</a>
+            <a style="margin:0 5px" @click="handleDispatchConfirm(row, index)"
+              >派工</a
+            >
           </template>
         </Table>
         <!-- <div class="pageSlotStyle">
@@ -62,19 +81,18 @@
         </div> -->
       </div>
     </div>
-    <Modal v-model="showModal"
-           title="确认派工">
-      <Form :label-width="85"
-            ref='forms'
-            :model="dispatchInfo">
+    <Modal v-model="showModal" title="确认派工">
+      <Form :label-width="85" ref="forms" :model="dispatchInfo">
         <FormItem label="选择时间">
-          <DatePicker :options="options"
-                      style="width:100%;"
-                      v-model="dispatchTime"
-                      clearable
-                      type="daterange"
-                      split-panels
-                      placeholder="请选择日期"></DatePicker>
+          <DatePicker
+            :options="options"
+            style="width:100%;"
+            v-model="dispatchTime"
+            clearable
+            type="daterange"
+            split-panels
+            placeholder="请选择日期"
+          ></DatePicker>
         </FormItem>
 
         <FormItem label="点工单形式">
@@ -83,44 +101,55 @@
             <Radio :label="0">否</Radio>
           </RadioGroup>
         </FormItem>
-        <FormItem label="日薪"
-                  v-if="dispatchInfo.work_type == 1">
+        <FormItem label="日薪" v-if="dispatchInfo.work_type == 1">
           <Input v-model="dispatchInfo.user_salary">
-          <span slot="append">元</span>
+            <span slot="append">元</span>
           </Input>
         </FormItem>
-
       </Form>
       <div slot="footer">
         <Button @click="showModal = false">取消</Button>
-        <Button type="primary"
-                @click="handleDispatch(subArr,subUrl)">确认</Button>
+        <Button type="primary" @click="handleDispatch(subArr, subUrl)"
+          >确认</Button
+        >
       </div>
     </Modal>
-    <Modal v-model="showModalAll"
-           title="全部派工">
-      <Table :columns="modalTableColumns"
-             border
-             :data="modalTableData">
-        <template slot="slotGroup"
-                  slot-scope="{row,index}">
-          <Select v-model="row.employee_id"
-                  size="small"
-                  @on-change="(e)=>handleGroupSelect(e,modalTableData[index],index,modalTableData[index].employee_id)"
-                  clearable
-                  style="width: 120px">
-            <Option v-for="(sitem) in groupList"
-                    :key="sitem.id"
-                    :label="sitem.nickname"
-                    :value="sitem.id">
+    <Modal v-model="showModalAll" title="全部派工">
+      <Table
+        :columns="modalTableColumns"
+        border
+        max-height="700"
+        :data="modalTableData"
+      >
+        <template slot="slotGroup" slot-scope="{ row, index }">
+          <Select
+            v-model="row.employee_id"
+            size="small"
+            @on-change="
+              (e) =>
+                handleGroupSelect(
+                  e,
+                  modalTableData[index],
+                  index,
+                  modalTableData[index].employee_id
+                )
+            "
+            clearable
+            style="width: 120px"
+          >
+            <Option
+              v-for="sitem in groupList"
+              :key="sitem.id"
+              :label="sitem.nickname"
+              :value="sitem.id"
+            >
             </Option>
           </Select>
         </template>
       </Table>
       <div slot="footer">
         <Button @click="showModalAll = false">取消</Button>
-        <Button type="primary"
-                @click="handleDispatchAllConfirm">确认</Button>
+        <Button type="primary" @click="handleDispatchAllConfirm">确认</Button>
       </div>
     </Modal>
   </div>
@@ -131,26 +160,42 @@
 // 例如:import 《组件名称》 from '《组件路径》';
 
 export default {
-  name: '',
-  components: {
-
-  },
+  name: "",
+  components: {},
   props: {},
   // import引入的组件需要注入到对象中才能使用
-  data () {
+  data() {
     // 这里存放数据
     return {
       tableColumns: [
         // { title: '全选', type: 'selection', align: 'center', minWidth: 60 },
-        { title: '工序', align: 'center', key: 'title', minWidth: 150 },
-        { title: '部件总数', align: 'center', key: 'num', minWidth: 150 },
-        { title: '班组', align: 'center', key: '', minWidth: 150, slot: 'slotGroup' },
-        { title: '操作', align: 'center', key: '', minWidth: 100, slot: 'slotSet' },
+        { title: "工序", align: "center", key: "title", minWidth: 150 },
+        { title: "部件总数", align: "center", key: "num", minWidth: 150 },
+        {
+          title: "班组",
+          align: "center",
+          key: "",
+          minWidth: 150,
+          slot: "slotGroup",
+        },
+        {
+          title: "操作",
+          align: "center",
+          key: "",
+          minWidth: 100,
+          slot: "slotSet",
+        },
       ],
       modalTableColumns: [
-        { title: '工序', align: 'center', key: 'title', minWidth: 150 },
-        { title: '部件总数', align: 'center', key: 'num', minWidth: 150 },
-        { title: '班组', align: 'center', key: '', minWidth: 150, slot: 'slotGroup' },
+        { title: "工序", align: "center", key: "title", minWidth: 150 },
+        { title: "部件总数", align: "center", key: "num", minWidth: 150 },
+        {
+          title: "班组",
+          align: "center",
+          key: "",
+          minWidth: 150,
+          slot: "slotGroup",
+        },
       ],
       modalTableData: [{}],
       tableData: [{}],
@@ -159,145 +204,172 @@ export default {
       total: 0,
       basicsProcedureList: [],
       groupList: [],
-      currencyTag: '1',
+      currencyTag: "1",
       dispatchTime: [],
       selected: [],
       showModal: false,
       showModalAll: false,
       options: {
-        disabledDate (date) {
+        disabledDate(date) {
           return date && date.valueOf() < Date.now() - 86400000;
-        }
+        },
       },
       dispatchInfo: {},
       subArr: [],
-      subUrl: ''
-    }
+      subUrl: "",
+    };
   },
   // 生命周期 - 创建完成(可以访问当前this实例)
-  created () {
+  created() {
     // 获取工序分类列表
-    this.axios({ method: 'get', url: '/api/basics_procedure_index', }).then((res) => { this.basicsProcedureList = res.data.data, this.currencyTag = localStorage.getItem('dispatchTag')||this.currencyTag+''}).catch((err) => { });
+    this.axios({ method: "get", url: "/api/basics_procedure_index" })
+      .then((res) => {
+        (this.basicsProcedureList = res.data.data),
+          (this.currencyTag =
+            localStorage.getItem("dispatchTag") || this.currencyTag + "");
+      })
+      .catch((err) => {});
     //获取班组列表
-    this.axios('/api/employee_list', { params: { type: 3 } }).then(res => this.groupList = res.data)
+    this.axios("/api/employee_list", { params: { type: 3 } }).then(
+      (res) => (this.groupList = res.data)
+    );
   },
   // 生命周期 - 挂载完成(可以访问DOM元素)
-  mounted () {
-    this.initData()
+  mounted() {
+    this.initData();
   },
   methods: {
-    initData () {
+    initData() {
       this.axios({
-        method: 'get',
-        url: '/api/order_produce_list',
+        method: "get",
+        url: "/api/order_produce_list",
         params: {
-          basics_procedure_id: localStorage.getItem('dispatchTag') || this.currencyTag
-        }
-      }).then((res) => {
-        this.tableData = res.data
-        this.tableData.forEach(element => {
-          element.produce_id = element.id
-          element.employee_id ? '' : element.employee_id = ''
-        });
-        this.$forceUpdate()
-      }).catch((err) => { });
+          basics_procedure_id:
+            localStorage.getItem("dispatchTag") || this.currencyTag,
+        },
+      })
+        .then((res) => {
+          this.tableData = res.data;
+          this.tableData.forEach((element) => {
+            element.produce_id = element.id;
+            element.employee_id ? "" : (element.employee_id = "");
+          });
+          this.$forceUpdate();
+        })
+        .catch((err) => {});
+    },
+    goBack() {
+      this.$router.go(-1);
+    },
+    handleGoPage() {
+      this.$router.push({ path: "/cms/Dispatching/DispatchedList" });
     },
-    goBack () { this.$router.go(-1) },
-    handleGoPage () { this.$router.push({ path: '/cms/Dispatching/DispatchedList' }) },
-    handleSet (row, index) {
+    handleSet(row, index) {
       this.$router.push({
-        path: '/cms/Dispatching/DispatchingDetail',
+        path: "/cms/Dispatching/DispatchingDetail",
         query: {
           produce_id: row.id,
-        }
-      })
+        },
+      });
     },
-    handleDispatchConfirm (row, index) {
+    handleDispatchConfirm(row, index) {
       if (row.employee_id) {
-        this.selected = [row]
-        this.showModal = true
-        this.subArr = JSON.parse(JSON.stringify(this.selected))
-        this.subUrl = '/api/order_produce_pull_all'
+        this.selected = [row];
+        this.showModal = true;
+        this.subArr = JSON.parse(JSON.stringify(this.selected));
+        this.subUrl = "/api/order_produce_pull_all";
       } else {
-        this.$Message.warning('请选择班组')
+        this.$Message.warning("请选择班组");
       }
     },
-    handleDispatch (target, url) {
+    handleDispatch(target, url) {
       if (!this.dispatchTime[0]) {
-        this.$Message.warning('请选择时间')
+        this.$Message.warning("请选择时间");
       } else {
-        this.dispatchInfo.start_time = new Date(this.dispatchTime[0]).toLocaleDateString().replace(/\//g, "-")
-        this.dispatchInfo.end_time = new Date(this.dispatchTime[1]).toLocaleDateString().replace(/\//g, "-")
-        target.forEach(element => {
-          element.start_time = this.dispatchInfo.start_time
-          element.end_time = this.dispatchInfo.end_time
-          element.work_type = this.dispatchInfo.work_type
-          element.user_salary = this.dispatchInfo.user_salary || ''
+        this.dispatchInfo.start_time = new Date(this.dispatchTime[0])
+          .toLocaleDateString()
+          .replace(/\//g, "-");
+        this.dispatchInfo.end_time = new Date(this.dispatchTime[1])
+          .toLocaleDateString()
+          .replace(/\//g, "-");
+        target.forEach((element) => {
+          element.start_time = this.dispatchInfo.start_time;
+          element.end_time = this.dispatchInfo.end_time;
+          element.work_type = this.dispatchInfo.work_type;
+          element.user_salary = this.dispatchInfo.user_salary || "";
         });
         this.axios({
-          method: 'post',
+          method: "post",
           url,
           data: {
-            ...target
-          }
-        }).then((res) => {
-          if (res.code == 200) {
-            this.showModal = false
-            this.$Message.success(res.msg || '操作成功')
-            this.initData()
-            this.dispatchInfo = {}
-            this.dispatchTime = []
-          }
-        }).catch((err) => { });
+            ...target,
+          },
+        })
+          .then((res) => {
+            if (res.code == 200) {
+              this.showModal = false;
+              this.$Message.success(res.msg || "操作成功");
+              this.initData();
+              this.dispatchInfo = {};
+              this.dispatchTime = [];
+            }
+          })
+          .catch((err) => {});
       }
     },
-    handleDispatchAllConfirm () {
-      let flag = true
-      this.modalTableData.forEach(element => {
+    handleDispatchAllConfirm() {
+      let flag = true;
+      this.modalTableData.forEach((element) => {
         if (!element.employee_id || element.employee_id <= 0) {
-          flag = false
+          flag = false;
         }
       });
       if (flag) {
-        this.showModalAll = false, this.showModal = true
-        this.subArr = JSON.parse(JSON.stringify(this.modalTableData))
-        this.subUrl = '/api/all_order_produce_pull'
+        (this.showModalAll = false), (this.showModal = true);
+        this.subArr = JSON.parse(JSON.stringify(this.modalTableData));
+        this.subUrl = "/api/all_order_produce_pull";
       } else {
-        this.$Message.warning('请选择班组')
+        this.$Message.warning("请选择班组");
       }
     },
-    handleDispatchAllOpen () {
-      console.log( localStorage.getItem('dispatchTag'));
-      console.log('this.currencyTag :>> ', this.currencyTag);
-      this.axios.get('/api/get_all_order_produce', { params: { basics_procedure_id: localStorage.getItem('dispatchTag') | this.currencyTag } })
-        .then(res => {
+    handleDispatchAllOpen() {
+      console.log(localStorage.getItem("dispatchTag"));
+      console.log("this.currencyTag :>> ", this.currencyTag);
+      this.axios
+        .get("/api/get_all_order_produce", {
+          params: {
+            basics_procedure_id:
+              localStorage.getItem("dispatchTag") | this.currencyTag,
+          },
+        })
+        .then((res) => {
           if (res.code == 200) {
-            this.modalTableData = res.data
-            this.modalTableData.forEach(element => {
-              element.produce_id = element.id
+            this.modalTableData = res.data;
+            this.modalTableData.forEach((element) => {
+              element.produce_id = element.id;
             });
-            this.showModalAll = true
+            this.showModalAll = true;
           }
-        })
+        });
     },
-    changePage (e) {
+    changePage(e) {
       this.page_index = e;
-      this.initData()
+      this.initData();
     },
-    changeSize (e) {
+    changeSize(e) {
       this.page_size = e;
-      this.initData()
+      this.initData();
     },
-    handleProcedureChange (val) {
-      this.selected = []
-      this.currencyTag = val
-      localStorage.setItem('dispatchTag', val)
-      this.initData()
+    handleProcedureChange(val) {
+      this.selected = [];
+      this.currencyTag = val;
+      localStorage.setItem("dispatchTag", val);
+      this.initData();
     },
-    handleSelectionChange (selection) {
-      this.selected = selection
+    handleSelectionChange(selection) {
+      this.selected = selection;
     },
-    handleGroupSelect (e, row, index, value) {
+    handleGroupSelect(e, row, index, value) {
       // if (this.selected.length > 0) {
       //   this.selected.forEach(element => {
       //     if (element.id == row.id) {
@@ -305,24 +377,24 @@ export default {
       //     }
       //   });
       // }
-      row.employee_id = e
+      row.employee_id = e;
     },
   },
   // 监听属性 类似于data概念
   computed: {},
   // 监控data中的数据变化
   watch: {},
-  beforeCreate () { }, // 生命周期 - 创建之前
-  beforeMount () { }, // 生命周期 - 挂载之前
-  beforeUpdate () { }, // 生命周期 - 更新之前
-  updated () { }, // 生命周期 - 更新之后
-  beforeDestroy () { }, // 生命周期 - 销毁之前
-  destroyed () { }, // 生命周期 - 销毁完成
-  activated () { }, // 如果页面有keep-alive缓存功能,这个函数会触发
-}
+  beforeCreate() {}, // 生命周期 - 创建之前
+  beforeMount() {}, // 生命周期 - 挂载之前
+  beforeUpdate() {}, // 生命周期 - 更新之前
+  updated() {}, // 生命周期 - 更新之后
+  beforeDestroy() {}, // 生命周期 - 销毁之前
+  destroyed() {}, // 生命周期 - 销毁完成
+  activated() {}, // 如果页面有keep-alive缓存功能,这个函数会触发
+};
 </script>
 
-<style lang='scss' scoped>
+<style lang="scss" scoped>
 .pageSlotStyle {
   display: flex;
   justify-content: center;

File diff suppressed because it is too large
+ 346 - 208
src/views/OrderMannage/BusinessOrderlist/edit.vue


+ 254 - 71
src/views/ProductionOrderList/ProductionsOrder/Decorationlist.vue

@@ -180,14 +180,15 @@
         </div>
       </Modal>
       <Modal
-        class-name="vertical-center-modal-PL"
+        class-name="vertical-center-modal-Process"
+        width="80%"
         v-model="show_add_detail"
+        :mask-closable="false"
         title="工艺路线修改"
-        @on-ok="saveTableData"
       >
-        <div class="modal_process_route">
+        <div class="modal_process_route-process">
           <div>
-            <span style="width:100px">id: </span
+            <span style="width: 100px">id: </span
             ><Input
               v-model="info.id"
               disabled
@@ -197,18 +198,18 @@
             />
           </div>
           <div>
-            <span style="width:100px">工艺路线名称: </span
+            <span style="width: 100px">工艺路线名称: </span
             ><Input
               v-model="info.title"
               placeholder="请输入工艺路线名称"
               size="small"
-              style="width: 150px"
+              style="width: 250px"
             />
           </div>
         </div>
-        <span>已选:</span>
-        <Form>
-          <FormItem>
+        <div class="modal_content">
+          <div class="modal_content_left">
+            <span>已选:</span>
             <SlickList
               :distance="10"
               :lockToContainerEdges="true"
@@ -219,45 +220,140 @@
               @input="getChangeLists"
             >
               <SlickItem
-                style="z-index:9999"
+                style="z-index: 9999"
                 v-for="(item, key) of selectTags"
                 :key="key"
                 class="SortableItem"
                 :index="key"
               >
-                <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>
+                  <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>
-          </FormItem>
-          <FormItem
-            v-for="(item, index) of info.bps"
-            :key="index"
-            :label="item.title"
-          >
-            <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>
+          <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>
-              <Checkbox
-                @on-change="changeCheck($event, _item, selectTags)"
-                v-model="_item.show"
-                style="padding:0px 5px;"
-                >{{ _item.title }}</Checkbox
-              >
-            </Tooltip>
-          </FormItem>
-        </Form>
+              <!-- <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
@@ -853,26 +949,26 @@ export default {
           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;
-        });
-           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;
+          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;
+          });
+          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;
         }
       );
     },
@@ -1083,21 +1179,66 @@ export default {
     },
     handleProcessLineSet(row, index) {
       this.info.id = row.id;
-      // this.info.title = row.title;
+      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 element = this.info.bps[key];
-        element.cld.forEach((z) => {
-          z.show = arr.includes(z.id + "");
-          if (arr.includes(z.id + "")) {
-            this.selectTags.push(z);
-          }
+        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;
     },
@@ -1586,10 +1727,18 @@ export default {
 }
 .modal_process_route {
   div {
-    display: flex;
-    justify-content: space-around;
-    align-items: center;
-    margin: 5px 0;
+  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 {
@@ -1611,4 +1760,38 @@ export default {
   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>

+ 2 - 1
src/views/ProductionOrderList/ProductionsOrder/list.vue

@@ -273,7 +273,8 @@ export default {
         path: '/cms/productionorderlist/productionsorder/Decorationlist',
         query: {
           order_no: row.order_no,
-          type: 'produce'
+          type: 'produce',
+          oa_id:row.oa_id
         }
       })
     },

+ 117 - 62
src/views/cms.vue

@@ -3,21 +3,35 @@
     <Header @handleTitleClick="handleTitleClick" />
     <div class="page">
       <div class="navigation">
-        <Navgation :navgationData='navgationData'
-                   @menuSelect='menuSelect' />
+        <Navgation :navgationData="navgationData" @menuSelect="menuSelect" />
       </div>
 
       <div class="router-map">
         <Crumbs :crumbs="crumbs" />
         <transition :name="transitionName">
           <keep-alive>
-            <router-view v-if="$route.meta.keepAlive"
-                         :class="['router-style',$route.query.title == '首页'||$route.name=='ProductionCharts' ? 'router-style-home' : 'router-style-page']" />
+            <router-view
+              v-if="$route.meta.keepAlive"
+              :class="[
+                'router-style',
+                $route.query.title == '首页' ||
+                $route.name == 'ProductionCharts'
+                  ? 'router-style-home'
+                  : 'router-style-page',
+              ]"
+            />
           </keep-alive>
         </transition>
         <transition :name="transitionName">
-          <router-view v-if="!$route.meta.keepAlive"
-                       :class="['router-style',$route.query.title == '首页'||$route.name=='ProductionCharts' ? 'router-style-home' : 'router-style-page']" />
+          <router-view
+            v-if="!$route.meta.keepAlive"
+            :class="[
+              'router-style',
+              $route.query.title == '首页' || $route.name == 'ProductionCharts'
+                ? 'router-style-home'
+                : 'router-style-page',
+            ]"
+          />
         </transition>
       </div>
     </div>
@@ -25,99 +39,140 @@
 </template>
 
 <script>
-import Header from '../components/header/index'
-import Navgation from '../components/navgation/index'
-import Crumbs from '../components/crumbs/index'
-import { mapState, mapMutations, mapActions } from 'vuex'
+import Header from "../components/header/index";
+import Navgation from "../components/navgation/index";
+import Crumbs from "../components/crumbs/index";
+import { mapState, mapMutations, mapActions } from "vuex";
 export default {
-  data () {
+  data() {
     return {
-      transitionName: 'slide-left',
+      transitionName: "slide-left",
       // navgationData:[]
-    }
+    };
   },
   watch: {
-    '$route' (to, from) {
-      let toName = to.name
-      const toIndex = to.meta.index
-      const fromIndex = from.meta.index
-      this.transitionName = toIndex < fromIndex ? 'slide-right' : 'slide-left'
-    }
+    $route(to, from) {
+      let toName = to.name;
+      const toIndex = to.meta.index;
+      const fromIndex = from.meta.index;
+      this.transitionName = toIndex < fromIndex ? "slide-right" : "slide-left";
+    },
   },
   computed: {
-    ...mapState(['navgationData', 'crumbs'])
+    ...mapState(["navgationData", "crumbs"]),
   },
-  created () {
-    this.undata_side_navData()
+  created() {
+    this.undata_side_navData();
   },
-  mounted () {
-    if (sessionStorage.getItem('crumbs')) {
-      let data = JSON.parse(sessionStorage.getItem('crumbs'))
-      this.$store.commit('updateCrumbs', data)
+  mounted() {
+    if (sessionStorage.getItem("crumbs")) {
+      let data = JSON.parse(sessionStorage.getItem("crumbs"));
+      this.$store.commit("updateCrumbs", data);
     }
   },
   methods: {
-    ...mapMutations(['updateCrumbs']),
-    ...mapActions(['undata_side_navData']),
-    menuSelect (name, data) {
-      let permisssions_id = '';
-      sessionStorage.setItem('open-menu', name)
-      sessionStorage.removeItem('crumbs')
-      if (this.func.isType(name) == 'Number') {//若一级菜单带page的情况下
-        let s = data[name]
-        this.$store.commit('updateCrumbs', { s })
-        sessionStorage.setItem('crumbs', JSON.stringify({ parantData, childData, lastChild }))
+    ...mapMutations(["updateCrumbs"]),
+    ...mapActions(["undata_side_navData"]),
+    menuSelect(name, data) {
+      let permisssions_id = "";
+      sessionStorage.setItem("open-menu", name);
+      sessionStorage.removeItem("crumbs");
+      if (this.func.isType(name) == "Number") {
+        //若一级菜单带page的情况下
+        let s = data[name];
+        this.$store.commit("updateCrumbs", { s });
+        sessionStorage.setItem(
+          "crumbs",
+          JSON.stringify({ parantData, childData, lastChild })
+        );
         return this.$router.push({
           path: data[name].page,
           query: {
             title: s.title,
-            id: s.id
-          }
-        })
+            id: s.id,
+          },
+        });
       }
-      let split_array = name.split('-');
+      let split_array = name.split("-");
       let [parant, child, last, end, next_end] = split_array;
-      let parantData = data[parant], childData = parantData.sub[child], lastChild, endChild, nextEndChild;
+      let parantData = data[parant],
+        childData = parantData.sub[child],
+        lastChild,
+        endChild,
+        nextEndChild;
       if (last) {
-        lastChild = childData.sub[last]
+        lastChild = childData.sub[last];
         if (lastChild.type_id) {
           permisssions_id = childData.id;
         }
       }
       if (end) {
-        endChild = lastChild.sub[end]
+        endChild = lastChild.sub[end];
         if (endChild.type_id) {
           permisssions_id = childData.id;
         }
       }
       if (next_end) {
-        nextEndChild = endChild.sub[next_end]
+        nextEndChild = endChild.sub[next_end];
       }
-      this.$store.commit('updateCrumbs', { parantData, childData, lastChild, endChild, nextEndChild })
-      sessionStorage.setItem('crumbs', JSON.stringify({ parantData, childData, lastChild, endChild, nextEndChild }))
-      let page = nextEndChild ? nextEndChild.page : (endChild ? endChild.page : (lastChild ? lastChild.page : childData.page))
-      let title = nextEndChild ? nextEndChild.title : (endChild ? endChild.title : (lastChild ? lastChild.title : childData.title))
-      let id = nextEndChild ? nextEndChild.id : (endChild ? endChild.id : (lastChild ? lastChild.id : childData.id || ''))
+      this.$store.commit("updateCrumbs", {
+        parantData,
+        childData,
+        lastChild,
+        endChild,
+        nextEndChild,
+      });
+      sessionStorage.setItem(
+        "crumbs",
+        JSON.stringify({
+          parantData,
+          childData,
+          lastChild,
+          endChild,
+          nextEndChild,
+        })
+      );
+      let page = nextEndChild
+        ? nextEndChild.page
+        : endChild
+        ? endChild.page
+        : lastChild
+        ? lastChild.page
+        : childData.page;
+      let title = nextEndChild
+        ? nextEndChild.title
+        : endChild
+        ? endChild.title
+        : lastChild
+        ? lastChild.title
+        : childData.title;
+      let id = nextEndChild
+        ? nextEndChild.id
+        : endChild
+        ? endChild.id
+        : lastChild
+        ? lastChild.id
+        : childData.id || "";
       this.$router.push({
         path: page,
         query: {
           title: title,
           id: id,
           permisssions_id: permisssions_id,
-        }
-      })
+        },
+      });
+    },
+    handleTitleClick(row) {
+      this.$store.commit("updataNavgation", row.sub);
+      sessionStorage.setItem("navgation", JSON.stringify(row.sub));
+      // if (row.title == '首页') {
+      this.$router.push({ path: "/cms/home", query: { title: "首页" } });
+      // } else {
+      // }
     },
-    handleTitleClick (row) {
-      this.$store.commit('updataNavgation', row.sub)
-      sessionStorage.setItem('navgation', JSON.stringify(row.sub))
-      if (row.title == '首页') {
-        this.$router.push({ path: '/cms/home', query: { title: '首页' } })
-        // } else {
-      }
-    }
   },
-  components: { Header, Navgation, Crumbs }
-}
+  components: { Header, Navgation, Crumbs },
+};
 </script>
 <style lang="scss" scoped>
 .content {
@@ -176,4 +231,4 @@ export default {
   opacity: 0;
   transform: translate3d(-100%, 0, 0);
 }
-</style>
+</style>

+ 51 - 0
src/views/newpage/MatchList/matchCheck.vue

@@ -0,0 +1,51 @@
+<template>
+  <div>
+
+  </div>
+</template>
+
+<script>
+// 这里可以导入其他文件(比如:组件,工具js,第三方插件js,json文件,图片文件等等)
+// 例如:import 《组件名称》 from '《组件路径》';
+
+export default {
+  name:'',
+  components:{
+    
+  },
+  props:{},
+// import引入的组件需要注入到对象中才能使用
+  data () {
+    // 这里存放数据
+    return {
+
+    }
+  },
+// 生命周期 - 创建完成(可以访问当前this实例)
+  created () {
+
+  },
+// 生命周期 - 挂载完成(可以访问DOM元素)
+  mounted () {
+
+  },
+  methods: {
+
+  },
+// 监听属性 类似于data概念
+computed: {},
+// 监控data中的数据变化
+watch: {},
+beforeCreate () { }, // 生命周期 - 创建之前
+beforeMount () { }, // 生命周期 - 挂载之前
+beforeUpdate () { }, // 生命周期 - 更新之前
+updated () { }, // 生命周期 - 更新之后
+beforeDestroy () { }, // 生命周期 - 销毁之前
+destroyed () { }, // 生命周期 - 销毁完成
+activated () { }, // 如果页面有keep-alive缓存功能,这个函数会触发
+}
+</script>
+
+<style lang='scss' scoped>
+
+</style>

+ 209 - 0
src/views/newpage/MatchList/matchList.vue

@@ -0,0 +1,209 @@
+<template>
+  <div>
+    <Row style="padding:10px 0">
+      <Col span="5">
+        <span>项目编号:</span>
+        <span>
+          <Input v-model="SearchInfo.order_no" style="width:150px" />
+        </span>
+      </Col>
+      <Col span="5">
+        <span>项目名称:</span>
+        <span>
+          <Input v-model="SearchInfo.project_title" style="width:150px" />
+        </span>
+      </Col>
+      <Col span="5">
+        <span>项目简称:</span>
+        <span>
+          <Input v-model="SearchInfo.project_short_title" style="width:150px" />
+        </span>
+      </Col>
+      <Col span="5">
+        <span>匹配状态:</span>
+        <span>
+          <Select
+            filterable
+            filter-by-label
+            transfer
+            v-model="SearchInfo.machining_state"
+            style="width: 150px"
+          >
+            <Option label="未匹配" value="0"></Option>
+            <Option label="匹配中" value="1"></Option>
+            <Option label="匹配完成" value="2"></Option>
+          </Select>
+        </span>
+      </Col>
+      <Col span="2" offset="2">
+        <Button @click="back" type="primary" style="margin-right: 10px"
+          >搜索</Button
+        >
+      </Col>
+    </Row>
+    <div>
+      <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>
+        </template>
+      </Table>
+      <div class="content_body_page">
+        <Page
+          :page-size-opts="[10, 20, 30, 40, 100]"
+          @on-page-size-change="changeSize"
+          @on-change="changePage"
+          :current="page_index"
+          show-total
+          show-elevator
+          :total="total"
+          show-sizer
+          :page-size="page_size"
+        />
+      </div>
+    </div>
+  </div>
+</template>
+
+<script>
+// 这里可以导入其他文件(比如:组件,工具js,第三方插件js,json文件,图片文件等等)
+// 例如:import 《组件名称》 from '《组件路径》';
+
+export default {
+  name: "matchList",
+  components: {},
+  props: {},
+  // import引入的组件需要注入到对象中才能使用
+  data() {
+    // 这里存放数据
+    return {
+      SearchInfo: { order_no: "", project_title: "" },
+      tableColumns: [
+        { title: "项目编号", align: "center", key: "project_no", minWidth: 60 },
+        {
+          title: "项目名称",
+          align: "center",
+          key: "project_title",
+          minWidth: 60,
+        },
+        {
+          title: "项目简称",
+          align: "center",
+          key: "project_short_title",
+          minWidth: 60,
+        },
+        {
+          title: "匹配状态",
+          align: "center",
+          key: "machining_state",
+          minWidth: 60,
+          render: (h, params) => {
+            return h(
+              "span",
+              {},
+              params.row.machining_state == 0
+                ? "未匹配"
+                : params.row.machining_state == 1
+                ? "匹配中"
+                : "匹配完成"
+            );
+          },
+        },
+        {
+          title: "下生产状态",
+          align: "center",
+          key: "produce_state",
+          minWidth: 60,
+          render: (h, params) => {
+            return h(
+              "span",
+              {},
+              params.row.produce_state == 0
+                ? "未下生产"
+                : params.row.produce_state == 1
+                ? "下生产中"
+                : "下生产完成"
+            );
+          },
+        },
+        { title: "制单日期", align: "center", key: "crt_time", minWidth: 60 },
+        { title: "操作", align: "center", minWidth: 100, slot: "setSlot" },
+      ],
+      tableData: [],
+      page_index: 1,
+      page_size: 10,
+      total: null,
+    };
+  },
+  // 生命周期 - 创建完成(可以访问当前this实例)
+  created() {},
+  // 生命周期 - 挂载完成(可以访问DOM元素)
+  mounted() {
+    this.initData();
+  },
+  methods: {
+    back() {
+      this.$router.go(-1);
+    },
+    initData() {
+      this.axios({
+        method: "get",
+        url: "/api/bst_matching_list",
+      }).then((res) => {
+        if (res.code == 200) {
+          console.log("res :>> ", res);
+          this.tableData = res.data.data;
+          this.total = res.data.total;
+        }
+      });
+    },
+    handleSet(row, index, type) {
+      switch (type) {
+        case 1:
+          this.$router.push({
+            path: "/cms/newPage/MatchList/matchPage",
+            query: {
+              type,
+              id: row.id,
+              project_no:row.project_no,
+              project_title:row.project_title
+            },
+          });
+          break;
+        case 2:
+          break;
+        case 3:
+          break;
+      }
+    },
+    changeSize(e) {
+      this.pageSize = e;
+      this.initData();
+    },
+    changePage(e) {
+      this.pageIndex = e;
+      this.initData();
+    },
+  },
+  // 监听属性 类似于data概念
+  computed: {},
+  // 监控data中的数据变化
+  watch: {},
+  beforeCreate() {}, // 生命周期 - 创建之前
+  beforeMount() {}, // 生命周期 - 挂载之前
+  beforeUpdate() {}, // 生命周期 - 更新之前
+  updated() {}, // 生命周期 - 更新之后
+  beforeDestroy() {}, // 生命周期 - 销毁之前
+  destroyed() {}, // 生命周期 - 销毁完成
+  activated() {}, // 如果页面有keep-alive缓存功能,这个函数会触发
+};
+</script>
+
+<style lang="scss" scoped>
+.content_body_page {
+  display: flex;
+  justify-content: center;
+  padding-top: 20px;
+}
+</style>

+ 918 - 0
src/views/newpage/MatchList/matchPage.vue

@@ -0,0 +1,918 @@
+<template>
+  <div>
+    <Toptitle title="匹配">
+      <Button
+        @click="back"
+        v-if="currencyTag == 1"
+        type="primary"
+        style="margin-right: 10px"
+        >自动匹配</Button
+      >
+      <Button @click="back" v-else type="primary" style="margin-right: 10px"
+        >撤销匹配</Button
+      >
+      <Button @click="back" type="primary" ghost style="margin-right: 10px"
+        >返回</Button
+      >
+    </Toptitle>
+    <div class="top-info">
+      <Row align="middle">
+        <Col span="4">
+          <span>项目编号:</span><span>{{ info.project_no }}</span>
+        </Col>
+        <Col span="4"
+          ><span>项目名称:</span><span>{{ info.project_title }}</span>
+        </Col>
+        <Col span="6" v-if="currencyTag == 1">
+          <span>图号:</span>
+          <span>
+            <Select
+              filterable
+              multiple
+              transfer
+              filter-by-label
+              v-model="info.image_number"
+              :max-tag-count="2"
+              style="width: 200px"
+            >
+              <Option
+                v-for="(item, index) in urlSelectList"
+                :key="index"
+                :label="item"
+                :value="item"
+              ></Option>
+            </Select>
+          </span>
+        </Col>
+        <Col span="6" v-if="currencyTag == 1">
+          <span>产品名称:</span>
+          <span>
+            <Select
+              filterable
+              multiple
+              transfer
+              filter-by-label
+              v-model="info.product_name"
+              :max-tag-count="2"
+              style="width: 200px"
+            >
+              <Option
+                v-for="(item, index) in productList"
+                :key="index"
+                :label="item"
+                :value="item"
+              ></Option>
+            </Select>
+          </span>
+        </Col>
+        <Col span="4" v-if="currencyTag == 1">
+          <Button @click="handleSearchUnmatchedInfo" type="primary"
+            >确认</Button
+          >
+        </Col>
+      </Row>
+    </div>
+    <div class="context-tabs">
+      <Tabs type="card" @on-click="handleTabsClick" v-model="currencyTag">
+        <Button @click="back" type="primary" size="small" slot="extra">
+          匹配
+        </Button>
+        <TabPane label="本次未匹配" name="1">
+          <Row>
+            <Col
+              span="16"
+              style="border-top: 1px solid #adb5bd;border-right: 1px solid #adb5bd;padding:10px"
+            >
+              <div>
+                <h1>码单信息</h1>
+                <div class="context-unmatched-sheet">
+                  <div
+                    v-for="url_info in unmatchedObj.urlList"
+                    :key="url_info.id"
+                    style="padding-top:10px"
+                  >
+                    <Row type="flex" align="middle">
+                      <Col span="4">
+                        <span>图号:</span><span>{{ url_info.number }}</span>
+                      </Col>
+                      <Col span="6">
+                        <span>产品名称:</span
+                        ><span>{{ url_info.product_name }}</span>
+                      </Col>
+                      <Col span="4" offset="6">
+                        <span>
+                          总计
+                          <span style="color:red">{{
+                            url_info.product_detail_num
+                          }}</span>
+                          条数据
+                        </span>
+                      </Col>
+                      <Col span="4">
+                        <Button
+                          @click="handleShowCurrencySheet(url_info)"
+                          size="small"
+                          type="text"
+                          >{{ url_info.isCurrenct ? "收缩" : "展开" }}</Button
+                        >
+                        <Icon
+                          size="20"
+                          :type="
+                            url_info.isCurrenct
+                              ? 'md-arrow-dropdown'
+                              : 'md-arrow-dropright'
+                          "
+                          style="vertical-align: middle;"
+                        />
+                      </Col>
+                    </Row>
+                    <div
+                      v-if="url_info.isCurrenct"
+                      class="context-unmatched-sheet-search"
+                    >
+                      <Row type="flex" align="middle">
+                        <Col span="6">
+                          <span>特殊尺寸:</span>
+                          <span>
+                            <Select
+                              filterable
+                              filter-by-label
+                              transfer
+                              v-model="info.wool_size"
+                              size="small"
+                              style="width: 120px"
+                            >
+                              <Option
+                                v-for="(item, index) in wool_size"
+                                :key="index"
+                                :label="item"
+                                :value="item"
+                              ></Option>
+                            </Select>
+                          </span>
+                        </Col>
+                        <Col span="6">
+                          <span>部件名称:</span>
+                          <span>
+                            <Select
+                              filterable
+                              multiple
+                              filter-by-label
+                              transfer
+                              v-model="info.part_name"
+                              :max-tag-count="2"
+                              size="small"
+                              style="width: 120px"
+                            >
+                              <Option
+                                v-for="(item, index) in part_name"
+                                :key="index"
+                                :label="item"
+                                :value="item"
+                              ></Option>
+                            </Select>
+                          </span>
+                        </Col>
+                        <Col span="6">
+                          <span>精裁尺寸:</span>
+                          <span>
+                            <Select
+                              filterable
+                              filter-by-label
+                              transfer
+                              v-model="info.cut_size"
+                              size="small"
+                              style="width: 120px"
+                            >
+                              <Option
+                                v-for="(item, index) in cut_size"
+                                :key="index"
+                                :label="item"
+                                :value="item"
+                              ></Option>
+                            </Select>
+                          </span>
+                        </Col>
+                        <Col span="6">
+                          <Button
+                            @click="getSheetDetailList(url_info)"
+                            size="small"
+                            type="primary"
+                          >
+                            搜索
+                          </Button>
+                        </Col>
+                      </Row>
+                    </div>
+                    <div
+                      v-if="url_info.isCurrenct"
+                      class="context-unmatched-sheet-table"
+                    >
+                      <div
+                        v-for="table_info in unmatchedObj.part_list"
+                        :key="table_info.id"
+                      >
+                        <div>
+                          <Row type="flex" align="middle">
+                            <Col span="10" style="padding:10px 0">
+                              <span>匹配信息:</span>
+                              <span
+                                v-for="(match_info, index) in table_info.key
+                                  .list"
+                                :key="index"
+                              >
+                                {{ match_info.key }}:{{ match_info.value }}
+                              </span>
+                            </Col>
+                            <Col span="3" offset="11">
+                              总计{{ table_info.key.num }}条数据
+                            </Col>
+                          </Row>
+                        </div>
+                        <div>
+                          <Table
+                            :columns="unmatchedSheetTableColumns"
+                            border
+                            :max-height="500"
+                            @on-selection-change="handleSelectChange"
+                            :data="table_info.part_list"
+                          ></Table>
+                        </div>
+                      </div>
+                    </div>
+                  </div>
+                </div>
+              </div>
+            </Col>
+            <Col span="8">
+              <div style="border-top: 1px solid #adb5bd;padding:10px">
+                <h1>房间信息</h1>
+                <div class="context-unmatched-room">
+                  <div
+                    v-for="url_info in unmatchedObj.urlList"
+                    :key="url_info.id"
+                    style="padding-top:10px"
+                  >
+                    <Row type="flex" align="middle">
+                      <Col span="4">
+                        <span>图号:</span><span>{{ url_info.number }}</span>
+                      </Col>
+                      <Col span="8">
+                        <span>产品名称:</span
+                        ><span>{{ url_info.product_name }}</span>
+                      </Col>
+                      <Col span="6" offset="2">
+                        <span>
+                          总计
+                          <span style="color:red">{{
+                            url_info.house_num
+                          }}</span>
+                          条数据
+                        </span>
+                      </Col>
+                      <Col span="4">
+                        <Button
+                          @click="handleShowCurrencySheet(url_info)"
+                          size="small"
+                          type="text"
+                          >{{ url_info.isCurrenct ? "收缩" : "展开" }}</Button
+                        >
+                        <Icon
+                          size="20"
+                          :type="
+                            url_info.isCurrenct
+                              ? 'md-arrow-dropdown'
+                              : 'md-arrow-dropright'
+                          "
+                          style="vertical-align: middle;"
+                        />
+                      </Col>
+                    </Row>
+                    <div
+                      v-if="url_info.isCurrenct"
+                      class="context-unmatched-room-search"
+                    >
+                      <Row type="flex" align="middle">
+                        <Col span="12" style="padding:10px 0">
+                          <span>区域名称:</span>
+                          <span>
+                            <Select
+                              filterable
+                              multiple
+                              filter-by-label
+                              transfer
+                              v-model="info.region"
+                              :max-tag-count="2"
+                              size="small"
+                              style="width: 120px"
+                            >
+                              <Option
+                                v-for="(item, index) in regionList"
+                                :key="index"
+                                :label="item"
+                                :value="item"
+                              ></Option>
+                            </Select>
+                          </span>
+                        </Col>
+                        <Col span="12" style="padding:10px 0">
+                          <span>房号:</span>
+                          <span>
+                            <Select
+                              filterable
+                              multiple
+                              filter-by-label
+                              transfer
+                              v-model="info.number"
+                              :max-tag-count="2"
+                              size="small"
+                              style="width: 120px"
+                            >
+                              <Option
+                                v-for="(item, index) in number"
+                                :key="index"
+                                :label="item"
+                                :value="item"
+                              ></Option>
+                            </Select>
+                          </span>
+                        </Col>
+                        <Col span="12" style="padding:10px 0">
+                          <span>特殊尺寸:</span>
+                          <span>
+                            <Select
+                              filterable
+                              filter-by-label
+                              transfer
+                              v-model="info.wool_size"
+                              size="small"
+                              style="width: 120px"
+                            >
+                              <Option
+                                v-for="(item, index) in wool_size"
+                                :key="index"
+                                :label="item"
+                                :value="item"
+                              ></Option>
+                            </Select>
+                          </span>
+                        </Col>
+                        <Col span="12" style="padding:10px 0">
+                          <Button @click="back" size="small" type="primary"
+                            >搜索</Button
+                          >
+                        </Col>
+                      </Row>
+                    </div>
+                    <div
+                      v-if="url_info.isCurrenct"
+                      class="context-unmatched-room-table"
+                    >
+                      <div>
+                        <Table
+                          :columns="unmatchedRoomTableColumnsUsed"
+                          border
+                          :max-height="500"
+                          @on-selection-change="handleSelectChange"
+                          :data="unmatchedRoomList.house_list"
+                        ></Table>
+                      </div>
+                    </div>
+                  </div>
+                </div>
+              </div>
+            </Col>
+          </Row>
+        </TabPane>
+        <TabPane label="本次已匹配" name="2">
+          <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"
+                >
+                  <template slot="setSlot" slot-scope="{ row, index }">
+                    <a @click="handleMatchedSet(row, index, 5)">撤销匹配 </a>
+                  </template>
+                </Table>
+              </div>
+            </div>
+          </div>
+        </TabPane>
+      </Tabs>
+    </div>
+  </div>
+</template>
+
+<script>
+// 这里可以导入其他文件(比如:组件,工具js,第三方插件js,json文件,图片文件等等)
+// 例如:import 《组件名称》 from '《组件路径》';
+
+export default {
+  name: "",
+  components: {},
+  props: {},
+  // import引入的组件需要注入到对象中才能使用
+  data() {
+    // 这里存放数据
+    return {
+      currencyTag: "1", //当前分页
+      info: {
+        id: this.$route.query.id,
+        project_no: this.$route.query.project_no,
+        project_title: this.$route.query.project_title,
+        cut_size: "",
+        number: "",
+        part_name: "",
+        region: "",
+        wool_size: "",
+        image_number: [],
+        product_name: [],
+      },
+      matchedInfo: {
+        image_number: [],
+        product_name: [],
+      },
+      cut_size: [], //精裁尺寸 未匹配
+      number: [], //房号 未匹配
+      part_name: [], //部件名称 未匹配
+      regionList: [], //区域名称 未匹配
+      wool_size: [], //毛料尺寸 未匹配
+      urlSelectList: [], //图号列表 未匹配
+      productList: [], //产品列表 未匹配
+      urlMatchedList: [], //图号列表 已匹配
+      productMatchedList: [], //产品列表 已匹配
+      regionMatchedList: [], //区域列表 已匹配
+      numberMatchedList: [], //房号列表 已匹配
+      partNameMatchedList: [], //部件列表 已匹配
+      unmatchedObj: {
+        urlList: [], //图号列表
+        part_list: [
+          { part_list: [{ title: 1 }], key: { list: [], num: null } },
+          { part_list: [{ title: 1 }], key: { list: [], num: null } },
+        ], //当前图号下表格列表
+      }, //码单信息
+      unmatchedRoomList: {
+        urlList: [], //图号列表
+        house_list: [{ title: 1 }], //当前图号下表格列表
+      }, //房间信息
+      matchedList: [
+        {
+          number: "123",
+          product_name: "321",
+          isSelect: false,
+          product_detail_num: 1,
+          detail: [
+            {
+              title: "333",
+            },
+          ],
+        },
+        {
+          number: "aaa",
+          product_name: "vvv",
+          isSelect: true,
+          product_detail_num: 2,
+          detail: [
+            {
+              title: "ddd",
+            },
+          ],
+        },
+      ],
+      matchedDetailList: [],
+      unmatchedSheetTableColumns: [
+        { title: "全选", align: "center", minWidth: 60, type: "selection" },
+        { title: "序号", align: "center", type: "index", minWidth: 60 },
+        { title: "部件名称", align: "center", key: "part_name", minWidth: 100 },
+        { 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: 60 },
+        { 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: "unbind_number",
+          minWidth: 90,
+        },
+        { title: "贴皮面积", align: "center", key: "stick", minWidth: 80 },
+        { title: "精裁面积", align: "center", key: "cut", minWidth: 80 },
+        { title: "工艺要求", align: "center", key: "remark", minWidth: 80 },
+      ], //未匹配码单表头
+      unmatchedRoomTableColumns: [
+        { title: "全选", align: "center", minWidth: 60, type: "selection" },
+        { title: "序号", align: "center", type: "index", minWidth: 60 },
+        { title: "区域", align: "center", key: "region", minWidth: 60 },
+        { title: "房号", align: "center", key: "number", minWidth: 60 },
+      ], //未匹配房间表头
+      unmatchedRoomTableColumnsUsed: [],
+      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 },
+        {
+          title: "操作",
+          align: "center",
+          key: "title",
+          minWidth: 80,
+          slot: "setSlot",
+        },
+      ], //匹配表头
+    };
+  },
+  // 生命周期 - 创建完成(可以访问当前this实例)
+  created() {},
+  // 生命周期 - 挂载完成(可以访问DOM元素)
+  mounted() {},
+  methods: {
+    back() {
+      this.$router.go(-1);
+    },
+    handleSelectChange(selection) {},
+    handleTabsClick(name) {
+      name == 2 &&
+        this.axios
+          .get("/api/bst_matching_on_product_list", {
+            params: { id: this.info.id },
+          })
+          .then((res) => {
+            res.data.list.map((v) => {
+              v.isCurrenct = false;
+            });
+            this.matchedList = res.data.list;
+            this.urlMatchedList = res.data.image_number;
+            this.productMatchedList = res.data.product_name;
+            console.log(res);
+          });
+    },
+    handleShowCurrencySheet(row) {
+      console.log("row :>> ", row);
+      if (row.isCurrenct) {
+        row.isCurrenct = !row.isCurrenct;
+      } else {
+        this.unmatchedObj.urlList.map((v) => (v.isCurrenct = false));
+        row.isCurrenct = true;
+      }
+      this.getSheetDetailList(row);
+    },
+    handleShowCurrencyMatched(row) {
+      console.log("row :>> ", row);
+      if (row.isCurrenct) {
+        row.isCurrenct = !row.isCurrenct;
+      } else {
+        this.matchedList.map((v) => (v.isCurrenct = false));
+        row.isCurrenct = true;
+      }
+      this.getMatchedDetailList(row);
+    },
+    getSheetDetailList(row) {
+      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_size: this.info.wool_size,
+            },
+          })
+          .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.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_size = res.data.search_word.wool_size;
+          });
+    },
+    getMatchedDetailList(row) {
+      row.isCurrenct &&
+        this.axios
+          .get("/api/bst_matching_on_product_detail", {
+            params: {
+              cut_order_product_id: row.id || 14,
+              id: this.matchedInfo.id,
+              number: this.matchedInfo.number,
+              part_name: this.matchedInfo.part_name,
+              region: this.matchedInfo.region,
+            },
+          })
+          .then((res) => {
+            this.regionMatchedList = res.data.region;
+            this.numberMatchedList = res.data.number;
+            this.partNameMatchedList = res.data.part_name;
+            this.matchedDetailList = res.data.list;
+            console.log("res :>> ", res);
+          });
+    },
+    handleSearchUnmatchedInfo() {
+      this.axios({
+        method: "get",
+        url: "/api/bst_matching_un_product_list",
+        params: {
+          id: this.info.id,
+          image_number: this.info.image_number,
+          product_name: this.info.product_name,
+        },
+      }).then((res) => {
+        if (res.code == 200) {
+          console.log("res :>> ", res);
+          res.data.list.map((v) => (v.isCurrenct = false));
+          this.unmatchedObj.urlList = res.data.list;
+          this.urlSelectList = res.data.image_number;
+          this.productList = res.data.product_name;
+        }
+      });
+    },
+    handleMatchedSet(row, index, type) {},
+  },
+  // 监听属性 类似于data概念
+  computed: {},
+  // 监控data中的数据变化
+  watch: {},
+  beforeCreate() {}, // 生命周期 - 创建之前
+  beforeMount() {}, // 生命周期 - 挂载之前
+  beforeUpdate() {}, // 生命周期 - 更新之前
+  updated() {}, // 生命周期 - 更新之后
+  beforeDestroy() {}, // 生命周期 - 销毁之前
+  destroyed() {}, // 生命周期 - 销毁完成
+  activated() {}, // 如果页面有keep-alive缓存功能,这个函数会触发
+};
+</script>
+
+<style lang="scss" scoped>
+.top-info {
+  padding: 10px;
+  font-size: 18px;
+}
+.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;
+  // 未匹配样式
+  .context-unmatched-sheet-table,
+  .context-unmatched-room-table {
+  }
+  .context-unmatched-sheet-search,
+  .context-unmatched-room-search {
+    padding: 10px 0;
+  }
+  // 匹配样式
+  .matched-block {
+    padding: 15px;
+    margin-bottom: 30px;
+    background-color: #e9ecef;
+    border-radius: 5px;
+  }
+}
+/deep/.ivu-tabs-nav-scroll {
+  display: flex;
+  justify-content: center;
+}
+/deep/.ivu-table-cell {
+  padding: 0;
+}
+</style>

+ 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://121.41.102.225:82' //测试服
+    'http://124.71.176.88:882' //测试服
     :
     process.env.NODE_ENV == 'prd_other' ?
     'http://121.37.173.82:82' //贝斯特

Some files were not shown because too many files changed in this diff