Andy 4 anos atrás
pai
commit
a35df4e8ec

+ 277 - 23
src/views/BidSystem/ContractList/edit.vue

@@ -11,6 +11,12 @@
     >
       <slot name="titleButton">
         <Button
+          @click="showForms = true"
+          type="primary"
+          style="margin-right: 10px"
+          >表单设置</Button
+        >
+        <Button
           type="primary"
           style="margin-right: 10px"
           :disabled="isChecked"
@@ -43,7 +49,10 @@
     </Toptitle>
     <div class="top_search">
       <Form :model="formData" :label-width="100" class="top_search_form">
-        <FormItem label="订单号:">
+        <FormItem
+          v-if="formSetTableData.filter((v) => v.key == 'order_no')[0].is_show"
+          :label="formSetTableData.filter((v) => v.key == 'order_no')[0].title"
+        >
           <Input
             type="text"
             size="small"
@@ -53,7 +62,15 @@
             style="width: 200px"
           />
         </FormItem>
-        <FormItem label="项目名称:">
+        <FormItem
+          v-if="
+            formSetTableData.filter((v) => v.key == 'residential_name')[0]
+              .is_show
+          "
+          :label="
+            formSetTableData.filter((v) => v.key == 'residential_name')[0].title
+          "
+        >
           <Input
             type="text"
             :disabled="isChecked"
@@ -63,7 +80,10 @@
             style="width: 200px"
           />
         </FormItem>
-        <FormItem label="客户姓名:">
+        <FormItem
+          v-if="formSetTableData.filter((v) => v.key == 'custom_id')[0].is_show"
+          :label="formSetTableData.filter((v) => v.key == 'custom_id')[0].title"
+        >
           <Select
             clearable
             filterable
@@ -81,7 +101,14 @@
             ></Option>
           </Select>
         </FormItem>
-        <FormItem label="紧急程度:">
+        <FormItem
+          v-if="
+            formSetTableData.filter((v) => v.key == 'warning_state')[0].is_show
+          "
+          :label="
+            formSetTableData.filter((v) => v.key == 'warning_state')[0].title
+          "
+        >
           <Select
             v-model="formData.warning_state"
             :disabled="isChecked"
@@ -96,7 +123,14 @@
             ></Option>
           </Select>
         </FormItem>
-        <FormItem label="项目定金:">
+        <FormItem
+          v-if="
+            formSetTableData.filter((v) => v.key == 'front_money')[0].is_show
+          "
+          :label="
+            formSetTableData.filter((v) => v.key == 'front_money')[0].title
+          "
+        >
           <Input
             type="text"
             size="small"
@@ -113,7 +147,15 @@
                    :disabled="isChecked">已收款</Radio>
           </RadioGroup> -->
         </FormItem>
-        <FormItem label="详细地址:">
+        <FormItem
+          v-if="
+            formSetTableData.filter((v) => v.key == 'custom_detail_id')[0]
+              .is_show
+          "
+          :label="
+            formSetTableData.filter((v) => v.key == 'custom_detail_id')[0].title
+          "
+        >
           <Select
             clearable
             filterable
@@ -131,7 +173,15 @@
             ></Option>
           </Select>
         </FormItem>
-        <FormItem label="手机号:">
+        <FormItem
+          v-if="
+            formSetTableData.filter((v) => v.key == 'custom_detail_id')[0]
+              .is_show
+          "
+          :label="
+            formSetTableData.filter((v) => v.key == 'custom_detail_id')[0].title
+          "
+        >
           <Select
             clearable
             filterable
@@ -149,7 +199,14 @@
             ></Option>
           </Select>
         </FormItem>
-        <FormItem label="开始日期:">
+        <FormItem
+          v-if="
+            formSetTableData.filter((v) => v.key == 'start_time')[0].is_show
+          "
+          :label="
+            formSetTableData.filter((v) => v.key == 'start_time')[0].title
+          "
+        >
           <DatePicker
             type="date"
             size="small"
@@ -161,7 +218,10 @@
             style="width: 200px"
           ></DatePicker>
         </FormItem>
-        <FormItem label="结束日期:">
+        <FormItem
+          v-if="formSetTableData.filter((v) => v.key == 'end_time')[0].is_show"
+          :label="formSetTableData.filter((v) => v.key == 'end_time')[0].title"
+        >
           <DatePicker
             type="date"
             size="small"
@@ -173,7 +233,10 @@
             style="width: 200px"
           ></DatePicker>
         </FormItem>
-        <FormItem label="业务员:">
+        <FormItem
+          v-if="formSetTableData.filter((v) => v.key == 'salesman')[0].is_show"
+          :label="formSetTableData.filter((v) => v.key == 'salesman')[0].title"
+        >
           <Select
             v-model="formData.salesman"
             filterable
@@ -215,7 +278,10 @@
             style="width: 200px"
           />
         </FormItem>
-        <FormItem label="备注:">
+        <FormItem
+          v-if="formSetTableData.filter((v) => v.key == 'remark')[0].is_show"
+          :label="formSetTableData.filter((v) => v.key == 'remark')[0].title"
+        >
           <Input
             type="textarea"
             :disabled="isChecked"
@@ -1008,6 +1074,22 @@
         <Button type="primary" @click="handleAddInputConfirm">确认</Button>
       </div>
     </Modal>
+    <!-- 表单设置 -->
+    <Modal
+      v-model="showForms"
+      @on-ok="postForms(1)"
+      class-name="vertical-center-modal"
+      style="max-height: 700px; overflow: hidden; overflow-y: auto"
+      title="表单设置"
+    >
+      <Table
+        :max-height="600"
+        border
+        :columns="formSetTableColumns"
+        :data="post_formSetTableData"
+      >
+      </Table>
+    </Modal>
   </div>
 </template>
 
@@ -1219,6 +1301,134 @@ export default {
       clientList: [],
       clientDetailList: [],
       type: this.$route.query.type,
+      showForms: false,
+      formSetTableData: [
+        {
+          is_show: true,
+          key: "order_no",
+          value: "订单编号",
+          title: "订单编号",
+        },
+        {
+          is_show: true,
+          key: "residential_name",
+          value: "项目名称",
+          title: "项目名称",
+        },
+        {
+          is_show: true,
+          key: "custom_id",
+          value: "客户姓名",
+          title: "客户姓名",
+        },
+        {
+          is_show: true,
+          key: "warning_state",
+          value: "紧急程度",
+          title: "紧急程度",
+        },
+        {
+          is_show: true,
+          key: "front_money",
+          value: "项目定金",
+          title: "项目定金",
+        },
+        {
+          is_show: true,
+          key: "custom_detail_id",
+          value: "详细地址",
+          title: "详细地址",
+        },
+        {
+          is_show: true,
+          key: "custom_detail_id",
+          value: "手机号",
+          title: "手机号",
+        },
+        {
+          is_show: true,
+          key: "start_time",
+          value: "开始日期",
+          title: "开始日期",
+        },
+        {
+          is_show: true,
+          key: "end_time",
+          value: "结束日期",
+          title: "结束日期",
+        },
+        {
+          is_show: true,
+          key: "salesman",
+          value: "业务员",
+          title: "业务员",
+        },
+        {
+          is_show: true,
+          key: "remark",
+          value: "备注",
+          title: "备注",
+        },
+      ],
+      formSetTableColumns: [
+        {
+          title: "是否展示",
+          align: "center",
+          key: "is_show",
+          minWidth: 120,
+          render: (h, params) => {
+            const { index } = params;
+            const currentRow = JSON.parse(
+              JSON.stringify(this.post_formSetTableData[index])
+            );
+            return h("Checkbox", {
+              props: {
+                value: currentRow.is_show,
+                // disabled:
+                //   currentRow.key == "fax_price" ||
+                //   currentRow.key == "remark",
+              },
+              on: {
+                "on-change": (e) => {
+                  currentRow.is_show = e;
+                  this.post_formSetTableData.splice(index, 1, currentRow);
+                },
+              },
+            });
+          },
+        },
+        {
+          title: "字段名",
+          align: "center",
+          key: "value",
+          minWidth: 180,
+        },
+        {
+          title: "展示名称",
+          align: "center",
+          key: "title",
+          minWidth: 180,
+          render: (h, params) => {
+            const { index } = params;
+            const currentRow = JSON.parse(
+              JSON.stringify(this.post_formSetTableData[index])
+            );
+            return h("Input", {
+              props: {
+                value: currentRow.title,
+                type: "text",
+              },
+              on: {
+                "on-change": (e) => {
+                  currentRow.title = e.target.value;
+                  this.post_formSetTableData.splice(index, 1, currentRow);
+                },
+              },
+            });
+          },
+        },
+      ],
+      post_formSetTableData: [],
     };
   },
   // 生命周期 - 创建完成(可以访问当前this实例)
