Commit b1efb1ff authored by xioln's avatar xioln

采购入库子明细添加问题

parent 8816d947
......@@ -6,7 +6,7 @@
*/
<template>
<div class="outStorageCallBack-reqAmount">
<el-input-number v-model="reqAmount" :min="1" :max="maxNum" @change="handleChange" />
<el-input-number v-model="reqAmount" :min="0" :max="maxNum" @change="handleChange" />
</div>
</template>
<script>
......
......@@ -261,7 +261,6 @@ export default {
},
methods: {
handleOpen(type, basicData, row) {
console.log('rwo', row)
this.basicData = basicData
this.form = { 'reqAmount': 1 }
this.dialogVisibleDetails = true
......@@ -1566,33 +1565,55 @@ export default {
)
.then((res) => {
this.material = res.items.content
this.formFileds[0].data.forEach(filed => {
if (filed.title === '物料关键词') {
filed.component.options = res.items.content.map(
(item) => {
// 新增或编辑子产品时和父产品物料类型不能一致
if (((this.operateType === 'MODIFY' && !this.form.isRoot) || this.operateType === 'ADD') && item.resCode === this.form.extMaterial.resCode) {
return {
label: `${item.resName ? item.resName + '/' : ''}${item.modelNo ? item.modelNo + '/' : ''
}${item.techSpec ? item.techSpec + '/' : ''}${item.spec ? item.spec + '/' : ''
}${item.supplyStatus ? item.supplyStatus + '/' : ''}${item.supplierName ? item.supplierName + '/' : ''
}`,
value: item.resCode,
disabled: true
}
} else {
return {
label: `${item.resName ? item.resName + '/' : ''}${item.modelNo ? item.modelNo + '/' : ''
}${item.techSpec ? item.techSpec + '/' : ''}${item.spec ? item.spec + '/' : ''
}${item.supplyStatus ? item.supplyStatus + '/' : ''}${item.supplierName ? item.supplierName + '/' : ''
}`,
value: item.resCode
}
}
}
)
}
})
const keywordField = this.formFileds[0].data.find(field => field.title === '物料关键词')
if (keywordField) {
keywordField.component.options = res.items.content.map(item => {
const labelParts = []
if (item.resName) labelParts.push(item.resName + '/')
if (item.modelNo) labelParts.push(item.modelNo + '/')
if (item.techSpec) labelParts.push(item.techSpec + '/')
if (item.spec) labelParts.push(item.spec + '/')
if (item.supplyStatus) labelParts.push(item.supplyStatus + '/')
if (item.supplierName) labelParts.push(item.supplierName + '/')
const label = labelParts.join('')
return {
label,
value: item.resCode,
disabled: ((this.operateType === 'MODIFY' && !this.form.isRoot) || this.operateType === 'ADD') && (this.form.extMaterial && item.resCode === this.form.extMaterial.resCode)
}
})
}
// this.formFileds[0].data.forEach(filed => {
// if (filed.title === '物料关键词') {
// filed.component.options = res.items.content.map(
// (item) => {
// // 新增或编辑子产品时和父产品物料类型不能一致
// if (((this.operateType === 'MODIFY' && !this.form.isRoot) || this.operateType === 'ADD') && item.resCode === this.form.extMaterial.resCode) {
// return {
// label: `${item.resName ? item.resName + '/' : ''}${item.modelNo ? item.modelNo + '/' : ''
// }${item.techSpec ? item.techSpec + '/' : ''}${item.spec ? item.spec + '/' : ''
// }${item.supplyStatus ? item.supplyStatus + '/' : ''}${item.supplierName ? item.supplierName + '/' : ''
// }`,
// value: item.resCode,
// disabled: true
// }
// } else {
// return {
// label: `${item.resName ? item.resName + '/' : ''}${item.modelNo ? item.modelNo + '/' : ''
// }${item.techSpec ? item.techSpec + '/' : ''}${item.spec ? item.spec + '/' : ''
// }${item.supplyStatus ? item.supplyStatus + '/' : ''}${item.supplierName ? item.supplierName + '/' : ''
// }`,
// value: item.resCode
// }
// }
// }
// )
// }
// })
})
.catch((err) => {
console.log(err)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment