|
|
@ -37,7 +37,10 @@ |
|
|
|
</el-button> |
|
|
|
</template> |
|
|
|
<template #action="{ row }"> |
|
|
|
<ButtonBase :Butttondata="butttondata(row)" @button-base-click="buttonTableClick($event, row)" /> |
|
|
|
<ButtonBase |
|
|
|
:Butttondata="butttondata(row)" |
|
|
|
@button-base-click="buttonTableClick($event, row)" |
|
|
|
/> |
|
|
|
</template> |
|
|
|
</Table> |
|
|
|
</ContentWrap> |
|
|
@ -53,13 +56,13 @@ |
|
|
|
:tableData="tableData" |
|
|
|
:apiUpdate="CountPlanMainApi.updateCountPlanMain" |
|
|
|
:apiCreate="CountPlanMainApi.createCountPlanMain" |
|
|
|
:isBusiness="false" |
|
|
|
fromeWhere="countPlan" |
|
|
|
@handleAddTable="handleAddTable" |
|
|
|
@handleDeleteTable="handleDeleteTable" |
|
|
|
@searchTableSuccess="searchTableSuccess" |
|
|
|
@submitForm="submitForm" |
|
|
|
@formSelectChange="formSelectChange" |
|
|
|
@formSelectvVisibleChange="formSelectvVisibleChange" |
|
|
|
@selectChange="selectChange" |
|
|
|
/> |
|
|
|
|
|
|
@ -89,12 +92,26 @@ |
|
|
|
|
|
|
|
<script setup lang="ts"> |
|
|
|
import download from '@/utils/download' |
|
|
|
import { CountPlanMain,CountPlanMainRules,CountPlanDetail,CountPlanDetailRules } from './countPlanMain.data' |
|
|
|
import { |
|
|
|
CountPlanMain, |
|
|
|
CountPlanMainRules, |
|
|
|
CountPlanDetail, |
|
|
|
CountPlanDetailRules |
|
|
|
} from './countPlanMain.data' |
|
|
|
import * as CountPlanMainApi from '@/api/wms/countPlanMain' |
|
|
|
import * as CountPlanDetailApi from '@/api/wms/countPlanDetail' |
|
|
|
import * as OwnerApi from '@/api/wms/owner' |
|
|
|
import * as SupplierApi from '@/api/wms/supplier' |
|
|
|
import * as CustomerApi from '@/api/wms/customer' |
|
|
|
import * as WarehouseApi from '@/api/wms/warehouse' |
|
|
|
import * as AreaApi from '@/api/wms/areabasic' |
|
|
|
import * as LocationgroupApi from '@/api/wms/locationgroup' |
|
|
|
import * as LocationpApi from '@/api/wms/location' |
|
|
|
import * as defaultButtons from '@/utils/disposition/defaultButtons' |
|
|
|
|
|
|
|
import * as ItembasicApi from '@/api/wms/itembasic' |
|
|
|
import { Itembasic } from '@/views/wms/basicDataManage/itemManage/itembasic/itembasic.data' |
|
|
|
import { DICT_TYPE, getIntDictOptions, getStrDictOptions } from '@/utils/dict' |
|
|
|
|
|
|
|
// 盘点计划主 |
|
|
|
defineOptions({ name: 'CountPlanMain' }) |
|
|
@ -114,18 +131,17 @@ const updataTableColumns = (val) => { |
|
|
|
|
|
|
|
// 查询列表页面参数设置 |
|
|
|
const searchTableParams = ref([ |
|
|
|
{ |
|
|
|
formField: 'productItemCode', |
|
|
|
searchTableTitle: '物料信息', |
|
|
|
searchTableAllSchemas: Itembasic.allSchemas, |
|
|
|
searchTablePage: ItembasicApi.getItembasicPage |
|
|
|
} |
|
|
|
{ |
|
|
|
formField: 'productItemCode', |
|
|
|
searchTableTitle: '物料信息', |
|
|
|
searchTableAllSchemas: Itembasic.allSchemas, |
|
|
|
searchTablePage: ItembasicApi.getItembasicPage |
|
|
|
} |
|
|
|
]) |
|
|
|
|
|
|
|
// 查询页面返回 |
|
|
|
const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => { |
|
|
|
const searchTableSuccess = (formField, searchField, val, formRef, type, row) => { |
|
|
|
nextTick(() => { |
|
|
|
|
|
|
|
if (type == 'tableForm') { |
|
|
|
// 明细查询页赋值 |
|
|
|
//row[formField] = val[0][searchField] |
|
|
@ -142,14 +158,14 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => |
|
|
|
} else { |
|
|
|
const setV = {} |
|
|
|
// setV[formField] = val[0][searchField] |
|
|
|
setV[formField] = val.map(item=>item.code).join(',') |
|
|
|
setV[formField] = val.map((item) => item.code).join(',') |
|
|
|
formRef.setValues(setV) |
|
|
|
} |
|
|
|
}) |
|
|
|
} |
|
|
|
// 子表新增的时候选择表格之后需要会显得字段 |
|
|
|
// const Echo = ['ppNumber','poLine', 'batch', 'altBatch', 'itemCode', 'itemName', 'itemDesc1', 'itemDesc2', 'projectCode', 'qty', 'uom'] |
|
|
|
const Echo = [] |
|
|
|
const Echo = [] |
|
|
|
|
|
|
|
const { tableObject, tableMethods } = useTable({ |
|
|
|
getListApi: CountPlanMainApi.getCountPlanMainPage // 分页接口 |
|
|
@ -160,12 +176,12 @@ const { getList, setSearchParams } = tableMethods |
|
|
|
|
|
|
|
// 列表头部按钮 |
|
|
|
const HeadButttondata = [ |
|
|
|
defaultButtons.defaultAddBtn({hasPermi:'wms:count-plan-main:create'}), // 新增——需要手动修改下权限 |
|
|
|
defaultButtons.defaultAddBtn({ hasPermi: 'wms:count-plan-main:create' }), // 新增——需要手动修改下权限 |
|
|
|
// defaultButtons.defaultImportBtn({hasPermi:'wms:count-plan-main:import'}), // 导入 |
|
|
|
defaultButtons.defaultExportBtn({hasPermi:'wms:count-plan-main:export'}), // 导出 |
|
|
|
defaultButtons.defaultExportBtn({ hasPermi: 'wms:count-plan-main:export' }), // 导出 |
|
|
|
defaultButtons.defaultFreshBtn(null), // 刷新 |
|
|
|
defaultButtons.defaultFilterBtn(null), // 筛选 |
|
|
|
defaultButtons.defaultSetBtn(null), // 设置 |
|
|
|
defaultButtons.defaultSetBtn(null) // 设置 |
|
|
|
// { |
|
|
|
// label: '自定义扩展按钮', |
|
|
|
// name: 'zdy', |
|
|
@ -178,22 +194,28 @@ const HeadButttondata = [ |
|
|
|
|
|
|
|
// 头部按钮事件 |
|
|
|
const buttonBaseClick = (val, item) => { |
|
|
|
if (val == 'add') { // 新增 |
|
|
|
if (val == 'add') { |
|
|
|
// 新增 |
|
|
|
openForm('create') |
|
|
|
} else if (val == 'import') { // 导入 |
|
|
|
} else if (val == 'import') { |
|
|
|
// 导入 |
|
|
|
handleImport() |
|
|
|
} else if (val == 'export') { // 导出 |
|
|
|
} else if (val == 'export') { |
|
|
|
// 导出 |
|
|
|
handleExport() |
|
|
|
} else if (val == 'refresh') { // 刷新 |
|
|
|
} else if (val == 'refresh') { |
|
|
|
// 刷新 |
|
|
|
getList() |
|
|
|
} else if (val == 'filtrate') { // 筛选 |
|
|
|
} else { // 其他按钮 |
|
|
|
} else if (val == 'filtrate') { |
|
|
|
// 筛选 |
|
|
|
} else { |
|
|
|
// 其他按钮 |
|
|
|
console.log('其他按钮', item) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
// 根据状态返回该按钮是否显示 |
|
|
|
const isShowMainButton = (row,val) => { |
|
|
|
const isShowMainButton = (row, val) => { |
|
|
|
if (val.indexOf(row.status) > -1) { |
|
|
|
return false |
|
|
|
} else { |
|
|
@ -203,89 +225,82 @@ const isShowMainButton = (row,val) => { |
|
|
|
|
|
|
|
// 列表-操作按钮 |
|
|
|
const butttondata = (row) => { |
|
|
|
return [ |
|
|
|
defaultButtons.mainListPlanOpeBtn({hide:isShowMainButton(row,['5']),hasPermi:'wms:count-plan-main:open'}), // 打开 |
|
|
|
defaultButtons.mainListPlanCloBtn({hide:isShowMainButton(row,['1','2','3','4']),hasPermi:'wms:count-plan-main:close'}), // 关闭 |
|
|
|
defaultButtons.mainListPlanSubBtn({hide:isShowMainButton(row,['1']),hasPermi:'wms:count-plan-main:submit'}), // 提交审批 |
|
|
|
defaultButtons.mainListPlanTurBtn({hide:isShowMainButton(row,['2']),hasPermi:'wms:count-plan-main:reject'}), // 驳回 |
|
|
|
defaultButtons.mainListPlanAppBtn({hide:isShowMainButton(row,['2']),hasPermi:'wms:count-plan-main:agree'}), // 审批通过 |
|
|
|
defaultButtons.mainListPlanPubBtn({hide:isShowMainButton(row,['3']),hasPermi:'wms:count-plan-main:publish'}), // 发布 |
|
|
|
defaultButtons.mainListPlanResBtn({hide:isShowMainButton(row,['4']),hasPermi:'wms:count-plan-main:resetting'}), // 重置 |
|
|
|
defaultButtons.mainListEditBtn({hide:isShowMainButton(row,['1']),hasPermi:'wms:count-plan-main:update'}), // 编辑 |
|
|
|
] |
|
|
|
return [ |
|
|
|
defaultButtons.mainListPlanOpeBtn({ |
|
|
|
hide: isShowMainButton(row, ['5']), |
|
|
|
hasPermi: 'wms:count-plan-main:open' |
|
|
|
}), // 打开 |
|
|
|
defaultButtons.mainListPlanCloBtn({ |
|
|
|
hide: isShowMainButton(row, ['1', '2', '3', '4']), |
|
|
|
hasPermi: 'wms:count-plan-main:close' |
|
|
|
}), // 关闭 |
|
|
|
defaultButtons.mainListPlanSubBtn({ |
|
|
|
hide: isShowMainButton(row, ['1']), |
|
|
|
hasPermi: 'wms:count-plan-main:submit' |
|
|
|
}), // 提交审批 |
|
|
|
defaultButtons.mainListPlanTurBtn({ |
|
|
|
hide: isShowMainButton(row, ['2']), |
|
|
|
hasPermi: 'wms:count-plan-main:reject' |
|
|
|
}), // 驳回 |
|
|
|
defaultButtons.mainListPlanAppBtn({ |
|
|
|
hide: isShowMainButton(row, ['2']), |
|
|
|
hasPermi: 'wms:count-plan-main:agree' |
|
|
|
}), // 审批通过 |
|
|
|
defaultButtons.mainListPlanPubBtn({ |
|
|
|
hide: isShowMainButton(row, ['3']), |
|
|
|
hasPermi: 'wms:count-plan-main:publish' |
|
|
|
}), // 发布 |
|
|
|
defaultButtons.mainListPlanResBtn({ |
|
|
|
hide: isShowMainButton(row, ['4']), |
|
|
|
hasPermi: 'wms:count-plan-main:resetting' |
|
|
|
}), // 重置 |
|
|
|
defaultButtons.mainListEditBtn({ |
|
|
|
hide: isShowMainButton(row, ['1']), |
|
|
|
hasPermi: 'wms:count-plan-main:update' |
|
|
|
}) // 编辑 |
|
|
|
] |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 列表-操作按钮事件 |
|
|
|
const buttonTableClick = async (val, row) => { |
|
|
|
if (val == 'mainPlanOpe') { // 打开 |
|
|
|
CountPlanMainApi.open(row.id).then(() => { |
|
|
|
message.success(t('common.updateSuccess')) |
|
|
|
getList() |
|
|
|
}).catch(err => { |
|
|
|
console.log(err) |
|
|
|
}) |
|
|
|
} else if (val == 'mainPlanClo') { // 关闭 |
|
|
|
await message.confirm('确认要关闭吗?') |
|
|
|
CountPlanMainApi.close(row.id).then(() => { |
|
|
|
message.success(t('common.updateSuccess')) |
|
|
|
getList() |
|
|
|
}).catch(err => { |
|
|
|
console.log(err) |
|
|
|
}) |
|
|
|
} else if (val == 'mainPlanSub') { // 提交审批 |
|
|
|
await message.confirm('确认要提交审批吗?') |
|
|
|
CountPlanMainApi.submit(row.id).then(() => { |
|
|
|
message.success(t('common.updateSuccess')) |
|
|
|
getList() |
|
|
|
}).catch(err => { |
|
|
|
console.log(err) |
|
|
|
}) |
|
|
|
} else if (val == 'mainPlanTur') { // 驳回 |
|
|
|
await message.confirm('确认要驳回吗?') |
|
|
|
CountPlanMainApi.reject(row.id).then(() => { |
|
|
|
message.success(t('common.updateSuccess')) |
|
|
|
getList() |
|
|
|
}).catch(err => { |
|
|
|
console.log(err) |
|
|
|
}) |
|
|
|
} else if (val == 'mainPlanApp') { // 审批通过 |
|
|
|
await message.confirm('确认要审批通过吗?') |
|
|
|
CountPlanMainApi.agree(row.id).then(() => { |
|
|
|
message.success(t('common.updateSuccess')) |
|
|
|
getList() |
|
|
|
}).catch(err => { |
|
|
|
console.log(err) |
|
|
|
}) |
|
|
|
} else if (val == 'mainPlanPub') { // 发布 |
|
|
|
await message.confirm('确认要发布吗?') |
|
|
|
CountPlanMainApi.publish(row.id).then(() => { |
|
|
|
message.success(t('common.updateSuccess')) |
|
|
|
getList() |
|
|
|
}).catch(err => { |
|
|
|
console.log(err) |
|
|
|
}) |
|
|
|
} else if (val == 'mainPlanRes') { // 重置 |
|
|
|
await message.confirm('确认要重置吗?') |
|
|
|
CountPlanMainApi.resetting(row.id).then(() => { |
|
|
|
message.success(t('common.updateSuccess')) |
|
|
|
getList() |
|
|
|
}).catch(err => { |
|
|
|
console.log(err) |
|
|
|
}) |
|
|
|
} else if (val == 'edit') { // 编辑 |
|
|
|
if (val == 'mainClose') { |
|
|
|
// 关闭 |
|
|
|
console.log('列表-操作按钮事件-关闭') |
|
|
|
} else if (val == 'mainReAdd') { |
|
|
|
// 重新添加 |
|
|
|
console.log('列表-操作按钮事件-重新添加') |
|
|
|
} else if (val == 'mainSubmit') { |
|
|
|
// 提交审批 |
|
|
|
console.log('列表-操作按钮事件-提交审批') |
|
|
|
} else if (val == 'mainTurnDown') { |
|
|
|
// 驳回 |
|
|
|
console.log('列表-操作按钮事件-驳回') |
|
|
|
} else if (val == 'mainApprove') { |
|
|
|
// 审批通过 |
|
|
|
console.log('列表-操作按钮事件-审批通过') |
|
|
|
} else if (val == 'edit') { |
|
|
|
// 编辑 |
|
|
|
openForm('update', row) |
|
|
|
} else if (val == 'delete') { // 删除 |
|
|
|
} else if (val == 'delete') { |
|
|
|
// 删除 |
|
|
|
handleDelete(row.id) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
/** 添加/修改操作 */ |
|
|
|
const formRef = ref() |
|
|
|
const openForm =async (type: string, row?: number) => { |
|
|
|
const openForm = async (type: string, row?: number) => { |
|
|
|
tableData.value = [] // 重置明细数据 |
|
|
|
formRef.value.open(type, row) |
|
|
|
|
|
|
|
getOwnerAllList() |
|
|
|
getSupplierAllList() |
|
|
|
getCustomerAllList() |
|
|
|
getItembasicAllList() |
|
|
|
getWarehouseAllList() |
|
|
|
getAreaAllList() |
|
|
|
getLocationgroupAllList() |
|
|
|
getLocationAllList() |
|
|
|
} |
|
|
|
|
|
|
|
/** 详情操作 */ |
|
|
@ -324,16 +339,18 @@ const handleExport = async () => { |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* tableForm方法 |
|
|
|
*/ |
|
|
|
* tableForm方法 |
|
|
|
*/ |
|
|
|
const tableFormKeys = {} |
|
|
|
CountPlanDetail.allSchemas.tableFormColumns.forEach(item => { |
|
|
|
CountPlanDetail.allSchemas.tableFormColumns.forEach((item) => { |
|
|
|
tableFormKeys[item.field] = item.default ? item.default : '' |
|
|
|
}) |
|
|
|
const tableData = ref([]) |
|
|
|
|
|
|
|
// 添加明细 |
|
|
|
const handleAddTable = () => { |
|
|
|
console.log(tableFormKeys) |
|
|
|
tableFormKeys.formType = 'Select' |
|
|
|
tableData.value.push(JSON.parse(JSON.stringify(tableFormKeys))) |
|
|
|
} |
|
|
|
// 删除明细 |
|
|
@ -386,25 +403,176 @@ const searchFormClick = (searchData) => { |
|
|
|
getList() // 刷新当前列表 |
|
|
|
} |
|
|
|
// 选择盘点类型的时候针对限值的操作 |
|
|
|
const selectChange = (field,val)=>{ |
|
|
|
const selectChange = (field, val) => { |
|
|
|
console.log(val) |
|
|
|
if(field == 'type'){ |
|
|
|
if(val =='DYNAMIC'){ |
|
|
|
if (field == 'type') { |
|
|
|
if (val == 'DYNAMIC') { |
|
|
|
CountPlanMain.allSchemas.formSchema[3].label = '限值(%)' |
|
|
|
CountPlanMain.allSchemas.formSchema[3].componentProps.min = 0 |
|
|
|
CountPlanMain.allSchemas.formSchema[3].componentProps.max = 100 |
|
|
|
CountPlanMain.allSchemas.formSchema[3].componentProps.disabled = false |
|
|
|
}else if(val =='LOW' || val =='RANDOM'){ |
|
|
|
} else if (val == 'LOW' || val == 'RANDOM') { |
|
|
|
CountPlanMain.allSchemas.formSchema[3].label = '限值' |
|
|
|
CountPlanMain.allSchemas.formSchema[3].componentProps.min = 0 |
|
|
|
CountPlanMain.allSchemas.formSchema[3].componentProps.max = Infinity |
|
|
|
CountPlanMain.allSchemas.formSchema[3].componentProps.disabled = false |
|
|
|
}else{ |
|
|
|
} else { |
|
|
|
CountPlanMain.allSchemas.formSchema[3].componentProps.disabled = true |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
let valueList = [] |
|
|
|
// 选择盘点范围类型 |
|
|
|
const formSelectChange = async (field, val, row) => { |
|
|
|
console.log(row[field]) |
|
|
|
console.log(field) |
|
|
|
console.log(val) |
|
|
|
if (field == 'type') { |
|
|
|
row.value = '' |
|
|
|
if (row.type == 'OWNER' || row.type == 'SUPPLIER'|| row.type == 'CUSTOMER'|| row.type == 'ABC'|| row.type == 'ITEMS_TYPE'|| row.type == 'ITEMS_GROUP'||row.type == 'ITEMS_CODE'||row.type == 'WAREHOUSE_CODE'||row.type == 'AREABASIC_CODE'||row.type == 'LOCATIONGROUP_CODE'||row.type == 'LOCATION_CODE') { |
|
|
|
row.formType = 'InputString' |
|
|
|
// row.initOptions = valueList |
|
|
|
}else if(row.type == 'PROJECT'){ |
|
|
|
// row = { |
|
|
|
// type: 'InputString', |
|
|
|
// width: '300', |
|
|
|
// initOptions: valueList |
|
|
|
// } |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
const formSelectvVisibleChange = async (field, val, row) => { |
|
|
|
console.log(getStrDictOptions(DICT_TYPE.ABC_CLASS)) |
|
|
|
switch (row.type) { |
|
|
|
case 'OWNER': |
|
|
|
valueList = ownerAllList.value |
|
|
|
break; |
|
|
|
case 'SUPPLIER': |
|
|
|
valueList = supplierAllList.value |
|
|
|
break; |
|
|
|
case 'CUSTOMER': |
|
|
|
valueList = customerAllList.value |
|
|
|
break; |
|
|
|
case 'ABC': |
|
|
|
valueList = getStrDictOptions(DICT_TYPE.ABC_CLASS) |
|
|
|
break; |
|
|
|
case 'ITEMS_TYPE': |
|
|
|
valueList = getStrDictOptions(DICT_TYPE.ITEM_TYPE) |
|
|
|
break; |
|
|
|
case 'ITEMS_GROUP': |
|
|
|
valueList = getStrDictOptions(DICT_TYPE.ITEM_GROUP) |
|
|
|
break; |
|
|
|
case 'ITEMS_CODE': |
|
|
|
valueList = itembasicAllList.value |
|
|
|
break; |
|
|
|
case 'WAREHOUSE_CODE': |
|
|
|
valueList = warehouseAllList.value |
|
|
|
break |
|
|
|
case 'AREABASIC_CODE': |
|
|
|
valueList = areaAllList.value |
|
|
|
break |
|
|
|
case 'LOCATIONGROUP_CODE': |
|
|
|
valueList = locationgroupAllList.value |
|
|
|
break |
|
|
|
case 'LOCATION_CODE': |
|
|
|
valueList = locationAllList.value |
|
|
|
break |
|
|
|
} |
|
|
|
CountPlanDetail.allSchemas.tableFormColumns[1].tableForm = { |
|
|
|
type: 'Select', |
|
|
|
width: '300', |
|
|
|
initOptions: valueList |
|
|
|
} |
|
|
|
} |
|
|
|
const ownerAllList = ref() |
|
|
|
const supplierAllList = ref() |
|
|
|
const customerAllList = ref() |
|
|
|
const itembasicAllList = ref() |
|
|
|
const warehouseAllList = ref() |
|
|
|
const areaAllList = ref() |
|
|
|
const locationgroupAllList = ref() |
|
|
|
const locationAllList = ref() |
|
|
|
// 获取货主列表 |
|
|
|
const getOwnerAllList = async () => { |
|
|
|
await OwnerApi.getOwnerList().then((res) => { |
|
|
|
res.forEach((element) => { |
|
|
|
element.value = element.code |
|
|
|
element.label = element.name |
|
|
|
}) |
|
|
|
ownerAllList.value = res |
|
|
|
}) |
|
|
|
} |
|
|
|
// 获取供应商列表 |
|
|
|
const getSupplierAllList = async () => { |
|
|
|
await SupplierApi.getSupplierList().then((res) => { |
|
|
|
res.forEach((element) => { |
|
|
|
element.value = element.code |
|
|
|
element.label = element.name |
|
|
|
}) |
|
|
|
supplierAllList.value = res |
|
|
|
}) |
|
|
|
} |
|
|
|
// 获取供应商列表 |
|
|
|
const getCustomerAllList = async () => { |
|
|
|
await CustomerApi.getCustomerList().then((res) => { |
|
|
|
res.forEach((element) => { |
|
|
|
element.value = element.code |
|
|
|
element.label = element.name |
|
|
|
}) |
|
|
|
customerAllList.value = res |
|
|
|
}) |
|
|
|
} |
|
|
|
// 获取物品代码列表 |
|
|
|
const getItembasicAllList = async () => { |
|
|
|
await ItembasicApi.getItembasicList().then((res) => { |
|
|
|
res.forEach((element) => { |
|
|
|
element.value = element.code |
|
|
|
element.label = element.name |
|
|
|
}) |
|
|
|
itembasicAllList.value = res |
|
|
|
}) |
|
|
|
} |
|
|
|
// 获取仓库列表 |
|
|
|
const getWarehouseAllList = async () => { |
|
|
|
await WarehouseApi.getWarehouseList({available:'TRUE'}).then((res) => { |
|
|
|
res.forEach((element) => { |
|
|
|
element.value = element.code |
|
|
|
element.label = element.name |
|
|
|
}) |
|
|
|
warehouseAllList.value = res |
|
|
|
}) |
|
|
|
} |
|
|
|
// 获取库区列表 |
|
|
|
const getAreaAllList = async () => { |
|
|
|
await AreaApi.getAreaList({available:'TRUE'}).then((res) => { |
|
|
|
res.forEach((element) => { |
|
|
|
element.value = element.code |
|
|
|
element.label = element.name |
|
|
|
}) |
|
|
|
areaAllList.value = res |
|
|
|
}) |
|
|
|
} |
|
|
|
// 获取库位组列表 |
|
|
|
const getLocationgroupAllList = async () => { |
|
|
|
await LocationgroupApi.getLocationgroupList({available:'TRUE'}).then((res) => { |
|
|
|
res.forEach((element) => { |
|
|
|
element.value = element.code |
|
|
|
element.label = element.name |
|
|
|
}) |
|
|
|
locationgroupAllList.value = res |
|
|
|
}) |
|
|
|
} |
|
|
|
// 获取库位列表 |
|
|
|
const getLocationAllList = async () => { |
|
|
|
await LocationpApi.getLocationList({available:'TRUE'}).then((res) => { |
|
|
|
res.forEach((element) => { |
|
|
|
element.value = element.code |
|
|
|
element.label = element.name |
|
|
|
}) |
|
|
|
locationAllList.value = res |
|
|
|
}) |
|
|
|
} |
|
|
|
/** 初始化 **/ |
|
|
|
onMounted(async () => { |
|
|
|
getList() |
|
|
|