@@ -1240,6 +1450,7 @@ export default {
     this.axios.get("/api/custom_list").then((res) => {
       this.clientList = res.data.data;
     });
+    this.get_forms();
   },
   // 生命周期 - 挂载完成(可以访问DOM元素)
   mounted() {
@@ -1286,9 +1497,7 @@ export default {
         },
       }).then((res) => {
         this.formData = res.data;
-        // console.log('supTableData :>> ', this.supTableData);
         this.supTableData = res.data.ext;
-        // console.log('supTableData :>> ', this.supTableData);
         if (this.formData.list.length == 0) {
           this.formData.list.push({
             areaIndex: 1,
@@ -1511,12 +1720,14 @@ export default {
     },
     postData() {
       this.formData.list.map((list) => {
-        list.product.map((product) => {
-          product.special &&
-            product.special.map((value) => {
-              value.value = product[value.key];
-            });
-        });
+        list.product &&
+          list.product.length > 0 &&
+          list.product.map((product) => {
+            product.special &&
+              product.special.map((value) => {
+                value.value = product[value.key];
+              });
+          });
       });
       //1新增 2编辑
       let ip;
@@ -1652,7 +1863,6 @@ export default {
     },
     //新增产品添加
     handleAddPDTAdd(index, row) {
-      console.log("row :>> ", row);
       this.tempPDTList.splice(index + 1, 0, {
         addPDTProcessAttrList: [],
         measure: "",
@@ -1731,6 +1941,50 @@ export default {
         this.showPDTModal = false;
       });
     },
+    get_forms() {
+      this.axios
+        .post("/api/update/get_table", { id: "ContractList_edit" })
+        .then((res) => {
+          if (Array.isArray(res.data)) {
+            this.post_formSetTableData = JSON.parse(
+              JSON.stringify(this.formSetTableData)
+            );
+          } else {
+            if (res.data.table.formSet && res.data.table.formSet.length > 0) {
+              this.formSetTableData = JSON.parse(
+                JSON.stringify(res.data.table.formSet)
+              );
+              this.post_formSetTableData = JSON.parse(
+                JSON.stringify(res.data.table.formSet)
+              );
+            } else {
+              this.post_formSetTableData = JSON.parse(
+                JSON.stringify(this.formSetTableData)
+              );
+            }
+          }
+        });
+    },
+    postForms(n) {
+      this.post_formSetTableData.forEach((element, index) => {
+        element.sort = index;
+      });
+      this.axios({
+        method: "post",
+        url: "/api/update/table",
+        data: {
+          id: "ContractList_edit",
+          result: {
+            formSet: this.post_formSetTableData,
+          },
+        },
+      }).then((res) => {
+        if (res.code == 200) {
+          this.$Message.success(res.msg);
+          this.get_forms();
+        }
+      });
+    },
     // 编辑产品→确认
     handlePDTEditConfirm() {
       this.PDTEdit.process_property = "";
@@ -2247,9 +2501,9 @@ export default {
     }
   }
   /deep/ .ivu-modal-body {
-    display: flex;
-    justify-content: center;
-    flex-wrap: wrap;
+    // display: flex;
+    // justify-content: center;
+    // flex-wrap: wrap;
     max-height: 700px;
     overflow: hidden;
     overflow-y: auto;

+ 66 - 47
src/views/BidSystem/ContractList/info.vue

@@ -443,6 +443,7 @@
         </div>
         <div ref="footercenter" class="footer-center">
           <Page
+            transfer
             :total="total"
             :current.sync="page_index"
             :show-total="true"
@@ -649,10 +650,10 @@
           ></DatePicker>
         </div>
       </div>
-        <div slot="footer">
-          <Button @click="processModal = false">取消</Button>
-          <Button type="primary" @click="handleProcess">确认</Button>
-        </div>
+      <div slot="footer">
+        <Button @click="processModal = false">取消</Button>
+        <Button type="primary" @click="handleProcess">确认</Button>
+      </div>
     </Modal>
     <!-- 表单设置 -->
     <Modal
@@ -827,7 +828,7 @@ export default {
         },
       ],
       supTableColumns: [
-        { title: "序号", type: "index", align: "center", minWidth: 100  },
+        { title: "序号", type: "index", align: "center", minWidth: 100 },
         {
           title: "辅料名称",
           key: "title",
@@ -835,7 +836,13 @@ export default {
           slot: "combine",
           minWidth: 150,
         },
-        { title: "操作", key: "set", align: "center", slot: "supSet", minWidth: 100  },
+        {
+          title: "操作",
+          key: "set",
+          align: "center",
+          slot: "supSet",
+          minWidth: 100,
+        },
       ],
       listTableColumns: [
         { type: "selection", align: "center", minWidth: 100 },
@@ -1177,22 +1184,23 @@ export default {
       this.axios
         .post("/api/update/get_table", { id: "ContractList_info" })
         .then((res) => {
-          if (
-            Array.isArray(res.data) &&
-            res.data.length > 0 &&
-            res.data.table.formSet &&
-            res.data.table.formSet.length > 0
-          ) {
-            this.formSetTableData = JSON.parse(
-              JSON.stringify(res.data.table.formSet)
-            );
-            this.post_formSetTableData = JSON.parse(
-              JSON.stringify(res.data.table.formSet)
-            );
-          } else {
+          if (Array.isArray(res.data)) {
             this.post_formSetTableData = JSON.parse(
               JSON.stringify(this.formSetTableData)
             );
+          } else {
+            if (res.data.table.formSet && res.data.table.formSet.length > 0) {
+              this.formSetTableData = JSON.parse(
+                JSON.stringify(res.data.table.formSet)
+              );
+              this.post_formSetTableData = JSON.parse(
+                JSON.stringify(res.data.table.formSet)
+              );
+            } else {
+              this.post_formSetTableData = JSON.parse(
+                JSON.stringify(this.formSetTableData)
+              );
+            }
           }
         });
     },
@@ -1210,7 +1218,7 @@ export default {
       }).then((res) => {
         if (res.code == 200) {
           this.formData = res.data;
-          this.supTableData = res.data.ext
+          this.supTableData = res.data.ext;
           if (this.formData.list.length == 0) {
             this.formData.list.push({
               areaIndex: 1,
@@ -1670,33 +1678,44 @@ export default {
     },
     handleProcess() {
       if (this.process_man) {
-        const order_area_product_id = this.selected.map(
-          (item) => item.order_area_product_id || item.id
-        );
-        this.axios({
-          method: "get",
-          url: "/api/order_area_detail_pull",
-          params: {
-            order_no: this.order_no,
-            type: 1,
-            sub_state: 1,
-            order_area_product_id,
-            process_man: this.process_man,
-            process_start_time: this.process_start_time
-              ? this.func.replaceDateNoHMS(this.process_start_time)
-              : "",
-            process_end_time: this.process_end_time
-              ? this.func.replaceDateNoHMS(this.process_end_time)
-              : "",
-          },
-        }).then((res) => {
-          if (res.code == 200) {
-            this.$Message.success(res.msg);
-            this.selected = [];
-            this.getListData();
-            this.initData(this.$route.query.order_no);
+        let flag = true;
+        this.selected.map((item) => {
+          if (item.sub_state > 1) {
+            flag = false;
           }
         });
+        if (!flag) {
+          this.$Message.warning("选择数据中存在已下深化产品,请重新选择");
+        } else {
+          const order_area_product_id = this.selected.map(
+            (item) => item.order_area_product_id || item.id
+          );
+          this.axios({
+            method: "get",
+            url: "/api/order_area_detail_pull",
+            params: {
+              order_no: this.order_no,
+              type: 1,
+              sub_state: 1,
+              order_area_product_id,
+              process_man: this.process_man,
+              process_start_time: this.process_start_time
+                ? this.func.replaceDateNoHMS(this.process_start_time)
+                : "",
+              process_end_time: this.process_end_time
+                ? this.func.replaceDateNoHMS(this.process_end_time)
+                : "",
+            },
+          }).then((res) => {
+            if (res.code == 200) {
+              this.$Message.success(res.msg);
+              this.selected = [];
+              this.processModal = false;
+              this.getListData();
+              this.initData(this.$route.query.order_no);
+            }
+          });
+        }
       } else {
         this.$Message.warning("请选择人员");
       }
@@ -1970,8 +1989,8 @@ export default {
   margin-bottom: 10px;
 }
 /deep/.ivu-modal-body {
-  display: flex;
-  justify-content: center;
+  // display: flex;
+  // justify-content: center;
   .addInputClass {
     display: flex;
     justify-content: center;

+ 9 - 15
src/views/BidSystem/ContractList/list.vue

@@ -263,28 +263,22 @@ export default {
               "span",
               {},
               params.row.state == 0
-                ? "订单审核中"
+                ? "订单制作中"
                 : params.row.state == 1
                 ? "深化中"
                 : params.row.state == 2
-                ? "深化审核中"
-                : params.row.state == 3
                 ? "拆单中"
+                : params.row.state == 3
+                ? "生产订单"
                 : params.row.state == 4
-                ? "拆单审核中"
+                ? "计划订单"
                 : params.row.state == 5
-                ? "生产审核中"
+                ? "派工订单"
                 : params.row.state == 6
-                ? "到计划生产"
-                : params.row.state == 7
-                ? "派工"
-                : params.row.state == 8
-                ? "包装"
-                : params.row.state == 9
-                ? "发货"
-                : params.row.state == 10
-                ? "安装"
-                : "订单审核中"
+                ? "已完成"
+                : params.row.state == 99
+                ? "全部"
+                : "订单制作中"
             ),
         },
         {

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

@@ -214,7 +214,7 @@
                 <template slot="set" slot-scope="{ row, index }">
                   <a
                     style="margin:0 5px"
-                    :disabled="row.status == 1"
+                    :disabled="row.sub_state == 2"
                     @click="handleSet(row, index, 1, item)"
                     >深化</a
                   >
@@ -248,44 +248,68 @@
               class="top_search_form"
             >
               <FormItem label="区域编码:">
-                <Input
-                  type="text"
-                  size="small"
+                <Select
+                  filterable
                   clearable
                   v-model="searchData.area_no"
-                  placeholder="请输入区域编码"
-                  style="width: 120px"
-                />
+                  size="small"
+                  style="width:120px"
+                >
+                  <Option
+                    v-for="(_item, _index) in area_no_list"
+                    :key="_index"
+                    :label="_item"
+                    :value="_item"
+                  ></Option>
+                </Select>
               </FormItem>
               <FormItem label="区域名称:">
-                <Input
-                  type="text"
-                  size="small"
+                <Select
+                  filterable
                   clearable
                   v-model="searchData.area_title"
-                  placeholder="请输入区域名称"
-                  style="width: 120px"
-                />
+                  size="small"
+                  style="width:120px"
+                >
+                  <Option
+                    v-for="(_item, _index) in area_title_list"
+                    :key="_index"
+                    :label="_item"
+                    :value="_item"
+                  ></Option>
+                </Select>
               </FormItem>
               <FormItem label="产品名称:">
-                <Input
-                  type="text"
-                  size="small"
+                <Select
+                  filterable
                   clearable
                   v-model="searchData.product_title"
-                  placeholder="请输入产品名称"
-                  style="width: 120px"
-                />
+                  size="small"
+                  style="width:120px"
+                >
+                  <Option
+                    v-for="(_item, _index) in product_title_list"
+                    :key="_index"
+                    :label="_item"
+                    :value="_item"
+                  ></Option>
+                </Select>
               </FormItem>
               <FormItem label="图号:">
-                <Input
-                  type="text"
-                  size="small"
+                <Select
+                  filterable
                   clearable
                   v-model="searchData.url_number"
-                  placeholder="请输入图号"
-                  style="width: 120px"
-                />
+                  size="small"
+                  style="width:120px"
+                >
+                  <Option
+                    v-for="(_item, _index) in url_number_list"
+                    :key="_index"
+                    :label="_item"
+                    :value="_item"
+                  ></Option>
+                </Select>
               </FormItem>
               <FormItem label="状态:">
                 <Select
@@ -382,7 +406,7 @@
             <template slot="set" slot-scope="{ row, index }">
               <a
                 style="margin:0 5px"
-                :disabled="row.sub_state == 1"
+                :disabled="row.sub_state == 2"
                 @click="handleSet(row, index, 1, formData)"
                 >深化</a
               >
@@ -899,7 +923,23 @@ export default {
             });
           },
         },
-        { title: "左右式", key: "title", align: "center", minWidth: 100 },
+        {
+          title: "左右式",
+          key: "left_right_mode",
+          align: "center",
+          minWidth: 100,
+          render: (h, params) => {
+            return h(
+              "span",
+              {},
+              params.row.left_right_mode == 1
+                ? "左式"
+                : params.row.left_right_mode == 2
+                ? "右式"
+                : ""
+            );
+          },
+        },
         { title: "图号", key: "url_number", align: "center", minWidth: 100 },
         { title: "备注", key: "remark", align: "center", minWidth: 100 },
         {
@@ -917,6 +957,10 @@ export default {
           slot: "set",
         },
       ],
+      area_no_list: [],
+      area_title_list: [],
+      product_title_list: [],
+      url_number_list: [],
     };
   },
   // 生命周期 - 创建完成(可以访问当前this实例)
@@ -970,8 +1014,10 @@ export default {
         })
         .then((res) => {
           this.listTableData = res.data.data;
-          // this.supTableData = res.data.ext
-
+          this.area_no_list = res.data.area_no;
+          this.area_title_list = res.data.area_title;
+          this.product_title_list = res.data.product_title;
+          this.url_number_list = res.data.url_number;
           this.listTableData.map((item) => {
             !item.url && (item.url = []);
             res.data.imgs.map((element) => {
@@ -1017,6 +1063,7 @@ export default {
         },
       }).then((res) => {
         this.formData = res.data;
+        this.supTableData = res.data.ext;
         // 产品特殊字段→ 弹窗窗口,table表头
         let arr = [];
         res.data.head[3] &&

+ 69 - 40
src/views/BidSystem/DeepeningOrder/edit.vue

@@ -39,7 +39,10 @@
           </span>
         </div>
       </div>
-      <div><span>左右式:</span>{{ formData.left_right_mode }}</div>
+      <div>
+        <span>左右式:</span
+        >{{ formData.left_right_mode == 1 ? "左式" : "右式" }}
+      </div>
       <div><span>价格:</span>{{ formData.price }}</div>
       <div><span>备注:</span>{{ formData.remark }}</div>
     </div>
@@ -220,11 +223,11 @@
                 value: 'id',
                 label: 'title',
                 emitPath: false,
-                checkStrictly:true
+                checkStrictly: true,
               }"
             ></el-cascader>
-              <!-- @change="changeProduct(tableData[index], index)" -->
-            <span v-else>{{ tableData[index].title }}</span>
+            <!-- @change="changeProduct(tableData[index], index)" -->
+            <span v-else>{{ tableData[index].type_title }}</span>
           </template>
           <template slot="titleSet" slot-scope="{ index }">
             <Input
@@ -422,13 +425,20 @@ export default {
       headers: { Authorization: localStorage.getItem("token") },
       formData: {},
       tableColumns: [
-        { title: "序号", key: "index", align: "center", width: "80" },
+        {
+          title: "序号",
+          key: "index",
+          align: "center",
+          width: "80",
+          resizable: true,
+        },
         {
           title: "楼栋",
           key: "house",
           align: "center",
           width: "100",
           slot: "houseSet",
+          resizable: true,
         },
         {
           title: "楼单元",
@@ -436,6 +446,7 @@ export default {
           align: "center",
           width: "100",
           slot: "unitSet",
+          resizable: true,
         },
         {
           title: "楼层",
@@ -443,6 +454,7 @@ export default {
           align: "center",
           width: "100",
           slot: "layerSet",
+          resizable: true,
         },
         {
           title: "房间号",
@@ -450,14 +462,15 @@ export default {
           align: "center",
           width: "100",
           slot: "numberSet",
+          resizable: true,
         },
-
         {
           title: "产品分类",
           key: "title",
           align: "center",
           minWidth: 200,
           slot: "type_titleSet",
+          resizable: true,
         },
         {
           title: "产品",
@@ -465,6 +478,7 @@ export default {
           align: "center",
           minWidth: 100,
           slot: "titleSet",
+          resizable: true,
         },
         // {
         //   title: "价格",
@@ -479,6 +493,7 @@ export default {
           align: "center",
           minWidth: 100,
           slot: "product_unitSet",
+          resizable: true,
         },
         {
           title: "位置",
@@ -486,6 +501,7 @@ export default {
           align: "center",
           minWidth: 100,
           slot: "positionSet",
+          resizable: true,
         },
         {
           title: "图纸",
@@ -493,6 +509,7 @@ export default {
           align: "center",
           minWidth: 100,
           slot: "urlSet",
+          resizable: true,
         },
         {
           title: "图号",
@@ -500,6 +517,7 @@ export default {
           align: "center",
           minWidth: 120,
           slot: "url_numberSet",
+          resizable: true,
         },
         {
           title: "型号",
@@ -507,6 +525,7 @@ export default {
           align: "center",
           minWidth: 120,
           slot: "modelSet",
+          resizable: true,
         },
         this.$route.query.type == 1
           ? {
@@ -516,6 +535,7 @@ export default {
               minWidth: 120,
               fixed: "right",
               slot: "set",
+              resizable: true,
             }
           : { width: 1 },
       ],
@@ -540,18 +560,19 @@ export default {
     this.order_no = this.$route.query.order_no;
     this.order_area_id = this.$route.query.order_area_id;
     this.order_area_product_id = this.$route.query.order_area_product_id;
-    this.initData(
-      this.order_no,
-      this.order_area_id,
-      this.order_area_product_id
-    );
     // 获取产品分类
     this.axios.get("/api/basics_product_index").then((res) => {
       this.cascader_list = res.data.data;
     });
   },
   // 生命周期 - 挂载完成(可以访问DOM元素)
-  mounted() {},
+  mounted() {
+    this.initData(
+      this.order_no,
+      this.order_area_id,
+      this.order_area_product_id
+    );
+  },
   methods: {
     successKey(str) {
       // this.$nextTick(()=>{
@@ -602,7 +623,7 @@ export default {
         url: [],
         url_number: "",
         model: "",
-        type_id:this.formData.type_id,
+        type_id: this.formData.type_id,
         ...this.tempAddCol,
       });
       this.tableData.forEach((el, index) => {
@@ -618,35 +639,43 @@ export default {
           order_area_id,
           order_area_product_id,
         },
-      })
-        .then((res) => {
-          this.formData = res.data;
-          this.tableData = res.data.detail;
-          this.tableData.forEach((el, index) => {
-            el.index = index + 1;
-            let tempM = el.measure.split("*");
-            tempM.forEach((item) => {
-              el[item.substring(0, 1)] = item.substring(1);
-            });
-            if (!el.type_id) {
-              el.type_id = this.formData.type_id
-            }
+      }).then((res) => {
+        this.formData = res.data;
+        this.tableData = res.data.detail;
+        this.tableData.forEach((el, index) => {
+          el.index = index + 1;
+          let tempM = el.measure.split("*");
+          tempM.forEach((item) => {
+            el[item.substring(0, 1)] = item.substring(1);
           });
-          let tempArr = [];
-          this.measureList = res.data.measures;
-          this.formData.measures.forEach((el, index) => {
-            this.tempAddCol[el.e_title] = "";
-            tempArr.push({
-              title: el.title,
-              key: el.e_title,
-              align: "center",
-              width: "150",
-              slot: `formula_${el.e_title}`,
-            });
+          if (!el.type_id) {
+            el.type_id = this.formData.type_id;
+          }
+          el.type_title = this.get_type_title(this.cascader_list, el)[0];
+        });
+        let tempArr = [];
+        this.measureList = res.data.measures;
+        this.formData.measures.forEach((el, index) => {
+          this.tempAddCol[el.e_title] = "";
+          tempArr.push({
+            title: el.title,
+            key: el.e_title,
+            align: "center",
+            width: "150",
+            slot: `formula_${el.e_title}`,
           });
-          this.tableColumns = [...this.tableColumns, ...tempArr];
-        })
-        .catch((err) => {});
+        });
+        this.tableColumns = [...this.tableColumns, ...tempArr];
+      });
+    },
+    get_type_title(source, target) {
+      return source.map((item) => {
+        if (item.id == target.type_id) {
+          return item.title;
+        } else {
+          return this.get_type_title(item.child, target);
+        }
+      });
     },
     goback() {
       this.$router.go(-1);

+ 14 - 1
src/views/BidSystem/DeepeningOrder/info.vue

@@ -2,12 +2,25 @@
   <div class="BidSystemDeepeningOrderDetail">
     <Toptitle title="深化单详情">
       <slot name="titleButton">
-        <Button
+        <!-- <Button
           @click="handleFinish()"
           type="primary"
           style="margin-right: 10px"
           >完成</Button
+        > -->
+        <Upload
+          style="display: inline"
+          name="your_file"
+          :show-upload-list="false"
+          :headers="headers"
+          :on-error="uploadError"
+          :on-success="uploadSuccess"
+          :action="$store.state.ip + '/api/order_area_product_import'"
         >
+          <Button type="primary" style="margin-right: 10px"
+            >导入</Button
+          >
+        </Upload>
         <Button
           @click="showSupModal = true"
           type="primary"

+ 47 - 6
src/views/BidSystem/ProductDeOrder/detail.vue

@@ -211,23 +211,61 @@ export default {
       product: [{}],
       searchData: {},
       tableColumns: [
-        { title: "序号", type: "index", align: "center", minWidth: 80 },
-        { title: "产品名称", key: "title", align: "center", minWidth: 120 },
-        { title: "计量单位", key: "unit", align: "center", minWidth: 100 },
-        { title: "图号", key: "url_number", align: "center", minWidth: 80 },
-        { title: "数量", key: "num", align: "center", minWidth: 80 },
-        { title: "规格", key: "measure", align: "center", minWidth: 140 },
+        {
+          title: "序号",
+          type: "index",
+          align: "center",
+          minWidth: 80,
+          resizable: true,
+        },
+        {
+          title: "产品名称",
+          key: "title",
+          align: "center",
+          minWidth: 120,
+          resizable: true,
+        },
+        {
+          title: "计量单位",
+          key: "unit",
+          align: "center",
+          minWidth: 100,
+          resizable: true,
+        },
+        {
+          title: "图号",
+          key: "url_number",
+          align: "center",
+          minWidth: 80,
+          resizable: true,
+        },
+        {
+          title: "数量",
+          key: "num",
+          align: "center",
+          minWidth: 80,
+          resizable: true,
+        },
+        {
+          title: "规格",
+          key: "measure",
+          align: "center",
+          minWidth: 140,
+          resizable: true,
+        },
         {
           title: "工艺属性",
           key: "process_property",
           align: "center",
           minWidth: 140,
+          resizable: true,
           tooltip: true,
         },
         {
           title: "图纸",
           key: "url",
           align: "center",
+          resizable: true,
           minWidth: 80,
           render: (h, params) => {
             const { row } = params;
@@ -268,6 +306,7 @@ export default {
           title: "左右式",
           key: "left_right_mode",
           align: "center",
+          resizable: true,
           minWidth: 80,
           render: (h, params) => {
             const { row } = params;
@@ -278,6 +317,7 @@ export default {
           title: "拆单状态",
           key: "product_id",
           align: "center",
+          resizable: true,
           minWidth: 80,
           render: (h, params) => {
             const { row } = params;
@@ -292,6 +332,7 @@ export default {
           slot: "set",
           minWidth: 80,
           fixed: "right",
+          resizable: true,
         },
       ],
       //产品分类列表

+ 5 - 3
src/views/Dispatching/Dispatching.vue

@@ -159,7 +159,7 @@ export default {
       total: 0,
       basicsProcedureList: [],
       groupList: [],
-      currencyTag: 1,
+      currencyTag: '1',
       dispatchTime: [],
       selected: [],
       showModal: false,
@@ -177,7 +177,7 @@ export default {
   // 生命周期 - 创建完成(可以访问当前this实例)
   created () {
     // 获取工序分类列表
-    this.axios({ method: 'get', url: '/api/basics_procedure_index', }).then((res) => { this.basicsProcedureList = res.data.data, this.currencyTag = localStorage.getItem('dispatchTag') }).catch((err) => { });
+    this.axios({ method: 'get', url: '/api/basics_procedure_index', }).then((res) => { this.basicsProcedureList = res.data.data, this.currencyTag = localStorage.getItem('dispatchTag')||this.currencyTag+''}).catch((err) => { });
     //获取班组列表
     this.axios('/api/employee_list', { params: { type: 3 } }).then(res => this.groupList = res.data)
   },
@@ -267,7 +267,9 @@ export default {
       }
     },
     handleDispatchAllOpen () {
-      this.axios.get('/api/get_all_order_produce', { params: { basics_procedure_id: localStorage.getItem('dispatchTag') || this.currencyTag } })
+      console.log( localStorage.getItem('dispatchTag'));
+      console.log('this.currencyTag :>> ', this.currencyTag);
+      this.axios.get('/api/get_all_order_produce', { params: { basics_procedure_id: localStorage.getItem('dispatchTag') | this.currencyTag } })
         .then(res => {
           if (res.code == 200) {
             this.modalTableData = res.data

+ 40 - 12
src/views/OrderMannage/BusinessOrderlist/edit.vue

@@ -2674,21 +2674,23 @@ export default {
       this.axios
         .post("/api/update/get_table", { id: "businessorderlist_detail" })
         .then((res) => {
-          if (
-            res.data&&
-            res.data.table.formSet &&
-            res.data.table.formSet.length > 0
-          ) {
-            this.formSetTableData = JSON.parse(
-              JSON.stringify(res.data.table.formSet)
-            );
-            this.post_formSetTableData = JSON.parse(
-              JSON.stringify(res.data.table.formSet)
-            );
-          } else {
+          if (Array.isArray(res.data)) {
             this.post_formSetTableData = JSON.parse(
               JSON.stringify(this.formSetTableData)
             );
+          } else {
+            if (res.data.table.formSet && res.data.table.formSet.length > 0) {
+              this.formSetTableData = JSON.parse(
+                JSON.stringify(res.data.table.formSet)
+              );
+              this.post_formSetTableData = JSON.parse(
+                JSON.stringify(res.data.table.formSet)
+              );
+            } else {
+              this.post_formSetTableData = JSON.parse(
+                JSON.stringify(this.formSetTableData)
+              );
+            }
           }
         });
     },
@@ -4515,6 +4517,13 @@ export default {
       this.$forceUpdate();
     },
     handleGetProductMeasure(val, index, product, ele) {
+      let change = [];
+      product.part.map((item) => {
+        change.push({
+          old_id: item.part_id,
+          new_id: item.change.filter((v) => v.id == item.change_id)[0].part_id,
+        });
+      });
       if (val) {
         let list = product.process.map((item) => {
           return { type_id: item.key, value: item.value || "" };
@@ -4527,6 +4536,7 @@ export default {
             product_id: product.product_id,
             type_id: ele.key,
             list,
+            change,
           },
         }).then((res) => {
           if (res.code == 200) {
@@ -4536,7 +4546,25 @@ export default {
         });
       }
     },
+    // 查找最接近
+    handleFindNearest(array, value) {
+      const temp = JSON.parse(JSON.stringify(array));
+      temp.sort((a, b) => {
+        return Math.abs(a.long - value) - Math.abs(b.long - value);
+      });
+      return temp[0].material_detail_id;
+    },
     handleProductMeasureBlur(e, product, measure_detail) {
+      product.part.map((part) => {
+        part.part_detail.map((part_detail) => {
+          if (part_detail.material_detail_list.length > 1) {
+            part_detail.material_detail_id = this.handleFindNearest(
+              part_detail.material_detail_list,
+              part.long
+            );
+          }
+        });
+      });
       try {
         measure_detail.value = eval(e.target.value);
       } catch (error) {