Commit b1efb1ff authored by xioln's avatar xioln

采购入库子明细添加问题

parent 8816d947
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
*/ */
<template> <template>
<div class="outStorageCallBack-reqAmount"> <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> </div>
</template> </template>
<script> <script>
......
...@@ -261,7 +261,6 @@ export default { ...@@ -261,7 +261,6 @@ export default {
}, },
methods: { methods: {
handleOpen(type, basicData, row) { handleOpen(type, basicData, row) {
console.log('rwo', row)
this.basicData = basicData this.basicData = basicData
this.form = { 'reqAmount': 1 } this.form = { 'reqAmount': 1 }
this.dialogVisibleDetails = true this.dialogVisibleDetails = true
...@@ -1566,33 +1565,55 @@ export default { ...@@ -1566,33 +1565,55 @@ export default {
) )
.then((res) => { .then((res) => {
this.material = res.items.content this.material = res.items.content
this.formFileds[0].data.forEach(filed => { const keywordField = this.formFileds[0].data.find(field => field.title === '物料关键词')
if (filed.title === '物料关键词') {
filed.component.options = res.items.content.map( if (keywordField) {
(item) => { keywordField.component.options = res.items.content.map(item => {
// 新增或编辑子产品时和父产品物料类型不能一致 const labelParts = []
if (((this.operateType === 'MODIFY' && !this.form.isRoot) || this.operateType === 'ADD') && item.resCode === this.form.extMaterial.resCode) { 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 { return {
label: `${item.resName ? item.resName + '/' : ''}${item.modelNo ? item.modelNo + '/' : '' label,
}${item.techSpec ? item.techSpec + '/' : ''}${item.spec ? item.spec + '/' : ''
}${item.supplyStatus ? item.supplyStatus + '/' : ''}${item.supplierName ? item.supplierName + '/' : ''
}`,
value: item.resCode, value: item.resCode,
disabled: true disabled: ((this.operateType === 'MODIFY' && !this.form.isRoot) || this.operateType === 'ADD') && (this.form.extMaterial && item.resCode === this.form.extMaterial.resCode)
}
} 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
}
}
}
)
} }
}) })
}
// 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) => { .catch((err) => {
console.log(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