|
@@ -170,8 +170,8 @@
|
|
|
@selection-change="handleSelectionChange"
|
|
|
:cell-class-name="cellClassName"
|
|
|
>
|
|
|
- <el-table-column show-overflow-tooltip type="selection"/>
|
|
|
- <el-table-column show-overflow-tooltip label="序号" type="index" align="center" width="50px"/>
|
|
|
+ <el-table-column show-overflow-tooltip type="selection" fixed="left"/>
|
|
|
+ <el-table-column show-overflow-tooltip label="序号" type="index" align="center" width="50px" fixed="left"/>
|
|
|
<el-table-column show-overflow-tooltip label="行号" align="center" prop="rowNo">
|
|
|
<template slot-scope="scope">
|
|
|
{{ scope.$index + 1 + '0' }}
|
|
@@ -427,7 +427,7 @@
|
|
|
|
|
|
<Refers ref="refer" @doSubmit="selectionsToInput" :single="true"/>
|
|
|
|
|
|
- <popDialog ref="materialRefer" @doSubmit="selectMaterial" :single="true" />
|
|
|
+ <popDialog ref="materialRefer" @doSubmit="selectMaterial" :single="false" />
|
|
|
|
|
|
|
|
|
<!-- 批量调整参数 -->
|
|
@@ -1318,6 +1318,7 @@ export default {
|
|
|
},
|
|
|
selectMaterial(selection) {
|
|
|
console.log('选中的物料', selection)
|
|
|
+ if (selection.length <= 1) {
|
|
|
// 选择新物料时先清空行内其他信息
|
|
|
this.basicForm.puDemandItemList[this.tableIndex].reservedProportion = null
|
|
|
this.basicForm.puDemandItemList[this.tableIndex].reservedPeriod = null
|
|
@@ -1388,7 +1389,160 @@ export default {
|
|
|
this.basicForm.puDemandItemList[this.tableIndex].transportationCondition = selection[0].transportationCondition
|
|
|
this.basicForm.puDemandItemList[this.tableIndex].storageCondition = selection[0].storageCondition
|
|
|
// 选中骨科耗材时候的物料,需求客户不必填
|
|
|
-
|
|
|
+ } else {
|
|
|
+ console.log('xxxxx', selection)
|
|
|
+ for (let i = 0;i<selection.length;i++) {
|
|
|
+ let line = {
|
|
|
+ contacts: null,
|
|
|
+ id: null,
|
|
|
+ demandId: null,
|
|
|
+ status: null,
|
|
|
+ businessDept: null,
|
|
|
+ businessDeptName: null,
|
|
|
+ materialCategory: null,
|
|
|
+ buyer: null,
|
|
|
+ buyerName: null,
|
|
|
+ mateiralClassifyOne: null,
|
|
|
+ materialClassifyOneName: null,
|
|
|
+ materialClassifyTwo: null,
|
|
|
+ materialClassifyTwoName: null,
|
|
|
+ materialClassifyThree: null,
|
|
|
+ materialClassifyThreeName: null,
|
|
|
+ materialClassifyFour: null,
|
|
|
+ materialClassifyFourName: null,
|
|
|
+ materialCode: null,
|
|
|
+ material: null,
|
|
|
+ materialName: null,
|
|
|
+ classifyId: null,
|
|
|
+ specification: null,
|
|
|
+ unit: null,
|
|
|
+ unitName: null,
|
|
|
+ manufacturerName: null,
|
|
|
+ registrant: null,
|
|
|
+ puPeriod: null,
|
|
|
+ expiryUnit: null,
|
|
|
+ expiry: null,
|
|
|
+ minPackage: null,
|
|
|
+ minOrderQty: null,
|
|
|
+ minBatch: null,
|
|
|
+ safeStock: null,
|
|
|
+ averageQtyMonth: null,
|
|
|
+ qty: null,
|
|
|
+ adjustmentPersonal: null,
|
|
|
+ adjustmentTime: null,
|
|
|
+ manualRegulation: null,
|
|
|
+ updateCause: null,
|
|
|
+ reservedProportion: null,
|
|
|
+ reservedPeriod: null,
|
|
|
+ reservedQty: null,
|
|
|
+ demandPeriod: null,
|
|
|
+ forecastClassify: null,
|
|
|
+ onemonthAvgVolume: null,
|
|
|
+ threemonthAvgVolume: null,
|
|
|
+ puFreight: null,
|
|
|
+ deliveryDate: null,
|
|
|
+ isUrgency: this.basicForm.billType == 'JJXQ' ? 'Y' : 'N',
|
|
|
+ isReplenishment: this.basicForm.billType == 'BDXQ' ? 'Y' : 'N',
|
|
|
+ isBatchLock: 'N',
|
|
|
+ isCustomerSpecified: '',
|
|
|
+ remark: null,
|
|
|
+ puRemark: null,
|
|
|
+ lastWarehouseQty: null,
|
|
|
+ resDemandQty: null,
|
|
|
+ lastWarehouse: null,
|
|
|
+ lastWarehouseName: null,
|
|
|
+ deliveryWarehouse: null,
|
|
|
+ deliveryWarehouseName: null,
|
|
|
+ lastAllocation: null,
|
|
|
+ lastAllocationName: null,
|
|
|
+ deliveryAllocation: null,
|
|
|
+ deliveryAllocationName: null,
|
|
|
+ passageOn: null,
|
|
|
+ puOrg: null,
|
|
|
+ purOrgName: null,
|
|
|
+ lastStockQty: null,
|
|
|
+ superiorCenterQty: null,
|
|
|
+ superiorAllotQty: null,
|
|
|
+ availableQty: null,
|
|
|
+ statusAllot: 'N',
|
|
|
+ additionalSupplier: null,
|
|
|
+ additionalSupplierName: null,
|
|
|
+ periodUnit: null,
|
|
|
+ demandCustomer: this.basicForm.customer,
|
|
|
+ demandCustomerName: this.basicForm.customerName,
|
|
|
+ businessDept: this.basicForm.demandDept,
|
|
|
+ businessDeptName: null,
|
|
|
+ lastStockOrg: null,
|
|
|
+ lastStockOrgName: null,
|
|
|
+ superiorStockOrg: null,
|
|
|
+ superiorStockOrgName: null,
|
|
|
+ allotCode: null,
|
|
|
+ deliveryAddress: null,
|
|
|
+ deliveryAddressName: null,
|
|
|
+ contacts: null,
|
|
|
+ contactsPhone: null,
|
|
|
+ address: null,
|
|
|
+ source: null,
|
|
|
+ priceType: 'order',
|
|
|
+ puManagerApprover: null,
|
|
|
+ puManagerApproverName: null,
|
|
|
+ processTime: null,
|
|
|
+ affirmer: null,
|
|
|
+ tenantId: null,
|
|
|
+ revision: null,
|
|
|
+ createBy: null,
|
|
|
+ createByName: null,
|
|
|
+ createTime: null,
|
|
|
+ updateBy: null,
|
|
|
+ updateByName: null,
|
|
|
+ updateTime: null,
|
|
|
+ delFlag: 0,
|
|
|
+ // 新增字段
|
|
|
+ model: null,
|
|
|
+ storageCondition: null,
|
|
|
+ transportationCondition: null,
|
|
|
+ }
|
|
|
+ // 通过选择物料查询采购员
|
|
|
+ queryMan(selection[i].id).then(res => {
|
|
|
+ if (res.code === 200 && res.rows.length !== 0) {
|
|
|
+ line.buyer = res.rows[0].buyer
|
|
|
+ line.buyerName = res.rows[0].buyerName
|
|
|
+ }
|
|
|
+ })
|
|
|
+ line.businessDept = selection[i].businessDepartment
|
|
|
+ line.businessDeptName = selection[i].businessDepartmentName
|
|
|
+ line.materialCode = selection[i].code
|
|
|
+ line.material = selection[i].id
|
|
|
+ line.materialName = selection[i].name
|
|
|
+ line.classifyId = selection[i].classifyId
|
|
|
+ line.materialClassifyOneName = selection[i].oneClass
|
|
|
+ line.materialClassifyTwoName = selection[i].twoClass
|
|
|
+ line.materialClassifyThreeName = selection[i].threeClass
|
|
|
+ line.materialClassifyFourName = selection[i].fourClass
|
|
|
+ line.specification = selection[i].specification
|
|
|
+ line.model = selection[i].model
|
|
|
+ line.unit = selection[i].unitId
|
|
|
+ line.unitName = selection[i].unitIdName
|
|
|
+ line.registrant = selection[i].registrant
|
|
|
+ line.manufacturerName = selection[i].manufacturerIdName
|
|
|
+ line.puPeriod = selection[i].deliveryPeriod
|
|
|
+ line.expiry = selection[i].usefulLife
|
|
|
+ line.expiryUnit = selection[i].expiryUnitIdName
|
|
|
+ // line.minPackage = selection[i].usefulLife
|
|
|
+ line.minPackage = selection[i].minPackQty
|
|
|
+ line.minOrderQty = selection[i].minOrderQty
|
|
|
+ line.minBatch = selection[i].minBatchQty
|
|
|
+ line.safeStock = selection[i].safeStock
|
|
|
+ line.purOrgName = selection[i].purchasingOrganizationName
|
|
|
+ line.puOrg = selection[i].purchasingOrganization
|
|
|
+ // 物料存储条件和运输条件
|
|
|
+ line.transportationCondition = selection[i].transportationCondition
|
|
|
+ line.storageCondition = selection[i].storageCondition
|
|
|
+ this.basicForm.puDemandItemList.push(line)
|
|
|
+ }
|
|
|
+ // 删除指定下标
|
|
|
+ this.basicForm.puDemandItemList.splice(this.tableIndex,1)
|
|
|
+ }
|
|
|
},
|
|
|
// 明细行选择业务部门参照带出业务部门数据
|
|
|
chooseDept(index, type, isPage, title) {
|