Commit b6b8ff1e authored by jingnan's avatar jingnan 👀

Merge branch 'dev' of http://94.191.100.41/tfmom/tf-mom-web into dev

parents d72b7df5 b1efb1ff
...@@ -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 + '/')
return { if (item.modelNo) labelParts.push(item.modelNo + '/')
label: `${item.resName ? item.resName + '/' : ''}${item.modelNo ? item.modelNo + '/' : '' if (item.techSpec) labelParts.push(item.techSpec + '/')
}${item.techSpec ? item.techSpec + '/' : ''}${item.spec ? item.spec + '/' : '' if (item.spec) labelParts.push(item.spec + '/')
}${item.supplyStatus ? item.supplyStatus + '/' : ''}${item.supplierName ? item.supplierName + '/' : '' if (item.supplyStatus) labelParts.push(item.supplyStatus + '/')
}`, if (item.supplierName) labelParts.push(item.supplierName + '/')
value: item.resCode,
disabled: true const label = labelParts.join('')
}
} else { return {
return { label,
label: `${item.resName ? item.resName + '/' : ''}${item.modelNo ? item.modelNo + '/' : '' value: item.resCode,
}${item.techSpec ? item.techSpec + '/' : ''}${item.spec ? item.spec + '/' : '' disabled: ((this.operateType === 'MODIFY' && !this.form.isRoot) || this.operateType === 'ADD') && (this.form.extMaterial && item.resCode === this.form.extMaterial.resCode)
}${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