黄梓星 2 年之前
父节点
当前提交
cdaba70f8b
共有 2 个文件被更改,包括 165 次插入5 次删除
  1. 145 5
      src/views/purchase/PurchaseDemandList/add.vue
  2. 20 0
      src/views/purchase/transferOrder/add.vue

+ 145 - 5
src/views/purchase/PurchaseDemandList/add.vue

@@ -1,5 +1,6 @@
 <template>
   <div id="addDemandList">
+    <el-card>
     <span>基本信息</span>
     <el-form :model="basicForm" :rules="basicRules" ref="basic" label-width="auto">
       <el-row :gutter="10">
@@ -153,10 +154,9 @@
     
 
     <span>明细信息</span>
-    <el-card>
       <div class="btn_grooup">
         <el-button type="primary" size="small" @click="addLine" v-if="!sonDisable">增行</el-button>
-        <el-button type="primary" size="small" v-if="!sonDisable">批量调整</el-button>
+        <el-button type="primary" size="small" v-if="!sonDisable" @click="adjustPl">批量调整</el-button>
         <el-button type="primary" size="small" v-if="sonPageStu == 'check' || sonPageStu == 'edit'" @click="showReserved">货权预留单</el-button>
       </div>
 
@@ -458,8 +458,8 @@
           </template>
         </el-table-column>
       </el-table>
-    </el-card>
   </el-form>
+  </el-card>
 
     <div class="btn_group">
       <el-col :span="1.5">
@@ -482,6 +482,85 @@
       <popDialog ref="materialRefer" @doSubmit="selectMaterial" :single="true" />
 
     </div>
+
+    <!-- 批量调整参数 -->
+    <el-dialog title="批量调整" :visible.sync="adjust.open" width="400px">
+      <el-row style="margin-bottom: 10px;">
+        <el-col :span="6">价格类型</el-col>
+        <el-col :span="14">
+        <el-select clearable size="small" v-model="adjust.priceType">
+          <el-option v-for=" dict in dict.type.sys_price_type" :key="dict.value" :label="dict.label" :value="dict.value">
+          </el-option>
+        </el-select>
+        </el-col>
+      </el-row>
+      <el-row style="margin-bottom: 10px;">
+        <el-col :span="6">采购员</el-col>
+        <el-col :span="14">
+        <el-select clearable size="small" v-model="adjust.purchaseMan" @focus="chooseOrg('CONTACTS_PARAM', true, '采购员')">
+          <el-option v-for="item in purchaseManOptions" :key="item.id" :label="item.name" :value="item.code" />
+        </el-select>
+        </el-col>
+      </el-row>
+      <el-row style="margin-bottom: 10px;">
+        <el-col :span="6">收货仓库</el-col>
+        <el-col :span="14">
+        <el-input clearable size="small" v-model="adjust.warehouseName" @focus="chooseOrg('WAREHOUSE_PARAM', true, '收货仓库')">
+          <el-button size="small" slot="append" icon="el-icon-more" @click="chooseOrg('WAREHOUSE_PARAM', true, '收货仓库')"></el-button>
+        </el-input>
+        </el-col>
+      </el-row>
+      <el-row style="margin-bottom: 10px;">
+        <el-col :span="6">收货货位</el-col>
+        <el-col :span="14">
+        <el-input clearable size="small" v-model="adjust.allocationName" @focus="adjustHuoWei('ALLOCATION_PARAM', true, '收货货位', adjust.warehouse)">
+          <el-button size="small" slot="append" icon="el-icon-more" @click="adjustHuoWei('ALLOCATION_PARAM', true, '收货货位', adjust.warehouse)"></el-button>
+        </el-input>
+        </el-col>
+      </el-row>
+      <el-row style="margin-bottom: 10px;">
+        <el-col :span="6">业务备注</el-col>
+        <el-col :span="14">
+          <el-input clearable size="small" v-model="adjust.remark"/>
+        </el-col>
+      </el-row>
+      <el-row style="margin-bottom: 10px;">
+        <el-col :span="6">收货地址</el-col>
+        <el-col :span="14">
+          <el-input clearable size="small" v-model="adjust.deliveryAddressName" @focus="chooseOrg('ADDRESS_PARAM', true, '收货地址')">
+            <el-button size="small" slot="append" icon="el-icon-more" @click="chooseOrg('ADDRESS_PARAM', true, '收货地址')"></el-button>
+          </el-input>
+        </el-col>
+      </el-row>
+      <el-row style="margin-bottom: 10px;">
+        <el-col :span="6">收货地址编码</el-col>
+        <el-col :span="14">
+          <el-input disabled clearable size="small" v-model="adjust.deliveryAddress"/>
+        </el-col>
+      </el-row>
+      <el-row style="margin-bottom: 10px;">
+        <el-col :span="6">联系人</el-col>
+        <el-col :span="14">
+          <el-input disabled clearable size="small" v-model="adjust.contacts"/>
+        </el-col>
+      </el-row>
+      <el-row style="margin-bottom: 10px;">
+        <el-col :span="6">联系人电话</el-col>
+        <el-col :span="14">
+          <el-input disabled clearable size="small" v-model="adjust.contactsPhone"/>
+        </el-col>
+      </el-row>
+      <el-row style="margin-bottom: 10px;">
+        <el-col :span="6">详细地址</el-col>
+        <el-col :span="14">
+          <el-input disabled clearable size="small" v-model="adjust.address"/>
+        </el-col>
+      </el-row>
+      <div slot="footer" class="dialog-footer">
+      <el-button size="small" type="primary" @click="confirmAdjust">确 认</el-button>
+      <el-button size="small" @click="adjust.open = false">取 消</el-button>
+      </div>
+    </el-dialog>
   </div>
 </template>
 
