Andy 3 年 前
コミット
c7ecc24e72

+ 3 - 3
package-lock.json

@@ -12328,9 +12328,9 @@
       }
     },
     "xe-utils": {
-      "version": "3.3.1",
-      "resolved": "https://registry.npmjs.org/xe-utils/-/xe-utils-3.3.1.tgz",
-      "integrity": "sha512-OdQgl9WPV9dK3/djneFPrGX8z1M4neX+VOkzra5oONjoNsCKQhwdiut99WlxceNMQ5vXDv4EQ/wKA2fux3Gdug=="
+      "version": "3.3.2",
+      "resolved": "https://registry.npmjs.org/xe-utils/-/xe-utils-3.3.2.tgz",
+      "integrity": "sha512-af7SKaM9j3fL0xxRVBuzPctSWKTWgLHEcYtK9yYVHmUz0mffDxkqf1zQbgxVVjsdQ79KhmW2yuv8OS6CqGOZ7g=="
     },
     "xtend": {
       "version": "4.0.2",

+ 1 - 1
package.json

@@ -28,7 +28,7 @@
     "vue-slicksort": "^1.1.3",
     "vuex": "^3.5.1",
     "vxe-table": "^3.3.10",
-    "xe-utils": "^3.3.1"
+    "xe-utils": "^3.3.2"
   },
   "devDependencies": {
     "@vue/cli-plugin-babel": "~4.4.0",

+ 6 - 4
src/views/BasicSettings/CustomerFiles/detail.vue

@@ -107,7 +107,7 @@
         >新增</Button
       >
     </div>
-    <Table :columns="tableColumns" max-height="600" :data="tableData" border>
+    <Table :columns="tableColumns" max-height="550" :data="tableData" border>
       <template slot="priceSet" slot-scope="{ index }">
         <Input
           :disabled="type == 3"
@@ -240,19 +240,18 @@ export default {
           render: (h, params) => {
             const { row, index } = params;
             const currencyRow = this.tableData[index];
-            return currencyRow.area_title
+            return this.isChecked
               ? h("span", {}, currencyRow.area_title)
               : h(
                   "a",
                   {
                     on: {
                       click: () => {
-                        console.log("123 :>> ", 123);
                         this.handleAreaSet(currencyRow, index);
                       },
                     },
                   },
-                  "选择地区"
+                  currencyRow.area_title ? currencyRow.area_title : "选择地区"
                 );
           },
         },
@@ -487,6 +486,9 @@ export default {
 .top_search {
   padding: 20px 0;
   width: 100%;
+  max-height: 150px;
+  overflow: hidden;
+  overflow-y: auto;
   .top_search_form {
     // width: 800px;
     // display: flex;

+ 299 - 195
src/views/BasicSettings/OverStandardPrice/detail.vue

@@ -1,50 +1,61 @@
 <template>
   <div>
-    <Toptitle :title="type==1?'超标价格方案新增':type==2?'超标价格方案编辑':'超标价格方案详情'">
+    <Toptitle
+      :title="
+        type == 1
+          ? '超标价格方案新增'
+          : type == 2
+          ? '超标价格方案编辑'
+          : '超标价格方案详情'
+      "
+    >
       <slot name="titleButton">
-        <Button @click="goBack"
-                type="primary"
-                ghost
-                style="margin-right:10px;">返回</Button>
-        <Button @click="postData"
-                type="primary"
-                v-show="!isChecked"
-                style="margin-right:10px;">保存</Button>
+        <Button @click="goBack" type="primary" ghost style="margin-right:10px;"
+          >返回</Button
+        >
+        <Button
+          @click="postData"
+          type="primary"
+          v-show="!isChecked"
+          style="margin-right:10px;"
+          >保存</Button
+        >
       </slot>
     </Toptitle>
     <div class="top_search">
-      <Form :model="formData"
-            :label-width="100"
-            class="top_search_form">
+      <Form :model="formData" :label-width="100" class="top_search_form">
         <FormItem label="ID:">
-          <Input type="text"
-                 size="small"
-                 disabled
-                 v-model="formData.id"
-                 placeholder="自动生成"
-                 style="width: 200px" />
+          <Input
+            type="text"
+            size="small"
+            disabled
+            v-if="type != 3"
+            v-model="formData.id"
+            placeholder="自动生成"
+            style="width: 200px"
+          />
+          <span v-else>{{ formData.id }}</span>
         </FormItem>
         <FormItem label="方案名称:">
-          <Input type="text"
-                 size="small"
-                 :disabled="isChecked"
-                 v-model="formData.title"
-                 placeholder="请输入方案名称"
-                 style="width: 200px" />
+          <Input
+            type="text"
+            size="small"
+            v-if="type != 3"
+            v-model="formData.title"
+            placeholder="请输入方案名称"
+            style="width: 200px"
+          />
+          <span v-else>{{ formData.title }}</span>
         </FormItem>
       </Form>
     </div>
     <div class="addBtn">
-      <Button @click="handleRuleAdd()"
-              v-show="!isChecked"
-              type="primary">新增规则</Button>
+      <Button @click="handleRuleAdd()" v-show="!isChecked" type="primary"
+        >新增规则</Button
+      >
     </div>
-    <Table :columns="tableColumns"
-           max-height="600"
-           :data="tableData"
-           border>
-      <template slot="productSet"
-                slot-scope="{index}">
+    <Table :columns="tableColumns" max-height="600" :data="tableData" border>
+      <template slot="productSet" slot-scope="{ index }">
         <!-- <Select v-model="tableData[index].basic_product_id"
                 :disabled="isChecked"
                 @on-change="changeProduct(tableData[index],index)">
@@ -53,65 +64,84 @@
                   :value="item.id"
                   :label="item.title"></Option>
         </Select> -->
-        <el-cascader v-model="tableData[index].basic_product_id"
-                     size="small"
-                     :show-all-levels="false"
-                     :disabled="isChecked"
-                     :options="cascader_list"
-                     :props="{ expandTrigger: 'hover',children:'child',value:'id',label:'title',emitPath:false }"
-                     @change="changeProduct(tableData[index],index)"></el-cascader>
+        <el-cascader
+          v-if="type != 3"
+          v-model="tableData[index].basic_product_id"
+          size="small"
+          :show-all-levels="false"
+          :options="cascader_list"
+          :props="{
+            expandTrigger: 'hover',
+            children: 'child',
+            value: 'id',
+            label: 'title',
+            emitPath: false,
+          }"
+          @change="changeProduct(tableData[index], index)"
+        ></el-cascader>
+        <span v-else>{{ tableData[index].product_type_title }}</span>
       </template>
-      <template slot="partsSet"
-                slot-scope="{index}">
-        <Select v-model="tableData[index].part_id"
-                :disabled="isChecked">
+      <template slot="partsSet" slot-scope="{ index }">
+        <Select v-model="tableData[index].part_id" v-if="type != 3">
           <!-- @on-change="changeProduct(tableData[index],index)" -->
-          <Option v-for="item of tableData[index].partsList"
-                  :key="item.id"
-                  :value="item.id"
-                  :label="item.title"></Option>
+          <Option
+            v-for="item of tableData[index].partsList"
+            :key="item.id"
+            :value="item.id"
+            :label="item.title"
+          ></Option>
         </Select>
+        <span v-else>{{ tableData[index].part_title }}</span>
       </template>
-      <template slot="typeSet"
-                slot-scope="{index}">
-        <Select v-model="tableData[index].type"
-                :disabled="isChecked">
+      <template slot="typeSet" slot-scope="{ index }">
+        <Select v-model="tableData[index].type" v-if="type != 3">
           <!-- @on-change="changeProduct(tableData[index],index)" -->
-          <Option label='长'
-                  :value='1'></Option>
-          <Option label='宽'
-                  :value='2'></Option>
-          <Option label='厚'
-                  :value='3'></Option>
+          <Option label="高" :value="1"></Option>
+          <Option label="宽" :value="2"></Option>
+          <Option label="厚" :value="3"></Option>
         </Select>
+        <span v-else>{{
+          tableData[index].type == 1
+            ? "高"
+            : tableData[index].type == 2
+            ? "宽"
+            : "厚"
+        }}</span>
       </template>
-      <template slot="priceSet"
-                slot-scope="{index}">
-        <Input @on-focus="openKey(index)"
-               :disabled="isChecked"
-               clearable
-               placeholder="请输入公式"
-               v-model="tableData[index].formula"></Input>
+      <template slot="priceSet" slot-scope="{ index }">
+        <Input
+          @on-focus="openKey(index)"
+          v-if="type != 3"
+          clearable
+          placeholder="请输入公式"
+          v-model="tableData[index].formula"
+        />
+        <span v-else>{{ tableData[index].formula }}</span>
       </template>
-      <template slot="set"
-                slot-scope="{index}">
-        <a style="margin:0 5px"
-           v-show="!isChecked"
-           @click="handleSet(tableData[index],index,4)">删除</a>
+      <template slot="set" slot-scope="{ index }">
+        <a
+          style="margin:0 5px"
+          v-show="!isChecked"
+          @click="handleSet(tableData[index], index, 4)"
+          >删除</a
+        >
       </template>
     </Table>
-    <Modal v-model="keyModal"
-           :width="1250"
-           :mask-closable='false'
-           :closable='false'>
+    <Modal
+      v-model="keyModal"
+      :width="1250"
+      :mask-closable="false"
+      :closable="false"
+    >
       <div>
-
-        <KeyBoard :rightData='measureList'
-                  @cancel='cancelKey'
-                  @success='successKey'
-                  class='key-co' />
+        <KeyBoard
+          :rightData="measureList"
+          @cancel="cancelKey"
+          @success="successKey"
+          class="key-co"
+        />
       </div>
-      <div slot='footer'></div>
+      <div slot="footer"></div>
     </Modal>
   </div>
 </template>
@@ -119,14 +149,14 @@
 <script>
 // 这里可以导入其他文件(比如:组件,工具js,第三方插件js,json文件,图片文件等等)
 // 例如:import 《组件名称》 from '《组件路径》';
-import KeyBoard from '../../../components/keyboard/index'
+import KeyBoard from "../../../components/keyboard/index";
 
 export default {
-  name: '',
+  name: "",
   components: { KeyBoard },
   props: {},
   // import引入的组件需要注入到对象中才能使用
-  data () {
+  data() {
     // 这里存放数据
     return {
       type: this.$route.query.type || null,
@@ -140,148 +170,217 @@ export default {
       formData: {},
       keyModal: false,
       tableColumns: [
-        { title: '产品分类', key: 'basic_product_id', align: 'center', minWidth: 140, slot: 'productSet' },
-        { title: '部件', key: 'part_id', align: 'center', minWidth: 140, slot: 'partsSet' },
-        { title: '测量字段', key: 'type', align: 'center', minWidth: 140, slot: 'typeSet' },
         {
-          title: '最小数值', key: 'min', align: 'center', minWidth: 160,
+          title: "产品分类",
+          key: "basic_product_id",
+          align: "center",
+          minWidth: 140,
+          slot: "productSet",
+        },
+        {
+          title: "部件",
+          key: "part_id",
+          align: "center",
+          minWidth: 140,
+          slot: "partsSet",
+        },
+        {
+          title: "测量字段",
+          key: "type",
+          align: "center",
+          minWidth: 140,
+          slot: "typeSet",
+        },
+        {
+          title: "最小数值",
+          key: "min",
+          align: "center",
+          minWidth: 160,
           render: (h, params) => {
-            const { row, index } = params
-            const currencyRow = this.tableData[index]
-            return h('Input', {
-              props: {
-                placeholder: '默认为0',
-                value: currencyRow.min,
-                disabled: this.isChecked
-              },
-              on: {
-                'on-change': (e) => {
-                  const val = e.target.value * 1
-                  currencyRow.min = val
-                  // this.tableData.splice(index, 1, currencyRow);
-                }
-              }
-            })
-          }
+            const { row, index } = params;
+            const currencyRow = this.tableData[index];
+            return this.type != 3
+              ? h("Input", {
+                  props: {
+                    placeholder: "默认为0",
+                    value: currencyRow.min,
+                    disabled: this.isChecked,
+                  },
+                  on: {
+                    "on-change": (e) => {
+                      const val = e.target.value * 1;
+                      currencyRow.min = val;
+                      // this.tableData.splice(index, 1, currencyRow);
+                    },
+                  },
+                })
+              : h("span", {}, currencyRow.min);
+          },
         },
         {
-          title: '最大数值', key: 'max', align: 'center', minWidth: 160,
+          title: "最大数值",
+          key: "max",
+          align: "center",
+          minWidth: 160,
           render: (h, params) => {
-            const { row, index } = params
-            const currencyRow = this.tableData[index]
-            return h('Input', {
-              props: {
-                placeholder: '默认为99999',
-                value: currencyRow.max,
-                disabled: this.isChecked
-              },
-              on: {
-                'on-change': (e) => {
-                  const val = e.target.value * 1
-                  currencyRow.max = val
-                  // this.tableData.splice(index, 1, currencyRow);
-                }
-              }
-            })
-          }
+            const { row, index } = params;
+            const currencyRow = this.tableData[index];
+            return this.type != 3
+              ? h("Input", {
+                  props: {
+                    placeholder: "默认为99999",
+                    value: currencyRow.max,
+                    disabled: this.isChecked,
+                  },
+                  on: {
+                    "on-change": (e) => {
+                      const val = e.target.value * 1;
+                      currencyRow.max = val;
+                      // this.tableData.splice(index, 1, currencyRow);
+                    },
+                  },
+                })
+              : h("span", {}, currencyRow.max);
+          },
         },
-        { title: '超标价格', key: 'formula', align: 'center', slot: 'priceSet', minWidth: 140 },
-        { title: '操作', key: '', align: 'center', slot: 'set', width: 100 },
+        {
+          title: "超标价格",
+          key: "formula",
+          align: "center",
+          slot: "priceSet",
+          minWidth: 140,
+        },
+        { title: "操作", key: "", align: "center", slot: "set", width: 100 },
       ],
-      tableData: [{}],
       partsList: [],
       measureList: [],
       attrindex: null,
       cascader_list: [],
-    }
+    };
   },
   // 生命周期 - 创建完成(可以访问当前this实例)
-  created () {
+  created() {
     // 获取产品分类
-    this.axios.get('/api/basics_product_index').then(res => { this.cascader_list = res.data.data }).catch(err => { console.error(err); })
+    this.axios
+      .get("/api/basics_product_index")
+      .then((res) => {
+        this.cascader_list = res.data.data;
+      })
+      .catch((err) => {
+        console.error(err);
+      });
   },
   // 生命周期 - 挂载完成(可以访问DOM元素)
-  mounted () {
-    this.init()
+  mounted() {
+    this.init();
   },
   methods: {
-    init () {
+    init() {
       this.id &&
-        this.axios.get('/api/overdraft_detail', { params: { id: this.id } }).then(res => {
-          this.tableData = res.data.list
-          this.formData = res.data.detail
-          this.tableData.forEach((element, index) => {
-            element.partsList = []
-            this.axios.get('/api/get_part_by_basic_product', { params: { basic_product_id: element.basic_product_id } })
-              .then(res => {
-                element.partsList = res.data
-                this.tableData.splice(index, 1, element)
-                // this.$forceUpdate()
-              }).catch(err => { console.error(err); })
-            element.basic_product_id && this.axios('/api/basics_product_list', { params: { id: element.basic_product_id } }).then(res => {
-              if (res.code == 200) {
-                const { data } = res
-                const result = data.filter(rows => rows.id == element.basic_product_id)
-                // this.productFiled = data;
-                this.measureList = result[0].measure
-              }
-            });
+        this.axios
+          .get("/api/overdraft_detail", { params: { id: this.id } })
+          .then((res) => {
+            this.tableData = res.data.list;
+            this.formData = res.data.detail;
+            if (this.type != 3) {
+              this.tableData.forEach((element, index) => {
+                element.partsList = [];
+                this.axios
+                  .get("/api/get_part_by_basic_product", {
+                    params: { basic_product_id: element.basic_product_id },
+                  })
+                  .then((res) => {
+                    element.partsList = res.data;
+                    this.tableData.splice(index, 1, element);
+                    // this.$forceUpdate()
+                  })
+                  .catch((err) => {
+                    console.error(err);
+                  });
+                element.basic_product_id &&
+                  this.axios("/api/basics_product_list", {
+                    params: { id: element.basic_product_id },
+                  }).then((res) => {
+                    if (res.code == 200) {
+                      const { data } = res;
+                      const result = data.filter(
+                        (rows) => rows.id == element.basic_product_id
+                      );
+                      // this.productFiled = data;
+                      this.measureList = result[0].measure;
+                    }
+                  });
+              });
+            }
+          })
+          .catch((err) => {
+            console.error(err);
           });
-        }).catch(err => {
-          console.error(err);
-        })
     },
-    goBack () { this.$router.go(-1) },
-    handleSet (row, index, type) {
-      this.tableData.splice(index, 1)
+    goBack() {
+      this.$router.go(-1);
+    },
+    handleSet(row, index, type) {
+      this.tableData.splice(index, 1);
     },
-    postData () {
+    postData() {
       this.axios({
-        method: 'post',
-        url: '/api/overdraft_edit',
+        method: "post",
+        url: "/api/overdraft_edit",
         data: {
           ...this.formData,
-          detail: this.tableData
-        }
+          detail: this.tableData,
+        },
       }).then((res) => {
         if (res.code == 200) {
-          this.$Message.success(res.msg)
-          this.goBack()
+          this.$Message.success(res.msg);
+          this.goBack();
         }
-      })
+      });
     },
-    handleRuleAdd () {
-      const obj = { min: null, max: null, formula: null }
-      this.tableData.push(obj)
+    handleRuleAdd() {
+      const obj = { min: null, max: null, formula: null };
+      this.tableData.push(obj);
     },
-    changeProduct (row, index) {
+    changeProduct(row, index) {
       row.basic_product_id &&
-        this.axios.get('/api/get_part_by_basic_product', { params: { basic_product_id: row.basic_product_id } })
-          .then(res => {
-            row.partsList = res.data
-            row.part_id = ''
-            this.tableData.splice(index, 1, row)
-          }).catch(err => { console.error(err); })
+        this.axios
+          .get("/api/get_part_by_basic_product", {
+            params: { basic_product_id: row.basic_product_id },
+          })
+          .then((res) => {
+            row.partsList = res.data;
+            row.part_id = "";
+            this.tableData.splice(index, 1, row);
+          })
+          .catch((err) => {
+            console.error(err);
+          });
 
-      row.basic_product_id && this.axios('/api/basics_product_list', { params: { id: row.basic_product_id } }).then(res => {
-        if (res.code == 200) {
-          const { data } = res
-          const result = data.filter(rows => rows.id == row.basic_product_id)
-          // this.productFiled = data;
-          this.measureList = result[0].measure
-        }
-      });
+      row.basic_product_id &&
+        this.axios("/api/basics_product_list", {
+          params: { id: row.basic_product_id },
+        }).then((res) => {
+          if (res.code == 200) {
+            const { data } = res;
+            const result = data.filter(
+              (rows) => rows.id == row.basic_product_id
+            );
+            // this.productFiled = data;
+            this.measureList = result[0].measure;
+          }
+        });
     },
-    openKey (row) {
+    openKey(row) {
       this.keyModal = true;
       this.attrindex = row;
     },
-    successKey (str) {
+    successKey(str) {
       this.tableData[this.attrindex].formula = str;
       this.keyModal = false;
-      this.tableData.splice(this.attrindex, 1, this.tableData[this.attrindex])
+      this.tableData.splice(this.attrindex, 1, this.tableData[this.attrindex]);
     },
-    cancelKey () {
+    cancelKey() {
       this.keyModal = false;
     },
   },
@@ -289,17 +388,17 @@ export default {
   computed: {},
   // 监控data中的数据变化
   watch: {},
-  beforeCreate () { }, // 生命周期 - 创建之前
-  beforeMount () { }, // 生命周期 - 挂载之前
-  beforeUpdate () { }, // 生命周期 - 更新之前
-  updated () { }, // 生命周期 - 更新之后
-  beforeDestroy () { }, // 生命周期 - 销毁之前
-  destroyed () { }, // 生命周期 - 销毁完成
-  activated () { }, // 如果页面有keep-alive缓存功能,这个函数会触发
-}
+  beforeCreate() {}, // 生命周期 - 创建之前
+  beforeMount() {}, // 生命周期 - 挂载之前
+  beforeUpdate() {}, // 生命周期 - 更新之前
+  updated() {}, // 生命周期 - 更新之后
+  beforeDestroy() {}, // 生命周期 - 销毁之前
+  destroyed() {}, // 生命周期 - 销毁完成
+  activated() {}, // 如果页面有keep-alive缓存功能,这个函数会触发
+};
 </script>
 
-<style lang='scss' scoped>
+<style lang="scss" scoped>
 .top_search {
   padding: 20px 0;
   width: 100%;
@@ -321,4 +420,9 @@ export default {
 /deep/ .ivu-table-wrapper {
   overflow: visible;
 }
+/deep/.ivu-form-item-content {
+  span {
+    vertical-align: middle;
+  }
+}
 </style>

+ 1 - 0
src/views/BidSystem/ContractList/edit.vue

@@ -352,6 +352,7 @@
       </div>
       <div class="addAreaTable">
         <Table
+          v-show="areaItem.product && areaItem.product.length > 0"
           :columns="tableColumns"
           :data="areaItem.product"
           max-height="600"

+ 64 - 60
src/views/BidSystem/ContractList/info.vue

@@ -135,20 +135,29 @@
           <div class="addAreaBtn">
             <Button
               @click="handleShowCurrencyArea(areaItem, areaIndex)"
-              ghost
               size="small"
               type="primary"
               v-show="!(areaItem.product && areaItem.product.length > 0)"
               >展示产品</Button
             >
             <Button
+              @click="handleHiddenCurrencyArea(areaItem, areaIndex)"
+              size="small"
+              type="primary"
+              style="margin-right:10px"
+              v-show="areaItem.product && areaItem.product.length > 0"
+              >收缩</Button
+            >
+            <Button
               @click="handleOpenModal"
-              ghost
               size="small"
               type="primary"
               v-show="areaItem.product && areaItem.product.length > 0"
               >下深化</Button
             >
+            <Button size="small" type="primary" v-show="areaItem.isAllDeeped"
+              >已下深化</Button
+            >
           </div>
           <div class="addAreaForm">
             <Form :label-width="100" :model="areaItem" style="width: 60%">
@@ -181,7 +190,7 @@
           </div>
           <div class="addAreaTable">
             <Table
-              v-show="areaItem.product && areaItem.product.length > 0"
+              v-show="areaItem.isCurrencyArea"
               :columns="tableColumns"
               @on-selection-change="handleSelection"
               :data="areaItem.product"
@@ -217,7 +226,7 @@
                   type="text"
                   size="small"
                   clearable
-                  v-model="searchData.area_code"
+                  v-model="searchData.area_no"
                   placeholder="请输入区域编码"
                   style="width: 120px"
                 />
@@ -237,7 +246,7 @@
                   type="text"
                   size="small"
                   clearable
-                  v-model="searchData.title"
+                  v-model="searchData.product_title"
                   placeholder="请输入产品名称"
                   style="width: 120px"
                 />
@@ -1360,69 +1369,58 @@ export default {
       this.page_size = e;
       this.getListData();
     },
+    handleHiddenCurrencyArea(item, index) {
+      console.log("item :>> ", item);
+      item.product = [];
+      this.$forceUpdate();
+    },
     // 展示区域产品
     handleShowCurrencyArea(item, index) {
-      console.log("item :>> ", item);
       const preObj = this.formData.list.filter((item) => item.isCurrencyArea);
-      console.log("preObj :>> ", preObj);
-      console.log(
-        "preObj.length>0?preObj[0].id != item.id:true :>> ",
-        preObj.length > 0 ? preObj[0].id != item.id : true
-      );
-      // 判断当前打开是否与上一个是否一致
       if (preObj.length > 0) {
-        // }
-        // if (preObj[0].id != item.id) {
-        // 1.保存上一个展开的区域及产品
+        // 1.1移除上一个展开区域及产品
+        this.formData.list.forEach((element) => {
+          element.product = [];
+          if (element.id == preObj[0].id) {
+            element.isCurrencyArea = false;
+          }
+        });
+        // 2.获取当前展开区域及产品
+        item.isCurrencyArea = true;
         this.axios
-          .post("/api/order_area_product_edit", {
-            order_no: this.$route.query.order_no,
-            area_id: preObj[0].id || "",
-            product: preObj[0].product,
+          .get("/api/order_area_list_product", {
+            params: {
+              order_no: this.$route.query.order_no,
+              area_id: item.id,
+            },
           })
-          .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;
+          .then((res) => {
+            if (res.code == 200) {
+              if (!item.product) {
+                item.product = [];
+              }
+              item.product = res.data;
+              let flag = true;
+              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);
+                      }
+                    });
+                  });
+                // 是否已全部下深化
+                if (pdt.sub_state != 1) {
+                  flag = false;
                 }
               });
-
-              // 2.获取当前展开区域及产品
-              item.isCurrencyArea = true;
-              this.axios
-                .get("/api/order_area_list_product", {
-                  params: {
-                    order_no: this.$route.query.order_no,
-                    area_id: item.id,
-                  },
-                })
-                .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();
-                  }
-                });
+              item.isAllDeeped = flag;
+              this.$forceUpdate();
             }
           });
       } else {
@@ -1438,6 +1436,7 @@ export default {
                 item.product = [];
               }
               item.product = res.data;
+              let flag = true;
               item.product.forEach((pdt, index) => {
                 pdt.index = index + 1;
                 pdt.special &&
@@ -1451,7 +1450,12 @@ export default {
                       }
                     });
                   });
+                // 是否已全部下深化
+                if (pdt.sub_state != 1) {
+                  flag = false;
+                }
               });
+              item.isAllDeeped = flag;
               this.$forceUpdate();
             }
           });

