选择物品类型后,增加校验当前领用是否超过库存,超过弹框提示
This commit is contained in:
parent
cf2de901ae
commit
757262be2f
|
|
@ -314,3 +314,12 @@ export const outboundOrderApi = (params) => {
|
||||||
params,
|
params,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 领料申请-校验是否在审核
|
||||||
|
export function getNumISenough(params) {
|
||||||
|
return request({
|
||||||
|
url: '/base/tm_task/getNumISenough',
|
||||||
|
method: 'get',
|
||||||
|
params,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -270,6 +270,7 @@ import {
|
||||||
editLeaseApply,
|
editLeaseApply,
|
||||||
getLeaseApplyListAll,
|
getLeaseApplyListAll,
|
||||||
getLeaseApplyAuditListAll,
|
getLeaseApplyAuditListAll,
|
||||||
|
getNumISenough,
|
||||||
} from '@/api/claimAndRefund/receive'
|
} from '@/api/claimAndRefund/receive'
|
||||||
|
|
||||||
import {
|
import {
|
||||||
|
|
@ -834,8 +835,27 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
/////// 设备类型树 切换
|
/////// 设备类型树 切换
|
||||||
deviceTypeChange(val) {
|
async deviceTypeChange(val) {
|
||||||
console.log(val)
|
console.log(val)
|
||||||
|
const warnMsg = await this.handleDeviceType(val[val.length - 1])
|
||||||
|
// console.log('🚀 ~ deviceTypeChange-->> ~ warnMsg:', warnMsg)
|
||||||
|
if (warnMsg) {
|
||||||
|
// 确认框
|
||||||
|
this.$confirm(warnMsg, '提示', {
|
||||||
|
confirmButtonText: '确定',
|
||||||
|
cancelButtonText: '取消',
|
||||||
|
type: 'warning',
|
||||||
|
})
|
||||||
|
.then(() => {
|
||||||
|
this.handleData(val)
|
||||||
|
})
|
||||||
|
.catch(() => {})
|
||||||
|
} else {
|
||||||
|
this.handleData(val)
|
||||||
|
}
|
||||||
|
|
||||||
|
},
|
||||||
|
handleData(val) {
|
||||||
let nodes = null
|
let nodes = null
|
||||||
nodes =
|
nodes =
|
||||||
this.$refs.deviceTypeCascader.getCheckedNodes().length > 0
|
this.$refs.deviceTypeCascader.getCheckedNodes().length > 0
|
||||||
|
|
@ -876,6 +896,19 @@ export default {
|
||||||
|
|
||||||
this.deviceType = {}
|
this.deviceType = {}
|
||||||
},
|
},
|
||||||
|
// 选择设备类型后-处理数据
|
||||||
|
async handleDeviceType(val) {
|
||||||
|
// console.log('🚀 ~ handleDeviceType ~ val:', val)
|
||||||
|
//getNumISenough
|
||||||
|
try {
|
||||||
|
const res = await getNumISenough({ typeId: val })
|
||||||
|
// console.log('🚀 ~ handleDeviceType ~ res:', res)
|
||||||
|
return res.data.warnMsg
|
||||||
|
} catch (error) {
|
||||||
|
console.log('🚀 ~ handleDeviceType ~ error:', error)
|
||||||
|
}
|
||||||
|
|
||||||
|
},
|
||||||
//// 将数据处理成 表格中需要的数据
|
//// 将数据处理成 表格中需要的数据
|
||||||
handelTableItemData(node) {
|
handelTableItemData(node) {
|
||||||
const template = JSON.parse(
|
const template = JSON.parse(
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue