mushencc 4 anni fa
parent
commit
b18f6af28b
42 ha cambiato i file con 6511 aggiunte e 2238 eliminazioni
  1. BIN
      dist (2).zip
  2. BIN
      dist (3).zip
  3. BIN
      dist.zip
  4. 46 3
      src/components/Topsearch/index.vue
  5. 11 1
      src/components/currencyPage/index.vue
  6. 2 2
      src/components/selects/reference/index.vue
  7. 90 11
      src/routerMap/index.js
  8. 10 3
      src/views/BasicSettings/EmployeeManage/EmployeeManage.vue
  9. 54 15
      src/views/BasicSettings/PartSettings/detail.vue
  10. 1 1
      src/views/BasicSettings/PartSettings/list.vue
  11. 355 0
      src/views/BasicSettings/procedureRatio.vue
  12. 12 8
      src/views/BidSystem/CompletionStatistics.vue
  13. 14 10
      src/views/BidSystem/CompletionStatisticsConfig.vue
  14. 2 2
      src/views/BidSystem/CompletionStatisticsDetail.vue
  15. 144 0
      src/views/BidSystem/ContractList/BSTList.vue
  16. 41 1182
      src/views/BidSystem/ContractList/edit.vue
  17. 9 855
      src/views/BidSystem/ContractList/list.vue
  18. 862 0
      src/views/BidSystem/ContractList/oldList.vue
  19. 3125 0
      src/views/BidSystem/ContractList/old_edit.vue
  20. 27 12
      src/views/BidSystem/IncompleteStatistics.vue
  21. 261 0
      src/views/BidSystem/IncompleteStatisticsDetail.vue
  22. 134 0
      src/views/BidSystem/OutputValue/config.vue
  23. 133 0
      src/views/BidSystem/OutputValue/detail.vue
  24. 129 0
      src/views/BidSystem/OutputValue/info.vue
  25. 173 0
      src/views/BidSystem/OutputValue/list.vue
  26. 45 16
      src/views/ChipPrintScreen/ChipPrintScreen.vue
  27. 63 32
      src/views/ChipPrintScreen/ChipPrintScreenCheck.vue
  28. 19 1
      src/views/Dispatching/Dispatching.vue
  29. 118 0
      src/views/HumanResources/attence.vue
  30. 397 0
      src/views/HumanResources/attenceDetail.vue
  31. 131 51
      src/views/OrderMannage/BusinessOrderlist/edit.vue
  32. 1 0
      src/views/ProductionOrderList/Deliverylist/DeliveryDetail.vue
  33. 3 0
      src/views/ProductionOrderList/Deliverylist/Deliverylist.vue
  34. 10 0
      src/views/ProductionOrderList/InboundForm/details.vue
  35. 28 2
      src/views/ProductionOrderList/ProductionPlanlist/BST_two.vue
  36. 1 1
      src/views/ProductionOrderList/ProductionPlanlist/list.vue
  37. 24 5
      src/views/ProductionOrderList/ProductionsOrder/BST_Decorationlist.vue
  38. 4 2
      src/views/PurchasingManage/ArrivalOrder/edit.vue
  39. 9 5
      src/views/PurchasingManage/ArrivalOrder/list.vue
  40. 16 12
      src/views/PurchasingManage/PurchasingOrder/edit.vue
  41. 5 4
      src/views/PurchasingManage/RequisitionOrder/edit.vue
  42. 2 2
      vue.config.js

BIN
dist (2).zip


BIN
dist (3).zip


BIN
dist.zip


+ 46 - 3
src/components/Topsearch/index.vue

@@ -19,7 +19,7 @@
         :multiple="item.multiple"
         v-model="item.value"
         :type="item.type"
-        v-if="!item.isDate"
+        v-if="!item.isDate&&!item.isTooltip"
         :style="item.width ? 'width:' + item.width + 'px' : ''"
         @on-change="item.change ? change($event, index) : ''"
       >
@@ -29,13 +29,50 @@
           :label="_item.label"
         ></Checkbox>
         <Option
-          v-for="(_item, _index) in item.option"
+         v-for="(_item, _index) in item.option"
           :key="_index"
           :label="item.optionName ? _item[item.optionName] : _item.label"
           :value="item.optionValue ? _item[item.optionValue] : _item.value"
         ></Option>
       </div>
-
+      <Tooltip v-if="item.isTooltip" transfer max-width='500' placement="top">
+         <div
+        :class="[
+          'margin',
+          item.name == 'Radio' || item.name == 'CheckboxGroup'
+            ? 'checkbox-item'
+            : '',
+        ]"
+        :key="index"
+        :is="item.name"
+        :size="item.size ? item.size : 'small'"
+        :placeholder="item.placeholder"
+        :clearable="!item.clearable ? true : false"
+        :disabled="item.disabled"
+        :filterable="item.filterable"
+        :multiple="item.multiple"
+        v-model="item.value"
+        :type="item.type"
+        :max-tag-count='1'
+        v-if="!item.isDate"
+        :style="item.width ? 'width:' + item.width + 'px' : ''"
+        @on-change="item.change ? change($event, index) : ''"
+      >
+      <Option
+      label="全选"
+      value="全选"
+      @click.native="total_choose"
+      >
+      </Option>
+        <Option
+         v-for="(_item, _index) in item.option"
+          :key="_index"
+          :label="item.optionName ? _item[item.optionName] : _item.label"
+          :value="item.optionValue ? _item[item.optionValue] : _item.value"
+        ></Option>
+      </div>
+      <div slot="content">{{tooltip_data}}</div>
+      </Tooltip>
       <div class="items" v-if="item.isDate">
         <DatePicker
           :type="item.type ? item.type : 'date'"
@@ -79,6 +116,9 @@ export default {
       type: Boolean,
       default: true,
     },
