695593266@qq.com 7 месяцев назад
Родитель
Сommit
9f333adab3

+ 1 - 1
src/components/selectionDialog/processRoute.vue

@@ -146,7 +146,7 @@
     methods: {
       open(item) {
         if (item) {
-          this.radio = item.id;
+          this.radio = item.produceRoutingId;
         }
         this.itemData = item;
         this.visible = true;

+ 36 - 3
src/views/beEntrusted/components/create-order.vue

@@ -165,8 +165,28 @@
             </el-form-item>
           </el-col>
 
+          <el-col v-bind="styleResponsive ? { lg: 6, md: 12 } : { span: 6 }">
+            <el-form-item label="紧急程度:">
+              <el-select
+                style="width: 100%"
+                v-model="form.priority"
+                placeholder="请选择"
+                clearable
+                disabled
+              >
+                <el-option
+                  v-for="item in options"
+                  :key="item.value"
+                  :label="item.name"
+                  :value="item.value"
+                >
+                </el-option>
+              </el-select>
+            </el-form-item>
+          </el-col>
+
           <el-col v-bind="styleResponsive ? { lg: 12, md: 18 } : { span: 12 }">
-            <el-form-item label="备注:">
+            <el-form-item label="需求描述:">
               <el-input
                 clearable
                 v-model="form.describes"
@@ -233,7 +253,8 @@
           produceRoutingId: '',
           produceRoutingName: '',
           sourceId: '',
-          sourceCode: ''
+          sourceCode: '',
+          priority: ''
         },
         // 表单验证规则
         rules: {
@@ -242,6 +263,17 @@
           ]
         },
 
+        options: [
+          {
+            name: '一般',
+            value: 1
+          },
+          {
+            name: '紧急',
+            value: 2
+          }
+        ],
+
         routingList: [],
         factoryList: [],
 
@@ -425,7 +457,8 @@
           produceRoutingId: '',
           produceRoutingName: '',
           sourceId: '',
-          sourceCode: ''
+          sourceCode: '',
+          priority: ''
         };
         this.$refs.form.clearValidate();
         this.visible = false;

+ 1 - 167
src/views/beEntrusted/index.vue

@@ -304,38 +304,7 @@
             align: 'center',
             showOverflowTooltip: true
           },
-          // {
-          //   prop: 'bomType',
-          //   label: 'BOM分类',
-          //   align: 'center',
-          //   width: 100,
-          //   showOverflowTooltip: true,
-          //   formatter: (row) => {
-          //     if (row.bomType == 1) {
-          //       return '产品(PBOM)';
-          //     }
-          //     if (row.bomType == 2) {
-          //       return '加工(MBOM)';
-          //     }
-          //     if (row.bomType == 3) {
-          //       return '装配(ABOM)';
-          //     }
-          //     return '';
-          //   }
-          // },
-          // {
-          //   prop: 'bomCategoryVersions',
-          //   label: 'BOM版本',
-          //   align: 'center',
-          //   width: 100,
-          //   showOverflowTooltip: true,
-          //   formatter: (row) => {
-          //     if (row.bomCategoryName) {
-          //       return `${row.bomCategoryName} (V${row.bomCategoryVersions}.0)`;
-          //     }
-          //     return '';
-          //   }
-          // },
+
           {
             prop: 'brandNum',
             label: '牌号',
@@ -474,141 +443,6 @@
         // this.$refs.salesToProductionRef.open(this.selection, type);
       },
 
