|
|
@ -64,7 +64,7 @@ |
|
|
|
<!-- 子表单区域 --> |
|
|
|
<!-- 子表单区域 --> |
|
|
|
<a-tabs v-model="activeKey" @change="handleChangeTabs" ref="tabs"> |
|
|
|
<a-tabs v-model="activeKey" @change="handleChangeTabs" ref="tabs"> |
|
|
|
<a-tab-pane tab="预算计划采购流程物料清单表" :key="refKeys[0]" :forceRender="true"> |
|
|
|
<a-tab-pane tab="预算计划采购流程物料清单表" :key="refKeys[0]" :forceRender="true"> |
|
|
|
<j-editable-table |
|
|
|
<p-editable-table |
|
|
|
ref="processUdgetPlanMaterial" |
|
|
|
ref="processUdgetPlanMaterial" |
|
|
|
:loading="processUdgetPlanMaterialTable.loading" |
|
|
|
:loading="processUdgetPlanMaterialTable.loading" |
|
|
|
:columns="processUdgetPlanMaterialTable.columns" |
|
|
|
:columns="processUdgetPlanMaterialTable.columns" |
|
|
@ -75,17 +75,19 @@ |
|
|
|
:rowNumber="true" |
|
|
|
:rowNumber="true" |
|
|
|
:disabled="hieg" |
|
|
|
:disabled="hieg" |
|
|
|
:rowSelection="true" |
|
|
|
:rowSelection="true" |
|
|
|
:actionButton="true"> |
|
|
|
:actionButton="true" |
|
|
|
<template v-slot:group="props"> |
|
|
|
@descriptionFetch="descriptionFetchDatas" |
|
|
|
<a-auto-complete |
|
|
|
> |
|
|
|
v-decorator="[`materialGroup`]" |
|
|
|
<!-- <template v-slot:group="props">--> |
|
|
|
:data-source="bigIdRake" |
|
|
|
<!-- <a-auto-complete--> |
|
|
|
placeholder="请选择" |
|
|
|
<!-- v-decorator="[`materialGroup`]"--> |
|
|
|
@search="onSearchRake" |
|
|
|
<!-- :data-source="bigIdRake"--> |
|
|
|
@select="onSelectRake(props,$event)" |
|
|
|
<!-- placeholder="请选择"--> |
|
|
|
|
|
|
|
<!-- @search="onSearchRake"--> |
|
|
|
/> |
|
|
|
<!-- @select="onSelectRake(props,$event)"--> |
|
|
|
</template> |
|
|
|
|
|
|
|
|
|
|
|
<!-- />--> |
|
|
|
|
|
|
|
<!-- </template>--> |
|
|
|
|
|
|
|
|
|
|
|
<template v-slot:action="props"> |
|
|
|
<template v-slot:action="props"> |
|
|
|
<a-tooltip placement="top"> |
|
|
|
<a-tooltip placement="top"> |
|
|
@ -96,7 +98,7 @@ |
|
|
|
</a-tooltip> |
|
|
|
</a-tooltip> |
|
|
|
<!-- <a-button @click="chaKan(props)">查看</a-button>--> |
|
|
|
<!-- <a-button @click="chaKan(props)">查看</a-button>--> |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
</j-editable-table> |
|
|
|
</p-editable-table> |
|
|
|
</a-tab-pane> |
|
|
|
</a-tab-pane> |
|
|
|
|
|
|
|
|
|
|
|
</a-tabs> |
|
|
|
</a-tabs> |
|
|
@ -186,11 +188,11 @@ |
|
|
|
key: 'materialGroup', |
|
|
|
key: 'materialGroup', |
|
|
|
// type: FormTypes.slot, // <-------------改为 slot 格式 |
|
|
|
// type: FormTypes.slot, // <-------------改为 slot 格式 |
|
|
|
// slotName: 'actions', // <-------------slot 的名称,对应 v-slot 冒号后面和等号前面的内容 |
|
|
|
// slotName: 'actions', // <-------------slot 的名称,对应 v-slot 冒号后面和等号前面的内容 |
|
|
|
type: FormTypes.slot, |
|
|
|
// type: FormTypes.slot, |
|
|
|
// type: FormTypes.sel_search, |
|
|
|
type: FormTypes.sel_search, |
|
|
|
slotName: 'group', |
|
|
|
// slotName: 'group', |
|
|
|
width: '200px', |
|
|
|
width: '200px', |
|
|
|
// options: [], |
|
|
|
options: [], |
|
|
|
// scopedSlots: { customRender: 'edit' },//引入的插槽 |
|
|
|
// scopedSlots: { customRender: 'edit' },//引入的插槽 |
|
|
|
// customRender:function (t,r,index) { |
|
|
|
// customRender:function (t,r,index) { |
|
|
|
// console.log(t,r); |
|
|
|
// console.log(t,r); |
|
|
@ -381,6 +383,7 @@ |
|
|
|
needTime: {rules:[{ required: true, message: '请选择需求时间!' }]}, |
|
|
|
needTime: {rules:[{ required: true, message: '请选择需求时间!' }]}, |
|
|
|
processPlan: {rules:[ { required: true, message: '请选择流程计划!'}]} |
|
|
|
processPlan: {rules:[ { required: true, message: '请选择流程计划!'}]} |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
isBu: undefined, |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
props: { |
|
|
|
props: { |
|
|
@ -444,7 +447,7 @@ |
|
|
|
let userInfo=sessionStorage.getItem("USER_INFORMATION"); |
|
|
|
let userInfo=sessionStorage.getItem("USER_INFORMATION"); |
|
|
|
// userInfo.company=company; |
|
|
|
// userInfo.company=company; |
|
|
|
this.popupCallback(company,userInfo); |
|
|
|
this.popupCallback(company,userInfo); |
|
|
|
|
|
|
|
this.descriptionFetchDatas(); |
|
|
|
}, |
|
|
|
}, |
|
|
|
mounted() { |
|
|
|
mounted() { |
|
|
|
console.log( this.$refs.processUdgetPlanMaterial); |
|
|
|
console.log( this.$refs.processUdgetPlanMaterial); |
|
|
@ -557,32 +560,33 @@ |
|
|
|
//table 值改变触发 |
|
|
|
//table 值改变触发 |
|
|
|
onSelect(record) { |
|
|
|
onSelect(record) { |
|
|
|
// console.log("0出发了",record.row); |
|
|
|
// console.log("0出发了",record.row); |
|
|
|
// if(record.row.materialGroup !== '' && record.row.materialGroup !== undefined && record.row.materialNumber === ''){ |
|
|
|
let isEr = true; |
|
|
|
// console.log("1出发了",record.row); |
|
|
|
if(record.row.materialGroup !== '' && record.row.materialGroup !== undefined){ |
|
|
|
// // this.fetchMerchandiseNews(record.row.materialGroup); |
|
|
|
if( record.row.id !== undefined && record.row.id !== '' && this.isBu !== record.row.materialGroup ){ |
|
|
|
// if(record.row.id !== undefined){ |
|
|
|
console.log("1出发了",record.row); |
|
|
|
// let values = [ |
|
|
|
this.fetchMerchandiseNews(record.row.materialGroup); |
|
|
|
// { |
|
|
|
this.isBu = record.row.materialGroup; |
|
|
|
// rowKey: record.row.id, |
|
|
|
let values = [ |
|
|
|
// values: { |
|
|
|
{ |
|
|
|
// 'materialNumber': '', |
|
|
|
rowKey: record.row.id, |
|
|
|
// 'materialGroup': this.materialId, |
|
|
|
values: { |
|
|
|
// 'materialSeries': '', |
|
|
|
'materialNumber': '', |
|
|
|
// 'materialName': '', |
|
|
|
'materialSeries': '', |
|
|
|
// 'materialUnit': '', |
|
|
|
'materialName': '', |
|
|
|
// 'supplierId': '', |
|
|
|
'materialUnit': '', |
|
|
|
// 'materialAmount': '', |
|
|
|
'supplierId': '', |
|
|
|
// 'materialType': '' |
|
|
|
'materialAmount': '', |
|
|
|
// }, |
|
|
|
'materialType': '' |
|
|
|
// }, |
|
|
|
}, |
|
|
|
// ] |
|
|
|
}, |
|
|
|
// // console.log(values); |
|
|
|
] |
|
|
|
// this.$refs.processUdgetPlanMaterial.setValues(values); |
|
|
|
this.$refs.processUdgetPlanMaterial.setValues(values); |
|
|
|
// } |
|
|
|
isEr = false; |
|
|
|
// } |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
// console.log("5555出发了",record.row); |
|
|
|
// console.log("5555出发了",record.row); |
|
|
|
if(record.row.materialGroup !== '' && record.row.materialGroup !== undefined && record.row.materialNumber !== ''){ |
|
|
|
if(record.row.materialGroup !== '' && record.row.materialGroup !== undefined && record.row.materialNumber !== '' && record.row.materialNumber !== undefined && isEr){ |
|
|
|
// console.log("2出发了",record.row); |
|
|
|
console.log("2出发了",record.row); |
|
|
|
let materialName = { } |
|
|
|
let materialName = { } |
|
|
|
// console.log("this.bigIdMerchandiseNewsList",this.bigIdMerchandiseNewsList) |
|
|
|
// console.log("this.bigIdMerchandiseNewsList",this.bigIdMerchandiseNewsList) |
|
|
|
this.bigIdMerchandiseNewsList.forEach( item => { |
|
|
|
this.bigIdMerchandiseNewsList.forEach( item => { |
|
|
@ -602,7 +606,8 @@ |
|
|
|
rowKey: record.row.id, |
|
|
|
rowKey: record.row.id, |
|
|
|
values: { |
|
|
|
values: { |
|
|
|
'materialNumber': record.row.materialNumber, |
|
|
|
'materialNumber': record.row.materialNumber, |
|
|
|
'materialGroup': this.materialId, |
|
|
|
'materialGroup': record.row.materialGroup, |
|
|
|
|
|
|
|
// 'materialGroup': this.materialId, |
|
|
|
'materialSeries': "SM-JD36-BA", |
|
|
|
'materialSeries': "SM-JD36-BA", |
|
|
|
'materialName': materialName.name, |
|
|
|
'materialName': materialName.name, |
|
|
|
'materialUnit': materialName.unit, |
|
|
|
'materialUnit': materialName.unit, |
|
|
@ -639,9 +644,7 @@ |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
}, |
|
|
|
}, |
|
|
|
fetchMerchandiseNews(value){ //查询物料清单信息 |
|
|
|
fetchMerchandiseNews(value){ //查询物料清单信息 |
|
|
|
return new Promise((resolve, reject)=>{ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//查询大品类数据 |
|
|
|
//查询大品类数据 |
|
|
|
let par = { |
|
|
|
let par = { |
|
|
|
delFlag: 0, |
|
|
|
delFlag: 0, |
|
|
@ -691,33 +694,90 @@ |
|
|
|
}) |
|
|
|
}) |
|
|
|
} |
|
|
|
} |
|
|
|
this.bigIdMerchandiseNewsList = res.result |
|
|
|
this.bigIdMerchandiseNewsList = res.result |
|
|
|
resolve( res.result ); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
// fetchMerchandiseNews(value){ //查询物料清单信息 |
|
|
|
|
|
|
|
// return new Promise((resolve, reject)=>{ |
|
|
|
|
|
|
|
// |
|
|
|
|
|
|
|
// //查询大品类数据 |
|
|
|
|
|
|
|
// let par = { |
|
|
|
|
|
|
|
// delFlag: 0, |
|
|
|
|
|
|
|
// descriptionId:value, |
|
|
|
|
|
|
|
// } |
|
|
|
|
|
|
|
// this.bigIdMerchandiseNews = []; |
|
|
|
|
|
|
|
// this.bigIdMerchandiseNewsList = []; |
|
|
|
|
|
|
|
// let qc = []; |
|
|
|
|
|
|
|
// let numberList = []; |
|
|
|
|
|
|
|
// if(this.processUdgetPlanMaterialTable.columns[1].options.length > 0){ |
|
|
|
|
|
|
|
// this.processUdgetPlanMaterialTable.columns[1].options = []; |
|
|
|
|
|
|
|
// } |
|
|
|
|
|
|
|
// this.$refs.processUdgetPlanMaterial.getValues((a,b,c)=>{ |
|
|
|
|
|
|
|
// b.forEach(item =>{ |
|
|
|
|
|
|
|
// if(item.materialNumber !== '' && item.materialNumber !== undefined && item.materialNumber !== null){ |
|
|
|
|
|
|
|
// numberList.push(item.materialNumber); |
|
|
|
|
|
|
|
// } |
|
|
|
|
|
|
|
// }); |
|
|
|
|
|
|
|
// }); |
|
|
|
|
|
|
|
// getAction(this.url.merchandiseNewsList,par).then((res)=>{ |
|
|
|
|
|
|
|
// console.log(res.result); |
|
|
|
|
|
|
|
// if(res.success){ |
|
|
|
|
|
|
|
// let newList = res.result; |
|
|
|
|
|
|
|
// if(numberList.length > 0){ |
|
|
|
|
|
|
|
// newList.forEach( item => { |
|
|
|
|
|
|
|
// qc.push({ |
|
|
|
|
|
|
|
// title : item.materialsNumber, |
|
|
|
|
|
|
|
// value : item.id, |
|
|
|
|
|
|
|
// disabled : false |
|
|
|
|
|
|
|
// }) |
|
|
|
|
|
|
|
// }) |
|
|
|
|
|
|
|
// numberList.forEach( num => { |
|
|
|
|
|
|
|
// qc.forEach( i => { |
|
|
|
|
|
|
|
// if(num === i.value){ |
|
|
|
|
|
|
|
// i.disabled = true; |
|
|
|
|
|
|
|
// } |
|
|
|
|
|
|
|
// }); |
|
|
|
|
|
|
|
// }) |
|
|
|
|
|
|
|
// this.processUdgetPlanMaterialTable.columns[1].options = qc; |
|
|
|
|
|
|
|
// }else{ |
|
|
|
|
|
|
|
// newList.forEach( item => { |
|
|
|
|
|
|
|
// this.processUdgetPlanMaterialTable.columns[1].options.push({ |
|
|
|
|
|
|
|
// title : item.materialsNumber, |
|
|
|
|
|
|
|
// value : item.id, |
|
|
|
|
|
|
|
// disabled : false |
|
|
|
|
|
|
|
// }) |
|
|
|
|
|
|
|
// }) |
|
|
|
|
|
|
|
// } |
|
|
|
|
|
|
|
// this.bigIdMerchandiseNewsList = res.result |
|
|
|
|
|
|
|
// resolve( res.result ); |
|
|
|
|
|
|
|
// } |
|
|
|
|
|
|
|
// }); |
|
|
|
|
|
|
|
// |
|
|
|
|
|
|
|
// }) |
|
|
|
|
|
|
|
// |
|
|
|
|
|
|
|
// }, |
|
|
|
|
|
|
|
|
|
|
|
fetchData(value){ //查询物料组 |
|
|
|
descriptionFetchDatas(value){ //查询物料组 |
|
|
|
//查询大品类数据 |
|
|
|
//查询大品类数据 |
|
|
|
let par = { |
|
|
|
let par = { |
|
|
|
delFlag: 0, |
|
|
|
delFlag: 0, |
|
|
|
|
|
|
|
pageSize: 50 |
|
|
|
} |
|
|
|
} |
|
|
|
this.bigId = []; |
|
|
|
this.bigId = []; |
|
|
|
|
|
|
|
getAction(this.url.descriptionRakeUrl,par).then((res)=>{ |
|
|
|
// getAction(this.url.descriptionRake,par).then((res)=>{ |
|
|
|
// getAction(this.url.descriptionRake,par).then((res)=>{ |
|
|
|
// if(res.success){ |
|
|
|
if(res.success){ |
|
|
|
// if(this.processUdgetPlanMaterialTable.columns[0].options.length > 0){ |
|
|
|
if(this.processUdgetPlanMaterialTable.columns[0].options.length > 0){ |
|
|
|
// this.processUdgetPlanMaterialTable.columns[0].options = []; |
|
|
|
this.processUdgetPlanMaterialTable.columns[0].options = []; |
|
|
|
// } |
|
|
|
} |
|
|
|
// res.result.forEach( item => { |
|
|
|
res.result.records.forEach( item => { |
|
|
|
// this.processUdgetPlanMaterialTable.columns[0].options.push({ |
|
|
|
this.processUdgetPlanMaterialTable.columns[0].options.push({ |
|
|
|
// title : item.descriptionName, |
|
|
|
title : item.descriptionName, |
|
|
|
// value : item.id, |
|
|
|
value : item.id, |
|
|
|
// }) |
|
|
|
}) |
|
|
|
// }) |
|
|
|
}) |
|
|
|
// } |
|
|
|
} |
|
|
|
// }); |
|
|
|
}); |
|
|
|
}, |
|
|
|
}, |
|
|
|
/*回显数据*/ |
|
|
|
/*回显数据*/ |
|
|
|
init(){ |
|
|
|
init(){ |
|
|
@ -733,7 +793,8 @@ |
|
|
|
if (formData.materialType){ |
|
|
|
if (formData.materialType){ |
|
|
|
|
|
|
|
|
|
|
|
this.hieg=false; |
|
|
|
this.hieg=false; |
|
|
|
this.fetchDataRake(); |
|
|
|
// this.fetchDataRake(); |
|
|
|
|
|
|
|
this.fetchData(); |
|
|
|
} |
|
|
|
} |
|
|
|
this.editAfter(); |
|
|
|
this.editAfter(); |
|
|
|
this.btndisabled = false; |
|
|
|
this.btndisabled = false; |
|
|
|