|
|
|
@ -129,6 +129,7 @@
|
|
|
|
|
return { |
|
|
|
|
heid: true, |
|
|
|
|
isabled : true, |
|
|
|
|
disabl : true, //输入控制 |
|
|
|
|
section: { }, //部门id |
|
|
|
|
labelCol: { |
|
|
|
|
xs: { span: 24 }, |
|
|
|
@ -185,6 +186,7 @@
|
|
|
|
|
width: '200px', |
|
|
|
|
placeholder: '请输入${title}', |
|
|
|
|
defaultValue: '', |
|
|
|
|
disabled: this.disabled, |
|
|
|
|
options:[] |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
@ -192,6 +194,7 @@
|
|
|
|
|
key: 'wbs', |
|
|
|
|
type: FormTypes.input, |
|
|
|
|
dictCode: '', |
|
|
|
|
disabled: this.disabled, |
|
|
|
|
width: '200px', |
|
|
|
|
placeholder: '请输入${title}', |
|
|
|
|
defaultValue: '' |
|
|
|
@ -200,7 +203,7 @@
|
|
|
|
|
title: '物料名称及规格型号', |
|
|
|
|
key: 'materialName', |
|
|
|
|
type: FormTypes.sel_search, |
|
|
|
|
disabled: true, |
|
|
|
|
disabled: this.disabled, |
|
|
|
|
dictCode: '', |
|
|
|
|
width: '200px', |
|
|
|
|
placeholder: '请输入${title}', |
|
|
|
@ -220,7 +223,7 @@
|
|
|
|
|
title: '报废数量', |
|
|
|
|
key: 'scrapNumber', |
|
|
|
|
type: FormTypes.inputNumber, |
|
|
|
|
disabled: false, |
|
|
|
|
disabled: this.disabled, |
|
|
|
|
width: '130px', |
|
|
|
|
placeholder: '请输入${title}', |
|
|
|
|
defaultValue: '' |
|
|
|
@ -229,7 +232,7 @@
|
|
|
|
|
title: '单价(元)', |
|
|
|
|
key: 'materialPrice', |
|
|
|
|
type: FormTypes.inputNumber, |
|
|
|
|
disabled: false, |
|
|
|
|
disabled: true, |
|
|
|
|
width: '130px', |
|
|
|
|
placeholder: '请输入${title}', |
|
|
|
|
defaultValue: '' |
|
|
|
@ -249,7 +252,8 @@
|
|
|
|
|
type: FormTypes.date, |
|
|
|
|
width: '200px', |
|
|
|
|
placeholder: '请输入${title}', |
|
|
|
|
defaultValue: '' |
|
|
|
|
defaultValue: '', |
|
|
|
|
disabled: this.disabled |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
title: '供货商', |
|
|
|
@ -267,7 +271,8 @@
|
|
|
|
|
type: FormTypes.input, |
|
|
|
|
width: '200px', |
|
|
|
|
placeholder: '请输入${title}', |
|
|
|
|
defaultValue: '' |
|
|
|
|
defaultValue: '', |
|
|
|
|
disabled: this.disabled |
|
|
|
|
} |
|
|
|
|
// { |
|
|
|
|
// title: '物资报废流程主表id', |
|
|
|
@ -304,6 +309,8 @@
|
|
|
|
|
// processReturnId: {rules:[{ required: true, message: '关联归还流程不能为空!' }]}, |
|
|
|
|
// processPlan: {rules:[ { required: true, message: '请选择流程计划!'}]} |
|
|
|
|
}, |
|
|
|
|
equipmentList:[], |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
props: { |
|
|
|
@ -378,16 +385,73 @@
|
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
methods: { |
|
|
|
|
|
|
|
|
|
onSelect(record){ |
|
|
|
|
if(record.column.key = 'equipment' && !!record.row.id ){ |
|
|
|
|
console.log(record.row,record); |
|
|
|
|
let materialName ={}; |
|
|
|
|
this.equipmentList.forEach( item =>{ |
|
|
|
|
// console.log(item) |
|
|
|
|
if(item.merchandiseNewsId == record.value){ |
|
|
|
|
console.log(item); |
|
|
|
|
materialName = { |
|
|
|
|
equipment : item.merchandiseNewsId, |
|
|
|
|
materialName: item.materialDescription, |
|
|
|
|
materialUnit: item.materialsUnit, |
|
|
|
|
materialGroup: item.materialGroup, |
|
|
|
|
supplierName: item.supplierId, |
|
|
|
|
materialPrice: item.materialPrice, |
|
|
|
|
descriptionId: item.descriptionId, |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
let values = [ |
|
|
|
|
{ |
|
|
|
|
rowKey: record.row.id, |
|
|
|
|
values: { |
|
|
|
|
'equipment': materialName.equipment, |
|
|
|
|
'materialGroup': materialName.materialGroup, |
|
|
|
|
'materialName': materialName.materialName, |
|
|
|
|
'materialUnit': materialName.materialUnit, |
|
|
|
|
'supplierId': materialName.supplierName, |
|
|
|
|
'materialPrice': materialName.materialPrice, |
|
|
|
|
// 'actualSendNumber': materialName.residueNumber, |
|
|
|
|
// 'repertory': materialName.residueNumber |
|
|
|
|
// 'materialAmount': materialName.price * materialName.residueNumber |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
] |
|
|
|
|
this.$refs.processSmaterialsScrapList.setValues(values); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// if(!!record.row.scrapNumber && !!record.row.materialPrice && !! record.row.id){ |
|
|
|
|
// let shut = {}; |
|
|
|
|
// let values = [ |
|
|
|
|
// { |
|
|
|
|
// rowKey: record.row.id, |
|
|
|
|
// values: { |
|
|
|
|
// 'scrapNumber': record.row.scrapNumber > 0 ? record.row.scrapNumber : 1 , |
|
|
|
|
// 'materialAmount': accMul(record.row.scrapNumber,record.row.materialPrice) > 0 ? accMul(record.row.scrapNumber,record.row.materialPrice) : 1 * record.row.materialPrice, |
|
|
|
|
// }, |
|
|
|
|
// }, |
|
|
|
|
// ] |
|
|
|
|
// this.$refs.processSmaterialsScrapList.setValues(values); |
|
|
|
|
// } |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//核算属性切换 |
|
|
|
|
async isMaterialType(val) { |
|
|
|
|
console.log("this.section",this.section); |
|
|
|
|
// console.log("this.section",this.section); |
|
|
|
|
if (val !== undefined) { |
|
|
|
|
this.isabled = false; |
|
|
|
|
this.searchInformation(val); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
//查询账外数据 |
|
|
|
@ -406,6 +470,7 @@
|
|
|
|
|
getAction(this.url.wasteMaterialsUrlList,par).then(res =>{ |
|
|
|
|
if(res.success){ |
|
|
|
|
console.log("156465",res.result.records); |
|
|
|
|
this.equipmentList = res.result.records; |
|
|
|
|
let nu = res.result.records || res.result; |
|
|
|
|
let qc = []; |
|
|
|
|
if (this.processSmaterialsScrapListTable.columns[1].options.length > 0) { |
|
|
|
@ -418,7 +483,6 @@
|
|
|
|
|
disabled: false |
|
|
|
|
}) |
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
this.processSmaterialsScrapListTable.columns[1].options = qc; |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
@ -439,44 +503,6 @@
|
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
onSelect(record){ |
|
|
|
|
// console.log(record.row); |
|
|
|
|
if(!!record.row.scrapNumber && !!record.row.materialPrice && !! record.row.id){ |
|
|
|
|
let shut = {}; |
|
|
|
|
// if(this.processSmaterialsScrapListTable.dataSource.length > 0){ |
|
|
|
|
// let it = this.processSmaterialsScrapListTable.dataSource; |
|
|
|
|
// it.forEach( item =>{ |
|
|
|
|
// // |
|
|
|
|
// if(item.materialGroup === record.row.materialGroup){ |
|
|
|
|
// shut = item; |
|
|
|
|
// } |
|
|
|
|
// }) |
|
|
|
|
// } |
|
|
|
|
// if(!!shut && record.row.scrapNumber > shut.scrapNumber){ |
|
|
|
|
// record.row.scrapNumber = shut.scrapNumber; |
|
|
|
|
// }else if(!!shut && record.row.scrapNumber < shut.scrapNumber){ |
|
|
|
|
// |
|
|
|
|
// }else{ |
|
|
|
|
// |
|
|
|
|
// return; |
|
|
|
|
// } |
|
|
|
|
|
|
|
|
|
let values = [ |
|
|
|
|
{ |
|
|
|
|
rowKey: record.row.id, |
|
|
|
|
values: { |
|
|
|
|
'scrapNumber': record.row.scrapNumber > 0 ? record.row.scrapNumber : 1 , |
|
|
|
|
'materialAmount': accMul(record.row.scrapNumber,record.row.materialPrice) > 0 ? accMul(record.row.scrapNumber,record.row.materialPrice) : 1 * record.row.materialPrice, |
|
|
|
|
}, |
|
|
|
|
}, |
|
|
|
|
] |
|
|
|
|
this.$refs.processSmaterialsScrapList.setValues(values); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
materialType(val) { |
|
|
|
|
if (val !== undefined) { |
|
|
|
|