-      async goProduct() {
-        console.log(this.selection, 'this.selection 33');
-        if (!this.selection.length) {
-          return this.$message.warning('请先勾选一个或多个订单!');
-        }
-        const productCode = this.selection[0].categoryCode;
-        const orderType = this.selection[0].orderType;
-        const produceRoutingId = this.selection[0].produceRoutingId;
-        const measuringUnit = this.selection[0].measuringUnit;
-        const factoriesId = this.selection[0].applyFactoriesId;
-        const factoriesIdName = this.selection[0].applyFactoriesName;
-        const bomCategoryId = this.selection[0].bomCategoryId;
-        const saleType = this.selection[0].saleType;
-        let produceType = this.selection[0].produceType[0];
-        // if(!factoriesId){
-        //   this.$message.warning('工厂未选择!');
-        //   return;
-        // }
-
-        for (var i = 0; i < this.selection.length; i++) {
-          if (productCode != this.selection[i].productCode) {
-            return this.$message.warning('产品编码不一致!');
-          }
-          if (orderType != this.selection[i].orderType) {
-            return this.$message.warning('订单类型不一致!');
-          }
-          if (saleType != this.selection[i].saleType) {
-            return this.$message.warning('销售类型不一致!');
-          }
-          if (produceRoutingId != this.selection[i].produceRoutingId) {
-            return this.$message.warning('工艺路线不一致!');
-          }
-          if (measuringUnit != this.selection[i].measuringUnit) {
-            return this.$message.warning('计量单位不一致!');
-          }
-          if (factoriesId != this.selection[i].factoriesId) {
-            return this.$message.warning('所属工厂不一致!');
-          }
-        }
-        const list = [];
-        let startTime = '';
-        let endTime = '';
-        this.selection.map((item) => {
-          if (!startTime) {
-            startTime = item.releaseTime;
-          } else {
-            startTime =
-              this.compareTimes(startTime, item.releaseTime) == 1
-                ? item.releaseTime
-                : startTime;
-          }
-          if (!endTime) {
-            endTime = item.deliveryTime;
-          } else {
-            endTime =
-              this.compareTimes(endTime, item.deliveryTime) == 2
-                ? item.deliveryTime
-                : endTime;
-          }
-          list.push(item.id);
-        });
-        if (produceRoutingId && !bomCategoryId) {
-          produceType = '';
-        }
-        console.log(this.selection, 'this.selection 3333');
-        let categoryId = this.selection[0].categoryId;
-        let params = { categoryId: categoryId };
-        const res = await listBomType(params);
-        console.log(res, 'res 000');
-        let bomMap = {
-          1: { code: 1, name: 'PBOM' },
-          2: { code: 2, name: 'MBOM' },
-          3: { code: 3, name: 'ABOM' }
-        };
-        let arr = [];
-        res.map((item) => {
-          if (bomMap[item.bomType]) {
-            arr.push(bomMap[item.bomType]);
-            delete bomMap[item.bomType];
-          }
-        });
-        if (arr.length) {
-          let obj = arr.find((el) => el.code == produceType);
-          produceType = obj
-            ? produceType
-            : arr.filter((el) => el.code != 1)?.[0]?.code;
-        }
-        if (arr.length == 0) {
-          produceType = '';
-        }
-        console.log(produceType, 'produceType');
-        console.log(arr, 'arr 222');
-        // const res = await findBomCategoryByCategoryId(categoryId);
-        // let arr = [];
-        // if (res.length > 0) {
-        //   let obj = res.find((item) => item.id === bomCategoryId);
-        //   produceType = obj ? obj.bomType : produceType;
-        //   let listMap = {
-        //     1: { code: 1, name: 'PBOM' },
-        //     2: { code: 2, name: 'MBOM' },
-        //     3: { code: 3, name: 'ABOM' }
-        //   };
-        //   res.forEach((el) => {
-        //     if (listMap[el.bomType]) {
-        //       arr.push(listMap[el.bomType]);
-        //       delete listMap[el.bomType];
-        //     }
-        //   });
-        // }
-        this.$router
-          .push({
-            path: '/saleOrder/salesToProduction',
-            query: {
-              orderType,
-              selection: JSON.stringify(list),
-              produceRoutingId: produceRoutingId,
-              produceRoutingName: this.selection[0].produceRoutingName,
-              categoryId: this.selection[0].categoryId,
-              factoriesId: factoriesId,
-              factoriesIdName: factoriesIdName,
-              bomCategoryId: bomCategoryId,
-              produceType: produceType,
-              startTime,
-              endTime,
-              producedList: JSON.stringify(arr)
-            }
-          })
-          .catch((error) => {
-            // 忽略重复导航错误
-            if (error.name !== 'NavigationDuplicated') {
-              console.error('路由跳转失败:', error);
-            }
-          });
-      },
-
       update(id) {
         update({ id, status: 1 }).then((res) => {
           this.reload();