Преглед изворни кода

批量调整加入csflag用于判断货位

黄梓星 пре 1 година
родитељ
комит
e7f760aa74

+ 1 - 1
src/views/purchase/DemandSummary/index.vue

@@ -132,7 +132,7 @@
                 <el-form-item label="物料编码">
                   <el-popover
                     placement="top-start"
-                    width="200"
+                    width="500"
                     trigger="hover"
                     :content="queryParams.names">
                   <el-input slot="reference" clearable size="mini" v-model="queryParams.names" @clear="clearMaterial" style="width: 200px" @paste.native="pasteMe($event)">

+ 56 - 52
src/views/purchase/PurchaseDemandList/add.vue

@@ -625,6 +625,7 @@ export default {
         purchaseManName: '',
         warehouse: '',
         warehouseName: '',
+        csFlag: '',
         allocation: '',
         allocationName: '',
         additionalSupplier: '',
@@ -1320,6 +1321,7 @@ export default {
       if(this.referCondition.type == 'WAREHOUSE_PARAM' && this.referCondition.title == '收货仓库') {
         this.adjust.warehouse = selection[0].id
         this.adjust.warehouseName = selection[0].name
+        this.adjust.csFlag = selection[0].csFlag
         this.adjust.allocation = ''
         this.adjust.allocationName = ''
       }
@@ -1778,60 +1780,61 @@ export default {
     // 批量调整确认
     confirmAdjust() {
       console.log('data', this.adjust)
-      this.basicForm.puDemandItemList.forEach(item => {
-        this.ids.some(val => {
-          if(val == item.id) {
-            if(this.adjust.purchaseMan) {
-              item.buyer = this.adjust.purchaseMan
-              item.buyerName = this.adjust.purchaseManName
-            }
-            if(this.adjust.priceType) {
-              item.priceType = this.adjust.priceType
-            }
-            if(this.adjust.additionalSupplierName) {
-              item.additionalSupplier = this.adjust.additionalSupplier
-              item.additionalSupplierName = this.adjust.additionalSupplierName
-            }
-            if(this.adjust.purOrgName) {
-              item.purOrgName = this.adjust.purOrgName
-              item.puOrg = this.adjust.puOrg
-              item.deliveryWarehouse = this.adjust.warehouse
-              item.deliveryWarehouseName = this.adjust.warehouseName
-              item.deliveryAllocation = this.adjust.allocation
-              item.deliveryAllocationName = this.adjust.allocationName
-              item.deliveryAddressName = this.adjust.deliveryAddressName
-              item.deliveryAddress = this.adjust.deliveryAddress
-              item.contacts = this.adjust.contacts
-              item.contactsPhone = this.adjust.contactsPhone
-              item.address = this.adjust.address
-              item.lastStockOrgName = null
-              item.lastWarehouseName = null
-              item.lastAllocationName = null
-            }
-            if(this.adjust.warehouseName) {
-              item.deliveryWarehouse = this.adjust.warehouse
-              item.deliveryWarehouseName = this.adjust.warehouseName
-              item.deliveryAllocation = this.adjust.allocation
-              item.deliveryAllocationName = this.adjust.allocationName
-            }
-            // if(this.adjust.allocationName) {
-            //   item.deliveryAllocation = this.adjust.allocation
-            //   item.deliveryAllocationName = this.adjust.allocationName
-            // }
-            if(this.adjust.remark) {
-              item.remark = this.adjust.remark
-            }
-            if(this.adjust.deliveryAddressName) {
-              item.deliveryAddressName = this.adjust.deliveryAddressName
-              item.deliveryAddress = this.adjust.deliveryAddress
-              item.contacts = this.adjust.contacts
-              item.contactsPhone = this.adjust.contactsPhone
-              item.address = this.adjust.address
+      if (this.adjust.csFlag == 'N' || this.adjust.csFlag == '' || this.adjust.allocationName) {
+        this.basicForm.puDemandItemList.forEach(item => {
+          this.ids.some(val => {
+            if(val == item.id) {
+              if(this.adjust.purchaseMan) {
+                item.buyer = this.adjust.purchaseMan
+                item.buyerName = this.adjust.purchaseManName
+              }
+              if(this.adjust.priceType) {
+                item.priceType = this.adjust.priceType
+              }
+              if(this.adjust.additionalSupplierName) {
+                item.additionalSupplier = this.adjust.additionalSupplier
+                item.additionalSupplierName = this.adjust.additionalSupplierName
+              }
+              if(this.adjust.purOrgName) {
+                item.purOrgName = this.adjust.purOrgName
+                item.puOrg = this.adjust.puOrg
+                item.deliveryWarehouse = this.adjust.warehouse
+                item.deliveryWarehouseName = this.adjust.warehouseName
+                item.deliveryAllocation = this.adjust.allocation
+                item.deliveryAllocationName = this.adjust.allocationName
+                item.deliveryAddressName = this.adjust.deliveryAddressName
+                item.deliveryAddress = this.adjust.deliveryAddress
+                item.contacts = this.adjust.contacts
+                item.contactsPhone = this.adjust.contactsPhone
+                item.address = this.adjust.address
+              }
+              if(this.adjust.warehouseName) {
+                item.deliveryWarehouse = this.adjust.warehouse
+                item.deliveryWarehouseName = this.adjust.warehouseName
+                item.deliveryAllocation = this.adjust.allocation
+                item.deliveryAllocationName = this.adjust.allocationName
+              }
+              // if(this.adjust.allocationName) {
+              //   item.deliveryAllocation = this.adjust.allocation
+              //   item.deliveryAllocationName = this.adjust.allocationName
+              // }
+              if(this.adjust.remark) {
+                item.remark = this.adjust.remark
+              }
+              if(this.adjust.deliveryAddressName) {
+                item.deliveryAddressName = this.adjust.deliveryAddressName
+                item.deliveryAddress = this.adjust.deliveryAddress
+                item.contacts = this.adjust.contacts
+                item.contactsPhone = this.adjust.contactsPhone
+                item.address = this.adjust.address
+              }
             }
-          }
-          this.adjust.open = false
+            this.adjust.open = false
+          })
         })
-      })
+      } else {
+        this.$modal.notifyWarning('收货仓库存在收货货位,请填写!')
+      }
     },
     // 批量调整选择货位
     adjustHuoWei(type, isPage, title, stordocId) {
@@ -1857,6 +1860,7 @@ export default {
         purchaseManName: '',
         warehouse: '',
         warehouseName: '',
+        csFlag: '',
         allocation: '',
         allocationName: '',
         additionalSupplier: '',