Andy 4 yıl önce
ebeveyn
işleme
62cf0f5ed4

Dosya farkı çok büyük olduğundan ihmal edildi
+ 0 - 0
dist/index.html


Dosya farkı çok büyük olduğundan ihmal edildi
+ 328 - 105
src/routerMap/index.js


+ 2 - 2
src/untils/until.js

@@ -131,7 +131,7 @@ export default {
     computedForm(array, header) {
         const result = array.reduce((pre, cur) => {
             const data = header.filter(
-                (row) => cur.is_show && row.serverName == cur.key
+                (row) => (cur.is_show && row.serverName == cur.key) && (row.title = cur.title)
             );
             if (data && data.length == 1) {
                 return pre.concat(data);
@@ -143,7 +143,7 @@ export default {
     },
     computedHeader(array, header) {
         const result = array.reduce((pre, cur) => {
-            const data = header.filter((row) => (cur.is_show && row.key == cur.key) && (row.title = cur.value));
+            const data = header.filter((row) => (cur.is_show && row.key == cur.key) && (row.title = cur.title));
             if (data && data.length == 1) {
                 return pre.concat(data);
             } else {

+ 170 - 32
src/views/BidSystem/ContractList/info.vue

@@ -11,7 +11,7 @@
           添加特殊字段
         </Button> -->
         <Button
-          @click="showSupModal = true"
+          @click="handleOpenModal"
           type="primary"
           v-show="currencyTab == 'name2'"
           style="margin-right: 10px"
@@ -257,12 +257,25 @@
           <Table
             :columns="listTableColumns"
             :data="listTableData"
-            @on-select="handleSelection"
+            @on-selection-change="handleSelection"
             :max-height="500"
             border
           >
           </Table>
         </div>
+        <div ref="footercenter" class="footer-center">
+          <Page
+            :total="total"
+            :current.sync="page_index"
+            :show-total="true"
+            :page-size="page_size"
+            :show-sizer="true"
+            :show-elevator="true"
+            @on-change="changePage"
+            @on-page-size-change="changeSize"
+          >
+          </Page>
+        </div>
       </TabPane>
     </Tabs>
     <!-- 项目辅料弹窗 -->
@@ -427,6 +440,43 @@
         <Button type="primary" @click="handleAddInputConfirm">确认</Button>
       </div>
     </Modal>
+    <!-- 批量下深化 -->
+    <Modal
+      v-model="processModal"
+      title="下深化"
+      @on-ok="handleProcess"
+      @on-cancel="processModal = false"
+    >
+      <div>
+        <div class="process_modal">
+          <span>深化人员:</span>
+          <Select v-model="process_man" style="width: 150px">
+            <Option
+              v-for="item in processManList"
+              :key="item.id"
+              :label="item.nickname"
+              :value="item.id"
+            ></Option>
+          </Select>
+        </div>
+        <div class="process_modal">
+          <span>选择时间:</span>
+          <DatePicker
+            type="date"
+            v-model="process_start_time"
+            placeholder="年/月/日"
+            style="width: 150px"
+          ></DatePicker>
+          至
+          <DatePicker
+            type="date"
+            v-model="process_end_time"
+            placeholder="年/月/日"
+            style="width: 150px"
+          ></DatePicker>
+        </div>
+      </div>
+    </Modal>
   </div>
 </template>
 
@@ -559,13 +609,23 @@ export default {
         { title: "操作", key: "set", align: "center", slot: "supSet" },
       ],
       listTableColumns: [
-        { type: "selection", align: "center", minWidth: 100, fixed: "left" },
-        { title: "区域编码", key: "num", align: "center", minWidth: 100 },
-        { title: "区域名称", key: "title", align: "center", minWidth: 100 },
-        { title: "单位", key: "unit", align: "center", minWidth: 100 },
-        { title: "工程量", key: "quantity", align: "center", minWidth: 100 },
+        { type: "selection", align: "center", minWidth: 100 },
+        { title: "区域编码", key: "area_num", align: "center", minWidth: 100 },
+        {
+          title: "区域名称",
+          key: "area_title",
+          align: "center",
+          minWidth: 100,
+        },
+        { title: "单位", key: "area_unit", align: "center", minWidth: 100 },
+        {
+          title: "工程量",
+          key: "area_quantity",
+          align: "center",
+          minWidth: 100,
+        },
         { title: "户型", key: "house_type", align: "center", minWidth: 100 },
-        { title: "备注", key: "remark", align: "center", minWidth: 100 },
+        { title: "备注", key: "area_remark", align: "center", minWidth: 100 },
         { title: "产品名称", key: "title", align: "center", minWidth: 100 },
         { title: "数量", key: "num", align: "center", minWidth: 100 },
         { title: "价格", key: "price", align: "center", minWidth: 100 },
@@ -586,7 +646,7 @@ export default {
             let url = row.url ? row.url : [];
             return h("img", {
               attrs: {
-                src: this.$store.state.ip + url[0],
+                src: this.$store.state.ip + url[0].img_url,
                 style:
                   "max-width:50px;max-height:50px;position:relative;top:3px;",
               },
@@ -614,7 +674,7 @@ export default {
         { title: "图号", key: "url_number", align: "center", minWidth: 100 },
         { title: "备注", key: "remark", align: "center", minWidth: 100 },
       ],
-      listTableData: [{}, {}, {}, {}, {}, {}, {}],
+      listTableData: [],
       supTableData: [],
       PDTTypeList: [], //产品分类列表
       PDTEditTypeList: [],
@@ -634,6 +694,15 @@ export default {
       productSpecValueList: [],
       warningList: [],
       currencyTab: "",
+      processModal: false,
+      processManList: [],
+      process_man: "",
+      process_start_time: "",
+      process_end_time: "",
+      selected: [],
+      page_index: 1,
+      page_size: 10,
+      total: 0,
     };
   },
   // 生命周期 - 创建完成(可以访问当前this实例)
@@ -658,7 +727,12 @@ export default {
       ? this.initData(this.$route.query.order_no)
       : "";
     //获取操作员
-    this.axios("/api/user").then((res) => (this.salesmanList = res.data.data));
+    this.axios("/api/user").then(
+      (res) => (
+        (this.salesmanList = res.data.data),
+        (this.processManList = res.data.data)
+      )
+    );
     //获取产品分类下拉列表
     this.axios("/api/parts_product_list").then((res) => {
       this.PDTTypeList = res.data;
@@ -835,19 +909,21 @@ export default {
             : [{ key: "", value: "" }];
           // 产品特殊字段→ 弹窗窗口,table表头
           this.formData.list.forEach((area) => {
-            area.product.forEach((pdt, index) => {
-              pdt.index = index + 1;
-              pdt.special &&
-                pdt.special.forEach((element) => {
-                  this.formData.head[3].forEach((item) => {
-                    if (element.head_id == item.id) {
-                      element = Object.assign(element, item);
-                      pdt[element.key] = element.value;
-                      this.productSpecValueList.push(element);
-                    }
+            area.product &&
+              // 要把这一块拆分到点击选择查看产品之后   todo
+              area.product.forEach((pdt, index) => {
+                pdt.index = index + 1;
+                pdt.special &&
+                  pdt.special.forEach((element) => {
+                    this.formData.head[3].forEach((item) => {
+                      if (element.head_id == item.id) {
+                        element = Object.assign(element, item);
+                        pdt[element.key] = element.value;
+                        this.productSpecValueList.push(element);
+                      }
+                    });
                   });
-                });
-            });
+              });
           });
           this.productSpecValueList = this.formData.head[3]
             ? this.formData.head[3]
@@ -1011,20 +1087,71 @@ export default {
           break;
       }
     },
+    getListData() {
+      this.axios
+        .get("/api/order_area_detail_list?", {
+          params: { order_no: this.$route.query.order_no },
+        })
+        .then((res) => {
+          console.log(res);
+          this.listTableData = res.data.data;
+          this.listTableData.map((item) => {
+            !item.url && (item.url = []);
+            res.data.imgs.map((element) => {
+              if (item.sign_id == element.sign_id) {
+                item.url.push({ img_url: element.img_url });
+              }
+            });
+          });
+          this.total = res.data.total;
+          console.log('this.listTableData :>> ', this.listTableData);
+          this.$forceUpdate()
+        });
+    },
     handleCurTabChange(name) {
       this.currencyTab = name;
       if (name == "name2" && this.listTableData.length < 1) {
-        this.axios
-          .get("/api/order_area_detail_list?", {
-            params: { order_no: this.$route.query.order_no },
-          })
-          .then((res) => {
-            console.log(res);
-          });
+        this.getListData();
       }
     },
-    handleSelection(selection, row) {
-      console.log('row :>> ', row);
+    handleSelection(selection) {
+      this.selected = selection;
+    },
+    handleOpenModal() {
+      if (this.selected.length < 1) {
+        this.$Message.warning("请选择数据");
+      } else {
+        this.processModal = true;
+      }
+    },
+    handleProcess() {
+      this.axios({
+        method: "get",
+        url: "/api/order_area_pull",
+        params: {
+          order_no: this.order_no,
+          sub_status: 1,
+          process_man: this.process_man,
+          process_start_time: this.func.replaceDateNoHMS(
+            this.process_start_time
+          ),
+          process_end_time: this.func.replaceDateNoHMS(this.process_end_time),
+        },
+      }).then((res) => {
+        if (res.code == 200) {
+          this.$Message.success(res.msg);
+        }
+      });
+    },
+    changePage(e) {
+      this.pageIndex = e;
+      this.page_index = this.pageIndex;
+      this.getListData();
+    },
+    changeSize(e) {
+      this.pageSize = e;
+      this.page_size = this.pageSize;
+      this.getListData();
     },
   },
   // 监听属性 类似于data概念
@@ -1050,6 +1177,11 @@ export default {
   height: 85%;
   padding-bottom: 20px;
 }
+.footer-center {
+  display: flex;
+  justify-content: center;
+  padding: 10px 0;
+}
 .top_search {
   padding: 20px 0;
   width: 100%;
@@ -1229,4 +1361,10 @@ export default {
 /deep/.ivu-table-fixed-body {
   padding-bottom: 20px;
 }
+.process_modal {
+  display: flex;
+  justify-content: center;
+  align-items: center;
+  padding: 10px;
+}
 </style>

+ 169 - 58
src/views/BidSystem/ContractList/list.vue

@@ -147,21 +147,25 @@
       @on-cancel="showModal = false"
     >
       <div class="modal_content">
-        <Tabs value="name1">
+        <Tabs
+          value="name1"
+          style="max-height: 700px; overflow: hidden; overflow-y: auto"
+        >
           <TabPane label="表单设置" name="name1">
             <Table
               :columns="formModalColumns"
               border
+              draggable
               :data="formModalTableData"
+              @on-drag-drop="(a, b) => onDragDrop(a, b, formModalTableData, 1)"
             ></Table>
-            <!-- @on-drag-drop="(a,b)=>onDragDrop(a,b,formModalTableData)" -->
           </TabPane>
           <TabPane label="表头设置" name="name2">
             <Table
               :columns="tableModalColumns"
               border
               draggable
-              @on-drag-drop="(a, b) => onDragDrop(a, b, tableModalTableData)"
+              @on-drag-drop="(a, b) => onDragDrop(a, b, tableModalTableData, 2)"
               :data="tableModalTableData"
             ></Table>
           </TabPane>
@@ -259,9 +263,9 @@ export default {
               {},
               params.row.state == 0
                 ? "待审核"
-                : params.row.warning_state == 1
+                : params.row.state == 1
                 ? "待拆单"
-                : params.row.warning_state == 2
+                : params.row.state == 2
                 ? "待生产"
                 : "已完成"
             ),
@@ -281,7 +285,6 @@ export default {
           slot: "set",
           fixed: "right",
           minWidth: 200,
-          fixed: "right",
         },
       ],
       tableData: [],
@@ -302,14 +305,13 @@ export default {
       showModal: false,
       currencyPageId: null,
       formModalColumns: [
-        { type: "index", minWidth: 30, align: "center" },
         {
           title: "是否展示",
           align: "center",
           key: "is_show",
           minWidth: 60,
           render: (h, params) => {
-            const { row, index } = params;
+            const { index } = params;
             const currentRow = JSON.parse(
               JSON.stringify(this.formModalTableData[index])
             );
@@ -331,19 +333,25 @@ export default {
           align: "center",
           key: "value",
           minWidth: 100,
+        },
+        {
+          title: "字段名",
+          align: "center",
+          key: "title",
+          minWidth: 100,
           render: (h, params) => {
-            const { row, index } = params;
+            const { index } = params;
             const currentRow = JSON.parse(
               JSON.stringify(this.formModalTableData[index])
             );
             return h("Input", {
               props: {
-                value: currentRow.value,
+                value: currentRow.title,
                 type: "text",
               },
               on: {
                 "on-change": (e) => {
-                  currentRow.value = e.target.value;
+                  currentRow.title = e.target.value;
                   this.formModalTableData.splice(index, 1, currentRow);
                 },
               },
@@ -351,16 +359,43 @@ export default {
           },
         },
       ],
-      formModalTableData: [],
+      formModalTableData: [
+        {
+          is_show: true,
+          key: "order_no",
+          value: "订单编号",
+          title: "订单编号",
+        },
+        {
+          is_show: true,
+          key: "residential_name",
+          value: "项目名称",
+          title: "项目名称",
+        },
+        {
+          is_show: true,
+          key: "client_name",
+          value: "客户姓名",
+          title: "客户姓名",
+        },
+        { is_show: true, key: "mobile", value: "手机号", title: "手机号" },
+        { is_show: true, key: "state", value: "订单状态", title: "订单状态" },
+        {
+          is_show: true,
+          key: "warning_state",
+          value: "紧急程度",
+          title: "紧急程度",
+        },
+      ],
+      sub_formModalTableData: [],
       tableModalColumns: [
-        { type: "index", minWidth: 30, align: "center" },
         {
           title: "是否展示",
           align: "center",
           key: "is_show",
           minWidth: 60,
           render: (h, params) => {
-            const { row, index } = params;
+            const { index } = params;
             const currentRow = JSON.parse(
               JSON.stringify(this.tableModalTableData[index])
             );
@@ -382,19 +417,26 @@ export default {
           align: "center",
           key: "value",
           minWidth: 100,
+        },
+        {
+          title: "展示名称",
+          align: "center",
+          key: "title",
+          minWidth: 100,
           render: (h, params) => {
-            const { row, index } = params;
+            const { index } = params;
             const currentRow = JSON.parse(
               JSON.stringify(this.tableModalTableData[index])
             );
             return h("Input", {
               props: {
-                value: currentRow.value,
+                value: currentRow.title,
                 type: "text",
+                disabled: currentRow.title == "全选" ? true : false,
               },
               on: {
                 "on-change": (e) => {
-                  currentRow.value = e.target.value;
+                  currentRow.title = e.target.value;
                   this.tableModalTableData.splice(index, 1, currentRow);
                 },
               },
@@ -402,21 +444,58 @@ export default {
           },
         },
       ],
+      sub_tableModalTableData: [],
       tableModalTableData: [
-        // { is_show: true, key: 'selection', value: '全选' },
-        // { is_show: true, key: 'order_no', value: '订单编号' },
-        // { is_show: true, key: 'residential_name', value: '项目名称' },
-        // { is_show: true, key: 'address', value: '详细地址' },
-        // { is_show: true, key: 'client_name', value: '客户姓名' },
-        // { is_show: true, key: 'mobile', value: '手机号' },
-        // { is_show: true, key: 'warning_state', value: '紧急程度' },
-        // { is_show: true, key: 'salesman', value: '业务员' },
-        // { is_show: true, key: 'start_time', value: '开始日期' },
-        // { is_show: true, key: 'end_time', value: '交付日期' },
-        // { is_show: true, key: 'state', value: '订单状态' },
-        // { is_show: true, key: 'crt_time', value: '下单日期' },
-        // { is_show: true, key: 'set', value: '操作' },
+        { is_show: true, key: "selection", value: "全选", title: "全选" },
+        {
+          is_show: true,
+          key: "order_no",
+          value: "订单编号",
+          title: "订单编号",
+        },
+        {
+          is_show: true,
+          key: "residential_name",
+          value: "项目名称",
+          title: "项目名称",
+        },
+        { is_show: true, key: "address", value: "详细地址", title: "详细地址" },
+        {
+          is_show: true,
+          key: "client_name",
+          value: "客户姓名",
+          title: "客户姓名",
+        },
+        { is_show: true, key: "mobile", value: "手机号", title: "手机号" },
+        {
+          is_show: true,
+          key: "warning_state",
+          value: "紧急程度",
+          title: "紧急程度",
+        },
+        { is_show: true, key: "salesman", value: "业务员", title: "业务员" },
+        {
+          is_show: true,
+          key: "start_time",
+          value: "开始日期",
+          title: "开始日期",
+        },
+        {
+          is_show: true,
+          key: "end_time",
+          value: "交付日期",
+          title: "交付日期",
+        },
+        { is_show: true, key: "state", value: "订单状态", title: "订单状态" },
+        {
+          is_show: true,
+          key: "crt_time",
+          value: "下单日期",
+          title: "下单日期",
+        },
+        { is_show: true, key: "set", value: "操作", title: "操作" },
       ],
+
       warningList: [],
     };
   },
@@ -449,12 +528,12 @@ export default {
           ),
           process_end_time: this.func.replaceDateNoHMS(this.process_end_time),
         },
-      })
-        .then((res) => {
+      }).then((res) => {
+        if (res.code == 200) {
           this.$Message.success(res.msg);
           this.getData(this.proxyObj);
-        })
-        .catch((err) => {});
+        }
+      });
     },
     //1深化  2编辑  3详情  4删除  0新增
     handleSet(row, index, type) {
@@ -492,12 +571,10 @@ export default {
                 params: {
                   order_no: row.order_no,
                 },
-              })
-                .then((res) => {
-                  this.$Message.success(res.msg);
-                  this.getData(this.proxyObj);
-                })
-                .catch((err) => {});
+              }).then((res) => {
+                this.$Message.success(res.msg);
+                this.getData(this.proxyObj);
+              });
             },
             onCancel: () => {},
           });
@@ -526,8 +603,21 @@ export default {
       this.axios("/api/order_area", { params: row }).then((res) => {
         this.loading = false;
         this.tableData = res.data.data;
-        this.tableModalTableData = res.data.tableSet.tableSet || [];
         this.total = res.data.total;
+        this.tableModalTableData =
+          res.data.tableSet.tableSet.length < 1
+            ? this.tableModalTableData
+            : res.data.tableSet.tableSet;
+        this.formModalTableData =
+          res.data.tableSet.formSet.length < 1
+            ? this.formModalTableData
+            : res.data.tableSet.formSet;
+        this.sub_formModalTableData = JSON.parse(
+          JSON.stringify(this.formModalTableData)
+        );
+        this.sub_tableModalTableData = JSON.parse(
+          JSON.stringify(this.tableModalTableData)
+        );
       });
     },
     setupTableHeader() {
@@ -567,7 +657,10 @@ export default {
     selectTable(e) {
       this.selects = e;
     },
-    onDragDrop(a, b, table) {
+    onDragDrop(a, b, table, type) {
+      if (type == 2 && (a == 0 || b == 0)) {
+        return this.$Message.warning("全选位置不可变");
+      }
       table.splice(b, 0, ...table.splice(a, 1));
     },
     handleModalOk() {
@@ -599,15 +692,21 @@ export default {
   computed: {
     ...mapState(["persimissionData"]),
     computedTable() {
-      if (this.tableModalTableData.length < 1) {
+      if (this.sub_tableModalTableData.length < 1) {
         return this.tableColums;
       }
       return this.func.computedHeader(
-        this.tableModalTableData,
+        this.sub_tableModalTableData,
         this.tableColums
       );
     },
     set_list() {
+      if (this.sub_formModalTableData.length < 1) {
+        this.list;
+      }
+      return this.func.computedForm(this.sub_formModalTableData, this.list);
+    },
+    list() {
       return [
         {
           title: "订单编号",
@@ -619,28 +718,28 @@ export default {
         {
           title: "项目名称",
           name: "Input",
-          placeholder: "请输入",
+          placeholder: "请输入项目名称",
           value: "",
           serverName: "residential_name",
         },
         {
-          title: "客户昵称",
+          title: "客户姓名",
           name: "Input",
-          placeholder: "请输入",
+          placeholder: "请输入客户姓名",
           value: "",
           serverName: "client_name",
         },
         {
           title: "手机号",
           name: "Input",
-          placeholder: "请输入",
+          placeholder: "请输入手机号",
           value: "",
           serverName: "mobile",
         },
         {
           title: "订单状态",
           name: "Select",
-          placeholder: "请选择",
+          placeholder: "请选择订单状态",
           serverName: "state",
           value: "",
           option: [
@@ -650,18 +749,11 @@ export default {
             { label: "已完成", value: 3 },
           ],
         },
-        // {
-        //   title: '订单类型', name: 'Select', placeholder: '请选择', serverName: 'type', value: '',
-        //   option: [
-        //     { label: '工装', value: 1 },
-        //     { label: '家装', value: 2 },
-        //   ]
-        // },
         {
           title: "紧急程度",
           name: "Select",
           serverName: "warning_state",
-          placeholder: "请选择",
+          placeholder: "请选择紧急程度",
           value: "",
           optionName: "title",
           optionValue: "id",
@@ -670,6 +762,17 @@ export default {
       ];
     },
   },
+  beforeRouteLeave(to, from, next) {
+    if (
+      to.path == "/cms/BidSystem/ContractList/edit" ||
+      to.path == "/cms/BidSystem/ContractList/info"
+    ) {
+      this.$route.meta.keepAlive = true;
+    } else {
+      this.$route.meta.keepAlive = false;
+    }
+    next();
+  },
   // 监控data中的数据变化
   watch: {},
   beforeCreate() {}, // 生命周期 - 创建之前
@@ -682,7 +785,7 @@ export default {
 };
 </script>
 
-<style lang='scss' scoped>
+<style lang="scss" scoped>
 .pageSlotStyle {
   display: flex;
   justify-content: center;
@@ -694,4 +797,12 @@ export default {
   align-items: center;
   padding: 10px;
 }
+.modal_content {
+  display: flex;
+  justify-content: center;
+}
+/deep/.ivu-tabs-nav-scroll {
+  display: flex;
+  justify-content: center;
+}
 </style>

+ 1405 - 0
src/views/BidSystem/DeepeningOrder/info.vue

@@ -0,0 +1,1405 @@
+<template>
+  <div class="BidSystemDeepeningOrderDetail">
+    <Toptitle title="深化单详情">
+      <slot name="titleButton">
+        <Button @click="goback()" type="primary" style="margin-right: 10px"
+          >完成</Button
+        >
+        <Button
+          @click="showSupModal = true"
+          v-show="!isChecked"
+          type="primary"
+          style="margin-right: 10px"
+          >项目辅料</Button
+        >
+        <Button
+          @click="handleOpenModal"
+          type="primary"
+          v-show="currencyTab == 'name2'"
+          style="margin-right: 10px"
+          >批量下拆单</Button
+        >
+        <Button
+          @click="goback()"
+          type="primary"
+          ghost
+          style="margin-right: 10px"
+          >返回</Button
+        >
+      </slot>
+    </Toptitle>
+    <Tabs value="name1" @on-click="handleCurTabChange">
+      <TabPane
+        label="块状形式"
+        name="name1"
+        style="overflow: hidden; overflow-y: auto"
+      >
+        <div class="top_search">
+          <div><span>订单号:</span>{{ formData.order_no }}</div>
+          <div><span>小区名称:</span>{{ formData.residential_name }}</div>
+          <div><span>客户姓名:</span>{{ formData.client_name }}</div>
+          <div>
+            <span>紧急程度:</span
+            ><span
+              v-for="_item in warningList"
+              :key="_item.id"
+              v-show="_item.id == formData.warning_state"
+              >{{ _item.title }}</span
+            >
+          </div>
+          <div>
+            <span>收款:</span
+            >{{ formData.pay_state == 1 ? "已收款" : "未收款" }}
+          </div>
+          <div><span>详细地址:</span>{{ formData.address }}</div>
+          <div><span>手机号:</span>{{ formData.mobile }}</div>
+          <div>
+            <span>开始日期:</span>{{ func.replaceDate(formData.start_time) }}
+          </div>
+          <div>
+            <span>交付日期:</span>{{ func.replaceDate(formData.end_time) }}
+          </div>
+          <div>
+            <span>业务员:</span>
+            <span
+              v-for="item in salesmanList"
+              :key="item.id"
+              v-show="formData.salesman == item.id"
+              >{{ item.nickname }}</span
+            >
+          </div>
+          <div>
+            <span>订单类型:</span
+            >{{ formData.renovation_type == 1 ? "工装" : "家装" }}
+          </div>
+          <div v-for="item in formData.special" :key="item.id">
+            <span>{{ item.key + ":" }}</span>
+            {{ item.value }}
+          </div>
+          <div><span>备注:</span>{{ formData.remark }}</div>
+        </div>
+        <div
+          class="table-data"
+          v-for="(item, index) in formData.list"
+          :key="item.id"
+        >
+          <div class="addAreaForm">
+            <div class="addFormInfo">
+              <div><span>区域编码:</span>{{ item.num }}</div>
+              <div><span>区域名称:</span>{{ item.title }}</div>
+              <div><span>单位:</span>{{ item.unit }}</div>
+              <div><span>工程量:</span>{{ item.quantity }}</div>
+              <div><span>户型:</span>{{ item.house_type }}</div>
+              <div v-for="ele in item.special" :key="ele.id">
+                <span>{{ ele.key }}:</span>{{ ele.value }}
+              </div>
+              <div><span>备注:</span>{{ item.remark }}</div>
+            </div>
+            <div class="addAreaTable">
+              <Table
+                :columns="tableColumns"
+                max-height="500"
+                :data="item.product"
+                border
+              >
+                <template slot="urlSet" slot-scope="{ row }">
+                  <span
+                    class="urlSetStyle"
+                    v-for="(item, index) in row.url"
+                    :key="index"
+                  >
+                    <img
+                      :src="$store.state.ip + item"
+                      @click="(e) => handleImgClick(e, row)"
+                      alt=""
+                    />
+                  </span>
+                </template>
+                <template slot="statusSlot" slot-scope="{ row }">
+                  {{ row.status == 0 ? "已完成" : "未完成" }}
+                </template>
+                <template slot="set" slot-scope="{ row, index }">
+                  <a
+                    style="margin: 0 5px"
+                    @click="handleSet(row, index, 2, item)"
+                    >详情</a
+                  >
+                </template>
+              </Table>
+            </div>
+          </div>
+        </div>
+      </TabPane>
+      <TabPane
+        label="列表形式"
+        name="name2"
+        style="overflow: hidden; overflow-y: auto"
+      >
+        <div class="top_search">
+          <Form :model="formData" :label-width="100" class="top_search_form">
+            <FormItem label="订单号:">
+              {{ formData.order_no }}
+            </FormItem>
+            <FormItem label="项目名称:">
+              {{ formData.residential_name }}
+            </FormItem>
+            <FormItem label="客户姓名:">
+              {{ formData.client_name }}
+            </FormItem>
+            <FormItem label="紧急程度:">
+              <span
+                v-for="_item in warningList"
+                :key="_item.id"
+                v-show="_item.id == formData.warning_state"
+                :style="{ color: _item.color }"
+                >{{ _item.title }}
+              </span>
+            </FormItem>
+            <FormItem label="项目定金:">
+              {{ formData.front_money }}
+              <!-- <RadioGroup v-model="formData.pay_state"
+                      size="small">
+            <Radio :label=0
+                   :disabled="isChecked">未收款</Radio>
+            <Radio :label=1
+                   :disabled="isChecked">已收款</Radio>
+          </RadioGroup> -->
+            </FormItem>
+            <FormItem label="详细地址:">
+              {{ formData.address }}
+            </FormItem>
+            <FormItem label="手机号:">
+              {{ formData.mobile }}
+            </FormItem>
+            <FormItem label="开始日期:">
+              {{
+                formData.start_time
+                  ? func.replaceDateNoHMS(formData.start_time)
+                  : ""
+              }}
+            </FormItem>
+            <FormItem label="结束日期:">
+              {{
+                formData.end_time
+                  ? func.replaceDateNoHMS(formData.end_time)
+                  : ""
+              }}
+            </FormItem>
+            <FormItem label="业务员:">
+              <span
+                v-for="_item in salesmanList"
+                :key="_item.id"
+                v-show="_item.id == formData.salesman"
+                :style="{ color: _item.color }"
+                >{{ _item.nickname }}
+              </span>
+            </FormItem>
+            <!-- <FormItem label="订单类型:">
+          <Select v-model="formData.type"
+                  :disabled="isChecked"
+                  size="small"
+                  style="width:200px">
+            <Option label='工装'
+                    :value=1></Option>
+            <Option label='家装'
+                    :value=2></Option>
+          </Select>
+        </FormItem> -->
+            <FormItem
+              v-for="item in formData.special"
+              :key="item.id"
+              :label="item.key + ':'"
+            >
+              {{ item.value }}
+            </FormItem>
+            <FormItem label="备注:">
+              {{ formData.remark }}
+            </FormItem>
+          </Form>
+        </div>
+        <div>
+          <Table
+            :columns="listTableColumns"
+            :data="listTableData"
+            @on-selection-change="handleSelection"
+            :max-height="500"
+            border
+          >
+          </Table>
+        </div>
+      </TabPane>
+    </Tabs>
+    <!-- 项目辅料弹窗 -->
+    <Modal title="项目辅料" v-model="showSupModal" :width="400">
+      <div>
+        <div class="supModalBtn">
+          <Button @click="handleAddSup" type="primary">新增</Button>
+        </div>
+        <Table :columns="supTableColumns" :data="supTableData" border>
+          <template slot="combine" slot-scope="{ row }">
+            <Select v-model="row.order_no" size="small">
+              <Option
+                v-for="item in combineList"
+                :value="item.id"
+                :key="item.id"
+                >{{ item.title }}</Option
+              >
+            </Select>
+          </template>
+          <template slot="supSet" slot-scope="{ row, index }">
+            <a
+              style="margin: 0 5px; color: red"
+              @click="handleSupSet(row, index)"
+              >删除</a
+            >
+          </template>
+        </Table>
+      </div>
+      <div class="modal-footer" slot="footer">
+        <Button @click="showSupModal = false">取消</Button>
+        <Button type="primary" @click="showSupModal = false">确认</Button>
+      </div>
+    </Modal>
+    <!-- 新增产品弹窗 -->
+    <Modal
+      title="新增产品"
+      v-model="showPDTModal"
+      :mask-closable="false"
+      class="addPDTFormModal"
+      :width="1000"
+    >
+      <div
+        class="addPDTForm"
+        v-for="(item, index) in tempPDTList"
+        :key="item.id"
+      >
+        <Form :label-width="100" :model="item">
+          <FormItem label="产品名称:">
+            <Input
+              type="text"
+              size="small"
+              placeholder="请输入"
+              v-model="item.title"
+              style="width: 120px"
+            />
+          </FormItem>
+          <FormItem label="数量">
+            <Input
+              type="text"
+              size="small"
+              v-model="item.num"
+              placeholder="请输入"
+              style="width: 120px"
+            />
+          </FormItem>
+          <FormItem label="图号:">
+            <Input
+              type="text"
+              size="small"
+              placeholder="请输入"
+              v-model="item.url_number"
+              style="width: 120px"
+            />
+          </FormItem>
+          <FormItem label="图纸">
+            <div class="product-img">
+              <div class="product-add">
+                <div
+                  class="items"
+                  v-for="(_item, _index) of item.url"
+                  :key="_index"
+                >
+                  <img
+                    @click="looks(_item)"
+                    :src="$store.state.ip + _item"
+                    alt=""
+                  />
+                  <Icon
+                    size="20"
+                    @click="delItems(_index, item.url)"
+                    class="delete-img"
+                    type="ios-close-circle"
+                  />
+                </div>
+
+                <div class="add-items">
+                  <div class="_item">
+                    <Icon size="50" type="ios-add" />
+                  </div>
+                  <input
+                    @change="changeIpt($event, item.url)"
+                    type="file"
+                    class="ipt"
+                  />
+                </div>
+              </div>
+            </div>
+          </FormItem>
+          <FormItem label="产品分类">
+            <Select
+              v-model="item.type_id"
+              placeholder="请选择"
+              style="width: 120px"
+              label-in-value
+              @on-change="(e) => hanndleAddPDTTypeChange(item, e)"
+              size="small"
+            >
+              <Option
+                v-for="item in PDTTypeList"
+                :value="item.value"
+                :key="item.value"
+                >{{ item.label }}</Option
+              >
+            </Select>
+          </FormItem>
+          <div
+            style="display: contents"
+            v-for="el in item.tempPDTTypeList"
+            :key="el"
+          >
+            <FormItem
+              :label="_item.title"
+              v-for="_item in item.tempMeasureList"
+              v-show="el == _item.id"
+              :key="_item.id"
+            >
+              <Input
+                type="text"
+                size="small"
+                v-model="_item.value"
+                placeholder="请输入"
+                style="width: 120px"
+              />
+            </FormItem>
+          </div>
+          <FormItem label="价格:">
+            <Input
+              type="text"
+              size="small"
+              v-model="item.price"
+              placeholder="请输入备注"
+              style="width: 120px"
+            />
+          </FormItem>
+          <FormItem label="备注:">
+            <Input
+              type="text"
+              size="small"
+              v-model="item.remark"
+              placeholder="请输入备注"
+              style="width: 120px"
+            />
+          </FormItem>
+          <FormItem label="工艺属性">
+            <Button
+              @click="handleProcessAdd(item, index)"
+              size="small"
+              type="text"
+              style="color: #57a3f3"
+              >添加属性</Button
+            >
+          </FormItem>
+        </Form>
+        <div class="addPDTProcess">
+          <div
+            v-for="(_item, _index) in item.addPDTProcessAttrList"
+            :key="_item.id"
+          >
+            <span>属性{{ _index + 1 }}</span>
+            <Select
+              :value="_item.id"
+              size="small"
+              @on-change="
+                (value) => handleAddPDTAttrChange(_item, _index, value)
+              "
+              style="width: 80px"
+            >
+              <Option
+                v-for="__item in PDTProcessAttrList"
+                :key="__item.id"
+                :value="__item.id"
+                :label="__item.title"
+              >
+              </Option>
+            </Select>
+            <Select
+              :value="_item.type_id"
+              filterable
+              clearable
+              label-in-value
+              @on-change="
+                (value) => handleAddPDTAttrDetailChange(_item, _index, value)
+              "
+              size="small"
+              style="width: 80px"
+            >
+              <Option
+                v-for="__item in _item.PDTProcessAttrDetailList"
+                :key="__item.id"
+                :value="__item.id"
+                :label="__item.title"
+              />
+            </Select>
+            <div class="dele_icon">
+              <Icon
+                v-show="item.addPDTProcessAttrList.length != 1"
+                type="ios-trash"
+                @click="
+                  handleAddPDTDetailDele(item.addPDTProcessAttrList, _index)
+                "
+              />
+            </div>
+          </div>
+        </div>
+        <div class="addPDTBtn">
+          <Button
+            type="primary"
+            v-show="false"
+            style="margin-right: 10px"
+            @click="handleAddPDTCopy(item, index)"
+            >复制</Button
+          >
+          <Button
+            type="primary"
+            v-show="false"
+            style="margin-right: 10px"
+            @click="handleAddPDTAdd(index)"
+            >添加</Button
+          >
+          <Button
+            type="error"
+            v-show="false"
+            style="margin-right: 10px"
+            @click="handleAddPDTDele(index)"
+            >删除</Button
+          >
+        </div>
+      </div>
+      <div class="modal-footer" slot="footer">
+        <Button @click="showPDTModal = false">取消</Button>
+        <Button type="primary" @click="handleAddPDTConfirm">确认</Button>
+      </div>
+    </Modal>
+    <!-- 批量下深化 -->
+    <Modal
+      v-model="processModal"
+      title="下深化"
+      @on-ok="handleProcess"
+      @on-cancel="processModal = false"
+    >
+      <div>
+        <div class="process_modal">
+          <span>深化人员:</span>
+          <Select v-model="process_man" style="width: 150px">
+            <Option
+              v-for="item in processManList"
+              :key="item.id"
+              :label="item.nickname"
+              :value="item.id"
+            ></Option>
+          </Select>
+        </div>
+        <div class="process_modal">
+          <span>选择时间:</span>
+          <DatePicker
+            type="date"
+            v-model="process_start_time"
+            placeholder="年/月/日"
+            style="width: 150px"
+          ></DatePicker>
+          至
+          <DatePicker
+            type="date"
+            v-model="process_end_time"
+            placeholder="年/月/日"
+            style="width: 150px"
+          ></DatePicker>
+        </div>
+      </div>
+    </Modal>
+  </div>
+</template>
+
+<script>
+// 这里可以导入其他文件(比如:组件,工具js,第三方插件js,json文件,图片文件等等)
+// 例如:import 《组件名称》 from '《组件路径》';
+import UploadImg from "./uploadImg/index.vue";
+export default {
+  name: "",
+  components: {
+    UploadImg,
+  },
+  props: {},
+  // import引入的组件需要注入到对象中才能使用
+  data() {
+    // 这里存放数据
+    return {
+      headers: { Authorization: localStorage.getItem("token") },
+      salesmanList: [],
+      PDTTypeList: [],
+      combineList: [],
+      tempPDTList: [
+        {
+          url: [],
+          process_property: "",
+          process_properties: [],
+          tempPDTTypeList: [],
+          measure: "",
+          //新增产品工艺属性列表
+          addPDTProcessAttrList: [
+            {
+              showValue: "",
+              showId: "",
+              PDTProcessAttrDetailList: [],
+            },
+          ],
+        },
+      ],
+      supTableData: [{}],
+      showPDTModal: false,
+      showSupModal: false,
+      formData: {
+        order_no: "",
+        residential_name: "",
+        client_name: "",
+        address: "",
+        mobile: "",
+        pay_state: "",
+        warning_state: "",
+        salesman: "",
+        remark: "",
+        start_time: "",
+        end_time: "",
+        type: "",
+        //区域列表
+        list: [
+          {
+            areaIndex: 1,
+            num: "",
+            title: "",
+            unit: "",
+            quantity: "",
+            house_type: "",
+            remark: "",
+            order_no: "",
+            product: [
+              // {
+              //   title:'',
+              //   num:'',
+              //   measure:'',
+              //   process_property:'',
+              //   url:'',
+              //   url_number:'',
+              //   remark:''
+              // }
+            ],
+          },
+          // {
+          //   areaIndex: 2,
+          //   num: '',
+          //   title: '',
+          //   unit: '',
+          //   quantity: '',
+          //   house_type: '',
+          //   remark: '',
+          //   order_no: '',
+          //   product: []
+          // },
+        ],
+      },
+      tableColumns: [
+        { title: "序号", key: "index", align: "center", minWidth: 80 },
+        { title: "产品名称", key: "title", align: "center", minWidth: 140 },
+        { title: "数量", key: "num", align: "center", minWidth: 80 },
+        { title: "价格", key: "price", align: "center", minWidth: 80 },
+        { title: "规格", key: "measure", align: "center", minWidth: 140 },
+        {
+          title: "工艺属性",
+          key: "process_property",
+          align: "center",
+          minWidth: 140,
+          tooltip: true,
+        },
+        {
+          title: "图纸",
+          align: "center",
+          key: "url",
+          minWidth: 80,
+          slot: "urlSet",
+          // render: (h, params) => {
+          //   const { row } = params
+          //   return h('div', row.url.map((item, index) => {
+          //     return h('img', {
+          //       attrs: {
+          //         src: this.$store.state.ip + item,
+          //         style: 'max-width:50px;max-height:50px;position:relative;top:3px;'
+          //       },
+          //       on: {
+          //         click: (e) => {
+          //           // this.axios('/api/orders_img', { params: { id: row.id, type: 1 } }).then(res => {
+          //           // if (res.code == 200) {
+          //           // row.imgs = res.data
+          //           let list = []
+          //           row.url.forEach(el => {
+          //             list.push({ 'img_url': el })
+          //           });
+          //           this.$previewImg({
+          //             list,
+          //             baseUrl: this.$store.state.ip,
+          //             baseImgField: 'img_url',
+          //             baseTitleField: ''
+          //           })
+          //           // }
+          //           // })
+          //         }
+          //       }
+          //     })
+          //   }))
+          // }
+        },
+        { title: "左右式", key: "url_number", align: "center", minWidth: 90 },
+        { title: "图号", key: "url_number", align: "center", minWidth: 90 },
+        // { title: '型号', key: 'model', align: 'center', minWidth: 80 },
+        { title: "备注", key: "remark", align: "center", minWidth: 80 },
+        {
+          title: "状态",
+          key: "status",
+          align: "center",
+          minWidth: 80,
+          slot: "statusSlot",
+        },
+        {
+          title: "操作",
+          key: "remark",
+          align: "center",
+          width: "120",
+          slot: "set",
+        },
+      ],
+      productDetail: {},
+      supTableColumns: [
+        { title: "序号", key: "name", align: "center" },
+        { title: "组合名称", key: "name", align: "center", slot: "combine" },
+        { title: "操作", key: "name", align: "center", slot: "supSet" },
+      ],
+      listTableColumns: [
+        { type: "selection", align: "center", minWidth: 100 },
+        { title: "区域编码", key: "num", align: "center", minWidth: 100 },
+        { title: "区域名称", key: "title", align: "center", minWidth: 100 },
+        { title: "单位", key: "unit", align: "center", minWidth: 100 },
+        { title: "工程量", key: "quantity", align: "center", minWidth: 100 },
+        { title: "户型", key: "house_type", align: "center", minWidth: 100 },
+        { title: "备注", key: "remark", align: "center", minWidth: 100 },
+        { title: "产品名称", key: "title", align: "center", minWidth: 100 },
+        { title: "数量", key: "num", align: "center", minWidth: 100 },
+        { title: "价格", key: "price", align: "center", minWidth: 100 },
+        { title: "规格", key: "measure", align: "center", minWidth: 100 },
+        {
+          title: "工艺属性",
+          key: "process_property",
+          align: "center",
+          minWidth: 100,
+        },
+        {
+          title: "图纸",
+          key: "url",
+          align: "center",
+          minWidth: 100,
+          render: (h, params) => {
+            const { row } = params;
+            let url = row.url ? row.url : [];
+            return h("img", {
+              attrs: {
+                src: this.$store.state.ip + url[0],
+                style:
+                  "max-width:50px;max-height:50px;position:relative;top:3px;",
+              },
+              on: {
+                click: (e) => {
+                  // this.axios('/api/orders_img', { params: { id: row.id, type: 1 } }).then(res => {
+                  // row.imgs = res.data
+                  let list = [];
+                  row.url.forEach((el) => {
+                    list.push({ img_url: el });
+                  });
+                  this.$previewImg({
+                    list,
+                    baseUrl: this.$store.state.ip,
+                    baseImgField: "img_url",
+                    baseTitleField: "",
+                  });
+                  // })
+                },
+              },
+            });
+          },
+        },
+        { title: "左右式", key: "title", align: "center", minWidth: 100 },
+        { title: "图号", key: "url_number", align: "center", minWidth: 100 },
+        { title: "备注", key: "remark", align: "center", minWidth: 100 },
+      ],
+      listTableData: [{}, {}, {}, {}, {}, {}, {}],
+      //是否查看
+      isChecked: false,
+      PDTProcessAttrList: [],
+      // 测量字段列表
+      measureList: [],
+      order_area_id: "",
+      uploadData: {
+        order_no: this.$route.query.order_no,
+        title: "",
+      },
+      contactSpecValueList: [{ key: "", value: "" }],
+      areaSpecValueList: [{ key: "", value: "" }],
+      productSpecValueList: [{ key: "", value: "" }],
+      processManList: [],
+      process_man: "",
+      process_start_time: "",
+      process_end_time: "",
+      warningList: [],
+      selected: [],
+      processModal: false,
+      currencyTab: "",
+    };
+  },
+  // 生命周期 - 创建完成(可以访问当前this实例)
+  created() {
+    //2编辑 3详情 4变更 5变更记录
+    this.$route.query.type == 3 ? (this.isChecked = true) : "";
+    this.$route.query.order_no
+      ? (this.formData.order_no = this.$route.query.order_no)
+      : "";
+    // 获取工艺属性
+    this.axios("/api/basics_properties_index").then((res) => {
+      this.PDTProcessAttrList = res.data.data;
+    });
+    // 获取组合管理
+    this.axios("/api/material_combination").then((res) => {
+      this.combineList = res.data.data;
+    });
+    // 获取紧急程度
+    this.axios.get("/api/warning_list").then((res) => {
+      this.warningList = res.data.data;
+    });
+  },
+  // 生命周期 - 挂载完成(可以访问DOM元素)
+  mounted() {
+    this.axios("/api/user").then(
+      (res) => (
+        (this.salesmanList = res.data.data),
+        (this.processManList = res.data.data)
+      )
+    );
+    this.axios("/api/parts_product_list").then((res) => {
+      this.PDTTypeList = res.data;
+      this.PDTTypeList.forEach((el) => {
+        el.value = el.id;
+        el.label = el.title;
+      });
+    });
+    //获取基础测量字段列表
+    this.axios("/api/basics_measure_index").then((res) => {
+      this.measureList = res.data.data;
+    });
+    this.initData(this.formData.order_no);
+  },
+  methods: {
+    async handleBeforeUpload(row) {
+      // row.name
+      console.log("row :>> ", row);
+      this.uploadData.title = row.name.substring(0, row.name.indexOf("."));
+      return true;
+    },
+    onProgress(e) {
+      console.log(e);
+    },
+    initData(order_no) {
+      this.axios({
+        method: "get",
+        url: "/api/order_area_list",
+        params: {
+          order_no,
+        },
+      })
+        .then((res) => {
+          this.formData = res.data;
+          this.formData.list.forEach((element, index) => {
+            element.product.forEach((el, i) => {
+              el.index = i + 1;
+              el.measures.forEach((item) => {
+                el[item.e_title] = item.value;
+              });
+            });
+          });
+
+          this.formData.list.forEach((element) => {
+            // 产品特殊字段→ 弹窗窗口,table表头
+            let arr = [];
+            res.data.head[3].length > 0 &&
+              res.data.head[3].forEach((item) => {
+                arr.push({
+                  title: item.key,
+                  key: item.key,
+                  align: "center",
+                  minWidth: 80,
+                });
+              });
+            this.tableColumns = [
+              { title: "序号", key: "index", align: "center", minWidth: 80 },
+              {
+                title: "产品名称",
+                key: "title",
+                align: "center",
+                tooltip: true,
+                minWidth: 100,
+              },
+              { title: "数量", key: "num", align: "center", minWidth: 80 },
+              { title: "价格", key: "price", align: "center", minWidth: 80 },
+              {
+                title: "规格",
+                key: "measure",
+                align: "center",
+                tooltip: true,
+                minWidth: 140,
+              },
+              {
+                title: "工艺属性",
+                key: "process_property",
+                align: "center",
+                tooltip: true,
+                minWidth: 120,
+              },
+              {
+                title: "图纸",
+                align: "center",
+                key: "url",
+                minWidth: 100,
+                render: (h, params) => {
+                  const { row } = params;
+                  let url = row.url ? row.url : [];
+                  return h("img", {
+                    attrs: {
+                      src: this.$store.state.ip + url[0],
+                      style:
+                        "max-width:50px;max-height:50px;position:relative;top:3px;",
+                    },
+                    on: {
+                      click: (e) => {
+                        // this.axios('/api/orders_img', { params: { id: row.id, type: 1 } }).then(res => {
+                        // row.imgs = res.data
+                        let list = [];
+                        row.url.forEach((el) => {
+                          list.push({ img_url: el });
+                        });
+                        this.$previewImg({
+                          list,
+                          baseUrl: this.$store.state.ip,
+                          baseImgField: "img_url",
+                          baseTitleField: "",
+                        });
+                        // })
+                      },
+                    },
+                  });
+                },
+              },
+              {
+                title: "图号",
+                key: "url_number",
+                align: "center",
+                tooltip: true,
+                minWidth: 80,
+              },
+              ...arr,
+              { title: "备注", key: "remark", align: "center", minWidth: 80 },
+              {
+                title: "操作",
+                key: "remark",
+                align: "center",
+                slot: "set",
+                minWidth: 120,
+                fixed: "right",
+              },
+            ];
+          });
+          // 订单特殊字段
+          this.formData.special &&
+            this.formData.special.forEach((element) => {
+              this.formData.head[1].forEach((item) => {
+                if (element.head_id == item.id) {
+                  element = Object.assign(element, item);
+                }
+              });
+            });
+          this.contactForm = this.formData.head[1]
+            ? this.formData.head[1]
+            : [{ key: "", value: "" }];
+          // 区域特殊字段
+          this.formData.list.forEach((element) => {
+            element.special &&
+              element.special.forEach((ele) => {
+                this.formData.head[2].forEach((item) => {
+                  if (ele.head_id == item.id) {
+                    ele = Object.assign(ele, item);
+                  }
+                });
+              });
+          });
+          this.areaSpecValueList = this.formData.head[2]
+            ? this.formData.head[2]
+            : [{ key: "", value: "" }];
+          // 产品特殊字段→ 弹窗窗口,table表头
+          this.formData.list.forEach((area) => {
+            area.product.forEach((pdt) => {
+              pdt.special &&
+                pdt.special.forEach((element) => {
+                  this.formData.head[3].forEach((item) => {
+                    if (element.head_id == item.id) {
+                      element = Object.assign(element, item);
+                      pdt[element.key] = element.value;
+                    }
+                  });
+                });
+            });
+          });
+          this.productSpecValueList = this.formData.head[3]
+            ? this.formData.head[3]
+            : [{ key: "", value: "" }];
+        })
+        .catch((err) => {});
+    },
+    goback() {
+      this.$router.go(-1);
+    },
+    handleSelection(selection) {
+      this.selected = selection;
+    },
+    postData() {
+      this.axios({
+        method: "post",
+        url: "/api/order_area_product_save",
+        data: {
+          order_no: this.formData.order_no,
+          order_area_id: "",
+          order_area_product_id: "",
+          list: "",
+        },
+      })
+        .then((res) => {
+          this.$Message.success(res.msg);
+        })
+        .catch((err) => {});
+    },
+    // 1深化 2详情
+    handleSet(row, index, type, item) {
+      if (type == 3) {
+        this.$Modal.confirm({
+          title: "确认删除?",
+          content: "此操作确认后不可恢复,请确认!",
+          onOk: () => {
+            this.axios({
+              method: "post",
+              url: "/api/order_area_deep_del",
+              data: {
+                id: row.id,
+              },
+            })
+              .then((res) => {
+                this.$Message.success(res.msg);
+                this.initData(this.formData.order_no);
+              })
+              .catch((err) => {});
+          },
+          onCancel: () => {},
+        });
+      } else {
+        this.$router.push({
+          path: "/cms/BidSystem/DeepeningOrder/edit",
+          query: {
+            type,
+            order_no: this.formData.order_no,
+            order_area_id: item.id,
+            order_area_product_id: row.id,
+          },
+        });
+      }
+    },
+    // 删除工艺属性
+    handleAddPDTDetailDele(arr, index) {
+      arr.splice(index, 1);
+    },
+    //新增产品复制
+    handleAddPDTCopy(item, index) {
+      const temp = JSON.parse(JSON.stringify(item));
+      this.tempPDTList.splice(index + 1, 0, temp);
+    },
+    //新增产品添加
+    handleAddPDTAdd(index) {
+      this.tempPDTList.splice(index + 1, 0, { addPDTProcessAttrList: [] });
+    },
+    //新增产品删除
+    handleAddPDTDele(index) {
+      this.tempPDTList.splice(index, 1);
+    },
+    //新增产品→新增区域确认
+    handleAddPDTConfirm() {
+      this.tempPDTList.forEach((element) => {
+        // element.measure = `${element.length ? element.length : 0}*${element.width ? element.width : 0}*${element.height ? element.height : 0}`
+        element.addPDTProcessAttrList.forEach((el, i) => {
+          if (i == element.tempMeasureList.length - 1) {
+            element.process_property += el.showValue;
+            element.process_properties += el.showId;
+          } else {
+            element.process_property += el.showValue + ",";
+            element.process_properties += el.showId + ",";
+          }
+        });
+        element.tempMeasureList.forEach((el, i) => {
+          if (i == element.tempMeasureList.length - 1) {
+            element.measure += `${el.e_title}${el.value}`;
+          } else {
+            element.measure += `${el.e_title}${el.value}*`;
+          }
+        });
+      });
+      this.axios({
+        method: "post",
+        url: "/api/order_area_deep_add",
+        data: {
+          order_no: this.formData.order_no,
+          order_area_id: this.order_area_id,
+          ...this.tempPDTList[0],
+        },
+      })
+        .then((res) => {
+          this.$Message.success(res.msg);
+          this.showPDTModal = false;
+          this.initData(this.formData.order_no);
+        })
+        .catch((err) => {});
+      // this.tempPDTList = [
+      //   {
+      //     addPDTProcessAttrList:[{}]
+      //   }
+      // ]
+    },
+    //项目辅料新增
+    handleAddSup() {
+      this.supTableData.push({ index: "", title: "" });
+      this.supTableData.forEach((element, index) => {
+        element.index = index + 1;
+      });
+    },
+    //项目辅料删除
+    handleSupSet(row, index) {
+      this.supTableData.splice(index, 1);
+    },
+    //添加工艺属性
+    handleProcessAdd(item, index) {
+      this.tempPDTList[index].addPDTProcessAttrList.push({
+        PDTProcessAttrDetailList: [],
+      });
+    },
+    //选择工艺属性
+    handleAddPDTAttrChange(item, index, value) {
+      this.axios("/api/properties_index", { params: { id: value } }).then(
+        (res) => {
+          item.PDTProcessAttrDetailList = res.data.data;
+        }
+      );
+    },
+    //选择工艺属性细节
+    handleAddPDTAttrDetailChange(item, index, value) {
+      item.showValue = value.label;
+      item.showId = value.value;
+    },
+    looks(img) {
+      const array = [{ img_url: img }];
+      this.$previewImg({
+        list: array,
+        baseUrl: this.$store.state.ip,
+        baseImgField: "img_url",
+        baseTitleField: "",
+      });
+    },
+    delItems(n, arr) {
+      arr.splice(n, 1);
+    },
+    changeIpt(e, row) {
+      let file = e.target.files[0];
+      this.postImg(file, row);
+      e.target.value = null;
+    },
+    postImg(file, row) {
+      let formData = new FormData();
+      formData.append("file", file);
+      this.axios.post("/api/upload_pic", formData).then((res) => {
+        row.push(res.data.url);
+      });
+    },
+    // 产品分类选择→对应不同测量字段
+    hanndleAddPDTTypeChange(item, e) {
+      this.axios("/api/basics_product_index", {
+        params: { title: e.label },
+      }).then((res) => {
+        item.tempPDTTypeList = res.data.data[0].measure_id.split(",");
+        item.tempMeasureList = this.measureList;
+        this.measureList.forEach((el) => {
+          item[el.e_title] = "";
+        });
+      });
+      // basics_measure_index
+    },
+    handleImgClick(e, row) {
+      const list = [{ img_url: e.target.src }];
+      this.$previewImg({
+        list,
+        baseUrl: "",
+        baseImgField: "img_url",
+        baseTitleField: "",
+      });
+    },
+    uploadError(err) {
+      this.$Message.error(err.msg || "上传失败");
+    },
+    //导入成功
+    uploadSuccess(res) {
+      if (res.code == 200) {
+        this.$Message.success(res.msg || "上传成功");
+        // const temp = res.data;
+        // let list = [...this.postInfo.children, ...temp];
+      } else {
+        this.$Message.warning(res.msg || "上传失败");
+      }
+    },
+    handleProcess() {
+      this.axios({
+        method: "get",
+        url: "/api/order_area_pull",
+        params: {
+          order_no: this.order_no,
+          sub_status: 1,
+          process_man: this.process_man,
+          process_start_time: this.func.replaceDateNoHMS(
+            this.process_start_time
+          ),
+          process_end_time: this.func.replaceDateNoHMS(this.process_end_time),
+        },
+      }).then((res) => {
+        if (res.code == 200) {
+          this.$Message.success(res.msg);
+          this.getData(this.proxyObj);
+        }
+      });
+    },
+    handleOpenModal() {
+      if (this.selected.length < 1) {
+        this.$Message.warning("请选择数据");
+      } else {
+        this.processModal = true;
+      }
+    },
+    handleCurTabChange(name) {
+      this.currencyTab = name;
+      if (name == "name2" && this.listTableData.length < 1) {
+        this.axios
+          .get("/api/order_area_deep_detail_list?", {
+            params: { order_no: this.$route.query.order_no },
+          })
+          .then((res) => {
+            console.log(res);
+          });
+      }
+    },
+  },
+  // 监听属性 类似于data概念
+  computed: {},
+  // 监控data中的数据变化
+  watch: {},
+  beforeCreate() {}, // 生命周期 - 创建之前
+  beforeMount() {}, // 生命周期 - 挂载之前
+  beforeUpdate() {}, // 生命周期 - 更新之前
+  updated() {}, // 生命周期 - 更新之后
+  beforeDestroy() {}, // 生命周期 - 销毁之前
+  destroyed() {}, // 生命周期 - 销毁完成
+  activated() {}, // 如果页面有keep-alive缓存功能,这个函数会触发
+};
+</script>
+
+<style lang='scss' scoped>
+.BidSystemDeepeningOrderDetail {
+  overflow: hidden;
+  overflow-y: auto;
+  position: relative;
+  top: 20px;
+  height: 85%;
+  padding-bottom: 20px;
+  .top_search {
+    display: flex;
+    justify-content: flex-start;
+    align-items: center;
+    flex-wrap: wrap;
+    width: 100%;
+    padding: 10px 0;
+    font-size: 14px;
+    div {
+      width: 200px;
+      padding: 5px;
+    }
+    .top_search_form {
+      // width: 800px;
+      // display: flex;
+      // justify-content: space-around;
+      /deep/ .ivu-form-item {
+        display: inline-block;
+        width: 300px;
+      }
+    }
+  }
+  .addAreaForm {
+    font-size: 14px;
+    .addFormInfo {
+      width: 80%;
+      display: flex;
+      justify-content: flex-start;
+      align-items: center;
+      flex-wrap: wrap;
+      padding: 10px 0;
+      div {
+        width: 200px;
+        padding: 10px;
+      }
+    }
+  }
+  .table-data {
+    position: relative;
+    padding: 15px;
+    margin: 10px;
+    margin-bottom: 30px;
+    border-radius: 5px;
+    box-shadow: 1px 1px 5px 1px #999;
+    .addBtn {
+      position: absolute;
+      right: 20px;
+      top: 20px;
+    }
+    /deep/ .ivu-form-item {
+      display: inline-block;
+      width: 220px;
+    }
+  }
+}
+.addPDTFormModal {
+  /deep/ .ivu-modal-body {
+    height: 400px;
+    overflow: hidden;
+    overflow-y: auto;
+  }
+}
+.addPDTForm {
+  position: relative;
+  border-bottom: 1px solid #e8eaec;
+  padding-bottom: 30px;
+  /deep/ .ivu-form-item {
+    display: inline-block;
+    width: 300px;
+  }
+  .addPDTBtn {
+    position: absolute;
+    right: 10px;
+    bottom: 25px;
+  }
+}
+.addPDTProcess {
+  width: 300px;
+  padding-bottom: 15px;
+  div {
+    display: flex;
+    justify-content: space-around;
+    padding: 5px 0;
+    span {
+      padding-top: 6px;
+    }
+  }
+}
+.product-img {
+  padding-top: 10px;
+}
+.process_modal {
+  display: flex;
+  justify-content: center;
+  align-items: center;
+  padding: 10px;
+}
+.product-add {
+  display: flex;
+  flex-wrap: wrap;
+  .ipt {
+    position: absolute;
+    width: 100%;
+    height: 100%;
+    opacity: 0;
+    cursor: pointer;
+    outline: none;
+    top: 0;
+    left: 0;
+  }
+  .add-items {
+    width: 40px;
+    height: 40px;
+    border: 1px dotted #e7e7e7;
+    border-radius: 5px;
+    display: flex;
+    justify-content: center;
+    align-items: center;
+    overflow: hidden;
+    position: relative;
+    flex-direction: column;
+    background: #f4f5f7;
+    .item {
+      width: 46px;
+      height: 46px;
+      background: #3764ff;
+      opacity: 0.6;
+      display: flex;
+      justify-content: center;
+      align-items: center;
+      border-radius: 50%;
+      color: #fff;
+    }
+  }
+  .items {
+    width: 40px;
+    height: 40px;
+    margin-bottom: 10px;
+    display: flex;
+    justify-content: center;
+    align-items: center;
+    background: #e7e7e7;
+    margin-right: 10px;
+    border-radius: 5px;
+    position: relative;
+    img {
+      max-width: 40px;
+      max-height: 40px;
+    }
+  }
+}
+.supModalBtn {
+  display: flex;
+  justify-content: flex-end;
+  margin-bottom: 10px;
+}
+.urlSetStyle {
+  img {
+    max-width: 100px;
+  }
+}
+/deep/ .ivu-table-wrapper {
+  overflow: visible;
+} //穿透iview
+/deep/.ivu-tabs-nav-scroll {
+  display: flex;
+  justify-content: center;
+}
+</style>

+ 11 - 3
src/views/BidSystem/DeepeningOrder/list.vue

@@ -227,9 +227,9 @@ export default {
               {},
               params.row.state == 0
                 ? "待审核"
-                : params.row.warning_state == 1
+                : params.row.state == 1
                 ? "待拆单"
-                : params.row.warning_state == 2
+                : params.row.state == 2
                 ? "待生产"
                 : "已完成"
             ),
@@ -337,7 +337,6 @@ export default {
           break;
         // 转详情页
         case 2:
-        case 3:
           this.$router.push({
             path: "/cms/BidSystem/DeepeningOrder/detail",
             query: {
@@ -346,6 +345,15 @@ export default {
             },
           });
           break;
+        case 3:
+          this.$router.push({
+            path: "/cms/BidSystem/DeepeningOrder/info",
+            query: {
+              type,
+              order_no: row.order_no,
+            },
+          });
+          break;
         case 4:
           break;
         case 5:

+ 2 - 2
src/views/BidSystem/ProductDeOrder/list.vue

@@ -219,9 +219,9 @@ export default {
               {},
               params.row.state == 0
                 ? "待审核"
-                : params.row.warning_state == 1
+                : params.row.state == 1
                 ? "待拆单"
-                : params.row.warning_state == 2
+                : params.row.state == 2
                 ? "待生产"
                 : "已完成"
             ),

+ 332 - 221
src/views/MeasurementOrderMannage/edit.vue

@@ -1,155 +1,243 @@
 <template>
   <div>
-    <Toptitle ref='toptitle'
-              :title='this.$route.query.editType == 0 ? "编辑订单" : "查看订单" '>
-      <Button @click="handleGoDeOrder"
-              v-if="$route.query.type==3"
-              type='primary'
-              ghost
-              style="margin-right:10px;">拆单</Button>
-      <Button @click="back"
-              type='primary'
-              ghost
-              style="margin-right:10px;">返回</Button>
-      <Button :disabled='$route.query.editType == 1 ? true : false'
-              type="primary"
-              ghost
-              style="margin-right:10px;"
-              @click="postData">保存</Button>
-      <Button :disabled='$route.query.editType == 1 ? true : false'
-              type="primary"
-              ghost
-              style="margin-right:10px;"
-              @click="batchConfirm">批量确认</Button>
-      <Button :disabled='$route.query.editType != 1 ? true : false'
-              type="primary"
-              ghost
-              @click="openModal">批量下生产</Button>
+    <Toptitle
+      ref="toptitle"
+      :title="this.$route.query.editType == 0 ? '编辑订单' : '查看订单'"
+    >
+      <Button
+        @click="handleGoDeOrder"
+        v-if="$route.query.type == 3"
+        type="primary"
+        ghost
+        style="margin-right: 10px"
+        >拆单</Button
+      >
+      <Button @click="back" type="primary" ghost style="margin-right: 10px"
+        >返回</Button
+      >
+      <Button
+        :disabled="$route.query.editType == 1 ? true : false"
+        type="primary"
+        ghost
+        style="margin-right: 10px"
+        @click="postData"
+        >保存</Button
+      >
+      <Button
+        :disabled="$route.query.editType == 1 ? true : false"
+        type="primary"
+        ghost
+        style="margin-right: 10px"
+        @click="batchConfirm"
+        >批量确认</Button
+      >
+      <Button
+        :disabled="$route.query.editType != 1 ? true : false"
+        type="primary"
+        ghost
+        @click="openModal"
+        >批量下生产</Button
+      >
     </Toptitle>
 
-    <Topsearch ref='topsearch'
-               :list='list'
-               @init='init'
-               @searchData='init'></Topsearch>
-    <div ref='log'
-         class="log-list">
-      <div class="log-item"
-           v-for="(item,index) of logList"
-           :key="index">
-        <span>{{item.key}}:</span>
-        <span>{{item.value}}</span>
+    <Topsearch
+      ref="topsearch"
+      :list="list"
+      @init="init"
+      @searchData="init"
+    ></Topsearch>
+    <div ref="log" class="log-list">
+      <div class="log-item" v-for="(item, index) of logList" :key="index">
+        <span>{{ item.key }}:</span>
+        <span>{{ item.value }}</span>
       </div>
     </div>
     <div>
-      <Table ref='table'
-             @on-selection-change='selectTable'
-             :max-height='tableHeight'
-             :width="tableWidth"
-             class="overflow-table"
-             border
-             stripe
-             :columns="tableColums"
-             :data="tableData">
-
-        <div slot-scope="{index}"
-             v-for="(item,_key) in tableTop"
-             :key="_key"
-             :slot="item.slot">
-          <Input :disabled='$route.query.editType == 1 ? true : false'
-                 v-model="tableData[index][item.key]"
-                 :placeholder="'请输入'+item.title" />
+      <Table
+        ref="table"
+        @on-selection-change="selectTable"
+        :max-height="tableHeight"
+        :width="tableWidth"
+        class="overflow-table"
+        border
+        stripe
+        :columns="tableColums"
+        :data="tableData"
+      >
+        <div
+          slot-scope="{ index }"
+          v-for="(item, _key) in tableTop"
+          :key="_key"
+          :slot="item.slot"
+        >
+          <Input
+            :disabled="$route.query.editType == 1 ? true : false"
+            v-model="tableData[index][item.key]"
+            :placeholder="'请输入' + item.title"
+          />
         </div>
-        <template slot-scope="{row}"
-                  slot="up-load">
+        <template slot-scope="{ row }" slot="up-load">
           <div>
-            <img @click="getImg(row)"
-                 style="max-width:50px;max-height:50px;position:relative;top:3px"
-                 :src="$store.state.ip+row.url">
+            <img
+              @click="getImg(row)"
+              style="
+                max-width: 50px;
+                max-height: 50px;
+                position: relative;
+                top: 3px;
+              "
+              :src="$store.state.ip + row.url"
+            />
           </div>
         </template>
       </Table>
     </div>
 
-    <Footer @change="changePage"
-            @changeSize='changeSize'
-            :total='total'
-            :pageIndex='pageIndex'></Footer>
-
+    <Footer
+      @change="changePage"
+      @changeSize="changeSize"
+      :total="total"
+      :pageIndex="pageIndex"
+    ></Footer>
   </div>
 </template>
 
 <script>
 export default {
-  data () {
+  data() {
     return {
       list: [
         {
-          title: '楼幢', name: 'Select', multiple: true, filterable: true, serverName: 'house', placeholder: '请选择', value: '',
-          option: []
+          title: "楼幢",
+          name: "Select",
+          multiple: true,
+          filterable: true,
+          serverName: "house",
+          placeholder: "请选择",
+          value: "",
+          option: [],
         },
         {
-          title: '单元', name: 'Select', multiple: true, filterable: true, serverName: 'unit', placeholder: '请选择', value: '',
-          option: []
+          title: "单元",
+          name: "Select",
+          multiple: true,
+          filterable: true,
+          serverName: "unit",
+          placeholder: "请选择",
+          value: "",
+          option: [],
         },
         {
-          title: '楼层', name: 'Select', multiple: true, filterable: true, serverName: 'layer', placeholder: '请选择', value: '',
-          option: []
+          title: "楼层",
+          name: "Select",
+          multiple: true,
+          filterable: true,
+          serverName: "layer",
+          placeholder: "请选择",
+          value: "",
+          option: [],
         },
         {
-          title: '房号', name: 'Select', multiple: true, filterable: true, serverName: 'number_detail', placeholder: '请选择', value: '',
-          option: []
+          title: "房号",
+          name: "Select",
+          multiple: true,
+          filterable: true,
+          serverName: "number_detail",
+          placeholder: "请选择",
+          value: "",
+          option: [],
         },
         {
-          title: '测量状态', name: 'Select', serverName: 'measurement_state', placeholder: '请选择', value: '',
+          title: "测量状态",
+          name: "Select",
+          serverName: "measurement_state",
+          placeholder: "请选择",
+          value: "",
           option: [
-            { label: '全部', value: 99 },
-            { label: '测量中', value: 2 },
-            { label: '测量完成', value: 3 },
-          ]
+            { label: "全部", value: 99 },
+            { label: "测量中", value: 2 },
+            { label: "测量完成", value: 3 },
+          ],
         },
       ],
       type: 1,
-      logList: [{ title: '系统单号', value: '10998765' }],
+      logList: [{ title: "系统单号", value: "10998765" }],
       tableColums: [
-        { type: 'selection', width: 100, align: 'center', fixed: 'left' },
+        { type: "selection", width: 100, align: "center" },
         {
-          title: '房间号', align: 'center', key: 'number_detail', minWidth: 100,
+          title: "房间号",
+          align: "center",
+          key: "number_detail",
+          minWidth: 100,
           render: (h, params) => {
-            const { row } = params
-            return h('span', `${row.house}-${row.unit}-${row.layer}-${row.number_detail}`)
-          }
+            const { row } = params;
+            return h(
+              "span",
+              `${row.house}-${row.unit}-${row.layer}-${row.number_detail}`
+            );
+          },
+        },
+        {
+          title: "产品名称",
+          align: "center",
+          key: "product_title",
+          minWidth: 200,
+        },
+        {
+          title: "状态",
+          align: "center",
+          minWidth: 100,
+          render: (h, params) =>
+            h("span", {}, params.row.is_measure == 1 ? "已确认" : "未确认"),
         },
-        { title: '产品名称', align: 'center', key: 'product_title', minWidth: 200 },
         {
-          title: '状态', align: 'center', minWidth: 100,
-          render: (h, params) => h('span', {}, params.row.is_measure == 1 ? '已确认' : '未确认')
+          title: "测量状态",
+          align: "center",
+          key: "measurement_state",
+          minWidth: 100,
+          render: (h, params) =>
+            h(
+              "span",
+              {},
+              params.row.is_measure == 1
+                ? "测量完成"
+                : params.row.measurement_state >= 3
+                ? "测量完成"
+                : params.row.measurement_state == 1
+                ? "已下测量"
+                : params.row.measurement_state == 2
+                ? "测量中"
+                : "未下测量"
+            ),
         },
+        { title: "产品型号", align: "center", key: "model", minWidth: 150 },
+        { title: "单位", align: "center", key: "unit", minWidth: 130 },
+        { title: "图号", align: "center", minWidth: 130, key: "url_number" },
+        { title: "图纸", align: "center", slot: "up-load", minWidth: 130 },
+        { title: "位置", align: "center", minWidth: 200, key: "position" },
         {
-          title: '测量状态', align: 'center', key: 'measurement_state', minWidth: 100,
-          render: (h, params) => h('span', {},
-            params.row.is_measure == 1 ? '测量完成' : (params.row.measurement_state >= 3 ? '测量完成' : (params.row.measurement_state == 1 ? '已下测量' : (params.row.measurement_state == 2 ? '测量中' : '未下测量')))
-          )
+          title: "预估产品工期",
+          align: "center",
+          minWidth: 200,
+          key: "predict_working",
+          render: (h, params) =>
+            h("span", `${(params.row.predict_working / 8).toFixed(1)}天`),
         },
-        { title: '产品型号', align: 'center', key: 'model', minWidth: 150 },
-        { title: '单位', align: 'center', key: 'unit', minWidth: 130 },
-        { title: '图号', align: 'center', minWidth: 130, key: 'url_number', },
-        { title: '图纸', align: 'center', slot: 'up-load', minWidth: 130 },
-        { title: '位置', align: 'center', minWidth: 200, key: 'position' },
         {
-          title: '预估产品工期', align: 'center', minWidth: 200, key: 'predict_working',
-          render: (h, params) => h('span', `${(params.row.predict_working / 8).toFixed(1)}天`)
+          title: "测量数据",
+          align: "center",
+          width: "200",
+          key: "measurement",
         },
-        { title: '测量数据', align: 'center', fixed: 'right', width: '200', key: 'measurement' },
       ],
       tableData: [],
       pageIndex: 1,
       pageSize: 10,
       total: 100,
-      logList: [],
-      headers: { 'Authorization': localStorage.getItem('token') },
+      headers: { Authorization: localStorage.getItem("token") },
       currentIndex: 0,
       planInfo: {
-        order_product_id: '',
+        order_product_id: "",
       },
       tableWidth: null,
       tableTop: [],
@@ -157,197 +245,220 @@ export default {
       bannerImages: [],
       proxyObj: {},
       tableHeight: null,
-    }
+    };
   },
-  created () {
-    this.tableWidth = window.innerWidth - 300;
+  created() {
+    this.tableWidth = window.innerWidth - 320;
     this.type = this.$route.query.type;
-    this.getOptions()
-
+    this.getOptions();
   },
-  mounted () {
-    this.tableHeight = window.innerHeight - this.$refs.table.$el.offsetTop - this.$refs.toptitle.$el.offsetHeight - this.$refs.topsearch.$el.offsetHeight - 200
-    window.addEventListener('resize', (e) => { this.tableWidth = e.target.innerWidth - 300; this.$forceUpdate(); })
+  mounted() {
+    this.tableHeight =
+      window.innerHeight -
+      this.$refs.table.$el.offsetTop -
+      this.$refs.toptitle.$el.offsetHeight -
+      this.$refs.topsearch.$el.offsetHeight -
+      200;
+    window.addEventListener("resize", (e) => {
+      this.tableWidth = e.target.innerWidth - 300;
+      this.$forceUpdate();
+    });
   },
   methods: {
-    handleGoDeOrder () {
+    handleGoDeOrder() {
       this.$router.push({
-        path: '/cms/BidSystem/ProductDeOrder/detail',
+        path: "/cms/BidSystem/ProductDeOrder/detail",
         query: {
           type: this.$route.query.type,
           order_no: this.$route.query.order_no,
-        }
-      })
+        },
+      });
     },
-    init (row) {
-      this.pageIndex = 1
-      row.page_index = this.pageIndex
-      row.page_size = this.pageSize
-      if (this.func.isType(row.house) == 'Array') {
-        row.house = row.house.join(',')
+    init(row) {
+      this.pageIndex = 1;
+      row.page_index = this.pageIndex;
+      row.page_size = this.pageSize;
+      if (this.func.isType(row.house) == "Array") {
+        row.house = row.house.join(",");
       }
-      if (this.func.isType(row.unit) == 'Array') {
-        row.unit = row.unit.join(',')
+      if (this.func.isType(row.unit) == "Array") {
+        row.unit = row.unit.join(",");
       }
-      if (this.func.isType(row.layer) == 'Array') {
-        row.layer = row.layer.join(',')
+      if (this.func.isType(row.layer) == "Array") {
+        row.layer = row.layer.join(",");
       }
-      if (this.func.isType(row.number_detail) == 'Array') {
-        row.number_detail = row.number_detail.join(',')
+      if (this.func.isType(row.number_detail) == "Array") {
+        row.number_detail = row.number_detail.join(",");
       }
-      Object.assign(row, this.$route.query)
-      Object.assign(this.proxyObj, row)
-      this.getData(row)
-
+      Object.assign(row, this.$route.query);
+      Object.assign(this.proxyObj, row);
+      this.getData(row);
     },
-    getOptions () {
-      this.axios('/api/order_detail_word', { params: { order_no: this.$route.query.order_no } })
-        .then(res => {
-          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_detail; v.label = v.number_detail })
-          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;
-        })
+    getOptions() {
+      this.axios("/api/order_detail_word", {
+        params: { order_no: this.$route.query.order_no },
+      }).then((res) => {
+        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_detail;
+          v.label = v.number_detail;
+        });
+        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;
+      });
     },
-    back () {
-      this.$router.go(-1)
+    back() {
+      this.$router.go(-1);
     },
-    selectTable (e) {
+    selectTable(e) {
       this.select = e;
     },
-    postData () {
+    postData() {
       let result = [];
       this.tableData.map((v, i) => {
         let obj = {};
         obj.order_product_id = v.order_product_id;
-        obj.url = v.url || '';
-        obj.url_number = v.url_number || '';
+        obj.url = v.url || "";
+        obj.url_number = v.url_number || "";
         obj.detail = [];
-        this.tableTop.map(k => {
-          let o = {}
+        this.tableTop.map((k) => {
+          let o = {};
           let key = k.key;
           for (let m in this.tableData[i]) {
             if (m == key) {
-              o.key = key
-              o.value = this.tableData[i][key]
-              o.title = k.title
-              obj.detail.push(o)
+              o.key = key;
+              o.value = this.tableData[i][key];
+              o.title = k.title;
+              obj.detail.push(o);
             }
-
           }
-        })
-        result.push(obj)
-      })
-      let postInfo = JSON.stringify(result)
-      this.axios.post('/api/orders_save_measure', { data: postInfo }).then(res => {
-        if (res.code == 200) {
-          this.$Message.success(res.msg);
-          this.getData(this.proxyObj)
-        }
-      })
+        });
+        result.push(obj);
+      });
+      let postInfo = JSON.stringify(result);
+      this.axios
+        .post("/api/orders_save_measure", { data: postInfo })
+        .then((res) => {
+          if (res.code == 200) {
+            this.$Message.success(res.msg);
+            this.getData(this.proxyObj);
+          }
+        });
     },
-    getData (row) {
-      this.axios('/api/orders_product_list', { params: row }).then(res => {
+    getData(row) {
+      this.axios("/api/orders_product_list", { params: row }).then((res) => {
         this.tableData = res.data.list;
-        this.logList = res.data.detail
+        this.logList = res.data.detail;
         this.tableTop = res.data.top;
-        this.total = res.data.total
-        res.data.top.map(v => {
+        this.total = res.data.total;
+        res.data.top.map((v) => {
           v.width = 200;
           v.slot = v.key;
-          const n = this.tableColums.filter(x => x.key == v.key)
+          const n = this.tableColums.filter((x) => x.key == v.key);
           if (n.length < 1) {
-            this.tableColums.splice(5, 0, v)
+            this.tableColums.splice(5, 0, v);
           }
-
-        })
-      })
-
+        });
+      });
     },
-    successUpload (event) {
+    successUpload(event) {
       let url = event.data.url;
-      this.tableData[this.currentIndex].url = url
+      this.tableData[this.currentIndex].url = url;
     },
-    mapRow (n) {
+    mapRow(n) {
       this.currentIndex = n;
     },
-    changePage (e) { },
-    openModal () {
-      const result = this.select.map(rows => rows.order_product_id)
-      if (!result || result.length < 1) { return this.$Message.error('请至少选择一项') }
-      this.planInfo.order_product_id = result.join(',')
+    changePage(e) {},
+    openModal() {
+      const result = this.select.map((rows) => rows.order_product_id);
+      if (!result || result.length < 1) {
+        return this.$Message.error("请至少选择一项");
+      }
+      this.planInfo.order_product_id = result.join(",");
       this.downProduction({
-        title: '下生产',
+        title: "下生产",
         type: 2,
         params: this.planInfo,
-        then: (e) => { this.getData(this.proxyObj) },
-        cancel: (e) => { },
-      })
+        then: (e) => {
+          this.getData(this.proxyObj);
+        },
+        cancel: (e) => {},
+      });
     },
-    batchConfirm () {
-      if (this.select.length < 1) { return this.$Message.warning('请选择') }
-      console.log(this.tableTop)
+    batchConfirm() {
+      if (this.select.length < 1) {
+        return this.$Message.warning("请选择");
+      }
+      console.log(this.tableTop);
       let result = [];
-      this.select.map(rows => {
-        const obj = {}
-        this.tableTop.forEach(item => {
-          const { key } = item
+      this.select.map((rows) => {
+        const obj = {};
+        this.tableTop.forEach((item) => {
+          const { key } = item;
           for (let i in rows) {
             if (key == i) {
-              obj[key] = rows[key]
+              obj[key] = rows[key];
             }
           }
-
-        })
-        result.push({ id: rows.id, detail: obj })
-      })
-      this.axios.post('/api/batch_confirm', { result: result }).then(res => {
+        });
+        result.push({ id: rows.id, detail: obj });
+      });
+      this.axios.post("/api/batch_confirm", { result: result }).then((res) => {
         if (res.code == 200) {
-          this.$Message.success(res.msg)
-          this.getData(this.proxyObj)
+          this.$Message.success(res.msg);
+          this.getData(this.proxyObj);
         }
-      })
+      });
     },
-    getImg (row) {
+    getImg(row) {
       if (row.imgs && row.imgs.length > 0) {
         this.$previewImg({
           list: row.imgs,
           baseUrl: this.$store.state.ip,
-          baseImgField: 'img_url',
-          baseTitleField: ''
-        })
+          baseImgField: "img_url",
+          baseTitleField: "",
+        });
       } else {
-        this.axios('/api/orders_img', { params: { id: row.product_id, type: 1 } }).then(res => {
+        this.axios("/api/orders_img", {
+          params: { id: row.product_id, type: 1 },
+        }).then((res) => {
           if (res.code == 200) {
-            row.imgs = res.data
+            row.imgs = res.data;
             this.$previewImg({
               list: row.imgs,
               baseUrl: this.$store.state.ip,
-              baseImgField: 'img_url',
-              baseTitleField: ''
-            })
+              baseImgField: "img_url",
+              baseTitleField: "",
+            });
           }
-        })
+        });
       }
-
-
     },
-    changePage (e) {
+    changePage(e) {
       this.pageIndex = e;
       this.proxyObj.page_index = this.pageIndex;
-      this.getData(this.proxyObj)
+      this.getData(this.proxyObj);
     },
-    changeSize (e) {
+    changeSize(e) {
       this.pageSize = e;
       this.proxyObj.page_size = this.pageSize;
-      this.getData(this.proxyObj)
+      this.getData(this.proxyObj);
     },
-  }
-}
+  },
+};
 </script>
 
 <style lang="scss" scoped>

+ 6 - 7
src/views/OrderMannage/BusinessOrderlist/edit.vue

@@ -1182,7 +1182,6 @@
 </template>
 
 <script>
-import { FulfillingSquareSpinner } from "epic-spinners";
 export default {
   beforeRouteLeave(to, from, next) {
     if (to.path != "/cms/ordermannage/businessorderlist/list") {
@@ -1190,12 +1189,12 @@ export default {
         title: "提示",
         content: "切换页面会导致数据丢失,是否确认切换?",
         onOk: () => {
-          next((vm) => {});
+          next(() => {});
         },
         onCancel: () => {},
       });
     } else {
-      next((vm) => {});
+      next(() => {});
     }
   },
   data() {
@@ -1414,7 +1413,10 @@ export default {
   },
   methods: {
     back() {
-      this.$router.go(-1);
+      // this.$router.go(-1);
+      this.$router.push({
+        path: "/cms/ordermannage/businessorderlist/list",
+      });
     },
     postForms(n) {
       let result = [];
@@ -2209,7 +2211,6 @@ export default {
               element.wideCalc = JSON.parse(JSON.stringify(element.wide));
               element.highCalc = JSON.parse(JSON.stringify(element.high));
               element.part_detail.forEach((elem) => {
-                console.log("elem :>> ", elem);
                 elem.material_detail_id = 0;
                 elem.material_detail_title = elem.material_detail_list[0].title;
                 elem.material_detail_id =
@@ -2240,7 +2241,6 @@ export default {
               method: "get",
               url: "/api/bpp_list",
             }).then((re) => {
-              console.log("temp_process :>> ", temp_process);
               re.data.forEach((element) => {
                 for (const key in res.data.process.title) {
                   const ele = res.data.process.title[key];
@@ -2395,7 +2395,6 @@ export default {
     },
     handlePartChange(row, measure) {
       if (row.change_id) {
-        console.log("row :>> ", row);
         let cur = row.change.filter((item) => item.id == row.change_id);
         row.part_id = cur[0].part_id;
         row.high = cur[0].high;

+ 225 - 181
src/views/OrderMannage/BusinessOrderlist/list.vue

@@ -107,7 +107,7 @@
           <a
             v-if="
               (persimissionData['编辑'] || persimissionData.all) &&
-              row.state == 0
+                row.state == 0
             "
             style="margin: 0 5px"
             @click="addOrder(2, row)"
@@ -122,7 +122,7 @@
           <a
             v-if="
               (persimissionData['删除'] || persimissionData.all) &&
-              row.state == 0
+                row.state == 0
             "
             style="margin: 0 5px"
             @click="delItems(row)"
@@ -158,24 +158,18 @@
               type="text"
               v-model="chargeModalForm.title"
               placeholder="请输入收款项目"
-            >
-            </Input>
+            />
           </FormItem>
           <FormItem label="收款金额:">
             <Input
               type="text"
               v-model="chargeModalForm.price"
               placeholder="请输入收款金额"
-            >
-            </Input>
+            />
           </FormItem>
           <FormItem label="备注:">
-            <Input
-              type="text"
-              v-model="chargeModalForm.remark"
-              placeholder="请输入备注"
-            >
-            </Input>
+            <Input type="text" v-model="chargeModalForm.remark"
+            placeholder="请输入备注" />
           </FormItem>
         </Form>
         <Table
@@ -200,16 +194,17 @@
             <Table
               :columns="formModalColumns"
               border
+              draggable
+              @on-drag-drop="(a, b) => onDragDrop(a, b, formModalTableData, 1)"
               :data="formModalTableData"
             ></Table>
-            <!-- @on-drag-drop="(a,b)=>onDragDrop(a,b,formModalTableData)" -->
           </TabPane>
           <TabPane label="表头设置" name="name2">
             <Table
               :columns="tableModalColumns"
               border
               draggable
-              @on-drag-drop="(a, b) => onDragDrop(a, b, tableModalTableData)"
+              @on-drag-drop="(a, b) => onDragDrop(a, b, tableModalTableData, 2)"
               :data="tableModalTableData"
             ></Table>
           </TabPane>
@@ -224,119 +219,6 @@ import { mapState } from "vuex";
 export default {
   data() {
     return {
-      list: [
-        {
-          title: "订单编号",
-          name: "Input",
-          placeholder: "请输入订单编号",
-          value: localStorage.getItem("corssPageData")
-            ? JSON.parse(localStorage.getItem("corssPageData")).order_no
-            : "",
-          serverName: "order_no",
-        },
-        {
-          title: "项目名称",
-          name: "Input",
-          placeholder: "请输入",
-          value: localStorage.getItem("corssPageData")
-            ? JSON.parse(localStorage.getItem("corssPageData")).residential_name
-            : "",
-          serverName: "residential_name",
-        },
-        {
-          title: "客户",
-          name: "Input",
-          placeholder: "请输入",
-          value: localStorage.getItem("corssPageData")
-            ? JSON.parse(localStorage.getItem("corssPageData")).client_name
-            : "",
-          serverName: "client_name",
-        },
-        {
-          title: "客户地址",
-          name: "Input",
-          placeholder: "请输入",
-          value: localStorage.getItem("corssPageData")
-            ? JSON.parse(localStorage.getItem("corssPageData")).client_name
-            : "",
-          serverName: "address",
-        },
-        {
-          title: "业务员",
-          name: "Select",
-          placeholder: "请输入",
-          filterable: true,
-          value: localStorage.getItem("corssPageData")
-            ? JSON.parse(localStorage.getItem("corssPageData")).salesman
-            : "",
-          serverName: "salesman",
-          optionName: "nickname",
-          optionValue: "id",
-          option: this.users,
-        },
-        {
-          title: "订单状态",
-          name: "Select",
-          placeholder: "请选择",
-          serverName: "state",
-          value: localStorage.getItem("corssPageData")
-            ? JSON.parse(localStorage.getItem("corssPageData")).state
-            : "",
-          option: [
-            { label: "全部", value: 0 },
-            { label: "测量未审核", value: 1 },
-            { label: "测量审核中", value: 2 },
-            { label: "测量通过", value: 3 },
-            { label: "生产未审核", value: 4 },
-            { label: "生产审核中", value: 5 },
-            { label: "生产通过", value: 6 },
-            { label: "到生产计划", value: 7 },
-            { label: "派工", value: 8 },
-            { label: "包装", value: 9 },
-            { label: "发货", value: 10 },
-            { label: "安装", value: 11 },
-          ],
-        },
-        // {
-        //   title: '订单类型', name: 'Select', placeholder: '请选择', serverName: 'type', value: localStorage.getItem('corssPageData') ? JSON.parse(localStorage.getItem('corssPageData')).type : '',
-        //   option: [
-        //     { label: '工装', value: 1 },
-        //     { label: '家装', value: 2 },
-        //   ]
-        // },
-        // {
-        //   title: '业务类型', name: 'Select', placeholder: '请选择', serverName: 'business_type', value: localStorage.getItem('corssPageData') ? JSON.parse(localStorage.getItem('corssPageData')).business_type : '',
-        //   option: [
-        //     { label: '业务员', value: 1 },
-        //     { label: '代理商', value: 2 },
-        //   ]
-        // },
-        {
-          title: "紧急程度",
-          name: "Select",
-          placeholder: "请选择",
-          optionName: "title",
-          optionValue: "id",
-          serverName: "warning_state",
-          value: localStorage.getItem("corssPageData")
-            ? JSON.parse(localStorage.getItem("corssPageData")).warning_state
-            : "",
-          option: this.warningList,
-        },
-        {
-          title: "制单人",
-          name: "Select",
-          placeholder: "请输入",
-          filterable: true,
-          value: localStorage.getItem("corssPageData")
-            ? JSON.parse(localStorage.getItem("corssPageData")).salesman
-            : "",
-          serverName: "crt_name",
-          optionName: "nickname",
-          optionValue: "id",
-          option: this.users,
-        },
-      ],
       tableColums: [
         {
           type: "selection",
@@ -354,7 +236,7 @@ export default {
           minWidth: 200,
         },
         { title: "业务员", align: "center", key: "nickname", minWidth: 150 },
-        { title: "客户", align: "center", key: "client_name", minWidth: 150 },
+        { title: "客户姓名", align: "center", key: "client_name", minWidth: 150 },
         { title: "客户地址", align: "center", key: "address", minWidth: 200 },
         { title: "审核人", align: "center", key: "crt_name", minWidth: 150 },
         {
@@ -487,7 +369,6 @@ export default {
           slot: "set",
           fixed: "right",
           minWidth: 220,
-          fixed: "right",
         },
       ],
       modalChargeTablecolumns: [
@@ -520,20 +401,15 @@ export default {
       loading: false,
       proxyObj: {},
       headers: { Authorization: localStorage.getItem("token") },
-      //详情页返回保留搜索数据
-      corssPageData: localStorage.getItem("corssPageData")
-        ? JSON.parse(localStorage.getItem("corssPageData"))
-        : {},
       showModal: false,
       formModalColumns: [
-        { type: "index", minWidth: 30, align: "center" },
         {
           title: "是否展示",
           align: "center",
           key: "is_show",
           minWidth: 60,
           render: (h, params) => {
-            const { row, index } = params;
+            const { index } = params;
             const currentRow = JSON.parse(
               JSON.stringify(this.formModalTableData[index])
             );
@@ -555,19 +431,25 @@ export default {
           align: "center",
           key: "value",
           minWidth: 100,
+        },
+        {
+          title: "展示名称",
+          align: "center",
+          key: "title",
+          minWidth: 100,
           render: (h, params) => {
-            const { row, index } = params;
+            const { index } = params;
             const currentRow = JSON.parse(
               JSON.stringify(this.formModalTableData[index])
             );
             return h("Input", {
               props: {
-                value: currentRow.value,
+                value: currentRow.title,
                 type: "text",
               },
               on: {
                 "on-change": (e) => {
-                  currentRow.value = e.target.value;
+                  currentRow.title = e.target.value;
                   this.formModalTableData.splice(index, 1, currentRow);
                 },
               },
@@ -576,24 +458,38 @@ export default {
         },
       ],
       formModalTableData: [
-        { is_show: true, key: "order_no", value: "订单编号" },
-        { is_show: true, key: "residential_name", value: "项目名称" },
-        { is_show: true, key: "client_name", value: "客户" },
-        { is_show: true, key: "address", value: "客户地址" },
-        { is_show: true, key: "salesman", value: "业务员" },
-        { is_show: true, key: "state", value: "订单状态" },
-        { is_show: true, key: "warning_state", value: "紧急程度" },
+        {
+          is_show: true,
+          key: "order_no",
+          value: "订单编号",
+          title: "订单编号",
+        },
+        {
+          is_show: true,
+          key: "residential_name",
+          value: "项目名称",
+          title: "项目名称",
+        },
+        { is_show: true, key: "client_name", value: "客户姓名", title: "客户姓名" },
+        { is_show: true, key: "address", value: "客户地址", title: "客户地址" },
+        { is_show: true, key: "salesman", value: "业务员", title: "业务员" },
+        { is_show: true, key: "state", value: "订单状态", title: "订单状态" },
+        {
+          is_show: true,
+          key: "warning_state",
+          value: "紧急程度",
+          title: "紧急程度",
+        },
       ],
       formSet: [],
       tableModalColumns: [
-        { type: "index", minWidth: 30, align: "center" },
         {
           title: "是否展示",
           align: "center",
           key: "is_show",
           minWidth: 60,
           render: (h, params) => {
-            const { row, index } = params;
+            const { index } = params;
             const currentRow = JSON.parse(
               JSON.stringify(this.tableModalTableData[index])
             );
@@ -615,20 +511,26 @@ export default {
           align: "center",
           key: "value",
           minWidth: 100,
+        },
+        {
+          title: "展示名称",
+          align: "center",
+          key: "title",
+          minWidth: 100,
           render: (h, params) => {
-            const { row, index } = params;
+            const { index } = params;
             const currentRow = JSON.parse(
               JSON.stringify(this.tableModalTableData[index])
             );
             return h("Input", {
               props: {
-                value: currentRow.value,
+                value: currentRow.title,
                 type: "text",
-                readonly: currentRow.value == "全选" ? true : false,
+                disabled: currentRow.title == "全选" ? true : false,
               },
               on: {
                 "on-change": (e) => {
-                  currentRow.value = e.target.value;
+                  currentRow.title = e.target.value;
                   this.tableModalTableData.splice(index, 1, currentRow);
                 },
               },
@@ -636,28 +538,75 @@ export default {
           },
         },
       ],
+      sub_formModalTableData: [],
       tableModalTableData: [
-        { is_show: true, key: "selection", value: "全选" },
-        { is_show: true, key: "order_no", value: "订单编号" },
-        { is_show: true, key: "residential_name", value: "项目名称" },
-        { is_show: true, key: "nickname", value: "业务员" },
-        { is_show: true, key: "client_name", value: "客户" },
-        { is_show: true, key: "address", value: "客户地址" },
-        { is_show: true, key: "crt_name", value: "审核人" },
-        { is_show: true, key: "warning_state", value: "紧急程度" },
-        { is_show: true, key: "predict_price", value: "产品总价" },
-        { is_show: true, key: "fax_price", value: "折扣金额" },
-        { is_show: true, key: "price", value: "订单金额" },
-        { is_show: true, key: "get_money", value: "已收款" },
-        { is_show: true, key: "unget_money", value: "未收款" },
-        { is_show: true, key: "remark", value: "备注" },
-        { is_show: true, key: "start_time", value: "订单开始日期" },
-        { is_show: true, key: "end_time", value: "订单交付日期" },
-        { is_show: true, key: "complete_rate", value: "生产进度" },
-        { is_show: true, key: "state", value: "订单状态" },
-        { is_show: true, key: "crt_time", value: "订单创建时间" },
-        { is_show: true, key: "set", value: "操作" },
+        { is_show: true, key: "selection", value: "全选", title: "全选" },
+        {
+          is_show: true,
+          key: "order_no",
+          value: "订单编号",
+          title: "订单编号",
+        },
+        {
+          is_show: true,
+          key: "residential_name",
+          value: "项目名称",
+          title: "项目名称",
+        },
+        { is_show: true, key: "nickname", value: "业务员", title: "业务员" },
+        { is_show: true, key: "client_name", value: "客户姓名", title: "客户姓名" },
+        { is_show: true, key: "address", value: "客户地址", title: "客户地址" },
+        { is_show: true, key: "crt_name", value: "审核人", title: "审核人" },
+        {
+          is_show: true,
+          key: "warning_state",
+          value: "紧急程度",
+          title: "紧急程度",
+        },
+        {
+          is_show: true,
+          key: "predict_price",
+          value: "产品总价",
+          title: "产品总价",
+        },
+        {
+          is_show: true,
+          key: "fax_price",
+          value: "折扣金额",
+          title: "折扣金额",
+        },
+        { is_show: true, key: "price", value: "订单金额", title: "订单金额" },
+        { is_show: true, key: "get_money", value: "已收款", title: "已收款" },
+        { is_show: true, key: "unget_money", value: "未收款", title: "未收款" },
+        { is_show: true, key: "remark", value: "备注", title: "备注" },
+        {
+          is_show: true,
+          key: "start_time",
+          value: "订单开始日期",
+          title: "订单开始日期",
+        },
+        {
+          is_show: true,
+          key: "end_time",
+          value: "订单交付日期",
+          title: "订单交付日期",
+        },
+        {
+          is_show: true,
+          key: "complete_rate",
+          value: "生产进度",
+          title: "生产进度",
+        },
+        { is_show: true, key: "state", value: "订单状态", title: "订单状态" },
+        {
+          is_show: true,
+          key: "crt_time",
+          value: "订单创建时间",
+          title: "订单创建时间",
+        },
+        { is_show: true, key: "set", value: "操作", title: "操作" },
       ],
+      sub_tableModalTableData: [],
       tableSet: [],
       currencyPageId: null,
       chargeModal: false,
@@ -673,17 +622,102 @@ export default {
   computed: {
     ...mapState(["persimissionData"]),
     set_list() {
-      if (this.formModalTableData.length < 1) {
-        return this.list;
+      if (this.sub_formModalTableData.length < 1) {
+        this.list;
       }
-      return this.func.computedForm(this.formModalTableData, this.list);
+      return this.func.computedForm(this.sub_formModalTableData, this.list);
+    },
+    list() {
+      return [
+        {
+          title: "订单编号",
+          name: "Input",
+          placeholder: "请输入订单编号",
+          value: "",
+          serverName: "order_no",
+        },
+        {
+          title: "项目名称",
+          name: "Input",
+          placeholder: "请输入项目名称",
+          value: "",
+          serverName: "residential_name",
+        },
+        {
+          title: "客户姓名",
+          name: "Input",
+          placeholder: "请输入客户姓名",
+          value: "",
+          serverName: "client_name",
+        },
+        {
+          title: "客户地址",
+          name: "Input",
+          placeholder: "请输入客户地址",
+          value: "",
+          serverName: "address",
+        },
+        {
+          title: "业务员",
+          name: "Select",
+          placeholder: "请输入业务员",
+          filterable: true,
+          value: "",
+          serverName: "salesman",
+          optionName: "nickname",
+          optionValue: "id",
+          option: this.users,
+        },
+        {
+          title: "订单状态",
+          name: "Select",
+          placeholder: "请选择订单状态",
+          serverName: "state",
+          value: "",
+          option: [
+            { label: "全部", value: 0 },
+            { label: "测量未审核", value: 1 },
+            { label: "测量审核中", value: 2 },
+            { label: "测量通过", value: 3 },
+            { label: "生产未审核", value: 4 },
+            { label: "生产审核中", value: 5 },
+            { label: "生产通过", value: 6 },
+            { label: "到生产计划", value: 7 },
+            { label: "派工", value: 8 },
+            { label: "包装", value: 9 },
+            { label: "发货", value: 10 },
+            { label: "安装", value: 11 },
+          ],
+        },
+        {
+          title: "紧急程度",
+          name: "Select",
+          placeholder: "请选择紧急程度",
+          optionName: "title",
+          optionValue: "id",
+          serverName: "warning_state",
+          value: "",
+          option: this.warningList,
+        },
+        {
+          title: "制单人",
+          name: "Select",
+          placeholder: "请选择制单人",
+          filterable: true,
+          value: "",
+          serverName: "crt_name",
+          optionName: "nickname",
+          optionValue: "id",
+          option: this.users,
+        },
+      ];
     },
     computedTable() {
-      if (this.tableModalTableData.length < 1) {
+      if (this.sub_tableModalTableData.length < 1) {
         return this.tableColums;
       }
       return this.func.computedHeader(
-        this.tableModalTableData,
+        this.sub_tableModalTableData,
         this.tableColums
       );
     },
@@ -703,7 +737,9 @@ export default {
   },
   beforeRouteLeave(to, from, next) {
     if (to.path != "/cms/ordermannage/businessorderlist/edit") {
-      this.$destroy();
+      this.$route.meta.keepAlive = false;
+    } else {
+      this.$route.meta.keepAlive = true;
     }
     next();
   },
@@ -732,6 +768,12 @@ export default {
           res.data.tableSet.formSet.length < 1
             ? this.formModalTableData
             : res.data.tableSet.formSet;
+        this.sub_formModalTableData = JSON.parse(
+          JSON.stringify(this.formModalTableData)
+        );
+        this.sub_tableModalTableData = JSON.parse(
+          JSON.stringify(this.tableModalTableData)
+        );
       });
     },
     changePage(e) {
@@ -772,7 +814,6 @@ export default {
       this.axios
         .post("/api/order_price_add", { ...this.chargeModalForm })
         .then((res) => {
-          console.log(res);
           if (res.code == 200) {
             this.$Message.success(res.msg);
             this.chargeModal = false;
@@ -787,9 +828,9 @@ export default {
       this.axios
         .get("/api/order_price", { params: { order_no: row.order_no } })
         .then((res) => {
-          console.log(res);
           this.modalChargeTableData = res.data;
           this.chargeModal = true;
+          this.init(this.proxyObj);
         });
     },
     openLower(row, title, url) {
@@ -857,7 +898,10 @@ export default {
       this.showModal = true;
       return;
     },
-    onDragDrop(a, b, table) {
+    onDragDrop(a, b, table, type) {
+      if (type == 2 && (a == 0 || b == 0)) {
+        return this.$Message.warning("全选位置不可变");
+      }
       table.splice(b, 0, ...table.splice(a, 1));
     },
     handleModalOk() {
@@ -903,4 +947,4 @@ export default {
   display: flex;
   justify-content: center;
 }
-</style>
+</style>

+ 250 - 109
src/views/ProductionOrderList/InboundForm/index.vue

@@ -1,182 +1,323 @@
 <template>
   <div>
-    <FullPage title='包装单'
-              :list='list'
-              @init='init'
-              :loading='loading'
-              @searchData='init'
-              @changePage='changePage'
-              @changeSize='changeSize'
-              :tableColums='computedTable'
-              :tableData='tableData'
-              :pageIndex='pageIndex'
-              :total='total'>
-      <div slot='navButton'>
-        <Button v-if='persimissionData["表头设置"]||persimissionData.all'
-                @click="setupTableHeader"
-                type="primary"
-                ghost
-                icon='ios-cog'>表头设置</Button>
+    <FullPage
+      title="包装单"
+      :list="set_list"
+      @init="init"
+      :loading="loading"
+      @searchData="init"
+      @changePage="changePage"
+      @changeSize="changeSize"
+      :tableColums="computedTable"
+      :tableData="tableData"
+      :pageIndex="pageIndex"
+      :total="total"
+    >
+      <div slot="navButton">
+        <Button
+          v-if="persimissionData['表头设置'] || persimissionData.all"
+          @click="setupTableHeader"
+          type="primary"
+          ghost
+          icon="ios-cog"
+          >表头设置</Button
+        >
       </div>
-      <template slot="basicTypeSet"
-                slot-scope="{row}">
+      <template slot="basicTypeSet" slot-scope="{ row }">
         <div>
-          <span v-for="item in warningList"
-                :key="item.id"
-                :style="{color:item.color}"
-                v-show="item.id==row.warning_state">{{item.title}}</span>
+          <span
+            v-for="item in warningList"
+            :key="item.id"
+            :style="{ color: item.color }"
+            v-show="item.id == row.warning_state"
+            >{{ item.title }}</span
+          >
         </div>
       </template>
-      <template slot='set'
-                slot-scope='{row}'>
-        <a v-if='persimissionData["查看详情"]||persimissionData.all'
-           @click="goPage(row)">查看详情</a>
+      <template slot="set" slot-scope="{ row }">
+        <a
+          v-if="persimissionData['查看详情'] || persimissionData.all"
+          @click="goPage(row)"
+          >查看详情</a
+        >
       </template>
     </FullPage>
   </div>
 </template>
 
 <script>
-import { mapState } from 'vuex'
+import { mapState } from "vuex";
 export default {
-  data () {
+  data() {
     return {
-      list: [
-        { title: '订单编号', name: 'Input', placeholder: '请输入订单编号', value: '', serverName: 'order_no' },
-        { title: '小区名字', name: 'Input', placeholder: '请选择', value: '', serverName: 'residential_name' },
+      tableColums: [
         {
-          title: '订单状态', name: 'Select', placeholder: '请选择', serverName: 'sub_state', value: '',
-          option: [
-            { label: '未指派', value: 0 },
-            { label: '可以派工', value: 1 },
-            { label: '已派工', value: 2 },
-            { label: '已完成', value: 3 },
-          ]
+          title: "序号",
+          align: "center",
+          key: "index",
+          width: "100",
+          fixed: "left",
+          render: (h, params) => h("span", {}, params.index + 1),
         },
+        { title: "订单编号", align: "center", key: "order_no", minWidth: 200 },
         {
-          title: '订单类型', name: 'Select', placeholder: '请选择', serverName: 'type', value: '',
-          option: [
-            { label: '工装', value: 1 },
-            { label: '家装', value: 0 },
-          ]
-        },
-        { title: '日期范围', name: 'Input', start_server: 'start_time', end_server: 'end_time', start_value: '', end_value: '', isDate: true, start_placeholder: '开始日期', end_placeholder: '结束日期' },
-        { title: '客户昵称', name: 'Input', placeholder: '请输入客户昵称', value: '', serverName: 'client_name' },
-        { title: '手机号', name: 'Input', placeholder: '请输入手机号', value: '', serverName: 'mobile' },
-        { title: '业务员', name: 'Input', placeholder: '请输入业务员', value: '', serverName: 'salesman' },
-      ],
-      tableColums: [
+          title: "订单类型",
+          align: "center",
+          key: "type",
+          minWidth: 100,
+          render: (h, params) =>
+            h("span", {}, params.row.type == 1 ? "工装" : "家装"),
+        },
         {
-          title: '序号', align: 'center', key: 'index', width: '100', fixed: 'left',
-          render: (h, params) => h('span', {}, params.index + 1)
+          title: "小区",
+          align: "center",
+          key: "residential_name",
+          minWidth: 200,
         },
-        { title: '订单编号', align: 'center', key: 'order_no', minWidth: 200 },
+        { title: "手机号", align: "center", key: "mobile", minWidth: 200 },
         {
-          title: '订单类型', align: 'center', key: 'type', minWidth: 100,
-          render: (h, params) => h('span', {}, params.row.type == 1 ? '工装' : '家装')
+          title: "紧急程度",
+          align: "center",
+          key: "warning_state",
+          minWidth: 100,
+          slot: "basicTypeSet",
         },
-        { title: '小区', align: 'center', key: 'residential_name', minWidth: 200 },
-        { title: '手机号', align: 'center', key: 'mobile', minWidth: 200 },
-        { title: '紧急程度', align: 'center', key: 'warning_state', minWidth: 100, slot: 'basicTypeSet', },
         {
-          title: '生产进度', align: 'center', key: 'complete_rate', minWidth: 180,
-          render (h, params) {
-            return h('span', {}, parseInt(params.row.complete_rate * 100) + '%')
+          title: "生产进度",
+          align: "center",
+          key: "complete_rate",
+          minWidth: 180,
+          render(h, params) {
+            return h(
+              "span",
+              {},
+              parseInt(params.row.complete_rate * 100) + "%"
+            );
           },
         },
         {
-          title: '订单开始日期', align: 'center', key: 'start_time', minWidth: 180,
-          render: (h, params) => h('span', {}, this.func.replaceDate(params.row.start_time * 1, 1))
+          title: "订单开始日期",
+          align: "center",
+          key: "start_time",
+          minWidth: 180,
+          render: (h, params) =>
+            h("span", {}, this.func.replaceDate(params.row.start_time * 1, 1)),
+        },
+        {
+          title: "订单结束时间",
+          align: "center",
+          key: "end_time",
+          minWidth: 200,
+          render: (h, params) =>
+            h("span", {}, this.func.replaceDate(params.row.end_time * 1, 1)),
         },
+        { title: "业务员", align: "center", key: "nickname", minWidth: 150 },
         {
-          title: '订单结束时间', align: 'center', key: 'end_time', minWidth: 200,
-          render: (h, params) => h('span', {}, this.func.replaceDate(params.row.end_time * 1, 1))
+          title: "订单状态",
+          align: "center",
+          key: "state",
+          minWidth: 150,
+          render: (h, params) =>
+            h(
+              "span",
+              {},
+              params.row.sub_state == 0
+                ? "未指派"
+                : params.row.sub_state == 1
+                ? "可以派工"
+                : params.row.sub_state == 2
+                ? "已派工"
+                : "已完成"
+            ),
         },
-        { title: '业务员', align: 'center', key: 'nickname', minWidth: 150 },
         {
-          title: '订单状态', align: 'center', key: 'state', minWidth: 150,
-          render: (h, params) => h('span', {}, params.row.sub_state == 0 ? '未指派' : (params.row.sub_state == 1 ? '可以派工' : (params.row.sub_state == 2 ? '已派工' : '已完成')))
+          title: "操作",
+          align: "center",
+          key: "set",
+          slot: "set",
+          fixed: "right",
+          width: "100",
         },
-        { title: '操作', align: 'center', key: 'set', slot: 'set', fixed: 'right', width: '100', fixed: 'right' },
       ],
-      tableData: [{ order_no: '123' }],
+      tableData: [{ order_no: "123" }],
       pageIndex: 1,
       total: 0,
       pageSize: 10,
       loading: false,
       proxyObj: {},
       tableheaders: [],
-      warningList: []
-    }
+      warningList: [],
+      userList:[],
+    };
   },
-  created () {
+  created() {
     // 获取紧急程度
-    this.axios.get('/api/warning_list').then(res => { this.warningList = res.data.data })
+    this.axios.get("/api/warning_list").then((res) => {
+      this.warningList = res.data.data;
+    });
+    // 获取用户列表
+    this.axios({ method: "get", url: "/api/user" })
+      .then((res) => {
+        this.userList = res.data.data;
+      })
   },
   computed: {
-    ...mapState(['persimissionData']),
-    computedTable () {
+    ...mapState(["persimissionData"]),
+    computedTable() {
       if (this.tableheaders.length < 1) {
-        return this.tableColums
+        return this.tableColums;
       }
-      return this.func.computedHeader(this.tableheaders, this.tableColums)
+      return this.func.computedHeader(this.tableheaders, this.tableColums);
+    },
+    set_list() {
+      return [
+        {
+          title: "订单编号",
+          name: "Input",
+          placeholder: "请输入订单编号",
+          value: "",
+          serverName: "order_no",
+        },
+        {
+          title: "小区名字",
+          name: "Input",
+          placeholder: "请输入小区名字",
+          value: "",
+          serverName: "residential_name",
+        },
+        {
+          title: "订单状态",
+          name: "Select",
+          placeholder: "请选择",
+          serverName: "sub_state",
+          value: "",
+          option: [
+            { label: "未指派", value: 0 },
+            { label: "可以派工", value: 1 },
+            { label: "已派工", value: 2 },
+            { label: "已完成", value: 3 },
+          ],
+        },
+        {
+          title: "订单类型",
+          name: "Select",
+          placeholder: "请选择",
+          serverName: "type",
+          value: "",
+          option: [
+            { label: "工装", value: 1 },
+            { label: "家装", value: 0 },
+          ],
+        },
+        {
+          title: "日期范围",
+          name: "Input",
+          start_server: "start_time",
+          end_server: "end_time",
+          start_value: "",
+          end_value: "",
+          isDate: true,
+          start_placeholder: "开始日期",
+          end_placeholder: "结束日期",
+        },
+        {
+          title: "客户",
+          name: "Input",
+          placeholder: "请输入客户昵称",
+          value: "",
+          serverName: "client_name",
+        },
+        {
+          title: "手机号",
+          name: "Input",
+          placeholder: "请输入手机号",
+          value: "",
+          serverName: "mobile",
+        },
+        {
+          title: "业务员",
+          name: "Select",
+          placeholder: "请选择业务员",
+          value: "",
+          optionValue: "id",
+          optionName: "nickname",
+          serverName: "salesman",
+          option: this.userList,
+        },
+        {
+          title: "紧急程度",
+          name: "Select",
+          placeholder: "请选择",
+          serverName: "warning_state",
+          optionValue: "id",
+          optionName: "title",
+          value: "",
+          option: this.warningList,
+        },
+      ];
     },
   },
 
   methods: {
-    init (row) {
-      this.pageIndex = 1
+    init(row) {
+      this.pageIndex = 1;
       row.page_index = this.pageIndex;
       row.page_size = this.pageSize;
-      this.proxyObj = row
-      this.getData(row)
+      this.proxyObj = row;
+      this.getData(row);
     },
-    getData (row) {
+    getData(row) {
       this.loading = true;
-      this.axios('/api/orders_in_list', { params: row }).then(res => {
+      this.axios("/api/orders_in_list", { params: row }).then((res) => {
         this.loading = false;
         this.tableData = res.data.data;
         this.total = res.data.total;
-        this.tableheaders = res.data.tableSet || []
-      })
+        this.tableheaders = res.data.tableSet || [];
+      });
     },
-    changePage (e) {
+    changePage(e) {
       this.pageIndex = e;
       this.proxyObj.page_index = this.pageIndex;
-      this.getData(this.proxyObj)
+      this.getData(this.proxyObj);
     },
-    changeSize (e) {
+    changeSize(e) {
       this.pageSize = e;
       this.proxyObj.page_size = this.pageSize;
-      this.getData(this.proxyObj)
+      this.getData(this.proxyObj);
     },
-    goPage (row) {
+    goPage(row) {
       this.$router.push({
-        path: '/cms/productionorderlist/inboundform/details',
+        path: "/cms/productionorderlist/inboundform/details",
         query: {
           order_no: row.order_no,
-          type: 4
-        }
-      })
+          type: 4,
+        },
+      });
     },
-    setupTableHeader () {
-      this.tableheaders.length < 1 ? this.tableheaders = this.tableColums.reduce((pre, cur) => pre.concat(cur.key), []) : ''
+    setupTableHeader() {
+      this.tableheaders.length < 1
+        ? (this.tableheaders = this.tableColums.reduce(
+            (pre, cur) => pre.concat(cur.key),
+            []
+          ))
+        : "";
       this.$setTableheader({
         list: this.tableColums,
         selects: this.tableheaders,
         then: (result) => {
-          this.tableheaders = result
-          this.axios.post('/api/update/table', { id: this.$route.query.id, result }).then(res => {
-            if (res.code == 200) {
-              this.$Message.success(res.msg)
-            }
-          })
-        }
-      })
+          this.tableheaders = result;
+          this.axios
+            .post("/api/update/table", { id: this.$route.query.id, result })
+            .then((res) => {
+              if (res.code == 200) {
+                this.$Message.success(res.msg);
+              }
+            });
+        },
+      });
     },
-
-  }
-}
+  },
+};
 </script>
 
 <style lang="scss" scoped>

Bu fark içinde çok fazla dosya değişikliği olduğu için bazı dosyalar gösterilmiyor