@@ -573,7 +652,25 @@ export default {
         }
       },
       isBDXQ: false,
-      isYl: false
+      isYl: false,
+      // 批量调整擦拭
+      adjust: {
+        open: false,
+        priceType: '',
+        purchaseMan: '',
+        purchaseManName: '',
+        warehouse: '',
+        warehouseName: '',
+        allocation: '',
+        allocationName: '',
+        remark:'',
+        deliveryAddress: '',
+        deliveryAddressName: '',
+        contacts: '',
+        contactsPhone: '',
+        address: ''
+      },
+      purchaseManOptions: []
     }
   },
   created() {
@@ -946,10 +1043,32 @@ export default {
           })
         }
       }
-      if(this.referCondition.type == 'CONTACTS_PARAM') {
+      if(this.referCondition.type == 'CONTACTS_PARAM' && this.referCondition.title == '需求人员') {
         this.personOptions = selection
         this.basicForm.demandPersonal = selection[0].code
       }
+      if(this.referCondition.type == 'CONTACTS_PARAM' && this.referCondition.title == '采购员') {
+        this.purchaseManOptions = selection
+        this.adjust.purchaseMan = selection[0].code
+        this.adjust.purchaseManName = selection[0].name
+      }
+      if(this.referCondition.type == 'WAREHOUSE_PARAM' && this.referCondition.title == '收货仓库') {
+        this.adjust.warehouse = selection[0].id
+        this.adjust.warehouseName = selection[0].name
+        this.adjust.allocation = ''
+        this.adjust.allocationName = ''
+      }
+      if(this.referCondition.type == 'ALLOCATION_PARAM' && this.referCondition.title == '收货货位') {
+        this.adjust.allocation = selection[0].id
+        this.adjust.allocationName = selection[0].name
+      }
+      if(this.referCondition.type == 'ADDRESS_PARAM' && this.referCondition.title == '收货地址') {
+        this.adjust.deliveryAddressName = selection[0].name
+        this.adjust.deliveryAddress = selection[0].code
+        this.adjust.contacts = selection[0].contactsName
+        this.adjust.contactsPhone = selection[0].contactsPhone
+        this.adjust.address = selection[0].address
+      }
       if(this.referCondition.type == 'DEPT_PARAM') {
         this.deptOptions = selection
         this.basicForm.demandDept = selection[0].id
@@ -1117,6 +1236,27 @@ export default {
         })
       }
     },
+    // 批量调整
+    adjustPl() {
+      this.adjust.open = true
+    },
+    // 批量调整确认
+    confirmAdjust() {
+      console.log('data', this.adjust)
+    },
+    // 批量调整选择货位
+    adjustHuoWei(type, isPage, title, stordocId) {
+      this.referCondition.type = type
+      this.referCondition.isPage = isPage
+      this.referCondition.title = title
+      // 选择收货货位前先选择收货仓库
+      if (stordocId) {
+        this.referCondition.stordocId = stordocId
+        this.$refs.refer.init(this.referCondition)
+      } else {
+        this.$modal.msgWarning("请先选择收货仓库");
+      }
+    },
   }
 }
 </script>

+ 20 - 0
src/views/purchase/transferOrder/add.vue

@@ -942,6 +942,12 @@ export default {
         this.basicForm.deliveryInventoryOrg = selection[0].id
         this.basicForm.deliveryInventoryOrgCode = selection[0].code
         this.basicForm.deliveryInventoryOrgName = selection[0].name
+        // 清空调出仓库,部门
+        this.basicForm.deliveryWarehouse = ''
+        this.basicForm.deliveryWarehouseCode = ''
+        this.basicForm.deliveryWarehouseName = ''
+        this.basicForm.deliveryDept = ''
+        this.basicForm.deliveryDeptName = ''
         // 选择调入库存组织时判断调拨方式
         if (this.basicForm.storageInventoryOrg == this.basicForm.deliveryInventoryOrg) {
           this.basicForm.allotType = '4'
@@ -955,6 +961,9 @@ export default {
         this.basicForm.storageInventory = selection[0].code
         this.basicForm.storageInventoryOrgName = selection[0].name
         this.basicForm.onRouteAffilliation = selection[0].name
+        // 选择调入库存组织清空仓库
+        this.basicForm.storageWarehouse = ''
+        this.basicForm.storageWarehouseName = ''
         // 选择调入库存组织时判断调拨方式
         if (this.basicForm.storageInventoryOrg == this.basicForm.deliveryInventoryOrg) {
           this.basicForm.allotType = '4'
@@ -982,6 +991,11 @@ export default {
         this.basicForm.storageWarehouse = selection[0].id
         this.basicForm.storageWarehouseName = selection[0].name
         console.log('1111', selection[0].csFlag)
+        // 清空调入货位
+        this.materialInfo.forEach(item => {
+          item.storageAllocation = null
+          item.storageAllocationName = null
+        })
         if(selection[0].csFlag == 'N') {
           this.isDRCk = true
         } else {
@@ -994,6 +1008,11 @@ export default {
         this.basicForm.deliveryWarehouseCode = selection[0].code
         this.basicForm.deliveryWarehouseName = selection[0].name
         console.log('2222', selection[0].csFlag)
+        // 清空调出货位
+        this.materialInfo.forEach(item => {
+          item.deliveryAllocation = null
+          item.deliveryAllocationName = null
+        })
         if (selection[0].csFlag == 'N') {
           this.isDCCk = true
         } else {
@@ -1069,6 +1088,7 @@ export default {
       this.referCondition.type = type
       this.referCondition.isPage = isPage
       this.referCondition.title = title
+      this.referCondition.pkOrg = ''
       this.referCondition.stordocId = stordocId
       this.$refs.refer.init(this.referCondition)
     },