zhouhao hace 2 años
padre
commit
6863d5ce85
Se han modificado 1 ficheros con 14 adiciones y 7 borrados
  1. 14 7
      src/views/supply/pickup/components/pickup_form.vue

+ 14 - 7
src/views/supply/pickup/components/pickup_form.vue

@@ -578,7 +578,13 @@ export default {
           if (this.tableSelection.length < 1) {
             return this.$errorMsg('请选择发货申请单')
           }
-
+        for (let i = 0; i <this.tableSelection.length; i++) {
+          console.log(this.tableSelection[i].warehouseFlag ,999)
+            if (this.tableSelection[i].warehouseFlag == null) {
+              this.$errorMsg('仓库必选')
+              return
+            }        
+        }
           for (let i = 0; i < this.tableSelection.length; i++) {
             if (this.tableSelection[i].warehouseFlag == 2) {
               let el = this.tableSelection[i]
@@ -634,12 +640,7 @@ export default {
       // let correspondName = this.warehouseList.find(o => o.id == this.mainForm.warehouse).name;
 
       let orderList = []
-      for (let i = 0; i <this.tableSelection.length; i++) {
-          if (this.tableSelection[i].warehouseFlag == null || this.tableSelection[i].warehouseFlag == '') {
-            this.$errorMsg('仓库必选')
-            return
-          }        
-      }
+    
       this.tableSelection.forEach(item => {
        
         if (!(item.orderType === 'TRADE' || item.orderType === 'HOME')) {
@@ -718,6 +719,12 @@ export default {
 
     resetForm() {
       this.$refs.mainForm.resetFields()
+      if (this.isFront ===true) {
+        this.mainForm.pickupWay = '2'
+      }
+      if (this.isFront ===false) {
+        this.mainForm.pickupWay = '1'
+      }
       this.deliverList = []
     }
   }