Browse Source

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

mushencc 3 năm trước cách đây
mục cha
commit
8b4572ddea

Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 0 - 0
dist/index.html


+ 3 - 8
src/views/BasicSettings/OverStandardPrice/detail.vue

@@ -267,14 +267,9 @@ export default {
   // 生命周期 - 创建完成(可以访问当前this实例)
   created() {
     // 获取产品分类
-    this.axios
-      .get("/api/basics_product_index")
-      .then((res) => {
-        this.cascader_list = res.data.data;
-      })
-      .catch((err) => {
-        console.error(err);
-      });
+    this.axios.get("/api/basics_product_index").then((res) => {
+      this.cascader_list = res.data.data;
+    });
   },
   // 生命周期 - 挂载完成(可以访问DOM元素)
   mounted() {

+ 626 - 44
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"
@@ -274,53 +340,91 @@
       </div>
       <div class="addAreaForm">
         <Form :label-width="100" :model="areaItem" style="width: 60%">
-          <FormItem label="区域编码:">
+          <FormItem
+            v-if="areaSetTableData.filter((v) => v.key == 'num')[0].is_show"
+            :label="areaSetTableData.filter((v) => v.key == 'num')[0].title"
+          >
             <Input
               type="text"
               size="small"
               :disabled="isChecked"
               v-model="areaItem.num"
-              placeholder="请输入区域编码"
+              :placeholder="
+                '请输入' +
+                  areaSetTableData.filter((v) => v.key == 'num')[0].title
+              "
               style="width: 120px"
             />
           </FormItem>
-          <FormItem label="区域名称:">
+          <FormItem
+            v-if="areaSetTableData.filter((v) => v.key == 'title')[0].is_show"
+            :label="areaSetTableData.filter((v) => v.key == 'title')[0].title"
+          >
             <Input
               type="text"
               size="small"
               :disabled="isChecked"
               v-model="areaItem.title"
-              placeholder="请输入区域名称"
+              :placeholder="
+                '请输入' +
+                  areaSetTableData.filter((v) => v.key == 'title')[0].title
+              "
               style="width: 120px"
             />
           </FormItem>
-          <FormItem label="单位:">
+          <FormItem
+            v-if="areaSetTableData.filter((v) => v.key == 'unit')[0].is_show"
+            :label="areaSetTableData.filter((v) => v.key == 'unit')[0].title"
+          >
             <Input
               type="text"
               size="small"
               :disabled="isChecked"
               v-model="areaItem.unit"
-              placeholder="请输入单位"
+              :placeholder="
+                '请输入' +
+                  areaSetTableData.filter((v) => v.key == 'unit')[0].title
+              "
               style="width: 120px"
             />
           </FormItem>
-          <FormItem label="工程量:">
+          <FormItem
+            v-if="
+              areaSetTableData.filter((v) => v.key == 'quantity')[0].is_show
+            "
+            :label="
+              areaSetTableData.filter((v) => v.key == 'quantity')[0].title
+            "
+          >
             <Input
               type="text"
               size="small"
               v-model="areaItem.quantity"
               :disabled="isChecked"
-              placeholder="请输入工程量"
+              :placeholder="
+                '请输入' +
+                  areaSetTableData.filter((v) => v.key == 'quantity')[0].title
+              "
               style="width: 120px"
             />
           </FormItem>
-          <FormItem label="户型:">
+          <FormItem
+            v-if="
+              areaSetTableData.filter((v) => v.key == 'house_type')[0].is_show
+            "
+            :label="
+              areaSetTableData.filter((v) => v.key == 'house_type')[0].title
+            "
+          >
             <Input
               type="text"
               size="small"
               :disabled="isChecked"
               v-model="areaItem.house_type"
-              placeholder="请输入户型"
+              :placeholder="
+                '请输入' +
+                  areaSetTableData.filter((v) => v.key == 'house_type')[0].title
+              "
               style="width: 120px"
             />
           </FormItem>
@@ -338,13 +442,19 @@
               style="width: 120px"
             />
           </FormItem>
-          <FormItem label="备注:">
+          <FormItem
+            v-if="areaSetTableData.filter((v) => v.key == 'remark')[0].is_show"
+            :label="areaSetTableData.filter((v) => v.key == 'remark')[0].title"
+          >
             <Input
               type="text"
               :disabled="isChecked"
               size="small"
               v-model="areaItem.remark"
-              placeholder="请输入备注"
+              :placeholder="
+                '请输入' +
+                  areaSetTableData.filter((v) => v.key == 'remark')[0].title
+              "
               style="width: 120px"
             />
           </FormItem>
@@ -639,7 +749,7 @@
           <Button
             type="primary"
             style="margin-right: 10px"
-            @click="handleAddPDTAdd(tempIndex)"
+            @click="handleAddPDTAdd(tempIndex, tempItem)"
             >添加</Button
           >
           <Button
@@ -1008,6 +1118,44 @@
         <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="表单设置"
+    >
+      <Tabs value="form1">
+        <TabPane label="订单表单设置" name="form1">
+          <Table
+            :max-height="600"
+            border
+            :columns="formSetTableColumns"
+            :data="post_formSetTableData"
+          >
+          </Table>
+        </TabPane>
+        <TabPane label="区域表单设置" name="form2">
+          <Table
+            :max-height="600"
+            border
+            :columns="areaSetTableColumns"
+            :data="post_areaSetTableData"
+          >
+          </Table>
+        </TabPane>
+        <TabPane label="产品表头设置" name="form3">
+          <Table
+            :max-height="600"
+            border
+            :columns="productSetTableColumns"
+            :data="post_productSetTableData"
+          >
+          </Table>
+        </TabPane>
+      </Tabs>
+    </Modal>
   </div>
 </template>
 
@@ -1148,7 +1296,7 @@ export default {
         { title: "备注", key: "remark", align: "center", minWidth: 80 },
         {
           title: "操作",
-          key: "remark",
+          key: "set",
           align: "center",
           slot: "Set",
           minWidth: 120,
@@ -1219,6 +1367,358 @@ 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: "备注",
+        },
+      ],
+      areaSetTableData: [
+        {
+          is_show: true,
+          key: "num",
+          value: "区域编码",
+          title: "区域编码",
+        },
+        {
+          is_show: true,
+          key: "title",
+          value: "区域名称",
+          title: "区域名称",
+        },
+        {
+          is_show: true,
+          key: "unit",
+          value: "单位",
+          title: "单位",
+        },
+        {
+          is_show: true,
+          key: "quantity",
+          value: "工程量",
+          title: "工程量",
+        },
+        {
+          is_show: true,
+          key: "house_type",
+          value: "户型",
+          title: "户型",
+        },
+        {
+          is_show: true,
+          key: "remark",
+          value: "备注",
+          title: "备注",
+        },
+      ],
+      productSetTableData: [
+        {
+          is_show: true,
+          key: "index",
+          value: "序号",
+          title: "序号",
+        },
+        {
+          is_show: true,
+          key: "title",
+          value: "产品名称",
+          title: "产品名称",
+        },
+        {
+          is_show: true,
+          key: "num",
+          value: "数量",
+          title: "数量",
+        },
+        {
+          is_show: true,
+          key: "price",
+          value: "价格",
+          title: "价格",
+        },
+        {
+          is_show: true,
+          key: "measure",
+          value: "规格",
+          title: "规格",
+        },
+        {
+          is_show: true,
+          key: "process_property",
+          value: "工艺属性",
+          title: "工艺属性",
+        },
+        {
+          is_show: true,
+          key: "url",
+          value: "图纸",
+          title: "图纸",
+        },
+        {
+          is_show: true,
+          key: "left_right_mode",
+          value: "左右式",
+          title: "左右式",
+        },
+        {
+          is_show: true,
+          key: "url_number",
+          value: "图号",
+          title: "图号",
+        },
+        {
+          is_show: true,
+          key: "remark",
+          value: "备注",
+          title: "备注",
+        },
+        {
+          is_show: true,
+          key: "set",
+          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);
+                },
+              },
+            });
+          },
+        },
+      ],
+      areaSetTableColumns: [
+        {
+          title: "是否展示",
+          align: "center",
+          key: "is_show",
+          minWidth: 120,
+          render: (h, params) => {
+            const { index } = params;
+            const currentRow = JSON.parse(
+              JSON.stringify(this.post_areaSetTableData[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_areaSetTableData.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_areaSetTableData[index])
+            );
+            return h("Input", {
+              props: {
+                value: currentRow.title,
+                type: "text",
+              },
+              on: {
+                "on-change": (e) => {
+                  currentRow.title = e.target.value;
+                  this.post_areaSetTableData.splice(index, 1, currentRow);
+                },
+              },
+            });
+          },
+        },
+      ],
+      productSetTableColumns: [
+        {
+          title: "是否展示",
+          align: "center",
+          key: "is_show",
+          minWidth: 120,
+          render: (h, params) => {
+            const { index } = params;
+            const currentRow = JSON.parse(
+              JSON.stringify(this.post_productSetTableData[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_productSetTableData.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_productSetTableData[index])
+            );
+            return h("Input", {
+              props: {
+                value: currentRow.title,
+                type: "text",
+              },
+              on: {
+                "on-change": (e) => {
+                  currentRow.title = e.target.value;
+                  this.post_productSetTableData.splice(index, 1, currentRow);
+                },
+              },
+            });
+          },
+        },
+      ],
+      post_formSetTableData: [],
+      post_areaSetTableData: [],
+      post_productSetTableData: [],
     };
   },
   // 生命周期 - 创建完成(可以访问当前this实例)
