|
@ -117,7 +117,6 @@ import * as defaultButtons from '@/utils/disposition/defaultButtons' |
|
|
import * as ItembasicApi from '@/api/wms/itembasic' |
|
|
import * as ItembasicApi from '@/api/wms/itembasic' |
|
|
import { Itembasic } from '@/views/wms/basicDataManage/itemManage/itembasic/itembasic.data' |
|
|
import { Itembasic } from '@/views/wms/basicDataManage/itemManage/itembasic/itembasic.data' |
|
|
import { DICT_TYPE, getIntDictOptions, getStrDictOptions } from '@/utils/dict' |
|
|
import { DICT_TYPE, getIntDictOptions, getStrDictOptions } from '@/utils/dict' |
|
|
console.log('CountPlanDetail.allSchemas', CountPlanDetail.allSchemas) |
|
|
|
|
|
|
|
|
|
|
|
// 盘点计划主 |
|
|
// 盘点计划主 |
|
|
defineOptions({ name: 'CountPlanMain' }) |
|
|
defineOptions({ name: 'CountPlanMain' }) |
|
@ -296,10 +295,12 @@ const buttonTableClick = async (val, row) => { |
|
|
/** 添加/修改操作 */ |
|
|
/** 添加/修改操作 */ |
|
|
const formRef = ref() |
|
|
const formRef = ref() |
|
|
const openForm = async (type: string, row?: number) => { |
|
|
const openForm = async (type: string, row?: number) => { |
|
|
tableData.value = [ { |
|
|
tableData.value = [ |
|
|
type: '', |
|
|
{ |
|
|
value: '' |
|
|
type: '', |
|
|
}] // 重置明细数据 |
|
|
value: '' |
|
|
|
|
|
} |
|
|
|
|
|
] // 重置明细数据 |
|
|
formRef.value.open(type, row) |
|
|
formRef.value.open(type, row) |
|
|
|
|
|
|
|
|
getOwnerAllList() |
|
|
getOwnerAllList() |
|
@ -315,6 +316,14 @@ const openForm = async (type: string, row?: number) => { |
|
|
/** 详情操作 */ |
|
|
/** 详情操作 */ |
|
|
const detailRef = ref() |
|
|
const detailRef = ref() |
|
|
const openDetail = (row: any, titleName: any, titleValue: any) => { |
|
|
const openDetail = (row: any, titleName: any, titleValue: any) => { |
|
|
|
|
|
getOwnerAllList() |
|
|
|
|
|
getSupplierAllList() |
|
|
|
|
|
getCustomerAllList() |
|
|
|
|
|
getItembasicAllList() |
|
|
|
|
|
getWarehouseAllList() |
|
|
|
|
|
getAreaAllList() |
|
|
|
|
|
getLocationgroupAllList() |
|
|
|
|
|
getLocationAllList() |
|
|
detailRef.value.openDetail(row, titleName, titleValue) |
|
|
detailRef.value.openDetail(row, titleName, titleValue) |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
@ -354,10 +363,12 @@ let tableFormKeys = {} |
|
|
CountPlanDetail.allSchemas.tableFormColumns.forEach((item) => { |
|
|
CountPlanDetail.allSchemas.tableFormColumns.forEach((item) => { |
|
|
tableFormKeys[item.field] = item.default ? item.default : '' |
|
|
tableFormKeys[item.field] = item.default ? item.default : '' |
|
|
}) |
|
|
}) |
|
|
const tableData = ref([{ |
|
|
const tableData = ref([ |
|
|
|
|
|
{ |
|
|
type: '', |
|
|
type: '', |
|
|
value: '' |
|
|
value: '' |
|
|
}]) |
|
|
} |
|
|
|
|
|
]) |
|
|
|
|
|
|
|
|
// 添加明细 |
|
|
// 添加明细 |
|
|
const handleAddTable = () => { |
|
|
const handleAddTable = () => { |
|
@ -375,13 +386,12 @@ const handleDeleteTable = (item, index) => { |
|
|
|
|
|
|
|
|
// 主子数据 提交 |
|
|
// 主子数据 提交 |
|
|
const submitForm = async (formType, data) => { |
|
|
const submitForm = async (formType, data) => { |
|
|
data.subList = tableData.value.map(item=>{ |
|
|
data.subList = tableData.value.map((item) => { |
|
|
return{ |
|
|
return { |
|
|
type:item.type, |
|
|
type: item.type, |
|
|
value:item.value, |
|
|
value: item.value |
|
|
} |
|
|
} |
|
|
}) // 拼接子表数据参数 |
|
|
}) // 拼接子表数据参数 |
|
|
console.log(tableData.value) |
|
|
|
|
|
try { |
|
|
try { |
|
|
if (formType === 'create') { |
|
|
if (formType === 'create') { |
|
|
await CountPlanMainApi.createCountPlanMain(data) |
|
|
await CountPlanMainApi.createCountPlanMain(data) |
|
@ -443,8 +453,6 @@ const selectChange = (field, val) => { |
|
|
} |
|
|
} |
|
|
// 选择盘点范围类型 |
|
|
// 选择盘点范围类型 |
|
|
const tableFormChange = async (field, val, row) => { |
|
|
const tableFormChange = async (field, val, row) => { |
|
|
console.log(field) |
|
|
|
|
|
console.log(val) |
|
|
|
|
|
if (field == 'type') { |
|
|
if (field == 'type') { |
|
|
row.value = '' |
|
|
row.value = '' |
|
|
if ( |
|
|
if ( |
|
@ -502,97 +510,105 @@ const tableFormChange = async (field, val, row) => { |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
const allList=ref({ |
|
|
const allList = ref({ |
|
|
ownerAllList:[], |
|
|
ownerAllList: [], |
|
|
supplierAllList:[], |
|
|
supplierAllList: [], |
|
|
customerAllList:[], |
|
|
customerAllList: [], |
|
|
itembasicAllList:[], |
|
|
itembasicAllList: [], |
|
|
warehouseAllList:[], |
|
|
warehouseAllList: [], |
|
|
areaAllList:[], |
|
|
areaAllList: [], |
|
|
locationgroupAllList:[], |
|
|
locationgroupAllList: [], |
|
|
locationAllList:[], |
|
|
locationAllList: [], |
|
|
abcList:getStrDictOptions(DICT_TYPE.ABC_CLASS), |
|
|
abcList: getStrDictOptions(DICT_TYPE.ABC_CLASS), |
|
|
itemTypeList:getStrDictOptions(DICT_TYPE.ITEM_TYPE), |
|
|
itemTypeList: getStrDictOptions(DICT_TYPE.ITEM_TYPE), |
|
|
itemGroupList:getStrDictOptions(DICT_TYPE.ITEM_GROUP), |
|
|
itemGroupList: getStrDictOptions(DICT_TYPE.ITEM_GROUP) |
|
|
}) |
|
|
}) |
|
|
// 获取货主列表 |
|
|
// 获取货主列表 |
|
|
const getOwnerAllList = async () => { |
|
|
const getOwnerAllList = async () => { |
|
|
await OwnerApi.getOwnerList().then((res) => { |
|
|
await OwnerApi.getOwnerList().then((res) => { |
|
|
res.forEach((element) => { |
|
|
allList.value.ownerAllList = res.map((element) => { |
|
|
element.value = element.code |
|
|
return { |
|
|
element.label = element.name |
|
|
value: element.code, |
|
|
|
|
|
label: element.name |
|
|
|
|
|
} |
|
|
}) |
|
|
}) |
|
|
allList.value.ownerAllList = res |
|
|
|
|
|
}) |
|
|
}) |
|
|
} |
|
|
} |
|
|
// 获取供应商列表 |
|
|
// 获取供应商列表 |
|
|
const getSupplierAllList = async () => { |
|
|
const getSupplierAllList = async () => { |
|
|
await SupplierApi.getSupplierList().then((res) => { |
|
|
await SupplierApi.getSupplierList().then((res) => { |
|
|
res.forEach((element) => { |
|
|
allList.value.supplierAllList = res.map((element) => { |
|
|
element.value = element.code |
|
|
return { |
|
|
element.label = element.name |
|
|
value: element.code, |
|
|
|
|
|
label: element.name |
|
|
|
|
|
} |
|
|
}) |
|
|
}) |
|
|
allList.value.supplierAllList = res |
|
|
|
|
|
}) |
|
|
}) |
|
|
} |
|
|
} |
|
|
// 获取供应商列表 |
|
|
// 获取供应商列表 |
|
|
const getCustomerAllList = async () => { |
|
|
const getCustomerAllList = async () => { |
|
|
await CustomerApi.getCustomerList().then((res) => { |
|
|
await CustomerApi.getCustomerList().then((res) => { |
|
|
res.forEach((element) => { |
|
|
allList.value.customerAllList = res.map((element) => { |
|
|
element.value = element.code |
|
|
return { |
|
|
element.label = element.name |
|
|
value: element.code, |
|
|
|
|
|
label: element.name |
|
|
|
|
|
} |
|
|
}) |
|
|
}) |
|
|
allList.value.customerAllList = res |
|
|
|
|
|
}) |
|
|
}) |
|
|
} |
|
|
} |
|
|
// 获取物品代码列表 |
|
|
// 获取物品代码列表 |
|
|
const getItembasicAllList = async () => { |
|
|
const getItembasicAllList = async () => { |
|
|
await ItembasicApi.getItembasicList().then((res) => { |
|
|
await ItembasicApi.getItembasicList().then((res) => { |
|
|
res.forEach((element) => { |
|
|
allList.value.itembasicAllList = res.map((element) => { |
|
|
element.value = element.code |
|
|
return { |
|
|
element.label = element.name |
|
|
value: element.code, |
|
|
|
|
|
label: element.name |
|
|
|
|
|
} |
|
|
}) |
|
|
}) |
|
|
allList.value.itembasicAllList = res |
|
|
|
|
|
}) |
|
|
}) |
|
|
} |
|
|
} |
|
|
// 获取仓库列表 |
|
|
// 获取仓库列表 |
|
|
const getWarehouseAllList = async () => { |
|
|
const getWarehouseAllList = async () => { |
|
|
await WarehouseApi.getWarehouseList({ available: 'TRUE' }).then((res) => { |
|
|
await WarehouseApi.getWarehouseList({ available: 'TRUE' }).then((res) => { |
|
|
res.forEach((element) => { |
|
|
allList.value.warehouseAllList = res.map((element) => { |
|
|
element.value = element.code |
|
|
return { |
|
|
element.label = element.name |
|
|
value: element.code, |
|
|
|
|
|
label: element.name |
|
|
|
|
|
} |
|
|
}) |
|
|
}) |
|
|
allList.value.warehouseAllList = res |
|
|
|
|
|
}) |
|
|
}) |
|
|
} |
|
|
} |
|
|
// 获取库区列表 |
|
|
// 获取库区列表 |
|
|
const getAreaAllList = async () => { |
|
|
const getAreaAllList = async () => { |
|
|
await AreaApi.getAreaList({ available: 'TRUE' }).then((res) => { |
|
|
await AreaApi.getAreaList({ available: 'TRUE' }).then((res) => { |
|
|
res.forEach((element) => { |
|
|
allList.value.areaAllList = res.map((element) => { |
|
|
element.value = element.code |
|
|
return { |
|
|
element.label = element.name |
|
|
value: element.code, |
|
|
|
|
|
label: element.name |
|
|
|
|
|
} |
|
|
}) |
|
|
}) |
|
|
allList.value.areaAllList = res |
|
|
|
|
|
}) |
|
|
}) |
|
|
} |
|
|
} |
|
|
// 获取库位组列表 |
|
|
// 获取库位组列表 |
|
|
const getLocationgroupAllList = async () => { |
|
|
const getLocationgroupAllList = async () => { |
|
|
await LocationgroupApi.getLocationgroupList({ available: 'TRUE' }).then((res) => { |
|
|
await LocationgroupApi.getLocationgroupList({ available: 'TRUE' }).then((res) => { |
|
|
res.forEach((element) => { |
|
|
allList.value.locationgroupAllList = res.map((element) => { |
|
|
element.value = element.code |
|
|
return { |
|
|
element.label = element.name |
|
|
value: element.code, |
|
|
|
|
|
label: element.name |
|
|
|
|
|
} |
|
|
}) |
|
|
}) |
|
|
allList.value.locationgroupAllList = res |
|
|
|
|
|
}) |
|
|
}) |
|
|
} |
|
|
} |
|
|
// 获取库位列表 |
|
|
// 获取库位列表 |
|
|
const getLocationAllList = async () => { |
|
|
const getLocationAllList = async () => { |
|
|
await LocationpApi.getLocationList({ available: 'TRUE' }).then((res) => { |
|
|
await LocationpApi.getLocationList({ available: 'TRUE' }).then((res) => { |
|
|
res.forEach((element) => { |
|
|
allList.value.locationAllList = res.map((element) => { |
|
|
element.value = element.code |
|
|
return { |
|
|
element.label = element.name |
|
|
value: element.code, |
|
|
|
|
|
label: element.name |
|
|
|
|
|
} |
|
|
}) |
|
|
}) |
|
|
allList.value.locationAllList = res |
|
|
|
|
|
}) |
|
|
}) |
|
|
} |
|
|
} |
|
|
/** 初始化 **/ |
|
|
/** 初始化 **/ |
|
|