+ 83 - 91
src/views/BidSystem/DeepeningOrder/info.vue

@@ -2,7 +2,10 @@
   <div class="BidSystemDeepeningOrderDetail">
     <Toptitle title="深化单详情">
       <slot name="titleButton">
-        <Button @click="goback()" type="primary" style="margin-right: 10px"
+        <Button
+          @click="handleFinish()"
+          type="primary"
+          style="margin-right: 10px"
           >完成</Button
         >
         <Button
@@ -147,6 +150,7 @@
             <div class="addAreaTable">
               <Table
                 :columns="tableColumns"
+                v-show="item.product && item.product.length > 0"
                 max-height="500"
                 :data="item.product"
                 @on-selection-change="handleSelection"
@@ -197,7 +201,7 @@
                   type="text"
                   size="small"
                   clearable
-                  v-model="searchData.area_code"
+                  v-model="searchData.area_no"
                   placeholder="请输入区域编码"
                   style="width: 120px"
                 />
@@ -217,7 +221,7 @@
                   type="text"
                   size="small"
                   clearable
-                  v-model="searchData.title"
+                  v-model="searchData.product_title"
                   placeholder="请输入产品名称"
                   style="width: 120px"
                 />
@@ -1078,46 +1082,46 @@ export default {
                 }
               });
             });