@@ -1240,6 +1740,7 @@ export default {
     this.axios.get("/api/custom_list").then((res) => {
       this.clientList = res.data.data;
     });
+    this.get_forms();
   },
   // 生命周期 - 挂载完成(可以访问DOM元素)
   mounted() {
@@ -1286,9 +1787,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,11 +2010,14 @@ export default {
     },
     postData() {
       this.formData.list.map((list) => {
-        list.product.map((product) => {
-          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;
@@ -1650,8 +2152,16 @@ export default {
       this.tempPDTList.splice(index + 1, 0, temp);
     },
     //新增产品添加
-    handleAddPDTAdd(index) {
-      this.tempPDTList.splice(index + 1, 0, { addPDTProcessAttrList: [] });
+    handleAddPDTAdd(index, row) {
+      this.tempPDTList.splice(index + 1, 0, {
+        addPDTProcessAttrList: [],
+        measure: "",
+        measures: [],
+        process_property: "",
+        url: [],
+        tempPDTTypeList: [],
+        process_properties: [],
+      });
     },
     //新增产品删除
     handleAddPDTDele(index) {
@@ -1668,17 +2178,23 @@ export default {
           0,
           element.process_property.length - 1
         );
-        element.process_properties = element.process_properties.substring(
-          0,
-          element.process_properties.length - 1
-        );
-
-        element.tempMeasureList.forEach((el) => {
-          element[el.e_title] &&
-            (element.measure += `${el.e_title ? el.e_title : 0}${
-              element[el.e_title]
-            }*`);
-        });
+        if (
+          element.process_properties &&
+          element.process_properties.length > 0
+        ) {
+          element.process_properties = element.process_properties.substring(
+            0,
+            element.process_properties.length - 1
+          );
+        }
+        element.tempMeasureList &&
+          element.tempMeasureList.length > 0 &&
+          element.tempMeasureList.forEach((el) => {
+            element[el.e_title] &&
+              (element.measure += `${el.e_title ? el.e_title : 0}${
+                element[el.e_title]
+              }*`);
+          });
         element.measure = element.measure.substring(
           0,
           element.measure.length - 1
@@ -1715,6 +2231,69 @@ 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)
+            );
+            this.post_areaSetTableData = JSON.parse(
+              JSON.stringify(this.areaSetTableData)
+            );
+            this.post_productSetTableData = JSON.parse(
+              JSON.stringify(this.productSetTableData)
+            );
+          } 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)
+              );
+            }
+            if (res.data.table.areaSet && res.data.table.areaSet.length > 0) {
+              this.areaSetTableData = JSON.parse(
+                JSON.stringify(res.data.table.areaSet)
+              );
+              this.post_areaSetTableData = JSON.parse(
+                JSON.stringify(res.data.table.areaSet)
+              );
+            } else {
+              this.post_areaSetTableData = JSON.parse(
+                JSON.stringify(this.areaSetTableData)
+              );
+            }
+          }
+        });
+    },
+    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,
+            areaSet: this.post_areaSetTableData,
+          },
+        },
+      }).then((res) => {
+        if (res.code == 200) {
+          this.$Message.success(res.msg);
+          this.get_forms();
+        }
+      });
+    },
     // 编辑产品→确认
     handlePDTEditConfirm() {
       this.PDTEdit.process_property = "";
@@ -2217,6 +2796,9 @@ export default {
     position: relative;
     border-bottom: 1px solid #e8eaec;
     margin-bottom: 30px;
+    /deep/ .ivu-form {
+      padding-bottom: 30px;
+    }
     /deep/ .ivu-form-item {
       display: inline-block;
       width: 300px;

+ 360 - 55
src/views/BidSystem/ContractList/info.vue

@@ -10,6 +10,13 @@
         >
           添加特殊字段
         </Button> -->
+        <!-- <Button
+          @click="showForms = true"
+          v-show="currencyTab == 'name2'"
+          type="primary"
+          style="margin-right: 10px"
+          >表单设置</Button
+        > -->
         <Button
           @click="handleOpenModal"
           v-show="currencyTab == 'name2'"
@@ -137,17 +144,18 @@
               @click="handleShowCurrencyArea(areaItem, areaIndex)"
               size="small"
               type="primary"
+              style="margin-right:10px"
               v-show="!(areaItem.product && areaItem.product.length > 0)"
               >展示产品</Button
             >
-            <Button
+            <!-- <Button
               @click="handleHiddenCurrencyArea(areaItem, areaIndex)"
               size="small"
               type="primary"
               style="margin-right:10px"
               v-show="areaItem.product && areaItem.product.length > 0"
               >收缩</Button
-            >
+            > -->
             <Button
               @click="handleOpenModal"
               size="small"
@@ -156,7 +164,10 @@
               v-show="areaItem.product && areaItem.product.length > 0"
               >下深化</Button
             >
-            <Button size="small" type="primary" v-show="areaItem.isAllDeeped"
+            <Button
+              size="small"
+              type="primary"
+              v-show="areaItem.isAllDeeped && areaItem.product.length > 0"
               >已下深化</Button
             >
           </div>
@@ -223,44 +234,100 @@
               class="top_search_form"
             >
               <FormItem label="区域编码:">
-                <Input
+                <Select
+                  filterable
+                  clearable
+                  v-model="searchData.area_no"
+                  size="small"
+                  style="width:120px"
+                >
+                  <Option
+                    v-for="(_item, _index) in area_no_list"
+                    :key="_index"
+                    :label="_item"
+                    :value="_item"
+                  ></Option>
+                </Select>
+                <!-- <Input
                   type="text"
                   size="small"
                   clearable
                   v-model="searchData.area_no"
                   placeholder="请输入区域编码"
                   style="width: 120px"
-                />
+                /> -->
               </FormItem>
               <FormItem label="区域名称:">
-                <Input
+                <Select
+                  filterable
+                  clearable
+                  v-model="searchData.area_title"
+                  size="small"
+                  style="width:120px"
+                >
+                  <Option
+                    v-for="(_item, _index) in area_title_list"
+                    :key="_index"
+                    :label="_item"
+                    :value="_item"
+                  ></Option>
+                </Select>
+                <!-- <Input
                   type="text"
                   size="small"
                   clearable
                   v-model="searchData.area_title"
                   placeholder="请输入区域名称"
                   style="width: 120px"
-                />
+                /> -->
               </FormItem>
               <FormItem label="产品名称:">
-                <Input
+                <Select
+                  filterable
+                  clearable
+                  v-model="searchData.product_title"
+                  size="small"
+                  style="width:120px"
+                >
+                  <Option
+                    v-for="(_item, _index) in product_title_list"
+                    :key="_index"
+                    :label="_item"
+                    :value="_item"
+                  ></Option>
+                </Select>
+                <!-- <Input
                   type="text"
                   size="small"
                   clearable
                   v-model="searchData.product_title"
                   placeholder="请输入产品名称"
                   style="width: 120px"
-                />
+                /> -->
               </FormItem>
               <FormItem label="图号:">
-                <Input
+                <Select
+                  filterable
+                  clearable
+                  v-model="searchData.url_number"
+                  size="small"
+                  style="width:120px"
+                >
+                  <Option
+                    v-for="(_item, _index) in url_number_list"
+                    :key="_index"
+                    :label="_item"
+                    :value="_item"
+                  ></Option>
+                </Select>
+                <!-- <Input
                   type="text"
                   size="small"
                   clearable
                   v-model="searchData.url_number"
                   placeholder="请输入图号"
                   style="width: 120px"
-                />
+                /> -->
               </FormItem>
               <FormItem label="深化状态:">
                 <Select
@@ -380,6 +447,7 @@
         </div>
         <div ref="footercenter" class="footer-center">
           <Page
+            transfer
             :total="total"
             :current.sync="page_index"
             :show-total="true"
@@ -556,12 +624,7 @@
       </div>
     </Modal>
     <!-- 批量下深化 -->
-    <Modal
-      v-model="processModal"
-      title="下深化"
-      @on-ok="handleProcess"
-      @on-cancel="processModal = false"
-    >
+    <Modal v-model="processModal" title="下深化">
       <div>
         <div class="process_modal">
           <span>深化人员:</span>
@@ -591,7 +654,27 @@
           ></DatePicker>
         </div>
       </div>
+      <div slot="footer">
+        <Button @click="processModal = false">取消</Button>
+        <Button type="primary" @click="handleProcess">确认</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>
 
@@ -748,15 +831,21 @@ export default {
         },
       ],
       supTableColumns: [
-        { title: "序号", key: "index", align: "center" },
+        { title: "序号", type: "index", align: "center", minWidth: 100 },
         {
           title: "辅料名称",
           key: "title",
           align: "center",
           slot: "combine",
-          minWidth: 60,
+          minWidth: 150,
+        },
+        {
+          title: "操作",
+          key: "set",
+          align: "center",
+          slot: "supSet",
+          minWidth: 100,
         },
-        { title: "操作", key: "set", align: "center", slot: "supSet" },
       ],
       listTableColumns: [
         { type: "selection", align: "center", minWidth: 100 },
@@ -881,6 +970,168 @@ export default {
       page_size: 10,
       total: 0,
       searchData: {},
+      showForms: false,
+      formSetTableColumns: [
+        {
+          title: "是否展示",
+          align: "center",
+          key: "is_show",
+          minWidth: 60,
+          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 == "order_no" ||
+                  currentRow.key == "residential_name" ||
+                  currentRow.key == "warning_state" ||
+                  currentRow.key == "start_time" ||
+                  currentRow.key == "end_time" ||
+                  currentRow.key == "client_name" ||
+                  currentRow.key == "predict_price" ||
+                  currentRow.key == "box_id" ||
+                  currentRow.key == "predict_price" ||
+                  currentRow.key == "order_price" ||
+                  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: 100,
+        },
+        {
+          title: "展示名称",
+          align: "center",
+          key: "title",
+          minWidth: 100,
+          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: [],
+      formSetTableData: [
+        {
+          is_show: true,
+          key: "order_no",
+          value: "订单编号",
+          title: "订单编号",
+        },
+        {
+          is_show: true,
+          key: "residential_name",
+          value: "项目名称",
+          title: "项目名称",
+        },
+        {
+          is_show: true,
+          key: "warning_state",
+          value: "紧急程度",
+          title: "紧急程度",
+        },
+        {
+          is_show: true,
+          key: "front_money",
+          value: "项目定金",
+          title: "项目定金",
+        },
+        {
+          is_show: true,
+          key: "start_time",
+          value: "开始日期",
+          title: "开始日期",
+        },
+        {
+          is_show: true,
+          key: "client_name",
+          value: "客户名称",
+          title: "客户名称",
+        },
+        {
+          is_show: true,
+          key: "custom_detail_name",
+          value: "负责人",
+          title: "负责人",
+        },
+        {
+          is_show: true,
+          key: "custom_detail_mobile",
+          value: "手机号",
+          title: "手机号",
+        },
+        {
+          is_show: true,
+          key: "custom_detail_id",
+          value: "详细地址",
+          title: "详细地址",
+        },
+        {
+          is_show: true,
+          key: "service_id",
+          value: "专营业务员",
+          title: "专营业务员",
+        },
+        {
+          is_show: true,
+          key: "end_time",
+          value: "交付日期",
+          title: "交付日期",
+        },
+        {
+          is_show: true,
+          key: "predict_price",
+          value: "产品总价",
+          title: "产品总价",
+        },
+        {
+          is_show: true,
+          key: "order_price",
+          value: "订单金额",
+          title: "订单金额",
+        },
+        {
+          is_show: true,
+          key: "fax_price",
+          value: "折扣金额",
+          title: "折扣金额",
+        },
+        { is_show: true, key: "box_id", value: "包装", title: "包装" },
+        { is_show: true, key: "remark", value: "订单备注", title: "订单备注" },
+      ],
+      area_no_list: [],
+      area_title_list: [],
+      product_title_list: [],
+      url_number_list: [],
     };
   },
   // 生命周期 - 创建完成(可以访问当前this实例)
@@ -890,6 +1141,8 @@ export default {
     this.$route.query.order_no
       ? (this.formData.order_no = this.$route.query.order_no)
       : "";
+    // 获取表单设置列表
+    this.get_forms();
     // 获取工艺属性
     this.axios("/api/basics_properties_index").then((res) => {
       this.PDTProcessAttrList = res.data.data;
@@ -930,6 +1183,30 @@ export default {
     });
   },
   methods: {
+    get_forms() {
+      this.axios
+        .post("/api/update/get_table", { id: "ContractList_info" })
+        .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)
+              );
+            }
+          }
+        });
+    },
     handlechange(val) {
       console.log("val :>> ", val);
     },