+    tooltip_data:{
+      
+    }
   },
   data() {
     return {}
@@ -91,6 +131,9 @@ export default {
     this.$emit('init', this.filterDats(obj))
   },
   methods: {
+    total_choose(){
+        this.$emit('total_choose', this.list)
+    },
     change() {
       this.$emit('changeSelected', this.list)
     },

+ 11 - 1
src/components/currencyPage/index.vue

@@ -11,7 +11,11 @@
                    @changeSelected="changeSelected"
                    :list="list"
                    @init="init"
-                   @searchData="searchData" />
+                   @searchData="searchData"
+                   :tooltip_data='tooltip_data'
+                   @total_choose='total_choose'
+                   >
+        </Topsearch>
         <div style="padding-bottom: 15px">
           <slot name="navButton"></slot>
         </div>
@@ -147,6 +151,9 @@ export default {
       type: Boolean,
       default: true,
     },
+    tooltip_data:{
+
+    }
   },
   data () {
     return {
@@ -202,6 +209,9 @@ export default {
     searchData (row) {
       this.$emit('searchData', row)
     },
+    total_choose(e){
+       this.$emit('total_choose',e)
+    },
     changePage (e) {
       this.$emit('changePage', e)
     },

+ 2 - 2
src/components/selects/reference/index.vue

@@ -1004,7 +1004,7 @@ export default {
           }).then((res) => {
             this.parts_tableData =res.data.list
             this.parts_tableData.map(v=>{
-              v.arrive_num = 0;
+              v.arrive_num = (v.num-v.reference_num)*1;
             })
           }).catch((err) => { });
        }
@@ -1054,7 +1054,7 @@ export default {
           }).then((res) => {
             res.data.children.forEach(element => {
               // element.residential_name = row.residential_name;
-              element.purchases_num = 0;
+              element.purchases_num = (element.num-element.reference_num)*1;
             })
             this.parts_tableData = res.data.children;
             console.log(this.parts_tableData)

+ 90 - 11
src/routerMap/index.js

@@ -193,7 +193,7 @@ const routerMap = [
     name: "ProcessRoute", //工艺列表-->工艺列表
     meta: {
       index: 4,
-      keepAlive: true,
+      // keepAlive: true,
     },
     component: (resolve) => require(["@/views/ProcessRoute/index"], resolve),
   },
@@ -226,7 +226,7 @@ const routerMap = [
     name: "Products", //产品管理-->通用产品页
     meta: {
       index: 4,
-      keepAlive: true,
+      // keepAlive: true,
     },
     component: (resolve) => require(["@/views/ProductMannage/index"], resolve),
   },
@@ -251,7 +251,7 @@ const routerMap = [
     name: "ProcedureMannage", //工序管理通用页面
     meta: {
       index: 4,
-      keepAlive: true,
+      // keepAlive: true,
     },
     component: (resolve) =>
       require(["@/views/ProcedureMannage/index"], resolve),
@@ -445,7 +445,7 @@ const routerMap = [
     name: "BusinessOrderlist", //订单管理-->业务订单列表
     meta: {
       index: 4,
-      keepAlive: true,
+      // keepAlive: true,
     },
     component: (resolve) =>
       require(["@/views/OrderMannage/BusinessOrderlist/list"], resolve),
@@ -672,7 +672,7 @@ const routerMap = [
     name: "BidSystemContractList", // 报价系统→工装订单→列表页
     meta: {
       index: 3,
-      keepAlive: true,
+      // keepAlive: true,
     },
     component: (resolve) =>
       require(["@/views/BidSystem/ContractList/list"], resolve),
@@ -790,7 +790,7 @@ const routerMap = [
     name: "BidSystemProductDeOrder", // 报价系统→生产拆单
     meta: {
       index: 3,
-      keepAlive: true,
+      // keepAlive: true,
     },
     component: (resolve) =>
       require(["@/views/BidSystem/ProductDeOrder/list"], resolve),
@@ -1220,6 +1220,15 @@ const routerMap = [
       require(["@/views/BasicSettings/rootManage"], resolve),
   },
   {
+    path: "/cms/BasicSettings/procedureRatio",
+    name: "procedureRatio", // 设置-->设置-->工序产能占比表
+    meta: {
+      index: 3,
+    },
+    component: (resolve) =>
+      require(["@/views/BasicSettings/procedureRatio"], resolve),
+  },
+  {
     path: "/cms/BasicSettings/finishWorkConfig",
     name: "finishWorkConfig", // 设置-->设置-->工序完工配置
     meta: {
@@ -1398,7 +1407,7 @@ const routerMap = [
     name: "CustomerProductPriceList", //客户档案→客户产品价格表→列表
     meta: {
       index: 3,
-      keepAlive: true,
+      // keepAlive: true,
     },
     component: (resolve) =>
       require(["@/views/BasicSettings/CustomerProductPrice/list"], resolve),
@@ -1564,7 +1573,7 @@ const routerMap = [
     name: "CompletionStatistics", //业务报表-->完工统计表
     meta: {
       index: 3,
-      keepAlive: true,
+      // keepAlive: true,
     },
     component: (resolve) =>
       require(["@/views/BidSystem/CompletionStatistics"], resolve),
@@ -1574,7 +1583,7 @@ const routerMap = [
     name: "CompletionStatisticsDetail", //业务报表-->完工统计表-->详请
     meta: {
       index: 3,
-      keepAlive: true,
+      // keepAlive: true,
     },
     component: (resolve) =>
       require(["@/views/BidSystem/CompletionStatisticsDetail"], resolve),
@@ -1584,7 +1593,7 @@ const routerMap = [
     name: "CompletionStatisticsConfig", //业务报表-->完工统计表-->详请-->详情
     meta: {
       index: 3,
-      keepAlive: true,
+      // keepAlive: true,
     },
     component: (resolve) =>
       require(["@/views/BidSystem/CompletionStatisticsConfig"], resolve),
@@ -1594,11 +1603,81 @@ const routerMap = [
     name: "IncompleteStatistics", //业务报表-->未完工统计表
     meta: {
       index: 3,
-      keepAlive: true,
+      // keepAlive: true,
     },
     component: (resolve) =>
       require(["@/views/BidSystem/IncompleteStatistics"], resolve),
   },
+  {
+    path: "/cms/BidSystem/IncompleteStatisticsDetail",
+    name: "IncompleteStatisticsDetail", //业务报表-->未完工统计表
+    meta: {
+      index: 3,
+      // keepAlive: true,
+    },
+    component: (resolve) =>
+      require(["@/views/BidSystem/IncompleteStatisticsDetail"], resolve),
+  },
+  {
+    path: "/cms/HumanResources/attence",
+    name: "attence", //业务报表-->人力资源-->考勤表
+    meta: {
+      index: 3,
+      // keepAlive: true,
+    },
+    component: (resolve) =>
+      require(["@/views/HumanResources/attence"], resolve),
+  },
+  {
+    path: "/cms/HumanResources/attenceDetail",
+    name: "attenceDetail", //业务报表-->人力资源-->考勤详情
+    meta: {
+      index: 3,
+      // keepAlive: true,
+    },
+    component: (resolve) =>
+      require(["@/views/HumanResources/attenceDetail"], resolve),
+  },
+  {
+    path: "/cms/BidSystem/OutputValue/list",
+    name: "outputValueList", //报表中心-->项目产值表
+    meta: {
+      index: 3,
+      // keepAlive: true,
+    },
+    component: (resolve) =>
+      require(["@/views/BidSystem/OutputValue/list"], resolve),
+  },
+  {
+    path: "/cms/BidSystem/OutputValue/detail",
+    name: "outputValueDetail", //报表中心-->项目产值表-->详情
+    meta: {
+      index: 3,
+      // keepAlive: true,
+    },
+    component: (resolve) =>
+      require(["@/views/BidSystem/OutputValue/detail"], resolve),
+  },
+  {
+    path: "/cms/BidSystem/OutputValue/config",
+    name: "outputValueConfig", //报表中心-->项目产值表-->详情-->详情
+    meta: {
+      index: 3,
+      // keepAlive: true,
+    },
+    component: (resolve) =>
+      require(["@/views/BidSystem/OutputValue/config"], resolve),
+  },
+  {
+    path: "/cms/BidSystem/OutputValue/info",
+    name: "outputValueInfo", //报表中心-->项目产值表-->详情-->详情-->详情
+    meta: {
+      index: 3,
+      // keepAlive: true,
+    },
+    component: (resolve) =>
+      require(["@/views/BidSystem/OutputValue/info"], resolve),
+  },
   // 测试用
   {
     path: "/cms/ordermannage/businessorderlist/editcopy",

+ 10 - 3
src/views/BasicSettings/EmployeeManage/EmployeeManage.vue

@@ -99,6 +99,7 @@
                 @on-change="changePage"
                 :current="pageIndex"
                 :total="total"
+                 show-total
                 show-sizer
                 :page-size="pageSize"
               />
@@ -280,7 +281,9 @@ export default {
                 ? "制单人"
                 : params.row.type == 2
                 ? "业务员"
-                : "车间人员"
+                :  params.row.type == 3
+                ? '本厂班组'
+                :'外协班组'
             );
           },
         },
@@ -326,7 +329,8 @@ export default {
       departmentTypeList: [
         { label: "制单人", value: 1 },
         { label: "业务员", value: 2 },
-        { label: "车间人员", value: 3 },
+        { label: "本厂班组", value: 3 },
+          { label: "外协班组", value: 4 },
       ],
       userList: [],
       type: null,
@@ -377,7 +381,8 @@ export default {
       })
         .then((res) => {
           this.tableLoading = false;
-          this.tableData = res.data;
+          this.tableData = res.data.data;
+          this.total = res.data.total;
         })
         .catch((err) => {});
     },
@@ -504,6 +509,8 @@ export default {
 <style lang="scss" scoped>
 .content {
   width: 100%;
+  height: 90%;
+  overflow: auto;
   display: flex;
   justify-content: space-between;
   padding-top: 30px;

+ 54 - 15
src/views/BasicSettings/PartSettings/detail.vue

@@ -111,7 +111,7 @@
               filterable
               filter-by-label
               v-model="formData.part_id"
-              @on-change="handlePartSelected"
+              @on-change="initData(id)"
               style="width: 200px"
             >
               <Option
@@ -146,6 +146,7 @@
           border
           :max-height="600"
           :data="tableData"
+          :loading='loading'
         >
          <template slot="partDetailProduct" slot-scope="{ index }">
             <Select
@@ -196,7 +197,7 @@
             <Input
               type="text"
               style="width:80px"
-              v-model="tableData[index].num"
+              v-model.lazy="tableData[index].num"
             />
           </template>
           <template slot="minSlot" slot-scope="{ index }">
@@ -216,7 +217,7 @@
           <template slot="materialDetailSlot" slot-scope="{ index }">
             <Select v-model="tableData[index].material_detail_id" transfer>
               <Option
-                v-for="(item, index) in tableData[index].materialDetailList"
+                v-for="(item, index) in material"
                 :key="index"
                 :label="item.materialDetailShow"
                 :value="item.id"
@@ -255,6 +256,7 @@ export default {
   data() {
     // 这里存放数据
     return {
+      loading:true,
       state:false,
       type: this.$route.query.type,
       id: this.$route.query.id,
@@ -326,25 +328,32 @@ export default {
   },
   // 生命周期 - 创建完成(可以访问当前this实例)
   created() {
+    //工艺属性分类下拉表
     this.axios.get("/api/basics_properties_index").then((res) => {
       this.basic_process_list = res.data.data;
     });
+    //部件名称下拉表
     this.axios.get("/api/parts_index").then((res) => {
       this.parts_list = res.data.data;
     });
+    //表格中关联产品下拉表
     this.axios.get('/api/product').then(res=>{
       this.product = res.data.data;
     })
+    //表格中测量字段下拉表
     this.axios.get("/api/basics_measure_index").then((res) => {
       this.measure_list = res.data.data;
     });
-     this.axios.get("/api/material").then((res) => {
-       this.material = res.data.data
-     })
+    //  this.axios.get("/api/material").then((res) => {
+    //    this.material = res.data.data
+    //  })
   },
   // 生命周期 - 挂载完成(可以访问DOM元素)
   mounted() {
     this.id && this.initData(this.id); //id是这张单子的id
+    if(this.$route.query.type == 5){
+      this.loading = false;
+    }
   },
   methods: {
     handleProduct(row, index, id){ //id是产品的product_id
@@ -360,6 +369,7 @@ export default {
        }
      });
       row.part_detail_list = list;
+      console.log(row);
      }
      if(ids.indexOf(id)<0){
       // row.part_detail_list = JSON.parse(JSON.stringify(this.part_detail_list));
@@ -369,9 +379,12 @@ export default {
         }
       })
       row.part_detail_list = list;
+      
      }
     row.change_state = true;
-     row.parts_detail_id = '';
+     row.parts_detail_id = 0;
+    
+     console.log(this.tableData[index]);
        this.handlePartDetailSelected(row, index, row.parts_detail_id);
     },
     back() {
@@ -435,6 +448,12 @@ export default {
           this.formData = res.data.detail;
           this.formData.process_id = this.formData.bp_id;
           this.tableData = res.data.list;
+          res.data.material_list.forEach(v=>{
+            v.id = v.material_detail_id;
+            v.materialDetailShow= v.long + "*" + v.width
+          });
+          this.material = res.data.material_list;
+          console.log(this.material)
           this.tableData.map(v=>{v.change_state=false})
           //工艺属性分类赋值第一个
           this.handleProcessSelected(res.data.detail.process_id);
@@ -471,6 +490,7 @@ export default {
         });
     },
     handlePartSelected(id, type) { //id搜索条件中的部件名称part_id
+
       id &&
         this.axios.get("/api/parts_detail", { params: { id } }).then((res) => {//获取产品名称part_id中所有零部件名称
           this.part_detail_list = res.data.detail;
@@ -480,9 +500,9 @@ export default {
           })
 
           if (type == 2) {//type==2来区分编辑还是新增
-          console.log(this.part_detail_list)
-          console.log(product_ids);
-           console.log(this.tableData)
+          // console.log(this.part_detail_list)
+          // console.log(product_ids);
+          //  console.log(this.tableData)
             this.tableData.map((v, k) => {//给零部件下拉框赋值
               let list = [];
               if(v.product_id == 0||product_ids.indexOf(v.product_id)<0){
@@ -494,7 +514,7 @@ export default {
                  v.part_detail_list = JSON.parse(JSON.stringify(list))
                 // v.part_detail_list = JSON.parse(JSON.stringify(this.part_detail_list));
                   //  v.part_detail_list = this.part_detail_list.filter(v=>{v.product_id==0})
-                   console.log(v.part_detail_list)
+                  //  console.log(v.part_detail_list)
               }
               if(product_ids.indexOf(v.product_id)>=0&&v.product_id != 0){
                       this.part_detail_list.forEach(m=>{
@@ -502,19 +522,26 @@ export default {
                           list.push(m)
                         }
                       })
-                        v.part_detail_list = JSON.parse(
-                JSON.stringify(list) );
+               v.part_detail_list = JSON.parse(JSON.stringify(list) );
               }
+              // console.log(this.material)
           // console.log(v.part_detail_list)
-              this.handlePartDetailSelected(v, k, v.parts_detail_id);
+            //  this.material.forEach(m=>{
+            //    if(v.material_detail_id == m.material_detail_id){
+            //       this.tableData[k].parts_detail_title = m.
+            //    }
+              
+            //  })
+              // this.handlePartDetailSelected(v, k, v.parts_detail_id);
             })
           } else {
             this.tableData = [];
           }
           this.tableData = JSON.parse(JSON.stringify(this.tableData));
         });
+        this.loading = false;
     },
-    handlePartDetailSelected(row, index, id,type) {//id是零部件的parts_detail_id
+  handlePartDetailSelected(row, index, id,type) {//id是零部件的parts_detail_id
   if(row.change_state||type){
       row.part_detail_list.forEach(element => {
         if(element.id == id){
@@ -528,6 +555,7 @@ export default {
           .get("/api/material", { params: { id: material_id } }) //通过得到的material_id找到物料的名称
           .then((res) => {
             this.tableData[index].parts_detail_title = res.data[0].title; //物料名字赋值
+            
             this.tableData[index].materialDetailList = res.data[0].detail.map( //物料尺寸赋值
               (v) => {
                 return { id: v.id, materialDetailShow: v.long + "*" + v.width };
@@ -536,8 +564,19 @@ export default {
             this.tableData.splice(index, 1, this.tableData[index]);
           });
       }
+      console.log(this.tableData[index])
     },
     handleSaveData() {
+      let state = false;
+      console.log(this.tableData)
+      this.tableData.forEach(v=>{
+            if(v.product_id!=0&&!v.parts_detail_id){
+                 state =true;
+            }
+      })
+      if(state){
+       return this.$Message.warning('有产品未选择零部件名称!')
+      }
       if (this.type == 1) {
         this.formData.id = "";
       }

+ 1 - 1
src/views/BasicSettings/PartSettings/list.vue

@@ -82,7 +82,7 @@
           :max-height="700"
           :data="tableData"
         >
-          <template slot="setSlot" slot-scope="{ row, index }">
+          <template slot="setSlot" slot-scope="{ row }">
             <div>
               <a style="margin:0 5px;" @click="handleSet(row, 1)">复制</a>
               <a style="margin:0 5px;" @click="handleSet(row, 2)">编辑</a>

+ 355 - 0
src/views/BasicSettings/procedureRatio.vue

@@ -0,0 +1,355 @@
+<template>
+  <div>
+    <Toptitle title="工序占比设置">
+      <slot name="titleButton">
+        <!-- <Button @click="back"
+                type='primary'
+                ghost
+                style="margin-right:10px;">返回</Button> -->
+        <Button type="primary"
+                style="margin-right:10px;"
+                @click="handleRowClick({},null,1)"
+                ghost>新增</Button>
+      </slot>
+    </Toptitle>
+    <div style="height:80%;overflow:auto">
+    <div style="padding-top:20px">
+      <Form inline :label-width='80'>
+        <FormItem label="方案名称:">
+          <Input style="width:150px"
+                 clearable
+                 v-model="search_title"
+                 size="small"
+                 placeholder="请输入方案名称" />
+        </FormItem>
+         <FormItem label="启用状态:">
+           <Select v-model="search_state" style="width:150px" clearable>
+             <Option value="0">
+                未启用
+             </Option>
+             <Option value="1">
+                已启用
+             </Option>
+           </Select>
+        </FormItem>
+        <FormItem>
+          <Button type="primary"
+                  size="small"
+                  @click="init">搜索</Button>
+        </FormItem>
+      </Form>
+    </div>
+    <div style="padding:20px 0px">
+      <Table border
+             ref="refTableData"
+             draggable
+             :columns="columns"
+             :data="tableData"
+             @on-drag-drop="onDragDrop">
+        <template slot="op"
+                  slot-scope="{row,index}">
+             <a @click="startUse(row)" v-show="row.state==0"
+             style="margin-right:10px">启用</a>      
+             <a @click="handleRowClick(row,index,4)"
+             style="margin-right:10px">编辑</a>      
+          <a @click="handleRowClick(row,index,2)"
+             style="margin-right:10px">查看</a>
+          <a @click="handleRowClick(row,index,3)" :disabled="row.state ==1">删除</a>
+        </template>
+      </Table>
+
+    </div>
+    </div>
+    <div style="text-align:center">
+          <Page :page-size-opts="[10, 20, 30, 40,100]"
+                @on-page-size-change='changeSize'
+                @on-change='changePage'
+                :current='pageIndex'
+                show-total
+                :total="total"
+                show-sizer
+                :page-size='pageSize' />
+        </div>
+    <Modal class="modal"
+           :title='modal_title'
+           v-model='showModal'
+           :mask-closable="false"
+           :width="400">
+    
+      <div><span style="width:100px">方案名称:</span><Input style="width:80%" v-model="scheme_title"/></div>
+      <span >占比设置:</span>
+      <Table :data='modalData'  :columns="modalColumns" border
+           :max-height='400' >
+     </Table>
+       <span style="margin-top:10px;display:inline-block">合计占比:<span>{{total_scale}}</span></span>
+      <div class="modal-footer"
+           slot="footer">
+        <Button @click="showModal = false">取消</Button>
+        <Button type="primary"
+        v-if="modal_title !=='查看' "
+                @click="handleColorConfirm">确认</Button>
+      </div>
+    </Modal>
+  </div>
+</template>
+
+<script>
+// 这里可以导入其他文件(比如:组件,工具js,第三方插件js,json文件,图片文件等等)
+// 例如:import 《组件名称》 from '《组件路径》';
+
+export default {
+  components: {
+
+  },
+  props: {},
+  // import引入的组件需要注入到对象中才能使用
+  data () {
+    // 这里存放数据
+    return {
+      search_state:'',
+      id:'',
+    scheme_title:'',
+    modalData:[],
+   modalColumns:[
+       {title:'ID',align:'center',type:'index',width:'60'},
+       {title:'工序',align:'center',key:'title'},
+       {title:'占比(%)',align:'center',key:'scale',render:(h,params)=>{
+            const {row,index} = params;
+            return h('Input',{props:{value:row.scale,disabled:this.modal_title == '查看'?true:false,type:'number'},on:{'on-change':(e)=>{
+                this.modalData[index].scale = e.target.value;
+                let total_scale = 0;
+                this.modalData.forEach(v=>{
+                   total_scale+=v.scale*1
+                })
+                this.total_scale = total_scale
+            }}},row.scale)
+       }}
+   ],
+      pageSize:10,
+      pageIndex: 1,
+      total: 0,
+      total_scale:0,
+        process_list:[],
+        band_list:[],
+        user_list:[],
+        search_title:'',
+        modal_title:'',
+      title: '工序班组权限表',
+      columns: [
+        { title:'ID', type:'index', align: 'center' },
+        { title: '方案名称', key: 'title', align: 'center', },
+        {title:'启用状态',key:'state',align:'center',render:(h,params)=>{
+          const {row} = params;
+          return h('span',{},row.state == 0?'未启用':'已启用')
+        }},
+        { title: '操作', key: 'operation', align: 'center', slot: 'op' }
+      ],
+      tableData: [],
+      maxSort: 0,
+      showModal: false,
+      //1新增2编辑
+      addState: 0,
+      currencyRow: {
+        id:'',
+        produce_ids :[],
+        employee_ids:[]
+      },
+      currencyIndex: 0
+    }
+  },
+  // 生命周期 - 创建完成(可以访问当前this实例)
+  created () {
+    // this.initData()
+  
+    //用户列表
+    // this.axios.get('/api/user').then(res=>{this.user_list = res.data.data});
+    //工序列表
+    this.axios.post('/api/ext_produce_list').then(res=>{this.process_list = res.data});
+    // //班组列表
+    // this.axios("/api/employee_list").then((res) => (this.band_list = res.data));
+  },
+  // 生命周期 - 挂载完成(可以访问DOM元素)
+  mounted () {  
+      this.init()
+  },
+  methods: {
+    startUse(row){
+      this.axios.post('/api/ext_produce_scale_switch',{id:row.id}).then(res=>{
+        if(res.code==200){
+          this.$Message.success(res.msg);
+          this.init();
+        }
+      })
+    },
+      changeSize (e) {
+      this.pageSize = e;
+      this.init()
+    },
+    changePage (index) {
+      this.pageIndex = index;
+      
+      this.init()
+     
+    },
+    init () {
+    //   this.$forceUpdate();
+      this.axios.post('/api/ext_produce_scale_list', 
+         {
+          title: this.search_title,
+          page_size:this.pageSize,
+          page_index:this.pageIndex,
+          state:this.search_state,
+        }
+      ).then(res => {
+        if (res.code == 200) { 
+          this.tableData = res.data.data;
+          this.total = res.data.total;
+        }
+      }).catch(err => {  })
+    },
+    back () {
+      this.$router.go(-1)
+    },
+    handleRowClick (row, index, type) {
+//1新增 2查看 3删除 4编辑
+      this.currencyIndex = index
+      this.addState = type
+    this.id = row.id||'';
+      switch (type) {
+        case 1:
+            this.modal_title = '新增';
+            this.scheme_title = '';
+         this.modalData = [];
+        this.total_scale = 0;
+        this.process_list.forEach(v=>{
+            let obj = {};
+            obj.title = v.title;
+            obj.scale = '';
+            this.modalData.push(obj)
+        })
+      this.showModal = true;
+            break;
+        case 2:
+            this.total_scale = 0;
+            this.modal_title ='查看';
+           this.modalData = row.json;
+           this.scheme_title = row.title;
+           this.modalData.forEach(v=>{
+               this.total_scale+=v.scale*1
+           })
+          this.showModal = true;
+ 
+          break;
+        case 3:
+          this.$Modal.confirm({
+            title: '确认删除?',
+            content: '此操作确认后无法恢复,请确认此操作!',
+            onOk: () => {
+              this.axios({
+                method: 'post',
+                url: '/api/ext_user_permission_del',
+                data: {
+                  id: row.id
+                }
+              }).then((res) => {
+                this.$Message.success(res.msg)
+                this.init()
+              }).catch((err) => { });
+            },
+            onCancel: () => { }
+          })
+          break;
+          case 4:
+              this.total_scale = 0;
+            this.modal_title = '编辑';
+          this.scheme_title = row.title;
+          let data = JSON.parse(JSON.stringify(this.process_list));
+          let title = [];
+          data.forEach(v=>{
+            v.scale = 0;
+            title.push(v.title)
+          })
+         row.json.forEach(v=>{
+           if(title.indexOf(v.title)>=0){
+               data.forEach(m=>{
+              if(m.title == v.title ){
+                m.scale = v.scale;
+              }
+            })
+           }
+          
+          })
+           this.modalData = data;
+           this.modalData.forEach(v=>{
+               this.total_scale+=v.scale*1
+           })
+           console.log(this.modalData);
+           console.log(row.json)
+             this.showModal = true;
+      }
+    },
+    handleColorChange (row, index, type) {
+      this.addState = type
+      this.showModal = true
+    },
+    handleColorConfirm () {
+        if(this.total_scale!=100){
+            return this.$Message.warning('合计占比必须是100%!')
+        }
+        console.log(this.modalData)
+       let data = [];
+        this.modalData.forEach(v=>{
+           if(v.scale){
+               data.push(v)
+           }
+        })
+      this.axios({
+        method: 'post',
+        url: '/api/ext_produce_scale_edit',
+        data: {
+            title:this.scheme_title,
+          json:{...data},
+          id:this.id
+        }
+      }).then((res) => {
+        if(res.code == 200){
+        this.$Message.success(res.msg)
+        this.showModal = false
+        this.init()}
+      }).catch((err) => { });
+    },
+    onDragDrop (a, b) {
+      this.tableData.splice(b, 0, ...this.tableData.splice(a, 1))
+      
+    }
+  },
+  // 监听属性 类似于data概念
+  computed: {
+  },
+  // 监控data中的数据变化
+  watch: {},
+  beforeCreate () { }, // 生命周期 - 创建之前
+  beforeMount () { }, // 生命周期 - 挂载之前
+  beforeUpdate () { }, // 生命周期 - 更新之前
+  updated () { }, // 生命周期 - 更新之后
+  beforeDestroy () { }, // 生命周期 - 销毁之前
+  destroyed () { }, // 生命周期 - 销毁完成
+  activated () { }, // 如果页面有keep-alive缓存功能,这个函数会触发
+}
+</script>
+
+<style lang='scss' scoped>
+.modal {
+  div {
+    display: flex;
+    justify-content: center;
+    align-items: center;
+    padding: 10px 0;
+
+  }
+}
+/deep/.select_band .ivu-select-selection{
+   width: 500px;
+  
+}
+</style>

+ 12 - 8
src/views/BidSystem/CompletionStatistics.vue

@@ -21,12 +21,12 @@
              <DatePicker type="date" placeholder="年/月/日" style="width: 130px" size='small'  v-model="searchData.end_time"></DatePicker>
         </FormItem>
         <FormItem label='工序名称:'>
-           <Select v-model="searchData.process" style="width:150px" size='small'>
+           <Select v-model="searchData.procedure_id" style="width:150px" size='small' filterable clearable multiple>
         <Option v-for="item in process_list" :value="item.id" :key="item.id">{{ item.title }}</Option>
     </Select>
         </FormItem>
         <FormItem label='班组名称:'>
-         <Select v-model="searchData.band" style="width:150px" size='small'>
+         <Select v-model="searchData.employee_id" style="width:150px" size='small' filterable clearable multiple>
         <Option v-for="item in band_list" :value="item.id" :key="item.id">{{ item.nickname }}</Option>
         </Select>
         </FormItem>
@@ -45,7 +45,7 @@
     </template>
     </Table>
     </div>
-     <div style="text-align:center">
+     <div style="text-align:center;margin-top:20px">
           <Page :page-size-opts="[10, 20, 30, 40,100]"
                 @on-page-size-change='changeSize'
                 @on-change='changePage'
@@ -154,8 +154,8 @@ export default {
             pageSize:10,
             total:0,
             searchData:{
-                process:'',
-                band:'',
+                procedure_id:[],
+                employee_id:[],
                 start_time:'',
                 end_time:''
             },
@@ -186,10 +186,11 @@ export default {
           this.searchData.start_time = `${Year}-${Month+1}-1`
     },
     methods:{
+
         getData(row){
-            this.axios.get('/api/finance_complete_total',{params:{...row,page_size:this.pageSize,page_index:this.pageIndex}}).then(res=>{
-                 this.tableData = res.data.list;
-                 this.total = Number(res.data.total);
+            this.axios.post('/api/finance_complete_total',{...row,page_size:this.pageSize,page_index:this.pageIndex}).then(res=>{
+                 this.tableData = res.data.data;
+                 this.total = res.data.total;
             })
         },
         tableSetSure(){
@@ -202,6 +203,9 @@ export default {
             this.getData(data)
         },
         goPageDetail(row){
+            if(!this.searchData.end_time){
+                return this.$Message.warning('请选择派工结束时间');
+            }
             let data = JSON.parse(JSON.stringify(this.searchData));
             data.start_time=data.start_time?Date.parse(this.searchData.start_time).toString().slice(0,10):'';
             data.end_time=data.end_time?Date.parse(this.searchData.end_time).toString().slice(0,10):'';

+ 14 - 10
src/views/BidSystem/CompletionStatisticsConfig.vue

@@ -16,13 +16,17 @@
                 ghost>返回</Button>
       </slot>
     </Toptitle>
-     <div style="height:80%">
+     <div style="height:80%;overflow:auto;">
     <Form style="display:flex;margin:10px 0;flex-wrap:wrap" :label-width='90'>
         <FormItem label='派工日期:' style="width:250px"><span>{{formData.push_time}}</span></FormItem>
         <FormItem label='项目编码:' style="width:250px"><span>{{formData.order_no}}</span></FormItem>
         <FormItem label='项目名称:' style="width:250px"><span>{{formData.project_name}}</span></FormItem>
         <FormItem label='平方:' style="width:250px"><span>{{formData.area}}</span></FormItem>
-        <FormItem label='图号:' style="width:250px"><span>{{formData.url_number}}</span></FormItem>
+        <FormItem label='图号:' style="width:250px">
+            <Tooltip :content="formData.url_number" placement="bottom" transfer max-width='400'>
+          <span>{{(formData.url_number+'').length>=16?(formData.url_number+'').slice(0,16)+"...":formData.url_number}}</span>
+        </Tooltip>
+           </FormItem>
          <FormItem label='完工进度:' style="width:250px"><span>{{formData.complete}}</span></FormItem>
           <FormItem label='完工日期:' style="width:250px"><span>{{formData.complete_time}}</span></FormItem>
     </Form>
@@ -30,12 +34,9 @@
     :data='tableData'
     :columns='tableColumns'
     border>
-    <template slot="setSlot" slot-scope="{row}">
-         <a @click="goPageDetail(row)">详情</a>
-    </template>
     </Table>
     </div>
-     <div style="text-align:center">
+     <div style="text-align:center;margin-top:20px">
           <Page :page-size-opts="[10, 20, 30, 40,100]"
                 @on-page-size-change='changeSize'
                 @on-change='changePage'
@@ -66,7 +67,7 @@ export default {
             {title:'房号',align:'center',minWidth:120,key:'house_number'},
              {title:'组合名称',align:'center',minWidth:120,key:'compose_name'},
                {title:'部件名称',align:'center',minWidth:120,key:'part_name'},
-           {title:'操作',align:'center',slot:'setSlot',minWidth:120},
+            {title:'平方',align:'center',minWidth:120,key:'ext_1'},
              ],
         }
     },
@@ -92,10 +93,13 @@ export default {
                employee_id:this.$route.query.employee_id,
                 start_time:this.$route.query.start_time,
                 end_time:this.$route.query.end_time,
-                   order_no:this.$route.query.order_no
+                   order_no:this.$route.query.order_no,
+                   produce_time:this.$route.query.produce_time,
+                   page_size:this.pageSize,
+                   page_index:this.pageIndex
             }}).then(res=>{
-                this.tableData=res.data.list;
-                this.total = Number(res.data.total)
+                this.tableData=res.data.data;
+                this.total = res.data.total;
             })
         }
     }

+ 2 - 2
src/views/BidSystem/CompletionStatisticsDetail.vue

@@ -60,7 +60,7 @@ export default {
            {title:'项目编码',align:'center',minWidth:120,key:'order_no'},
            {title:'项目名称',align:'center',minWidth:120,key:'project_name'},
            {title:'平方',align:'center',minWidth:120,key:'area'},
-           {title:'图号',align:'center',minWidth:120,key:'url_number'},
+           {title:'图号',align:'center',minWidth:120,key:'url_number',ellipsis:true,tooltip:true},
             {title:'完工进度',align:'center',minWidth:120,key:'complete'},
              {title:'完工日期',align:'center',minWidth:120,key:'complete_time'},
            {title:'操作',align:'center',slot:'setSlot',minWidth:120},
@@ -98,7 +98,7 @@ export default {
             start_time:this.$route.query.start_time,
             end_time:this.$route.query.end_time
             }}).then(res=>{
-                this.tableData = res.data.list;
+                this.tableData = res.data.data;
                 this.total = Number(res.data.total);
             })
         }

+ 144 - 0
src/views/BidSystem/ContractList/BSTList.vue

@@ -0,0 +1,144 @@
+<template>
+  <div class="BidsList">
+     <Toptitle title="工装订单">
+      <slot name="titleButton">
+        <Button type="primary"
+                style="margin-right:10px;"
+           
+                ghost>导入</Button>
+      </slot>
+    </Toptitle>
+    <div style="height:84%;overflow:auto">
+      <Form style="display:flex;flex-wrap:wrap;margin:10px 0" :label-width="80">
+        <FormItem label='项目编码:'>
+          <Input size="small" clearable v-model="searchData.order_no"></Input>
+        </FormItem>
+       <FormItem label="项目名称:">
+         <Input size="small" clearable v-model="searchData.residential_name"></Input>
+       </FormItem>
+        <FormItem label="项目简称:">
+          <Input size="small" clearable v-model="searchData.abbreviation"></Input>
+        </FormItem>
+         <FormItem label="制单日期:">
+           <DatePicker type="date" placeholder="年/月/日" style="width: 130px" size='small' v-model="searchData.start_time"></DatePicker>
+            ~
+             <DatePicker type="date" placeholder="年/月/日" style="width: 130px" size='small'  v-model="searchData.end_time"></DatePicker>
+         </FormItem>
+        <FormItem>
+          <Button
+         type="primary"
+         size='small'
+         @click="init">
+            搜索
+          </Button>
+        </FormItem>
+      </Form>
+      <Table 
+        :data='tableData'
+    :columns='tableColumns'
+    border
+      >
+      <template slot="crt_time" slot-scope="{row}">
+        <span>{{func.replaceDate(row.crt_time)}}</span>
+        </template>
+        <template slot="set" slot-scope="{row}"> 
+          <a @click="goPageDetail(row,1)" style="margin-right:10px">编辑</a>
+          <a @click="goPageDetail(row,2)">详情</a>
+        </template>
+        </Table>
+    </div>
+     <div style="text-align:center;margin-top:20px">
+          <Page :page-size-opts="[10, 20, 30, 40,100]"
+                @on-page-size-change='changeSize'
+                @on-change='changePage'
+                :current='pageIndex'
+                show-total
+                :total="total"
+                show-sizer
+                :page-size='pageSize' />
+        </div>
+  </div>
+</template>
+
+<script>
+// 这里可以导入其他文件(比如:组件,工具js,第三方插件js,json文件,图片文件等等)
+// 例如:import 《组件名称》 from '《组件路径》';
+
+export default {
+  data() {
+    // 这里存放数据
+    return {
+      pageSize:10,
+      pageIndex:1,
+      total:0,
+         searchData:{
+           order_no:'',
+           residential_name:'',
+           abbreviation:'',
+           start_time:'',
+         end_time:''},
+         tableData:[],
+        tableColumns:[
+          {title:'项目编码',align:'center',key:'order_no',minWidth:80},
+           {title:'项目名称',align:'center',key:'residential_name',minWidth:80},
+            {title:'项目简称',align:'center',key:'abbreviation',minWidth:80},
+             {title:'合同金额',align:'center',key:'contract_price',minWidth:80},
+              {title:'核量金额',align:'center',key:'quantity_price',minWidth:80},
+               {title:'制单日期',align:'center',key:'crt_time',minWidth:80,slot:'crt_time'},
+                {title:'操作',align:'center',slot:'set',minWidth:80},
+        ]
+    }
+  },
+  // 生命周期 - 创建完成(可以访问当前this实例)
+  created() {
+  
+  },
+  // 生命周期 - 挂载完成(可以访问DOM元素)
+  mounted() {
+    this.getData();
+  },
+ methods:{
+   init(){
+      let data = [];
+      data=JSON.parse(JSON.stringify(this.searchData));
+      data.start_time = data.start_time?Date.parse(data.start_time).toString().slice(0,10):'';
+      data.end_time = data.end_time?Date.parse(data.end_time).toString().slice(0,10):'';
+      this.getData(data)
+   },
+   goPageDetail(row,type){
+         this.$router.push({path:'/cms/BidSystem/ContractList/edit',query:{order_no:row.order_no,type}})
+   },
+   changeSize(e){
+        this.pageSize = e;
+        this.getData();
+   },
+   changePage(e){
+      this.pageIndex = e;
+      this.getData();
+   },
+   getData(row){
+     this.axios.get('/api/frock_list',{params:{...row,page_size:this.pageSize,page_index:this.pageIndex}}).then(res=>{
+          this.tableData = res.data.data;
+          this.total = res.data.total;
+     })
+   }
+ },
+  // 监听属性 类似于data概念
+  // 监控data中的数据变化
+  watch: {},
+  beforeCreate() {}, // 生命周期 - 创建之前
+  beforeMount() {}, // 生命周期 - 挂载之前
+  beforeUpdate() {}, // 生命周期 - 更新之前
+  updated() {}, // 生命周期 - 更新之后
+  beforeDestroy() {}, // 生命周期 - 销毁之前
+  destroyed() {}, // 生命周期 - 销毁完成
+  activated() {}, // 如果页面有keep-alive缓存功能,这个函数会触发
+};
+</script>
+
+<style lang="scss" scoped>
+.BidsList{
+  margin-top: 10px;
+  height: 100%;
+}
+</style>

File diff suppressed because it is too large
+ 41 - 1182
src/views/BidSystem/ContractList/edit.vue


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

@@ -1,862 +1,16 @@
 <template>
-  <div class="BidsList">
-    <FullPage
-      title="工装订单列表"
-      :list="set_list"
-      @init="init"
-      :loading="loading"
-      @searchData="init"
-      @selectTable="selectTable"
-      @changePage="changePage"
-      @changeSize="changeSize"
-      :tableColums="computedTable"
-      :showPage="false"
-      :tableData="tableData"
-      :page_index="page_index"
-      :total="total"
-    >
-      <div slot="titleButton" style="display: flex">
-        <Upload
-          name="your_file"
-          :show-upload-list="false"
-          :headers="headers"
-          :on-error="uploadError"
-          :on-success="uploadSuccess"
-          :action="$store.state.ip + '/api/order_area_import'"
-        >
-          <Button type="success" ghost icon="md-exit" style="margin-right: 10px"
-            >导入</Button
-          >
-        </Upload>
-        <Button
-          @click="exportData"
-          type="warning"
-          ghost
-          icon="md-return-left"
-          style="margin-right: 10px"
-          >导出</Button
-        >
-        <Button
-          @click="handleToEditpage(1)"
-          type="primary"
-          ghost
-          style="margin-right: 10px"
-          >新增</Button
-        >
-      </div>
-      <div slot="navButton" style="display: flex">
-        <Button
-          v-if="persimissionData['表头设置'] || persimissionData.all"
-          @click="setupTableHeader"
-          type="primary"
-          style="margin-right: 10px"
-          ghost
-          icon="ios-cog"
-          >设置</Button
-        >
-      </div>
-      <template slot="basicTypeSet" slot-scope="{ row }">
-        <div>
-          <span
-            v-for="item in warningList"
-            :key="item.id"
-            :style="{ color: item.color }"
-            v-show="item.id == row.warning_state"
-            >{{ item.title }}</span
-          >
-        </div>
-      </template>
-      <template slot="set" slot-scope="{ row, index }">
-        <div>
-          <a
-            style="margin: 0 5px"
-            :disabled="row.top_status >= 1"
-            @click="handleSet(row, index, 1)"
-            >深化</a
-          >
-          <a
-            style="margin: 0 5px"
-            :disabled="row.top_status != 0"
-            @click="handleSet(row, index, 2)"
-            >编辑</a
-          >
-          <a style="margin: 0 5px" @click="handleSet(row, index, 3)">详情</a>
-          <a
-            style="margin: 0 5px"
-            :disabled="row.top_status != 0"
-            @click="handleSet(row, index, 4)"
-            >删除</a
-          >
-        </div>
-      </template>
-      <template slot="pageSlot">
-        <div class="pageSlotStyle">
-          <Page
-            :page-size-opts="[10, 20, 30, 40, 100, 1000]"
-            @on-page-size-change="changeSize"
-            @on-change="changePage"
-            :current="page_index"
-            show-total
-            :total="total"
-            show-sizer
-            :page-size="page_size"
-          />
-        </div>
-      </template>
-    </FullPage>
-    <Modal v-model="processModal" title="下深化">
-      <div>
-        <div class="process_modal">
-          <span>深化人员:</span>
-          <Select v-model="process_man" style="width: 150px">
-            <Option
-              v-for="item in processManList"
-              :key="item.id"
-              :label="item.nickname"
-              :value="item.id"
-            ></Option>
-          </Select>
-        </div>
-        <div class="process_modal">
-          <span>选择时间:</span>
-          <DatePicker
-            type="date"
-            v-model="process_start_time"
-            placeholder="年/月/日"
-            style="width: 150px"
-          ></DatePicker>
-          至
-          <DatePicker
-            type="date"
-            v-model="process_end_time"
-            placeholder="年/月/日"
-            style="width: 150px"
-          ></DatePicker>
-        </div>
-      </div>
-      <div slot="footer">
-        <Button
-          @click="processModal = false"
-          type="primary"
-          ghost
-          style="margin-right: 10px"
-          >取消</Button
-        >
-        <Button
-          @click="handleProcess"
-          type="primary"
-          style="margin-right: 10px"
-          :disabled="process_control"
-          >确定</Button
-        >
-      </div>
-    </Modal>
-    <Modal
-      v-model="showModal"
-      title="设置"
-      @on-ok="handleModalOk"
-      @on-cancel="showModal = false"
-    >
-      <div class="modal_content">
-        <Tabs
-          value="name1"
-          style="max-height: 700px; overflow: hidden; overflow-y: auto"
-        >
-          <TabPane label="表单设置" name="name1">
-            <Table
-              :columns="formModalColumns"
-              border
-              draggable
-              :data="formModalTableData"
-              @on-drag-drop="(a, b) => onDragDrop(a, b, formModalTableData, 1)"
-            ></Table>
-          </TabPane>
-          <TabPane label="表头设置" name="name2">
-            <Table
-              :columns="tableModalColumns"
-              border
-              draggable
-              @on-drag-drop="(a, b) => onDragDrop(a, b, tableModalTableData, 2)"
-              :data="tableModalTableData"
-            ></Table>
-          </TabPane>
-        </Tabs>
-      </div>
-    </Modal>
+  <div style="height:92%">
+    <BSTList v-if="true"/>
+    <OldList v-else />
   </div>
 </template>
-
 <script>
-// 这里可以导入其他文件(比如:组件,工具js,第三方插件js,json文件,图片文件等等)
-// 例如:import 《组件名称》 from '《组件路径》';
-import { mapState } from "vuex";
-
+import OldList from '@/views/BidSystem/ContractList/oldList'
+import BSTList from '@/views/BidSystem/ContractList/BSTList'
 export default {
-  name: "BidSystemContractList",
-  data() {
-    // 这里存放数据
-    return {
-      process_control: false,
-      tableColums: [
-        {
-          type: "selection",
-          align: "center",
-          key: "selection",
-          minWidth: 100,
-          fixed: "left",
-          title: "全选",
-        },
-        { title: "订单号", align: "center", key: "order_no", minWidth: 150 },
-        {
-          title: "项目名称",
-          align: "center",
-          key: "residential_name",
-          minWidth: 120,
-        },
-        { title: "详细地址", align: "center", key: "address", minWidth: 200 },
-        // {
-        //   title: '订单类型', align: 'center', key: 'renovation_type', minWidth: 100,
-        //   render: (h, params) => h('span', {}, params.row.renovation_type == 1 ? '工装' : '家装')
-        // },
-        {
-          title: "客户姓名",
-          align: "center",
-          key: "client_name",
-          minWidth: 120,
-        },
-        { title: "手机号", align: "center", key: "mobile", minWidth: 150 },
-        {
-          title: "紧急程度",
-          align: "center",
-          key: "warning_state",
-          minWidth: 100,
-          slot: "basicTypeSet",
-        },
-        {
-          title: "业务员",
-          align: "center",
-          key: "salesman",
-          minWidth: 100,
-          // render: (h, params) => {
-          //   let name = ''
-          //   this.salesmanList.forEach(el => {
-          //     if (el.id == params.row.salesman) {
-          //       name = el.nickname
-          //     }
-          //   })
-          //   return h('span', {}, name
-          //   )
-          // }
-        },
-        {
-          title: "开始日期",
-          align: "center",
-          key: "start_time",
-          minWidth: 150,
-          render: (h, params) =>
-            h("span", {}, this.func.replaceDateNoHMS(params.row.start_time)),
-        },
-        {
-          title: "交付日期",
-          align: "center",
-          key: "end_time",
-          minWidth: 150,
-          render: (h, params) =>
-            h("span", {}, this.func.replaceDateNoHMS(params.row.end_time)),
-        },
-        {
-          title: "订单状态",
-          align: "center",
-          key: "top_status",
-          minWidth: 100,
-          // { label: "安装", value: 16 },
-          render: (h, params) =>
-            h(
-              "span",
-              {},
-              params.row.top_status == 0
-                ? "订单制作中"
-                : params.row.top_status == 1
-                ? "深化中"
-                : params.row.top_status == 2
-                ? "拆单中"
-                : params.row.top_status == 3
-                ? "生产订单"
-                : params.row.top_status == 4
-                ? "计划订单"
-                : params.row.top_status == 5
-                ? "派工订单"
-                : params.row.top_status == 6
-                ? "已完成"
-                : params.row.top_status == 99
-                ? "全部"
-                : "订单制作中"
-            ),
-        },
-        {
-          title: "下单日期",
-          align: "center",
-          key: "crt_time",
-          minWidth: 150,
-          render: (h, params) =>
-            h("span", {}, this.func.replaceDate(params.row.crt_time)),
-        },
-        {
-          title: "操作",
-          align: "center",
-          key: "set",
-          slot: "set",
-          fixed: "right",
-          minWidth: 200,
-        },
-      ],
-      tableData: [],
-      page_index: 1,
-      page_size: 10,
-      total: 0,
-      loading: false,
-      proxyObj: {},
-      headers: { Authorization: localStorage.getItem("token") },
-      selects: [],
-      salesmanList: [],
-      processModal: false,
-      process_man: "",
-      processManList: [],
-      process_start_time: "",
-      process_end_time: "",
-      order_no: "",
-      showModal: false,
-      currencyPageId: null,
-      formModalColumns: [
-        {
-          title: "是否展示",
-          align: "center",
-          key: "is_show",
-          minWidth: 60,
-          render: (h, params) => {
-            const { index } = params;
-            const currentRow = JSON.parse(
-              JSON.stringify(this.formModalTableData[index])
-            );
-            return h("Checkbox", {
-              props: {
-                value: currentRow.is_show,
-              },
-              on: {
-                "on-change": (e) => {
-                  currentRow.is_show = e;
-                  this.formModalTableData.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.formModalTableData[index])
-            );
-            return h("Input", {
-              props: {
-                value: currentRow.title,
-                type: "text",
-              },
-              on: {
-                "on-change": (e) => {
-                  currentRow.title = e.target.value;
-                  this.formModalTableData.splice(index, 1, currentRow);
-                },
-              },
-            });
-          },
-        },
-      ],
-      formModalTableData: [
-        {
-          is_show: true,
-          key: "order_no",
-          value: "订单编号",
-          title: "订单编号",
-        },
-        {
-          is_show: true,
-          key: "residential_name",
-          value: "项目名称",
-          title: "项目名称",
-        },
-        {
-          is_show: true,
-          key: "client_name",
-          value: "客户姓名",
-          title: "客户姓名",
-        },
-        { is_show: true, key: "mobile", value: "手机号", title: "手机号" },
-        {
-          is_show: true,
-          key: "top_status",
-          value: "订单状态",
-          title: "订单状态",
-        },
-        {
-          is_show: true,
-          key: "warning_state",
-          value: "紧急程度",
-          title: "紧急程度",
-        },
-      ],
-      sub_formModalTableData: [],
-      tableModalColumns: [
-        {
-          title: "是否展示",
-          align: "center",
-          key: "is_show",
-          minWidth: 60,
-          render: (h, params) => {
-            const { index } = params;
-            const currentRow = JSON.parse(
-              JSON.stringify(this.tableModalTableData[index])
-            );
-            return h("Checkbox", {
-              props: {
-                value: currentRow.is_show,
-              },
-              on: {
-                "on-change": (e) => {
-                  currentRow.is_show = e;
-                  this.tableModalTableData.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.tableModalTableData[index])
-            );
-            return h("Input", {
-              props: {
-                value: currentRow.title,
-                type: "text",
-                disabled: currentRow.title == "全选" ? true : false,
-              },
-              on: {
-                "on-change": (e) => {
-                  currentRow.title = e.target.value;
-                  this.tableModalTableData.splice(index, 1, currentRow);
-                },
-              },
-            });
-          },
-        },
-      ],
-      sub_tableModalTableData: [],
-      tableModalTableData: [
-        { is_show: true, key: "selection", value: "全选", title: "全选" },
-        {
-          is_show: true,
-          key: "order_no",
-          value: "订单编号",
-          title: "订单编号",
-        },
-        {
-          is_show: true,
-          key: "residential_name",
-          value: "项目名称",
-          title: "项目名称",
-        },
-        { is_show: true, key: "address", value: "详细地址", title: "详细地址" },
-        {
-          is_show: true,
-          key: "client_name",
-          value: "客户姓名",
-          title: "客户姓名",
-        },
-        { is_show: true, key: "mobile", value: "手机号", title: "手机号" },
-        {
-          is_show: true,
-          key: "warning_state",
-          value: "紧急程度",
-          title: "紧急程度",
-        },
-        { is_show: true, key: "salesman", value: "业务员", title: "业务员" },
-        {
-          is_show: true,
-          key: "start_time",
-          value: "开始日期",
-          title: "开始日期",
-        },
-        {
-          is_show: true,
-          key: "end_time",
-          value: "交付日期",
-          title: "交付日期",
-        },
-        {
-          is_show: true,
-          key: "top_status",
-          value: "订单状态",
-          title: "订单状态",
-        },
-        {
-          is_show: true,
-          key: "crt_time",
-          value: "下单日期",
-          title: "下单日期",
-        },
-        { is_show: true, key: "set", value: "操作", title: "操作" },
-      ],
-      warningList: [],
-      oa_id: "",
-    };
+  components:{
+    OldList,
+    BSTList
   },
-  // 生命周期 - 创建完成(可以访问当前this实例)
-  created() {
-    this.currencyPageId = this.$store.state.navgationData[0].sub[1].sub[0].id;
-    // 获取紧急程度
-    this.axios.get("/api/warning_list").then((res) => {
-      this.warningList = res.data.data;
-    });
-  },
-  // 生命周期 - 挂载完成(可以访问DOM元素)
-  mounted() {
-    this.axios("/api/user").then((res) => {
-      (this.salesmanList = res.data.data),
-        (this.processManList = res.data.data);
-    });
-  },
-  methods: {
-    handleProcess() {
-      this.process_control = true;
-      this.axios({
-        method: "get",
-        url: "/api/order_area_pull",
-        params: {
-          order_no: this.order_no,
-          oa_id: this.oa_id,
-          sub_status: 1,
-          process_man: this.process_man,
-          process_start_time: this.func.replaceDateNoHMS(
-            this.process_start_time
-          ),
-          process_end_time: this.func.replaceDateNoHMS(this.process_end_time),
-        },
-      }).then((res) => {
-        if (res.code == 200) {
-          this.$Message.success(res.msg);
-          this.getData(this.proxyObj);
-          this.processModal = false;
-        }
-        setTimeout(() => {
-          this.process_control = false;
-        }, 500);
-      });
-    },
-    //1深化  2编辑  3详情  4删除  0新增
-    handleSet(row, index, type) {
-      switch (type) {
-        case 1:
-          this.processModal = true;
-          this.order_no = row.order_no;
-          this.oa_id = row.oa_id;
-          break;
-        case 2:
-          this.$router.push({
-            path: "/cms/BidSystem/ContractList/edit",
-            query: {
-              type,
-              order_no: row.order_no,
-              oa_id: row.oa_id,
-            },
-          });
-          break;
-        case 3:
-          this.$router.push({
-            path: "/cms/BidSystem/ContractList/info",
-            query: {
-              type,
-              order_no: row.order_no,
-              oa_id: row.oa_id,
-            },
-          });
-          break;
-        case 4:
-          this.$Modal.confirm({
-            title: "确认删除?",
-            content: "此操作确认后不可恢复,请确认!",
-            onOk: () => {
-              this.axios({
-                method: "get",
-                url: "/api/order_area_del",
-                params: {
-                  order_no: row.order_no,
-                },
-              }).then((res) => {
-                this.$Message.success(res.msg);
-                this.getData(this.proxyObj);
-              });
-            },
-            onCancel: () => {},
-          });
-          break;
-      }
-    },
-    handleToEditpage(type) {
-      this.$router.push({
-        path: "/cms/BidSystem/ContractList/edit",
-        query: {
-          type,
-        },
-      });
-    },
-    init(row) {
-      this.page_index = 1;
-      row.page_index = this.page_index;
-      row.page_size = this.page_size;
-      // 0 业务单
-      // row.sub_status = 0;
-      if (!row.top_status && row.top_status != 0) {
-        row.top_status = 99;
-      }
-      this.proxyObj = row;
-      this.getData(row);
-    },
-    getData(row) {
-      this.loading = true;
-      this.axios("/api/order_area", { params: row }).then((res) => {
-        this.loading = false;
-        this.tableData = res.data.data;
-        this.total = res.data.total;
-        this.handleSetHeader(res);
-      });
-    },
-    handleSetHeader(res) {
-      if (res.data.tableSet.tableSet && res.data.tableSet.tableSet.length > 0) {
-        this.tableModalTableData = res.data.tableSet.tableSet;
-      }
-      if (res.data.tableSet.formSet && res.data.tableSet.formSet.length > 0) {
-        this.formModalTableData = res.data.tableSet.formSet;
-      }
-      this.sub_formModalTableData = JSON.parse(
-        JSON.stringify(this.formModalTableData)
-      );
-      this.sub_tableModalTableData = JSON.parse(
-        JSON.stringify(this.tableModalTableData)
-      );
-    },
-    setupTableHeader() {
-      this.showModal = true;
-      return;
-    },
-    changePage(e) {
-      this.page_index = e;
-      this.proxyObj.page_index = this.page_index;
-      this.getData(this.proxyObj);
-    },
-    changeSize(e) {
-      this.page_size = e;
-      this.proxyObj.page_size = this.page_size;
-      this.getData(this.proxyObj);
-    },
-    async exportData() {
-      const res = await this.axios("/api/work_export", {
-        params: { ...this.proxyObj },
-      });
-      if (res.code == 200) {
-        let url = `${this.$store.state.ip}/api/storage/${res.data.file}`;
-        location.href = url;
-      }
-    },
-    uploadSuccess(res) {
-      if (res.code == 200) {
-        this.$Message.success(res.msg || "上传成功");
-      } else {
-        this.$Message.warning(res.msg || "上传失败");
-      }
-      this.getData(this.proxyObj);
-    },
-    uploadError(err) {
-      this.$Message.error(err.msg || "上传失败");
-    },
-    selectTable(e) {
-      this.selects = e;
-    },
-    onDragDrop(a, b, table, type) {
-      if (type == 2 && (a == 0 || b == 0)) {
-        return this.$Message.warning("全选位置不可变");
-      }
-      table.splice(b, 0, ...table.splice(a, 1));
-    },
-    handleModalOk() {
-      this.formModalTableData.forEach((element, index) => {
-        element.sort = index;
-      });
-      this.tableModalTableData.forEach((element, index) => {
-        element.sort = index;
-      });
-      this.axios({
-        method: "post",
-        url: "/api/update/table",
-        data: {
-          id: this.currencyPageId,
-          result: {
-            formSet: this.formModalTableData || [],
-            tableSet: this.tableModalTableData || [],
-          },
-        },
-      })
-        .then((res) => {
-          this.$Message.success(res.msg);
-          this.init(this.proxyObj);
-        })
-        .catch((err) => {});
-    },
-  },
-  // 监听属性 类似于data概念
-  computed: {
-    ...mapState(["persimissionData"]),
-    computedTable() {
-      if (this.sub_tableModalTableData.length < 1) {
-        return this.tableColums;
-      }
-      return this.func.computedHeader(
-        this.sub_tableModalTableData,
-        this.tableColums
-      );
-    },
-    set_list() {
-      if (this.sub_formModalTableData.length < 1) {
-        this.list;
-      }
-      return this.func.computedForm(this.sub_formModalTableData, this.list);
-    },
-    list() {
-      return [
-        {
-          title: "订单编号",
-          serverName: "order_no",
-          name: "Input",
-          value: "",
-          placeholder: "请输入订单号",
-        },
-        {
-          title: "项目名称",
-          name: "Input",
-          placeholder: "请输入项目名称",
-          value: "",
-          serverName: "residential_name",
-        },
-        {
-          title: "客户姓名",
-          name: "Input",
-          placeholder: "请输入客户姓名",
-          value: "",
-          serverName: "client_name",
-        },
-        {
-          title: "手机号",
-          name: "Input",
-          placeholder: "请输入手机号",
-          value: "",
-          serverName: "mobile",
-        },
-        {
-          title: "订单状态",
-          name: "Select",
-          placeholder: "请选择订单状态",
-          serverName: "top_status",
-          value: 99,
-          option: [
-            { label: "订单制作中", value: 0 },
-            { label: "深化中", value: 1 },
-            { label: "拆单中", value: 2 },
-            { label: "生产订单", value: 3 },
-            { label: "计划订单", value: 4 },
-            { label: "派工订单", value: 5 },
-            { label: "已完成", value: 6 },
-          ],
-        },
-        {
-          title: "紧急程度",
-          name: "Select",
-          serverName: "warning_state",
-          placeholder: "请选择紧急程度",
-          value: "",
-          optionName: "title",
-          optionValue: "id",
-          option: this.warningList,
-        },
-      ];
-    },
-  },
-  beforeRouteLeave(to, from, next) {
-    if (
-      to.path == "/cms/BidSystem/ContractList/edit" ||
-      to.path == "/cms/BidSystem/ContractList/info"
-    ) {
-      this.$route.meta.keepAlive = true;
-    } else {
-      this.$route.meta.keepAlive = false;
-    }
-    next();
-  },
-  beforeRouteEnter(to, from, next) {
-    next((vm) => {
-      vm.getData(vm.proxyObj);
-    });
-  },
-  // 监控data中的数据变化
-  watch: {},
-  beforeCreate() {}, // 生命周期 - 创建之前
-  beforeMount() {}, // 生命周期 - 挂载之前
-  beforeUpdate() {}, // 生命周期 - 更新之前
-  updated() {}, // 生命周期 - 更新之后
-  beforeDestroy() {}, // 生命周期 - 销毁之前
-  destroyed() {}, // 生命周期 - 销毁完成
-  activated() {}, // 如果页面有keep-alive缓存功能,这个函数会触发
-};
-</script>
-
-<style lang="scss" scoped>
-.pageSlotStyle {
-  display: flex;
-  justify-content: center;
-  margin-top: 40px;
-}
-.process_modal {
-  display: flex;
-  justify-content: center;
-  align-items: center;
-  padding: 10px;
-}
-.modal_content {
-  display: flex;
-  justify-content: center;
-}
-/deep/.ivu-tabs-nav-scroll {
-  display: flex;
-  justify-content: center;
 }
-</style>
+</script>

+ 862 - 0
src/views/BidSystem/ContractList/oldList.vue

@@ -0,0 +1,862 @@
+<template>
+  <div class="BidsList">
+    <FullPage
+      title="工装订单列表"
+      :list="set_list"
+      @init="init"
+      :loading="loading"
+      @searchData="init"
+      @selectTable="selectTable"
+      @changePage="changePage"
+      @changeSize="changeSize"
+      :tableColums="computedTable"
+      :showPage="false"
+      :tableData="tableData"
+      :page_index="page_index"
+      :total="total"
+    >
+      <div slot="titleButton" style="display: flex">
+        <Upload
+          name="your_file"
+          :show-upload-list="false"
+          :headers="headers"
+          :on-error="uploadError"
+          :on-success="uploadSuccess"
+          :action="$store.state.ip + '/api/order_area_import'"
+        >
+          <Button type="success" ghost icon="md-exit" style="margin-right: 10px"
+            >导入</Button
+          >
+        </Upload>
+        <Button
+          @click="exportData"
+          type="warning"
+          ghost
+          icon="md-return-left"
+          style="margin-right: 10px"
+          >导出</Button
+        >
+        <Button
+          @click="handleToEditpage(1)"
+          type="primary"
+          ghost
+          style="margin-right: 10px"
+          >新增</Button
+        >
+      </div>
+      <div slot="navButton" style="display: flex">
+        <Button
+          v-if="persimissionData['表头设置'] || persimissionData.all"
+          @click="setupTableHeader"
+          type="primary"
+          style="margin-right: 10px"
+          ghost
+          icon="ios-cog"
+          >设置</Button
+        >
+      </div>
+      <template slot="basicTypeSet" slot-scope="{ row }">
+        <div>
+          <span
+            v-for="item in warningList"
+            :key="item.id"
+            :style="{ color: item.color }"
+            v-show="item.id == row.warning_state"
+            >{{ item.title }}</span
+          >
+        </div>
+      </template>
+      <template slot="set" slot-scope="{ row, index }">
+        <div>
+          <a
+            style="margin: 0 5px"
+            :disabled="row.top_status >= 1"
+            @click="handleSet(row, index, 1)"
+            >深化</a
+          >
+          <a
+            style="margin: 0 5px"
+            :disabled="row.top_status != 0"
+            @click="handleSet(row, index, 2)"
+            >编辑</a
+          >
+          <a style="margin: 0 5px" @click="handleSet(row, index, 3)">详情</a>
+          <a
+            style="margin: 0 5px"
+            :disabled="row.top_status != 0"
+            @click="handleSet(row, index, 4)"
+            >删除</a
+          >
+        </div>
+      </template>
+      <template slot="pageSlot">
+        <div class="pageSlotStyle">
+          <Page
+            :page-size-opts="[10, 20, 30, 40, 100, 1000]"
+            @on-page-size-change="changeSize"
+            @on-change="changePage"
+            :current="page_index"
+            show-total
+            :total="total"
+            show-sizer
+            :page-size="page_size"
+          />
+        </div>
+      </template>
+    </FullPage>
+    <Modal v-model="processModal" title="下深化">
+      <div>
+        <div class="process_modal">
+          <span>深化人员:</span>
+          <Select v-model="process_man" style="width: 150px">
+            <Option
+              v-for="item in processManList"
+              :key="item.id"
+              :label="item.nickname"
+              :value="item.id"
+            ></Option>
+          </Select>
+        </div>
+        <div class="process_modal">
+          <span>选择时间:</span>
+          <DatePicker
+            type="date"
+            v-model="process_start_time"
+            placeholder="年/月/日"
+            style="width: 150px"
+          ></DatePicker>
+          至
+          <DatePicker
+            type="date"
+            v-model="process_end_time"
+            placeholder="年/月/日"
+            style="width: 150px"
+          ></DatePicker>
+        </div>
+      </div>
+      <div slot="footer">
+        <Button
+          @click="processModal = false"
+          type="primary"
+          ghost
+          style="margin-right: 10px"
+          >取消</Button
+        >
+        <Button
+          @click="handleProcess"
+          type="primary"
+          style="margin-right: 10px"
+          :disabled="process_control"
+          >确定</Button
+        >
+      </div>
+    </Modal>
+    <Modal
+      v-model="showModal"
+      title="设置"
+      @on-ok="handleModalOk"
+      @on-cancel="showModal = false"
+    >
+      <div class="modal_content">
+        <Tabs
+          value="name1"
+          style="max-height: 700px; overflow: hidden; overflow-y: auto"
+        >
+          <TabPane label="表单设置" name="name1">
+            <Table
+              :columns="formModalColumns"
+              border
+              draggable
+              :data="formModalTableData"
+              @on-drag-drop="(a, b) => onDragDrop(a, b, formModalTableData, 1)"
+            ></Table>
+          </TabPane>
+          <TabPane label="表头设置" name="name2">
+            <Table
+              :columns="tableModalColumns"
+              border
+              draggable
+              @on-drag-drop="(a, b) => onDragDrop(a, b, tableModalTableData, 2)"
+              :data="tableModalTableData"
+            ></Table>
+          </TabPane>
+        </Tabs>
+      </div>
+    </Modal>
+  </div>
+</template>
+
+<script>
+// 这里可以导入其他文件(比如:组件,工具js,第三方插件js,json文件,图片文件等等)
+// 例如:import 《组件名称》 from '《组件路径》';
+import { mapState } from "vuex";
+
+export default {
+  name: "BidSystemContractList",
+  data() {
+    // 这里存放数据
+    return {
+      process_control: false,
+      tableColums: [
+        {
+          type: "selection",
+          align: "center",
+          key: "selection",
+          minWidth: 100,
+          fixed: "left",
+          title: "全选",
+        },
+        { title: "订单号", align: "center", key: "order_no", minWidth: 150 },
+        {
+          title: "项目名称",
+          align: "center",
+          key: "residential_name",
+          minWidth: 120,
+        },
+        { title: "详细地址", align: "center", key: "address", minWidth: 200 },
+        // {
+        //   title: '订单类型', align: 'center', key: 'renovation_type', minWidth: 100,
+        //   render: (h, params) => h('span', {}, params.row.renovation_type == 1 ? '工装' : '家装')
+        // },
+        {
+          title: "客户姓名",
+          align: "center",
+          key: "client_name",
+          minWidth: 120,
+        },
+        { title: "手机号", align: "center", key: "mobile", minWidth: 150 },
+        {
+          title: "紧急程度",
+          align: "center",
+          key: "warning_state",
+          minWidth: 100,
+          slot: "basicTypeSet",
+        },
+        {
+          title: "业务员",
+          align: "center",
+          key: "salesman",
+          minWidth: 100,
+          // render: (h, params) => {
+          //   let name = ''
+          //   this.salesmanList.forEach(el => {
+          //     if (el.id == params.row.salesman) {
+          //       name = el.nickname
+          //     }
+          //   })
+          //   return h('span', {}, name
+          //   )
+          // }
+        },
+        {
+          title: "开始日期",
+          align: "center",
+          key: "start_time",
+          minWidth: 150,
+          render: (h, params) =>
+            h("span", {}, this.func.replaceDateNoHMS(params.row.start_time)),
+        },
+        {
+          title: "交付日期",
+          align: "center",
+          key: "end_time",
+          minWidth: 150,
+          render: (h, params) =>
+            h("span", {}, this.func.replaceDateNoHMS(params.row.end_time)),
+        },
+        {
+          title: "订单状态",
+          align: "center",
+          key: "top_status",
+          minWidth: 100,
+          // { label: "安装", value: 16 },
+          render: (h, params) =>
+            h(
+              "span",
+              {},
+              params.row.top_status == 0
+                ? "订单制作中"
+                : params.row.top_status == 1
+                ? "深化中"
+                : params.row.top_status == 2
+                ? "拆单中"
+                : params.row.top_status == 3
+                ? "生产订单"
+                : params.row.top_status == 4
+                ? "计划订单"
+                : params.row.top_status == 5
+                ? "派工订单"
+                : params.row.top_status == 6
+                ? "已完成"
+                : params.row.top_status == 99
+                ? "全部"
+                : "订单制作中"
+            ),
+        },
+        {
+          title: "下单日期",
+          align: "center",
+          key: "crt_time",
+          minWidth: 150,
+          render: (h, params) =>
+            h("span", {}, this.func.replaceDate(params.row.crt_time)),
+        },
+        {
+          title: "操作",
+          align: "center",
+          key: "set",
+          slot: "set",
+          fixed: "right",
+          minWidth: 200,
+        },
+      ],
+      tableData: [],
+      page_index: 1,
+      page_size: 10,
+      total: 0,
+      loading: false,
+      proxyObj: {},
+      headers: { Authorization: localStorage.getItem("token") },
+      selects: [],
+      salesmanList: [],
+      processModal: false,
+      process_man: "",
+      processManList: [],
+      process_start_time: "",
+      process_end_time: "",
+      order_no: "",
+      showModal: false,
+      currencyPageId: null,
+      formModalColumns: [
+        {
+          title: "是否展示",
+          align: "center",
+          key: "is_show",
+          minWidth: 60,
+          render: (h, params) => {
+            const { index } = params;
+            const currentRow = JSON.parse(
+              JSON.stringify(this.formModalTableData[index])
+            );
+            return h("Checkbox", {
+              props: {
+                value: currentRow.is_show,
+              },
+              on: {
+                "on-change": (e) => {
+                  currentRow.is_show = e;
+                  this.formModalTableData.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.formModalTableData[index])
+            );
+            return h("Input", {
+              props: {
+                value: currentRow.title,
+                type: "text",
+              },
+              on: {
+                "on-change": (e) => {
+                  currentRow.title = e.target.value;
+                  this.formModalTableData.splice(index, 1, currentRow);
+                },
+              },
+            });
+          },
+        },
+      ],
+      formModalTableData: [
+        {
+          is_show: true,
+          key: "order_no",
+          value: "订单编号",
+          title: "订单编号",
+        },
+        {
+          is_show: true,
+          key: "residential_name",
+          value: "项目名称",
+          title: "项目名称",
+        },
+        {
+          is_show: true,
+          key: "client_name",
+          value: "客户姓名",
+          title: "客户姓名",
+        },
+        { is_show: true, key: "mobile", value: "手机号", title: "手机号" },
+        {
+          is_show: true,
+          key: "top_status",
+          value: "订单状态",
+          title: "订单状态",
+        },
+        {
+          is_show: true,
+          key: "warning_state",
+          value: "紧急程度",
+          title: "紧急程度",
+        },
+      ],
+      sub_formModalTableData: [],
+      tableModalColumns: [
+        {
+          title: "是否展示",
+          align: "center",
+          key: "is_show",
+          minWidth: 60,
+          render: (h, params) => {
+            const { index } = params;
+            const currentRow = JSON.parse(
+              JSON.stringify(this.tableModalTableData[index])
+            );
+            return h("Checkbox", {
+              props: {
+                value: currentRow.is_show,
+              },
+              on: {
+                "on-change": (e) => {
+                  currentRow.is_show = e;
+                  this.tableModalTableData.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.tableModalTableData[index])
+            );
+            return h("Input", {
+              props: {
+                value: currentRow.title,
+                type: "text",
+                disabled: currentRow.title == "全选" ? true : false,
+              },
+              on: {
+                "on-change": (e) => {
+                  currentRow.title = e.target.value;
+                  this.tableModalTableData.splice(index, 1, currentRow);
+                },
+              },
+            });
+          },
+        },
+      ],
+      sub_tableModalTableData: [],
+      tableModalTableData: [
+        { is_show: true, key: "selection", value: "全选", title: "全选" },
+        {
+          is_show: true,
+          key: "order_no",
+          value: "订单编号",
+          title: "订单编号",
+        },
+        {
+          is_show: true,
+          key: "residential_name",
+          value: "项目名称",
+          title: "项目名称",
+        },
+        { is_show: true, key: "address", value: "详细地址", title: "详细地址" },
+        {
+          is_show: true,
+          key: "client_name",
+          value: "客户姓名",
+          title: "客户姓名",
+        },
+        { is_show: true, key: "mobile", value: "手机号", title: "手机号" },
+        {
+          is_show: true,
+          key: "warning_state",
+          value: "紧急程度",
+          title: "紧急程度",
+        },
+        { is_show: true, key: "salesman", value: "业务员", title: "业务员" },
+        {
+          is_show: true,
+          key: "start_time",
+          value: "开始日期",
+          title: "开始日期",
+        },
+        {
+          is_show: true,
+          key: "end_time",
+          value: "交付日期",
+          title: "交付日期",
+        },
+        {
+          is_show: true,
+          key: "top_status",
+          value: "订单状态",
+          title: "订单状态",
+        },
+        {
+          is_show: true,
+          key: "crt_time",
+          value: "下单日期",
+          title: "下单日期",
+        },
+        { is_show: true, key: "set", value: "操作", title: "操作" },
+      ],
+      warningList: [],
+      oa_id: "",
+    };
+  },
+  // 生命周期 - 创建完成(可以访问当前this实例)
+  created() {
+    this.currencyPageId = this.$store.state.navgationData[0].sub[1].sub[0].id;
+    // 获取紧急程度
+    this.axios.get("/api/warning_list").then((res) => {
+      this.warningList = res.data.data;
+    });
+  },
+  // 生命周期 - 挂载完成(可以访问DOM元素)
+  mounted() {
+    this.axios("/api/user").then((res) => {
+      (this.salesmanList = res.data.data),
+        (this.processManList = res.data.data);
+    });
+  },
+  methods: {
+    handleProcess() {
+      this.process_control = true;
+      this.axios({
+        method: "get",
+        url: "/api/order_area_pull",
+        params: {
+          order_no: this.order_no,
+          oa_id: this.oa_id,
+          sub_status: 1,
+          process_man: this.process_man,
+          process_start_time: this.func.replaceDateNoHMS(
+            this.process_start_time
+          ),
+          process_end_time: this.func.replaceDateNoHMS(this.process_end_time),
+        },
+      }).then((res) => {
+        if (res.code == 200) {
+          this.$Message.success(res.msg);
+          this.getData(this.proxyObj);
+          this.processModal = false;
+        }
+        setTimeout(() => {
+          this.process_control = false;
+        }, 500);
+      });
+    },
+    //1深化  2编辑  3详情  4删除  0新增
+    handleSet(row, index, type) {
+      switch (type) {
+        case 1:
+          this.processModal = true;
+          this.order_no = row.order_no;
+          this.oa_id = row.oa_id;
+          break;
+        case 2:
+          this.$router.push({
+            path: "/cms/BidSystem/ContractList/edit",
+            query: {
+              type,
+              order_no: row.order_no,
+              oa_id: row.oa_id,
+            },
+          });
+          break;
+        case 3:
+          this.$router.push({
+            path: "/cms/BidSystem/ContractList/info",
+            query: {
+              type,
+              order_no: row.order_no,
+              oa_id: row.oa_id,
+            },
+          });
+          break;
+        case 4:
+          this.$Modal.confirm({
+            title: "确认删除?",
+            content: "此操作确认后不可恢复,请确认!",
+            onOk: () => {
+              this.axios({
+                method: "get",
+                url: "/api/order_area_del",
+                params: {
+                  order_no: row.order_no,
+                },
+              }).then((res) => {
+                this.$Message.success(res.msg);
+                this.getData(this.proxyObj);
+              });
+            },
+            onCancel: () => {},
+          });
+          break;
+      }
+    },
+    handleToEditpage(type) {
+      this.$router.push({
+        path: "/cms/BidSystem/ContractList/edit",
+        query: {
+          type,
+        },
+      });
+    },
+    init(row) {
+      this.page_index = 1;
+      row.page_index = this.page_index;
+      row.page_size = this.page_size;
+      // 0 业务单
+      // row.sub_status = 0;
+      if (!row.top_status && row.top_status != 0) {
+        row.top_status = 99;
+      }
+      this.proxyObj = row;
+      this.getData(row);
+    },
+    getData(row) {
+      this.loading = true;
+      this.axios("/api/order_area", { params: row }).then((res) => {
+        this.loading = false;
+        this.tableData = res.data.data;
+        this.total = res.data.total;
+        this.handleSetHeader(res);
+      });
+    },
+    handleSetHeader(res) {
+      if (res.data.tableSet.tableSet && res.data.tableSet.tableSet.length > 0) {
+        this.tableModalTableData = res.data.tableSet.tableSet;
+      }
+      if (res.data.tableSet.formSet && res.data.tableSet.formSet.length > 0) {
+        this.formModalTableData = res.data.tableSet.formSet;
+      }
+      this.sub_formModalTableData = JSON.parse(
+        JSON.stringify(this.formModalTableData)
+      );
+      this.sub_tableModalTableData = JSON.parse(
+        JSON.stringify(this.tableModalTableData)
+      );
+    },
+    setupTableHeader() {
+      this.showModal = true;
+      return;
+    },
+    changePage(e) {
+      this.page_index = e;
+      this.proxyObj.page_index = this.page_index;
+      this.getData(this.proxyObj);
+    },
+    changeSize(e) {
+      this.page_size = e;
+      this.proxyObj.page_size = this.page_size;
+      this.getData(this.proxyObj);
+    },
+    async exportData() {
+      const res = await this.axios("/api/work_export", {
+        params: { ...this.proxyObj },
+      });
+      if (res.code == 200) {
+        let url = `${this.$store.state.ip}/api/storage/${res.data.file}`;
+        location.href = url;
+      }
+    },
+    uploadSuccess(res) {
+      if (res.code == 200) {
+        this.$Message.success(res.msg || "上传成功");
+      } else {
+        this.$Message.warning(res.msg || "上传失败");
+      }
+      this.getData(this.proxyObj);
+    },
+    uploadError(err) {
+      this.$Message.error(err.msg || "上传失败");
+    },
+    selectTable(e) {
+      this.selects = e;
+    },
+    onDragDrop(a, b, table, type) {
+      if (type == 2 && (a == 0 || b == 0)) {
+        return this.$Message.warning("全选位置不可变");
+      }
+      table.splice(b, 0, ...table.splice(a, 1));
+    },
+    handleModalOk() {
+      this.formModalTableData.forEach((element, index) => {
+        element.sort = index;
+      });
+      this.tableModalTableData.forEach((element, index) => {
+        element.sort = index;
+      });
+      this.axios({
+        method: "post",
+        url: "/api/update/table",
+        data: {
+          id: this.currencyPageId,
+          result: {
+            formSet: this.formModalTableData || [],
+            tableSet: this.tableModalTableData || [],
+          },
+        },
+      })
+        .then((res) => {
+          this.$Message.success(res.msg);
+          this.init(this.proxyObj);
+        })
+        .catch((err) => {});
+    },
+  },
+  // 监听属性 类似于data概念
+  computed: {
+    ...mapState(["persimissionData"]),
+    computedTable() {
+      if (this.sub_tableModalTableData.length < 1) {
+        return this.tableColums;
+      }
+      return this.func.computedHeader(
+        this.sub_tableModalTableData,
+        this.tableColums
+      );
+    },
+    set_list() {
+      if (this.sub_formModalTableData.length < 1) {
+        this.list;
+      }
+      return this.func.computedForm(this.sub_formModalTableData, this.list);
+    },
+    list() {
+      return [
+        {
+          title: "订单编号",
+          serverName: "order_no",
+          name: "Input",
+          value: "",
+          placeholder: "请输入订单号",
+        },
+        {
+          title: "项目名称",
+          name: "Input",
+          placeholder: "请输入项目名称",
+          value: "",
+          serverName: "residential_name",
+        },
+        {
+          title: "客户姓名",
+          name: "Input",
+          placeholder: "请输入客户姓名",
+          value: "",
+          serverName: "client_name",
+        },
+        {
+          title: "手机号",
+          name: "Input",
+          placeholder: "请输入手机号",
+          value: "",
+          serverName: "mobile",
+        },
+        {
+          title: "订单状态",
+          name: "Select",
+          placeholder: "请选择订单状态",
+          serverName: "top_status",
+          value: 99,
+          option: [
+            { label: "订单制作中", value: 0 },
+            { label: "深化中", value: 1 },
+            { label: "拆单中", value: 2 },
+            { label: "生产订单", value: 3 },
+            { label: "计划订单", value: 4 },
+            { label: "派工订单", value: 5 },
+            { label: "已完成", value: 6 },
+          ],
+        },
+        {
+          title: "紧急程度",
+          name: "Select",
+          serverName: "warning_state",
+          placeholder: "请选择紧急程度",
+          value: "",
+          optionName: "title",
+          optionValue: "id",
+          option: this.warningList,
+        },
+      ];
+    },
+  },
+  beforeRouteLeave(to, from, next) {
+    if (
+      to.path == "/cms/BidSystem/ContractList/edit" ||
+      to.path == "/cms/BidSystem/ContractList/info"
+    ) {
+      this.$route.meta.keepAlive = true;
+    } else {
+      this.$route.meta.keepAlive = false;
+    }
+    next();
+  },
+  beforeRouteEnter(to, from, next) {
+    next((vm) => {
+      vm.getData(vm.proxyObj);
+    });
+  },
+  // 监控data中的数据变化
+  watch: {},
+  beforeCreate() {}, // 生命周期 - 创建之前
+  beforeMount() {}, // 生命周期 - 挂载之前
+  beforeUpdate() {}, // 生命周期 - 更新之前
+  updated() {}, // 生命周期 - 更新之后
+  beforeDestroy() {}, // 生命周期 - 销毁之前
+  destroyed() {}, // 生命周期 - 销毁完成
+  activated() {}, // 如果页面有keep-alive缓存功能,这个函数会触发
+};
+</script>
+
+<style lang="scss" scoped>
+.pageSlotStyle {
+  display: flex;
+  justify-content: center;
+  margin-top: 40px;
+}
+.process_modal {
+  display: flex;
+  justify-content: center;
+  align-items: center;
+  padding: 10px;
+}
+.modal_content {
+  display: flex;
+  justify-content: center;
+}
+/deep/.ivu-tabs-nav-scroll {
+  display: flex;
+  justify-content: center;
+}
+</style>

+ 3125 - 0
src/views/BidSystem/ContractList/old_edit.vue

@@ -0,0 +1,3125 @@
+<template>
+  <div class="BidSystemContractEdit">
+    <Toptitle
+      :title="
+        $route.query.type == 1
+          ? '新增工装订单'
+          : $route.query.type == 2
+          ? '编辑工装订单'
+          : '查看工装订单'
+      "
+    >
+      <slot name="titleButton">
+        <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_simple_import'"
+        >
+          <Button type="success" ghost icon="md-exit" style="margin-right:10px;"
+            >导入</Button
+          >
+        </Upload>
+        <Button
+          @click="showForms = true"
+          type="primary"
+          style="margin-right: 10px"
+          >表单设置</Button
+        >
+        <Button
+          type="primary"
+          style="margin-right: 10px"
+          :disabled="isChecked"
+          @click="showAddInputModal = true"
+        >
+          添加特殊字段
+        </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"
+          :disabled="isChecked"
+          ghost
+          style="margin-right: 10px"
+          >保存</Button
+        >
+      </slot>
+    </Toptitle>
+    <div class="top_search">
+      <Form :model="formData" :label-width="100" class="top_search_form">
+        <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"
+            :disabled="$route.query.type == 2"
+            v-model="formData.order_no"
+            placeholder="请输入订单编号"
+            style="width: 200px"
+          />
+        </FormItem>
+        <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"
+            size="small"
+            v-model="formData.residential_name"
+            placeholder="请输入项目名称"
+            style="width: 200px"
+          />
+        </FormItem>
+        <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
+            size="small"
+            :disabled="isChecked"
+            class="auto-width"
+            @on-change="handleClientChange"
+            v-model="formData.custom_id"
+          >
+            <Option
+              v-for="item in clientList"
+              :label="item.title"
+              :key="item.id"
+              :value="item.id"
+            ></Option>
+          </Select>
+        </FormItem>
+        <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"
+            size="small"
+            style="width: 200px"
+          >
+            <Option
+              v-for="_item in warningList"
+              :key="_item.id"
+              :value="_item.id"
+              :label="_item.title"
+            ></Option>
+          </Select>
+        </FormItem>
+        <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"
+            :disabled="isChecked"
+            v-model="formData.front_money"
+            placeholder="请输入项目定金"
+            style="width: 200px"
+          />
+          <!-- <RadioGroup v-model="formData.pay_state"
+                      size="small">
+            <Radio :label=0
+                   :disabled="isChecked">未收款</Radio>
+            <Radio :label=1
+                   :disabled="isChecked">已收款</Radio>
+          </RadioGroup> -->
+        </FormItem>
+        <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
+            size="small"
+            :disabled="isChecked"
+            class="auto-width"
+            @on-change="handleClientDetailChange"
+            v-model="formData.custom_detail_id"
+          >
+            <Option
+              v-for="item in clientDetailList"
+              :label="item.address"
+              :key="item.id"
+              :value="item.id"
+            ></Option>
+          </Select>
+        </FormItem>
+        <FormItem
+          v-if="
+            formSetTableData.filter((v) => v.key == 'custom_detail_id')[1]
+              .is_show
+          "
+          :label="
+            formSetTableData.filter((v) => v.key == 'custom_detail_id')[1].title
+          "
+        >
+          <Select
+            clearable
+            filterable
+            size="small"
+            :disabled="isChecked"
+            class="auto-width"
+            @on-change="handleClientDetailChange"
+            v-model="formData.custom_detail_id"
+          >
+            <Option
+              v-for="item in clientDetailList"
+              :label="item.mobile"
+              :key="item.id"
+              :value="item.id"
+            ></Option>
+          </Select>
+        </FormItem>
+        <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"
+            :disabled="isChecked"
+            :options="options"
+            @on-change="handleStartTimeChange"
+            v-model="formData.start_time"
+            placeholder=" 年/月/日"
+            style="width: 200px"
+          ></DatePicker>
+        </FormItem>
+        <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"
+            :disabled="isChecked"
+            :options="options"
+            @on-change="handleEndTimeChange"
+            v-model="formData.end_time"
+            placeholder=" 年/月/日"
+            style="width: 200px"
+          ></DatePicker>
+        </FormItem>
+        <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
+            :disabled="isChecked"
+            clearable
+            style="width: 200px"
+            size="small"
+          >
+            <Option
+              v-for="item in salesmanList"
+              :value="item.id"
+              :key="item.id"
+              >{{ item.nickname }}</Option
+            >
+          </Select>
+        </FormItem>
+        <!-- <FormItem label="订单类型:">
+          <Select v-model="formData.type"
+                  :disabled="isChecked"
+                  size="small"
+                  style="width:200px">
+            <Option label='工装'
+                    :value=1></Option>
+            <Option label='家装'
+                    :value=2></Option>
+          </Select>
+        </FormItem> -->
+        <FormItem
+          v-for="item in formData.special"
+          :key="item.id"
+          :label="item.key + ':'"
+        >
+          <Input
+            type="text"
+            size="small"
+            :disabled="isChecked"
+            v-model="item.value"
+            placeholder="请输入"
+            style="width: 200px"
+          />
+        </FormItem>
+        <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"
+            size="small"
+            v-model="formData.remark"
+            placeholder="请输入"
+            style="width: 200px"
+          />
+        </FormItem>
+      </Form>
+    </div>
+    <div
+      class="addArea"
+      v-for="(areaItem, areaIndex) in formData.list"
+      :key="areaItem.areaIndex"
+    >
+      <div class="addAreaBtn">
+        <Button
+          @click="handleAreaAdd(formData.list, areaIndex)"
+          :disabled="isChecked"
+          size="small"
+          type="primary"
+          style="margin-right: 10px"
+          >新增区域</Button
+        >
+        <Button
+          @click="handleAreaDele(areaIndex)"
+          type="error"
+          size="small"
+          v-show="formData.list.length > 1"
+          :disabled="isChecked"
+          style="margin-right: 10px"
+          >删除区域</Button
+        >
+        <Button
+          @click="handleAreaAddPDT(areaItem, areaIndex)"
+          :disabled="isChecked"
+          size="small"
+          style="margin-right: 10px"
+          v-show="
+            type == 1 ||
+              (type == 2 && !areaItem.id) ||
+              (type == 2 && areaItem.isCurrencyArea)
+          "
+          type="primary"
+          >新增产品
+        </Button>
+        <Button
+          @click="handleShowCurrencyArea(areaItem, areaIndex)"
+          ghost
+          size="small"
+          v-show="type != 1 && areaItem.id && !areaItem.isCurrencyArea"
+          type="primary"
+          >展示产品
+        </Button>
+      </div>
+      <div class="addAreaForm">
+        <Form :label-width="100" :model="areaItem" style="width: 60%">
+          <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="
+                '请输入' +
+                  areaSetTableData.filter((v) => v.key == 'num')[0].title
+              "
+              style="width: 120px"
+            />
+          </FormItem>
+          <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="
+                '请输入' +
+                  areaSetTableData.filter((v) => v.key == 'title')[0].title
+              "
+              style="width: 120px"
+            />
+          </FormItem>
+          <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="
+                '请输入' +
+                  areaSetTableData.filter((v) => v.key == 'unit')[0].title
+              "
+              style="width: 120px"
+            />
+          </FormItem>
+          <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="
+                '请输入' +
+                  areaSetTableData.filter((v) => v.key == 'quantity')[0].title
+              "
+              style="width: 120px"
+            />
+          </FormItem>
+          <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="
+                '请输入' +
+                  areaSetTableData.filter((v) => v.key == 'house_type')[0].title
+              "
+              style="width: 120px"
+            />
+          </FormItem>
+          <FormItem
+            v-for="item in areaItem.special"
+            :key="item.id"
+            :label="item.key + ':'"
+          >
+            <Input
+              type="text"
+              size="small"
+              :disabled="isChecked"
+              v-model="item.value"
+              placeholder="请输入"
+              style="width: 120px"
+            />
+          </FormItem>
+          <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="
+                '请输入' +
+                  areaSetTableData.filter((v) => v.key == 'remark')[0].title
+              "
+              style="width: 120px"
+            />
+          </FormItem>
+        </Form>
+      </div>
+      <div class="addAreaTable">
+        <Table
+          v-show="areaItem.product && areaItem.product.length > 0"
+          :columns="set_tableColumns"
+          :data="areaItem.product"
+          max-height="600"
+          border
+        >
+          <template slot="Set" slot-scope="{ row, index }">
+            <a
+              style="margin: 0 5px"
+              v-show="$route.query.type != 3"
+              @click="handleSet(row, index, 3, areaItem.product, areaIndex)"
+              >编辑</a
+            >
+            <a
+              style="margin: 0 5px; color: red"
+              v-show="$route.query.type != 3"
+              @click="handleSet(row, index, 4, areaItem.product, areaIndex)"
+              >删除</a
+            >
+          </template>
+        </Table>
+      </div>
+    </div>
+    <li v-show="false" v-for="item in formData.list" :key="item.id"></li>
+    <!-- 项目辅料弹窗 -->
+    <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>
+    <!-- 新增产品弹窗 -->
+    <!-- v-model="showPDTModal" -->
+    <!-- :mask-closable="false" -->
+    <el-dialog
+      title="新增产品"
+      :visible.sync="showPDTModal"
+      :close-on-click-modal="false"
+      :close-on-press-escape="false"
+      class="addPDTFormModal"
+      width="1000px"
+    >
+      <div
+        class="addPDTForm"
+        v-for="(tempItem, tempIndex) in tempPDTList"
+        :key="tempItem.id"
+      >
+        <Form :label-width="100" :model="tempItem">
+          <FormItem label="产品名称:">
+            <Input
+              type="text"
+              size="small"
+              placeholder="请输入"
+              v-model="tempItem.title"
+              style="width: 120px"
+            />
+          </FormItem>
+          <FormItem label="数量">
+            <Input
+              type="text"
+              size="small"
+              v-model="tempItem.num"
+              placeholder="请输入"
+              style="width: 120px"
+            />
+          </FormItem>
+          <FormItem label="图号:">
+            <Input
+              type="text"
+              size="small"
+              placeholder="请输入"
+              v-model="tempItem.url_number"
+              style="width: 120px"
+            />
+          </FormItem>
+          <FormItem label="图纸">
+            <div class="product-img">
+              <div class="product-add">
+                <div
+                  class="items"
+                  v-for="(_item, _index) of tempItem.url"
+                  :key="_index"
+                >
+                  <img
+                    @click="looks(_item)"
+                    :src="$store.state.ip + _item"
+                    alt=""
+                  />
+                  <Icon
+                    size="20"
+                    @click="delItems(_index, tempItem.url)"
+                    class="delete-img"
+                    type="ios-close-circle"
+                  />
+                </div>
+
+                <div class="add-items">
+                  <div class="_item">
+                    <Icon size="50" type="ios-add" />
+                  </div>
+                  <input
+                    @change="changeIpt($event, tempItem.url)"
+                    type="file"
+                    class="ipt"
+                  />
+                </div>
+              </div>
+            </div>
+          </FormItem>
+          <FormItem label="左右式">
+            <Select
+              v-model="tempItem.left_right_mode"
+              placeholder="请选择"
+              style="width: 120px"
+              size="small"
+            >
+              <Option :value="1" label="左式" />
+              <Option :value="2" label="右式" />
+              <Option :value="0" label="无" />
+            </Select>
+          </FormItem>
+          <FormItem label="产品分类">
+            <el-cascader
+              clearable
+              v-model="tempItem.type_id"
+              size="small"
+              style="width: 120px"
+              :show-all-levels="false"
+              :options="PDTTypeList"
+              :props="{
+                expandTrigger: 'hover',
+                children: 'child',
+                value: 'id',
+                label: 'title',
+                checkStrictly: true,
+                emitPath: false,
+              }"
+              @change="(e) => hanndleAddPDTTypeChange(tempItem, e)"
+            ></el-cascader>
+            <!-- <Select
+              v-model="tempItem.type_id"
+              placeholder="请选择"
+              style="width: 120px"
+              @on-change="(e) => hanndleAddPDTTypeChange(tempItem, e)"
+              size="small"
+            >
+              <Option
+                v-for="item in PDTTypeList"
+                :value="item.value"
+                :key="item.value"
+                >{{ item.label }}</Option
+              >
+            </Select> -->
+          </FormItem>
+          <div
+            style="display: contents"
+            v-for="el in tempItem.tempPDTTypeList"
+            :key="el"
+          >
+            <FormItem
+              :label="_item.title"
+              v-for="_item in tempItem.tempMeasureList"
+              v-show="el == _item.id"
+              :key="_item.id"
+            >
+              <Input
+                type="text"
+                size="small"
+                v-model="tempItem[_item.e_title]"
+                placeholder="请输入"
+                style="width: 120px"
+              />
+            </FormItem>
+          </div>
+          <FormItem label="价格:">
+            <Input
+              type="text"
+              size="small"
+              v-model="tempItem.price"
+              placeholder="请输入价格"
+              style="width: 120px"
+            />
+          </FormItem>
+          <FormItem
+            :label="item.key + ':'"
+            v-for="item in productSpecValueList"
+            :key="item.id"
+          >
+            <Input
+              type="text"
+              size="small"
+              v-model="tempItem[item.key]"
+              placeholder="请输入"
+              style="width: 120px"
+            />
+          </FormItem>
+          <FormItem label="备注:">
+            <Input
+              type="text"
+              size="small"
+              v-model="tempItem.remark"
+              placeholder="请输入备注"
+              style="width: 120px"
+            />
+          </FormItem>
+          <FormItem label="工艺属性">
+            <Button
+              @click="handleProcessAdd(tempItem, tempIndex)"
+              size="small"
+              type="text"
+              style="color: #57a3f3"
+              >添加属性</Button
+            >
+          </FormItem>
+        </Form>
+        <div class="addPDTProcess" style="z-index:9999">
+          <div
+            v-for="(_item, _index) in tempItem.addPDTProcessAttrList"
+            :key="_item.id"
+          >
+            <span>属性{{ _index + 1 }}</span>
+            <Select
+              v-model="_item.id"
+              size="small"
+              @on-change="
+                (value) => handleAddPDTAttrChange(_item, _index, value)
+              "
+              style="width: 80px"
+            >
+              <Option
+                v-for="__item in PDTProcessAttrList"
+                :key="__item.id"
+                :value="__item.id"
+                :label="__item.title"
+              >
+              </Option>
+            </Select>
+            <Select
+              v-model="_item.process_detail"
+              filterable
+              clearable
+              label-in-value
+              @on-change="
+                (value) => handleAddPDTAttrDetailChange(_item, _index, value)
+              "
+              size="small"
+              style="width: 140px"
+            >
+              <Option
+                v-for="__item in _item.PDTProcessAttrDetailList"
+                :key="__item.id"
+                :value="__item.id"
+                :label="__item.title"
+              />
+            </Select>
+            <div class="dele_icon">
+              <!-- v-show="tempItem.addPDTProcessAttrList.length!=1" -->
+              <Icon
+                type="ios-trash"
+                @click="
+                  handleAddPDTDetailDele(tempItem.addPDTProcessAttrList, _index)
+                "
+              />
+            </div>
+          </div>
+        </div>
+        <div class="addPDTBtn">
+          <Button
+            type="primary"
+            style="margin-right: 10px"
+            @click="handleAddPDTCopy(tempItem, tempIndex)"
+            >复制</Button
+          >
+          <Button
+            type="primary"
+            style="margin-right: 10px"
+            @click="handleAddPDTAdd(tempIndex, tempItem)"
+            >添加</Button
+          >
+          <Button
+            type="error"
+            v-show="tempIndex != 0"
+            style="margin-right: 10px"
+            @click="handleAddPDTDele(tempIndex)"
+            >删除</Button
+          >
+        </div>
+      </div>
+      <div class="modal-footer" slot="footer">
+        <Button style="margin-right:10px" @click="showPDTModal = false"
+          >取消</Button
+        >
+        <Button type="primary" @click="handleAddPDTConfirm">确认</Button>
+      </div>
+    </el-dialog>
+    <!-- 编辑产品弹窗 -->
+    <el-dialog
+      title="编辑产品"
+      :visible.sync="showPDTEditModal"
+      :close-on-click-modal="false"
+      :close-on-press-escape="false"
+      class="addPDTFormModal"
+      width="1000px"
+    >
+      <div class="addPDTForm">
+        <Form :label-width="100" :model="PDTEdit">
+          <FormItem label="产品名称:">
+            <Input
+              type="text"
+              size="small"
+              placeholder="请输入"
+              v-model="PDTEdit.title"
+              style="width: 120px"
+            />
+          </FormItem>
+          <FormItem label="数量">
+            <Input
+              type="text"
+              size="small"
+              v-model="PDTEdit.num"
+              placeholder="请输入"
+              style="width: 120px"
+            />
+          </FormItem>
+          <FormItem label="图号:">
+            <Input
+              type="text"
+              size="small"
+              placeholder="请输入"
+              v-model="PDTEdit.url_number"
+              style="width: 120px"
+            />
+          </FormItem>
+          <FormItem label="图纸">
+            <div class="product-img">
+              <div class="product-add">
+                <div
+                  class="items"
+                  v-for="(_item, _index) of PDTEdit.url"
+                  :key="_index"
+                >
+                  <img
+                    @click="looks(_item)"
+                    :src="$store.state.ip + _item"
+                    alt=""
+                  />
+                  <Icon
+                    size="20"
+                    @click="delItems(_index, PDTEdit.url)"
+                    class="delete-img"
+                    type="ios-close-circle"
+                  />
+                </div>
+
+                <div class="add-items">
+                  <div class="_item">
+                    <Icon size="50" type="ios-add" />
+                  </div>
+                  <input
+                    @change="changeIpt($event, PDTEdit.url)"
+                    type="file"
+                    class="ipt"
+                  />
+                </div>
+              </div>
+            </div>
+          </FormItem>
+          <FormItem label="左右式">
+            <Select
+              v-model="PDTEdit.left_right_mode"
+              placeholder="请选择"
+              style="width: 120px"
+              size="small"
+            >
+              <Option :value="1" label="左式" />
+              <Option :value="2" label="右式" />
+              <Option :value="0" label="无" />
+            </Select>
+          </FormItem>
+          <FormItem label="产品分类">
+            <el-cascader
+              clearable
+              transfer
+              v-model="PDTEdit.type_id"
+              size="small"
+              style="width: 120px"
+              :show-all-levels="false"
+              :options="PDTEditTypeList"
+              :props="{
+                expandTrigger: 'hover',
+                children: 'child',
+                value: 'id',
+                label: 'title',
+                checkStrictly: true,
+                emitPath: false,
+              }"
+              @change="(e) => hanndleAddPDTTypeChange(PDTEdit, e)"
+            ></el-cascader>
+            <!-- <Select
+              v-model="PDTEdit.type_id"
+              placeholder="请选择"
+              style="width: 120px"
+              @on-change="(e) => hanndleAddPDTTypeChange(PDTEdit, e)"
+              size="small"
+            >
+              <Option
+                v-for="item in PDTEditTypeList"
+                :value="item.value"
+                :key="item.value"
+                >{{ item.label }}</Option
+              >
+            </Select> -->
+          </FormItem>
+          <div
+            style="display: contents"
+            v-for="el in PDTEdit.tempPDTTypeList"
+            :key="el"
+          >
+            <FormItem
+              :label="_item.title"
+              v-for="_item in PDTEdit.tempMeasureList"
+              v-show="el == _item.id"
+              :key="_item.id"
+            >
+              <Input
+                type="text"
+                size="small"
+                v-model="PDTEdit[_item.e_title]"
+                placeholder="请输入"
+                style="width: 120px"
+              />
+            </FormItem>
+          </div>
+          <!-- <div style="display: contents">
+            <FormItem
+              :label="_item.title"
+              v-for="_item in PDTEdit.tempMeasureList"
+              :key="_item.id"
+            >
+              <Input
+                type="text"
+                size="small"
+                v-model="PDTEdit[_item.e_title]"
+                placeholder="请输入"
+                style="width: 120px"
+              />
+            </FormItem>
+          </div> -->
+          <FormItem label="价格:">
+            <Input
+              type="text"
+              size="small"
+              v-model="PDTEdit.price"
+              placeholder="请输入价格"
+              style="width: 120px"
+            />
+          </FormItem>
+          <FormItem
+            :label="item.key + ':'"
+            v-for="item in productSpecValueList"
+            :key="item.id"
+          >
+            <Input
+              type="text"
+              size="small"
+              v-model="PDTEdit[item.key]"
+              placeholder="请输入"
+              style="width: 120px"
+            />
+          </FormItem>
+          <FormItem label="备注:">
+            <Input
+              type="text"
+              size="small"
+              v-model="PDTEdit.remark"
+              placeholder="请输入备注"
+              style="width: 120px"
+            />
+          </FormItem>
+          <FormItem label="工艺属性">
+            <Button
+              @click="handleEditProcessAdd()"
+              size="small"
+              type="text"
+              style="color: #57a3f3"
+              >添加属性</Button
+            >
+          </FormItem>
+        </Form>
+        <div class="addPDTProcess">
+          <div
+            v-for="(_item, _index) in PDTEdit.addPDTProcessAttrList"
+            :key="_item.id"
+          >
+            <span>属性{{ _index + 1 }}</span>
+            <Select
+              v-model="_item.id"
+              size="small"
+              @on-change="
+                (value) => handleAddPDTAttrChange(_item, _index, value)
+              "
+              style="width: 80px"
+            >
+              <Option
+                v-for="__item in PDTProcessAttrList"
+                :key="__item.id"
+                :value="__item.id"
+                :label="__item.title"
+              >
+              </Option>
+            </Select>
+            <Select
+              v-model="_item.process_detail"
+              filterable
+              clearable
+              label-in-value
+              @on-change="
+                (value) => handleAddPDTAttrDetailChange(_item, _index, value)
+              "
+              size="small"
+              style="width: 140px"
+            >
+              <Option
+                v-for="__item in _item.PDTProcessAttrDetailList"
+                :key="__item.id"
+                :value="__item.id"
+                :label="__item.title"
+              />
+            </Select>
+            <div class="dele_icon">
+              <!-- v-show="PDTEdit.addPDTProcessAttrList.length!=1" -->
+              <Icon
+                type="ios-trash"
+                @click="
+                  handleAddPDTDetailDele(PDTEdit.addPDTProcessAttrList, _index)
+                "
+              />
+            </div>
+          </div>
+        </div>
+      </div>
+      <div class="modal-footer" slot="footer">
+        <Button style="margin-right:10px" @click="showPDTEditModal = false"
+          >取消</Button
+        >
+        <Button type="primary" @click="handlePDTEditConfirm">确认</Button>
+      </div>
+    </el-dialog>
+    <!-- 特殊字段弹窗 -->
+    <Modal
+      title="特殊字段"
+      v-model="showAddInputModal"
+      :mask-closable="false"
+      class="addInputClassModal"
+      :width="600"
+    >
+      <div class="addInputClass">
+        <Tabs value="name1">
+          <TabPane label="订单特殊字段" name="name1">
+            <div style="display: flex; justify-content: center">
+              <span
+                class="dele_icon"
+                @click="handleSpecValueAdd('', 1)"
+                style="text-align: center; width: 50px"
+                >添加
+              </span>
+            </div>
+            <div class="addInputClassTab">
+              <div v-for="(item, index) in contactSpecValueList" :key="index">
+                <span>特殊字段名:</span>
+                <Input
+                  type="text"
+                  size="small"
+                  v-model="item.key"
+                  placeholder="请输入"
+                  style="width: 120px"
+                />
+                <span class="dele_icon" style="margin-right: 5px">
+                  <Icon type="md-add" @click="handleSpecValueAdd(item, 1)" />
+                </span>
+                <span class="dele_icon">
+                  <Icon
+                    type="md-remove"
+                    @click="handleSpecValueDele(index, 1)"
+                  />
+                </span>
+              </div>
+            </div>
+          </TabPane>
+          <TabPane label="区域特殊字段" name="name2">
+            <div style="display: flex; justify-content: center">
+              <span
+                class="dele_icon"
+                @click="handleSpecValueAdd('', 2)"
+                style="text-align: center; width: 50px"
+                >添加
+              </span>
+            </div>
+            <div class="addInputClassTab">
+              <div v-for="(item, index) in areaSpecValueList" :key="index">
+                <span>特殊字段名:</span>
+                <Input
+                  type="text"
+                  size="small"
+                  v-model="item.key"
+                  placeholder="请输入"
+                  style="width: 120px"
+                />
+                <span class="dele_icon" style="margin-right: 5px">
+                  <Icon type="md-add" @click="handleSpecValueAdd(item, 2)" />
+                </span>
+                <span class="dele_icon">
+                  <Icon
+                    type="md-remove"
+                    @click="handleSpecValueDele(index, 2)"
+                  />
+                </span>
+              </div>
+            </div>
+          </TabPane>
+          <TabPane label="产品特殊字段" name="name3">
+            <div style="display: flex; justify-content: center">
+              <span
+                class="dele_icon"
+                @click="handleSpecValueAdd('', 3)"
+                style="text-align: center; width: 50px"
+                >添加
+              </span>
+            </div>
+            <div class="addInputClassTab">
+              <div v-for="(item, index) in productSpecValueList" :key="index">
+                <span>特殊字段名:</span>
+                <Input
+                  type="text"
+                  size="small"
+                  v-model="item.key"
+                  placeholder="请输入"
+                  style="width: 120px"
+                />
+                <span class="dele_icon" style="margin-right: 5px">
+                  <Icon type="md-add" @click="handleSpecValueAdd(item, 3)" />
+                </span>
+                <span class="dele_icon">
+                  <Icon
+                    type="md-remove"
+                    @click="handleSpecValueDele(index, 3)"
+                  />
+                </span>
+              </div>
+            </div>
+          </TabPane>
+        </Tabs>
+        <!-- <Form :label-width="100">
+          <FormItem label="请输入字段名:">
+            <Input type="text"
+                   size="small"
+                   v-model="addInputName"
+                   placeholder="请输入"
+                   style="width: 200px" />
+          </FormItem>
+        </Form> -->
+      </div>
+      <div class="modal-footer" slot="footer">
+        <Button @click="showAddInputModal = false">返回</Button>
+        <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>
+
+<script>
+// 这里可以导入其他文件(比如:组件,工具js,第三方插件js,json文件,图片文件等等)
+// 例如:import 《组件名称》 from '《组件路径》';
+
+export default {
+  name: "BidSystemContractEdit",
+  components: {},
+  props: {},
+  // import引入的组件需要注入到对象中才能使用
+  data() {
+    // 这里存放数据
+    return {
+      showSupModal: false,
+      showPDTModal: false,
+      showPDTEditModal: false,
+      options: {
+        disabledDate(date) {
+          return date && date.valueOf() < Date.now() - 86400000;
+        },
+      },
+      formData: {
+        order_no: "",
+        residential_name: "",
+        client_name: "",
+        address: "",
+        mobile: "",
+        pay_state: "",
+        warning_state: "",
+        salesman: "",
+        remark: "",
+        start_time: "",
+        end_time: "",
+        type: "",
+        special: [],
+        head: [],
+        //区域列表
+        list: [
+          {
+            areaIndex: null,
+            num: "",
+            title: "",
+            unit: "",
+            quantity: "",
+            house_type: "",
+            remark: "",
+            order_no: "",
+            product: [],
+          },
+        ],
+      },
+      tableColumns: [
+        { title: "序号", key: "index", align: "center", minWidth: 80 },
+        {
+          title: "产品名称",
+          key: "title",
+          align: "center",
+          tooltip: true,
+          minWidth: 100,
+        },
+        { title: "数量", key: "num", align: "center", minWidth: 80 },
+        { title: "价格", key: "price", align: "center", minWidth: 80 },
+        {
+          title: "规格",
+          key: "measure",
+          align: "center",
+          tooltip: true,
+          minWidth: 140,
+        },
+        {
+          title: "工艺属性",
+          key: "process_property",
+          align: "center",
+          tooltip: true,
+          minWidth: 120,
+        },
+        {
+          title: "图纸",
+          align: "center",
+          key: "url",
+          minWidth: 100,
+          render: (h, params) => {
+            const { row } = params;
+            let url = row.url ? row.url : [];
+            return h("img", {
+              attrs: {
+                src: this.$store.state.ip + url[0],
+                style:
+                  "max-width:50px;max-height:50px;position:relative;top:3px;",
+              },
+              on: {
+                click: () => {
+                  // this.axios('/api/orders_img', { params: { id: row.id, type: 1 } }).then(res => {
+                  // row.imgs = res.data
+                  let list = [];
+                  row.url.forEach((el) => {
+                    list.push({ img_url: el });
+                  });
+                  this.$previewImg({
+                    list,
+                    baseUrl: this.$store.state.ip,
+                    baseImgField: "img_url",
+                    baseTitleField: "",
+                  });
+                  // })
+                },
+              },
+            });
+          },
+        },
+        {
+          title: "左右式",
+          key: "left_right_mode",
+          align: "center",
+          tooltip: true,
+          minWidth: 80,
+          render: (h, params) => {
+            return h(
+              "span",
+              {},
+              params.row.left_right_mode == 1
+                ? "左式"
+                : params.row.left_right_mode == 2
+                ? "右式"
+                : "无"
+            );
+          },
+        },
+        {
+          title: "图号",
+          key: "url_number",
+          align: "center",
+          tooltip: true,
+          minWidth: 80,
+        },
+        { title: "备注", key: "remark", align: "center", minWidth: 80 },
+        {
+          title: "操作",
+          key: "set",
+          align: "center",
+          slot: "Set",
+          minWidth: 120,
+        },
+      ],
+      supTableColumns: [
+        { title: "序号", type: "index", align: "center", minWidth: 100 },
+        {
+          title: "辅料名称",
+          key: "title",
+          align: "center",
+          slot: "combine",
+          minWidth: 150,
+        },
+        {
+          title: "操作",
+          key: "set",
+          align: "center",
+          slot: "supSet",
+          minWidth: 100,
+        },
+      ],
+      supTableData: [], //项目辅料→辅料名称列表
+      PDTTypeList: [], // 产品分类列表
+      PDTEditTypeList: [], // 产品分类列表
+      combineList: [], //业务员列表
+      salesmanList: [],
+      tempPDTIndex: "", // 新增产品暂存
+      tempPDTList: [
+        {
+          url: [],
+          process_property: "",
+          process_properties: [],
+          tempPDTTypeList: [],
+          measure: "",
+          //新增产品工艺属性列表
+          addPDTProcessAttrList: [
+            {
+              showValue: "",
+              showId: "",
+              PDTProcessAttrDetailList: [],
+            },
+          ],
+        },
+      ],
+      PDTEdit: {
+        url: [],
+        process_property: "",
+        process_properties: [],
+        tempPDTTypeList: [],
+        measure: "",
+        //新增产品工艺属性列表
+        addPDTProcessAttrList: [
+          {
+            showValue: "",
+            showId: "",
+            PDTProcessAttrDetailList: [],
+          },
+        ],
+      },
+      //是否查看
+      isChecked: false,
+      PDTProcessAttrList: [],
+      // 测量字段列表
+      measureList: [],
+      contactForm: [],
+      addInputTitle: "",
+      showAddInputModal: false,
+      addInputName: "",
+      contactSpecValueList: [],
+      areaSpecValueList: [],
+      productSpecValueList: [],
+      warningList: [],
+      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: "备注",
+        },
+      ],
+      headers: { Authorization: localStorage.getItem("token") },
+      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实例)
+  created() {
+    //2编辑  3详情  1新增
+    this.$route.query.type == 3 ? (this.isChecked = true) : "";
+    this.$route.query.order_no
+      ? (this.formData.order_no = this.$route.query.order_no)
+      : "";
+    // 获取工艺属性
+    this.axios("/api/basics_properties_index").then((res) => {
+      this.PDTProcessAttrList = res.data.data;
+    });
+    // 获取紧急程度
+    this.axios.get("/api/warning_list").then((res) => {
+      this.warningList = res.data.data;
+    });
+    // 获取客户列表
+    this.axios.get("/api/custom_list").then((res) => {
+      this.clientList = res.data.data;
+    });
+    this.get_forms();
+  },
+  // 生命周期 - 挂载完成(可以访问DOM元素)
+  mounted() {
+    this.$route.query.type == 3 || this.$route.query.type == 2
+      ? this.initData(this.$route.query.order_no)
+      : "";
+    //获取操作员
+    this.axios("/api/user").then((res) => (this.salesmanList = res.data.data));
+    //获取产品分类下拉列表
+    this.axios("/api/parts_product_list").then((res) => {
+      this.PDTTypeList = res.data;
+      this.PDTEditTypeList = this.PDTTypeList;
+    });
+    //获取基础测量字段列表
+    this.axios("/api/basics_measure_index").then((res) => {
+      this.measureList = res.data.data;
+    });
+    // 获取项目辅料列表
+    this.axios("/api/material_combination").then((res) => {
+      this.combineList = res.data.data;
+    });
+  },
+  methods: {
+    handlechange(val) {
+      console.log("val :>> ", val);
+    },
+    handleStartTimeChange(value) {
+      this.formData.start_time = value;
+    },
+    handleEndTimeChange(value) {
+      this.formData.end_time = value;
+    },
+    initData(order_no) {
+      this.axios({
+        method: "get",
+        url: "/api/order_area_list",
+        params: {
+          order_no,
+          type: 1,
+        },
+      }).then((res) => {
+        this.formData = res.data;
+        this.supTableData = res.data.ext;
+        if (this.formData.list.length == 0) {
+          this.formData.list.push({
+            areaIndex: 1,
+            num: "",
+            title: "",
+            unit: "",
+            quantity: "",
+            house_type: "",
+            remark: "",
+            order_no: "",
+            special: [],
+            head: [],
+            // product: [
+            //   {
+            //     title: "",
+            //     num: "",
+            //     measure: "",
+            //     process_property: "",
+            //     special: [],
+            //     url: [],
+            //     url_number: "",
+            //     remark: "",
+            //   },
+            // ],
+          });
+        }
+        this.formData.start_time = this.func.replaceDateNoHMS(
+          this.formData.start_time
+        );
+        this.formData.end_time = this.func.replaceDateNoHMS(
+          this.formData.end_time
+        );
+        // 产品特殊字段→ 弹窗窗口,table表头
+        let arr = [];
+        res.data.head[3] &&
+          res.data.head[3].length > 0 &&
+          res.data.head[3].forEach((item) => {
+            // ele[key] = item.key
+            /////
+            arr.push({
+              title: item.key,
+              key: item.key,
+              align: "center",
+              minWidth: 80,
+            });
+          });
+        console.log("arr :>> ", arr);
+        this.tableColumns = [
+          { title: "序号123", key: "index", align: "center", minWidth: 80 },
+          {
+            title: "产品名称",
+            key: "title",
+            align: "center",
+            tooltip: true,
+            minWidth: 100,
+          },
+          { title: "数量", key: "num", align: "center", minWidth: 80 },
+          { title: "价格", key: "price", align: "center", minWidth: 80 },
+          {
+            title: "规格",
+            key: "measure",
+            align: "center",
+            tooltip: true,
+            minWidth: 140,
+          },
+          {
+            title: "工艺属性",
+            key: "process_property",
+            align: "center",
+            tooltip: true,
+            minWidth: 120,
+          },
+          {
+            title: "图纸",
+            align: "center",
+            key: "url",
+            minWidth: 100,
+            render: (h, params) => {
+              const { row } = params;
+              let url = row.url ? row.url : [];
+              return h("img", {
+                attrs: {
+                  src: this.$store.state.ip + url[0],
+                  style:
+                    "max-width:50px;max-height:50px;position:relative;top:3px;",
+                },
+                on: {
+                  click: () => {
+                    // this.axios('/api/orders_img', { params: { id: row.id, type: 1 } }).then(res => {
+                    // row.imgs = res.data
+                    let list = [];
+                    row.url.forEach((el) => {
+                      list.push({ img_url: el });
+                    });
+                    this.$previewImg({
+                      list,
+                      baseUrl: this.$store.state.ip,
+                      baseImgField: "img_url",
+                      baseTitleField: "",
+                    });
+                    // })
+                  },
+                },
+              });
+            },
+          },
+          {
+            title: "左右式",
+            key: "left_right_mode",
+            align: "center",
+            tooltip: true,
+            minWidth: 80,
+            render: (h, params) => {
+              return h(
+                "span",
+                {},
+                params.row.left_right_mode == 1
+                  ? "左式"
+                  : params.row.left_right_mode == 2
+                  ? "右式"
+                  : "无"
+              );
+            },
+          },
+          {
+            title: "图号",
+            key: "url_number",
+            align: "center",
+            tooltip: true,
+            minWidth: 80,
+          },
+          ...arr,
+          { title: "备注", key: "remark", align: "center", minWidth: 80 },
+          {
+            title: "操作",
+            key: "set",
+            align: "center",
+            slot: "Set",
+            minWidth: 120,
+          },
+        ];
+        console.log("this.tableColumns  :>> ", this.tableColumns);
+        // 订单特殊字段
+        this.formData.special &&
+          this.formData.special.length > 0 &&
+          this.formData.special.forEach((element) => {
+            this.formData.head[1].forEach((item) => {
+              if (element.head_id == item.id) {
+                element = Object.assign(element, item);
+                this.contactSpecValueList.push(element);
+              }
+            });
+          });
+        this.contactForm = this.formData.head[1] ? this.formData.head[1] : [];
+        // 区域特殊字段
+        this.formData.list.forEach((element, index) => {
+          element.special &&
+            element.special.length > 0 &&
+            element.special.forEach((ele) => {
+              this.formData.head[2].forEach((item) => {
+                if (ele.head_id == item.id) {
+                  ele = Object.assign(ele, item);
+                  this.areaSpecValueList.push(ele);
+                }
+              });
+            });
+          if (index == 0) {
+            element.isCurrencyArea = true;
+            //编辑进入页面是展示第一条区域的产品
+            element.id &&
+              this.axios
+                .get("/api/order_area_list_product", {
+                  params: {
+                    order_no: this.$route.query.order_no,
+                    oa_id: this.$route.query.oa_id,
+                    area_id: element.id,
+                    type: 1,
+                  },
+                })
+                .then((res) => {
+                  if (res.code == 200) {
+                    if (!element.product) {
+                      element.product = [];
+                    }
+                    element.product = res.data;
+                    element.product.forEach((pdt, index) => {
+                      if (!pdt.url) {
+                        pdt.url = [];
+                      }
+                      pdt.index = index + 1;
+                      pdt.special &&
+                        pdt.special.length > 0 &&
+                        pdt.special.map((_pdt) => {
+                          this.formData.head[3].map((v) => {
+                            if (_pdt.head_id == v.id) {
+                              _pdt = Object.assign(_pdt, v);
+                              v = Object.assign(_pdt, v);
+                              pdt[_pdt.key] = _pdt.value;
+                              // this.productSpecValueList.push(_pdt);
+                            }
+                          });
+                        });
+                    });
+                    this.$forceUpdate();
+                  }
+                });
+          } else {
+            element.isCurrencyArea = false;
+          }
+        });
+        this.areaSpecValueList = this.formData.head[2]
+          ? this.formData.head[2]
+          : [];
+        console.log("this.formData.head[3] :>> ", this.formData.head[3]);
+        this.productSpecValueList = this.formData.head[3]
+          ? this.formData.head[3]
+          : [];
+        //获取客户信息
+        this.axios
+          .get("/api/custom_detail", { params: { id: res.data.custom_id } })
+          .then((res) => {
+            this.clientDetailList = res.data.list;
+            // this.fax = res.data.detail.fax;
+          });
+      });
+    },
+    postData() {
+      this.formData.list.map((list) => {
+        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;
+      if (this.type == 1) {
+        ip = "order_area_add";
+        this.axios({
+          method: "post",
+          url: "/api/" + ip,
+          data: {
+            ...this.formData,
+            ext: this.supTableData,
+            head: { 3: this.productSpecValueList },
+          },
+        }).then((res) => {
+          if (res.code == 200) {
+            this.$Message.success(res.msg);
+            this.goback();
+          }
+        });
+      } else if (this.type == 2) {
+        ip = "order_area_edit";
+        // const curObj = this.formData.list.filter((item) => item.isCurrencyArea);
+        let curObj;
+        //去当前展开项区域
+        this.formData.list.forEach((element) => {
+          if (element.isCurrencyArea) {
+            curObj = element;
+          }
+        });
+        curObj.product.forEach((element) => {
+          if (!element.url) {
+            element.url = [];
+          }
+        });
+        this.axios
+          .post("/api/order_area_product_edit", {
+            order_no: this.$route.query.order_no,
+            area_id: curObj.id || "",
+            type: 1,
+            // num:curObj.num,
+            // title:curObj.title,
+            // unit:curObj.unit,
+            // quantity:curObj.quantity,
+            // house_type:curObj.house_type,
+            product: curObj.product,
+          })
+          .then((res) => {
+            if (res.code == 200) {
+              curObj.id = res.data.area_id;
+              this.axios
+                .post("/api/" + ip, {
+                  ...this.formData,
+                  ext: this.supTableData,
+                  head: { 3: this.productSpecValueList },
+                })
+                .then((re) => {
+                  if (re.code == 200) {
+                    this.$Message.success(re.msg);
+                    this.goback();
+                  }
+                });
+            }
+          });
+      }
+    },
+    // 操作table数据 3编辑 4删除
+    handleSet(row, index, type, table, areaIndex) {
+      let newmeasureList;
+      switch (type) {
+        case 3:
+          this.PDTEdit = row;
+          if (!this.PDTEdit.url) {
+            this.PDTEdit.url = [];
+          }
+          this.PDTEditAreaIndex = areaIndex;
+          this.PDTEditIndex = index;
+          this.PDTEdit.addPDTProcessAttrList
+            ? this.PDTEdit.addPDTProcessAttrList.forEach((element, index) => {
+                element.type_id ? (element.id = element.type_id) : "";
+                element.showId
+                  ? (element.process_detail = element.showId * 1)
+                  : "";
+                this.handleAddPDTAttrChange(element, index, element.type_id);
+              })
+            : (this.PDTEdit.addPDTProcessAttrList = []);
+          this.$route.query.type == 2 &&
+            (this.PDTEdit.tempMeasureList = JSON.parse(
+              JSON.stringify(this.measureList)
+            ));
+          //获取属性
+          if (row.measure.indexOf("*") != -1) {
+            newmeasureList = row.measure.split("*");
+          } else {
+            newmeasureList = [row.measure];
+          }
+          // for (let i in newmeasureList) {
+          //   for (let j in this.measureList) {
+          //     if (
+          //       newmeasureList[i].indexOf(this.measureList[j].e_title) != -1
+          //     ) {
+          //       this.PDTEdit[this.measureList[j].e_title] = newmeasureList[
+          //         i
+          //       ].substring(1);
+          //     }
+          //   }
+          // }
+          if (this.PDTEdit.type_id) {
+            this.axios("/api/basics_product_detail", {
+              params: { id: this.PDTEdit.type_id },
+            }).then((res) => {
+              this.PDTEdit.tempPDTTypeList = res.data.measure_id;
+              this.PDTEdit.tempMeasureList = JSON.parse(
+                JSON.stringify(this.measureList)
+              );
+              this.PDTEdit.tempMeasureList.forEach((el) => {
+                for (const i in newmeasureList) {
+                  const item = newmeasureList[i];
+                  if (item.indexOf(el.e_title) != -1) {
+                    this.PDTEdit[el.e_title] = item.substring(1);
+                  }
+                }
+                // this.PDTEdit[el.e_title] = "";
+              });
+              this.PDTEdit = JSON.parse(JSON.stringify(this.PDTEdit));
+            });
+          }
+          this.showPDTEditModal = true;
+          break;
+        case 4:
+          table.splice(index, 1);
+          this.formData.list[areaIndex].product = JSON.parse(
+            JSON.stringify(table)
+          );
+          break;
+      }
+      this.$forceUpdate();
+    },
+    //新增产品复制
+    handleAddPDTCopy(item, index) {
+      const temp = JSON.parse(JSON.stringify(item));
+      this.tempPDTList.splice(index + 1, 0, temp);
+    },
+    //新增产品添加
+    handleAddPDTAdd(index, row) {
+      this.tempPDTList.splice(index + 1, 0, {
+        addPDTProcessAttrList: [],
+        measure: "",
+        measures: [],
+        process_property: "",
+        url: [],
+        tempPDTTypeList: [],
+        process_properties: [],
+      });
+    },
+    //新增产品删除
+    handleAddPDTDele(index) {
+      this.tempPDTList.splice(index, 1);
+    },
+    //新增产品→新增区域确认
+    handleAddPDTConfirm() {
+      this.tempPDTList.forEach((element) => {
+        element.addPDTProcessAttrList.forEach((el) => {
+          element.process_property += el.showValue ? el.showValue + "," : "";
+          element.process_properties += el.showId ? el.showId + "," : "";
+        });
+        element.process_property = element.process_property.substring(
+          0,
+          element.process_property.length - 1
+        );
+        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
+        );
+      });
+      if (!this.formData.list[this.tempPDTIndex].product) {
+        this.formData.list[this.tempPDTIndex].product = [];
+      }
+      this.formData.list[this.tempPDTIndex].product.push(...this.tempPDTList);
+      this.$nextTick(() => {
+        //开辟新栈空间,更改指针
+        this.formData.list = JSON.parse(JSON.stringify(this.formData.list));
+        this.formData.list[this.tempPDTIndex].product.forEach((el, index) => {
+          el.index = index + 1;
+        });
+        // 置空新增产品对象
+        this.tempPDTList = [
+          {
+            url: [],
+            process_property: "",
+            process_properties: [],
+            tempPDTTypeList: [],
+            measure: "",
+            //新增产品工艺属性列表
+            addPDTProcessAttrList: [
+              {
+                showValue: "",
+                showId: "",
+                PDTProcessAttrDetailList: [],
+              },
+            ],
+          },
+        ];
+        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)
+              );
+            }
+            if (
+              res.data.table.productSet &&
+              res.data.table.productSet.length > 0
+            ) {
+              this.productSetTableData = JSON.parse(
+                JSON.stringify(res.data.table.productSet)
+              );
+              this.post_productSetTableData = JSON.parse(
+                JSON.stringify(res.data.table.productSet)
+              );
+            } else {
+              this.post_productSetTableData = JSON.parse(
+                JSON.stringify(this.productSetTableData)
+              );
+            }
+          }
+        });
+    },
+    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,
+            productSet: this.post_productSetTableData,
+          },
+        },
+      }).then((res) => {
+        if (res.code == 200) {
+          this.$Message.success(res.msg);
+          this.get_forms();
+        }
+      });
+    },
+    // 编辑产品→确认
+    handlePDTEditConfirm() {
+      this.PDTEdit.process_property = "";
+      this.PDTEdit.process_properties = "";
+      this.PDTEdit.measure = "";
+      this.PDTEdit.tempMeasureList.forEach((element) => {
+        element.value = this.PDTEdit[element.e_title];
+      });
+      this.PDTEdit.addPDTProcessAttrList.forEach((el) => {
+        this.PDTEdit.process_property += el.showValue ? el.showValue + "," : "";
+        this.PDTEdit.process_properties += el.showId ? el.showId + "," : "";
+      });
+      this.PDTEdit.process_property = this.PDTEdit.process_property.substring(
+        0,
+        this.PDTEdit.process_property.length - 1
+      );
+      this.PDTEdit.process_properties = this.PDTEdit.process_properties.substring(
+        0,
+        this.PDTEdit.process_properties.length - 1
+      );
+      this.PDTEdit.tempMeasureList.forEach((el) => {
+        this.PDTEdit[el.e_title] &&
+          (this.PDTEdit.measure += `${el.e_title}${this.PDTEdit[el.e_title]}*`);
+      });
+      this.PDTEdit.measure = this.PDTEdit.measure.substring(
+        0,
+        this.PDTEdit.measure.length - 1
+      );
+      this.formData.list[this.PDTEditAreaIndex].product[
+        this.PDTEditIndex
+      ] = this.PDTEdit;
+      //强制更新视图
+      this.formData.list = JSON.parse(JSON.stringify(this.formData.list));
+      this.showPDTEditModal = false;
+    },
+    //添加工艺属性
+    handleProcessAdd(item, index) {
+      this.tempPDTList[index].addPDTProcessAttrList.push({
+        PDTProcessAttrDetailList: [],
+      });
+    },
+    // 编辑添加工艺属性
+    handleEditProcessAdd() {
+      this.$nextTick(() => {
+        !this.PDTEdit.addPDTProcessAttrList &&
+          (this.PDTEdit.addPDTProcessAttrList = []);
+        this.PDTEdit.addPDTProcessAttrList.push({
+          PDTProcessAttrDetailList: [],
+        });
+        this.$forceUpdate();
+      });
+    },
+    //选择工艺属性
+    handleAddPDTAttrChange(item, index, value) {
+      item.id = value;
+      this.axios("/api/properties_index", { params: { id: value } }).then(
+        (res) => {
+          item.PDTProcessAttrDetailList = res.data.data;
+        }
+      );
+    },
+    //选择工艺属性细节
+    handleAddPDTAttrDetailChange(item, index, value) {
+      item.showValue = value.label;
+      item.showId = value.value;
+    },
+    // 删除工艺属性
+    handleAddPDTDetailDele(arr, index) {
+      this.$nextTick(() => {
+        arr.splice(index, 1);
+        this.$forceUpdate();
+      });
+    },
+    //新增产品
+    handleAreaAddPDT(item, index) {
+      this.showPDTModal = true;
+      // this.tempPDTList = item
+      this.tempPDTList = [
+        {
+          url: [],
+          process_property: "",
+          process_properties: [],
+          tempPDTTypeList: [],
+          measure: "",
+          measures: [],
+          //新增产品工艺属性列表
+          addPDTProcessAttrList: [
+            {
+              showValue: "",
+              showId: "",
+              PDTProcessAttrDetailList: [],
+            },
+          ],
+        },
+      ];
+      this.tempPDTIndex = index;
+    },
+    //新增区域
+    handleAreaAdd(target, index) {
+      const obj = {
+        areaIndex: target.length + 1,
+        num: "",
+        title: "",
+        unit: "",
+        quantity: "",
+        house_type: "",
+        remark: "",
+        order_no: "",
+        special: [...this.areaSpecValueList],
+      };
+      // target.push(obj)
+      // this.$set(this.formData, 'list', [...this.formData.list, obj])
+      this.formData.list.splice(index + 1, 0, obj);
+    },
+    //删除区域
+    handleAreaDele(index) {
+      this.formData.list.splice(index, 1);
+    },
+    // 展示区域产品
+    handleShowCurrencyArea(item, index) {
+      const preObj = this.formData.list.filter((item) => item.isCurrencyArea);
+      // 判断当前打开是否与上一个是否一致
+      if (preObj[0].id != item.id) {
+        // 1.保存上一个展开的区域及产品
+        this.axios
+          .post("/api/order_area_product_edit", {
+            order_no: this.$route.query.order_no,
+            area_id: preObj[0].id || "",
+            product: preObj[0].product,
+            type: 1,
+          })
+          .then((result) => {
+            if (result.code == 200) {
+              preObj[0].id = result.data.area_id;
+              // 1.1移除上一个展开区域及产品
+              this.formData.list.forEach((element) => {
+                element.product = [];
+                if (element.id == preObj[0].id) {
+                  element.isCurrencyArea = false;
+                }
+              });
+
+              // 2.获取当前展开区域及产品
+              item.isCurrencyArea = true;
+              this.axios
+                .get("/api/order_area_list_product", {
+                  params: {
+                    order_no: this.$route.query.order_no,
+                    oa_id: this.$route.query.oa_id,
+                    area_id: item.id,
+                    type: 1,
+                  },
+                })
+                .then((res) => {
+                  if (res.code == 200) {
+                    if (!item.product) {
+                      item.product = [];
+                    }
+                    item.product = res.data;
+                    item.product.forEach((pdt, index) => {
+                      pdt.index = index + 1;
+                      pdt.special &&
+                        pdt.special.length > 0 &&
+                        pdt.special.forEach((element) => {
+                          this.formData.head[3].forEach((item) => {
+                            if (element.head_id == item.id) {
+                              element = Object.assign(element, item);
+                              pdt[element.key] = element.value;
+                              this.productSpecValueList.push(element);
+                            }
+                          });
+                        });
+                    });
+                    this.$forceUpdate();
+                  }
+                });
+            }
+          });
+      } else {
+        // 2.获取当前展开区域及产品
+        item.isCurrencyArea = true;
+        this.axios
+          .get("/api/order_area_list_product", {
+            params: {
+              order_no: this.$route.query.order_no,
+              oa_id: this.$route.query.oa_id,
+              area_id: item.id,
+              type: 1,
+            },
+          })
+          .then((res) => {
+            if (res.code == 200) {
+              if (!item.product) {
+                item.product = [];
+              }
+              item.product = res.data;
+              item.product.forEach((pdt, index) => {
+                pdt.index = index + 1;
+                pdt.special &&
+                  pdt.special.length > 0 &&
+                  pdt.special.forEach((element) => {
+                    this.formData.head[3].forEach((item) => {
+                      if (element.head_id == item.id) {
+                        element = Object.assign(element, item);
+                        pdt[element.key] = element.value;
+                        this.productSpecValueList.push(element);
+                      }
+                    });
+                  });
+              });
+              this.$forceUpdate();
+            }
+          });
+      }
+    },
+    handleClientChange(id) {
+      id &&
+        this.axios({
+          method: "get",
+          url: "/api/custom_detail",
+          params: { id },
+        }).then((res) => {
+          this.clientDetailList = res.data.list;
+          this.formData.service_id = res.data.detail.service_id;
+          this.formData.custom_detail_id = this.clientDetailList[0].id || 0;
+          this.fax = res.data.detail.fax;
+        });
+    },
+    handleClientDetailChange(value) {
+      if (value) {
+        let row = this.clientDetailList.filter((item) => item.id == value);
+        this.formData.address = row[0].address;
+        this.formData.mobile = row[0].mobile;
+        this.$forceUpdate();
+      }
+    },
+    //项目辅料新增
+    handleAddSup() {
+      this.supTableData.push({ id: "" });
+      // this.supTableData.forEach((element, index) => {
+      //   element.index = index + 1;
+      // });
+    },
+    //项目辅料删除
+    handleSupSet(row, index) {
+      this.supTableData.splice(index, 1);
+      // this.supTableData.forEach((element, index) => {
+      //   element.index = index + 1
+      // });
+    },
+    goback() {
+      this.$router.go(-1);
+    },
+    uploadSuccess(res) {
+      console.log("res :>> ", res);
+      if (res.code == 200) {
+        this.$Message.success(res.msg || "上传成功");
+        res.data.list.map((item) => {
+          item.num = item.area_num;
+          item.title = item.area_title;
+          item.product.map((p, i) => {
+            p.index = i + 1;
+            p.title = p.product_title;
+            p.num = p.product_num;
+            p.remark = p.product_remark;
+            // 拼接规格
+            p.measure = "";
+            p.measure += p.measure_list.map((m) => {
+              return m.key + m.value + "*";
+            });
+            p.measure = p.measure.substring(0, p.measure.length - 1);
+            p.measure = p.measure.replace(/,/g, "");
+            p.addPDTProcessAttrList = p.process_property_list;
+            p.addPDTProcessAttrList.map((v, k) => {
+              v.process_detail = v.id;
+            });
+            // 拼接工艺属性
+            p.process_property = "";
+            p.process_property += p.process_property_list.map((m) => {
+              return m.title + "/";
+            });
+            p.process_property = p.process_property.substring(
+              0,
+              p.process_property.length - 1
+            );
+            p.process_property = p.process_property.replace(/,/g, "");
+            // 拼接工艺属性ID
+            p.process_properties = "";
+            p.process_properties += p.process_property_list.map((m) => {
+              return m.id;
+            });
+            // p.process_properties = p.process_properties.replace(/,/g, "");
+          });
+        });
+        this.formData.list = [...this.formData.list, ...res.data.list];
+        this.areaSpecValueList = res.data.head.area;
+        this.productSpecValueList = res.data.head.product;
+        this.handleAddInputConfirm();
+        this.$forceUpdate();
+      } else {
+        this.$Message.warning(res.msg || "上传失败");
+      }
+    },
+    uploadError(err) {
+      this.$Message.error(err.msg || "上传失败");
+    },
+    looks(img) {
+      const array = [{ img_url: img }];
+      this.$previewImg({
+        list: array,
+        baseUrl: this.$store.state.ip,
+        baseImgField: "img_url",
+        baseTitleField: "",
+      });
+    },
+    delItems(n, arr) {
+      arr.splice(n, 1);
+    },
+    changeIpt(e, row) {
+      let file = e.target.files[0];
+      this.postImg(file, row);
+      e.target.value = null;
+    },
+    postImg(file, row) {
+      let formData = new FormData();
+      formData.append("file", file);
+      this.axios.post("/api/upload_pic", formData).then((res) => {
+        this.$nextTick(() => {
+          row.push(res.data.url);
+          this.$forceUpdate();
+        });
+      });
+    },
+    // 产品分类选择→对应不同测量字段
+    hanndleAddPDTTypeChange(item, e) {
+      e &&
+        this.axios("/api/basics_product_detail", {
+          params: { id: e },
+        }).then((res) => {
+          if (res.code == 200) {
+            if (res.data.measure_id.length > 0) {
+              item.tempPDTTypeList = res.data.measure_id;
+              item.tempMeasureList = JSON.parse(
+                JSON.stringify(this.measureList)
+              );
+              item.tempMeasureList.forEach((el) => {
+                item[el.e_title] = "";
+              });
+            } else {
+              item.tempPDTTypeList = [];
+              item.tempMeasureList = [];
+            }
+            this.$forceUpdate();
+          }
+        });
+      // basics_measure_index
+    },
+    // 添加特殊字段
+    handleAddInputConfirm() {
+      this.formData.special = JSON.parse(
+        JSON.stringify(this.contactSpecValueList)
+      );
+      this.formData.list.length > 0 &&
+        this.formData.list.forEach((element) => {
+          element.special = JSON.parse(JSON.stringify(this.areaSpecValueList));
+          element.product &&
+            element.product.length > 0 &&
+            element.product.forEach((ele) => {
+              ele.special = JSON.parse(
+                JSON.stringify(this.productSpecValueList)
+              );
+            });
+        });
+      let arr = [];
+      this.productSpecValueList.length > 0 &&
+        this.productSpecValueList.forEach((element) => {
+          arr.push({
+            title: element.key,
+            key: element.key,
+            align: "center",
+            minWidth: 80,
+          });
+        });
+      this.tableColumns = [
+        { title: "序号", key: "index", align: "center", minWidth: 80 },
+        {
+          title: "产品名称",
+          key: "title",
+          align: "center",
+          tooltip: true,
+          minWidth: 100,
+        },
+        { title: "数量", key: "num", align: "center", minWidth: 80 },
+        { title: "价格", key: "price", align: "center", minWidth: 80 },
+        {
+          title: "规格",
+          key: "measure",
+          align: "center",
+          tooltip: true,
+          minWidth: 140,
+        },
+        {
+          title: "工艺属性",
+          key: "process_property",
+          align: "center",
+          tooltip: true,
+          minWidth: 120,
+        },
+        {
+          title: "图纸",
+          align: "center",
+          key: "url",
+          minWidth: 100,
+          render: (h, params) => {
+            const { row } = params;
+            let url = row.url ? row.url : [];
+            return h("img", {
+              attrs: {
+                src: this.$store.state.ip + url[0],
+                style:
+                  "max-width:50px;max-height:50px;position:relative;top:3px;",
+              },
+              on: {
+                click: () => {
+                  // this.axios('/api/orders_img', { params: { id: row.id, type: 1 } }).then(res => {
+                  // row.imgs = res.data
+                  let list = [];
+                  row.url.forEach((el) => {
+                    list.push({ img_url: el });
+                  });
+                  this.$previewImg({
+                    list,
+                    baseUrl: this.$store.state.ip,
+                    baseImgField: "img_url",
+                    baseTitleField: "",
+                  });
+                  // })
+                },
+              },
+            });
+          },
+        },
+        {
+          title: "左右式",
+          key: "left_right_mode",
+          align: "center",
+          tooltip: true,
+          minWidth: 80,
+          render: (h, params) => {
+            return h(
+              "span",
+              {},
+              params.row.left_right_mode == 1
+                ? "左式"
+                : params.row.left_right_mode == 2
+                ? "右式"
+                : "无"
+            );
+          },
+        },
+        {
+          title: "图号",
+          key: "url_number",
+          align: "center",
+          tooltip: true,
+          minWidth: 80,
+        },
+        ...arr,
+        { title: "备注", key: "remark", align: "center", minWidth: 80 },
+        {
+          title: "操作",
+          key: "set",
+          align: "center",
+          slot: "Set",
+          minWidth: 120,
+        },
+      ];
+      this.showAddInputModal = false;
+    },
+    // 添加特殊字段
+    handleSpecValueAdd(item, type) {
+      switch (type) {
+        case 1:
+          this.contactSpecValueList.push({ key: "", value: "" });
+          break;
+        case 2:
+          this.areaSpecValueList.push({ key: "", value: "" });
+          break;
+        case 3:
+          this.productSpecValueList.push({ key: "", value: "" });
+          break;
+      }
+    },
+    // 删除特殊字段
+    handleSpecValueDele(index, type) {
+      switch (type) {
+        case 1:
+          this.contactSpecValueList.splice(index, 1);
+          break;
+        case 2:
+          this.areaSpecValueList.splice(index, 1);
+          break;
+        case 3:
+          this.productSpecValueList.splice(index, 1);
+          break;
+      }
+    },
+  },
+  // 监听属性 类似于data概念
+  computed: {
+    set_tableColumns() {
+      if (this.productSetTableData.length < 1) {
+        return this.tableColumns;
+      } else {
+        return this.func.computedHeader(
+          this.productSetTableData,
+          this.tableColumns
+        );
+      }
+    },
+  },
+  // 监控data中的数据变化
+  watch: {
+    productSpecValueList() {
+      let arr = [];
+      this.productSpecValueList.length > 0 &&
+        this.productSpecValueList.forEach((element) => {
+          arr.push({
+            title: element.value||element.key,
+            key: element.key,
+            align: "center",
+            minWidth: 80,
+          });
+        });
+      this.set_tableColumns.splice(this.set_tableColumns.length - 1, 0, ...arr);
+    },
+  },
+  beforeCreate() {}, // 生命周期 - 创建之前
+  beforeMount() {}, // 生命周期 - 挂载之前
+  beforeUpdate() {}, // 生命周期 - 更新之前
+  updated() {}, // 生命周期 - 更新之后
+  beforeDestroy() {}, // 生命周期 - 销毁之前
+  destroyed() {}, // 生命周期 - 销毁完成
+  activated() {}, // 如果页面有keep-alive缓存功能,这个函数会触发
+};
+</script>
+
+<style lang="scss" scoped>
+.BidSystemContractEdit {
+  overflow: hidden;
+  overflow-y: auto;
+  position: relative;
+  top: 20px;
+  height: 85%;
+  padding-bottom: 20px;
+}
+.top_search {
+  padding: 20px 0;
+  width: 100%;
+  .top_search_form {
+    // width: 800px;
+    // display: flex;
+    // justify-content: space-around;
+    /deep/ .ivu-form-item {
+      display: inline-block;
+      width: 300px;
+    }
+  }
+}
+.addArea {
+  position: relative;
+  padding: 15px;
+  margin-bottom: 30px;
+  border-radius: 5px;
+  box-shadow: 1px 1px 5px 1px #999;
+  .addAreaBtn {
+    position: absolute;
+    right: 20px;
+    top: 20px;
+  }
+  /deep/ .ivu-form-item {
+    display: inline-block;
+    width: 220px;
+  }
+}
+.addPDTFormModal {
+  .addPDTForm {
+    width: 100%;
+    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;
+    }
+    .addPDTBtn {
+      position: absolute;
+      right: 10px;
+      bottom: 25px;
+    }
+  }
+  /deep/ .ivu-modal-body {
+    display: flex;
+    justify-content: center;
+    flex-wrap: wrap;
+    max-height: 700px;
+    overflow: hidden;
+    overflow-y: auto;
+  }
+}
+.addPDTProcess {
+  width: 300px;
+  padding-bottom: 15px;
+  div {
+    display: flex;
+    justify-content: space-around;
+    padding: 5px 0;
+    span {
+      padding-top: 6px;
+    }
+  }
+  .dele_icon {
+    width: 10px;
+    /deep/ .ivu-icon {
+      padding-top: 5px;
+    }
+  }
+}
+.product-img {
+  padding-top: 10px;
+}
+.product-add {
+  display: flex;
+  flex-wrap: wrap;
+  .ipt {
+    position: absolute;
+    width: 100%;
+    height: 100%;
+    opacity: 0;
+    cursor: pointer;
+    outline: none;
+    top: 0;
+    left: 0;
+  }
+  .add-items {
+    width: 40px;
+    height: 40px;
+    border: 1px dotted #e7e7e7;
+    border-radius: 5px;
+    display: flex;
+    justify-content: center;
+    align-items: center;
+    overflow: hidden;
+    position: relative;
+    flex-direction: column;
+    background: #f4f5f7;
+    .item {
+      width: 46px;
+      height: 46px;
+      background: #3764ff;
+      opacity: 0.6;
+      display: flex;
+      justify-content: center;
+      align-items: center;
+      border-radius: 50%;
+      color: #fff;
+    }
+  }
+  .items {
+    width: 40px;
+    height: 40px;
+    margin-bottom: 10px;
+    display: flex;
+    justify-content: center;
+    align-items: center;
+    background: #e7e7e7;
+    margin-right: 10px;
+    border-radius: 5px;
+    position: relative;
+    img {
+      max-width: 40px;
+      max-height: 40px;
+    }
+  }
+}
+.supModalBtn {
+  display: flex;
+  justify-content: flex-end;
+  margin-bottom: 10px;
+}
+/deep/.ivu-modal-body {
+  display: flex;
+  justify-content: center;
+  .addInputClass {
+    display: flex;
+    justify-content: center;
+    width: 500px;
+    .dele_icon {
+      cursor: pointer;
+      width: 10px;
+      /deep/ .ivu-icon {
+        padding-top: 5px;
+      }
+    }
+  }
+}
+.addInputClassTab {
+  display: flex;
+  justify-content: center;
+  align-items: center;
+  flex-wrap: wrap;
+  div {
+    display: flex;
+    justify-content: center;
+    align-items: center;
+    width: 100%;
+    padding: 5px;
+    .dele_icon {
+      i {
+        font-size: 20px;
+      }
+    }
+  }
+}
+/deep/.ivu-tabs-nav-scroll {
+  display: flex;
+  justify-content: center;
+}
+/deep/ .ivu-table-wrapper {
+  overflow: visible;
+}
+/deep/.ivu-table-fixed-body {
+  padding-bottom: 20px;
+}
+/deep/.el-input--small .el-input__inner {
+  height: 24px;
+  line-height: 24px;
+}
+</style>

+ 27 - 12
src/views/BidSystem/IncompleteStatistics.vue

@@ -13,23 +13,23 @@
                 ghost>导出</Button>
       </slot>
     </Toptitle>
-    <div style="height:80%">
+    <div style="height:80%;overflow:auto">
      <Form :label-width='100' :model="searchData" style="display:flex;flex-wrap:wrap;margin:15px 0">
         <FormItem label='派工时间:'>
             <DatePicker type="date" placeholder="年/月/日" style="width: 130px" size='small' v-model="searchData.start_time"></DatePicker>
         </FormItem>
         <FormItem label='项目编码:'>
-           <Select v-model="searchData.order_no" style="width:150px" size='small'>
+           <Select v-model="searchData.order_no" style="width:150px" size='small' filterable multiple>
         <Option v-for="item in order_list" :value="item.order_no" :key="item.order_no">{{ item.order_no }}</Option>
     </Select>
         </FormItem>
         <FormItem label='项目名称:'>
-         <Select v-model="searchData.project_title" style="width:150px" size='small'>
+         <Select v-model="searchData.project_title" style="width:150px" size='small' filterable multiple>
         <Option v-for="item in order_list" :value="item.project_title" :key="item.order_no">{{ item.project_title }}</Option>
         </Select>
         </FormItem>
          <FormItem label='逾期状态:'>
-         <Select v-model="searchData.status" style="width:150px" size='small'>
+         <Select v-model="searchData.status" style="width:150px" size='small' filterable clearable>
         <Option :value="0" >未逾期</Option>
         <Option :value="1" >临近逾期</Option>
         <Option :value="2" >已逾期</Option>
@@ -44,6 +44,7 @@
     <Table 
     :data='tableData'
     :columns='tableColumns'
+    :max-height='500'
     border>
     <template slot="setSlot" slot-scope="{row}">
          <a @click="goPageDetail(row)">详情</a>
@@ -160,17 +161,17 @@ export default {
             total:0,
             searchData:{
                start_time:'',
-               order_no:'',
-                project_title:'',
-               status:'',
+               order_no:[],
+                project_title:[],
+               status:[],
             },
       order_list:[],
        tableData:[],
        tableColumns:[
            {title:'项目编码',align:'center',minWidth:120,key:'order_no'},
            {title:'项目名称',align:'center',minWidth:120,key:'project_name'},
-           {title:'图号',align:'center',minWidth:120,key:'url_number'},
-           {title:'未完工平方',align:'center',minWidth:120,key:'un_complete_area'},
+           {title:'图号',align:'center',minWidth:120,key:'url_number',ellipsis:true,tooltip:true},
+           {title:'未完工平方',align:'center',minWidth:120,key:'area'},
            {title:'操作',align:'center',slot:'setSlot',minWidth:120},
        ]
         }
@@ -186,12 +187,16 @@ export default {
     },
     mounted(){
         this.getData();
+        let myDate = new Date();
+          let Year = myDate.getFullYear();
+          let Month = myDate.getMonth();
+          this.searchData.start_time = `${Year}-${Month+1}-1`
     },
     methods:{
         getData(row){
          this.axios.get('/api/finance_un_complete_total',{params:{...row,page_index:this.pageIndex,page_size:this.pageSize}}).then(res=>{
-             this.tableData = res.data.list;
-             this.total = Number(res.data.total);
+             this.tableData = res.data.data;
+             this.total =res.data.total;
          })
         },
         tableSetSure(){
@@ -204,7 +209,17 @@ export default {
             this.getData(data)
         },
         goPageDetail(row){
-            
+            if(!this.searchData.start_time){
+                return this.$Message.warning('请选择派工时间')
+            }
+            // console.log(row);
+            // let obj = {};
+            // obj = JSON.parse(JSON.stringify(this.searchData));
+            // obj.start_time = obj.start_time?Date.parse(obj.start_time).toString().slice(0,10):'';
+            // let space_str = '\u0000';
+            // row.order_no =1;
+            let start_time = this.searchData.start_time?Date.parse(this.searchData.start_time).toString().slice(0,10):'';
+             this.$router.push({path:'/cms/BidSystem/IncompleteStatisticsDetail',query:{...row,start_time}})
         },
         changeSize(e){
              this.pageSize = e;

+ 261 - 0
src/views/BidSystem/IncompleteStatisticsDetail.vue

@@ -0,0 +1,261 @@
+<template>
+    <div>
+          <Toptitle title="详情">
+      <slot name="titleButton">
+        <Button
+                type='primary'
+                ghost
+                style="margin-right:10px;">栏目设置</Button>
+        <Button type="primary"
+                style="margin-right:10px;"
+           
+                ghost>导出</Button>
+           <Button type="primary"
+                style="margin-right:10px;"
+                @click="back"
+                ghost>返回</Button>
+      </slot>
+    </Toptitle>
+    <div style="height:80%;overflow:auto">
+    <Form style="display:flex;margin:10px 0;flex-wrap:wrap" :label-width='90'>
+        <FormItem label='项目编码:' style="width:250px"><span>{{searchData.order_no}}</span></FormItem>
+        <FormItem label='项目名称:' style="width:250px"><span>{{searchData.project_name}}</span></FormItem>
+        <FormItem label='图号:' style="width:250px">  <Tooltip :content="searchData.url_number" placement="bottom" transfer max-width='400'>
+          <span>{{searchData.url_number.toString().length>=16?searchData.url_number.toString().slice(0,16)+"...":searchData.url_number}}</span>
+        </Tooltip></FormItem>
+        <FormItem label='未完工平方:' style="width:250px"><span>{{searchData.area}}</span></FormItem>
+         <FormItem label='查询日期:' style="width:250px">
+             <DatePicker type="date" placeholder="年/月/日" style="width: 130px" size='small' v-model="searchData.search_date"></DatePicker>
+         </FormItem>
+         <FormItem label='工序名称:' style="width:250px">
+             <Select v-model="searchData.process_id" filterable clearable multiple>
+                 <Option v-for="item in process_list" :key="item.id" :label="item.title" :value='item.id'/>
+             </Select>
+         </FormItem>
+         <FormItem label='班组名称:' style="width:250px">
+             <Select v-model='searchData.employee_id' filterable clearable multiple>
+                 <Option v-for="item in band_list" :key="item.id" :label="item.nickname" :value='item.id'/>
+             </Select>
+         </FormItem>
+         <FormItem label='图号:' style="width:250px">
+               <Select v-model="searchData.product_id" filterable clearable multiple>
+                 <Option v-for="item in url_number_list" :key="item.product_id" :value="item.product_id" :label="item.url_number"/>
+             </Select>
+         </FormItem>
+         <FormItem label='楼幢:' style="width:250px">
+                   <Select v-model="searchData.house" filterable clearable multiple>
+                 <Option v-for="(item,index) in house_list" :key="index" :value="item" :label="item"/>
+             </Select>
+         </FormItem>
+         <FormItem label='单元:' style="width:250px">
+                <Select v-model="searchData.unit" filterable clearable multiple>
+                 <Option v-for="(item,index) in unit_list" :key="index" :value="item" :label="item"/>
+             </Select>
+         </FormItem>
+         <FormItem label='楼层:' style="width:250px">
+                     <Select v-model="searchData.layer" filterable clearable multiple>
+                 <Option v-for="(item,index) in layer_list" :key="index" :value="item" :label="item"/>
+             </Select>
+         </FormItem>
+         <FormItem label='房号:' style="width:250px">
+               <Select v-model="searchData.house_number" filterable clearable multiple>
+                 <Option v-for="(item,index) in house_number_list" :key="index" :value="item" :label='item'/>
+             </Select>
+         </FormItem>
+         <FormItem label='产品:' style="width:250px">
+             <Select v-model="searchData.product_id" filterable clearable multiple>
+                 <Option v-for="item in url_number_list" :key="item.product_id" :value="item.product_id" :label="item.title"/>
+             </Select>
+         </FormItem>
+           <FormItem label='组合名称:' style="width:250px">
+             <Select v-model="searchData.compose_name" filterable clearable multiple>
+                 <Option v-for="(item,index) in compose_list" :key="index" :value="item.title" :label="item.title"/>
+             </Select>
+         </FormItem>
+           <FormItem label='部件:' style="width:250px">
+                 <Select v-model="searchData.part_id" filterable clearable multiple>
+                 <Option v-for="item in part_list" :key="item.id" :value="item.id" :label="item.title"/>
+             </Select>
+         </FormItem>
+           <FormItem label='派工日期:' style="width:400px">
+              <DatePicker type="date" placeholder="年/月/日" style="width: 130px" size='small' v-model="searchData.push_start_time"></DatePicker>
+              ~
+              <DatePicker type="date" placeholder="年/月/日" style="width: 130px" size='small' v-model="searchData.push_end_time"></DatePicker>
+         </FormItem>
+           <FormItem label='完工日期:' style="width:400px">
+                 <DatePicker type="date" placeholder="年/月/日" style="width: 130px" size='small' v-model="searchData. complete_start_time"></DatePicker>
+              ~
+              <DatePicker type="date" placeholder="年/月/日" style="width: 130px" size='small' v-model="searchData. complete_end_time"></DatePicker>
+         </FormItem>
+         <FormItem>
+             <Button type="primary" size='small' @click="init">搜索</Button>
+         </FormItem>
+    </Form>
+     <Table 
+    :data='tableData'
+    :columns='tableColumns'
+    border>
+    <template slot="over_date" slot-scope="{row}">
+        <span :style="Number(row.over_date)>=0?{}:{'color':'red'}">{{row.over_date}}</span>
+    </template>
+    </Table>
+    </div>
+     <div style="text-align:center;margin-top:20px">
+          <Page :page-size-opts="[10, 20, 30, 40,100]"
+                @on-page-size-change='changeSize'
+                @on-change='changePage'
+                :current='pageIndex'
+                show-total
+                :total="total"
+                show-sizer
+                :page-size='pageSize' />
+        </div>
+    </div>
+</template>
+<script>
+export default {
+    name:'CompletionStatisticsDetail',
+    data(){
+        return{
+            house_number_list:[],
+            unit_list:[],
+            part_list:[],
+            compose_list:[],
+            house_list:[],
+            url_number_list:[],
+            pageSize:10,
+            pageIndex:1,
+            total:0,
+            searchData:{
+          search_date:new Date(),//查询时间
+          process_id:[],//工序id
+          employee_id:[],//班组id
+          house:[],//楼栋
+          unit:[],//单元
+          layer:[],//楼层
+          house_number:[],//房号
+          product_id:[],//产品id
+          compose_name:[],//组合id
+          part_id:[],//部件id
+          push_start_time:'',//派工日期(起)
+          push_end_time:'',//(末)
+          complete_start_time:'',//完工日期(起)
+          complete_end_time:''//(末)
+            },
+            tableData:[],
+           tableColumns:[
+            {title:'逾期天数',align:'center',minWidth:120,key:'over_date',slot:'over_date'},
+           {title:'工序',align:'center',minWidth:120,key:'produce'},
+           {title:'班组',align:'center',minWidth:120,key:'employee'},
+           {title:'楼栋',align:'center',minWidth:120,key:'house'},
+            {title:'单元',align:'center',minWidth:120,key:'unit'},
+         {title:'楼层',align:'center',minWidth:120,key:'layer'},
+         {title:'房号',align:'center',minWidth:120,key:'house_number'},
+          {title:'图号',align:'center',minWidth:120,key:'url_number'},
+          {title:'产品名称',align:'center',minWidth:120,key:'product_title'},
+            {title:'组合名称',align:'center',minWidth:120,key:'compose_name'},
+            {title:'未完工平方',align:'center',minWidth:120,key:'ext_1'},
+                     {title:'派工日期',align:'center',minWidth:120,key:'push_time'},
+                       {title:'预计完工日期',align:'center',minWidth:120,key:'plan_complete_time'},
+           ],
+           process_list:[],
+           band_list:[],
+           layer_list:[],
+        }
+    },
+    created(){
+    this.searchData = {...this.searchData,...this.$route.query};
+    //      //工序列表
+    // this.axios.post('/api/ext_produce_list').then(res=>{this.process_list = res.data});
+    // //班组列表
+    // this.axios("/api/employee_list").then((res) => (this.band_list = res.data));
+    },
+    mounted(){
+         this.getData();
+    },
+    methods:{
+        init(){
+           let data = [];
+           data = JSON.parse(JSON.stringify(this.searchData));
+           data.push_start_time=data.push_start_time?Date.parse(data.push_start_time).toString().slice(0,10):'';
+           data.push_end_time=data.push_end_time?Date.parse(data.push_end_time).toString().slice(0,10):'';
+           data.complete_start_time=data.complete_start_time?Date.parse(data.complete_start_time).toString().slice(0,10):'';
+           data.complete_end_time=data.complete_end_time?Date.parse(data.complete_end_time).toString().slice(0,10):'';
+           data.search_date=Date.parse(data.search_date).toString().slice(0,10);
+           this.getData(data)
+        },
+        goPageDetail(row){
+              this.$router.push({path:'/cms/BidSystem/CompletionStatisticsConfig',query:{...row,...this.$route.query}})
+        },
+        back(){
+            this.$router.go(-1)
+        },
+        changeSize(e){
+              this.pageSize = e;
+              this.getData();
+        },
+        changePage(e){
+                this.pageIndex = e;
+                this.getData();
+        },
+        getData(row){
+               this.axios.post('/api/finance_un_complete_total_detail',{
+            page_size:this.pageSize,
+            page_index:this.pageIndex,
+            produce_id:this.$route.query.produce_id,
+            employee_id:this.$route.query.employee_id,
+            start_time:this.$route.query.start_time,
+            end_time:this.$route.query.end_time,
+            order_no:this.$route.query.order_no,
+            ...row
+            }).then(res=>{
+                this.tableData = res.data.data;
+                this.total =res.data.total;
+                this.url_number_list = res.data.product_list;
+                this.house_list = res.data.house_list;
+                let layer = [];
+                res.data.house_list.forEach(v=>{
+                    if(layer.indexOf(v.layer)<0){
+                        layer.push(v.layer);
+                    }
+                })
+                this.layer_list = layer;
+                let house = [];
+                  res.data.house_list.forEach(v=>{
+                    if(house.indexOf(v.house)<0){
+                        house.push(v.house);
+                    }
+                })
+                this.house_list = house;
+                let unit = [];
+                  res.data.house_list.forEach(v=>{
+                    if(unit.indexOf(v.unit)<0){
+                        unit.push(v.unit);
+                    }
+                })
+                this.unit_list = unit;
+                let house_number = [];
+                  res.data.house_list.forEach(v=>{
+                    if(house_number.indexOf(v.number)<0){
+                        house_number.push(v.number);
+                    }
+                })
+                this.house_number_list = house_number;
+                this.compose_list = [];
+                   res.data.compose_list.forEach(element => {
+                       let obj ={};
+                       obj.title = element;
+                       this.compose_list.push(obj);
+                   });
+                this.part_list = res.data.part_list;
+                this.process_list = res.data.produce_list;
+                this.band_list = res.data.employee_list;
+            })
+        }
+
+    }
+}
+</script>
+<style lang="scss" scoped>
+
+</style>

+ 134 - 0
src/views/BidSystem/OutputValue/config.vue

@@ -0,0 +1,134 @@
+<template>
+    <div>
+        <Toptitle title="项目产值表">
+            <slot name="titleButton"> 
+          <Button type="success" ghost icon="md-exit" style="margin-right:10px;"
+            >导出</Button
+          >
+            </slot>
+        </Toptitle>
+        <div style="height:80%;overflow:auto">
+        <Form style="display:flex;flex-wrap:wrap;margin:10px 0" label-width='100'>
+            <FormItem label='项目编码:' style="width: 250px" >
+               <span>456434</span>
+            </FormItem>
+             <FormItem label='项目名称:' style="width: 250px" >
+               <span>先锋创意园</span>
+            </FormItem>
+             <FormItem label='项目简称:' style="width: 250px">
+                    <span>先锋</span>
+            </FormItem>
+               <FormItem label='图号:' style="width: 250px">
+                    <span>003</span>
+            </FormItem>
+             <FormItem label='产品名称:' style="width: 250px">
+                    <span>单开门1</span>
+            </FormItem>
+            <FormItem label='组合名称:'>
+                <Select>
+                    <Option></Option>
+                </Select>
+            </FormItem>
+              <FormItem>
+                <Button type="primary"
+                  size="small"
+                  @click="init">搜索</Button>
+        </FormItem>
+        </Form>
+        <Table  
+        :data='tableData'
+    :columns='tableColumns'
+    :max-height='520'
+    border>
+       <template slot="set" slot-scope="{row}">
+           <a @click="goPageDetail(row)">详情</a>
+       </template>
+        </Table>
+        </div>
+           <div style="text-align:center">
+          <Page :page-size-opts="[10, 20, 30, 40,100]"
+                @on-page-size-change='changeSize'
+                @on-change='changePage'
+                :current='pageIndex'
+                show-total
+                :total="total"
+                show-sizer
+                :page-size='pageSize' />
+        </div>
+    </div>
+</template>
+<script>
+import index from '../../../components/DispatchOrder/index.vue';
+export default {
+  components: { index },
+    data(){
+        return{
+            headers: { Authorization: localStorage.getItem("token") },
+            pageSize:10,
+            pageIndex:1,
+            total:0,
+            searchData:{
+               start_time:'',
+               end_time:'',
+               order_no:'',
+               residential_name:'',
+               abbreviation:'',
+            },
+            tableData:[],
+            tableColumns:[
+                {title:'组合名称',align:"center",key:'order_no',minWidth:80},
+                 {title:'组合合同金额',align:"center",key:'residential_name',minWidth:80},
+                  {title:'木工产值',align:"center",key:'abbreviation',minWidth:80},
+                   {title:'油漆产值',align:"center",key:'order_no',minWidth:80},
+                    {title:'发货产值',align:"center",key:'order_no',minWidth:80},
+                     {title:'安装产值',align:"center",key:'order_no',minWidth:80},
+                       {title:'合计工序产值',align:"center",key:'order_no',minWidth:80},
+                {title:'操作',align:'center',slot:'set',minWidth:80}
+            ],
+        }
+    },
+    mounted(){
+      this.getData();
+    },
+    methods:{
+           uploadError(err) {
+      this.$Message.error(err.msg || "上传失败");
+    },
+       uploadSuccess(res) {
+      if (res.code == 200) {
+        this.$Message.success(res.msg || "上传成功");
+        this.getData();
+      } else {
+        this.$Message.warning(res.msg || "上传失败");
+      }
+    },
+        init(){
+          let data ={};
+          data = JSON.parse(JSON.stringify(this.searchData));
+          data.start_time = data.start_time?Date.parse(data.start_time).toString().slice(0,10):'';
+           data.end_time = data.end_time?Date.parse(data.end_time).toString().slice(0,10):'';
+         this.getData(data);
+        },
+        getData(row){
+          this.axios.post('/api/output_value_list',{...row,page_size:this.pageSize,page_index:this.pageIndex}).then(res=>{
+              this.tableData = res.data.data;
+              this.total = res.data.total;
+          })
+        },
+        goPageDetail(row){
+      this.$router.push({path:'/cms/BidSystem/OutputValue/info',query:{...row}})
+        },
+        changeSize(e){
+           this.pageSize=e;
+           this.getData();
+        },
+        changePage(e){
+            this.pageIndex = e;
+            this.getData();
+        }
+    }
+}
+</script>
+<style lang="scss" scoped>
+
+</style>

+ 133 - 0
src/views/BidSystem/OutputValue/detail.vue

@@ -0,0 +1,133 @@
+<template>
+    <div>
+        <Toptitle title="项目产值表">
+            <slot name="titleButton"> 
+          <Button type="success" ghost icon="md-exit" style="margin-right:10px;"
+            >导出</Button
+          >
+            </slot>
+        </Toptitle>
+        <div style="height:80%;overflow:auto">
+        <Form style="display:flex;flex-wrap:wrap;margin:10px 0" label-width='100'>
+            <FormItem label='项目编码:' style="width: 250px" >
+               <span>{{searchData.order_no}}</span>
+            </FormItem>
+             <FormItem label='项目名称:' style="width: 250px" >
+                 <span>先锋创意园</span>
+            </FormItem>
+             <FormItem label='项目简称:' style="width: 250px">
+                   <span>先锋</span>
+            </FormItem>
+             <FormItem label='图号:' style="width: 250px">
+                    <Select v-model="searchData.abbreviation" size="small">
+                     <Option></Option>
+                 </Select>
+            </FormItem>
+             <FormItem label='产品:' style="width: 250px">
+                    <Select v-model="searchData.abbreviation" size="small">
+                     <Option></Option>
+                 </Select>
+            </FormItem>
+              <FormItem>
+                <Button type="primary"
+                  size="small"
+                  @click="init">搜索</Button>
+        </FormItem>
+        </Form>
+        <Table  
+        :data='tableData'
+    :columns='tableColumns'
+    :max-height='520'
+    border>
+       <template slot="set" slot-scope="{row}">
+           <a @click="goPageDetail(row)">详情</a>
+       </template>
+        </Table>
+        </div>
+           <div style="text-align:center">
+          <Page :page-size-opts="[10, 20, 30, 40,100]"
+                @on-page-size-change='changeSize'
+                @on-change='changePage'
+                :current='pageIndex'
+                show-total
+                :total="total"
+                show-sizer
+                :page-size='pageSize' />
+        </div>
+    </div>
+</template>
+<script>
+export default {
+    data(){
+        return{
+            headers: { Authorization: localStorage.getItem("token") },
+            pageSize:10,
+            pageIndex:1,
+            total:0,
+            searchData:{
+               start_time:'',
+               end_time:'',
+               order_no:'',
+               residential_name:'',
+               abbreviation:'',
+            },
+            tableData:[],
+            tableColumns:[
+                {title:'图号',align:"center",key:'order_no',minWidth:80},
+                 {title:'产品名称',align:"center",key:'residential_name',minWidth:80},
+                  {title:'图号合同金额',align:"center",key:'abbreviation',minWidth:80},
+                    {title:'核量金额',align:"center",key:'order_no',minWidth:80},
+                     {title:'木工产值',align:"center",key:'order_no',minWidth:80},
+                      {title:'油漆产值',align:"center",key:'order_no',minWidth:80},
+                       {title:'发货产值',align:"center",key:'order_no',minWidth:80},
+                        {title:'安装产值',align:"center",key:'order_no',minWidth:80},
+                        {title:'合计工序产值',align:"center",key:'order_no',minWidth:80},
+                {title:'操作',align:'center',slot:'set',minWidth:80}
+            ],
+        }
+    },
+    mounted(){
+      this.getData();
+    },
+    methods:{
+           uploadError(err) {
+      this.$Message.error(err.msg || "上传失败");
+    },
+       uploadSuccess(res) {
+      if (res.code == 200) {
+        this.$Message.success(res.msg || "上传成功");
+        this.getData();
+      } else {
+        this.$Message.warning(res.msg || "上传失败");
+      }
+    },
+        init(){
+          let data ={};
+          data = JSON.parse(JSON.stringify(this.searchData));
+          data.start_time = data.start_time?Date.parse(data.start_time).toString().slice(0,10):'';
+           data.end_time = data.end_time?Date.parse(data.end_time).toString().slice(0,10):'';
+         this.getData(data);
+        },
+        getData(row){
+          this.axios.post('/api/output_value_list',{...row,page_size:this.pageSize,page_index:this.pageIndex}).then(res=>{
+              this.tableData = res.data.data;
+              this.total = res.data.total;
+          })
+        },
+        goPageDetail(row){
+      this.$router.push({path:'/cms/BidSystem/OutputValue/config',query:{...row}})
+        },
+        changeSize(e){
+           this.pageSize=e;
+           this.getData();
+        },
+        changePage(e){
+            this.pageIndex = e;
+            this.getData();
+        }
+    }
+}
+</script>
+<style lang="scss" scoped>
+
+</style>

+ 129 - 0
src/views/BidSystem/OutputValue/info.vue

@@ -0,0 +1,129 @@
+<template>
+    <div>
+        <Toptitle title="项目产值表">
+            <slot name="titleButton"> 
+          <Button type="success" ghost icon="md-exit" style="margin-right:10px;"
+            >导出</Button
+          >
+            </slot>
+        </Toptitle>
+        <div style="height:80%;overflow:auto">
+        <Form style="display:flex;flex-wrap:wrap;margin:10px 0" label-width='100'>
+            <FormItem label='项目编码:' style="width: 250px" >
+               <span>23456</span>
+            </FormItem>
+             <FormItem label='项目名称:' style="width: 250px" >
+                  <span>先锋创意园</span>
+            </FormItem>
+             <FormItem label='项目简称:' style="width: 250px">
+                   <span>先锋</span>
+            </FormItem>
+             <FormItem label='图号:' style="width: 250px">
+                   <span>003</span>
+            </FormItem>
+             <FormItem label='产品名称:' style="width: 250px">
+                   <span>单开门</span>
+            </FormItem>
+             <FormItem label='组合名称:' style="width: 250px">
+                   <span>003</span>
+            </FormItem>
+             <FormItem label='部件名称:' style="width: 250px">
+                   <Select>
+                       <Option></Option>
+                   </Select>
+            </FormItem>
+              <FormItem>
+                <Button type="primary"
+                  size="small"
+                  @click="init">搜索</Button>
+        </FormItem>
+        </Form>
+        <Table  
+        :data='tableData'
+    :columns='tableColumns'
+    :max-height='520'
+    border>
+        </Table>
+        </div>
+           <div style="text-align:center">
+          <Page :page-size-opts="[10, 20, 30, 40,100]"
+                @on-page-size-change='changeSize'
+                @on-change='changePage'
+                :current='pageIndex'
+                show-total
+                :total="total"
+                show-sizer
+                :page-size='pageSize' />
+        </div>
+    </div>
+</template>
+<script>
+export default {
+    data(){
+        return{
+            headers: { Authorization: localStorage.getItem("token") },
+            pageSize:10,
+            pageIndex:1,
+            total:0,
+            searchData:{
+               start_time:'',
+               end_time:'',
+               order_no:'',
+               residential_name:'',
+               abbreviation:'',
+            },
+            tableData:[],
+            tableColumns:[
+                {title:'部件名称',align:"center",key:'order_no',minWidth:80},
+                 {title:'部件合同金额',align:"center",key:'residential_name',minWidth:80},
+                  {title:'木工产值',align:"center",key:'abbreviation',minWidth:80},
+                   {title:'油漆产值',align:"center",key:'order_no',minWidth:80},
+                    {title:'发货产值',align:"center",key:'order_no',minWidth:80},
+                     {title:'安装产值',align:"center",key:'order_no',minWidth:80},
+                       {title:'合计工序产值',align:"center",key:'order_no',minWidth:80},
+                {title:'操作',align:'center',slot:'set',minWidth:80}
+            ],
+        }
+    },
+    mounted(){
+      this.getData();
+    },
+    methods:{
+           uploadError(err) {
+      this.$Message.error(err.msg || "上传失败");
+    },
+       uploadSuccess(res) {
+      if (res.code == 200) {
+        this.$Message.success(res.msg || "上传成功");
+        this.getData();
+      } else {
+        this.$Message.warning(res.msg || "上传失败");
+      }
+    },
+        init(){
+          let data ={};
+          data = JSON.parse(JSON.stringify(this.searchData));
+          data.start_time = data.start_time?Date.parse(data.start_time).toString().slice(0,10):'';
+           data.end_time = data.end_time?Date.parse(data.end_time).toString().slice(0,10):'';
+         this.getData(data);
+        },
+        getData(row){
+          this.axios.post('/api/output_value_list',{...row,page_size:this.pageSize,page_index:this.pageIndex}).then(res=>{
+              this.tableData = res.data.data;
+              this.total = res.data.total;
+          })
+        },
+        changeSize(e){
+           this.pageSize=e;
+           this.getData();
+        },
+        changePage(e){
+            this.pageIndex = e;
+            this.getData();
+        }
+    }
+}
+</script>
+<style lang="scss" scoped>
+
+</style>

+ 173 - 0
src/views/BidSystem/OutputValue/list.vue

@@ -0,0 +1,173 @@
+<template>
+    <div>
+        <Toptitle title="项目产值表">
+            <slot name="titleButton"> 
+          <Button type="success" ghost icon="md-exit" style="margin-right:10px;"
+            >导出</Button
+          >
+            </slot>
+        </Toptitle>
+        <div style="height:80%;overflow:auto">
+        <Form style="display:flex;flex-wrap:wrap;margin:10px 0" :label-width='100'>
+            <FormItem label='查询区间:' style="width:400px">
+                  <DatePicker type="date" placeholder="年/月/日" style="width: 130px" size='small' v-model="searchData.start_time"></DatePicker>
+              ~
+              <DatePicker type="date" placeholder="年/月/日" style="width: 130px" size='small' v-model="searchData.end_time"></DatePicker>
+            </FormItem>
+            <FormItem label='项目编码:' style="width: 250px" >
+                 <Select v-model="searchData.order_no" size="small">
+                     <Option></Option>
+                 </Select>
+            </FormItem>
+             <FormItem label='项目名称:' style="width: 250px" >
+                  <Select v-model="searchData.residential_name" size="small">
+                     <Option></Option>
+                 </Select>
+            </FormItem>
+             <FormItem label='项目简称:' style="width: 250px">
+                    <Select v-model="searchData.abbreviation" size="small">
+                     <Option></Option>
+                 </Select>
+            </FormItem>
+              <FormItem>
+                <Button type="primary"
+                  size="small"
+                  @click="init">搜索</Button>
+        </FormItem>
+        </Form>
+        <Table  
+        :data='tableData'
+    :columns='tableColumns'
+    :max-height='520'
+    border
+    show-summary 
+    :summary-method="handleSummary"
+    >
+       <template slot="set" slot-scope="{row}">
+           <a @click="goPageDetail(row)">详情</a>
+       </template>
+        </Table>
+        </div>
+           <div style="text-align:center">
+          <Page :page-size-opts="[10, 20, 30, 40,100]"
+                @on-page-size-change='changeSize'
+                @on-change='changePage'
+                :current='pageIndex'
+                show-total
+                :total="total"
+                show-sizer
+                :page-size='pageSize' />
+        </div>
+    </div>
+</template>
+<script>
+export default {
+    data(){
+        return{
+            headers: { Authorization: localStorage.getItem("token") },
+            pageSize:10,
+            pageIndex:1,
+            total:0,
+            searchData:{
+               start_time:'',
+               end_time:'',
+               order_no:'',
+               residential_name:'',
+               abbreviation:'',
+            },
+            tableData:[],
+            tableColumns:[
+                {title:'项目编码',align:"center",key:'order_no',minWidth:80},
+                 {title:'项目名称',align:"center",key:'residential_name',minWidth:80},
+                  {title:'项目简称',align:"center",key:'abbreviation',minWidth:80},
+                   {title:'合同金额',align:"center",key:'',minWidth:80},
+                    {title:'核量金额',align:"center",key:'',minWidth:80},
+                     {title:'本厂产值',align:"center",key:'',minWidth:80},
+                      {title:'外协产值',align:"center",key:'',minWidth:80},
+                       {title:'合计产值',align:"center",key:'',minWidth:80},
+                        {title:'未完成产值',align:"center",key:'',minWidth:80},
+                {title:'操作',align:'center',slot:'set',minWidth:80}
+            ],
+        }
+    },
+    mounted(){
+      this.getData();
+    },
+    methods:{
+        handleSummary ({ columns, data }) {
+                const sums = {};
+                columns.forEach((column, index) => {
+                    console.log(data)
+                    const key = column.key;
+                    if (index === 0) {
+                        sums[key] = {
+                            key,
+                            value: '总价'
+                        };
+                        return;
+                    }
+                    const values = data.map(item => Number(item[key]));
+                    if (key == 'residential_name') {
+                        const v = values.reduce((prev, curr) => {
+                            const value = Number(curr);
+                            if (!isNaN(value)) {
+                                return prev + curr;
+                            } else {
+                                return prev;
+                            }
+                        }, 0);
+                        sums[key] = {
+                            key,
+                            value:123
+                        };
+                    } else {
+                        sums[key] = {
+                            key,
+                            value: ''
+                        };
+                    }
+                });
+
+                return sums;
+        },
+           uploadError(err) {
+      this.$Message.error(err.msg || "上传失败");
+    },
+       uploadSuccess(res) {
+      if (res.code == 200) {
+        this.$Message.success(res.msg || "上传成功");
+        this.getData();
+      } else {
+        this.$Message.warning(res.msg || "上传失败");
+      }
+    },
+        init(){
+          let data ={};
+          data = JSON.parse(JSON.stringify(this.searchData));
+          data.start_time = data.start_time?Date.parse(data.start_time).toString().slice(0,10):'';
+           data.end_time = data.end_time?Date.parse(data.end_time).toString().slice(0,10):'';
+         this.getData(data);
+        },
+        getData(row){
+          this.axios.post('/api/output_value_list',{...row,page_size:this.pageSize,page_index:this.pageIndex}).then(res=>{
+              this.tableData = res.data.data;
+              this.total = res.data.total;
+          })
+        },
+        goPageDetail(row){
+      this.$router.push({path:'/cms/BidSystem/OutputValue/detail',query:{...row}})
+        },
+        changeSize(e){
+           this.pageSize=e;
+           this.getData();
+        },
+        changePage(e){
+            this.pageIndex = e;
+            this.getData();
+        }
+    }
+}
+</script>
+<style lang="scss" scoped>
+
+</style>

+ 45 - 16
src/views/ChipPrintScreen/ChipPrintScreen.vue

@@ -1299,6 +1299,7 @@ handleSelectionAll(){
     //项目、图号确认
     handleSelectionComfirm(row) {
       console.log(`row`, row);
+      this.page_index=1;
       // 这里需要把弹框关闭之后赋值到selectedInfo上
       // this.selectedInfo.order_no;
       // 1 项目选择  2图号选择
@@ -1748,7 +1749,7 @@ handleSelectionAll(){
             const printContent_l1 = `项目:${content.client_name}`;
             printparamsJsonArray.push({
               PTK_DrawText_TrueType:
-                "100,40,60,0,微软雅黑,1,700,0,0,0," + printContent_l1,
+                "150,40,60,0,微软雅黑,1,700,0,0,0," + printContent_l1,
             });
             const printContent_l1_2 = `区域:${
               content.house ? content.house + "-" : ""
@@ -1757,70 +1758,83 @@ handleSelectionAll(){
             }`;
             printparamsJsonArray.push({
               PTK_DrawText_TrueType:
-                "600,40,60,0,微软雅黑,1,700,0,0,0," + printContent_l1_2,
+                "650,40,60,0,微软雅黑,1,700,0,0,0," + printContent_l1_2,
             });
             const printContent_l2 = `房号:${content.number_detail}`;
             printparamsJsonArray.push({
               PTK_DrawText_TrueType:
-                "100,110,60,0,微软雅黑,1,700,0,0,0," + printContent_l2,
+                "150,110,60,0,微软雅黑,1,700,0,0,0," + printContent_l2,
             });
             const printContent_l2_2 = `产品:${content.product_title}`;
             printparamsJsonArray.push({
               PTK_DrawText_TrueType:
-                "600,110,60,0,微软雅黑,1,700,0,0,0," + printContent_l2_2,
+                "650,110,60,0,微软雅黑,1,700,0,0,0," + printContent_l2_2,
             });
             const printContent_l3 = `图号:${content.url_number}`;
             printparamsJsonArray.push({
               PTK_DrawText_TrueType:
-                "100,180,60,0,微软雅黑,1,700,0,0,0," + printContent_l3,
+                "150,180,60,0,微软雅黑,1,700,0,0,0," + printContent_l3,
             });
             const printContent_l3_2 = `部件:${content.part_title}`;
             printparamsJsonArray.push({
               PTK_DrawText_TrueType:
-                "600,180,60,0,微软雅黑,1,700,0,0,0," + printContent_l3_2,
+                "650,180,60,0,微软雅黑,1,700,0,0,0," + printContent_l3_2,
             });
             const printContent_l4 = `木皮:${content.color_title}`;
             printparamsJsonArray.push({
               PTK_DrawText_TrueType:
-                "100,320,60,0,微软雅黑,1,700,0,0,0," + printContent_l4,
+                "150,320,60,0,微软雅黑,1,700,0,0,0," + printContent_l4,
             });
             const printContent_l4_2 = `尺寸:${content.measure}`;
             printparamsJsonArray.push({
               PTK_DrawText_TrueType:
-                "100,250,60,0,微软雅黑,1,700,0,0,0," + printContent_l4_2,
+                "150,250,60,0,微软雅黑,1,700,0,0,0," + printContent_l4_2,
+            });
+            let space_str = '\u0000'
+             let printContent_l5_data=this.hexCharCodeToStr(content.chip);
+             printContent_l5_data = printContent_l5_data.replace(space_str,'')
+             const printContent_l5 = `芯片编码:${printContent_l5_data}`;
+            //  console.log(printContent_l5_data)
+            printparamsJsonArray.push({
+              PTK_DrawText_TrueTypeEx:
+                "1000,330,25,0,微软雅黑,1,700,0,0,0,10,0,0,0," + printContent_l5,
             });
             //下
             printparamsJsonArray.push({
               PTK_DrawText_TrueType:
-                "100,435,45,0,微软雅黑,1,700,0,0,0," + printContent_l1,
+                "150,435,45,0,微软雅黑,1,700,0,0,0," + printContent_l1,
             });
             printparamsJsonArray.push({
               PTK_DrawText_TrueType:
-                "600,435,45,0,微软雅黑,1,700,0,0,0," + printContent_l1_2,
+                "650,435,45,0,微软雅黑,1,700,0,0,0," + printContent_l1_2,
             });
             printparamsJsonArray.push({
               PTK_DrawText_TrueType:
-                "100,480,45,0,微软雅黑,1,700,0,0,0," + printContent_l2,
+                "150,480,45,0,微软雅黑,1,700,0,0,0," + printContent_l2,
             });
             printparamsJsonArray.push({
               PTK_DrawText_TrueType:
-                "600,480,45,0,微软雅黑,1,700,0,0,0," + printContent_l2_2,
+                "650,480,45,0,微软雅黑,1,700,0,0,0," + printContent_l2_2,
             });
             printparamsJsonArray.push({
               PTK_DrawText_TrueType:
-                "100,525,45,0,微软雅黑,1,700,0,0,0," + printContent_l3,
+                "150,525,45,0,微软雅黑,1,700,0,0,0," + printContent_l3,
             });
             printparamsJsonArray.push({
               PTK_DrawText_TrueType:
-                "600,525,45,0,微软雅黑,1,700,0,0,0," + printContent_l3_2,
+                "650,525,45,0,微软雅黑,1,700,0,0,0," + printContent_l3_2,
             });
             printparamsJsonArray.push({
               PTK_DrawText_TrueType:
-                "100,570,45,0,微软雅黑,1,700,0,0,0," + printContent_l4,
+                "150,570,45,0,微软雅黑,1,700,0,0,0," + printContent_l4,
             });
             printparamsJsonArray.push({
               PTK_DrawText_TrueType:
-                "600,570,45,0,微软雅黑,1,700,0,0,0," + printContent_l4_2,
+                "650,570,45,0,微软雅黑,1,700,0,0,0," + printContent_l4_2,
+            });
+              printparamsJsonArray.push({
+              PTK_DrawText_TrueTypeEx:
+                "1000,530,25,0,微软雅黑,1,700,0,0,0,10,0,0,0," + printContent_l5,
             });
             // 17,35 420
             printparamsJsonArray.push({
@@ -1855,6 +1869,21 @@ handleSelectionAll(){
         });
       });
     },
+     hexCharCodeToStr(hexCharCodeStr) {
+     let trimedStr = hexCharCodeStr.trim();
+     let rawStr = trimedStr.substr(0,2).toLowerCase() === "0x"?trimedStr.substr(2):trimedStr;
+     let len = rawStr.length;
+      if(len % 2 !== 0) {
+        alert("Illegal Format ASCII Code!");
+        return "";}
+       let curCharCode;
+       let resultStr = [];
+       for(var i = 0; i < len;i = i + 2) {
+        curCharCode = parseInt(rawStr.substr(i, 2), 16); // ASCII Code Value
+          resultStr.push(String.fromCharCode(curCharCode));
+       }
+       return resultStr.join("");
+},
     handlePrintChipsIp(contents, type) {
       this.axios.get("/api/get_print_url").then((res) => {
         let data = {};

+ 63 - 32
src/views/ChipPrintScreen/ChipPrintScreenCheck.vue

@@ -1116,12 +1116,13 @@ export default {
           });
         } else {
           contents.map((content) => {
+            console.log(content)
             //贝斯特打印格式
             //上
             const printContent_l1 = `项目:${content.client_name}`;
             printparamsJsonArray.push({
               PTK_DrawText_TrueType:
-                "100,40,60,0,微软雅黑,1,700,0,0,0," + printContent_l1,
+                "150,40,60,0,微软雅黑,1,700,0,0,0," + printContent_l1,
             });
             const printContent_l1_2 = `区域:${
               content.house ? content.house + "-" : ""
@@ -1130,70 +1131,85 @@ export default {
             }`;
             printparamsJsonArray.push({
               PTK_DrawText_TrueType:
-                "600,40,60,0,微软雅黑,1,700,0,0,0," + printContent_l1_2,
+                "650,40,60,0,微软雅黑,1,700,0,0,0," + printContent_l1_2,
             });
             const printContent_l2 = `房号:${content.number_detail}`;
             printparamsJsonArray.push({
               PTK_DrawText_TrueType:
-                "100,110,60,0,微软雅黑,1,700,0,0,0," + printContent_l2,
+                "150,110,60,0,微软雅黑,1,700,0,0,0," + printContent_l2,
             });
             const printContent_l2_2 = `产品:${content.product_title}`;
             printparamsJsonArray.push({
               PTK_DrawText_TrueType:
-                "600,110,60,0,微软雅黑,1,700,0,0,0," + printContent_l2_2,
+                "650,110,60,0,微软雅黑,1,700,0,0,0," + printContent_l2_2,
             });
             const printContent_l3 = `图号:${content.url_number}`;
             printparamsJsonArray.push({
               PTK_DrawText_TrueType:
-                "100,180,60,0,微软雅黑,1,700,0,0,0," + printContent_l3,
+                "150,180,60,0,微软雅黑,1,700,0,0,0," + printContent_l3,
             });
             const printContent_l3_2 = `部件:${content.part_title}`;
             printparamsJsonArray.push({
               PTK_DrawText_TrueType:
-                "600,180,60,0,微软雅黑,1,700,0,0,0," + printContent_l3_2,
+                "650,180,60,0,微软雅黑,1,700,0,0,0," + printContent_l3_2,
             });
             const printContent_l4 = `木皮:${content.color_title}`;
             printparamsJsonArray.push({
               PTK_DrawText_TrueType:
-                "100,320,60,0,微软雅黑,1,700,0,0,0," + printContent_l4,
+                "150,320,60,0,微软雅黑,1,700,0,0,0," + printContent_l4,
             });
             const printContent_l4_2 = `尺寸:${content.measure}`;
             printparamsJsonArray.push({
               PTK_DrawText_TrueType:
-                "100,250,60,0,微软雅黑,1,700,0,0,0," + printContent_l4_2,
+                "150,250,60,0,微软雅黑,1,700,0,0,0," + printContent_l4_2,
+            });
+            // const printContent_l5 = `芯片编码:${content.chip}`;
+            //  console.log(this.hexCharCodeToStr(content.chip))
+            let space_str = '\u0000'
+             let printContent_l5_data=this.hexCharCodeToStr(content.chip);
+             printContent_l5_data = printContent_l5_data.replace(space_str,'')
+             const printContent_l5 = `芯片编码:${printContent_l5_data}`;
+            //  console.log(printContent_l5_data)
+            printparamsJsonArray.push({
+              PTK_DrawText_TrueTypeEx:
+                "1000,330,25,0,微软雅黑,1,700,0,0,0,10,0,0,0," + printContent_l5,
             });
             //下
             printparamsJsonArray.push({
               PTK_DrawText_TrueType:
-                "100,435,45,0,微软雅黑,1,700,0,0,0," + printContent_l1,
+                "150,435,45,0,微软雅黑,1,700,0,0,0," + printContent_l1,
             });
             printparamsJsonArray.push({
               PTK_DrawText_TrueType:
-                "600,435,45,0,微软雅黑,1,700,0,0,0," + printContent_l1_2,
+                "650,435,45,0,微软雅黑,1,700,0,0,0," + printContent_l1_2,
             });
             printparamsJsonArray.push({
               PTK_DrawText_TrueType:
-                "100,480,45,0,微软雅黑,1,700,0,0,0," + printContent_l2,
+                "150,480,45,0,微软雅黑,1,700,0,0,0," + printContent_l2,
             });
             printparamsJsonArray.push({
               PTK_DrawText_TrueType:
-                "600,480,45,0,微软雅黑,1,700,0,0,0," + printContent_l2_2,
+                "650,480,45,0,微软雅黑,1,700,0,0,0," + printContent_l2_2,
             });
             printparamsJsonArray.push({
               PTK_DrawText_TrueType:
-                "100,525,45,0,微软雅黑,1,700,0,0,0," + printContent_l3,
+                "150,525,45,0,微软雅黑,1,700,0,0,0," + printContent_l3,
             });
             printparamsJsonArray.push({
               PTK_DrawText_TrueType:
-                "600,525,45,0,微软雅黑,1,700,0,0,0," + printContent_l3_2,
+                "650,525,45,0,微软雅黑,1,700,0,0,0," + printContent_l3_2,
             });
             printparamsJsonArray.push({
               PTK_DrawText_TrueType:
-                "100,570,45,0,微软雅黑,1,700,0,0,0," + printContent_l4,
+                "150,570,45,0,微软雅黑,1,700,0,0,0," + printContent_l4,
             });
             printparamsJsonArray.push({
               PTK_DrawText_TrueType:
-                "600,570,45,0,微软雅黑,1,700,0,0,0," + printContent_l4_2,
+                "650,570,45,0,微软雅黑,1,700,0,0,0," + printContent_l4_2,
+            });
+             printparamsJsonArray.push({
+              PTK_DrawText_TrueTypeEx:
+                "1000,530,25,0,微软雅黑,1,700,0,0,0,10,0,0,0," + printContent_l5,
             });
             // 17,35 420
             printparamsJsonArray.push({
@@ -1228,6 +1244,21 @@ export default {
         });
       });
     },
+  hexCharCodeToStr(hexCharCodeStr) {
+     let trimedStr = hexCharCodeStr.trim();
+     let rawStr = trimedStr.substr(0,2).toLowerCase() === "0x"?trimedStr.substr(2):trimedStr;
+     let len = rawStr.length;
+      if(len % 2 !== 0) {
+        alert("Illegal Format ASCII Code!");
+        return "";}
+       let curCharCode;
+       let resultStr = [];
+       for(var i = 0; i < len;i = i + 2) {
+        curCharCode = parseInt(rawStr.substr(i, 2), 16); // ASCII Code Value
+          resultStr.push(String.fromCharCode(curCharCode));
+       }
+       return resultStr.join("");
+},
     handleOk() {
       if (!this.selectedObj.isChoosed) {
         return this.$Message.warning("请选择数据");
@@ -1448,7 +1479,7 @@ export default {
             const printContent_l1 = `项目:${content.client_name}`;
             printparamsJsonArray.push({
               PTK_DrawText_TrueType:
-                "100,40,60,0,微软雅黑,1,700,0,0,0," + printContent_l1,
+                "300,40,60,0,微软雅黑,1,700,0,0,0," + printContent_l1,
             });
             const printContent_l1_2 = `区域:${
               content.house ? content.house + "-" : ""
@@ -1457,70 +1488,70 @@ export default {
             }`;
             printparamsJsonArray.push({
               PTK_DrawText_TrueType:
-                "600,40,60,0,微软雅黑,1,700,0,0,0," + printContent_l1_2,
+                "800,40,60,0,微软雅黑,1,700,0,0,0," + printContent_l1_2,
             });
             const printContent_l2 = `房号:${content.number_detail}`;
             printparamsJsonArray.push({
               PTK_DrawText_TrueType:
-                "100,110,60,0,微软雅黑,1,700,0,0,0," + printContent_l2,
+                "300,110,60,0,微软雅黑,1,700,0,0,0," + printContent_l2,
             });
             const printContent_l2_2 = `产品:${content.product_title}`;
             printparamsJsonArray.push({
               PTK_DrawText_TrueType:
-                "600,110,60,0,微软雅黑,1,700,0,0,0," + printContent_l2_2,
+                "800,110,60,0,微软雅黑,1,700,0,0,0," + printContent_l2_2,
             });
             const printContent_l3 = `图号:${content.url_number}`;
             printparamsJsonArray.push({
               PTK_DrawText_TrueType:
-                "100,180,60,0,微软雅黑,1,700,0,0,0," + printContent_l3,
+                "300,180,60,0,微软雅黑,1,700,0,0,0," + printContent_l3,
             });
             const printContent_l3_2 = `部件:${content.part_title}`;
             printparamsJsonArray.push({
               PTK_DrawText_TrueType:
-                "600,180,60,0,微软雅黑,1,700,0,0,0," + printContent_l3_2,
+                "800,180,60,0,微软雅黑,1,700,0,0,0," + printContent_l3_2,
             });
             const printContent_l4 = `木皮:${content.color_title}`;
             printparamsJsonArray.push({
               PTK_DrawText_TrueType:
-                "100,320,60,0,微软雅黑,1,700,0,0,0," + printContent_l4,
+                "300,320,60,0,微软雅黑,1,700,0,0,0," + printContent_l4,
             });
             const printContent_l4_2 = `尺寸:${content.measure}`;
             printparamsJsonArray.push({
               PTK_DrawText_TrueType:
-                "100,250,60,0,微软雅黑,1,700,0,0,0," + printContent_l4_2,
+                "300,250,60,0,微软雅黑,1,700,0,0,0," + printContent_l4_2,
             });
             //下
             printparamsJsonArray.push({
               PTK_DrawText_TrueType:
-                "100,435,45,0,微软雅黑,1,700,0,0,0," + printContent_l1,
+                "300,435,45,0,微软雅黑,1,700,0,0,0," + printContent_l1,
             });
             printparamsJsonArray.push({
               PTK_DrawText_TrueType:
-                "600,435,45,0,微软雅黑,1,700,0,0,0," + printContent_l1_2,
+                "800,435,45,0,微软雅黑,1,700,0,0,0," + printContent_l1_2,
             });
             printparamsJsonArray.push({
               PTK_DrawText_TrueType:
-                "100,480,45,0,微软雅黑,1,700,0,0,0," + printContent_l2,
+                "300,480,45,0,微软雅黑,1,700,0,0,0," + printContent_l2,
             });
             printparamsJsonArray.push({
               PTK_DrawText_TrueType:
-                "600,480,45,0,微软雅黑,1,700,0,0,0," + printContent_l2_2,
+                "800,480,45,0,微软雅黑,1,700,0,0,0," + printContent_l2_2,
             });
             printparamsJsonArray.push({
               PTK_DrawText_TrueType:
-                "100,525,45,0,微软雅黑,1,700,0,0,0," + printContent_l3,
+                "300,525,45,0,微软雅黑,1,700,0,0,0," + printContent_l3,
             });
             printparamsJsonArray.push({
               PTK_DrawText_TrueType:
-                "600,525,45,0,微软雅黑,1,700,0,0,0," + printContent_l3_2,
+                "800,525,45,0,微软雅黑,1,700,0,0,0," + printContent_l3_2,
             });
             printparamsJsonArray.push({
               PTK_DrawText_TrueType:
-                "100,570,45,0,微软雅黑,1,700,0,0,0," + printContent_l4,
+                "300,570,45,0,微软雅黑,1,700,0,0,0," + printContent_l4,
             });
             printparamsJsonArray.push({
               PTK_DrawText_TrueType:
-                "600,570,45,0,微软雅黑,1,700,0,0,0," + printContent_l4_2,
+                "800,570,45,0,微软雅黑,1,700,0,0,0," + printContent_l4_2,
             });
             // 17,35 420
             printparamsJsonArray.push({

+ 19 - 1
src/views/Dispatching/Dispatching.vue

@@ -31,9 +31,15 @@
           </Select>
         </FormItem>
         <FormItem label='图号:'>
-          <Select style="width:200px" v-model="searchData.url_number" multiple filterable :disabled='show'>
+          <Tooltip placement='top' max-width='600' transfer>
+          <Select style="width:200px" v-model="searchData.url_number" multiple filterable :disabled='show' :max-tag-count='1' >
+            <Option value='全部' label="全部" @click.native="total_choose"></Option>
             <Option :value="item" :label="item" v-for="(item,index) in urlNumberList" :key="index"></Option>
           </Select>
+          <div slot="content">
+            {{searchData.url_number.toString()}}
+          </div>
+          </Tooltip>
         </FormItem>
         <FormItem>
           <Button  type="primary" @click="initDataSearch">搜索</Button>
@@ -303,6 +309,18 @@ export default {
       })
   },
   methods: {
+    total_choose(){
+      console.log(this.urlNumberList)
+        if(this.searchData.url_number.indexOf('全部')>=0){
+                 
+               this.searchData.url_number = JSON.parse(JSON.stringify(this.urlNumberList))
+              this.searchData.url_number.unshift('全部')
+         
+        }else{
+          this.searchData.url_number = [];
+        }
+       
+    },
   initDataSearch(){
     if(this.searchData.residential_name&&this.searchData.order_no){
       this.url_number_type = false;

+ 118 - 0
src/views/HumanResources/attence.vue

@@ -0,0 +1,118 @@
+<template>
+    <div>
+        <Toptitle title="考勤表">
+            <slot name="titleButton">
+                     <Upload
+          style="display:inline"
+          name="your_file"
+          :show-upload-list="false"
+          :headers="headers"
+          :on-error="uploadError"
+          :on-success="uploadSuccess"
+          :action="$store.state.ip + '/api/check_work_import'"
+        >
+          <Button type="success" ghost icon="md-exit" style="margin-right:10px;"
+            >导入</Button
+          >
+        </Upload>
+            </slot>
+        </Toptitle>
+        <div style="height:80%;overflow:auto">
+        <Form style="display:flex;flex-wrap:wrap;margin:10px 0">
+            <FormItem label='年月' style="width:400px">
+                  <DatePicker type="month" placeholder="年/月" style="width: 130px" size='small' v-model="searchData.start_time"></DatePicker>
+              ~
+              <DatePicker type="month" placeholder="年/月" style="width: 130px" size='small' v-model="searchData.end_time"></DatePicker>
+            </FormItem>
+              <FormItem>
+                <Button type="primary"
+                  size="small"
+                  @click="init">搜索</Button>
+        </FormItem>
+        </Form>
+        <Table  
+        :data='tableData'
+    :columns='tableColumns'
+    :max-height='500'
+    border>
+       <template slot="set" slot-scope="{row}">
+           <a @click="goPageDetail(row)">详情</a>
+       </template>
+        </Table>
+        </div>
+           <div style="text-align:center">
+          <Page :page-size-opts="[10, 20, 30, 40,100]"
+                @on-page-size-change='changeSize'
+                @on-change='changePage'
+                :current='pageIndex'
+                show-total
+                :total="total"
+                show-sizer
+                :page-size='pageSize' />
+        </div>
+    </div>
+</template>
+<script>
+export default {
+    data(){
+        return{
+            headers: { Authorization: localStorage.getItem("token") },
+            pageSize:10,
+            pageIndex:1,
+            total:0,
+            searchData:{
+               start_time:'',
+               end_time:''
+            },
+            tableData:[],
+            tableColumns:[
+                {title:'年月',align:"center",key:'time'},
+                {title:'操作',align:'center',slot:'set',maxWidth:400}
+            ],
+        }
+    },
+    mounted(){
+      this.getData();
+    },
+    methods:{
+           uploadError(err) {
+      this.$Message.error(err.msg || "上传失败");
+    },
+       uploadSuccess(res) {
+      if (res.code == 200) {
+        this.$Message.success(res.msg || "上传成功");
+        this.getData();
+      } else {
+        this.$Message.warning(res.msg || "上传失败");
+      }
+    },
+        init(){
+          let data ={};
+          data = JSON.parse(JSON.stringify(this.searchData));
+          data.start_time = data.start_time?Date.parse(data.start_time).toString().slice(0,10):'';
+           data.end_time = data.end_time?Date.parse(data.end_time).toString().slice(0,10):'';
+         this.getData(data);
+        },
+        getData(row){
+          this.axios.get('/api/check_work_list',{params:{...row,page_size:this.pageSize,page_index:this.pageIndex}}).then(res=>{
+              this.tableData = res.data.data;
+              this.total = res.data.total;
+          })
+        },
+        goPageDetail(row){
+      this.$router.push({path:'/cms/HumanResources/attenceDetail',query:{...row}})
+        },
+        changeSize(e){
+           this.pageSize=e;
+           this.getData();
+        },
+        changePage(e){
+            this.pageIndex = e;
+            this.getData();
+        }
+    }
+}
+</script>
+<style lang="scss" scoped>
+
+</style>

+ 397 - 0
src/views/HumanResources/attenceDetail.vue

@@ -0,0 +1,397 @@
+<template>
+    <div>
+         <Toptitle title="考勤表">
+            <slot name="titleButton">
+                     <Upload
+          style="display:inline"
+          name="your_file"
+          :show-upload-list="false"
+          :data='uploadData'
+          :headers="headers"
+          :on-error="uploadError"
+          :on-success="uploadSuccess"
+          :action="$store.state.ip + '/api/check_work_import'"
+        >
+          <Button type="success" ghost icon="md-exit" style="margin-right:10px;"
+            >导入</Button
+          >
+        </Upload>
+            </slot>
+        </Toptitle>
+        <div style="height:90%;overflow:auto">
+        <h1 style="text-align:center">苏州倍思特木制品有限公司</h1>
+        <h6 style="text-align:center">{{$route.query.time?$route.query.time+'月':''}}考勤表</h6>
+        <Table 
+        style="margin-top:10px"
+        :data='tableData'
+         :columns='tableColumns'
+    :max-height='620'
+    border
+    :span-method="handleSpan"
+    disabled-hover
+        >
+            
+        </Table>
+        </div>
+    </div>
+</template>
+<script>
+export default {
+    data(){
+        return{
+            headers: { Authorization: localStorage.getItem("token") },
+            department:[],
+            tableData:[],
+           tableColumns:[
+              {
+                        title: '序号',
+                        key: 'index',
+                        align:'center',
+                        width:'60'
+                    },
+                    {
+                        title: '部门',
+                        key: 'section',
+                         align:'center',
+                        width:'60'
+                    },
+                     {
+                        title: '姓名',
+                        key: 'user',
+                         align:'center',
+                        width:'100'
+                    },
+                    {
+                        title: '编号',
+                        key: 'number',
+                         align:'center',
+                        width:'100'
+                    },
+                    {
+                        title: '类别',
+                        key: 'state',
+                         align:'center',
+                        width:'80',
+                       render:(h,params)=>{
+                            const {row} = params;
+                            return h('span',{},row.state==0?'白班':'加班')
+                       }
+                    },
+                     {
+                        title: '1',
+                        key: '1',
+                         align:'center',
+                        width:'60'
+                    },
+                     {
+                        title: '2',
+                        key: '2',
+                         align:'center',
+                        width:'60'
+                    },
+                     {
+                        title: '3',
+                        key: '3',
+                         align:'center',
+                        width:'60'
+                    },
+                     {
+                        title: '4',
+                        key: '4',
+                         align:'center',
+                        width:'60'
+                    },
+                     {
+                        title: '5',
+                        key: '5',
+                         align:'center',
+                        width:'60'
+                    },
+                     {
+                        title: '6',
+                        key: '6',
+                         align:'center',
+                        width:'60'
+                    },
+                     {
+                        title: '7',
+                        key: '7',
+                         align:'center',
+                        width:'60'
+                    },
+                     {
+                        title: '8',
+                        key: '8',
+                         align:'center',
+                        width:'60'
+                    },
+                     {
+                        title: '9',
+                        key: '9', 
+                        align:'center',
+                        width:'60'
+                    },
+                     {
+                        title: '10',
+                        key: '10',
+                         align:'center',
+                        width:'60'
+                    },
+                     {
+                        title: '11',
+                        key: '11',
+                         align:'center',
+                        width:'60'
+                    },
+                     {
+                        title: '12',
+                        key: '12',
+                         align:'center',
+                        width:'60'
+                    },
+                     {
+                        title: '13',
+                        key: '13',
+                         align:'center',
+                        width:'60'
+                    },
+                     {
+                        title: '14',
+                        key: '14',
+                         align:'center',
+                        width:'60'
+                    },
+                     {
+                        title: '15',
+                        key: '15',
+                         align:'center',
+                        width:'60'
+                    },
+                     {
+                        title: '16',
+                        key: '16',
+                         align:'center',
+                        width:'60'
+                    },
+                     {
+                        title: '17',
+                        key: '17',
+                         align:'center',
+                        width:'60'
+                    },
+                     {
+                        title: '18',
+                        key: '18',
+                         align:'center',
+                        width:'60'
+                    },
+                     {
+                        title: '19',
+                        key: '19',
+                         align:'center',
+                        width:'60'
+                    },
+                     {
+                        title: '20',
+                        key: '20',
+                         align:'center',
+                        width:'60'
+                    },
+                     {
+                        title: '21',
+                        key: '21',
+                         align:'center',
+                        width:'60'
+                    },
+                     {
+                        title: '22',
+                        key: '22',
+                         align:'center',
+                        width:'60'
+                    },
+                     {
+                        title: '23',
+                        key: '23',
+                         align:'center',
+                        width:'60'
+                    },
+                     {
+                        title: '24',
+                        key: '24',
+                         align:'center',
+                        width:'60'
+                    },
+                     {
+                        title: '25',
+                        key: '25',
+                         align:'center',
+                        width:'60'
+                    },
+                     {
+                        title: '26',
+                        key: '26',
+                         align:'center',
+                        width:'60'
+                    },
+                     {
+                        title: '27',
+                        key: '27',
+                         align:'center',
+                        width:'60'
+                    },
+                     {
+                        title: '28',
+                        key: '28',
+                         align:'center',
+                        width:'60'
+                    },
+                     {
+                        title: '29',
+                        key: '29',
+                         align:'center',
+                        width:'60'
+                    },
+                     {
+                        title: '30',
+                        key: '30',
+                         align:'center',
+                        width:'60'
+                    },
+                     {
+                        title: '31',
+                        key: '31',
+                         align:'center',
+                        width:'60'
+                    },
+                     {
+                        title: '合计',
+                        key: 'total',
+                         align:'center',
+                        width:'80'
+                    },
+                     {
+                        title: '出勤天数',
+                        key: 'work_date',
+                         align:'center',
+                        width:'100'
+                    },
+                     {
+                        title: '加班时间',
+                        key: 'over_time',
+                         align:'center',
+                        width:'100'
+                     }
+            ],
+        }
+    },
+    computed:{
+        uploadData(){
+            return {year:this.$route.query.year,
+            month:this.$route.query.month}},
+    },
+    mounted(){
+       this.getData();
+    },
+    methods:{
+          uploadError(err) {
+      this.$Message.error(err.msg || "上传失败");
+    },
+       uploadSuccess(res) {
+      if (res.code == 200) {
+        this.$Message.success(res.msg || "上传成功");
+        this.getData();
+      } else {
+        this.$Message.warning(res.msg || "上传失败");
+      }
+    },
+        getData(){
+           this.axios.get('/api/check_work_detail',{params:{year:this.$route.query.year,month:this.$route.query.month}}).then(res=>{
+               let arr =[];
+               res.data.forEach((element,index) => {
+                   if(index%2==0){
+                       res.data[index].over_time=res.data[index+1].total
+                   }
+                   if(arr.indexOf(element.section)<0){
+                       arr.push(element.section);
+                   }
+               });
+               arr.forEach(v=>{
+                   let obj =[];
+                  res.data.forEach((m,idx)=>{
+                     if(m.section == v){
+                         obj.push(idx)
+                     }
+                  })
+                  this.department.push(obj);
+               })
+               console.log(this.department)
+               this.department.forEach(v=>{
+                  v.forEach(item=>{
+                      res.data[item].start = v[0];
+                      res.data[item].end = v[v.length-1]+1;
+                      res.data[item].cut_num = v.length;
+                  })
+               })
+                this.tableData = res.data;
+               console.log(this.tableData)
+           })
+        },
+           handleSpan ({ row, column, rowIndex, columnIndex }) {
+                // if (rowIndex === 0 && columnIndex === 0) {
+                //     return [1, 3];
+                // } else if (rowIndex === 0 && columnIndex === 3) {
+                //     return  [0, 0];
+                // }
+                if (rowIndex%2==0 && (columnIndex === 0||columnIndex ===2||columnIndex ===3||columnIndex ===37||columnIndex ===38)) {
+                    return {
+                        rowspan: 2,
+                        colspan: 1
+                    };
+                } else if (!rowIndex%2==0 && (columnIndex === 0||columnIndex ===2||columnIndex ===3||columnIndex ===37||columnIndex ===38)) {
+                    return {
+                        rowspan: 0,
+                        colspan: 0
+                    };
+                }
+                // this.department.forEach(v=>{
+                //     if(columnIndex ===1 && rowIndex ===v[0]){
+                //     return{
+                //         rowspan:v.length,
+                //         colspan:1
+                //     }
+                // } else if(columnIndex ===1&&rowIndex<v[v.length-1]+1){
+                // return {
+                //         rowspan: 0,
+                //         colspan: 0
+                //     };
+                // }
+                // })
+                if(columnIndex ===1 && rowIndex ===row.start){
+                    return{
+                        rowspan:row.cut_num,
+                        colspan:1
+                    }
+                } else if(columnIndex ===1&&rowIndex<row.end){
+                return {
+                        rowspan: 0,
+                        colspan: 0
+                    };
+                }
+        //       if(columnIndex ===1 && rowIndex ===12){
+        //             return{
+        //                 rowspan:10,
+        //                 colspan:1
+        //             }
+        //         } else if(columnIndex ===1&&rowIndex<22){
+        //         return {
+        //                 rowspan: 0,
+        //                 colspan: 0
+        //             };
+        //         }
+           }
+    }
+}
+</script>
+<style lang="scss" scoped>
+
+</style>

+ 131 - 51
src/views/OrderMannage/BusinessOrderlist/edit.vue

@@ -773,10 +773,10 @@
           </vxe-column>
           <vxe-column title="门头板" min-width="100" :edit-render="{}">
             <template #default="{row,rowIndex}">
-             <div v-if="row.hasOwnProperty('addMTB')">
-             <span v-show="tableData[rowIndex].addMTB">是</span>
-            
-              <span v-show="!tableData[rowIndex].addMTB||!tableData[rowIndex].hasOwnProperty('addMTB')">否</span></div>
+             
+             <span v-if="row.hasOwnProperty('addMTB')&&tableData[rowIndex].addMTB">是</span>
+             <span v-else>否</span>
+              <!-- <span v-show="!tableData[rowIndex].addMTB||!tableData[rowIndex].hasOwnProperty('addMTB')">否</span> -->
               <!-- {{
                 scope.row.part.filter(
                   (v) => v.part_title && v.part_title.indexOf("门头板")
@@ -868,7 +868,7 @@
                     label-in-value
                     size="small"
                     v-model="ext_detail.id"
-                    @on-change="(e) => changeEditExt(ext_detail, e, scope.row)"
+                    @on-change="(e) => changeEditExt(ext_detail, e, scope.row,scope.row.extArray,idx)"
                     style="width: 100px"
                   >
                     <Option
@@ -953,7 +953,10 @@
               <span v-else></span>
             </template>
           </vxe-column>
-          <vxe-column field="over_price" title="超标金额" min-width="40">
+          <vxe-column title="超标金额" min-width="40">
+             <template #default="scope"
+              >{{ scope.row.over_price_total }}
+            </template>
           </vxe-column>
           <vxe-column title="总金额" min-width="60">
             <template #default="scope"
@@ -1570,7 +1573,7 @@
                       @on-change="
                         (e) => handleProductOver_priceChange(e, modalData)
                       "
-                      v-model="modalData.over_price"
+                      v-model="modalData.over_price_total"
                       style="width: 120px"
                       placeholder="自动带出"
                     />
@@ -1732,7 +1735,7 @@
                   :label-width="50"
                 >
                   <FormItem
-                    :label-width="element.isBP ? 1 : 50"
+                    :label-width="element.isBP ? 1 : 30"
                     v-show="!element.is_metal"
                   >
                     <Radio
@@ -1879,6 +1882,43 @@
                       </Select>
                     </Tooltip>
                   </FormItem>
+                        <div v-show="element.addMTB" style="margin-left:40px">
+                      <FormItem label="数量">
+                        <Input
+                          size="small"
+                          @on-focus='numFocus(idx)'
+                          @on-change='changeNum(element, idx, modalData)'
+                          v-model="element.MTBnum"
+                          style="width: 80px"
+                        />
+                      </FormItem>
+                      <FormItem label="面积(m²)" :label-width='80'>
+                        <Input
+                            @on-change='changeNum(element, idx, modalData)'
+                          size="small"
+                          v-model="element.MTBsize"
+                          style="width: 80px"
+                        />
+                      </FormItem>
+                      <FormItem label="单价">
+                        <Input
+                        @on-focus='priceFocus(idx)'
+                        @on-change='changeNum(element, idx, modalData)'
+                          size="small"
+                          v-model="element.MTBprice"
+                          style="width: 80px"
+                        />
+                      </FormItem>
+                      <FormItem label="金额">
+                        <Input
+                        disabled
+                          class="price"
+                          size="small"
+                          v-model="element.MTBtotal"
+                          style="width: 80px;"
+                        />
+                      </FormItem>
+                    </div>
                   <FormItem v-show="!element.is_metal">
                     <Button
                       @click="handlePartsApart(element, idx, modalData.part)"
@@ -1921,7 +1961,7 @@
                     ]"
                     :data-index="idx"
                   >
-                    <div v-show="element.addMTB" style="padding-left:46px">
+                    <!-- <div v-show="element.addMTB" style="padding-left:46px">
                       <FormItem label="数量">
                         <Input
                           size="small"
@@ -1957,7 +1997,7 @@
                           style="width: 80px;"
                         />
                       </FormItem>
-                    </div>
+                    </div> -->
                     <FormItem>
                       <div
                         v-for="(ele, idx) in element.part_detail"
@@ -2694,7 +2734,7 @@ export default {
         arr.ext_price = this.ext_sum*1 + this.MTBtotal*1; 
         arr.price =
         (arr.unit_price * 1 || 0) * (arr.num * 1 || 1) +
-        (arr.over_price * 1 || 0) +
+        (arr.over_price_total * 1 || 0) +
         (arr.ext_price * 1 || 0);
       arr.price = arr.price.toFixed(2);
         this.$forceUpdate();
@@ -2827,7 +2867,7 @@ export default {
       let _save_metal = this.tableData.filter(
         (v) => v.is_metal && v.product_id
       );
-      // console.log(_save_metal)
+     
       _save_metal.length > 0 &&
         _save_metal.map((v) => {
           v.type = 1;
@@ -2885,6 +2925,13 @@ export default {
         console.log(e);
       }
       let params = { ...sendData, product: sendList, renovation_type: 2 };
+      params.product.forEach(v=>{
+        v.part.forEach(m=>{
+          m.part_detail.forEach(s=>{
+            s.total_num = v.total_num
+          })
+        })
+      })
       this.axios.post("/api/order_save_new", params).then((res) => {
         if (res.code == 200) {
           this.$Message.success(res.msg);
@@ -2912,7 +2959,7 @@ export default {
           this.tableData.forEach((element) => {
             //表格编辑用数据
             element.select_all_id = element.product_id + "_1";
-            element.num_temp_save = element.num || 1;
+            element.num_temp_save = ((element.num*1)/(element.total_num*1)) || 1;
             if (element.ext.length > 0) {
               element.ext.map((v, k) => {
                 if (v.type == 2) {
@@ -3109,6 +3156,7 @@ export default {
       this.showEditProduct = false;
     },
     handleSubmit(name) {
+      console.log(1)
       this.$refs[name].validate((valid) => {
         if (valid) {
           this.debounce(500);
@@ -3232,11 +3280,11 @@ export default {
     },
     // 合计 、 线条 统计价格
     handleCalcCount(type) {
-      console.log(this.tableData,1);
       let sum = 0;
       this.parts_title_count = [];
       this.wood_title_count = [];
       let total_line_unit = "";
+      console.log(this.tableData)
       this.tableData.forEach((element) => {
         sum += element.price * 1;
         if (!element.is_metal) {
@@ -3249,13 +3297,14 @@ export default {
                 );
                 if (temp && temp.length > 0) {
                   this.parts_title_count.map((v) => {
-                    v.title == elem.title && v.num++;
+                    v.title == elem.title && (v.num=v.num*1+element.total_num*1);
                   });
                 } else {
+                  console.log(elem)
                   this.parts_title_count.push({
                     change_id: elem.change_id,
                     title: elem.title,
-                    num: elem.num || 1,
+                    num: element.total_num*1||1,
                     unit: elem.unit,
                   });
                 }
@@ -3420,6 +3469,18 @@ export default {
     },
     handleExtraDele(array, row, index, modalData) {
       array.splice(index, 1);
+      if(array.length==0){
+         array.push({
+        num: 0,
+        price: 0,
+        total_price: 0,
+        type:2,
+        remark: "",
+        title: "",
+        id: "",
+        is_metal: true,
+      });
+      }
       this.handleTotalPriceCalc(row, modalData);
       this.handleCalcCount();
       this.$forceUpdate();
@@ -3444,7 +3505,6 @@ export default {
       this.support_remark.push(val);
     },
     handleMTBClick(row) {
-      console.log(row)
       row.addMTB = true;
       const _obj = {
         is_metal: false,
@@ -3479,7 +3539,6 @@ export default {
           },
         ],
       };
-      console.log(this.process_obj)
       _obj.process = JSON.parse(JSON.stringify(this.process_obj))
       row.part.push(_obj);
       this.$forceUpdate();
@@ -3691,7 +3750,7 @@ export default {
       // 金额=(产品单价)*核算数量+超标金额+附加金额
       modalData.price =
         (modalData.unit_price * 1 || 0) * (modalData.num * 1 || 1) +
-        (modalData.over_price * 1 || 0) +
+        (modalData.over_price_total * 1 || 0) +
         (modalData.ext_price * 1 || 0);
       modalData.price = modalData.price.toFixed(2);
       // 获取产品 type_name
@@ -3974,6 +4033,7 @@ export default {
           type_name: "", //展示用产品名称
           position: "", //位置
           over_price: "", //超标单价
+          over_price_total:"",//超标总价
           unit_price: "", //单价
           ext_price: "", //附加金额
           price: "", //总金额
@@ -4082,7 +4142,6 @@ export default {
             this.showEditProduct = true;
             // }
           }
-          console.log(this.modalData.part)
           break;
         case 3:
           this.$Modal.confirm({
@@ -4251,7 +4310,7 @@ export default {
       item.ext_price = this.ext_sum +this.MTBtotal*1;
       item.price =
         (item.unit_price * 1 || 0) * (item.num * 1 || 1) +
-        (item.over_price * 1 || 0) +
+        (item.over_price_total * 1 || 0) +
         (item.ext_price * 1 || 0);
       item.price = item.price.toFixed(2);
       this.$forceUpdate();
@@ -4268,7 +4327,7 @@ export default {
       item.ext_price = this.ext_sum +this.MTBtotal*1;
       item.price =
         (item.unit_price * 1 || 0) * (item.num * 1 || 1) +
-        (item.over_price * 1 || 0) +
+        (item.over_price_total * 1 || 0) +
         (item.ext_price * 1 || 0);
       item.price = item.price.toFixed(2);
       this.$forceUpdate();
@@ -4284,7 +4343,6 @@ export default {
       this.$forceUpdate();
     },
     handlePartsDele(element, index, array) {
-    
     //   let data = JSON.parse(JSON.stringify(this.tableData));
     //   data.splice(data.length-1,1);
     //   let state = false;
@@ -4299,13 +4357,14 @@ export default {
      
     //    if(state){
         
-    //      this.tableData[0].addMTB = false;
-    //       console.log(this.tableData)
+    //      this.tableData[idx].addMTB = false;
+    //       console.log(this.tableData[idx])
     //    }
     //  })
+    array.addMTB = false;
       array.part.splice(index, 1);
-      this.handleCalcCount();
-      this.$forceUpdate();
+      // this.handleCalcCount();
+      // this.$forceUpdate();
     },
     handleProductPositionChange(item, e) {
       item.position = e.target.value;
@@ -4340,7 +4399,7 @@ export default {
         modalData.ext_price = sum*1;
         modalData.price =
           (modalData.unit_price * 1 || 0) * (modalData.num * 1 || 1) +
-          (modalData.over_price * 1 || 0) +
+          (modalData.over_price_total * 1 || 0) +
           (modalData.ext_price * 1 || 0);
         modalData.price = modalData.price.toFixed(2);
       }
@@ -4408,6 +4467,7 @@ export default {
       this.handleCalcCount();
     },
     changeEditTotalNum(e, row) {
+      console.log(1)
       row.isEdit = true;
       this.handleProductNumChange(e, row);
     },
@@ -4415,15 +4475,22 @@ export default {
       row.isEdit = true;
       this.handleCalcCount();
     },
-    changeEditExt(row, e, item) {
+    changeEditExt(row, e, item,arr,idx) {
       if (e) {
         item.isEdit = true;
         row.ext_id = e.value;
         this.handleExtChange(row, e, item);
       } else {
+
         row.ext_id = "";
         row.title = "";
         this.handleCalcCount();
+        this.handleExtraDele(
+                        arr,
+                        row,
+                        idx,
+                       item
+                      )
       }
     },
     changeEditPart(row, part_type, part_detail, e, rowIndex) {
@@ -4456,6 +4523,7 @@ export default {
             type_name: "", //展示用产品名称
             position: row.position, //位置
             over_price: "", //超标单价
+            over_price_total:'',//超标总价
             unit_price: "", //单价
             ext_price: "", //附加金额
             price: "", //总金额
@@ -4531,6 +4599,7 @@ export default {
       //   })
       //   console.log(this.lineData)
       }
+      console.log(this.parts_title_count)
     },
     changeEditTableData(row, rowIndex, $event, scope) {
       const isCopied = row.isCopied || false;
@@ -4545,7 +4614,7 @@ export default {
             custom_id: this.info.custom_id,
           },
         }).then((res) => {
-          console.log(res)
+
           this.process_match_list = res.data.process.list;
           this.process_all_list = res.data.process_list;
           this.support_remark = Array.from(
@@ -4572,7 +4641,7 @@ export default {
           // 金额=(产品单价)*核算数量 +附加金额 + 超标金额
           row.price =
             (row.unit_price * 1 || 0) * (row.num * 1 || 1) +
-            (row.over_price * 1 || 0) +
+            (row.over_price_total * 1 || 0) +
             (row.ext_price * 1 || 0);
           row.price = row.price.toFixed(2);
           row.selected_ids = [];
@@ -4722,6 +4791,7 @@ export default {
             this.modalData.unit_price = res.data.price || 0;
             this.modalData.num = res.data.num || 1;
             this.modalData.over_price = res.data.over_price || 0;
+            this.modelData.over_price_total = res.data.over_price*res.data.total_num*1 ||0;
             this.modalData.unit = res.data.unit || "";
             this.modalData.remark = res.data.remark || "";
             this.modalData.url_number = res.data.url_number || "";
@@ -4735,7 +4805,7 @@ export default {
             this.modalData.price =
               (this.modalData.unit_price * 1 || 0) *
                 (this.modalData.num * 1 || 1) +
-              (this.modalData.over_price * 1 || 0) +
+              (this.modalData.over_price_total * 1 || 0) +
               (this.modalData.ext_price * 1 || 0);
             this.modalData.price = this.modalData.price.toFixed(2);
             // this.modalData.model = res.data.model || ''
@@ -4915,6 +4985,7 @@ export default {
             this.modalData.num = res.data.num || 1;
             this.modalData.num_temp_save = res.data.num || 1;
             this.modalData.over_price = res.data.over_price || 0;
+            this.modalData.over_price_total = res.data.over_price*res.data.total_num*1 || 0;
             this.modalData.unit = res.data.unit || "";
             this.modalData.remark = res.data.remark || "";
             this.modalData.url = res.data.url || [];
@@ -5039,7 +5110,7 @@ export default {
             elem.org_num = elem.num;
             elem.material_detail_org_num = elem.num || 0;
             elem.num =
-              ((elem.material_detail_org_num || elem.num) * product_num) | 0;
+              ((elem.material_detail_org_num || elem.num) * product_num) || 0;
             elem.material_detail_num =
               elem.material_detail_org_num * product_num;
           });
@@ -5156,6 +5227,7 @@ export default {
       this.$forceUpdate();
     },
     handleProductNumChange(e, product) {
+      console.log(product);
       product.part.map((element) => {
         element.part_detail.map((elem) => {
           elem.material_detail_num =
@@ -5163,13 +5235,14 @@ export default {
         });
       });
       product.total_num = e.target.value;
-      product.num = (product.total_num * product.num_temp_save).toFixed(2);
+      product.num = (product.total_num*1*product.num_temp_save*1).toFixed(2);
+      product.over_price_total = (product.total_num*1*product.over_price).toFixed(2);
       product.price =
         (product.unit_price * 1 || 0) * (product.num * 1 || 1) +
-        (product.over_price * 1 || 0) +
+        (product.over_price_total * 1 || 0) +
         (product.ext_price * 1 || 0);
       product.price = product.price.toFixed(2);
-      this.
+      this.handleCalcCount();
       this.$forceUpdate();
     },
     changeExtPrice(e, product){
@@ -5177,7 +5250,7 @@ export default {
   product.ext_price = e.target.value * 1;
       product.price =
         (product.unit_price * 1 || 0) * (product.num * 1 || 1) +
-        (product.over_price * 1 || 0) +
+        (product.over_price_total * 1 || 0) +
         (product.ext_price * 1 || 0);
       product.price = product.price.toFixed(2);
       this.handleCalcCount();
@@ -5187,7 +5260,7 @@ export default {
       product.unit_price = e.target.value * 1;
       product.price =
         (product.unit_price * 1 || 0) * (product.num * 1 || 1) +
-        (product.over_price * 1 || 0) +
+        (product.over_price_total * 1 || 0) +
         (product.ext_price * 1 || 0);
       product.price = product.price.toFixed(2);
       this.handleCalcCount();
@@ -5198,16 +5271,16 @@ export default {
       product.ext_price = e.target.value * 1;
       product.price =
         (product.unit_price * 1 || 0) * (product.num * 1 || 1) +
-        (product.over_price * 1 || 0) +
+        (product.over_price_total * 1 || 0) +
         (product.ext_price * 1 || 0);
       product.price = product.price.toFixed(2);
       this.$forceUpdate();
     },
     handleProductOver_priceChange(e, product) {
-      product.over_price = e.target.value * 1;
+      product.over_price_total = e.target.value * 1;
       product.price =
         (product.unit_price * 1 || 0) * (product.num * 1 || 1) +
-        (product.over_price * 1 || 0) +
+        (product.over_price_total * 1 || 0) +
         (product.ext_price * 1 || 0);
       product.price = product.price.toFixed(2);
       this.$forceUpdate();
@@ -5343,10 +5416,11 @@ export default {
                           part_arr.part_detail &&
                           part_arr.part_detail.map((v) => {
                             if (v.part_detail_id == k) {
+                              console.log(v,3)
                               v.material_detail_id =
                                 match_item.material_detail_id;
-                              v.material_detail_org_num = match_item.num;
-                              v.material_detail_num = match_item.num;
+                              v.material_detail_org_num = match_item.num*product.total_num*1;
+                              v.material_detail_num = match_item.num*product.total_num*1;
                             }
                           });
                       }
@@ -5361,10 +5435,11 @@ export default {
                           part_arr.part_detail &&
                           part_arr.part_detail.map((v) => {
                             if (v.part_detail_id == k) {
+                              console.log(v,1)
                               v.material_detail_id =
                                 match_item.material_detail_id;
-                              v.material_detail_org_num = match_item.num;
-                              v.material_detail_num = match_item.num;
+                              v.material_detail_org_num = match_item.num*product.total_num*1;
+                              v.material_detail_num = match_item.num*product.total_num*1;
                             }
                           });
                       }
@@ -5379,9 +5454,10 @@ export default {
                       part_arr.part_detail &&
                       part_arr.part_detail.map((v) => {
                         if (v.part_detail_id == k) {
+                           console.log(product,2)
                           v.material_detail_id = match_item.material_detail_id;
-                          v.material_detail_org_num = match_item.num;
-                          v.material_detail_num = match_item.num;
+                          v.material_detail_org_num = match_item.num*product.total_num*1;
+                          v.material_detail_num = match_item.num*product.total_num*1;
                         }
                       });
                   }
@@ -5631,12 +5707,16 @@ export default {
           });
           product.num = eval(product.num_formula_temp);
         }
-        product.num = Number(product.num).toFixed(2);
-        product.over_price = Number(product.over_price).toFixed(2);
-        product.num_temp_save = product.num || 1;
+        console.log(product,1234)
+      
+        // product.over_price = Number(product.over_price*product.total_num*1).toFixed(2);
+        // product.save_over_price = JSON.parse(JSON.stringify(product.over_price*1/product.total_num*1));
+        product.num_temp_save = product.num*1 || 1;
+        product.num = (Number(product.num)*(product.total_num*1)).toFixed(2);
+         product.over_price_total = (product.total_num*1*product.over_price).toFixed(2);
         product.price =
           (product.unit_price * 1 || 0) * (product.num * 1 || 1) +
-          (product.over_price * 1 || 0) +
+          (product.over_price_total * 1 || 0) +
           (product.ext_price * 1 || 0);
         product.price = product.price.toFixed(2);
       }

+ 1 - 0
src/views/ProductionOrderList/Deliverylist/DeliveryDetail.vue

@@ -256,6 +256,7 @@ export default {
           key: "product_title",
         },
         { title: "图号", align: "center", minWidth: 200, key: "url_number" },
+        { title: "组合名称", align: "center", minWidth: 200, key: "compose_name" },
         { title: "部件", align: "center", minWidth: 200, key: "part_title" },
         {
           title: "零部件",

+ 3 - 0
src/views/ProductionOrderList/Deliverylist/Deliverylist.vue

@@ -442,7 +442,10 @@ export default {
            
             data.push(obj);
           })
+         
           this.set_list[4].option = data;
+          this.url_number_list = data;
+           console.log(this.set_list[4].option)
         }
       });
     },

+ 10 - 0
src/views/ProductionOrderList/InboundForm/details.vue

@@ -243,6 +243,8 @@ export default {
         {
           title: "产品",
           name: "Select",
+            multiple: true,
+          filterable: true,
           serverName: "product",
           placeholder: "请选择产品",
           value: "",
@@ -251,6 +253,8 @@ export default {
         {
           title: "图号",
           name: "Select",
+            multiple: true,
+          filterable: true,
           serverName: "url_number",
           placeholder: "请选择产品",
           value: "",
@@ -259,6 +263,8 @@ export default {
         {
           title: "部件",
           name: "Select",
+            multiple: true,
+          filterable: true,
           serverName: "part",
           placeholder: "请选择部件",
           value: "",
@@ -312,6 +318,7 @@ export default {
           key: "product_title",
         },
         { title: "图号", align: "center", minWidth: 200, key: "url_number" },
+         { title: "组合名称", align: "center", minWidth: 200, key: "compose_name" },
         { title: "部件", align: "center", minWidth: 200, key: "part_title" },
         {
           title: "零部件",
@@ -510,6 +517,9 @@ export default {
       if (this.func.isType(row.part) == "Array") {
         row.part = row.part.join(",");
       }
+      if (this.func.isType(row.url_number) == "Array") {
+        row.url_number = row.url_number.join(",");
+      }
       Object.assign(row, this.$route.query);
       this.proxyObj = row;
       this.getData(row);

+ 28 - 2
src/views/ProductionOrderList/ProductionPlanlist/BST_two.vue

@@ -8,9 +8,12 @@
       @selectTable="selectTable"
       @changePage="changePage"
       @changeSize="changeSize"
+      @changeSelected='tooltip_change'
+      @total_choose='total_choose'
       :tableColums="computedTable"
       :tableData="tableData"
       :showPage="false"
+      :tooltip_data='tooltip_data'
       :page_index="page_index"
       :loading="loading"
       :total="total"
@@ -125,6 +128,8 @@ import { mapState } from "vuex";
 export default {
   data() {
     return {
+      url_number:[],
+      tooltip_data:'',
       loading: true,
       url_number_list:[],
         tableModalColumns: [
@@ -529,10 +534,13 @@ export default {
         },
         {
           title: "图号",
+          isTooltip:true,
+          width:'160',
+          change:true,
           name: "Select",
           serverName: "url_number",
           placeholder: "请选择",
-          value: "",
+          value: this.url_number,
           optionName: "title",
           optionValue: "title",
           option: this.url_number_list,
@@ -604,6 +612,23 @@ export default {
     },
   },
   methods: {
+    total_choose(e){
+      let data=[];
+     if(e[2].value.indexOf('全选')>=0){
+        e[2].option.forEach(v=>{
+          data.push(v.title)
+        })
+        data.unshift('全选')
+         this.set_list[2].value = data;
+        this.url_number = data;
+     }else{
+       this.set_list[2].value = [];
+       this.url_number = [];
+     }
+    },
+    tooltip_change(e){
+          this.tooltip_data = e[2].value.toString();
+    },
     handleModalOk(){
         this.formModalTableData.forEach((element, index) => {
         element.sort = index;
@@ -704,7 +729,8 @@ export default {
            obj.title =v;
            data.push(obj)
           })
-          this.url_number_list = data
+          this.url_number_list = data;
+          // this.url_number_list.unshift({title:'全选'})
           this.loading = false;
         }
       );

+ 1 - 1
src/views/ProductionOrderList/ProductionPlanlist/list.vue

@@ -1,5 +1,5 @@
 <template>
-  <div>
+  <div >
     
     <BSTTwo v-if="true"/>
     <typeOne v-else/>

+ 24 - 5
src/views/ProductionOrderList/ProductionsOrder/BST_Decorationlist.vue

@@ -592,12 +592,23 @@ export default {
         //   ],
         // },
         {
-          title: "部件状态",
+          title: "排产状态",
           name: "Select",
           value: "",
           change: true,
           serverName: "part_state",
           option: [
+            { label: "未下排产", value: 0 },
+            { label: "已下排产", value: 1 },
+          ],
+        },
+        {
+          title: "计划状态",
+          name: "Select",
+          value: "",
+          change: true,
+          serverName: "plan_state",
+          option: [
             { label: "未下计划", value: 0 },
             { label: "已下计划", value: 1 },
           ],
@@ -752,11 +763,18 @@ export default {
         //     h("span", {}, params.row.sub_is_tag == 0 ? "否" : "是"),
         // },
         {
-          title: "部件状态",
+          title: "排产状态",
+          align: "center",
+          minWidth: 120,
+          render: (h, params) =>
+            h("span", {}, params.row.part_state == 0 ? "未下排产" : "已下排产"),
+        },
+          {
+          title: "计划状态",
           align: "center",
           minWidth: 120,
           render: (h, params) =>
-            h("span", {}, params.row.part_state == 0 ? "未下计划" : "已下计划"),
+            h("span", {}, params.row.plan_state == 0 ? "未下计划" : "已下计划"),
         },
         {
           title: "预估完工工期",
@@ -991,7 +1009,8 @@ export default {
       console.log(arr);
         this.axios.post('/api/ext_product_pr_plan',{order_no:this.$route.query.order_no,id,type:{...arr}}).then(res=>{
            if(res.code==200){
-             this.$Message.success(res.msg)
+             this.$Message.success(res.msg);
+             this.getData(this.proxyObj);
            }
         })
     },
@@ -1091,7 +1110,7 @@ switch(e){
           this.list[2].option = res.data.layer;
           this.list[3].option = res.data.number_detail;
           this.list[4].option = res.data.part;
-          this.list[8].option = res.data.img_number;
+          this.list[9].option = res.data.img_number;
         }
       );
     },

+ 4 - 2
src/views/PurchasingManage/ArrivalOrder/edit.vue

@@ -61,6 +61,7 @@
                  size="small"
                  v-model="searchData.supply_title"
                  v-show="!isCheck"
+                 disabled
                  style="width: 200px;"
                  placeholder="供应商名称">
           <!-- <span slot="append"
@@ -554,6 +555,7 @@ export default {
           //   })
           // }
         },
+      { title: '参照订单号', key: 'order_no', align: 'center', minWidth: 120,},
         { title: '操作', key: 'code', align: 'center', minWidth: 100, slot: 'setSlot' },
       ],
       tableData: [
@@ -814,9 +816,9 @@ export default {
     },
     initData (arrival_no) {
       this.axios({
-        method: 'get',
+        method: 'post',
         url: '/api/purchase_arrive_detail',
-        params: { arrival_no }
+        data: { arrival_no }
       }).then((res) => {
         this.tableData = res.data.list
        

+ 9 - 5
src/views/PurchasingManage/ArrivalOrder/list.vue

@@ -20,7 +20,7 @@
                  style="width: 150px"
                  placeholder="订单号" />
         </FormItem>
-       <FormItem label="供应商名称:" style="width:300px">
+       <FormItem label="供应商名称:" style="width:300px" filterable>
           <Select v-model="searchData.supply_id"
                   size="small"
                   clearable
@@ -32,7 +32,7 @@
             </Option>
           </Select>
         </FormItem>
-        <FormItem label="制单人:" style="width:300px">
+        <FormItem label="制单人:" style="width:300px" filterable>
           <Select v-model="searchData.crt_id"
                   size="small"
                   clearable
@@ -66,7 +66,7 @@
                     :value='1' />
           </Select>
         </FormItem>
-         <FormItem label="审批人:" style="width:300px">
+         <FormItem label="审批人:" style="width:300px" filterable>
           <Select v-model="searchData.check_id"
                   size="small"
                   clearable
@@ -96,14 +96,14 @@
                       size="small"
                       style="width: 150px"
                       placeholder="年/月/日"
-                      v-model="searchData.start_time"></DatePicker>
+                      v-model="searchData.order_start_time"></DatePicker>
    
         ~
           <DatePicker type="date"
                       size="small"
                       style="width: 150px"
                       placeholder="年/月/日"
-                      v-model="searchData.end_time"></DatePicker>
+                      v-model="searchData.order_end_time"></DatePicker>
         </FormItem>
            <FormItem label="订单创建时间:" style="width:450px" :label-width='100'>
           <DatePicker type="date"
@@ -191,6 +191,8 @@ export default {
         state: '',
         start_time: '',
         end_time: '',
+        order_start_time:'',
+        order_end_time:''
       },
       tableColumns: [
         { title: '到货单号', key: 'arrival_no', align: 'center', minWidth: 140 },
@@ -261,6 +263,8 @@ export default {
       let obj = JSON.parse(JSON.stringify(this.searchData))
       obj.start_time = parseInt(new Date(obj.start_time).getTime() / 1000) || ''
       obj.end_time = parseInt(new Date(obj.end_time).getTime() / 1000) || ''
+       obj.order_start_time = parseInt(new Date(obj.order_start_time).getTime() / 1000) || ''
+      obj.order_end_time = parseInt(new Date(obj.order_end_time).getTime() / 1000) || ''
       this.axios({
         method: 'get',
         url: '/api/purchase_arrive_list',

+ 16 - 12
src/views/PurchasingManage/PurchasingOrder/edit.vue

@@ -16,7 +16,7 @@
         >
         <Button @click="handleReference(1)"
                 type="primary"
-                v-show="!isCheck||$route.query.type!=3"
+                v-show="$route.query.type==1"
                 ghost
                 style="margin-right:10px;"
                >参照采购计划</Button>
@@ -70,10 +70,10 @@
                 style="cursor:pointer;"
                 @click="showSupplierModal=true">选择</span>
           </Input> -->
-          <div style="display:flex;margin-top:5px">
+          <div :style="$route.query.type==2?{}:{'display':'flex','margin-top':'5px'}">
             <Select v-model="searchData.supply_id"
                   size="small"
-                  v-show="!isCheck"
+                  v-if="!isCheck"
                   clearable
                   filterable
                   label-in-value
@@ -87,6 +87,7 @@
           <Button type="primary"
                 style="cursor:pointer;"
                 size='small'
+                v-if="!isCheck"
                 @click="showSupplierModal=true">选择</Button>
           </div>
           <span v-show="isCheck">{{searchData.supply_title}}</span>
@@ -318,12 +319,10 @@
           <div v-else>
                   <a style="margin:0 5px"
              v-show="!isCheck"
-             :disabled="row.state==0"
               @click="handleSet(3,row,index)"
             >复制</a>
           <a style="margin:0 5px"
              v-show="!isCheck"
-             :disabled="row.state==0"
              @click="handleSet(4,row,index)">删除</a>
            </div>  
         </template>
@@ -843,8 +842,8 @@ export default {
           }
         },
          { title: '参照计划单号', key: 'project_number', align: 'center', minWidth: 100,slot:'project_number' },
-          { title: '项目编码', key: 'project_code', align: 'center', minWidth: 100,slot: "project_code" },
-           { title: '项目名称', key: 'project_title', align: 'center', minWidth: 100,slot: "project_title"  },
+          { title: '项目编码', key: 'project_code', align: 'center', minWidth: 200,slot: "project_code" },
+           { title: '项目名称', key: 'project_title', align: 'center', minWidth: 150,slot: "project_title"  },
         { title: '操作', key: 'code', align: 'center', minWidth: 120, slot: 'setSlot' },
       ],
       tableData: [{material_title:'选择物料',_disabled:true}],
@@ -1167,17 +1166,21 @@ export default {
           break;
           case 2:
              this.tableData.map((v)=>{
-           
+          if((this.$route.query.type==1&&!v.is_refer)||v.state==0){
             this.selectChoose.map(m=>{
               if(m.index == v.index ){
-              
-                     v.num =this.total_num;
-            
+                        console.log(v);
+                     v.num =this.total_num;//数量
+                    v.no_tax_amount = (v.num*v.no_tax_price*1).toFixed(2);//无税金额
+                    v.total_price = (v.num*v.price*1).toFixed(2);//价格合计
+                    v.tax_amount = (v.total_price-v.no_tax_amount).toFixed(2);//税额
                v._checked = true;
                v.ad = true
               }
           
-            })})
+            })
+          }
+            })
             break;
             case 3:
              this.tableData.map((v)=>{
@@ -1524,6 +1527,7 @@ if(this.selectChoose.length == 0){
             data.no_tax_amount = 0
             data.tax_amount = 0
             data.total_price = 0
+            data.is_refer = true;
             data.project_number = '查看'
             data.project_code = '查看'
             data.project_title = '查看'

+ 5 - 4
src/views/PurchasingManage/RequisitionOrder/edit.vue

@@ -471,20 +471,20 @@
         <Form>
           <FormItem>
             <span>项目编码 : </span>
-        <Select v-model="total_project_info.code" style="width:200px" filterable>
+        <Select v-model="total_project_info.code" style="width:200px" filterable clearable>
         <Option v-for="(item,index) in project_number" :value="item" :key="index">{{ item }}</Option>
     </Select>
           </FormItem>
              <FormItem>
           <span>项目名称 : </span>
-        <Select v-model="total_project_info.name" style="width:200px" filterable>
+        <Select v-model="total_project_info.name" style="width:200px" filterable clearable>
         <Option v-for="(item,index) in project_name" :value="item" :key="index">{{ item }}</Option>
     </Select>
           </FormItem>
     </Form>
     </div>
     <div v-if="total_type==2">
-      <span>数量 : </span><Input v-model="total_num" style="width:50%"/>
+      <span>数量 : </span><Input v-model="total_num" style="width:50%" clearable/>
     </div>
     <div v-if="total_type == 3">
       <span>预计到货时间 : </span>
@@ -492,6 +492,7 @@
               type="date"
               size="small"
               transfer
+              clearable
               v-show="!isCheck"
               placeholder="年/月/日"
               v-model="total_time"
@@ -499,7 +500,7 @@
       </div>
       <div v-if='total_type==4'>
         <span>批量修改建议的供应商 : </span>
-         <Select v-model="total_supplier" style="width:200px" filterable>
+         <Select v-model="total_supplier" style="width:200px" filterable clearable>
         <Option v-for="item in suppliersList" :value="item.id" :key="item.id"   :label="item.title"></Option>
          </Select>
       </div>

+ 2 - 2
vue.config.js

@@ -2,13 +2,13 @@ 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" //贝斯特
     : "http://124.71.176.88:882";
 //  http://124.71.176.88:882  //江山
 // 'http://121.41.102.225:82' :测试
-
+// http://124.71.176.88:70  江山新地址
 process.env.VUE_APP_BASE_URL = axios_default_ip;
 module.exports = {
   publicPath: "./",

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