|
@@ -1197,152 +1197,152 @@ export default {
|
|
|
console.log('复制的数组',rows);
|
|
|
console.log('列表的数组',this.basicForm.puDemandItemList)
|
|
|
let linArr = []
|
|
|
- for (let i = 0; i<rows.length; i++) {
|
|
|
- console.log('items',rows[i])
|
|
|
- await getRefer({ type: 'MATERIAL_PARAM', code: rows[i] }).then(res => {
|
|
|
- if (res.code === 200) {
|
|
|
- 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,
|
|
|
- deliveryDate: null,
|
|
|
- isUrgency: this.basicForm.billType == 'JJXQ' ? 'Y' : 'N',
|
|
|
- isReplenishment: this.basicForm.billType == 'BDXQ' ? 'Y' : 'N',
|
|
|
- isBatchLock: 'N',
|
|
|
- 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,
|
|
|
- }
|
|
|
- line.businessDept = res.rows[0].businessDepartment
|
|
|
- line.businessDeptName = res.rows[0].businessDepartmentName
|
|
|
- line.materialCode = res.rows[0].code
|
|
|
- line.material = res.rows[0].id
|
|
|
- line.materialName = res.rows[0].name
|
|
|
- line.classifyId = res.rows[0].classifyId
|
|
|
- line.materialClassifyOneName = res.rows[0].oneClass
|
|
|
- line.materialClassifyTwoName = res.rows[0].twoClass
|
|
|
- line.materialClassifyThreeName = res.rows[0].threeClass
|
|
|
- line.materialClassifyFourName = res.rows[0].fourClass
|
|
|
- line.specification = res.rows[0].specification
|
|
|
- line.model = res.rows[0].model
|
|
|
- line.unit = res.rows[0].unitId
|
|
|
- line.unitName = res.rows[0].unitIdName
|
|
|
- line.registrant = res.rows[0].registrant
|
|
|
- line.manufacturerName = res.rows[0].manufacturerIdName
|
|
|
- line.puPeriod = res.rows[0].deliveryPeriod
|
|
|
- line.expiry = res.rows[0].usefulLife
|
|
|
- line.expiryUnit = res.rows[0].expiryUnitIdName
|
|
|
- // line.minPackage = res.rows[0].usefulLife
|
|
|
- line.minPackage = res.rows[0].minPackQty
|
|
|
- line.minOrderQty = res.rows[0].minOrderQty
|
|
|
- line.minBatch = res.rows[0].minBatchQty
|
|
|
- line.safeStock = res.rows[0].safeStock
|
|
|
- line.purOrgName = res.rows[0].purchasingOrganizationName
|
|
|
- line.puOrg = res.rows[0].purchasingOrganization
|
|
|
- // 物料存储条件和运输条件
|
|
|
- line.transportationCondition = res.rows[0].transportationCondition
|
|
|
- line.storageCondition = res.rows[0].storageCondition
|
|
|
- linArr[i] = line
|
|
|
- }
|
|
|
+ // for (let i = 0; i<rows.length; i++) {
|
|
|
+ // console.log('items',rows[i])
|
|
|
+ await getRefer({ type: 'MATERIAL_PARAM', materialCodeList: rows }).then(res => {
|
|
|
+ // if (res.code === 200) {
|
|
|
+ // 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,
|
|
|
+ // deliveryDate: null,
|
|
|
+ // isUrgency: this.basicForm.billType == 'JJXQ' ? 'Y' : 'N',
|
|
|
+ // isReplenishment: this.basicForm.billType == 'BDXQ' ? 'Y' : 'N',
|
|
|
+ // isBatchLock: 'N',
|
|
|
+ // 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,
|
|
|
+ // }
|
|
|
+ // line.businessDept = res.rows[0].businessDepartment
|
|
|
+ // line.businessDeptName = res.rows[0].businessDepartmentName
|
|
|
+ // line.materialCode = res.rows[0].code
|
|
|
+ // line.material = res.rows[0].id
|
|
|
+ // line.materialName = res.rows[0].name
|
|
|
+ // line.classifyId = res.rows[0].classifyId
|
|
|
+ // line.materialClassifyOneName = res.rows[0].oneClass
|
|
|
+ // line.materialClassifyTwoName = res.rows[0].twoClass
|
|
|
+ // line.materialClassifyThreeName = res.rows[0].threeClass
|
|
|
+ // line.materialClassifyFourName = res.rows[0].fourClass
|
|
|
+ // line.specification = res.rows[0].specification
|
|
|
+ // line.model = res.rows[0].model
|
|
|
+ // line.unit = res.rows[0].unitId
|
|
|
+ // line.unitName = res.rows[0].unitIdName
|
|
|
+ // line.registrant = res.rows[0].registrant
|
|
|
+ // line.manufacturerName = res.rows[0].manufacturerIdName
|
|
|
+ // line.puPeriod = res.rows[0].deliveryPeriod
|
|
|
+ // line.expiry = res.rows[0].usefulLife
|
|
|
+ // line.expiryUnit = res.rows[0].expiryUnitIdName
|
|
|
+ // // line.minPackage = res.rows[0].usefulLife
|
|
|
+ // line.minPackage = res.rows[0].minPackQty
|
|
|
+ // line.minOrderQty = res.rows[0].minOrderQty
|
|
|
+ // line.minBatch = res.rows[0].minBatchQty
|
|
|
+ // line.safeStock = res.rows[0].safeStock
|
|
|
+ // line.purOrgName = res.rows[0].purchasingOrganizationName
|
|
|
+ // line.puOrg = res.rows[0].purchasingOrganization
|
|
|
+ // // 物料存储条件和运输条件
|
|
|
+ // line.transportationCondition = res.rows[0].transportationCondition
|
|
|
+ // line.storageCondition = res.rows[0].storageCondition
|
|
|
+ // linArr[i] = line
|
|
|
+ // }
|
|
|
})
|
|
|
console.log('临时数组', linArr)
|
|
|
- }
|
|
|
+ // }
|
|
|
this.basicForm.puDemandItemList.push(...linArr)
|
|
|
console.log('列表', this.basicForm.puDemandItemList)
|
|
|
// this.basicForm.puDemandItemList.forEach(e => {
|