领料退料物资类型选择逻辑优化
This commit is contained in:
parent
238c668ee0
commit
a331ba90fb
|
|
@ -113,7 +113,7 @@
|
||||||
>
|
>
|
||||||
<span v-html="highlightText(item.fullPath, searchKeyword)"></span>
|
<span v-html="highlightText(item.fullPath, searchKeyword)"></span>
|
||||||
<span style="float: right; color: #8492a6; font-size: 13px">
|
<span style="float: right; color: #8492a6; font-size: 13px">
|
||||||
库存:{{ item.storageNum }}
|
出库:{{ item.num }}
|
||||||
</span>
|
</span>
|
||||||
</el-option>
|
</el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
|
|
@ -686,22 +686,21 @@ export default {
|
||||||
},
|
},
|
||||||
// 处理类型数据
|
// 处理类型数据
|
||||||
processTypeData(data) {
|
processTypeData(data) {
|
||||||
const result = []
|
const result = []
|
||||||
|
|
||||||
const traverse = (node, parents = []) => {
|
const traverse = (node, parents = []) => {
|
||||||
const path = [...parents, node.typeName]
|
const path = [...parents, node.typeName]
|
||||||
|
|
||||||
if (!node.children || node.children.length === 0) {
|
if (!node.children || node.children.length === 0) {
|
||||||
result.push({
|
result.push({
|
||||||
typeId: node.typeId,
|
typeId: node.typeId,
|
||||||
typeName: node.typeName,
|
typeName: node.typeName,
|
||||||
fullPath: path.join(' / '),
|
fullPath: path.join(' / '),
|
||||||
searchKey: path.join('').toLowerCase(),
|
searchKey: path.join('').toLowerCase(),
|
||||||
storageNum: node.storageNum || 0,
|
num: node.num || 0,
|
||||||
maTypeName: parents[parents.length - 1] || '',
|
maTypeName: parents[parents.length - 1] || '',
|
||||||
specificationType: node.typeName,
|
specificationType: node.typeName,
|
||||||
unitName: node.unitName,
|
unitName: node.unitName,
|
||||||
unitValue: node.unitValue
|
unitValue: node.unitValue,
|
||||||
|
manageType: node.manageType
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -740,14 +739,21 @@ export default {
|
||||||
type: 'warning'
|
type: 'warning'
|
||||||
})
|
})
|
||||||
this.tempDeviceType = this.tempDeviceType.filter(id => id !== lastSelected)
|
this.tempDeviceType = this.tempDeviceType.filter(id => id !== lastSelected)
|
||||||
} else if (typeData.storageNum <= 0) {
|
} else if (typeData.num <= 0) {
|
||||||
this.$message.error('所选物资规格类型暂时无库存,无法申请!')
|
this.$message.error('所选物资规格类型暂时无出库,无法申请!')
|
||||||
this.tempDeviceType = this.tempDeviceType.filter(id => id !== lastSelected)
|
this.tempDeviceType = this.tempDeviceType.filter(id => id !== lastSelected)
|
||||||
} else {
|
} else {
|
||||||
|
console.log(typeData)
|
||||||
// 将新项添加到数组开头,实现倒序
|
// 将新项添加到数组开头,实现倒序
|
||||||
this.equipmentList.unshift({
|
this.equipmentList.unshift({
|
||||||
...typeData,
|
...typeData,
|
||||||
preNum: 0
|
preNum: 0,
|
||||||
|
typeModel: typeData.typeName,
|
||||||
|
typeName:typeData.specificationType,
|
||||||
|
apDetection: '',
|
||||||
|
remark:'',
|
||||||
|
maCodeList:[],
|
||||||
|
bmFileInfos:[]
|
||||||
})
|
})
|
||||||
this.deviceType.push(lastSelected)
|
this.deviceType.push(lastSelected)
|
||||||
this.$message({
|
this.$message({
|
||||||
|
|
|
||||||
|
|
@ -683,7 +683,6 @@ export default {
|
||||||
// 将新项添加到数组开头,实现倒序
|
// 将新项添加到数组开头,实现倒序
|
||||||
this.equipmentList.unshift({
|
this.equipmentList.unshift({
|
||||||
...typeData,
|
...typeData,
|
||||||
preNum: 0,
|
|
||||||
createTime: null,
|
createTime: null,
|
||||||
productionTime: this.maForm.productionTime,
|
productionTime: this.maForm.productionTime,
|
||||||
purchaseTaxPrice: 0,
|
purchaseTaxPrice: 0,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue