西海岸:基础设施--一键申请增加最大数量限制
This commit is contained in:
parent
3f4e27177c
commit
48bfe71c6f
|
@ -752,6 +752,7 @@
|
|||
setSubmit,
|
||||
getYuyue,
|
||||
getSoldierList,
|
||||
getMaxApplyNum,
|
||||
} from '@/api/home'
|
||||
import mybus from '@/myplugins/mybus'
|
||||
import dayjs from 'dayjs'
|
||||
|
@ -1776,15 +1777,30 @@
|
|||
const dept = reactive({})
|
||||
// eslint-disable-next-line no-undef
|
||||
if (infrastructure) {
|
||||
console.log('infrastructure------------>', infrastructure)
|
||||
|
||||
// eslint-disable-next-line no-undef
|
||||
dept.deptId = infrastructure.deptId || ''
|
||||
// eslint-disable-next-line no-undef
|
||||
dept.deptName = infrastructure.deptName || ''
|
||||
}
|
||||
const apply = () => {
|
||||
|
||||
// 西海岸--判断设备最大数量个数
|
||||
const judegNumber = () => {
|
||||
return new Promise((resolve, reject) => {
|
||||
getMaxApplyNum(selectedRowKeys.value.length).then(res => {
|
||||
resolve(res)
|
||||
}).catch(err => {
|
||||
reject(err)
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
const apply = async () => {
|
||||
if (selectedRowKeys.value.length != 0) {
|
||||
// 判断最大数量
|
||||
let maxNumRes = await judegNumber();
|
||||
if (maxNumRes.data.code != 0) {
|
||||
return message.warning(maxNumRes.data.msg)
|
||||
}
|
||||
console.log('一键申请', selectedList.value)
|
||||
let arr = [
|
||||
{
|
||||
|
@ -1921,9 +1937,9 @@
|
|||
},
|
||||
{
|
||||
title: '归属',
|
||||
dataIndex: 'nodeName',
|
||||
dataIndex: 'managementUnitName',
|
||||
width: '60%',
|
||||
key: 'nodeName',
|
||||
key: 'managementUnitName',
|
||||
},
|
||||
{
|
||||
title: '状态',
|
||||
|
|
Loading…
Reference in New Issue