|
|
|
@ -30,8 +30,8 @@
|
|
|
|
|
</a-form-item> |
|
|
|
|
</a-col> |
|
|
|
|
<a-col :span="8" > |
|
|
|
|
<a-form-item label="物资类型" :labelCol="labelCol" :wrapperCol="wrapperCol"> |
|
|
|
|
<j-dict-select-tag type="list" v-decorator="['materialType',validatorRules.materialType]" :trigger-change="true" dictCode="material_type" placeholder="请选择物资类型" /> |
|
|
|
|
<a-form-item label="物资类型" :labelCol="labelCol" :wrapperCol="wrapperCol" > |
|
|
|
|
<j-dict-select-tag type="list" @change="isMaterialType" v-decorator="['materialType',validatorRules.materialType]" :trigger-change="true" dictCode="material_type" placeholder="请选择物资类型" /> |
|
|
|
|
</a-form-item> |
|
|
|
|
</a-col> |
|
|
|
|
<a-col :span="8" > |
|
|
|
@ -51,12 +51,13 @@
|
|
|
|
|
<a-tabs v-model="activeKey" @change="handleChangeTabs"> |
|
|
|
|
<a-tab-pane tab="物资出库流程出库清单" :key="refKeys[0]" :forceRender="true"> |
|
|
|
|
<j-editable-table |
|
|
|
|
:ref="refKeys[0]" |
|
|
|
|
ref="processMaterialsDeliveryList" |
|
|
|
|
:loading="processMaterialsDeliveryListTable.loading" |
|
|
|
|
:columns="processMaterialsDeliveryListTable.columns" |
|
|
|
|
:dataSource="processMaterialsDeliveryListTable.dataSource" |
|
|
|
|
:maxHeight="300" |
|
|
|
|
:disabled="formDisabled" |
|
|
|
|
:disabled="this.heid" |
|
|
|
|
@valueChange ="onSelect" |
|
|
|
|
:rowNumber="true" |
|
|
|
|
:rowSelection="true" |
|
|
|
|
:actionButton="true"/> |
|
|
|
@ -103,6 +104,9 @@ import JSelectCompany from '../../../components/jeecgbiz/JSelectCompany'
|
|
|
|
|
}, |
|
|
|
|
data() { |
|
|
|
|
return { |
|
|
|
|
accountingAttributesVal: '', |
|
|
|
|
heid: true, |
|
|
|
|
bigIdMerchandiseNewsList:[], |
|
|
|
|
labelCol: { |
|
|
|
|
xs: { span: 24 }, |
|
|
|
|
sm: { span: 6 }, |
|
|
|
@ -139,7 +143,7 @@ import JSelectCompany from '../../../components/jeecgbiz/JSelectCompany'
|
|
|
|
|
width: '200px', |
|
|
|
|
placeholder: '请输入${title}', |
|
|
|
|
options: [], |
|
|
|
|
props:{title: 'show title'} |
|
|
|
|
// props:{title: 'show title'} |
|
|
|
|
// scopedSlots: { customRender: 'edit' },//引入的插槽 |
|
|
|
|
// customRender:function (t,r,index) { |
|
|
|
|
// console.log(t,r); |
|
|
|
@ -153,7 +157,8 @@ import JSelectCompany from '../../../components/jeecgbiz/JSelectCompany'
|
|
|
|
|
dictCode:"", |
|
|
|
|
width:"200px", |
|
|
|
|
placeholder: '请输入${title}', |
|
|
|
|
defaultValue:'', |
|
|
|
|
// defaultValue:'', |
|
|
|
|
options: [], |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
title: 'WBS', |
|
|
|
@ -255,6 +260,7 @@ import JSelectCompany from '../../../components/jeecgbiz/JSelectCompany'
|
|
|
|
|
edit: "/hy/processMaterialsDelivery/edit", |
|
|
|
|
queryById: "/hy/processMaterialsDelivery/queryById", |
|
|
|
|
descriptionRake: "/suppliesstronger/processSuppliesStronger/descriptionName", //查询物料组 |
|
|
|
|
merchandiseNewsList: '/suppliesstronger/processSuppliesStronger/merchandiseNews', |
|
|
|
|
processMaterialsDeliveryList: { |
|
|
|
|
list: '/hy/processMaterialsDelivery/queryProcessMaterialsDeliveryListByMainId' |
|
|
|
|
}, |
|
|
|
@ -306,7 +312,7 @@ import JSelectCompany from '../../../components/jeecgbiz/JSelectCompany'
|
|
|
|
|
} |
|
|
|
|
return true |
|
|
|
|
} |
|
|
|
|
return this.disabled |
|
|
|
|
return this.disabled = false; |
|
|
|
|
}, |
|
|
|
|
showFlowSubmitButton(){ |
|
|
|
|
if(this.formBpm===true){ |
|
|
|
@ -331,10 +337,135 @@ import JSelectCompany from '../../../components/jeecgbiz/JSelectCompany'
|
|
|
|
|
this.fetchData(); |
|
|
|
|
}, |
|
|
|
|
methods: { |
|
|
|
|
isMaterialType(val){ |
|
|
|
|
if(val !== undefined){ |
|
|
|
|
this.accountingAttributesVal = val; |
|
|
|
|
this.heid = false; |
|
|
|
|
} |
|
|
|
|
// console.log("执行l",val); |
|
|
|
|
}, |
|
|
|
|
//table 值改变触发 |
|
|
|
|
onSelect(record) { |
|
|
|
|
console.log(record) |
|
|
|
|
if(record.row.materialGroup !== '' && record.row.materialGroup !== undefined && record.row.equipment === ''){ |
|
|
|
|
// console.log("执行materialGroup") |
|
|
|
|
this.fetchMerchandiseNews(record.row.materialGroup); |
|
|
|
|
} |
|
|
|
|
if(record.row.materialGroup !== '' && record.row.materialGroup !== undefined && record.row.equipment !== ''){ |
|
|
|
|
// console.log("执行materialNumber") |
|
|
|
|
let materialName = { } |
|
|
|
|
this.bigIdMerchandiseNewsList.forEach( item => { |
|
|
|
|
if( item.merchandiseNewsId === record.row.equipment ){ |
|
|
|
|
materialName ={ |
|
|
|
|
name: item.merchandiseName, |
|
|
|
|
unit: item.materialsUnit, |
|
|
|
|
supplierName: item.supplierName, |
|
|
|
|
price: item.price, |
|
|
|
|
residueNumber : item.residueNumber === undefined ? 0 : item.residueNumber, |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
let values = [ |
|
|
|
|
{ |
|
|
|
|
rowKey: record.row.id, |
|
|
|
|
values: { |
|
|
|
|
'equipment': record.row.equipment, |
|
|
|
|
'materialGroup': record.row.materialGroup, |
|
|
|
|
'materialName': materialName.name, |
|
|
|
|
'materialUnit': materialName.unit, |
|
|
|
|
'supplier': materialName.supplierName, |
|
|
|
|
'materialPrice': materialName.price, |
|
|
|
|
'actualSendNumber': materialName.residueNumber, |
|
|
|
|
'materialAmount': materialName.price * materialName.residueNumber, |
|
|
|
|
}, |
|
|
|
|
}, |
|
|
|
|
] |
|
|
|
|
this.$refs.processMaterialsDeliveryList.setValues(values); |
|
|
|
|
} |
|
|
|
|
// |
|
|
|
|
// if(record.row.pleaseSendNumber !== '' && record.row.materialPrice !== '' && record.row.pleaseSendNumber !== undefined && record.row.materialPrice !== undefined){ |
|
|
|
|
// // record.row.materialAmount = record.row.materialQuantity * record.row.materialPrice; |
|
|
|
|
// let values = [ |
|
|
|
|
// { |
|
|
|
|
// rowKey: record.row.id, |
|
|
|
|
// values: { |
|
|
|
|
// 'equipment': record.row.equipment, |
|
|
|
|
// 'materialGroup': record.row.materialGroup, |
|
|
|
|
// 'materialName': record.row.materialName, |
|
|
|
|
// 'materialUnit': record.row.materialUnit, |
|
|
|
|
// 'supplier': record.row.supplier, |
|
|
|
|
// 'materialPrice': record.row.materialPrice, |
|
|
|
|
// 'materialAmount': record.row.pleaseSendNumber * record.row.materialPrice, |
|
|
|
|
// }, |
|
|
|
|
// }, |
|
|
|
|
// ] |
|
|
|
|
// this.$refs.processMaterialsDeliveryList.setValues(values); |
|
|
|
|
// } |
|
|
|
|
|
|
|
|
|
}, |
|
|
|
|
fetchMerchandiseNews(value){ //查询物料清单信息 |
|
|
|
|
//查询大品类数据 |
|
|
|
|
let par = { |
|
|
|
|
delFlag: 0, |
|
|
|
|
descriptionId:value, |
|
|
|
|
} |
|
|
|
|
this.bigIdMerchandiseNews = []; |
|
|
|
|
this.bigIdMerchandiseNewsList = []; |
|
|
|
|
let qc = []; |
|
|
|
|
let numberList = []; |
|
|
|
|
if(this.processMaterialsDeliveryListTable.columns[1].options.length > 0){ |
|
|
|
|
this.processMaterialsDeliveryListTable.columns[1].options = []; |
|
|
|
|
} |
|
|
|
|
this.$refs.processMaterialsDeliveryList.getValues((a,b,c)=>{ |
|
|
|
|
// console.log(a,b,c) |
|
|
|
|
b.forEach(item =>{ |
|
|
|
|
if(item.equipment !== '' && item.equipment !== undefined && item.equipment !== null){ |
|
|
|
|
numberList.push(item.materialNumber); |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
}); |
|
|
|
|
getAction(this.url.merchandiseNewsList,par).then((res)=>{ |
|
|
|
|
if(res.success){ |
|
|
|
|
console.log(res.result); |
|
|
|
|
let newList = res.result; |
|
|
|
|
// console.log("12312312:"+numberList.length); |
|
|
|
|
if(numberList.length > 0){ |
|
|
|
|
newList.forEach( item => { |
|
|
|
|
qc.push({ |
|
|
|
|
title : item.materialsNumber, |
|
|
|
|
value : item.merchandiseNewsId, |
|
|
|
|
disabled : false |
|
|
|
|
}) |
|
|
|
|
}) |
|
|
|
|
numberList.forEach( num => { |
|
|
|
|
qc.forEach( i => { |
|
|
|
|
if(num === i.value){ |
|
|
|
|
// console.log(num,i.value); |
|
|
|
|
i.disabled = true; |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
}) |
|
|
|
|
this.processMaterialsDeliveryListTable.columns[1].options = qc; |
|
|
|
|
}else{ |
|
|
|
|
newList.forEach( item => { |
|
|
|
|
this.processMaterialsDeliveryListTable.columns[1].options.push({ |
|
|
|
|
title : item.materialsNumber, |
|
|
|
|
value : item.merchandiseNewsId, |
|
|
|
|
disabled : false |
|
|
|
|
}) |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
// console.log(this.processUdgetPlanMaterialTable.columns[1].options); |
|
|
|
|
this.bigIdMerchandiseNewsList = res.result; |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
fetchData(){ //查询物料组 |
|
|
|
|
//查询大品类数据 |
|
|
|
|
let par = { |
|
|
|
|
delFlag: 0, |
|
|
|
|
accountingAttributes: this.accountingAttributesVal, |
|
|
|
|
} |
|
|
|
|
getAction(this.url.descriptionRake,par).then((res)=>{ |
|
|
|
|
if(res.success){ |
|
|
|
|