Andy 3 år sedan
förälder
incheckning
909a1d2df0

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

@@ -870,6 +870,7 @@
           <FormItem label="产品分类">
             <el-cascader
               clearable
+              transfer
               v-model="PDTEdit.type_id"
               size="small"
               style="width: 120px"

+ 3 - 1
src/views/BidSystem/ContractList/list.vue

@@ -516,8 +516,8 @@ export default {
         },
         { is_show: true, key: "set", value: "操作", title: "操作" },
       ],
-
       warningList: [],
+      oa_id: "",
     };
   },
   // 生命周期 - 创建完成(可以访问当前this实例)
@@ -542,6 +542,7 @@ export default {
         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(
@@ -562,6 +563,7 @@ export default {
         case 1:
           this.processModal = true;
           this.order_no = row.order_no;
+          this.oa_id = row.oa_id;
           break;
         case 2:
           this.$router.push({

+ 66 - 2
src/views/BidSystem/DeepeningOrder/detail.vue

@@ -3,6 +3,12 @@
     <Toptitle :title="type == 2 ? '深化单编辑' : '深化单详情'">
       <slot name="titleButton">
         <Button
+          @click="handleFinish()"
+          type="primary"
+          style="margin-right: 10px"
+          >完成</Button
+        >
+        <Button
           @click="showSupModal = true"
           v-show="!isChecked"
           type="primary"
@@ -192,6 +198,7 @@
                 v-show="item.isCurrencyArea"
                 :columns="tableColumns"
                 max-height="600"
+                @on-selection-change="handleSelection"
                 :data="item.product"
                 border
               >
@@ -311,7 +318,29 @@
                   ></Option>
                 </Select>
               </FormItem>
-              <FormItem label="状态:">
+              <FormItem label="是否完成:">
+                <Select
+                  clearable
+                  v-model="searchData.status"
+                  size="small"
+                  style="width:120px"
+                >
+                  <Option label="是" :value="1"></Option>
+                  <Option label="否" :value="0"></Option>
+                </Select>
+              </FormItem>
+              <FormItem label="是否下拆单:">
+                <Select
+                  clearable
+                  v-model="searchData.sub_state"
+                  size="small"
+                  style="width:120px"
+                >
+                  <Option label="是" :value="2"></Option>
+                  <Option label="否" :value="1"></Option>
+                </Select>
+              </FormItem>
+              <!-- <FormItem label="状态:">
                 <Select
                   clearable
                   v-model="searchData.sub_state"
@@ -321,7 +350,7 @@
                   <Option label="已完成" :value="1"></Option>
                   <Option label="未完成" :value="0"></Option>
                 </Select>
-              </FormItem>
+              </FormItem> -->
               <FormItem>
                 <Button @click="getListData" type="primary" size="small"
                   >搜索</Button
@@ -790,6 +819,7 @@ export default {
         ],
       },
       tableColumns: [
+        { type: "selection", align: "center", minWidth: 60 },
         { title: "序号", key: "index", align: "center", minWidth: 80 },
         { title: "产品名称", key: "title", align: "center", minWidth: 140 },
         { title: "数量", key: "num", align: "center", minWidth: 80 },
@@ -1052,10 +1082,43 @@ export default {
     },
     handleCurTabChange(name) {
       this.currencyTab = name;
+      this.selected = [];
       if (name == "name2" && this.listTableData.length < 1) {
         this.getListData();
       }
     },
+    handleFinish() {
+      if (this.selected.length < 1) {
+        this.$Message.warning("请选择数据");
+      } else {
+        const order_area_product_id = this.selected.map(
+          (item) => item.order_area_product_id || item.id
+        );
+        this.$Modal.confirm({
+          title: "确认完成?",
+          // content: "此操作确认后不可恢复,请确认!",
+          onOk: () => {
+            this.axios({
+              method: "post",
+              url: "/api/order_area_product_status",
+              data: {
+                order_area_product_id,
+              },
+            }).then((res) => {
+              if (res.doce == 200) {
+                this.$Message.success(res.msg);
+                this.initData(
+                  this.formData.order_no,
+                  this.tempPDTIndex,
+                  this.oa_id
+                );
+              }
+            });
+          },
+          onCancel: () => {},
+        });
+      }
+    },
     changePage(e) {
       this.page_index = e;
       this.getListData();
@@ -1098,6 +1161,7 @@ export default {
             });
           });
         this.tableColumns = [
+          { type: "selection", align: "center", minWidth: 60 },
           { title: "序号", key: "index", align: "center", minWidth: 80 },
           {
             title: "产品名称",

+ 5 - 2
src/views/BidSystem/DeepeningOrder/edit.vue

@@ -231,6 +231,7 @@
                 emitPath: false,
                 checkStrictly: true,
               }"
+              @change="handleTypeTitleChange"
             ></el-cascader>
             <!-- @change="changeProduct(tableData[index], index)" -->
             <span v-else>{{ tableData[index].type_title }}</span>
@@ -433,7 +434,7 @@ export default {
       tableColumns: [
         {
           title: "序号",
-          key: "index",
+          type: "index",
           align: "center",
           width: "80",
           resizable: true,
@@ -657,7 +658,6 @@ export default {
           if (!el.type_id) {
             el.type_id = this.formData.type_id;
           }
-          el.type_title = this.get_type_title(this.cascader_list, el)[0];
         });
         let tempArr = [];
         this.measureList = res.data.measures;
@@ -759,6 +759,9 @@ export default {
         row.url.push(res.data.url);
       });
     },
+    handleTypeTitleChange(e){
+
+    }
   },
   // 监听属性 类似于data概念
   computed: {},

+ 17 - 5
src/views/BidSystem/DeepeningOrder/info.vue

@@ -181,7 +181,7 @@
                   </span>
                 </template>
                 <template slot="statusSlot" slot-scope="{ row }">
-                  {{ row.sub_state >= 2 ? "已完成" : "未完成" }}
+                  {{ row.status == 1 ? "已完成" : "未完成" }}
                 </template>
                 <template slot="set" slot-scope="{ row, index }">
                   <a
@@ -271,15 +271,26 @@
                   ></Option>
                 </Select>
               </FormItem>
-              <FormItem label="状态:">
+              <FormItem label="是否完成:">
+                <Select
+                  clearable
+                  v-model="searchData.status"
+                  size="small"
+                  style="width:120px"
+                >
+                  <Option label="是" :value="1"></Option>
+                  <Option label="否" :value="0"></Option>
+                </Select>
+              </FormItem>
+              <FormItem label="是否下拆单:">
                 <Select
                   clearable
                   v-model="searchData.sub_state"
                   size="small"
                   style="width:120px"
                 >
-                  <Option label="已完成" :value="1"></Option>
-                  <Option label="未完成" :value="0"></Option>
+                  <Option label="是" :value="2"></Option>
+                  <Option label="否" :value="1"></Option>
                 </Select>
               </FormItem>
               <FormItem>
@@ -379,7 +390,7 @@
             border
           >
             <template slot="statusSlot" slot-scope="{ row }">
-              {{ row.sub_state >= 2 ? "已完成" : "未完成" }}
+              {{ row.status == 1 ? "已完成" : "未完成" }}
             </template>
             <template slot="set" slot-scope="{ row, index }">
               <a
@@ -1474,6 +1485,7 @@ export default {
     },
     handleCurTabChange(name) {
       this.currencyTab = name;
+      this.selected = [];
       if (name == "name2" && this.listTableData.length < 1) {
         this.getListData();
       }

+ 5 - 2
src/views/BidSystem/DeepeningOrder/list.vue

@@ -60,13 +60,13 @@
         <div>
           <a
             style="margin: 0 5px"
-            :disabled="row.deep_status != 2"
+            :disabled="row.deep_status != 1"
             @click="handleSet(row, index, 1)"
             >下拆单</a
           >
           <a
             style="margin: 0 5px"
-            :disabled="row.deep_status == 2"
+            :disabled="row.deep_status != 1"
             @click="handleSet(row, index, 2)"
             >编辑</a
           >
@@ -264,6 +264,7 @@ export default {
       process_end_time: "",
       order_no: "",
       warningList: [],
+      oa_id:''
     };
   },
   // 生命周期 - 创建完成(可以访问当前this实例)
@@ -291,6 +292,7 @@ export default {
           url: "/api/order_area_pull",
           params: {
             order_no: this.order_no,
+            oa_id: this.oa_id,
             sub_status: 2,
             process_man: this.process_man,
             process_start_time: this.func.replaceDateNoHMS(
@@ -313,6 +315,7 @@ export default {
         case 1:
           this.processModal = true;
           this.order_no = row.order_no;
+          this.oa_id = row.oa_id;
           // this.$Modal.confirm({
           //   title: '确认拆单?',
           //   content: '确认后订单将下至拆单,请确认!',

+ 129 - 89
src/views/BidSystem/ProductDeOrder/deorderdetail.vue

@@ -3,6 +3,12 @@
     <Toptitle :title="type == 1 ? '拆单编辑' : '拆单详情'">
       <slot name="titleButton">
         <Button
+          @click="handleFinish()"
+          type="primary"
+          style="margin-right: 10px"
+          >完成</Button
+        >
+        <Button
           @click="goback()"
           type="primary"
           ghost
@@ -286,18 +292,22 @@
             <!-- v-show="_item.display" -->
             <!-- v-show="_item.list && _item.list.length > 0" -->
             <div class="tit_box">
-            <span :class="['box-us']" @click="setBoxChange(item, _item)">{{
-              _item.type_title
-            }}</span></div>
+              <span :class="['box-us']" @click="setBoxChange(item, _item)">{{
+                _item.type_title
+              }}</span>
+            </div>
             <div class="radio-box">
-            <div
-              v-for="__item in _item.list"
-              @click="setRadioChange(_item, __item, index, partsItem, item.cld)"
-              :class="['radio-us', __item.show ? 'radio-us-foc' : '']"
-              :key="__item.id"
-            >
-             {{ __item.title }}
-            </div></div>
+              <div
+                v-for="__item in _item.list"
+                @click="
+                  setRadioChange(_item, __item, index, partsItem, item.cld)
+                "
+                :class="['radio-us', __item.show ? 'radio-us-foc' : '']"
+                :key="__item.id"
+              >
+                {{ __item.title }}
+              </div>
+            </div>
           </div>
           <!-- <div class="radio-g">
             <div @click="setRadioChange(item, _item, index, partsItem)"
@@ -1679,43 +1689,38 @@ export default {
               ); //工艺属性列表
               this.axios("/api/parts_detail", {
                 params: { id: element.part_id },
-              })
-                .then((re) => {
-                  // element.company = re.data.company
-                  element.isAddPart = true;
-                  element.isAddProcessRoute = true;
-                  element.parts_type = re.data.p_id;
-                  // element.part_id = re.data.title
-                  this.axios({
-                    method: "get",
-                    url: "/api/parts_index",
-                    params: {
-                      bp_id: element.parts_type,
-                    },
-                  })
-                    .then((r) => {
-                      element.partsNameList = r.data.data;
-                      if (isEditItem) {
-                        let item = isEditItem;
-                        // let item = JSON.parse(JSON.stringify(isEditItem));
-                        item.parts.forEach((element) => {
-                          console.log("element :>> ", element);
-                          element.processCombination = element.route_id;
-                          let obj = { value: element.route_id, label: "" };
-                          this.handleProcessRouteSelect(element, obj);
-                        });
-                        isEditItem = item;
-                      }
-                      this.$forceUpdate();
-                    })
-                    .catch((err) => {});
-                  element.company = re.data.company;
-                  // element.partsNameList = [{ id: re.data.id, title: re.data.title }]
-                  element.pay_state = re.data.label;
-                  // element.partsWoodTableData = re.data.detail;
-                  this.showSimilarProductModal = false;
-                })
-                .catch((err) => {});
+              }).then((re) => {
+                // element.company = re.data.company
+                element.isAddPart = true;
+                element.isAddProcessRoute = true;
+                element.parts_type = re.data.p_id;
+                // element.part_id = re.data.title
+                this.axios({
+                  method: "get",
+                  url: "/api/parts_index",
+                  params: {
+                    bp_id: element.parts_type,
+                  },
+                }).then((r) => {
+                  element.partsNameList = r.data.data;
+                  if (isEditItem) {
+                    let item = isEditItem;
+                    // let item = JSON.parse(JSON.stringify(isEditItem));
+                    item.parts.forEach((element) => {
+                      element.processCombination = element.route_id;
+                      let obj = { value: element.route_id, label: "" };
+                      this.handleProcessRouteSelect(element, obj);
+                    });
+                    isEditItem = item;
+                  }
+                  this.$forceUpdate();
+                });
+                element.company = re.data.company;
+                // element.partsNameList = [{ id: re.data.id, title: re.data.title }]
+                element.pay_state = re.data.label;
+                // element.partsWoodTableData = re.data.detail;
+                this.showSimilarProductModal = false;
+              });
               let obj = { value: element.part_id };
               this.handlePartsNameSelect(element, obj);
             });
@@ -1749,7 +1754,6 @@ export default {
         id: val,
         title: val,
       });
-      item.processCombination = "";
       this.$forceUpdate();
     },
     //新增工艺组合名称
@@ -1780,13 +1784,11 @@ export default {
         id: val,
         title: val,
       });