-          if (index == 0) {
-            element.isCurrencyArea = true;
-            //编辑进入页面是展示第一条区域的产品
-            element.id &&
-              this.axios
-                .get("/api/order_area_list_product", {
-                  params: {
-                    order_no: this.$route.query.order_no,
-                    area_id: element.id,
-                  },
-                })
-                .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.forEach((_pdt) => {
-                          this.formData.head[3].forEach((element) => {
-                            if (_pdt.head_id == element.id) {
-                              _pdt = Object.assign(_pdt, element);
-                              pdt[_pdt.key] = _pdt.value;
-                              this.productSpecValueList.push(_pdt);
-                            }
-                          });
-                        });
-                    });
-                    this.$forceUpdate();
-                  }
-                });
-          } else {
-            element.isCurrencyArea = false;
-          }
+          // if (index == 0) {
+          //   element.isCurrencyArea = true;
+          //   //编辑进入页面是展示第一条区域的产品
+          //   element.id &&
+          //     this.axios
+          //       .get("/api/order_area_list_product", {
+          //         params: {
+          //           order_no: this.$route.query.order_no,
+          //           area_id: element.id,
+          //         },
+          //       })
+          //       .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.forEach((_pdt) => {
+          //                 this.formData.head[3].forEach((element) => {
+          //                   if (_pdt.head_id == element.id) {
+          //                     _pdt = Object.assign(_pdt, element);
+          //                     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]
@@ -1272,6 +1276,7 @@ export default {
       item.showValue = value.label;
       item.showId = value.value;
     },