@@ -944,6 +1221,7 @@ export default {
       }).then((res) => {
         if (res.code == 200) {
           this.formData = res.data;
+          this.supTableData = res.data.ext;
           if (this.formData.list.length == 0) {
             this.formData.list.push({
               areaIndex: 1,
@@ -1358,10 +1636,18 @@ export default {
     getListData() {
       this.axios
         .get("/api/order_area_detail_list?", {
-          params: { order_no: this.$route.query.order_no, ...this.searchData,type:1},
+          params: {
+            order_no: this.$route.query.order_no,
+            ...this.searchData,
+            type: 1,
+          },
         })
         .then((res) => {
           this.listTableData = res.data.data;
+          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) => {
@@ -1394,33 +1680,48 @@ export default {
       (this.selected = [row]), (this.processModal = true);
     },
     handleProcess() {
-      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);
+      if (this.process_man) {
+        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("请选择人员");
+      }
     },
     changePage(e) {
       this.page_index = e;
@@ -1431,7 +1732,7 @@ export default {
       this.getListData();
     },
     handleHiddenCurrencyArea(item, index) {
-      item.isCurrencyArea = false
+      item.isCurrencyArea = false;
       this.$forceUpdate();
     },
     // 展示区域产品
@@ -1452,7 +1753,7 @@ export default {
             params: {
               order_no: this.$route.query.order_no,
               area_id: item.id,
-                    type: 1,
+              type: 1,
             },
           })
           .then((res) => {
@@ -1489,7 +1790,11 @@ export default {
         item.isCurrencyArea = true;
         this.axios
           .get("/api/order_area_list_product", {
-            params: { order_no: this.$route.query.order_no, area_id: item.id ,type:1},
+            params: {
+              order_no: this.$route.query.order_no,
+              area_id: item.id,
+              type: 1,
+            },
           })
           .then((res) => {
             if (res.code == 200) {
@@ -1598,9 +1903,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;
@@ -1687,8 +1992,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;

+ 30 - 51
src/views/BidSystem/ContractList/list.vue

@@ -70,7 +70,7 @@
         <div>
           <a
             style="margin: 0 5px"
-            :disabled="row.sub_status != 0"
+            :disabled="row.sub_status>1"
             @click="handleSet(row, index, 1)"
             >深化</a
           >
@@ -255,46 +255,30 @@ export default {
         {
           title: "订单状态",
           align: "center",
-          key: "state",
+          key: "sub_status",
           minWidth: 100,
           // { label: "安装", value: 16 },
           render: (h, params) =>
             h(
               "span",
               {},
-              params.row.state == 1
-                ? "订单未审核"
-                : params.row.state == 2
-                ? "订单审核中"
-                : 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 == 11
-                ? "生产审核中"
-                : params.row.state == 12
-                ? "到生产计划"
-                : params.row.state == 13
-                ? "派工"
-                : params.row.state == 14
-                ? "包装"
-                : params.row.state == 15
-                ? "发货"
-                : params.row.state == 16
-                ? "安装"
-                : ""
+              params.row.sub_status == 0
+                ? "订单制作中"
+                : params.row.sub_status == 1
+                ? "深化中"
+                : params.row.sub_status == 2
+                ? "拆单中"
+                : params.row.sub_status == 3
+                ? "生产订单"
+                : params.row.sub_status == 4
+                ? "计划订单"
+                : params.row.sub_status == 5
+                ? "派工订单"
+                : params.row.sub_status == 6
+                ? "已完成"
+                : params.row.sub_status == 99
+                ? "全部"
+                : "订单制作中"
             ),
         },
         {
@@ -406,7 +390,7 @@ export default {
           title: "客户姓名",
         },
         { is_show: true, key: "mobile", value: "手机号", title: "手机号" },
-        { is_show: true, key: "state", value: "订单状态", title: "订单状态" },
+        { is_show: true, key: "sub_status", value: "订单状态", title: "订单状态" },
         {
           is_show: true,
           key: "warning_state",
@@ -513,7 +497,7 @@ export default {
           value: "交付日期",
           title: "交付日期",
         },
-        { is_show: true, key: "state", value: "订单状态", title: "订单状态" },
+        { is_show: true, key: "sub_status", value: "订单状态", title: "订单状态" },
         {
           is_show: true,
           key: "crt_time",
@@ -621,7 +605,7 @@ export default {
       row.page_index = this.page_index;
       row.page_size = this.page_size;
       // 0 业务单
-      row.sub_status = 0;
+      // row.sub_status = 0;
       this.proxyObj = row;
       this.getData(row);
     },
@@ -768,22 +752,17 @@ export default {
           title: "订单状态",
           name: "Select",
           placeholder: "请选择订单状态",
-          serverName: "state",
+          serverName: "sub_status",
           value: "",
           option: [
-            { label: "订单审核中", value: 0 },
+            { label: "全部", value: 99 },
+            { 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 },
-            { label: "安装", value: 12 },
+            { label: "拆单中", value: 2 },
+            { label: "生产订单", value: 3 },
+            { label: "计划订单", value: 4 },
+            { label: "派工订单", value: 5 },
+            { label: "已完成", value: 6 },
           ],
         },
         {

+ 78 - 31
src/views/BidSystem/DeepeningOrder/detail.vue

@@ -51,14 +51,14 @@
           style="margin-right:10px;"
           >返回</Button
         >
-        <Button
+        <!-- <Button
           @click="postData()"
           type="primary"
           :disabled="isChecked"
           ghost
           style="margin-right:10px;"
           >保存</Button
-        >
+        > -->
       </slot>
     </Toptitle>
     <Tabs value="name1" @on-click="handleCurTabChange">
@@ -214,7 +214,7 @@
                 <template slot="set" slot-scope="{ row, index }">
                   <a
                     style="margin:0 5px"
-                    :disabled="isChecked"
+                    :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="isChecked"
+                :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] &&

+ 111 - 43
src/views/BidSystem/DeepeningOrder/edit.vue

@@ -39,8 +39,11 @@
           </span>
         </div>
       </div>
-      <div><span>左右式:</span>{{ formData.left_right_mode }}</div>
-      <div><span>价格:</span>{{ formData.price }}</div>
+      <div>
+        <span>左右式:</span
+        >{{ formData.left_right_mode == 1 ? "左式" : "右式" }}
+      </div>
+      <!-- <div><span>价格:</span>{{ formData.price }}</div> -->
       <div><span>备注:</span>{{ formData.remark }}</div>
     </div>
     <div class="table-data">
@@ -207,6 +210,25 @@
             />
             <span v-else>{{ tableData[index].number }}</span>
           </template>
+          <template slot="type_titleSet" slot-scope="{ index }">
+            <el-cascader
+              v-if="type == 1"
+              v-model="tableData[index].type_id"
+              size="small"
+              :show-all-levels="false"
+              :options="cascader_list"
+              :props="{
+                expandTrigger: 'hover',
+                children: 'child',
+                value: 'id',
+                label: 'title',
+                emitPath: false,
+                checkStrictly: true,
+              }"
+            ></el-cascader>
+            <!-- @change="changeProduct(tableData[index], index)" -->
+            <span v-else>{{ tableData[index].type_title }}</span>
+          </template>
           <template slot="titleSet" slot-scope="{ index }">
             <Input
               type="text"
@@ -326,11 +348,12 @@
               <Input
                 v-if="type == 1"
                 @on-focus="openKey(index, item.e_title)"
+                size="small"
                 clearable
                 :placeholder="item.title"
                 v-model="tableData[index][item.e_title]"
               />
-              <span v-else>{{ tableData[index][item.e_title]}}</span>
+              <span v-else>{{ tableData[index][item.e_title] }}</span>
             </div>
           </div>
           <!-- <div slot="formula_H"
@@ -402,34 +425,52 @@ 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: "80",
+          width: "100",
           slot: "houseSet",
+          resizable: true,
         },
         {
           title: "楼单元",
           key: "unit",
           align: "center",
-          width: "80",
+          width: "100",
           slot: "unitSet",
+          resizable: true,
         },
         {
           title: "楼层",
           key: "layer",
           align: "center",
-          width: "80",
+          width: "100",
           slot: "layerSet",
+          resizable: true,
         },
         {
           title: "房间号",
           key: "number",
           align: "center",
-          width: "80",
+          width: "100",
           slot: "numberSet",
+          resizable: true,
+        },
+        {
+          title: "产品分类",
+          key: "title",
+          align: "center",
+          minWidth: 200,
+          slot: "type_titleSet",
+          resizable: true,
         },
         {
           title: "产品",
@@ -437,6 +478,7 @@ export default {
           align: "center",
           minWidth: 100,
           slot: "titleSet",
+          resizable: true,
         },
         // {
         //   title: "价格",
@@ -451,6 +493,7 @@ export default {
           align: "center",
           minWidth: 100,
           slot: "product_unitSet",
+          resizable: true,
         },
         {
           title: "位置",
@@ -458,6 +501,7 @@ export default {
           align: "center",
           minWidth: 100,
           slot: "positionSet",
+          resizable: true,
         },
         {
           title: "图纸",
@@ -465,6 +509,7 @@ export default {
           align: "center",
           minWidth: 100,
           slot: "urlSet",
+          resizable: true,
         },
         {
           title: "图号",
@@ -472,6 +517,7 @@ export default {
           align: "center",
           minWidth: 120,
           slot: "url_numberSet",
+          resizable: true,
         },
         {
           title: "型号",
@@ -479,16 +525,19 @@ export default {
           align: "center",
           minWidth: 120,
           slot: "modelSet",
+          resizable: true,
         },
-        this.$route.query.type==1?
-        {
-          title: "操作",
-          key: "set",
-          align: "center",
-          minWidth: 120,
-          fixed: "right",
-          slot: "set",
-        }:{width:1},
+        this.$route.query.type == 1
+          ? {
+              title: "操作",
+              key: "set",
+              align: "center",
+              minWidth: 120,
+              fixed: "right",
+              slot: "set",
+              resizable: true,
+            }
+          : { width: 1 },
       ],
       tableData: [],
       type: this.$route.query.type,
@@ -499,6 +548,7 @@ export default {
       tempAddCol: [],
       measureList: [],
       showKey: false,
+      cascader_list: [],
     };
   },
   // 生命周期 - 创建完成(可以访问当前this实例)
@@ -510,14 +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.axios.get("/api/basics_product_index").then((res) => {
+      this.cascader_list = res.data.data;
+    });
+  },
+  // 生命周期 - 挂载完成(可以访问DOM元素)
+  mounted() {
     this.initData(
       this.order_no,
       this.order_area_id,
       this.order_area_product_id
     );
   },
-  // 生命周期 - 挂载完成(可以访问DOM元素)
-  mounted() {},
   methods: {
     successKey(str) {
       // this.$nextTick(()=>{
@@ -568,6 +623,7 @@ export default {
         url: [],
         url_number: "",
         model: "",
+        type_id: this.formData.type_id,
         ...this.tempAddCol,
       });
       this.tableData.forEach((el, index) => {
@@ -583,32 +639,44 @@ 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);
-            });
+      }).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: "100",
-              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}`,
+            resizable: true,
           });
-          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);

+ 59 - 12
src/views/BidSystem/DeepeningOrder/info.vue

@@ -8,6 +8,17 @@
           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"
@@ -377,23 +388,27 @@
           <!-- <Button @click="handleAddSup" type="primary">新增</Button> -->
         </div>
         <Table :columns="supTableColumns" :data="supTableData" border>
-          <template slot="combine" slot-scope="{ row }">
-            {{row.order_no}}
-            <!-- <Select v-model="row.order_no" size="small">
+          <template slot="combine" slot-scope="{ index }">
+            <span v-for="_item in combineList" :key="_item.id" v-show="_item.id==supTableData[index].id">{{_item.title}}</span>
+            <!-- <Select
+              v-model="supTableData[index].id"
+              disabled
+              size="small"
+            >
               <Option
                 v-for="item in combineList"
                 :value="item.id"
                 :key="item.id"
-                >{{ item.title }}</Option
-              >
+                :label="item.title"
+              ></Option>
             </Select> -->
           </template>
           <template slot="supSet" slot-scope="{ row, index }">
-            <a
+            <!-- <a
               style="margin: 0 5px; color: red"
               @click="handleSupSet(row, index)"
               >删除</a
-            >
+            > -->
           </template>
         </Table>
       </div>
@@ -971,6 +986,7 @@ export default {
         },
       }).then((res) => {
         this.formData = res.data;
+        this.supTableData = res.data.ext;
         // 产品特殊字段→ 弹窗窗口,table表头
         let arr = [];
         res.data.head[3] &&
@@ -1257,9 +1273,9 @@ export default {
     //项目辅料新增
     handleAddSup() {
       this.supTableData.push({ index: "", title: "" });
-      this.supTableData.forEach((element, index) => {
-        element.index = index + 1;
-      });
+      // this.supTableData.forEach((element, index) => {
+      //   element.index = index + 1;
+      // });
     },
     //项目辅料删除
     handleSupSet(row, index) {
@@ -1284,7 +1300,34 @@ export default {
       item.showValue = value.label;
       item.showId = value.value;
     },
-    handleFinish() {},
+    handleFinish() {
+      if (this.selected.length < 1) {
+        this.$Message.warning("请选择数据");
+      } else {
+        const order_area_product_id = this.selected.map(
+          (item) => item.order_area_product_id || item.id
+        );
+        this.$Modal.confirm({
+          title: "确认完成?",
+          // content: "此操作确认后不可恢复,请确认!",
+          onOk: () => {
+            this.axios({
+              method: "post",
+              url: "/api/order_area_product_status",
+              data: {
+                order_area_product_id,
+              },
+            }).then((res) => {
+              if (res.doce == 200) {
+                this.$Message.success(res.msg);
+                this.initData(this.formData.order_no);
+              }
+            });
+          },
+          onCancel: () => {},
+        });
+      }
+    },
     looks(img) {
       const array = [{ img_url: img }];
       this.$previewImg({
@@ -1388,7 +1431,11 @@ export default {
     getListData() {
       this.axios
         .get("/api/order_area_detail_list", {
-          params: { order_no: this.$route.query.order_no, ...this.searchData },
+          params: {
+            order_no: this.$route.query.order_no,
+            ...this.searchData,
+            type: 2,
+          },
         })
         .then((res) => {
           this.listTableData = res.data.data;

+ 13 - 16
src/views/BidSystem/DeepeningOrder/list.vue

@@ -64,16 +64,16 @@
             @click="handleSet(row, index, 1)"
             >下拆单</a
           >
-            <!-- :disabled="row.sub_status != 1" -->
           <a
             style="margin: 0 5px"
+            :disabled="row.sub_status == 2"
             @click="handleSet(row, index, 2)"
             >编辑</a
           >
           <a style="margin: 0 5px" @click="handleSet(row, index, 3)">详情</a>
-          <a
+          <!-- <a
             style="margin: 0 5px"
-            :disabled="row.sub_status != 1"
+            :disabled="row.sub_status == 1"
             @click="handleSet(row, index, 4)"
             >变更</a
           >
@@ -81,7 +81,7 @@
             style="margin: 0 5px; color: orange"
             @click="handleSet(row, index, 5)"
             >变更记录</a
-          >
+          > -->
           <a style="margin: 0 5px" @click="handleSet(row, index, 6)"
             >数据对比</a
           >
@@ -219,19 +219,17 @@ export default {
         {
           title: "深化状态",
           align: "center",
-          key: "state",
+          key: "sub_status",
           minWidth: 100,
           render: (h, params) =>
             h(
               "span",
               {},
-              params.row.state == 1
+              params.row.sub_status == 0
                 ? "未深化"
-                : params.row.state == 2
+                : params.row.sub_status == 1
                 ? "深化中"
-                : params.row.state == 3
-                ? "深化完成"
-                : ""
+                : "深化完成"
             ),
         },
         {
@@ -372,7 +370,7 @@ export default {
     init(row) {
       this.page_index = 1;
       //1 深化
-      row.sub_status = 1;
+      row.deep_status = 1;
       row.page_index = this.page_index;
       row.page_size = this.page_size;
       this.proxyObj = row;
@@ -457,13 +455,12 @@ export default {
           title: "深化状态",
           name: "Select",
           placeholder: "请选择",
-          serverName: "state",
+          serverName: "sub_status",
           value: "",
           option: [
-            { label: "全部", value: 0 },
-            { label: "未深化", value: 1 },
-            { label: "深化中", value: 2 },
-            { label: "深化完成", value: 3 },
+            { label: "未深化", value: 0 },
+            { label: "深化中", value: 1 },
+            { label: "深化完成", value: 2 },
           ],
         },
         {

+ 31 - 23
src/views/BidSystem/ProductDeOrder/deorderdetail.vue

@@ -23,7 +23,7 @@
       <div><span>产品名称:</span>{{ formData.title }}</div>
       <div><span>计量单位:</span>{{ formData.unit }}</div>
       <div><span>数量:</span>{{ formData.num }}</div>
-      <div><span>价格:</span>{{ formData.price }}</div>
+      <!-- <div><span>价格:</span>{{ formData.price }}</div> -->
       <div><span>规格:</span>{{ formData.measure }}</div>
       <div><span>工艺属性:</span>{{ formData.process_property }}</div>
       <div>
@@ -42,7 +42,7 @@
       <div><span>备注:</span>{{ formData.remark }}</div>
     </div>
     <div class="similar_product">
-      <div>
+      <!-- <div>
         <span>价格:</span>
         <Input
           type="text"
@@ -52,7 +52,7 @@
           style="width: 150px; margin-right: 10px"
           placeholder="请输入价格"
         />
-      </div>
+      </div> -->
       <div>
         <span>型号:</span>
         <Input
@@ -74,7 +74,7 @@
           "
         >
           <Dropdown>
-            <a :disabled="type == 3">选择产品分类</a>
+            <a :disabled="type == 2">选择产品分类</a>
             <DropdownMenu slot="list">
               <Downtree
                 @childByValue="handleClick"
@@ -224,7 +224,7 @@
               placeholder="请输入工艺价格"
             />
           </FormItem>
-          <FormItem label=":">
+          <FormItem label=":">
             <Input
               type="text"
               size="small"
@@ -232,7 +232,7 @@
               :disabled="type == 2"
               v-model="partsItem.long"
               style="width: 150px"
-              placeholder="请输入"
+              placeholder="请输入"
             />
           </FormItem>
           <FormItem label="宽:">
@@ -284,12 +284,10 @@
             :key="_item.type_title"
           >
             <!-- v-show="_item.display" -->
-              <!-- v-show="_item.list && _item.list.length > 0" -->
-            <span
-              :class="['box-us', _item.show ? 'box-us-foc' : '']"
-              @click="setBoxChange(item, _item)"
-              >{{ _item.type_title }}</span
-            >
+            <!-- v-show="_item.list && _item.list.length > 0" -->
+            <span :class="['box-us']" @click="setBoxChange(item, _item)">{{
+              _item.type_title
+            }}</span>
             <div
               :class="['radio-us', __item.show ? 'radio-us-foc' : '']"
               v-for="__item in _item.list"
@@ -315,11 +313,19 @@
         </div>
         <div style="padding: 10px 0">
           <span>工艺路线:</span>
-          <Button
-            :disabled="!partsItem.isAddProcessRoute || type == 2"
-            @click="editRouter(partsItem, partsIndex)"
-            >选择工艺路线</Button
-          >
+          <Tooltip>
+            <div
+              slot="content"
+              v-show="!partsItem.isAddProcessRoute || type == 2"
+            >
+              若要编辑工艺路线,请先选择工艺组合
+            </div>
+            <Button
+              :disabled="!partsItem.isAddProcessRoute || type == 2"
+              @click="editRouter(partsItem, partsIndex)"
+              >选择工艺路线</Button
+            >
+          </Tooltip>
         </div>
 
         <div class="parts_content_lineTable">
@@ -399,7 +405,7 @@
               <Input
                 @on-focus="openKey(partsIndex, index, 'long', partsItem)"
                 :disabled="!partsItem.isAddPart || type == 2"
-                placeholder=""
+                placeholder=""
                 v-model="partsItem.partsWoodTableData[index].long"
               />
             </template>
@@ -819,7 +825,7 @@ export default {
       formData: {
         title: "", //产品名称
         num: "", //数量
-        price: "", //价格
+        // price: "", //价格
         measure: "", //规格
         process_property: "", //工艺属性
         url: [], //图纸
@@ -928,7 +934,7 @@ export default {
         },
         { title: "单位", key: "company", align: "center", minWidth: 80 },
         {
-          title: "",
+          title: "",
           key: "long",
           align: "center",
           minWidth: 120,
@@ -964,7 +970,7 @@ export default {
           slot: "partVeneer_idSet",
         },
         {
-          title: "油漆",
+          title: "油漆组合",
           key: "paint_id",
           align: "center",
           minWidth: 140,
@@ -1197,7 +1203,7 @@ export default {
       this.materialWoodSkinList = res.data.data;
     });
     // 获取油漆列表
-    this.axios("/api/material", { params: { sub_type_id: 6 } }).then((res) => {
+    this.axios("/api/material_combination").then((res) => {
       this.materialPaintList = res.data.data;
     });
     // 获取五金列表
@@ -1508,7 +1514,7 @@ export default {
                         let item = isEditItem;
                         // let item = JSON.parse(JSON.stringify(isEditItem));
                         item.parts.forEach((element) => {
-                          console.log('element :>> ', element);
+                          console.log("element :>> ", element);
                           element.processCombination = element.route_id;
                           let obj = { value: element.route_id, label: "" };
                           this.handleProcessRouteSelect(element, obj);
@@ -1563,6 +1569,8 @@ export default {
     },
     //新增工艺组合名称
     handleProcessRouteCreate(item, val) {
+      //////
+      item.isAddProcessRoute = false;
       item.ProcessAttrList = JSON.parse(
         JSON.stringify(this.tempProcessAttrList)
       );

+ 383 - 139
src/views/BidSystem/ProductDeOrder/detail.vue

@@ -2,50 +2,162 @@
   <div class="BidSystemProductDeOrderEdit">
     <Toptitle title="拆单页">
       <slot name="titleButton">
-        <Button @click="goback()"
-                type="primary"
-                ghost
-                style="margin-right:10px;">取消</Button>
-        <Button @click="postData()"
-                type="primary"
-                ghost
-                style="margin-right:10px;">保存</Button>
+        <Button
+          @click="showSupModal = true"
+          type="primary"
+          style="margin-right:10px;"
+          >项目辅料</Button
+        >
+        <Button
+          @click="goback()"
+          type="primary"
+          ghost
+          style="margin-right:10px;"
+          >返回</Button
+        >
+        <!-- <Button
+          @click="postData()"
+          type="primary"
+          ghost
+          style="margin-right:10px;"
+          >保存</Button
+        > -->
       </slot>
     </Toptitle>
+    <div class="top_search_info">
+      <Form inline :label-width="100">
+        <FormItem label="产品名称:">
+          <Input
+            type="text"
+            size="small"
+            clearable
+            v-model="searchData.title"
+            placeholder="请输入产品名称"
+          />
+        </FormItem>
+        <FormItem label="图号:">
+          <Input
+            type="text"
+            size="small"
+            clearable
+            v-model="searchData.url_number"
+            style="width: 150px"
+            placeholder="请输入图号"
+          />
+        </FormItem>
+        <FormItem label="拆单状态:">
+          <Select
+            v-model="searchData.state"
+            size="small"
+            clearable
+            filterable
+            style="width: 150px"
+          >
+            <Option label="未完成" :value="0"> </Option>
+            <Option label="拆单中" :value="1"> </Option>
+            <Option label="已完成" :value="2"> </Option>
+          </Select>
+        </FormItem>
+        <FormItem>
+          <Button
+            size="small"
+            type="primary"
+            @click="
+              initData(
+                formData.order_no,
+                formData.orders_area_product_detail_id
+              )
+            "
+            >搜索</Button
+          >
+        </FormItem>
+      </Form>
+    </div>
     <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">{{formData.salesman}}</span>
+      <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"
+          >{{ formData.salesman }}</span
+        >
       </div>
       <!-- <div><span>订单类型:</span>{{formData.renovation_type==1?"工装":"家装"}}</div> -->
-      <div><span>备注:</span>{{formData.remark}}</div>
+      <div><span>备注:</span>{{ formData.remark }}</div>
     </div>
     <div class="addArea">
       <div class="addAreaTable">
-        <Table :columns="tableColumns"
-               :data="formData.detail"
-               border>
-          <template slot="set"
-                    slot-scope="{row,index}">
-            <a style="margin:0 5px"
-               @click="handleSet(row,index,1)">拆单</a>
-            <a style="margin:0 5px"
-               @click="handleSet(row,index,2)">详情</a>
+        <Table :columns="tableColumns" :data="formData.detail" border>
+          <template slot="set" slot-scope="{ row, index }">
+            <a
+              :disabled="row.status != 0"
+              style="margin:0 5px"
+              @click="handleSet(row, index, 1)"
+              >拆单</a
+            >
+            <a style="margin:0 5px" @click="handleSet(row, index, 2)">详情</a>
           </template>
         </Table>
       </div>
     </div>
+    <!-- 项目辅料弹窗 -->
+    <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="{ index }">
+            <Select
+              v-model="supTableData[index].id"
+              @on-change="handlechange"
+              size="small"
+            >
+              <Option
+                v-for="item in combineList"
+                :value="item.id"
+                :key="item.id"
+                :label="item.title"
+              ></Option>
+            </Select>
+          </template>
+          <template slot="supSet" slot-scope="{ row, index }">
+            <!-- <a
+              style="margin: 0 5px; color: red"
+              v-show="$route.query.type != 3"
+              @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>
   </div>
 </template>
 
@@ -54,38 +166,36 @@
 // 例如:import 《组件名称》 from '《组件路径》';
 
 export default {
-  name: 'BidSystemProductDeOrderEdit',
-  components: {
-
-  },
+  name: "BidSystemProductDeOrderEdit",
+  components: {},
   props: {},
   // import引入的组件需要注入到对象中才能使用
-  data () {
+  data() {
     // 这里存放数据
     return {
       showSupModal: false,
       showPDTModal: false,
       formData: {
-        order_no: '',
-        orders_area_product_detail_id: '',
-        residential_name: '',
-        client_name: '',
-        address: '',
-        mobile: '',
-        pay_state: '',
-        warning_state: '',
-        salesman: '',
-        remark: '',
+        order_no: "",
+        orders_area_product_detail_id: "",
+        residential_name: "",
+        client_name: "",
+        address: "",
+        mobile: "",
+        pay_state: "",
+        warning_state: "",
+        salesman: "",
+        remark: "",
         //区域列表
         area: [
           {
-            num: '',
-            title: '',
-            unit: '',
-            quantity: '',
-            house_type: '',
-            remark: '',
-            order_no: '',
+            num: "",
+            title: "",
+            unit: "",
+            quantity: "",
+            house_type: "",
+            remark: "",
+            order_no: "",
             product: [
               // {
               //   title:'',
@@ -96,140 +206,269 @@ export default {
               //   url_number:'',
               //   remark:''
               // }
-            ]
-          }
+            ],
+          },
         ],
       },
       product: [{}],
+      searchData: {},
       tableColumns: [
-        { title: '序号', key: 'id', 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: 'price', align: 'center', minWidth: 80 },
-        { title: '规格', key: 'measure', align: 'center', minWidth: 140 },
-        { title: '工艺属性', key: 'process_property', align: 'center', minWidth: 140, tooltip: true },
         {
-          title: '图纸', key: 'url', align: 'center', minWidth: 80,
+          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
-            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: ''
-                    })
-                    // }
-                    // })
-                  }
-                }
+            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: "left_right_mode",
+          align: "center",
+          resizable: true,
+          minWidth: 80,
+          render: (h, params) => {
+            const { row } = params;
+            return h("span", {}, row.left_right_mode == 1 ? "左式" : "右式");
+          },
+        },
+        {
+          title: "拆单状态",
+          key: "status",
+          align: "center",
+          resizable: true,
+          minWidth: 80,
+          render: (h, params) => {
+            const { row } = params;
+            return h("span", {}, row.status == 0 ? "未完成" : "已完成");
+          },
+        },
+        {
+          title: "操作",
+          key: "name",
+          align: "center",
+          width: "120",
+          slot: "set",
+          minWidth: 80,
+          fixed: "right",
+          resizable: true,
         },
-        { title: '备注', key: 'remark', align: 'center', minWidth: 80 },
-        { title: '操作', key: 'name', align: 'center', width: '120', slot: 'set', minWidth: 80, fixed: 'right' },
       ],
       //产品分类列表
       PDTTypeList: [],
       //业务员列表
       salesmanList: [],
       warningList: [],
-    }
+      supTableColumns: [
+        { title: "序号", type: "index", align: "center", minWidth: 100 },
+        {
+          title: "辅料名称",
+          key: "title",
+          align: "center",
+          slot: "combine",
+          minWidth: 150,
+        },
+        { title: "操作", align: "center", slot: "supSet", minWidth: 100 },
+      ],
+      supTableData: [], //项目辅料→辅料名称列表
+      combineList: [], //项目辅料列表
+    };
   },
   // 生命周期 - 创建完成(可以访问当前this实例)
-  created () {
+  created() {
+    // 获取项目辅料列表
+    this.axios("/api/material_combination").then((res) => {
+      this.combineList = res.data.data;
+    });
     // 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.$route.query.orders_area_product_detail_id ? this.formData.orders_area_product_detail_id = this.$route.query.orders_area_product_detail_id : ''
+    this.$route.query.type == 3 ? (this.isChecked = true) : "";
+    this.$route.query.order_no
+      ? (this.formData.order_no = this.$route.query.order_no)
+      : "";
+    this.$route.query.orders_area_product_detail_id
+      ? (this.formData.orders_area_product_detail_id = this.$route.query.orders_area_product_detail_id)
+      : "";
     // 获取紧急程度
-    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
+    //   .get("/api/todo", { params: { order_no: this.formData.order_no } })
+    //   .then((res) => {
+    //     this.supTableData = res.data
+    //   });
   },
   // 生命周期 - 挂载完成(可以访问DOM元素)
-  mounted () {
-    this.axios('/api/user').then(res => this.salesmanList = res.data.data)
-    this.axios('/api/parts_product_list').then(res => { this.PDTTypeList = res.data })
-    this.initData(this.formData.order_no, this.formData.orders_area_product_detail_id)
+  mounted() {
+    this.axios("/api/user").then((res) => (this.salesmanList = res.data.data));
+    this.axios("/api/parts_product_list").then((res) => {
+      this.PDTTypeList = res.data;
+    });
+    this.initData(
+      this.formData.order_no,
+      this.formData.orders_area_product_detail_id
+    );
   },
   methods: {
-    initData (order_no, orders_area_product_detail_id) {
+    //项目辅料新增
+    handleAddSup() {
+      this.supTableData.push({ id: "" });
+    },
+    //项目辅料删除
+    handleSupSet(row, index) {
+      this.supTableData.splice(index, 1);
+    },
+    handlechange(val) {
+      console.log("val :>> ", val);
+    },
+    initData(order_no, orders_area_product_detail_id) {
       this.axios({
-        method: 'get',
-        url: '/api/order_area_explode',
+        method: "get",
+        url: "/api/order_area_explode",
         params: {
           order_no,
-        }
+          ...this.searchData,
+        },
       }).then((res) => {
-        this.formData = res.data
-        this.formData.list.forEach(element => {
-          element.product.forEach((el, index) => {
-            el.index = index + 1
-          });
-        });
-      }).catch((err) => { });
+        this.formData = res.data;
+        // this.formData.list.forEach((element) => {
+        //   element.product.forEach((el, index) => {
+        //     el.index = index + 1;
+        //   });
+        // });
+      });
     },
     // 1拆单  2详情
-    handleSet (row, index, type) {
+    handleSet(row, index, type) {
       this.$router.push({
-        path: '/cms/BidSystem/ProductDeOrder/deorderdetail',
+        path: "/cms/BidSystem/ProductDeOrder/deorderdetail",
         query: {
           type,
           order_no: this.$route.query.order_no,
-          orders_area_product_detail_id: row.id
-        }
-      })
+          orders_area_product_detail_id: row.id,
+        },
+      });
     },
-    postData () {
+    postData() {
       this.axios({
-        method: 'post',
-        url: '/api/order_area_add',
+        method: "post",
+        url: "/api/order_area_add",
         data: {
-          ...this.formData
-        }
+          ...this.formData,
+        },
       }).then((res) => {
-        this.$Message.success(res.msg)
-      }).catch((err) => { });
+        this.$Message.success(res.msg);
+      });
+    },
+    goback() {
+      this.$router.go(-1);
     },
-    goback () { this.$router.go(-1) }
   },
   // 监听属性 类似于data概念
   computed: {},
   // 监控data中的数据变化
   watch: {},
-  beforeCreate () { }, // 生命周期 - 创建之前
-  beforeMount () { }, // 生命周期 - 挂载之前
-  beforeUpdate () { }, // 生命周期 - 更新之前
-  updated () { }, // 生命周期 - 更新之后
-  beforeDestroy () { }, // 生命周期 - 销毁之前
-  destroyed () { }, // 生命周期 - 销毁完成
-  activated () { }, // 如果页面有keep-alive缓存功能,这个函数会触发
-}
+  beforeCreate() {}, // 生命周期 - 创建之前
+  beforeMount() {}, // 生命周期 - 挂载之前
+  beforeUpdate() {}, // 生命周期 - 更新之前
+  updated() {}, // 生命周期 - 更新之后
+  beforeDestroy() {}, // 生命周期 - 销毁之前
+  destroyed() {}, // 生命周期 - 销毁完成
+  activated() {}, // 如果页面有keep-alive缓存功能,这个函数会触发
+};
 </script>
 
-<style lang='scss' scoped>
+<style lang="scss" scoped>
 .BidSystemProductDeOrderEdit {
   overflow: hidden;
   overflow-y: auto;
   .top_search {
     display: flex;
-    justify-content: space-around;
+    justify-content: flex-start;
     align-items: center;
     flex-wrap: wrap;
     width: 100%;
@@ -260,4 +499,9 @@ export default {
     }
   }
 }
+.supModalBtn {
+  display: flex;
+  justify-content: flex-end;
+  margin-bottom: 10px;
+}
 </style>

+ 22 - 24
src/views/BidSystem/ProductDeOrder/list.vue

@@ -64,16 +64,17 @@
             @click="handleSet(row, index, 1)"
             >下生产</a
           >
-          <a style="margin: 0 5px" @click="handleSet(row, index, 2)">拆单</a>
+          <a
+            style="margin: 0 5px"
+            :disabled="row.sub_status == 3"
+            @click="handleSet(row, index, 2)"
+            >拆单</a
+          >
           <a style="margin: 0 5px" @click="handleSet(row, index, 3)">详情</a>
           <a
             style="margin: 0 5px;"
             :disabled="row.sub_status != 2"
-            :style="
-              row.sub_status != 2
-                ? 'margin: 0 5px;'
-                : 'margin: 0 5px;'
-            "
+            :style="row.sub_status != 2 ? 'margin: 0 5px;' : 'margin: 0 5px;'"
             @click="handleSet(row, index, 4)"
             >删除</a
           >
@@ -211,17 +212,17 @@ export default {
         {
           title: "拆单状态",
           align: "center",
-          key: "state",
+          key: "sub_status",
           minWidth: 100,
           render: (h, params) =>
             h(
               "span",
               {},
-              // params.row.state == 0
+              // params.row.sub_status == 0
               //   ? "待审核"
-                params.row.state == 1
+              params.row.sub_status == 1
                 ? "未拆单"
-                : params.row.state == 2
+                : params.row.sub_status == 2
                 ? "拆单中"
                 : "拆单完成"
             ),
@@ -287,23 +288,20 @@ export default {
           ),
           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);
-          }
-        
-        })
-        .catch((err) => {});
+      }).then((res) => {
+        if (res.code == 200) {
+          this.$Message.success(res.msg);
+          this.getData(this.proxyObj);
+        }
+      });
     },
     // 1下生产  2拆单  3详情 4删除 5成本预算
     handleSet(row, index, type) {
       switch (type) {
         case 1:
-          this.process_man = '';
-          this.process_start_time = '';
-          this.process_end_time = '';
+          this.process_man = "";
+          this.process_start_time = "";
+          this.process_end_time = "";
           this.processModal = true;
           this.order_no = row.order_no;
           // this.$Modal.confirm({
@@ -381,7 +379,7 @@ export default {
     init(row) {
       this.page_index = 1;
       // 2拆单
-      row.sub_status = 2;
+      row.explode_status = 2;
       row.page_index = this.page_index;
       row.page_size = this.page_size;
       this.proxyObj = row;
@@ -500,7 +498,7 @@ export default {
 };
 </script>
 
-<style lang='scss' scoped>
+<style lang="scss" scoped>
 .pageSlotStyle {
   display: flex;
   justify-content: center;

+ 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

+ 115 - 36
src/views/OrderMannage/BusinessOrderlist/edit.vue

@@ -1956,6 +1956,7 @@
                                 style="width: 80px"
                                 filterable
                                 clearable
+                                transfer
                                 :disabled="isCheck"
                                 v-model="ele.material_detail_id"
                                 @on-change="(e) => handleMaterialChange(e, ele)"
@@ -2240,24 +2241,6 @@
         :data="post_formSetTableData"
       >
       </Table>
-      <!-- <CheckboxGroup v-model="forms_list">
-        <Checkbox label="order_no">订单编号</Checkbox>
-        <Checkbox label="residential_name">项目名称</Checkbox>
-        <Checkbox label="warning_state">紧急程度</Checkbox>
-        <Checkbox label="front_money">项目定金</Checkbox>
-        <Checkbox label="start_time">开始日期</Checkbox>
-        <Checkbox label="client_name">客户名称</Checkbox>
-        <Checkbox label="custom_detail_name">负责人</Checkbox>
-        <Checkbox label="custom_detail_mobile">手机号</Checkbox>
-        <Checkbox label="custom_detail_id">详细地址</Checkbox>
-        <Checkbox label="service_id">专营业务员</Checkbox>
-        <Checkbox label="end_time">交付日期</Checkbox>
-        <Checkbox label="predict_price">产品总价</Checkbox>
-        <Checkbox label="order_price">订单金额</Checkbox>
-        <Checkbox label="box_id">包装</Checkbox>
-        <Checkbox label="remark">订单备注</Checkbox>
-        <Checkbox label="pay_state">收款</Checkbox>
-      </CheckboxGroup> -->
     </Modal>
   </div>
 </template>
@@ -2604,6 +2587,8 @@ export default {
       post_formSetTableData: [],
       charge_list: [],
       cus_list: [],
+      add_pre_bp_id: "",
+      edit_pre_bp_id: "",
     };
   },
   computed: {
@@ -2692,21 +2677,23 @@ export default {
       this.axios
         .post("/api/update/get_table", { id: "businessorderlist_detail" })
         .then((res) => {
-          if (
-            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)
+              );
+            }
           }
         });
     },
@@ -4084,6 +4071,12 @@ export default {
                   });
                 }
               });
+              // 更换产品,分类不同,清空附加信息
+              this.handleClearExtInfo(
+                modalData,
+                this.add_pre_bp_id,
+                res.data.bp_id
+              );
               // 是否有上一个的工艺属性ID
               // 因为现在出现2个入口 方法弃用
               // 在列表复制时需要被复制对象的工艺,在新增复制时同理
@@ -4094,6 +4087,16 @@ export default {
         });
       }
     },
+    handleClearExtInfo(modalData, pre_id, cur_id) {
+      if (cur_id != pre_id) {
+        modalData.extArray = [];
+        modalData.metalArray = [];
+      }
+      pre_id = cur_id;
+      // 可以合并
+      this.add_pre_bp_id = cur_id;
+      this.edit_pre_bp_id = cur_id;
+    },
     changeEditProduct(row) {
       if (row) {
         let id = row ? row.value : this.productList[0].id;
@@ -4249,6 +4252,11 @@ export default {
                   });
                 }
               });
+              this.handleClearExtInfo(
+                this.modalData,
+                this.edit_pre_bp_id,
+                res.data.bp_id
+              );
               // 是否有上一个的工艺属性ID
               this.chooseLastRouteId(this.modalData, res);
               this.$forceUpdate();
@@ -4389,6 +4397,7 @@ export default {
     handlePartChange(row, measure, product_num) {
       if (row.change_id) {
         let cur = row.change.filter((item) => item.id == row.change_id);
+        row.org_part_id = JSON.parse(JSON.stringify(row.part_id));
         row.part_id = cur[0].part_id;
         row.high = cur[0].high;
         row.highCalc = JSON.parse(JSON.stringify(row.high));
@@ -4449,8 +4458,12 @@ export default {
                   new RegExp(element.measureCalc, "g"),
                   element.value
                 );
-                item.long = eval(item.long);
-                item.long += "";
+                try {
+                  item.long = eval(item.long);
+                  item.long += "";
+                } catch (error) {
+                  item.long = "";
+                }
               }
             }
             if ((item.wide || "").indexOf(element.measureCalc) != -1) {
@@ -4459,8 +4472,12 @@ export default {
                   new RegExp(element.measureCalc, "g"),
                   element.value
                 );
-                item.wide = eval(item.wide);
-                item.wide += "";
+                try {
+                  item.wide = eval(item.wide);
+                  item.wide += "";
+                } catch (error) {
+                  item.wide = "";
+                }
               }
             }
             if ((item.high || "").indexOf(element.measureCalc) != -1) {
@@ -4469,8 +4486,12 @@ export default {
                   new RegExp(element.measureCalc, "g"),
                   element.value
                 );
-                item.high = eval(item.high);
-                item.high += "";
+                try {
+                  item.high = eval(item.high);
+                  item.high += "";
+                } catch (error) {
+                  item.high = "";
+                }
               }
             }
             item.material_detail_list.forEach((it) => {
@@ -4533,6 +4554,13 @@ export default {
       this.$forceUpdate();
     },
     handleGetProductMeasure(val, index, product, ele) {
+      let change = [];
+      product.part.map((item) => {
+        change.push({
+          old_id: item.org_part_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 || "" };
@@ -4545,6 +4573,7 @@ export default {
             product_id: product.product_id,
             type_id: ele.key,
             list,
+            change,
           },
         }).then((res) => {
           if (res.code == 200) {
@@ -4554,12 +4583,62 @@ 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;
+    },
+    handleCalcPartDetailLong(part_detail, product) {
+      for (const key in product.measure) {
+        const element = product.measure[key];
+        if (element.value) {
+          part_detail._longCalc = part_detail.longCalc.replace(
+            new RegExp(element.e_title, "g"),
+            element.value || ""
+          );
+        }
+      }
+      try {
+        eval(part_detail._longCalc);
+      } catch (error) {
+        for (const key in product.measure) {
+          const element = product.measure[key];
+          part_detail._longCalc = part_detail._longCalc.replace(
+            new RegExp(element.e_title, "g"),
+            element.value || ""
+          );
+        }
+      }
+      return part_detail._longCalc;
+    },
     handleProductMeasureBlur(e, product, measure_detail) {
       try {
         measure_detail.value = eval(e.target.value);
       } catch (error) {
         console.log("error :>> ", error);
       }
+      product.part.map((part) => {
+        part.part_detail.map((part_detail) => {
+          part_detail._longCalc = this.handleCalcPartDetailLong(
+            part_detail,
+            product
+          );
+          if (part_detail.material_detail_list.length > 1) {
+            try {
+              part_detail.longCalcFinal = eval(part_detail._longCalc);
+              part_detail.material_detail_id = this.handleFindNearest(
+                part_detail.material_detail_list,
+                part_detail.longCalcFinal
+              );
+            } catch (error) {
+              console.log("error :>> ", error);
+            }
+          }
+        });
+      });
       this.$forceUpdate();
     },
     handleProductMeasureChange(e, product, measure_detail) {

+ 2 - 2
src/views/PartsMannage/edit.vue

@@ -501,7 +501,7 @@ export default {
           minWidth: 150,
         },
         {
-          title: "油漆",
+          title: "油漆组合",
           align: "center",
           key: "paint",
           slot: "paintSet",
@@ -631,7 +631,7 @@ export default {
     this.axios("/api/material", { params: { sub_type_id: 2 } }).then((res) => {
       this.materialWoodSkinList = res.data.data;
     });
-    this.axios("/api/material", { params: { sub_type_id: 6 } }).then((res) => {
+    this.axios("/api/material_combination").then((res) => {
       this.materialPaintList = res.data.data;
     });
     this.axios("/api/properties_index", { params: { id: 1 } }).then((res) => {

+ 4 - 4
src/views/ProductMannage/index.vue

@@ -692,15 +692,15 @@ export default {
     changePage(e) {
       this.pageIndex = e;
       this.proxyObj.page_index = this.pageIndex;
-      const sortList = this.sortList.filter((item) => item.sort);
-      this.proxyObj.sortList = sortList;
+      // const sortList = this.sortList.filter((item) => item.sort);
+      // this.proxyObj.sortList = sortList;
       this.getData(this.proxyObj);
     },
     changeSize(e) {
       this.pageSize = e;
       this.proxyObj.page_size = this.pageSize;
-      const sortList = this.sortList.filter((item) => item.sort);
-      this.proxyObj.sortList = sortList;
+      // const sortList = this.sortList.filter((item) => item.sort);
+      // this.proxyObj.sortList = sortList;
       this.getData(this.proxyObj);
     },
     goPage(n, row) {

+ 4 - 4
src/views/ProductionOrderList/ProductionsOrder/Decorationlist.vue

@@ -41,7 +41,7 @@
           <a @click="printChip(row)">打印芯片</a>
           <!-- <a @click="bingChip(row)">绑定芯片</a> -->
           <!-- <a @click="bingChip(row)" v-if="row.tagnum&&row.part_tag">更换芯片</a> -->
-          <a @click="openModal(row)">下生产计划</a>
+          <a @click="openModal(row)" :disabled="row.part_state!=0">下生产计划</a>
           <!-- <a @click="downImg(row.url,row.product_title)">下载图纸</a> -->
         </div>
       </template>
@@ -283,9 +283,9 @@ export default {
           value: '',
           serverName: 'part_state',
           option: [
-            { label: '全部', value: 0 },
-            { label: '未下计划', value: 1 },
-            { label: '已下计划', value: 2 },
+            { label: '全部', value: 99 },
+            { label: '未下计划', value: 0 },
+            { label: '已下计划', value: 1 },
           ],
         },
         {

+ 8 - 8
src/views/ProductionOrderList/ProductionsOrder/list.vue

@@ -51,7 +51,7 @@
              @click="goDetial(row)">详情</a>
           <a v-if='persimissionData["下生产计划"]||persimissionData.all'
              style="margin:0 5px"
-             :disabled="row.state!=1"
+             :disabled="row.state>1"
              @click="openModal(row)">下生产计划</a>
         </div>
       </template>
@@ -92,9 +92,9 @@ export default {
         {
           title: '生产状态', align: 'center', key: 'state', minWidth: 150,
           render: (h, params) => h('span', {},
-            params.row.state == 1 ? '未下计划'
-              : (params.row.state == 2 ? '计划中'
-                : (params.row.state == 3 ? '计划完成' : '全部'))
+            params.row.state == 0 ? '未下计划'
+              : (params.row.state == 1 ? '计划中'
+                : (params.row.state == 2 ? '计划完成' : '全部'))
           )
         },
         { title: '小区', align: 'center', key: 'residential_name', minWidth: 200 },
@@ -195,10 +195,10 @@ export default {
         {
           title: '生产状态', name: 'Select', placeholder: '请选择', serverName: 'state', value: '',
           option: [
-            { label: '全部', value: 0 },
-            { label: '未下计划', value: 1 },
-            { label: '计划中', value: 2 },
-            { label: '计划完成', value: 3 },
+            { label: '全部', value: 99 },
+            { label: '未下计划', value: 0 },
+            { label: '计划中', value: 1 },
+            { label: '计划完成', value: 2 },
           ]
         },
         { title: '下单日期范围', name: 'Input', start_server: 'start_time', end_server: 'end_time', start_value: '', end_value: '', isDate: true, serverName: 'id2', start_placeholder: '开始日期', end_placeholder: '结束日期' },

+ 1 - 1
vue.config.js

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

Một số tệp đã không được hiển thị bởi vì quá nhiều tập tin thay đổi trong này khác