-      console.log("this.tempProcessAttrList  :>> ", this.tempProcessAttrList);
       this.$forceUpdate();
     },
     // 部件名称
     handlePartsNameSelect(item, val) {
       if (val) {
-        item.processCombination = "";
         if (val.label != val.value) {
           item.isAddPart = false;
           this.axios({
@@ -1824,10 +1826,10 @@ export default {
           });
         } else {
           item.isAddPart = true;
-          item.ProcessAttrList = this.tempProcessAttrList;
-          item.partsWoodTableData = [];
-          item.partsMetalseData = [];
-          item.process_name = "";
+          // item.ProcessAttrList = this.tempProcessAttrList;
+          // item.partsWoodTableData = [];
+          // item.partsMetalseData = [];
+          // item.process_name = "";
         }
       }
     },
@@ -2198,6 +2200,20 @@ export default {
       this.formData.parts.forEach((element) => {
         sum += element.proportion * 1;
       });
+      const BJ_name = this.formData.parts.map((item) => {
+        return item.part_id;
+      });
+      const atfer_BJ_name = Array.from(new Set(BJ_name));
+      if (atfer_BJ_name.length != BJ_name.length) {
+        return this.$Message.error("部件名称存在重复");
+      }
+      const GYLX_name = this.formData.parts.map((item) => {
+        return item.processCombination;
+      });
+      const atfer_GYLX_name = Array.from(new Set(GYLX_name));
+      if (GYLX_name.length != atfer_GYLX_name.length) {
+        return this.$Message.error("工艺路线存在重复");
+      }
       if (sum != 100) {
         this.$Message.error("产值比之和须为100");
       } else {
@@ -2343,6 +2359,28 @@ export default {
     goback() {
       this.$router.go(-1);
     },
+    handleFinish() {
+      this.$Modal.confirm({
+        title: "确认完成?",
+        // content: "此操作确认后不可恢复,请确认!",
+        onOk: () => {
+          this.axios({
+            method: "post",
+            url: "/api/order_area_product_status",
+            data: {
+              orders_area_product_detail_id: this.$route.query
+                .orders_area_product_detail_id,
+            },
+          }).then((res) => {
+            if (res.doce == 200) {
+              this.$Message.success(res.msg);
+              this.initData(this.order_no, this.orders_area_product_detail_id);
+            }
+          });
+        },
+        onCancel: () => {},
+      });
+    },
     successKey(str) {
       if (this.keyUseType == 1) {
         this.formData.parts[this.attrParentindex].partsWoodTableData[
@@ -2560,45 +2598,47 @@ export default {
     display: flex;
     justify-content: flex-start;
     align-items: center;
-    .radio-box{
+    .radio-box {
       display: flex;
       flex-wrap: wrap;
       justify-content: flex-start;
-       border-left: 1px solid  #dedede;
-    .radio-us {
-      background: #f4f5f7;
-      padding: 5px 20px;
-      margin: 5px;
-      margin-right: 18px;
-      color: #999999;
-      border-radius: 15px;
-      border: 1px solid #dedede;
-      cursor: pointer;
+      border-left: 1px solid #dedede;
+      .radio-us {
+        background: #f4f5f7;
+        padding: 5px 20px;
+        margin: 5px;
+        margin-right: 18px;
+        color: #999999;
+        border-radius: 15px;
+        border: 1px solid #dedede;
+        cursor: pointer;
+      }
+      .radio-us-foc {
+        color: #3764ff;
+        background: #fff;
+        border: 1px solid #3764ff;
+      }
     }
-    .radio-us-foc {
-      color: #3764ff;
-      background: #fff;
-      border: 1px solid #3764ff;
-    }}
-    .tit_box{
-    .box-us {
-      background: #f4f5f7;
-      padding: 5px 20px;
-      margin: 5px;
-      margin-right: 18px;
-      color: #999999;
-      border-radius: 5px;
-      border: 1px solid #dedede;
-      cursor: pointer;
-      width: 100px;
-      display: inline-block;
-    text-align: center;
+    .tit_box {
+      .box-us {
+        background: #f4f5f7;
+        padding: 5px 20px;
+        margin: 5px;
+        margin-right: 18px;
+        color: #999999;
+        border-radius: 5px;
+        border: 1px solid #dedede;
+        cursor: pointer;
+        width: 100px;
+        display: inline-block;
+        text-align: center;
+      }
+      .box-us-foc {
+        color: #3764ff;
+        background: #fff;
+        border: 1px solid #3764ff;
+      }
     }
-    .box-us-foc {
-      color: #3764ff;
-      background: #fff;
-      border: 1px solid #3764ff;
-    }}
     .radio-us-none {
       display: none;
     }

+ 1 - 2
src/views/ProductionOrderList/Dispatchlist/confirm.vue

@@ -1,7 +1,7 @@
 <template>
   <div>
     <FullPage
-      title="派工单详情"
+      title="查看详情"
       :list="list"
       @init="init"
       @searchData="init"
@@ -21,7 +21,6 @@
           >批量完成</Button
         >
       </div>
-
       <template slot="set" slot-scope="{ row }">
         <div>
           <a class="map-margin" @click="goOriginalPage(row)">原材料预算</a>