|
|
|
@ -397,8 +397,7 @@
|
|
|
|
|
queryById: '/hy/processMaterialsDelivery/queryById', |
|
|
|
|
descriptionRake: '/suppliesstronger/processSuppliesStronger/descriptionName', //查询总库物料组 |
|
|
|
|
wasteMaterialsUrl: '/wastematerials/processWasteMaterials/wasteMaterialsName', //查询账外物料组 |
|
|
|
|
supplierUrl: '/suppliesstronger/processSuppliesStronger/merchandiseNews', //查询总库 |
|
|
|
|
merchandiseNewsList: '/suppliesstronger/processSuppliesStronger/merchandiseNews', |
|
|
|
|
merchandiseNewsList: '/suppliesstronger/processSuppliesStronger/merchandiseNews', //查询总库 |
|
|
|
|
wasteMaterialsList: '/wastematerials/processWasteMaterials/merchandiseNewsName', //账外 |
|
|
|
|
puwwlist: '/unitwaste/processUnitWasteWarehouseCode/queryById', |
|
|
|
|
unitWasteWarehouseList: '/unitwaste/processUnitWasteWarehouseCode/queryById', //查询目标库 |
|
|
|
@ -423,7 +422,9 @@
|
|
|
|
|
materialGroupId: undefined, |
|
|
|
|
accountingAttributesVal: '', |
|
|
|
|
hiegs: true, |
|
|
|
|
hiegkucun: [] |
|
|
|
|
hiegkucun: [], |
|
|
|
|
officePanDaun: null, |
|
|
|
|
officeBUMen: null, |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
props: { |
|
|
|
@ -531,9 +532,27 @@
|
|
|
|
|
|
|
|
|
|
async chaKan(log) { |
|
|
|
|
let pas = await log.target.getValuesPromise(log.rowIds) |
|
|
|
|
console.log("执行了",pas); |
|
|
|
|
if (!!pas[log.index].repertory) { |
|
|
|
|
this.wateNumber = pas[log.index].repertory |
|
|
|
|
// console.log("执行了",pas); |
|
|
|
|
if ( this.hiegkucun.length > 0 && !!pas[log.index].equipment) { |
|
|
|
|
let id= false; |
|
|
|
|
this.hiegkucun.forEach(item => { |
|
|
|
|
// console.log(item,"=========="); |
|
|
|
|
if(pas[log.index].equipment == item.merchandiseNewsId){ |
|
|
|
|
if(this.officePanDaun == 1){ |
|
|
|
|
this.wateNumber = item.materialQuantity; |
|
|
|
|
}else if(this.officePanDaun == 2){ |
|
|
|
|
this.wateNumber = item.residueNumber; |
|
|
|
|
}else{ |
|
|
|
|
this.wateNumber = 0; |
|
|
|
|
} |
|
|
|
|
id = true; |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
if(!id){ |
|
|
|
|
// console.log("执行了") |
|
|
|
|
this.wateNumber = 0; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} else { |
|
|
|
|
this.wateNumber = 0 |
|
|
|
|
} |
|
|
|
@ -546,7 +565,7 @@
|
|
|
|
|
this.materialGroupId = undefined |
|
|
|
|
// this.fetchData(this.accountingAttributesVal); |
|
|
|
|
// this.fetchMerchandiseNews(); |
|
|
|
|
if (this.deliveryType !== 1) { |
|
|
|
|
if (this.deliveryType !== 1 && this.isOffice != 1) { |
|
|
|
|
// console.log("执行账外") |
|
|
|
|
//账外 |
|
|
|
|
await this.fetchMerchandiseNewsZW() |
|
|
|
@ -724,7 +743,7 @@
|
|
|
|
|
|
|
|
|
|
// 根据请发数量计算 |
|
|
|
|
if (record.column.key == 'pleaseSendNumber' && isMA || record.column.key == 'actualSendNumber' && isMA) { |
|
|
|
|
console.log("执行了333333333333",record.row) |
|
|
|
|
// console.log("执行了333333333333",record.row) |
|
|
|
|
let res = record.row; |
|
|
|
|
// let materialName = {} |
|
|
|
|
// this.bigIdMerchandiseNewsList.forEach(item => { |
|
|
|
@ -1426,13 +1445,13 @@
|
|
|
|
|
if (formData.processMaterialsDeliveryListList.length > 0) { |
|
|
|
|
|
|
|
|
|
formData.processMaterialsDeliveryListList.forEach(item => { |
|
|
|
|
if (!item.actualSendNumber) { |
|
|
|
|
if (!item.actualSendNumber || parseInt(item.actualSendNumber) < 1) { |
|
|
|
|
qing = true |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
if (qing) { |
|
|
|
|
console.log('============', qing) |
|
|
|
|
this.$message.warning('请填写实发数!!!') |
|
|
|
|
// console.log('============', qing) |
|
|
|
|
this.$message.warning('请填写实发数或实发数不能为0!!!') |
|
|
|
|
} else { |
|
|
|
|
let method = 'put' |
|
|
|
|
httpAction(this.url.edit, formData, method).then((res) => { |
|
|
|
@ -1444,11 +1463,11 @@
|
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
console.log('所有数据========', formData) |
|
|
|
|
// console.log('所有数据========', formData) |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
if (!qing) { |
|
|
|
|
console.log('============', qing) |
|
|
|
|
// console.log('============', qing) |
|
|
|
|
this.$emit('passTask') |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -1498,7 +1517,7 @@
|
|
|
|
|
formData.deliveryType = this.deliveryType |
|
|
|
|
formData.isOffice = this.isOffice |
|
|
|
|
if (!formData.tableName) formData.tableName = this.processData.businessTable |
|
|
|
|
console.log('格式化后的数据', formData) |
|
|
|
|
// console.log('格式化后的数据', formData) |
|
|
|
|
var url = this.url.addDeliveryApply |
|
|
|
|
let method = 'post' |
|
|
|
|
if (!this.isNew) { |
|
|
|
@ -1529,7 +1548,7 @@
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
console.log('提交方法', method) |
|
|
|
|
// console.log('提交方法', method) |
|
|
|
|
if (this.btndisabled === false) { |
|
|
|
|
this.btndisabled = true |
|
|
|
|
httpAction(url, formData, method).then((res) => { |
|
|
|
@ -1560,7 +1579,7 @@
|
|
|
|
|
} |
|
|
|
|
let formData = this.classifyIntoFormData(allValues) |
|
|
|
|
formData.fileId = getStringArry(formData.fileId) |
|
|
|
|
console.log('所有数据', formData) |
|
|
|
|
// console.log('所有数据', formData) |
|
|
|
|
if (new Date(formData.createTime).getTime() / 100 > new Date(formData.deliveryTime).getTime() / 100) { |
|
|
|
|
this.$message.error('出库时间不能小于当前流程发起时间') |
|
|
|
|
return |
|
|
|
@ -1590,14 +1609,14 @@
|
|
|
|
|
formData.deliveryType = this.deliveryType |
|
|
|
|
formData.isOffice = this.isOffice |
|
|
|
|
if (!formData.tableName) formData.tableName = this.processData.businessTable |
|
|
|
|
console.log('格式化后的数据', formData) |
|
|
|
|
// console.log('格式化后的数据', formData) |
|
|
|
|
var url = this.url.add |
|
|
|
|
let method = 'post' |
|
|
|
|
if (!this.isNew) { |
|
|
|
|
url = this.url.edit |
|
|
|
|
method = 'put' |
|
|
|
|
} |
|
|
|
|
console.log('提交方法', method) |
|
|
|
|
// console.log('提交方法', method) |
|
|
|
|
if (this.btndisabled === false) { |
|
|
|
|
this.btndisabled = true |
|
|
|
|
httpAction(url, formData, method).then((res) => { |
|
|
|
@ -1632,7 +1651,15 @@
|
|
|
|
|
this.data = getRecord(this.data) |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
console.log('回显数据', this.data) |
|
|
|
|
// console.log('回显数据', this.data) |
|
|
|
|
if(!!this.data.isOffice){ |
|
|
|
|
//小队 |
|
|
|
|
this.officePanDaun = this.data.isOffice; |
|
|
|
|
this.officeBUMen = this.data.departId; |
|
|
|
|
}else if(!this.data.isOffice && this.data.deliveryType == 1) { |
|
|
|
|
//项目部 |
|
|
|
|
this.officePanDaun = this.data.deliveryType; |
|
|
|
|
} |
|
|
|
|
let fieldval = pick(this.data, 'id', 'deliveryType', 'company', 'createTime', 'departId', 'createBy', 'materialType', 'deliveryTime', 'fileId', 'opinion', 'isOffice') |
|
|
|
|
this.$nextTick(() => { |
|
|
|
|
this.form.setFieldsValue(fieldval) |
|
|
|
@ -1646,6 +1673,7 @@
|
|
|
|
|
|
|
|
|
|
/** 查询某个tab的数据 */ |
|
|
|
|
requestSubTableData(url, params, tab, success) { |
|
|
|
|
// console.log("url, params, tab, success",url, params, tab, success) |
|
|
|
|
tab.loading = true |
|
|
|
|
getAction(url, params).then(res => { |
|
|
|
|
let { result } = res |
|
|
|
@ -1659,14 +1687,36 @@
|
|
|
|
|
} |
|
|
|
|
this.hiegkucun = []; |
|
|
|
|
let numb = []; |
|
|
|
|
dataSource.forEach(it =>{ |
|
|
|
|
getAction(this.url.supplierUrl,{merchandiseNewsId:it.equipment}).then( res =>{ |
|
|
|
|
// console.log("-=-=-=-=",res.result[0]); |
|
|
|
|
numb.push(res.result[0]); |
|
|
|
|
}) |
|
|
|
|
}); |
|
|
|
|
if(!!this.officePanDaun && !this.actualNumber){ |
|
|
|
|
if(this.officePanDaun == 1){ |
|
|
|
|
dataSource.forEach(it =>{ |
|
|
|
|
//项目部库存数据 |
|
|
|
|
getAction(this.url.merchandiseNewsList,{merchandiseNewsId:it.equipment,}).then( res =>{ |
|
|
|
|
// console.log("-=-=-=-=111111111111",res.result[0]); |
|
|
|
|
numb.push(res.result[0]); |
|
|
|
|
}); |
|
|
|
|
}); |
|
|
|
|
}else if(this.officePanDaun == 2){ |
|
|
|
|
|
|
|
|
|
getAction(this.url.queryPageDepare,{id:this.officeBUMen}).then(res =>{ |
|
|
|
|
// console.log("-=-=-=0=-ioaesgr",res); |
|
|
|
|
if(res.success){ |
|
|
|
|
//小队 |
|
|
|
|
dataSource.forEach(it =>{ |
|
|
|
|
getAction(this.url.wasteMaterialsList,{ merchandiseNewsId:it.equipment,departId: res.result.parentId}).then( res =>{ |
|
|
|
|
// console.log("-=-=-=-=2222222222222",res.result[0]); |
|
|
|
|
numb.push(res.result[0]); |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
this.hiegkucun = numb; |
|
|
|
|
console.log('tab.dataSource', dataSource) |
|
|
|
|
// console.log('tab.dataSource', dataSource) |
|
|
|
|
dataSource.forEach(item => { |
|
|
|
|
let par = { id: item.materialGroup } |
|
|
|
|
let param = { id: item.equipment } |
|
|
|
|