Jelajahi Sumber

销售订单新增 临时计划新增 所属工厂字段必填

jingshuyong 10 bulan lalu
induk
melakukan
a36f455eb3

+ 7 - 0
src/views/productionPlan/components/factoryAdd/index.vue

@@ -622,6 +622,7 @@
           {
             slot: 'factoriesId',
             prop: 'factoriesId',
+             headerSlot: 'headerProduceRoutingId',
             label: '所属工厂',
             align: 'center',
             minWidth: 140
@@ -1101,6 +1102,12 @@
             return;
           }
 
+          if (!v.factoriesId) {
+            flag = false;
+            this.$message.warning('请选择所属工厂');
+            return;
+          }
+
           if (v.requiredFormingNum == 0) {
             flag = false;
             this.$message.warning('要求生产数量不能为0');

+ 14 - 3
src/views/saleOrder/components/create-order.vue

@@ -224,7 +224,7 @@
                 :prop="'productInfoList.' + scope.$index + '.contractNum'"
                 :rules="{
                   required: true,
-                  message: '请输入订单数量',
+                  message: '请输入订单数量且订单数量不能为0',
                   trigger: 'blur'
                 }"
               >
@@ -383,6 +383,11 @@
             align="center"
             prop="factoriesId"
           >
+            <template slot="header" slot-scope="scope">
+              <div class="header_required"
+                ><span class="is-required">所属工厂</span></div
+              >
+            </template>
             <template slot-scope="scope">
               <el-form-item label-width="0px">
                 <el-select
@@ -883,7 +888,7 @@
 
           if (!v.contractNum) {
             flag = false;
-            this.$message.warning('请输入订单数量');
+            this.$message.warning('请输入订单数量且订单数量不能为0');
             break;
           }
 
@@ -894,6 +899,12 @@
             this.$message.warning('请选择工艺路线');
             break;
           }
+
+          if (!v.factoriesId) {
+            flag = false;
+            this.$message.warning('请选择所属工厂');
+            break;
+          }
         }
         // this.form.productInfoList.forEach((v) => {
         //   if (this.isRequired) {
@@ -1086,7 +1097,7 @@
         if (row.productType == 2) {
           let data = [];
           data.push(row);
-          this.$refs.orderHomogeneityInspectDialog.open(data, this.form,'new');
+          this.$refs.orderHomogeneityInspectDialog.open(data, this.form, 'new');
         } else if (row.productType == 3) {
           this.$refs.orderHomogeneityInspectInstallDialog.open([row.id]);
         } else {