Browse Source

报废下拉回显

dev
0.0 2 years ago
parent
commit
caed29cead
  1. 106
      src/views/burst/form/purchase/ProcessIndustrialScrapsForm.vue

106
src/views/burst/form/purchase/ProcessIndustrialScrapsForm.vue

@ -30,7 +30,7 @@
<a-form-model-item label="物资类型" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="type">
<!-- <a-input v-model="model.type" placeholder="请输入物资类型"></a-input>-->
<!-- <a-input v-model="model.type" placeholder="请输入物资类型" ></a-input>-->
<j-dict-select-tag type="list" v-decorator="['type',validatorRules.materialType]"
<j-dict-select-tag type="list" v-decorator="['materialType',validatorRules.materialType]"
dictCode="explosive_type" :trigger-change="true"
placeholder="请选择物资类型" @change="elect" />
</a-form-model-item>
@ -163,6 +163,45 @@ export default {
loading: false,
dataSource: [],
columns: [
{
title: '物料组',
key: 'materialGroup',
type: FormTypes.sel_search,
disabled: true,
dictCode: '',
width: '200px',
placeholder: '请输入${title}',
options:[]
},
{
title: '物料编号',
key: 'equipment',
type: FormTypes.sel_search,
dictCode: '',
width: '200px',
placeholder: '请输入${title}',
defaultValue: '',
disabled: this.disabled,
options:[]
},
{
title: 'WBS',
key: 'wbs',
type: FormTypes.input,
dictCode: '',
disabled: this.disabled,
width: '200px',
placeholder: '请输入${title}',
defaultValue: ''
},
{
title: '民爆物料名称及规格型号',
key: 'industrialName',
type: FormTypes.input,
width: '200px',
placeholder: '请输入${title}',
defaultValue: ''
},
// {
// title: 'ID',
// key: 'industrialScrapId',
@ -171,16 +210,16 @@ export default {
// placeholder: '${title}',
// defaultValue: ''
// },
// {
// title: 'id',
// key: 'industrialId',
// type: FormTypes.input,
// width: '200px',
// placeholder: '${title}',
// defaultValue: ''
// },
{
title: '民爆物资id',
key: 'industrialId',
type: FormTypes.input,
width: '200px',
placeholder: '请输入${title}',
defaultValue: ''
},
{
title: '请求数量',
title: '请求报废数量',
key: 'quantity',
type: FormTypes.input,
width: '200px',
@ -188,7 +227,7 @@ export default {
defaultValue: ''
},
{
title: '实际数量',
title: '实际报废数量',
key: 'amount',
type: FormTypes.input,
width: '200px',
@ -205,32 +244,25 @@ export default {
},
{
title: '民爆物资名称',
key: 'industrialName',
type: FormTypes.input,
width: '200px',
title: '单价(元)',
key: 'materialPrice',
type: FormTypes.inputNumber,
disabled: true,
width: '130px',
placeholder: '请输入${title}',
defaultValue: ''
},
{
title: '报废原因',
key: 'scrapCause',
title: '报废金额',
key: 'money',
type: FormTypes.input,
width: '200px',
placeholder: '请输入${title}',
defaultValue: ''
},
// {
// title: '',
// key: 'delFlag',
// type: FormTypes.input,
// width: '200px',
// placeholder: '${title}',
// defaultValue: ''
// },
{
title: '报废金额',
key: 'money',
title: '报废原因',
key: 'scrapCause',
type: FormTypes.input,
width: '200px',
placeholder: '请输入${title}',
@ -389,7 +421,9 @@ export default {
return new Promise( (resolve, reject) => {
let par = {
type: this.accounting
materialType: this.accounting,
pageNo: 1,
pageSize: 50
}
let numberList = [];
this.$refs.processIndustrialScrapMaterial.getValues((a, b, c) => {
@ -400,24 +434,22 @@ export default {
})
})
//
console.log("=-=-=-",par);
console.log("par=-=-=-",par);
getAction(this.url.processIndustrialUrlList,par).then(res =>{
if(res.success){
console.log("res>>>>>>>>>>>>>>>>>>>>",res)
this.equipmentList = res.result.records;
let nu = res.result.records || res.result;
let qc = [];
// if (this.processIndustrialScrapMaterialTable.columns[1].options.length > 0) {
// this.processIndustrialScrapMaterialTable.columns[1].options = []
// }
if (this.processIndustrialScrapMaterialTable.columns[1].options.length > 0) {
this.processIndustrialScrapMaterialTable.columns[1].options = []
}
nu.forEach(item =>{
qc.push({
title: item.materialNumber,
value: item.merchandiseNewsId,
title: item.coding,
value: item.id,
disabled: false
})
})
console.log("qc>>>>>>>>>>>>>>>",qc)
numberList.forEach( it => {
// console.log("000000",it);
qc.forEach(item =>{
@ -426,7 +458,7 @@ export default {
}
})
})
// this.processSmaterialsScrapListTable.columns[1].options = qc;
this.processIndustrialScrapMaterialTable.columns[1].options = qc;
}
resolve();
})

Loading…
Cancel
Save