+    handleFinish() {},
     looks(img) {
       const array = [{ img_url: img }];
       this.$previewImg({
@@ -1403,57 +1408,44 @@ export default {
     handleShowCurrencyArea(item, index) {
       const preObj = this.formData.list.filter((item) => item.isCurrencyArea);
       // 判断当前打开是否与上一个是否一致
-      if (preObj[0].id != item.id) {
-        // 1.保存上一个展开的区域及产品
+      if (preObj.length > 0) {
+        // 1.1移除上一个展开区域及产品
+        this.formData.list.forEach((element) => {
+          element.product = [];
+          if (element.id == preObj[0].id) {
+            element.isCurrencyArea = false;
+          }
+        });
+        // 2.获取当前展开区域及产品
+        item.isCurrencyArea = true;
         this.axios
-          .post("/api/order_area_product_edit", {
-            order_no: this.$route.query.order_no,
-            area_id: preObj[0].id || "",
-            product: preObj[0].product,
+          .get("/api/order_area_list_product", {
+            params: {
+              order_no: this.$route.query.order_no,
+              area_id: item.id,
+            },
           })
-          .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,
-                    area_id: item.id,
-                  },
-                })
-                .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);
-                            }
-                          });
-                        });
+          .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();
-                  }
-                });
+                  });
+              });
+              this.$forceUpdate();
             }
           });
       } else {

+ 324 - 219
src/views/Dispatching/DispatchingDetail.vue

@@ -1,128 +1,174 @@
 <template>
   <div>
-    <Toptitle title='派工详情'>
-      <Button @click="goBack"
-              type='primary'
-              ghost
-              style="margin-right:10px;">返回</Button>
-      <Button @click="handleDispatchConfirm"
-              type='primary'
-              style="margin-right:10px;">派工</Button>
+    <Toptitle title="派工详情">
+      <Button @click="goBack" type="primary" ghost style="margin-right:10px;"
+        >返回</Button
+      >
+      <Button
+        @click="handleDispatchConfirm"
+        type="primary"
+        style="margin-right:10px;"
+        >派工</Button
+      >
     </Toptitle>
     <div class="body">
       <div class="header">
-        <Form :label-width="85"
-              :model="searchData">
+        <Form :label-width="85" :model="searchData">
           <FormItem label="项目名称:">
-            <Input type="text"
-                   size="small"
-                   clearable
-                   v-model="searchData.client_name"
-                   placeholder="请输入项目名称"></Input>
+            <Input
+              type="text"
+              size="small"
+              clearable
+              v-model="searchData.client_name"
+              placeholder="请输入项目名称"
+            ></Input>
           </FormItem>
           <FormItem label="产品:">
-            <Input type="text"
-                   size="small"
-                   clearable
-                   v-model="searchData.product_title"
-                   placeholder="请输入产品"></Input>
+            <Select
+              size="small"
+              clearable
+              filterable
+              placeholder="请选择产品"
+              v-model="searchData.product_title"
+            >
+              <Option
+                v-for="(_product, _index) in productList"
+                :key="_index"
+                :value="_product"
+                :label="_product"
+              ></Option>
+            </Select>
           </FormItem>
           <FormItem label="部件:">
-            <Input type="text"
-                   size="small"
-                   clearable
-                   v-model="searchData.part_title"
-                   placeholder="请输入部件"></Input>
+            <Select
+              size="small"
+              clearable
+              filterable
+              filter-by-label
+              placeholder="请选择部件"
+              v-model="searchData.part_title"
+            >
+              <Option
+                v-for="(_part, _index) in partList"
+                :key="_index"
+                :value="_part"
+                :label="_part"
+              ></Option>
+            </Select>
           </FormItem>
-          <FormItem v-for="(item,index) in headerList"
-                    :key="item.title+index"
-                    :label="item.title">
-            <Input type="text"
-                   size="small"
-                   clearable
-                   v-model="item.value"
-                   :placeholder="'请输入'+item.title"></Input>
+          <FormItem
+            v-for="(item, index) in headerList"
+            :key="item.title + index"
+            :label="item.title"
+          >
+            <Input
+              type="text"
+              size="small"
+              clearable
+              v-model="item.value"
+              :placeholder="'请输入' + item.title"
+            ></Input>
           </FormItem>
           <FormItem>
-            <Button @click="initData"
-                    size="small"
-                    type='primary'
-                    style="margin-right:10px;">搜索</Button>
+            <Button
+              @click="handleSearch"
+              size="small"
+              type="primary"
+              style="margin-right:10px;"
+              >搜索</Button
+            >
           </FormItem>
         </Form>
       </div>
       <div class="info">
-        <div><span>工序分类:</span><span>{{infoData.produce_type_title}}</span></div>
-        <div><span>工序:</span><span>{{infoData.produce_title}}</span></div>
-        <div><span>部件总数:</span><span>{{infoData.num||0}}</span></div>
-        <div><span>批量设置班组:</span><span>
-            <Select v-model="group_set_user_id"
-                    size="small"
-                    @on-change="handleSelectedGroupSelect"
-                    clearable
-                    style="width: 150px">
-              <Option v-for="(sitem) in groupList"
-                      :key="sitem.id"
-                      :label="sitem.nickname"
-                      :value="sitem.id">
+        <div>
+          <span>工序分类:</span><span>{{ infoData.produce_type_title }}</span>
+        </div>
+        <div>
+          <span>工序:</span><span>{{ infoData.produce_title }}</span>
+        </div>
+        <div>
+          <span>部件总数:</span><span>{{ infoData.part_num || 0 }}</span>
+        </div>
+        <div>
+          <span>批量设置班组:</span
+          ><span>
+            <Select
+              v-model="group_set_user_id"
+              size="small"
+              @on-change="handleSelectedGroupSelect"
+              clearable
+              style="width: 150px"
+            >
+              <Option
+                v-for="sitem in groupList"
+                :key="sitem.id"
+                :label="sitem.nickname"
+                :value="sitem.id"
+              >
               </Option>
             </Select>
-          </span></div>
+          </span>
+        </div>
       </div>
       <div class="content">
         <div class="content_table">
-          <Table :columns="set_tableColumns"
-                 border
-                 max-height="500"
-                 @on-selection-change="handleSelectionChange"
-                 :data="tableData">
-            <template slot="slotGroup"
-                      slot-scope="{row,index}">
-              <Select v-model="row.employee_id"
-                      size="small"
-                      @on-change="(e)=>handleGroupSelect(e,row,index)"
-                      clearable
-                      style="width: 150px">
-                <Option v-for="(sitem) in groupList"
-                        :key="sitem.id"
-                        :label="sitem.nickname"
-                        :value="sitem.id">
+          <Table
+            :columns="set_tableColumns"
+            border
+            max-height="500"
+            @on-selection-change="handleSelectionChange"
+            :data="tableData"
+          >
+            <template slot="slotGroup" slot-scope="{ row, index }">
+              <Select
+                v-model="row.employee_id"
+                size="small"
+                @on-change="(e) => handleGroupSelect(e, row, index)"
+                clearable
+                style="width: 150px"
+              >
+                <Option
+                  v-for="sitem in groupList"
+                  :key="sitem.id"
+                  :label="sitem.nickname"
+                  :value="sitem.id"
+                >
                 </Option>
               </Select>
             </template>
-            <template slot="slotSet"
-                      slot-scope="{row,index}">
-              <a style="margin:0 5px"
-                 @click="handleSet(row,index)">详情</a>
+            <template slot="slotSet" slot-scope="{ row, index }">
+              <a style="margin:0 5px" @click="handleSet(row, index)">详情</a>
             </template>
           </Table>
         </div>
         <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' />
+          <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>
       </div>
       <div class="footer"></div>
     </div>
-    <Modal v-model="showModal"
-           title="确认派工">
-      <Form :label-width="85"
-            ref='forms'
-            :model="dispatchInfo">
+    <Modal v-model="showModal" title="确认派工">
+      <Form :label-width="85" ref="forms" :model="dispatchInfo">
         <FormItem label="选择时间">
-          <DatePicker :options="options"
-                      style="width:100%;"
-                      v-model="dispatchTime"
-                      clearable
-                      type="daterange"
-                      split-panels
-                      placeholder="请选择日期"></DatePicker>
+          <DatePicker
+            :options="options"
+            style="width:100%;"
+            v-model="dispatchTime"
+            clearable
+            type="daterange"
+            split-panels
+            placeholder="请选择日期"
+          ></DatePicker>
         </FormItem>
         <FormItem label="点工单形式">
           <RadioGroup v-model="dispatchInfo.work_type">
@@ -130,18 +176,15 @@
             <Radio :label="0">否</Radio>
           </RadioGroup>
         </FormItem>
-        <FormItem label="日薪"
-                  v-if="dispatchInfo.work_type == 1">
+        <FormItem label="日薪" v-if="dispatchInfo.work_type == 1">
           <Input v-model="dispatchInfo.user_salary">
-          <span slot="append">元</span>
+            <span slot="append">元</span>
           </Input>
         </FormItem>
-
       </Form>
       <div slot="footer">
         <Button @click="showModal = false">取消</Button>
-        <Button type="primary"
-                @click="handleDispatch">确认</Button>
+        <Button type="primary" @click="handleDispatch">确认</Button>
       </div>
     </Modal>
   </div>
@@ -152,23 +195,26 @@
 // 例如:import 《组件名称》 from '《组件路径》';
 
 export default {
-  name: '',
-  components: {
-
-  },
+  name: "",
+  components: {},
   props: {},
   // import引入的组件需要注入到对象中才能使用
-  data () {
+  data() {
     // 这里存放数据
     return {
-      produce_id: this.$route.query.produce_id || '',
+      produce_id: this.$route.query.produce_id || "",
       tableData: [],
       tableColumns: [
-        { type: 'selection', align: 'center', minWidth: 100, fixed: 'left' },
-        { title: '订单号', align: 'center', key: 'order_no', minWidth: 150 },
-        { title: '项目名称', align: 'center', key: 'client_name', minWidth: 150 },
-        { title: '产品', align: 'center', key: 'product_title', minWidth: 150 },
-        { title: '部件', align: 'center', key: 'part_title', minWidth: 150 },
+        { type: "selection", align: "center", minWidth: 100, fixed: "left" },
+        { title: "订单号", align: "center", key: "order_no", minWidth: 150 },
+        {
+          title: "项目名称",
+          align: "center",
+          key: "client_name",
+          minWidth: 150,
+        },
+        { title: "产品", align: "center", key: "product_title", minWidth: 150 },
+        { title: "部件", align: "center", key: "part_title", minWidth: 150 },
       ],
       tableColumnsAdd: [],
       page_index: 1,
@@ -176,195 +222,254 @@ export default {
       total: 0,
       groupList: [],
       searchData: {
-        client_name: '',
-        product_title: '',
-        part_title: '',
+        client_name: "",
+        product_title: "",
+        part_title: "",
       },
       infoData: {},
       selected: [],
       showModal: false,
       dispatchTime: [],
       dispatchInfo: {},
-      group_set_user_id: '',
+      group_set_user_id: "",
       options: {
-        disabledDate (date) {
+        disabledDate(date) {
           return date && date.valueOf() < Date.now() - 86400000;
-        }
+        },
       },
-      headerList: []
-    }
+      headerList: [],
+      productList: [],
+      partList: [],
+    };
   },
   // 生命周期 - 创建完成(可以访问当前this实例)
-  created () {
+  created() {
     //获取班组列表
-    this.axios('/api/employee_list', { params: { type: 3 } }).then(res => this.groupList = res.data)
+    this.axios("/api/employee_list", { params: { type: 3 } }).then(
+      (res) => (this.groupList = res.data)
+    );
   },
   // 生命周期 - 挂载完成(可以访问DOM元素)
-  mounted () {
-    this.initData()
+  mounted() {
+    this.initData();
   },
   methods: {
-    initData () {
+    initData() {
       this.axios({
-        method: 'get',
-        url: '/api/order_produce_detail',
+        method: "get",
+        url: "/api/order_produce_detail",
         params: {
           produce_id: this.produce_id,
           page_index: this.page_index,
           page_size: this.page_size,
           ...this.searchData,
-          process: this.headerList | []
+          process: this.headerList | [],
+        },
+      }).then((res) => {
+        if (res.code == 200) {
+          this.tableColumnsAdd = [];
+          this.headerList = [];
+          for (const key in res.data.header.process) {
+            const element = res.data.header.process[key];
+            this.tableColumnsAdd.push({
+              title: element,
+              align: "center",
+              key: key,
+              minWidth: 150,
+            });
+            this.headerList.push({ title: element, key: key, value: "" });
+          }
+          this.productList = res.data.header.product_list;
+          this.partList = res.data.header.part_list;
+          this.infoData = res.data.detail;
+          this.tableData = res.data.data;
+          this.tableData.forEach((element) => {
+            Object.assign(element, element.process);
+            element.order_produce_id = element.id;
+            element.employee_id = element.employee_id || 0;
+          });
+          this.total = res.data.total;
         }
+      });
+    },
+    handleSearch() {
+      this.axios({
+        method: "get",
+        url: "/api/order_produce_detail",
+        params: {
+          produce_id: this.produce_id,
+          page_index: this.page_index,
+          page_size: this.page_size,
+          ...this.searchData,
+          // process: JSON.stringify(this.headerList),
+          process: JSON.stringify(this.headerList),
+        },
       }).then((res) => {
-        this.tableColumnsAdd = []
-        this.headerList = []
-        for (const key in res.data.header.process) {
-          const element = res.data.header.process[key];
-          this.tableColumnsAdd.push(
-            { title: element, align: 'center', key: key, minWidth: 150 }
-          )
-          this.headerList.push({ title: element, key: key, value: '' })
+        if (res.code == 200) {
+          this.tableData = res.data.data;
+          this.tableData.forEach((element) => {
+            Object.assign(element, element.process);
+            element.order_produce_id = element.id;
+            element.employee_id = element.employee_id || 0;
+          });
+          this.total = res.data.total;
         }
-        this.infoData = res.data.detail
-        this.tableData = res.data.data
-        this.tableData.forEach(element => {
-          Object.assign(element, element.process)
-          element.order_produce_id = element.id
-          element.employee_id = element.employee_id || 0
-        });
-        this.total = res.data.total
-      }).catch((err) => { });
+      });
+    },
+    goBack() {
+      this.$router.go(-1);
     },
-    goBack () { this.$router.go(-1) },
-    handleSelectionChange (selection) {
-      this.selected = selection
+    handleSelectionChange(selection) {
+      this.selected = selection;
     },
-    handleGroupSelect (e, row, index) {
+    handleGroupSelect(e, row, index) {
       if (this.selected.length > 0) {
-        this.selected.forEach(element => {
+        this.selected.forEach((element) => {
           if (element.id == row.id) {
-            element.employee_id = row.employee_id
+            element.employee_id = row.employee_id;
           }
         });
       }
-      this.tableData[index].employee_id = e
+      this.tableData[index].employee_id = e;
     },
-    handleSelectedGroupSelect (e) {
+    handleSelectedGroupSelect(e) {
       if (this.selected.length > 0) {
         this.selected.forEach((item) => {
-          item.employee_id = JSON.parse(JSON.stringify(e))
+          item.employee_id = JSON.parse(JSON.stringify(e));
           this.tableData.forEach((element, index) => {
             if (element.id == item.id) {
-              element.employee_id = item.employee_id
-              this.tableData.splice(index, 1, item)
+              element.employee_id = item.employee_id;
+              this.tableData.splice(index, 1, item);
             }
           });
-        })
+        });
       }
-      this.selected = []
+      this.selected = [];
     },
-    handleDispatchConfirm () {
+    handleDispatchConfirm() {
       if (this.selected.length == 0) {
-        this.$Message.warning('请选择数据')
+        this.$Message.warning("请选择数据");
       } else {
-        let flag = true
-        console.log(' this.selected :>> ', this.selected);
-        this.selected.forEach(element => {
+        let flag = true;
+        console.log(" this.selected :>> ", this.selected);
+        this.selected.forEach((element) => {
           if (!element.employee_id) {
-            flag = false
+            flag = false;
           }
         });
         if (flag) {
-          this.showModal = true
+          this.showModal = true;
         } else {
-          this.$Message.warning('请选择班组')
+          this.$Message.warning("请选择班组");
         }
       }
     },
-    handleDispatch () {
+    handleDispatch() {
       if (!this.dispatchTime[0]) {
-        this.$Message.warning('请选择起始时间')
+        this.$Message.warning("请选择起始时间");
       } else {
-        this.dispatchInfo.start_time = new Date(this.dispatchTime[0]).toLocaleDateString().replace(/\//g, "-")
-        this.dispatchInfo.end_time = new Date(this.dispatchTime[1]).toLocaleDateString().replace(/\//g, "-")
-        const subArr = []
-        this.selected.forEach(element => {
-          element.start_time = this.dispatchInfo.start_time
-          element.end_time = this.dispatchInfo.end_time
-          element.work_type = this.dispatchInfo.work_type
-          subArr.push({ start_time: element.start_time, end_time: element.end_time, work_type: element.work_type, employee_id: element.employee_id, order_produce_id: element.order_produce_id, user_salary: element.user_salary })
+        this.dispatchInfo.start_time = new Date(this.dispatchTime[0])
+          .toLocaleDateString()
+          .replace(/\//g, "-");
+        this.dispatchInfo.end_time = new Date(this.dispatchTime[1])
+          .toLocaleDateString()
+          .replace(/\//g, "-");
+        const subArr = [];
+        this.selected.forEach((element) => {
+          element.start_time = this.dispatchInfo.start_time;
+          element.end_time = this.dispatchInfo.end_time;
+          element.work_type = this.dispatchInfo.work_type;
+          subArr.push({
+            start_time: element.start_time,
+            end_time: element.end_time,
+            work_type: element.work_type,
+            employee_id: element.employee_id,
+            order_produce_id: element.order_produce_id,
+            user_salary: element.user_salary,
+          });
         });
         this.axios({
-          method: 'post',
-          url: '/api/order_produce_pull',
+          method: "post",
+          url: "/api/order_produce_pull",
           data: {
-            ...subArr
-          }
-        }).then((res) => {
-          this.showModal = false
-          this.$Message.success(res.msg)
-          this.initData()
-        }).catch((err) => { });
+            ...subArr,
+          },
+        })
+          .then((res) => {
+            this.showModal = false;
+            this.$Message.success(res.msg);
+            this.initData();
+          })
+          .catch((err) => {});
       }
     },
-    changePage (e) {
+    changePage(e) {
       this.page_index = e;
-      this.initData()
+      this.initData();
     },
-    changeSize (e) {
+    changeSize(e) {
       this.page_size = e;
-      this.initData()
+      this.initData();
     },
   },
   // 监听属性 类似于data概念
   computed: {
-    set_tableColumns () {
+    set_tableColumns() {
       return [
         ...this.tableColumns,
         ...this.tableColumnsAdd,
         {
-          title: '班组', align: 'center', key: 'title', minWidth: 200,
+          title: "班组",
+          align: "center",
+          key: "title",
+          minWidth: 200,
           render: (h, params) => {
-            const { row, index } = params
-            const currencyRow = this.tableData[index]
-            return h('Select', {
-              props: {
-                value: currencyRow.employee_id,
-                size: 'small'
+            const { row, index } = params;
+            const currencyRow = this.tableData[index];
+            return h(
+              "Select",
+              {
+                props: {
+                  value: currencyRow.employee_id,
+                  size: "small",
+                },
+                on: {
+                  "on-change": (e) => {
+                    currencyRow.employee_id = e;
+                    this.selected.forEach((element) => {
+                      if (element.id == currencyRow.id) {
+                        element.employee_id = e;
+                      }
+                    });
+                  },
+                },
               },
-              on: {
-                'on-change': (e) => {
-                  currencyRow.employee_id = e
-                  this.selected.forEach(element => {
-                    if (element.id == currencyRow.id) {
-                      element.employee_id = e
-                    }
+              [
+                this.groupList.map((item) => {
+                  return h("Option", {
+                    props: { label: item.nickname, value: item.id },
                   });
-                }
-              }
-            }, [
-              this.groupList.map((item) => {
-                return h('Option', { props: { label: item.nickname, value: item.id } })
-              })
-            ])
-          }
+                }),
+              ]
+            );
+          },
         },
-      ]
-    }
+      ];
+    },
   },
   // 监控data中的数据变化
   watch: {},
-  beforeCreate () { }, // 生命周期 - 创建之前
-  beforeMount () { }, // 生命周期 - 挂载之前
-  beforeUpdate () { }, // 生命周期 - 更新之前
-  updated () { }, // 生命周期 - 更新之后
-  beforeDestroy () { }, // 生命周期 - 销毁之前
-  destroyed () { }, // 生命周期 - 销毁完成
-  activated () { }, // 如果页面有keep-alive缓存功能,这个函数会触发
-}
+  beforeCreate() {}, // 生命周期 - 创建之前
+  beforeMount() {}, // 生命周期 - 挂载之前
+  beforeUpdate() {}, // 生命周期 - 更新之前
+  updated() {}, // 生命周期 - 更新之后
+  beforeDestroy() {}, // 生命周期 - 销毁之前
+  destroyed() {}, // 生命周期 - 销毁完成
+  activated() {}, // 如果页面有keep-alive缓存功能,这个函数会触发
+};
 </script>
 
-<style lang='scss' scoped>
+<style lang="scss" scoped>
 .pageSlotStyle {
   display: flex;
   justify-content: center;

ファイルの差分が大きいため隠しています
+ 598 - 305
src/views/OrderMannage/BusinessOrderlist/edit.vue


+ 2 - 0
src/views/OrderMannage/BusinessOrderlist/list.vue

@@ -108,6 +108,7 @@
           >
           <a
             v-if="persimissionData['下生产'] || persimissionData.all"
+            v-show="row.state<4"
             @click="openLower(row, '生产', 'order_oa_people')"
             style="margin: 0 5px"
             >下生产</a
@@ -1015,6 +1016,7 @@ export default {
         });
     },
     openLower(row, title, url) {
+      console.log('row :>> ', row);
       if (!row) {
         return this.$Message.warning("请至少选择一项");
       }

ファイルの差分が大きいため隠しています
+ 631 - 374
src/views/PartsMannage/edit.vue


+ 61 - 25
src/views/ProductMannage/edit.vue

@@ -10,10 +10,10 @@
     </Toptitle>
 
     <div class="page-edit">
-      <Form inline ref="Info" :model="info" :rules="rules">
+      <Form inline ref="Info" :model="info" :rules="rules" :label-width="120">
         <FormItem label="产品分类" prop="bp_id">
           <Select
-            :disabled="type == 3"
+            v-if="type != 3"
             style="width:300px"
             v-model="info.bp_id"
             @on-change="changeProduct"
@@ -25,38 +25,47 @@
               :label="item.title"
             ></Option>
           </Select>
+          <span v-else>{{
+            productFiled.length > 0 && info.bp_id
+              ? productFiled.filter((item) => item.id == info.bp_id)[0].title
+              : ""
+          }}</span>
         </FormItem>
         <FormItem label="产品名称" prop="title">
           <Input
-            :disabled="type == 3"
+            v-if="type != 3"
             v-model="info.title"
             style="width:300px"
             placeholder="请输入产品名称"
-          ></Input>
+          />
+          <span v-else>{{ info.title }}</span>
         </FormItem>
         <FormItem label="计量单位" prop="unit">
           <Input
-            :disabled="type == 3"
+            v-if="type != 3"
             v-model="info.unit"
             style="width:300px"
             placeholder="请输入计量单位"
-          ></Input>
+          />
+          <span v-else>{{ info.unit }}</span>
         </FormItem>
         <FormItem label="型号" prop="model">
           <Input
-            :disabled="type == 3"
+            v-if="type != 3"
             v-model="info.model"
             style="width:300px"
             placeholder="请输入产品型号"
-          ></Input>
+          />
+          <span v-else>{{ info.model }}</span>
         </FormItem>
         <FormItem label="图号" prop="title">
           <Input
-            :disabled="type == 3"
+            v-if="type != 3"
             v-model="info.url_number"
             style="width:300px"
             placeholder="请输入图号"
-          ></Input>
+          />
+          <span v-else>{{ info.url_number }}</span>
         </FormItem>
         <!-- <FormItem label="安全预警" prop='title'>
                     <Input :disabled='type == 3' v-model="info.min_stock" style="width:300px" placeholder="请输入安全预警"></Input>
@@ -109,7 +118,7 @@
         resizable
         border
         ref="xTree"
-        :tree-config="{ children: 'detail' }"
+        :tree-config="treeConfig"
         :data="info.part"
         @toggle-tree-expand="toggleExpandChangeEvent"
       >
@@ -117,7 +126,7 @@
           <template #default="{ row }">
             <Select
               filterable
-              :disabled="type == 3"
+              v-if="type != 3"
               clearable
               transfer
               v-model="row.part_id"
@@ -129,55 +138,64 @@
                 :label="item.title"
               ></Option>
             </Select>
+            <span v-else>{{
+              parts.length > 0 && row.part_id
+                ? parts.filter((item) => item.id == row.part_id)[0].title
+                : ""
+            }}</span>
           </template>
         </vxe-table-column>
         <vxe-table-column field="formula_l" title="高(H)">
           <template #default="{ row,rowIndex }">
             <Input
-              :disabled="type == 3"
+              v-if="type != 3"
               @on-focus="openKey(rowIndex, 'formula_l', row)"
               clearable
               placeholder="请输入公式"
               v-model="row.formula_l"
-            ></Input>
+            />
+            <span v-else>{{ row.formula_l }}</span>
           </template>
         </vxe-table-column>
         <vxe-table-column field="formula_w" title="宽(W)">
           <template #default="{ row,rowIndex }">
             <Input
-              :disabled="type == 3"
+              v-if="type != 3"
               @on-focus="openKey(rowIndex, 'formula_w', row)"
               clearable
               placeholder="请输入公式"
               v-model="row.formula_w"
-            ></Input>
+            />
+            <span v-else>{{ row.formula_w }}</span>
           </template>
         </vxe-table-column>
         <vxe-table-column field="formula_h" title="厚(T)">
           <template #default="{ row,rowIndex }">
             <Input
-              :disabled="type == 3"
+              v-if="type != 3"
               @on-focus="openKey(rowIndex, 'formula_h', row)"
               clearable
               placeholder="请输入公式"
               v-model="row.formula_h"
-            ></Input>
+            />
+            <span v-else>{{ row.formula_h }}</span>
           </template>
         </vxe-table-column>
         <vxe-table-column field="ratio" title="产值比例(%)">
           <template #default="{ row }">
             <Input
-              :disabled="type == 3"
+              v-if="type != 3"
               clearable
               placeholder="请输入产值比例"
               v-model="row.ratio"
-            ></Input>
+            />
+            <span v-else>{{ row.ratio }}</span>
           </template>
         </vxe-table-column>
         <vxe-table-column field="set" width="180" title="操作">
           <template #default="{ row,rowIndex }">
             <Button
-              :disabled="type == 3"
+              v-if="type != 3"
               size="small"
               type="error"
               style="margin-right:10px"
@@ -185,10 +203,9 @@
               >删除</Button
             >
             <Button
-              :disabled="type == 3"
               size="small"
               type="primary"
-              v-if="row.detail"
+              v-if="row.detail&&type != 3"
               @click="addReplacePart(info.part, rowIndex)"
               >增加替换项</Button
             >
@@ -439,6 +456,8 @@
 
 <script>
 import KeyBoard from "../../components/keyboard/index";
+import XEUtils from "xe-utils";
+
 export default {
   data() {
     return {
@@ -515,6 +534,7 @@ export default {
       attrName: "",
       headers: { Authorization: localStorage.getItem("token") },
       currencyChoose: {},
+      treeConfig: { children: "detail" },
     };
   },
   created() {
@@ -684,8 +704,19 @@ export default {
       if (row.detail) {
         this.info.part.splice(n, 1);
       } else {
-        let idx = row.index.split(",");
-        this.info.part[idx[0]].detail.splice(idx[1], 1);
+        console.log("row :>> ", row);
+        // let idx = row.index.split(",");
+        // this.info.part[idx[0]].detail.splice(idx[1], 1);
+        console.log("this.treeConfig :>> ", this.treeConfig);
+        const matchObj = XEUtils.findTree(
+          this.info.part,
+          (item) => item === row,
+          this.treeConfig
+        );
+        if (matchObj) {
+          // 从树节点中移除
+          matchObj.items.splice(matchObj.index, 1);
+        }
       }
     },
     openKey(row, attr, cur) {
@@ -908,4 +939,9 @@ export default {
   color: red;
 } //穿透iview
 // .key-co{transform: scale(.9);}
+/deep/.ivu-form-item-content {
+  span {
+    vertical-align: middle;
+  }
+}
 </style>

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

@@ -111,6 +111,7 @@
                 type="primary"
                 style="cursor:default;border-radius:0"
                 ghost
+                @click="handleProductAllClick(tableData)"
                 >产品名称</Button
               >
             </div>
@@ -563,6 +564,9 @@ export default {
         },
       });
     },
+    handleProductAllClick(product){
+      
+    },
     handleProductClick(product, type) {
       product.isSelect = !product.isSelect;
       this.currentProductList = product;

+ 1 - 1
src/views/ProductionOrderList/InboundForm/index.vue

@@ -127,7 +127,7 @@ export default {
                 ? "未包装"
                 : params.row.sub_state == 2
                 ? "包装中"
-                : "包装"
+                : "包装完成"
             ),
         },
         {

+ 3 - 1
vue.config.js

@@ -1,6 +1,6 @@
 const axios_default_ip =
     process.env.NODE_ENV == 'dev' ?
-    'http://121.41.102.225:82' :
+    'http://124.71.176.88:882' :
     process.env.NODE_ENV == 'test-prd' ?
     'http://124.71.176.88:882' //测试服
     :
@@ -9,6 +9,8 @@ const axios_default_ip =
     :
     'http://124.71.176.88:82';
 //  http://124.71.176.88:882  //江山
+// 'http://121.41.102.225:82' :测试
+
 process.env.VUE_APP_BASE_URL = axios_default_ip;
 module.exports = {
     publicPath: './',

この差分においてかなりの量のファイルが変更されているため、一部のファイルを表示していません