diff --git a/src/api/eam/basicEamWorkshop/index.ts b/src/api/eam/basicEamWorkshop/index.ts index 729ea6dae..2728f74eb 100644 --- a/src/api/eam/basicEamWorkshop/index.ts +++ b/src/api/eam/basicEamWorkshop/index.ts @@ -67,3 +67,9 @@ export const importTemplate = () => { export const updateEnableCode = async (data: BasicEamWorkshopVO) => { return await request.post({ url: `/eam/basic-eam-workshop/ables` , data }) } + + +// 查询EAM车间列表 +export const getBasicEamWorkshopNoPage = async (params) => { + return await request.get({ url: `/eam/basic-eam-workshop/noPage`, params }) +} \ No newline at end of file diff --git a/src/api/eam/repairSparePartsRecord/index.ts b/src/api/eam/repairSparePartsRecord/index.ts new file mode 100644 index 000000000..d499696d8 --- /dev/null +++ b/src/api/eam/repairSparePartsRecord/index.ts @@ -0,0 +1,67 @@ +import request from '@/config/axios' + +export interface RepairSparePartsRecordVO { + id: number + number: string + sparePartsCode: string + qty: number + areaCode: string + locationCode: string + status: string + result: string + applyer: string + approver: number + approveContent: string + approveTime: Date + autoExamine: string + autoAgree: string + directCreateRecord: string + departmentCode: string + remark: string + siteId: string + available: string + deletionTime: Date + deleterId: byte[] + concurrencyStamp: number +} + +// 查询备件维修申请列表 +export const getRepairSparePartsRecordPage = async (params) => { + if (params.isSearch) { + delete params.isSearch + const data = {...params} + return await request.post({ url: '/eam/repair-spare-parts-record/senior', data }) + } else { + return await request.get({ url: `/eam/repair-spare-parts-record/page`, params }) + } +} + +// 查询备件维修申请详情 +export const getRepairSparePartsRecord = async (id: number) => { + return await request.get({ url: `/eam/repair-spare-parts-record/get?id=` + id }) +} + +// 新增备件维修申请 +export const createRepairSparePartsRecord = async (data: RepairSparePartsRecordVO) => { + return await request.post({ url: `/eam/repair-spare-parts-record/create`, data }) +} + +// 修改备件维修申请 +export const updateRepairSparePartsRecord = async (data: RepairSparePartsRecordVO) => { + return await request.put({ url: `/eam/repair-spare-parts-record/update`, data }) +} + +// 删除备件维修申请 +export const deleteRepairSparePartsRecord = async (id: number) => { + return await request.delete({ url: `/eam/repair-spare-parts-record/delete?id=` + id }) +} + +// 导出备件维修申请 Excel +export const exportRepairSparePartsRecord = async (params) => { + return await request.download({ url: `/eam/repair-spare-parts-record/export-excel`, params }) +} + +// 下载用户导入模板 +export const importTemplate = () => { + return request.download({ url: '/eam/repair-spare-parts-record/get-import-template' }) +} \ No newline at end of file diff --git a/src/api/eam/repairSparePartsRequest/index.ts b/src/api/eam/repairSparePartsRequest/index.ts new file mode 100644 index 000000000..b99181ff9 --- /dev/null +++ b/src/api/eam/repairSparePartsRequest/index.ts @@ -0,0 +1,68 @@ +import request from '@/config/axios' + +export interface RepairSparePartsRequestVO { + id: number + number: string + sparePartsCode: string + qty: number + areaCode: string + locationCode: string + status: string + result: string + applyer: string + approver: number + approveContent: string + approveTime: Date + autoExamine: string + autoAgree: string + directCreateRecord: string + departmentCode: string + remark: string + siteId: string + available: string + deletionTime: Date + deleterId: byte[] + concurrencyStamp: number + repairCause: string +} + +// 查询备件维修申请列表 +export const getRepairSparePartsRequestPage = async (params) => { + if (params.isSearch) { + delete params.isSearch + const data = {...params} + return await request.post({ url: '/eam/repair-spare-parts-request/senior', data }) + } else { + return await request.get({ url: `/eam/repair-spare-parts-request/page`, params }) + } +} + +// 查询备件维修申请详情 +export const getRepairSparePartsRequest = async (id: number) => { + return await request.get({ url: `/eam/repair-spare-parts-request/get?id=` + id }) +} + +// 新增备件维修申请 +export const createRepairSparePartsRequest = async (data: RepairSparePartsRequestVO) => { + return await request.post({ url: `/eam/repair-spare-parts-request/create`, data }) +} + +// 修改备件维修申请 +export const updateRepairSparePartsRequest = async (data: RepairSparePartsRequestVO) => { + return await request.put({ url: `/eam/repair-spare-parts-request/update`, data }) +} + +// 删除备件维修申请 +export const deleteRepairSparePartsRequest = async (id: number) => { + return await request.delete({ url: `/eam/repair-spare-parts-request/delete?id=` + id }) +} + +// 导出备件维修申请 Excel +export const exportRepairSparePartsRequest = async (params) => { + return await request.download({ url: `/eam/repair-spare-parts-request/export-excel`, params }) +} + +// 下载用户导入模板 +export const importTemplate = () => { + return request.download({ url: '/eam/repair-spare-parts-request/get-import-template' }) +} \ No newline at end of file diff --git a/src/api/eam/toolChangedRecord/index.ts b/src/api/eam/toolChangedRecord/index.ts new file mode 100644 index 000000000..c3b32e08f --- /dev/null +++ b/src/api/eam/toolChangedRecord/index.ts @@ -0,0 +1,59 @@ +import request from '@/config/axios' + +export interface ToolChangedRecordVO { + id: number + code: string + name: string + statusBefore: string + statusAfter: string + operator: number + operateTime: Date + departmentCode: string + remark: string + siteId: string + available: string + deletionTime: Date + deleterId: byte[] + concurrencyStamp: number +} + +// 查询设备变更记录列表 +export const getToolChangedRecordPage = async (params) => { + if (params.isSearch) { + delete params.isSearch + const data = {...params} + return await request.post({ url: '/eam/tool-changed-record/senior', data }) + } else { + return await request.get({ url: `/eam/tool-changed-record/page`, params }) + } +} + +// 查询设备变更记录详情 +export const getToolChangedRecord = async (id: number) => { + return await request.get({ url: `/eam/tool-changed-record/get?id=` + id }) +} + +// 新增设备变更记录 +export const createToolChangedRecord = async (data: ToolChangedRecordVO) => { + return await request.post({ url: `/eam/tool-changed-record/create`, data }) +} + +// 修改设备变更记录 +export const updateToolChangedRecord = async (data: ToolChangedRecordVO) => { + return await request.put({ url: `/eam/tool-changed-record/update`, data }) +} + +// 删除设备变更记录 +export const deleteToolChangedRecord = async (id: number) => { + return await request.delete({ url: `/eam/tool-changed-record/delete?id=` + id }) +} + +// 导出设备变更记录 Excel +export const exportToolChangedRecord = async (params) => { + return await request.download({ url: `/eam/tool-changed-record/export-excel`, params }) +} + +// 下载用户导入模板 +export const importTemplate = () => { + return request.download({ url: '/eam/tool-changed-record/get-import-template' }) +} \ No newline at end of file diff --git a/src/api/eam/toolSigning/index.ts b/src/api/eam/toolSigning/index.ts new file mode 100644 index 000000000..66fca87e3 --- /dev/null +++ b/src/api/eam/toolSigning/index.ts @@ -0,0 +1,79 @@ +import request from '@/config/axios' + +export interface ToolSigningVO { + id: number + toolCode: string + operationDate: Date + operationer: string + operationDept: string + telephone: string + supplierCode: string + supplierPeople: string + supplierTelephone: string + status: string + approver: number + approveContent: string + approveTime: Date + autoExamine: string + autoAgree: string + directCreateRecord: string + storageLocation: string + factoryAreaCode: string + workshopCode: string + lineCode: string + processCode: string + workstationCode: string + departmentCode: string + remark: string + siteId: string + available: string + deletionTime: Date + deleterId: byte[] + concurrencyStamp: number +} + +// 查询工装到货签收记录列表 +export const getToolSigningPage = async (params) => { + if (params.isSearch) { + delete params.isSearch + const data = {...params} + return await request.post({ url: '/eam/tool-signing/senior', data }) + } else { + return await request.get({ url: `/eam/tool-signing/page`, params }) + } +} + +// 查询工装到货签收记录详情 +export const getToolSigning = async (id: number) => { + return await request.get({ url: `/eam/tool-signing/get?id=` + id }) +} + +// 新增工装到货签收记录 +export const createToolSigning = async (data: ToolSigningVO) => { + return await request.post({ url: `/eam/tool-signing/create`, data }) +} + +// 新增工装到货签收记录 +export const createToolSigningNew = async (data: ToolSigningVO) => { + return await request.post({ url: `/eam/tool-signing/createNew`, data }) +} + +// 修改工装到货签收记录 +export const updateToolSigning = async (data: ToolSigningVO) => { + return await request.put({ url: `/eam/tool-signing/update`, data }) +} + +// 删除工装到货签收记录 +export const deleteToolSigning = async (id: number) => { + return await request.delete({ url: `/eam/tool-signing/delete?id=` + id }) +} + +// 导出工装到货签收记录 Excel +export const exportToolSigning = async (params) => { + return await request.download({ url: `/eam/tool-signing/export-excel`, params }) +} + +// 下载用户导入模板 +export const importTemplate = () => { + return request.download({ url: '/eam/tool-signing/get-import-template' }) +} \ No newline at end of file diff --git a/src/api/qms/counter/index.ts b/src/api/qms/counter/index.ts index cd6d8e2a9..9ae69ff10 100644 --- a/src/api/qms/counter/index.ts +++ b/src/api/qms/counter/index.ts @@ -60,3 +60,7 @@ export const exportCounter = async (params) => { export const importTemplate = () => { return request.download({ url: '/qms/counter/get-import-template' }) } + +export const getNextStage = async (id:number) => { + return await request.get({ url: `/qms/counter/getNextStage?id=` + id}) +} diff --git a/src/api/wms/business/inputBlur.ts b/src/api/wms/business/inputBlur.ts index 4e1ec241b..c72f0dec7 100644 --- a/src/api/wms/business/inputBlur.ts +++ b/src/api/wms/business/inputBlur.ts @@ -211,10 +211,10 @@ export const tableFormBlurVer = async (headerItem, val, row, index, routeName, f headerItem.field == 'packUnit' || headerItem.field == 'secondPackUnit' || headerItem.field == 'fromPackUnit' || - headerItem.field == 'toPackUnit'|| - headerItem.field == 'toPackUnit'|| + headerItem.field == 'toPackUnit' || + headerItem.field == 'toPackUnit' || headerItem.field == 'supplierItemCode' - + ) { let searchField = headerItem.field let pageApi = ref() @@ -239,10 +239,10 @@ export const tableFormBlurVer = async (headerItem, val, row, index, routeName, f ] ? formRef.formModel[searchCondition1[i].value] : detailData - ? detailData[searchCondition1[i].value] - : row - ? row[searchCondition1[i].value] - : '' + ? detailData[searchCondition1[i].value] + : row + ? row[searchCondition1[i].value] + : '' // 是否含有空参数情况 let isNull = false if ( @@ -354,9 +354,9 @@ export const tableFormBlurVer = async (headerItem, val, row, index, routeName, f ) { // 装配计划,裝配备件计划,预备产件计划,预生产收货申请,装配收货申请,报修收货申请,制品报废申请 pageApi.value = getProductionLineCodelistByCodes - params.value.productionLineCode= - formRef.formModel.productionLine || formRef.formModel.productionLineCode || row.productionLine || row.productionLineCode, - params.value.itemCodes=val?.trim() + params.value.productionLineCode = + formRef.formModel.productionLine || formRef.formModel.productionLineCode || row.productionLine || row.productionLineCode, + params.value.itemCodes = val?.trim() } } else if ( headerItem.field == 'packUnit' || @@ -376,39 +376,39 @@ export const tableFormBlurVer = async (headerItem, val, row, index, routeName, f routeName == 'UnplannedissueJobMain' || routeName == 'PackageoverRequestMain' ) { - params.value.itemCode= row.itemCode - params.value.packUnit= val?.trim() + params.value.itemCode = row.itemCode + params.value.packUnit = val?.trim() pageApi.value = getItemPackageunitListByCodes } } else if ( - headerItem.field == 'supplierItemCode' + headerItem.field == 'supplierItemCode' ) { // 生产退料申请,隔离退料申请 if ( routeName == 'ProductionreturnRequestMain' || - routeName == 'ProductionreturnRequestMainNo' + routeName == 'ProductionreturnRequestMainNo' ) { - searchField = 'supplierCode' - params.value.itemCodes= row.itemCode - params.value.supplierCode= val?.trim() + searchField = 'supplierCode' + params.value.itemCodes = row.itemCode + params.value.supplierCode = val?.trim() pageApi.value = getSupplierItemListByCodes } } const list = ref() // 调取包装接口 await pageApi.value(params.value).then(async (res) => { - list.value = res ? res : [] - // 只查一条数据,多条数据查询默认显示不存在 - if (res.length == 1) { - callback(list.value) - } else { - message.alert('代码' + row[headerItem.field] + '没有找到对应数据') - row[headerItem.field] = '' - return - } - }) - } + list.value = res ? res : [] + // 只查一条数据,多条数据查询默认显示不存在 + if (res.length == 1) { + callback(list.value) + } else { + message.alert('代码' + row[headerItem.field] + '没有找到对应数据') + row[headerItem.field] = '' + return + } + }) } + } } } export const FormBlur = async (field, val, routeName, formRef, detailData, formSchema, callback) => { @@ -586,7 +586,7 @@ export const FormBlur = async (field, val, routeName, formRef, detailData, formS callback(list.value) }) } - } + } else { let pageApi = ref() let params = ref() @@ -737,13 +737,13 @@ export const FormBlur = async (field, val, routeName, formRef, detailData, formS }) } } - } + } } // 根据下方输入框失去焦点校验信息 export const getListByBottonInput = async (headerItem, val, row, routeName, formRef, detailData, tableData, callback) => { let tableFormSchemaObj = headerItem?.tableForm - console.log(333,tableFormSchemaObj) + console.log(333, tableFormSchemaObj) if (tableFormSchemaObj.searchPage && tableFormSchemaObj.verificationParams) { if (!val) return; let params = ref({}) @@ -817,7 +817,7 @@ export const getListByBottonInput = async (headerItem, val, row, routeName, form if (verificationParams && verificationParams.length > 0) { for (let i = 0; i < verificationParams.length; i++) { console.log(54565, verificationParams[i].key) - verificationParams[i].key1 = verificationParams[i].key +'s' + verificationParams[i].key1 = verificationParams[i].key + 's' params.value[verificationParams[i].key1] = val } } @@ -830,25 +830,29 @@ export const getListByBottonInput = async (headerItem, val, row, routeName, form ...arr1.filter((item) => !arr2.includes(item)), ...arr2.filter((item) => !arr1.includes(item)) ].join(',') - message.alert('代码' + str + '没有找到对应数据') - return - } else { - let repeatCode = [] - if (tableData.length > 0) { - tableData.forEach((item) => { - const findIndex = arr1.findIndex(valItem => valItem == item[headerItem.field]) - if (findIndex > -1) { - arr1.splice(findIndex, 1) - repeatCode.push(item[headerItem.field]) - } - }) - } - if (repeatCode.length > 0) { - message.warning(`${t('ts.代码')}${repeatCode.join(',')}${t('ts.已经存在')}`); - return; + console.log(arr1.filter((item) => arr2.includes(item))) + console.log(22, str) + if (str) { + message.alert('代码' + str + '没有找到对应数据') + return } - callback(list.value) } + let repeatCode = [] + if (tableData.length > 0) { + tableData.forEach((item) => { + const findIndex = arr1.findIndex(valItem => valItem == item[headerItem.field]) + if (findIndex > -1) { + arr1.splice(findIndex, 1) + repeatCode.push(item[headerItem.field]) + } + }) + } + if (repeatCode.length > 0) { + message.warning(`${t('ts.代码')}${repeatCode.join(',')}${t('ts.已经存在')}`); + return; + } + console.log(list.value) + callback(list.value) }) return } else { @@ -929,5 +933,5 @@ export const getListByBottonInput = async (headerItem, val, row, routeName, form }) } - + } diff --git a/src/api/wms/processproductionRequestMain/index.ts b/src/api/wms/processproductionRequestMain/index.ts index 8783aebdb..d21a2406c 100644 --- a/src/api/wms/processproductionRequestMain/index.ts +++ b/src/api/wms/processproductionRequestMain/index.ts @@ -26,6 +26,18 @@ export const getProcessproductionRequestMainPage = async (params) => { } } + +// 查询工序报产子物料 +export const getProcessproductionChildBomPage = async (params) => { + if (params.isSearch) { + delete params.isSearch + const data = {...params} + return await request.post({ url: '/wms/processproduction-request-main/queryChildItemByParentCodeSenior', data }) + } else { + return await request.get({ url: `/wms/processproduction-request-main/queryChildItemByParentCodePage`, params }) + } +} + // 查询工序报产申请主详情 export const getProcessproductionRequestMain = async (id: number) => { return await request.get({ url: `/wms/processproduction-request-main/get?id=` + id }) diff --git a/src/api/wms/productionitemcodeSpareitemcode/index.ts b/src/api/wms/productionitemcodeSpareitemcode/index.ts new file mode 100644 index 000000000..1bd325194 --- /dev/null +++ b/src/api/wms/productionitemcodeSpareitemcode/index.ts @@ -0,0 +1,50 @@ +import request from '@/config/axios' + +export interface ProductionitemcodeSpareitemcodeVO { + id: number + productionItemCode: string + spareItemCode: string + available: string + remark: string +} + +// 查询量产件备件关系列表 +export const getProductionitemcodeSpareitemcodePage = async (params) => { + if (params.isSearch) { + delete params.isSearch + const data = {...params} + return await request.post({ url: '/wms/productionitemcode-spareitemcode/senior', data }) + } else { + return await request.get({ url: `/wms/productionitemcode-spareitemcode/page`, params }) + } +} + +// 查询量产件备件关系详情 +export const getProductionitemcodeSpareitemcode = async (id: number) => { + return await request.get({ url: `/wms/productionitemcode-spareitemcode/get?id=` + id }) +} + +// 新增量产件备件关系 +export const createProductionitemcodeSpareitemcode = async (data: ProductionitemcodeSpareitemcodeVO) => { + return await request.post({ url: `/wms/productionitemcode-spareitemcode/create`, data }) +} + +// 修改量产件备件关系 +export const updateProductionitemcodeSpareitemcode = async (data: ProductionitemcodeSpareitemcodeVO) => { + return await request.put({ url: `/wms/productionitemcode-spareitemcode/update`, data }) +} + +// 删除量产件备件关系 +export const deleteProductionitemcodeSpareitemcode = async (id: number) => { + return await request.delete({ url: `/wms/productionitemcode-spareitemcode/delete?id=` + id }) +} + +// 导出量产件备件关系 Excel +export const exportProductionitemcodeSpareitemcode = async (params) => { + return await request.download({ url: `/wms/productionitemcode-spareitemcode/export-excel`, params }) +} + +// 下载用户导入模板 +export const importTemplate = () => { + return request.download({ url: '/wms/productionitemcode-spareitemcode/get-import-template' }) +} \ No newline at end of file diff --git a/src/api/wms/saleDetail/index.ts b/src/api/wms/saleDetail/index.ts index 5c928c170..dcc17f21e 100644 --- a/src/api/wms/saleDetail/index.ts +++ b/src/api/wms/saleDetail/index.ts @@ -60,3 +60,7 @@ export const deleteSaleDetail = async (id: number) => { export const exportSaleDetail = async (params) => { return await request.download({ url: `/wms/sale-detail/export-excel`, params }) } + +export const getSaleDetailByCodes = async (params) => { + return await request.get({ url: `/wms/sale-detail/listByCodes`, params }) +} diff --git a/src/api/wms/supplierApbalanceMain/index.ts b/src/api/wms/supplierApbalanceMain/index.ts index eb43a9d37..1eed92870 100644 --- a/src/api/wms/supplierApbalanceMain/index.ts +++ b/src/api/wms/supplierApbalanceMain/index.ts @@ -47,7 +47,7 @@ export const createSupplierApbalanceMain = async (data: SupplierApbalanceMainVO) } // 修改供应商余额明细主 -export const updateSupplierApbalanceMain = async (data: SupplierApbalanceMainVO) => { +export const updateSupplierApbalanceMain = async (data: any) => { return await request.put({ url: `/wms/supplier-apbalance-main/update`, data }) } diff --git a/src/components/Detail/src/Detail.vue b/src/components/Detail/src/Detail.vue index df9993b8e..005429997 100644 --- a/src/components/Detail/src/Detail.vue +++ b/src/components/Detail/src/Detail.vue @@ -29,7 +29,7 @@ -->
+ [] }, + slotDetailTabList:{ + type:Array, + required: false, + default: () => [] + }, //主表单独操作--明细左上角新增按钮 mainSubmitCreateApi:{ type: Boolean, @@ -441,6 +447,10 @@ if (props.isBasic == true) { ] } } +// 插槽详情 +if(props.slotDetailTabList){ + tabsList.value = [...tabsList?.value,...props.slotDetailTabList] +} let otherList = [...props.annexTable,{ diff --git a/src/components/TableFormAdjustment/index.ts b/src/components/TableFormAdjustment/index.ts new file mode 100644 index 000000000..d078332ca --- /dev/null +++ b/src/components/TableFormAdjustment/index.ts @@ -0,0 +1,3 @@ +import TableFormAdjustment from './src/TableFormAdjustment.vue' + +export { TableFormAdjustment } diff --git a/src/components/TableFormAdjustment/src/AdjustmentDialog.vue b/src/components/TableFormAdjustment/src/AdjustmentDialog.vue new file mode 100644 index 000000000..9494e959a --- /dev/null +++ b/src/components/TableFormAdjustment/src/AdjustmentDialog.vue @@ -0,0 +1,63 @@ + + + + \ No newline at end of file diff --git a/src/components/TableFormAdjustment/src/TableFormAdjustment.vue b/src/components/TableFormAdjustment/src/TableFormAdjustment.vue new file mode 100644 index 000000000..9efc803e6 --- /dev/null +++ b/src/components/TableFormAdjustment/src/TableFormAdjustment.vue @@ -0,0 +1,455 @@ + + + + \ No newline at end of file diff --git a/src/views/eam/equipmentAccounts/equipmentAccounts.data.ts b/src/views/eam/equipmentAccounts/equipmentAccounts.data.ts index f22e6e5dc..cea15dc35 100644 --- a/src/views/eam/equipmentAccounts/equipmentAccounts.data.ts +++ b/src/views/eam/equipmentAccounts/equipmentAccounts.data.ts @@ -11,12 +11,18 @@ import * as EquipmentManufacturerApi from '@/api/eam/equipmentManufacturer' import * as ConfigApi from '@/api/infra/config' import * as ProductionlineApi from '@/api/wms/productionline' import { Productionline } from '@/views/wms/basicDataManage/factoryModeling/productionline/productionline.data' -import * as ProcessApi from '@/api/wms/process' -import { Process } from '@/views/wms/basicDataManage/factoryModeling/process/process.data' -import * as WorkStationApi from '@/api/wms/workstation' -import { Workstation } from '@/views/wms/basicDataManage/factoryModeling/workstation/workstation.data' +import * as UserApi from '@/api/system/user' +import { handleTreeToComponentOptions } from '@/utils/tree' +import * as DeptApi from '@/api/system/dept' +import * as BasicEamWorkshopApi from '@/api/eam/basicEamWorkshop' +import { BasicEamWorkshop } from '@/views/eam/basicEamWorkshop/basicEamWorkshop.data' -const workshopNoPage = await WorkshopApi.getWorkshopNoPage({}) +export interface User { + id: number, + nickname: string +} + +const workshopNoPage = await BasicEamWorkshopApi.getBasicEamWorkshopNoPage({}) const equipmentManufacturerNoPage = await EquipmentManufacturerApi.getEquipmentManufacturerNoPage({}) const equipmentSupplierNoPage = await EquipmentSupplierApi.getEquipmentSupplierNoPage({}) const productionlineNoPage = await ProductionlineApi.getProductionlineNoPage({}); @@ -26,6 +32,13 @@ const autoSwitch = ref(false) if (autoCodeSwitch == 'TRUE') { autoSwitch.value = true } +const allDeptList = await DeptApi.getSimpleDeptList(); +const deptList = ref([]) // 树形结构 +// 加载部门树(默认格式) +deptList.value = handleTreeToComponentOptions(allDeptList) + +const userList = ref([]) +userList.value = await UserApi.getSimpleUserList() // 表单校验 export const EquipmentAccountsRules = reactive({ @@ -113,13 +126,41 @@ export const EquipmentAccounts = useCrudSchemas(reactive([ label: '使用部门', field: 'useDept', sort: 'custom', - isSearch: false + isTable: false, + isDetail: false, + isSearch: false, + isTableForm: false, + formatter: (_: Recordable, __: TableColumn, cellValue: number) => { + return allDeptList.find((item) => item.id == cellValue)?.name + }, + form: { + component: 'TreeSelect', + componentProps: { // 假设deptList是部门数据列表 + data: deptList, + placeholder: "请选择部门", + filterable: true, + } + } }, { label: '负责人', field: 'principal', sort: 'custom', - isSearch: false + isSearch: false, + formatter: (_: Recordable, __: TableColumn, cellValue: number) => { + return userList.value.find((item) => item.id == cellValue)?.nickname + }, + form: { + component: 'Select', + componentProps: { + options: userList.value, + optionsAlias: { + labelField: 'nickname', + valueField: 'id' + }, + filterable: true, + } + } }, { label: '负责人联系方式', @@ -233,13 +274,38 @@ export const EquipmentAccounts = useCrudSchemas(reactive([ label: '采购部门', field: 'purchaseDept', sort: 'custom', - isSearch: false + isSearch: false, + formatter: (_: Recordable, __: TableColumn, cellValue: number) => { + return allDeptList.find((item) => item.id == cellValue)?.name + }, + form: { + component: 'TreeSelect', + componentProps: { // 假设deptList是部门数据列表 + data: deptList, + placeholder: "请选择部门", + filterable: true, + } + } }, { label: '采购人', field: 'purchaser', sort: 'custom', - isSearch: false + isSearch: false, + formatter: (_: Recordable, __: TableColumn, cellValue: number) => { + return userList.value.find((item) => item.id == cellValue)?.nickname + }, + form: { + component: 'Select', + componentProps: { + options: userList.value, + optionsAlias: { + labelField: 'nickname', + valueField: 'id' + }, + filterable: true, + } + } }, { label: '出厂日期', @@ -378,8 +444,8 @@ export const EquipmentAccounts = useCrudSchemas(reactive([ searchListPlaceholder: '请选择车间代码', // 输入框占位文本 searchField: 'code', // 查询弹窗赋值字段 searchTitle: '车间信息', // 查询弹窗标题 - searchAllSchemas: Workshop.allSchemas, // 查询弹窗所需类 - searchPage: WorkshopApi.getWorkshopPage, // 查询弹窗所需分页方法 + searchAllSchemas: BasicEamWorkshop.allSchemas, // 查询弹窗所需类 + searchPage: BasicEamWorkshopApi.getBasicEamWorkshopPage, // 查询弹窗所需分页方法 searchCondition: [{ key: 'available', value: 'TRUE', @@ -388,58 +454,58 @@ export const EquipmentAccounts = useCrudSchemas(reactive([ } }, }, - { - label: '产线编号', - field: 'lineCode', - sort: 'custom', - isSearch: true, - isDetail: false, - isForm: false, - isTable: true, - isTableForm: false, - search: { - component: 'Select', - componentProps: { - options: productionlineNoPage, - optionsAlias: { - labelField: 'name', - valueField: 'code' - }, - filterable: true, - } - }, - formatter: (_: Recordable, __: TableColumn, cellValue: string) => { - return productionlineNoPage.find((item) => item.code == cellValue)?.name - }, - }, - { - label: '产线编号', - field: 'lineName', - sort: 'custom', - isSearch: false, - form: { - // labelMessage: '信息提示说明!!!', - componentProps: { - isSearchList: true, // 开启查询弹窗 - searchListPlaceholder: '请选择生产线代码', // 输入框占位文本 - multiple:true, - searchField: 'code', // 查询弹窗赋值字段 - searchTitle: '生产线信息', // 查询弹窗标题 - searchAllSchemas: Productionline.allSchemas, // 查询弹窗所需类 - searchPage: ProductionlineApi.getProductionlinePage, // 查询弹窗所需分页方法 - searchCondition: [{ - key:'workshopCode', - value:'workshopCode', - message: '请填写车间代码!', - isMainValue: true - },{ - key: 'available', - value: 'TRUE', - isMainValue: false - }] - } - } - }, + // { + // label: '产线编号', + // field: 'lineCode', + // sort: 'custom', + // isSearch: true, + // isDetail: false, + // isForm: false, + // isTable: true, + // isTableForm: false, + // search: { + // component: 'Select', + // componentProps: { + // options: productionlineNoPage, + // optionsAlias: { + // labelField: 'name', + // valueField: 'code' + // }, + // filterable: true, + // } + // }, + // formatter: (_: Recordable, __: TableColumn, cellValue: string) => { + // return productionlineNoPage.find((item) => item.code == cellValue)?.name + // }, + // }, + // { + // label: '产线编号', + // field: 'lineName', + // sort: 'custom', + // isSearch: false, + // form: { + // // labelMessage: '信息提示说明!!!', + // componentProps: { + // isSearchList: true, // 开启查询弹窗 + // searchListPlaceholder: '请选择生产线代码', // 输入框占位文本 + // multiple:true, + // searchField: 'code', // 查询弹窗赋值字段 + // searchTitle: '生产线信息', // 查询弹窗标题 + // searchAllSchemas: Productionline.allSchemas, // 查询弹窗所需类 + // searchPage: ProductionlineApi.getProductionlinePage, // 查询弹窗所需分页方法 + // searchCondition: [{ + // key:'workshopCode', + // value:'workshopCode', + // message: '请填写车间代码!', + // isMainValue: true + // },{ + // key: 'available', + // value: 'TRUE', + // isMainValue: false + // }] + // } + // } + // }, // { // label: '工序编号', // field: 'processCode', diff --git a/src/views/eam/equipmentAccounts/index.vue b/src/views/eam/equipmentAccounts/index.vue index 9a7a924e6..f41b4f823 100644 --- a/src/views/eam/equipmentAccounts/index.vue +++ b/src/views/eam/equipmentAccounts/index.vue @@ -47,6 +47,7 @@ :apiUpdate="EquipmentAccountsApi.updateEquipmentAccounts" :apiCreate="EquipmentAccountsApi.createEquipmentAccounts" @searchTableSuccess="searchTableSuccess" + @onChange="onChange" :isBusiness="false" /> @@ -112,6 +113,7 @@ import * as WorkshopApi from '@/api/wms/workshop' import * as ProductionlineApi from '@/api/wms/productionline' import * as EquipmentSupplierApi from '@/api/eam/equipmentSupplier' import * as EquipmentManufacturerApi from '@/api/eam/equipmentManufacturer' +import * as UserApi from '@/api/system/user' defineOptions({ name: 'EquipmentAccounts' }) @@ -130,7 +132,10 @@ const detailAllSchemas = ref() const apiPage = ref() const dialogApiPage = ref() const dialogAllSchemas = ref() - +export interface User { + id: number, + nickname: string +} // 查询页面返回 const searchTableSuccess = (formField, searchField, val, formRef) => { nextTick(() => { @@ -515,6 +520,26 @@ const submitSparePartRelation = (formField, searchField, val, formRef, rowRef) = }) } +const onChange = async (field, cur, formRef) => { + if(field == 'purchaseDept'){ + const userList = ref([]) + userList.value = await UserApi.getUserListByDeptIds([cur]) + EquipmentAccounts.allSchemas.formSchema.find(item => item.field == 'purchaser').componentProps.options = userList.value + let setV = {} + setV['purchaser'] = '' + formRef.value.setValues(setV) + } + if(field == 'useDept'){ + const user01List = ref([]) + user01List.value = await UserApi.getUserListByDeptIds([cur]) + EquipmentAccounts.allSchemas.formSchema.find(item => item.field == 'principal').componentProps.options = user01List.value + let setV = {} + setV['principal'] = '' + formRef.value.setValues(setV) + } + +} + /** 初始化 **/ onMounted(async () => { getList() diff --git a/src/views/eam/equipmentMaintenanceRecordMain/equipmentMaintenanceRecordMain.data.ts b/src/views/eam/equipmentMaintenanceRecordMain/equipmentMaintenanceRecordMain.data.ts index 699400b36..e0692e15a 100644 --- a/src/views/eam/equipmentMaintenanceRecordMain/equipmentMaintenanceRecordMain.data.ts +++ b/src/views/eam/equipmentMaintenanceRecordMain/equipmentMaintenanceRecordMain.data.ts @@ -30,7 +30,6 @@ export const EquipmentMaintenanceRecordMain = useCrudSchemas(reactive([]) // 树形结构 +const userList = ref([]) +userList.value = await UserApi.getSimpleUserList() // 加载部门树(默认格式) -deptList.value = handleTreeToComponentOptions(await DeptApi.getSimpleDeptList()) +deptList.value = handleTreeToComponentOptions(allDeptList) // 表单校验 export const EquipmentManufacturerRules = reactive({ @@ -76,7 +85,18 @@ export const EquipmentManufacturer = useCrudSchemas(reactive([ label: '联系人', field: 'contacts', sort: 'custom', - isSearch: true + isSearch: true, + form: { + component: 'Select', + componentProps: { + options: userList.value, + optionsAlias: { + labelField: 'nickname', + valueField: 'id' + }, + filterable: true, + } + } }, { label: '部门', diff --git a/src/views/eam/equipmentSigning/equipmentSigning.data.ts b/src/views/eam/equipmentSigning/equipmentSigning.data.ts index 42e679c2b..61756c1eb 100644 --- a/src/views/eam/equipmentSigning/equipmentSigning.data.ts +++ b/src/views/eam/equipmentSigning/equipmentSigning.data.ts @@ -5,26 +5,21 @@ import * as DeptApi from '@/api/system/dept' import * as UserApi from '@/api/system/user' import { EquipmentAccounts,EquipmentAccountsRules } from '../equipmentAccounts/equipmentAccounts.data' import * as EquipmentAccountsApi from '@/api/eam/equipmentAccounts' -import * as ProductionlineApi from '@/api/wms/productionline' -import { Productionline } from '@/views/wms/basicDataManage/factoryModeling/productionline/productionline.data' -import * as WorkshopApi from '@/api/wms/workshop' -import { Workshop } from '@/views/wms/basicDataManage/factoryModeling/workshop/workshop.data' -import * as ProcessApi from '@/api/wms/process' -import { Process } from '@/views/wms/basicDataManage/factoryModeling/process/process.data' -import * as WorkStationApi from '@/api/wms/workstation' -import { Workstation } from '@/views/wms/basicDataManage/factoryModeling/workstation/workstation.data' - +import * as EquipmentSupplierApi from '@/api/eam/equipmentSupplier' +import * as BasicEamWorkshopApi from '@/api/eam/basicEamWorkshop' export interface User { id: number, nickname: string } +const workshopList = await BasicEamWorkshopApi.getBasicEamWorkshopNoPage({}) +const equipmentSupplierList = await EquipmentSupplierApi.getEquipmentSupplierNoPage({}) const allDeptList = await DeptApi.getSimpleDeptList() const deptList = ref([]) // 树形结构 const userList = ref([]) userList.value = await UserApi.getSimpleUserList() // 加载部门树(默认格式) -deptList.value = handleTreeToComponentOptions(await DeptApi.getSimpleDeptList()) +deptList.value = handleTreeToComponentOptions(allDeptList) // 表单校验 export const EquipmentSigningRules = reactive({ @@ -32,7 +27,6 @@ export const EquipmentSigningRules = reactive({ operationDate: [required], operationer: [required], operationDept: [required], - supplierCode: [required], status: [required], storageLocation: [required], concurrencyStamp: [required], @@ -141,22 +135,69 @@ export const EquipmentSigning = useCrudSchemas(reactive([ label: '供应商编号', field: 'supplierCode', sort: 'custom', - isSearch: true, - isForm: false + isSearch: false, + isForm: true, + isDetail: false, + isTable: false, + isTableForm: false, + form: { + component: 'Select', + componentProps: { + options: equipmentSupplierList, + optionsAlias: { + labelField: 'name', + valueField: 'number' + }, + filterable: true, + disabled: true, + } + } }, + // { + // label: '供应商编号', + // field: 'supplierName', + // sort: 'custom', + // isSearch: false, + // isForm: true, + // isDetail: false, + // isTable: false, + // isTableForm: false, + // form: { + // component: 'Input', + // componentProps: { + // disabled: true + // } + // } + // }, { label: '供应商联系人', field: 'supplierPeople', sort: 'custom', isSearch: true, - isForm: false + form: { + component: 'Select', + componentProps: { + options: userList.value, + optionsAlias: { + labelField: 'nickname', + valueField: 'id' + }, + disabled: true, + } + } }, { label: '供应商联系方式', field: 'supplierTelephone', sort: 'custom', isSearch: false, - isForm: false, + isForm: true, + form: { + component: 'Input', + componentProps: { + disabled: true + } + } }, // { // label: '流程状态', @@ -268,7 +309,7 @@ export const EquipmentSigning = useCrudSchemas(reactive([ field: 'storageLocation', sort: 'custom', isSearch: false, - isForm: false, + isForm: true, form: { component: 'Input', componentProps: { @@ -288,38 +329,51 @@ export const EquipmentSigning = useCrudSchemas(reactive([ field: 'workshopCode', sort: 'custom', isSearch: true, - isForm: false, - }, - { - label: '产线编号', - field: 'lineCode', - sort: 'custom', - isSearch: true, - isForm: false, + isForm: true, + formatter: (_: Recordable, __: TableColumn, cellValue: string) => { + return workshopList.find((item) => item.code == cellValue)?.name + }, form: { - // labelMessage: '信息提示说明!!!', + component: 'Select', componentProps: { - isSearchList: true, // 开启查询弹窗 - searchListPlaceholder: '请选择生产线代码', // 输入框占位文本 - multiple:true, - searchField: 'code', // 查询弹窗赋值字段 - searchTitle: '生产线信息', // 查询弹窗标题 - searchAllSchemas: Productionline.allSchemas, // 查询弹窗所需类 - searchPage: ProductionlineApi.getProductionlinePage, // 查询弹窗所需分页方法 - searchCondition: [{ - key:'workshopCode', - value:'workshopCode', - message: '请填写车间代码!', - isMainValue: true - },{ - key: 'available', - value: 'TRUE', - isMainValue: false - }] + options: workshopList, + placeholder: '请选择车间编号', + optionsAlias: { + valueField: 'code', + labelField: 'name' + } } } }, // { + // label: '产线编号', + // field: 'lineCode', + // sort: 'custom', + // isSearch: true, + // form: { + // // labelMessage: '信息提示说明!!!', + // componentProps: { + // isSearchList: true, // 开启查询弹窗 + // searchListPlaceholder: '请选择生产线代码', // 输入框占位文本 + // multiple:true, + // searchField: 'code', // 查询弹窗赋值字段 + // searchTitle: '生产线信息', // 查询弹窗标题 + // searchAllSchemas: Productionline.allSchemas, // 查询弹窗所需类 + // searchPage: ProductionlineApi.getProductionlinePage, // 查询弹窗所需分页方法 + // searchCondition: [{ + // key:'workshopCode', + // value:'workshopCode', + // message: '请填写车间代码!', + // isMainValue: true + // },{ + // key: 'available', + // value: 'TRUE', + // isMainValue: false + // }] + // } + // } + // }, + // { // label: '工序编号', // field: 'processCode', // sort: 'custom', @@ -403,13 +457,13 @@ export const EquipmentSigning = useCrudSchemas(reactive([ // } // } // }, - { - label: '操作', - field: 'action', - isForm: false, - table: { - width: 150, - fixed: 'right' - } - } + // { + // label: '操作', + // field: 'action', + // isForm: false, + // table: { + // width: 150, + // fixed: 'right' + // } + // } ])) diff --git a/src/views/eam/equipmentSigning/index.vue b/src/views/eam/equipmentSigning/index.vue index 9730f9086..e94de01e7 100644 --- a/src/views/eam/equipmentSigning/index.vue +++ b/src/views/eam/equipmentSigning/index.vue @@ -67,6 +67,7 @@ import TableHead from '@/components/TableHead/src/TableHead.vue' import ImportForm from '@/components/ImportForm/src/ImportForm.vue' import Detail from '@/components/Detail/src/Detail.vue' import * as UserApi from '@/api/system/user' +import * as EquipmentSupplierApi from '@/api/eam/equipmentSupplier' defineOptions({ name: 'EquipmentSigning' }) @@ -84,10 +85,18 @@ routeName.value = route.name const tableColumns = ref(EquipmentSigning.allSchemas.tableColumns) // 查询页面返回 -const searchTableSuccess = (formField, searchField, val, formRef) => { +const searchTableSuccess = async (formField, searchField, val, formRef) => { + const setV = {} + setV[formField] = val[0][searchField] + if(formField == 'equipmentCode'){ + setV['supplierCode'] = val[0]['supplierCode'] + setV['workshopCode'] = val[0]['workshopCode'] + const equipmentSupplierList = await EquipmentSupplierApi.getEquipmentSupplierNoPage({}) + const entry = equipmentSupplierList.find(item => item.number == val[0]['supplierCode']) + setV['supplierTelephone'] = entry?.phone + setV['supplierPeople'] = Number(entry?.contacts) + } nextTick(() => { - const setV = {} - setV[formField] = val[0][searchField] formRef.setValues(setV) }) } @@ -140,8 +149,8 @@ const buttonBaseClick = (val, item) => { // 列表-操作按钮 const butttondata = [ - // defaultButtons.mainListEditBtn({hasPermi:'eam:equipment-signing:update'}), // 编辑 - // defaultButtons.mainListDeleteBtn({hasPermi:'eam:equipment-signing:delete'}), // 删除 + defaultButtons.mainListEditBtn({hasPermi:'eam:equipment-signing:update'}), // 编辑 + defaultButtons.mainListDeleteBtn({hasPermi:'eam:equipment-signing:delete'}), // 删除 ] // 列表-操作按钮事件 @@ -256,7 +265,15 @@ const onChange = async (field, cur, formRef) => { setV['operationer'] = '' formRef.value.setValues(setV) } - + if(field == 'supplierCode'){ + const equipmentSupplierList = await EquipmentSupplierApi.getEquipmentSupplierNoPage({}) + const entry = equipmentSupplierList.find(item => item.number == cur) + let setV = {} + setV['supplierTelephone'] = entry.phone + setV['supplierPeople'] = Number(entry.contacts) + formRef.value.setValues(setV) + } + } diff --git a/src/views/eam/equipmentSupplier/equipmentSupplier.data.ts b/src/views/eam/equipmentSupplier/equipmentSupplier.data.ts index 7e7fc6377..0f2f47116 100644 --- a/src/views/eam/equipmentSupplier/equipmentSupplier.data.ts +++ b/src/views/eam/equipmentSupplier/equipmentSupplier.data.ts @@ -3,10 +3,18 @@ import { dateFormatter } from '@/utils/formatTime' import { validateHanset,validateNumDot, validateEmail } from '@/utils/validator' import { handleTreeToComponentOptions } from '@/utils/tree' import * as DeptApi from '@/api/system/dept' -const deptList = ref([]) // 树形结构 +import * as UserApi from '@/api/system/user' + +export interface User { + id: number, + nickname: string +} +const deptList = ref([]) // 树形结构 // 加载部门树(默认格式) deptList.value = handleTreeToComponentOptions(await DeptApi.getSimpleDeptList()) +const userList = ref([]) +userList.value = await UserApi.getSimpleUserList() // 表单校验 export const EquipmentSupplierRules = reactive({ @@ -82,7 +90,18 @@ export const EquipmentSupplier = useCrudSchemas(reactive([ label: '联系人', field: 'contacts', sort: 'custom', - isSearch: true + isSearch: true, + form: { + component: 'Select', + componentProps: { + options: userList.value, + optionsAlias: { + labelField: 'nickname', + valueField: 'id' + }, + filterable: true, + } + } }, { label: '部门', diff --git a/src/views/eam/planSpotCheck/planSpotCheck.data.ts b/src/views/eam/planSpotCheck/planSpotCheck.data.ts index 01c49f3cd..d852ff5e3 100644 --- a/src/views/eam/planSpotCheck/planSpotCheck.data.ts +++ b/src/views/eam/planSpotCheck/planSpotCheck.data.ts @@ -298,7 +298,6 @@ export const PlanSpotCheck = useCrudSchemas(reactive([ defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] } }, - isForm: false, }, { label: '部门id', diff --git a/src/views/eam/repairSparePartsRecord/index.vue b/src/views/eam/repairSparePartsRecord/index.vue new file mode 100644 index 000000000..af8626c6d --- /dev/null +++ b/src/views/eam/repairSparePartsRecord/index.vue @@ -0,0 +1,244 @@ + + + diff --git a/src/views/eam/repairSparePartsRecord/repairSparePartsRecord.data.ts b/src/views/eam/repairSparePartsRecord/repairSparePartsRecord.data.ts new file mode 100644 index 000000000..b5ce90db8 --- /dev/null +++ b/src/views/eam/repairSparePartsRecord/repairSparePartsRecord.data.ts @@ -0,0 +1,238 @@ +import type { CrudSchema } from '@/hooks/web/useCrudSchemas' +import { dateFormatter } from '@/utils/formatTime' + +// 表单校验 +export const RepairSparePartsRecordRules = reactive({ + number: [required], + sparePartsCode: [required], + qty: [required], + areaCode: [required], + locationCode: [required], + status: [required], + result: [required], + applyer: [required], + concurrencyStamp: [required] +}) + +export const RepairSparePartsRecord = useCrudSchemas(reactive([ + { + label: '单号', + field: 'number', + sort: 'custom', + isSearch: true + }, + { + label: '备件编号', + field: 'sparePartsCode', + sort: 'custom', + isSearch: true + }, + { + label: '数量', + field: 'qty', + sort: 'custom', + isSearch: true + }, + { + label: '库区编号', + field: 'areaCode', + sort: 'custom', + isSearch: true, + form: { + component: 'Select' + } + }, + { + label: '库位编号', + field: 'locationCode', + sort: 'custom', + isSearch: true, + form: { + component: 'Select' + } + }, + { + label: '流程状态', + field: 'status', + sort: 'custom', + isSearch: true, + form: { + component: 'Radio' + } + }, + { + label: '结果状态', + field: 'result', + sort: 'custom', + isSearch: true, + form: { + component: 'Select' + } + }, + { + label: '申请人', + field: 'applyer', + sort: 'custom', + isSearch: true + }, + { + label: '审核人', + field: 'approver', + sort: 'custom', + isSearch: true, + form: { + component: 'InputNumber', + value: 0 + } + }, + { + label: '审核内容', + field: 'approveContent', + sort: 'custom', + isSearch: true, + form: { + component: 'Editor', + componentProps: { + valueHtml: '', + height: 200 + } + } + }, + { + label: '审核时间', + field: 'approveTime', + sort: 'custom', + formatter: dateFormatter, + isSearch: true, + search: { + component: 'DatePicker', + componentProps: { + valueFormat: 'YYYY-MM-DD HH:mm:ss', + type: 'daterange', + defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] + } + }, + form: { + component: 'DatePicker', + componentProps: { + type: 'datetime', + valueFormat: 'x' + } + } + }, + { + label: '自动审核', + field: 'autoExamine', + sort: 'custom', + isSearch: true + }, + { + label: '自动通过', + field: 'autoAgree', + sort: 'custom', + isSearch: true + }, + { + label: '直接生成记录', + field: 'directCreateRecord', + sort: 'custom', + isSearch: true + }, + { + label: '创建时间', + field: 'createTime', + sort: 'custom', + formatter: dateFormatter, + isSearch: true, + search: { + component: 'DatePicker', + componentProps: { + valueFormat: 'YYYY-MM-DD HH:mm:ss', + type: 'daterange', + defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] + } + }, + isForm: false + }, + { + label: '部门', + field: 'departmentCode', + sort: 'custom', + isSearch: true + }, + { + label: '备注', + field: 'remark', + sort: 'custom', + isSearch: true + }, + { + label: '地点', + field: 'siteId', + sort: 'custom', + isSearch: true + }, + { + label: '是否可用', + field: 'available', + sort: 'custom', + dictType: DICT_TYPE.TRUE_FALSE, + dictClass: 'string', // 默认都是字符串类型其他暂不考虑 + isSearch: true, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } + }, + { + label: '删除时间', + field: 'deletionTime', + sort: 'custom', + formatter: dateFormatter, + isSearch: true, + search: { + component: 'DatePicker', + componentProps: { + valueFormat: 'YYYY-MM-DD HH:mm:ss', + type: 'daterange', + defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] + } + }, + form: { + component: 'DatePicker', + componentProps: { + type: 'datetime', + valueFormat: 'x' + } + } + }, + { + label: '删除人', + field: 'deleterId', + sort: 'custom', + isSearch: true + }, + { + label: '并发乐观锁', + field: 'concurrencyStamp', + sort: 'custom', + isSearch: true, + form: { + component: 'InputNumber', + value: 0 + } + }, + { + label: '操作', + field: 'action', + isForm: false, + table: { + width: 150, + fixed: 'right' + } + } +])) diff --git a/src/views/eam/repairSparePartsRequest/index.vue b/src/views/eam/repairSparePartsRequest/index.vue new file mode 100644 index 000000000..873bb7a7e --- /dev/null +++ b/src/views/eam/repairSparePartsRequest/index.vue @@ -0,0 +1,244 @@ + + + diff --git a/src/views/eam/repairSparePartsRequest/repairSparePartsRequest.data.ts b/src/views/eam/repairSparePartsRequest/repairSparePartsRequest.data.ts new file mode 100644 index 000000000..d64c8d827 --- /dev/null +++ b/src/views/eam/repairSparePartsRequest/repairSparePartsRequest.data.ts @@ -0,0 +1,251 @@ +import type { CrudSchema } from '@/hooks/web/useCrudSchemas' +import { dateFormatter } from '@/utils/formatTime' + +// 表单校验 +export const RepairSparePartsRequestRules = reactive({ + number: [required], + sparePartsCode: [required], + qty: [required], + areaCode: [required], + locationCode: [required], + status: [required], + result: [required], + applyer: [required], + concurrencyStamp: [required], + repairCause: [required] +}) + +export const RepairSparePartsRequest = useCrudSchemas(reactive([ + { + label: 'id', + field: 'id', + sort: 'custom', + isForm: false + }, + { + label: '单号', + field: 'number', + sort: 'custom', + isSearch: true + }, + { + label: '备件编号', + field: 'sparePartsCode', + sort: 'custom', + isSearch: true + }, + { + label: '数量', + field: 'qty', + sort: 'custom', + isSearch: true + }, + { + label: '库区编号', + field: 'areaCode', + sort: 'custom', + isSearch: true, + form: { + component: 'SelectV2' + } + }, + { + label: '库位编号', + field: 'locationCode', + sort: 'custom', + isSearch: true, + form: { + component: 'SelectV2' + } + }, + { + label: '流程状态枚举0:待审核1:已撤回3:审核中4:已通过5:已驳回6:已完成', + field: 'status', + sort: 'custom', + isSearch: true, + form: { + component: 'Radio' + } + }, + { + label: '结果状态枚举:0待维修,1已废弃,2已修好', + field: 'result', + sort: 'custom', + isSearch: true, + form: { + component: 'SelectV2' + } + }, + { + label: '申请人', + field: 'applyer', + sort: 'custom', + isSearch: true + }, + { + label: '审核人', + field: 'approver', + sort: 'custom', + isSearch: true, + form: { + component: 'InputNumber', + value: 0 + } + }, + { + label: '审核内容', + field: 'approveContent', + sort: 'custom', + isSearch: true, + form: { + component: 'Editor', + componentProps: { + valueHtml: '', + height: 200 + } + } + }, + { + label: '审核时间', + field: 'approveTime', + sort: 'custom', + formatter: dateFormatter, + isSearch: true, + search: { + component: 'DatePicker', + componentProps: { + valueFormat: 'YYYY-MM-DD HH:mm:ss', + type: 'daterange', + defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] + } + }, + form: { + component: 'DatePicker', + componentProps: { + type: 'datetime', + valueFormat: 'x' + } + } + }, + { + label: '自动审核', + field: 'autoExamine', + sort: 'custom', + isSearch: true + }, + { + label: '自动通过', + field: 'autoAgree', + sort: 'custom', + isSearch: true + }, + { + label: '直接生成记录', + field: 'directCreateRecord', + sort: 'custom', + isSearch: true + }, + { + label: '创建时间', + field: 'createTime', + sort: 'custom', + formatter: dateFormatter, + isSearch: true, + search: { + component: 'DatePicker', + componentProps: { + valueFormat: 'YYYY-MM-DD HH:mm:ss', + type: 'daterange', + defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] + } + }, + isForm: false + }, + { + label: '部门', + field: 'departmentCode', + sort: 'custom', + isSearch: true + }, + { + label: '备注', + field: 'remark', + sort: 'custom', + isSearch: true + }, + { + label: '地点', + field: 'siteId', + sort: 'custom', + isSearch: true + }, + { + label: '是否可用--默认TRUE', + field: 'available', + sort: 'custom', + dictType: DICT_TYPE.TRUE_FALSE, + dictClass: 'string', // 默认都是字符串类型其他暂不考虑 + isSearch: true, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } + }, + { + label: '删除时间', + field: 'deletionTime', + sort: 'custom', + formatter: dateFormatter, + isSearch: true, + search: { + component: 'DatePicker', + componentProps: { + valueFormat: 'YYYY-MM-DD HH:mm:ss', + type: 'daterange', + defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] + } + }, + form: { + component: 'DatePicker', + componentProps: { + type: 'datetime', + valueFormat: 'x' + } + } + }, + { + label: '删除人', + field: 'deleterId', + sort: 'custom', + isSearch: true + }, + { + label: '并发乐观锁', + field: 'concurrencyStamp', + sort: 'custom', + isSearch: true, + form: { + component: 'InputNumber', + value: 0 + } + }, + { + label: '维修原因', + field: 'repairCause', + sort: 'custom', + isSearch: true + }, + { + label: '操作', + field: 'action', + isForm: false, + table: { + width: 150, + fixed: 'right' + } + } +])) diff --git a/src/views/eam/toolAccounts/index.vue b/src/views/eam/toolAccounts/index.vue index 27ebebe3f..02e8625b1 100644 --- a/src/views/eam/toolAccounts/index.vue +++ b/src/views/eam/toolAccounts/index.vue @@ -52,6 +52,7 @@ :apiCreate="ToolAccountsApi.createToolAccounts" @searchTableSuccess="searchTableSuccess" :isBusiness="false" + @onChange="onChange" /> @@ -149,6 +150,7 @@ import * as WorkshopApi from '@/api/wms/workshop' import * as ProductionlineApi from '@/api/wms/productionline' import * as EquipmentSupplierApi from '@/api/eam/equipmentSupplier' import * as EquipmentManufacturerApi from '@/api/eam/equipmentManufacturer' +import * as UserApi from '@/api/system/user' defineOptions({ name: 'ToolAccounts' }) @@ -172,6 +174,10 @@ const operationRecordList = ref([ { label: '巡检记录', value: 'inspection' }, { label: '点检记录', value: 'spot_check' } ]) +export interface User { + id: number, + nickname: string +} // 查询页面返回 const searchTableSuccess = (formField, searchField, val, formRef) => { @@ -521,6 +527,28 @@ const submitSparePartRelation = (formField, searchField, val, formRef, rowRef) = } ) } + + +const onChange = async (field, cur, formRef) => { + if(field == 'purchaseDept'){ + const userList = ref([]) + userList.value = await UserApi.getUserListByDeptIds([cur]) + ToolAccounts.allSchemas.formSchema.find(item => item.field == 'purchaser').componentProps.options = userList.value + let setV = {} + setV['purchaser'] = '' + formRef.value.setValues(setV) + } + if(field == 'useDept'){ + const user01List = ref([]) + user01List.value = await UserApi.getUserListByDeptIds([cur]) + ToolAccounts.allSchemas.formSchema.find(item => item.field == 'principal').componentProps.options = user01List.value + let setV = {} + setV['principal'] = '' + formRef.value.setValues(setV) + } +} + + /** 初始化 **/ onMounted(async () => { getList() diff --git a/src/views/eam/toolAccounts/toolAccounts.data.ts b/src/views/eam/toolAccounts/toolAccounts.data.ts index a225fdf7f..0fd56a2ad 100644 --- a/src/views/eam/toolAccounts/toolAccounts.data.ts +++ b/src/views/eam/toolAccounts/toolAccounts.data.ts @@ -9,19 +9,36 @@ import * as EquipmentManufacturerApi from '@/api/eam/equipmentManufacturer' import { EquipmentManufacturer } from '@/views/eam/equipmentManufacturer/equipmentManufacturer.data' import * as ProductionlineApi from '@/api/wms/productionline' import { Productionline } from '@/views/wms/basicDataManage/factoryModeling/productionline/productionline.data' +import * as UserApi from '@/api/system/user' +import { handleTreeToComponentOptions } from '@/utils/tree' +import * as DeptApi from '@/api/system/dept' +import * as BasicEamWorkshopApi from '@/api/eam/basicEamWorkshop' +import { BasicEamWorkshop } from '@/views/eam/basicEamWorkshop/basicEamWorkshop.data' +export interface User { + id: number, + nickname: string +} -const workshopNoPage = await WorkshopApi.getWorkshopNoPage({}) +const workshopNoPage = await BasicEamWorkshopApi.getBasicEamWorkshopNoPage({}) const equipmentManufacturerNoPage = await EquipmentManufacturerApi.getEquipmentManufacturerNoPage({}) const equipmentSupplierNoPage = await EquipmentSupplierApi.getEquipmentSupplierNoPage({}) const productionlineNoPage = await ProductionlineApi.getProductionlineNoPage({}); +const autoCodeSwitch = await ConfigApi.getConfigKey('toolCodeAutoSwitch') + -const autoCodeSwitch = await ConfigApi.getConfigKey('deviceCodeAutoSwitch') -// ProductionlineApi.getProductionlinePage const autoSwitch = ref(false) if (autoCodeSwitch == 'TRUE') { autoSwitch.value = true } +const allDeptList = await DeptApi.getSimpleDeptList(); +const deptList = ref([]) // 树形结构 +// 加载部门树(默认格式) +deptList.value = handleTreeToComponentOptions(allDeptList) + +const userList = ref([]) +userList.value = await UserApi.getSimpleUserList() + // 表单校验 export const ToolAccountsRules = reactive({ code: [required], @@ -100,13 +117,41 @@ export const ToolAccounts = useCrudSchemas(reactive([ label: '使用部门', field: 'useDept', sort: 'custom', - isSearch: false + isTable: false, + isDetail: false, + isSearch: false, + isTableForm: false, + formatter: (_: Recordable, __: TableColumn, cellValue: number) => { + return allDeptList.find((item) => item.id == cellValue)?.name + }, + form: { + component: 'TreeSelect', + componentProps: { // 假设deptList是部门数据列表 + data: deptList, + placeholder: "请选择部门", + filterable: true, + } + } }, { label: '负责人', field: 'principal', sort: 'custom', - isSearch: false + isSearch: false, + formatter: (_: Recordable, __: TableColumn, cellValue: number) => { + return userList.value.find((item) => item.id == cellValue)?.nickname + }, + form: { + component: 'Select', + componentProps: { + options: userList.value, + optionsAlias: { + labelField: 'nickname', + valueField: 'id' + }, + filterable: true, + } + } }, { label: '负责人联系方式', @@ -119,6 +164,8 @@ export const ToolAccounts = useCrudSchemas(reactive([ field: 'status', sort: 'custom', isSearch: false, + dictType: DICT_TYPE.DEVICE_STATUS, + dictClass: 'string', // 默认都是字符串类型其他暂不考虑 form: { component: 'Select' } @@ -218,13 +265,38 @@ export const ToolAccounts = useCrudSchemas(reactive([ label: '采购部门', field: 'purchaseDept', sort: 'custom', - isSearch: true + isSearch: true, + formatter: (_: Recordable, __: TableColumn, cellValue: number) => { + return allDeptList.find((item) => item.id == cellValue)?.name + }, + form: { + component: 'TreeSelect', + componentProps: { // 假设deptList是部门数据列表 + data: deptList, + placeholder: "请选择部门", + filterable: true, + } + } }, { label: '采购人', field: 'purchaser', sort: 'custom', - isSearch: true + isSearch: true, + formatter: (_: Recordable, __: TableColumn, cellValue: number) => { + return userList.value.find((item) => item.id == cellValue)?.nickname + }, + form: { + component: 'Select', + componentProps: { + options: userList.value, + optionsAlias: { + labelField: 'nickname', + valueField: 'id' + }, + filterable: true, + } + } }, { label: '出厂日期', @@ -369,8 +441,8 @@ export const ToolAccounts = useCrudSchemas(reactive([ searchListPlaceholder: '请选择车间代码', // 输入框占位文本 searchField: 'code', // 查询弹窗赋值字段 searchTitle: '车间信息', // 查询弹窗标题 - searchAllSchemas: Workshop.allSchemas, // 查询弹窗所需类 - searchPage: WorkshopApi.getWorkshopPage, // 查询弹窗所需分页方法 + searchAllSchemas: BasicEamWorkshop.allSchemas, // 查询弹窗所需类 + searchPage: BasicEamWorkshopApi.getBasicEamWorkshopPage, // 查询弹窗所需分页方法 disable:true, searchCondition: [{ key: 'available', @@ -380,58 +452,58 @@ export const ToolAccounts = useCrudSchemas(reactive([ } }, }, - { - label: '产线编号', - field: 'lineCode', - sort: 'custom', - isSearch: true, - isDetail: false, - isForm: false, - isTable: true, - isTableForm: false, - search: { - component: 'Select', - componentProps: { - options: productionlineNoPage, - optionsAlias: { - labelField: 'name', - valueField: 'code' - }, - filterable: true, - } - }, - formatter: (_: Recordable, __: TableColumn, cellValue: string) => { - return productionlineNoPage.find((item) => item.code == cellValue)?.name - }, - }, - { - label: '产线编号', - field: 'lineName', - sort: 'custom', - isSearch: false, - form: { - // labelMessage: '信息提示说明!!!', - componentProps: { - isSearchList: true, // 开启查询弹窗 - searchListPlaceholder: '请选择生产线代码', // 输入框占位文本 - multiple:true, - searchField: 'code', // 查询弹窗赋值字段 - searchTitle: '生产线信息', // 查询弹窗标题 - searchAllSchemas: Productionline.allSchemas, // 查询弹窗所需类 - searchPage: ProductionlineApi.getProductionlinePage, // 查询弹窗所需分页方法 - searchCondition: [{ - key:'workshopCode', - value:'workshopCode', - message: '请填写车间代码!', - isMainValue: true - },{ - key: 'available', - value: 'TRUE', - isMainValue: false - }] - } - } - }, + // { + // label: '产线编号', + // field: 'lineCode', + // sort: 'custom', + // isSearch: true, + // isDetail: false, + // isForm: false, + // isTable: true, + // isTableForm: false, + // search: { + // component: 'Select', + // componentProps: { + // options: productionlineNoPage, + // optionsAlias: { + // labelField: 'name', + // valueField: 'code' + // }, + // filterable: true, + // } + // }, + // formatter: (_: Recordable, __: TableColumn, cellValue: string) => { + // return productionlineNoPage.find((item) => item.code == cellValue)?.name + // }, + // }, + // { + // label: '产线编号', + // field: 'lineName', + // sort: 'custom', + // isSearch: false, + // form: { + // // labelMessage: '信息提示说明!!!', + // componentProps: { + // isSearchList: true, // 开启查询弹窗 + // searchListPlaceholder: '请选择生产线代码', // 输入框占位文本 + // multiple:true, + // searchField: 'code', // 查询弹窗赋值字段 + // searchTitle: '生产线信息', // 查询弹窗标题 + // searchAllSchemas: Productionline.allSchemas, // 查询弹窗所需类 + // searchPage: ProductionlineApi.getProductionlinePage, // 查询弹窗所需分页方法 + // searchCondition: [{ + // key:'workshopCode', + // value:'workshopCode', + // message: '请填写车间代码!', + // isMainValue: true + // },{ + // key: 'available', + // value: 'TRUE', + // isMainValue: false + // }] + // } + // } + // }, // { // label: '工序编号', // field: 'processCode', @@ -494,12 +566,12 @@ export const ToolAccounts = useCrudSchemas(reactive([ // } // }, // }, - { - label: '部门', - field: 'departmentCode', - sort: 'custom', - isSearch: false - }, + // { + // label: '部门', + // field: 'departmentCode', + // sort: 'custom', + // isSearch: false + // }, { label: '备注', field: 'remark', @@ -645,7 +717,7 @@ export const ToolAccounts = useCrudSchemas(reactive([ field: 'action', isForm: false, table: { - width: 150, + width: 300, fixed: 'right' } } diff --git a/src/views/eam/toolChangedRecord/index.vue b/src/views/eam/toolChangedRecord/index.vue new file mode 100644 index 000000000..104629338 --- /dev/null +++ b/src/views/eam/toolChangedRecord/index.vue @@ -0,0 +1,244 @@ + + + diff --git a/src/views/eam/toolChangedRecord/toolChangedRecord.data.ts b/src/views/eam/toolChangedRecord/toolChangedRecord.data.ts new file mode 100644 index 000000000..b3001751d --- /dev/null +++ b/src/views/eam/toolChangedRecord/toolChangedRecord.data.ts @@ -0,0 +1,110 @@ +import type { CrudSchema } from '@/hooks/web/useCrudSchemas' +import { dateFormatter } from '@/utils/formatTime' +import * as UserApi from '@/api/system/user' + +export interface User { + id: number, + nickname: string +} +// 表单校验 +export const ToolChangedRecordRules = reactive({ + code: [required], + name: [required], + concurrencyStamp: [required] +}) + +const userList = ref([]) +userList.value = await UserApi.getSimpleUserList() + +export const ToolChangedRecord = useCrudSchemas(reactive([ + { + label: '工装编号', + field: 'code', + sort: 'custom', + isSearch: true, + fixed: 'left' + }, + { + label: '工装名称', + field: 'name', + sort: 'custom', + isSearch: true + }, + { + label: '变更前状态', + field: 'statusBefore', + sort: 'custom', + isSearch: true, + dictType: DICT_TYPE.DEVICE_STATUS, + dictClass: 'string', // 默认都是字符串类型其他暂不考虑 + form: { + component: 'Select' + } + }, + { + label: '变更后状态', + field: 'statusAfter', + sort: 'custom', + isSearch: true, + dictType: DICT_TYPE.DEVICE_STATUS, + dictClass: 'string', // 默认都是字符串类型其他暂不考虑 + form: { + component: 'Select', + } + }, + { + label: '操作人', + field: 'operator', + sort: 'custom', + isSearch: true, + search: { + component: 'Select', + componentProps: { + options: userList.value, + optionsAlias: { + valueField: 'id', + labelField: 'nickname' + }, + filterable: true, + clearable: true + } + }, + }, + { + label: '操作时间', + field: 'operateTime', + sort: 'custom', + formatter: dateFormatter, + isSearch: true, + search: { + component: 'DatePicker', + componentProps: { + valueFormat: 'YYYY-MM-DD HH:mm:ss', + type: 'daterange', + defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] + } + }, + form: { + component: 'DatePicker', + componentProps: { + type: 'datetime', + valueFormat: 'x' + } + } + }, + { + label: '备注', + field: 'remark', + sort: 'custom', + isSearch: true + }, + // { + // label: '操作', + // field: 'action', + // isForm: false, + // table: { + // width: 150, + // fixed: 'right' + // } + // } +])) diff --git a/src/views/eam/toolMod/index.vue b/src/views/eam/toolMod/index.vue index 3df940dde..73ae1af75 100644 --- a/src/views/eam/toolMod/index.vue +++ b/src/views/eam/toolMod/index.vue @@ -57,7 +57,7 @@ - + diff --git a/src/views/eam/toolSigning/toolSigning.data.ts b/src/views/eam/toolSigning/toolSigning.data.ts new file mode 100644 index 000000000..32b8c320d --- /dev/null +++ b/src/views/eam/toolSigning/toolSigning.data.ts @@ -0,0 +1,487 @@ +import type { CrudSchema } from '@/hooks/web/useCrudSchemas' +import { dateFormatter } from '@/utils/formatTime' +import { handleTreeToComponentOptions } from '@/utils/tree' +import * as DeptApi from '@/api/system/dept' +import * as UserApi from '@/api/system/user' +import { ToolAccounts,ToolAccountsRules } from '../toolAccounts/toolAccounts.data' +import * as ToolAccountsApi from '@/api/eam/toolAccounts' +import * as EquipmentSupplierApi from '@/api/eam/equipmentSupplier' +import * as BasicEamWorkshopApi from '@/api/eam/basicEamWorkshop' + + +export interface User { + id: number, + nickname: string +} + +const toolList = await ToolAccountsApi.getToolAccountsNoPage({}) +const workshopList = await BasicEamWorkshopApi.getBasicEamWorkshopNoPage({}) +const equipmentSupplierList = await EquipmentSupplierApi.getEquipmentSupplierNoPage({}) +const allDeptList = await DeptApi.getSimpleDeptList() +const deptList = ref([]) // 树形结构 +const userList = ref([]) +userList.value = await UserApi.getSimpleUserList() +// 加载部门树(默认格式) +deptList.value = handleTreeToComponentOptions(allDeptList) + +// 表单校验 +export const ToolSigningRules = reactive({ + toolCode: [required], + operationDate: [required], + operationer: [required], + operationDept: [required], + storageLocation: [required], + concurrencyStamp: [required] +}) + +export const ToolSigning = useCrudSchemas(reactive([ + { + label: '工装', + field: 'toolCode', + sort: 'custom', + isSearch: true, + isTable: true, + isForm: false, + isDetail: false, + isTableForm: false, + formatter: (_: Recordable, __: TableColumn, cellValue: string) => { + return toolList.find((item) => item.code == cellValue)?.name + }, + }, + { + label: '工装', + field: 'toolName', + sort: 'custom', + isSearch: false, + isTable: false, + form: { + // labelMessage: '信息提示说明!!!', + componentProps: { + isSearchList: true, // 开启查询弹窗 + searchListPlaceholder: '请选择设备', // 输入框占位文本 + searchField: 'code', // 查询弹窗赋值字段 + searchTitle: '设备信息', // 查询弹窗标题 + searchAllSchemas: ToolAccounts.allSchemas, // 查询弹窗所需类 + searchPage: ToolAccountsApi.getToolAccountsPage, // 查询弹窗所需分页方法 + searchCondition: + [{ + key: 'available', + value: 'TRUE', + isMainValue: false + },{ + key: 'status', + value: 'TOACCEPT', + isMainValue: false + }] + } + }, + }, + { + label: '验收日期', + field: 'operationDate', + sort: 'custom', + formatter: dateFormatter, + isSearch: false, + search: { + component: 'DatePicker', + componentProps: { + valueFormat: 'YYYY-MM-DD HH:mm:ss', + type: 'daterange', + defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] + } + }, + form: { + component: 'DatePicker', + componentProps: { + type: 'datetime', + valueFormat: 'x' + } + } + }, + { + label: '验收部门', + field: 'operationDept', + sort: 'custom', + isSearch: true, + formatter: (_: Recordable, __: TableColumn, cellValue: number) => { + return allDeptList.find((item) => item.id == cellValue)?.name + }, + form: { + component: 'TreeSelect', + componentProps: { // 假设deptList是部门数据列表 + data: deptList.value, + disabled: false, + placeholder: "请选择部门", + filterable: true, + multiple: false, + } + } + }, + { + label: '验收人', + field: 'operationer', + sort: 'custom', + isSearch: true, + formatter: (_: Recordable, __: TableColumn, cellValue: number) => { + return userList.value.find((item) => item.id == cellValue)?.nickname + }, + form: { + component: 'Select', + componentProps: { // 假设deptList是部门数据列表 + options: userList.value, + optionsAlias: { + valueField: 'id', + labelField: 'nickname' + }, + disabled: false, + placeholder: "请先选择部门", + filterable: true, + multiple: false, + } + } + }, + { + label: '验收人联系方式', + field: 'telephone', + sort: 'custom', + isSearch: false + }, + { + label: '供应商编号', + field: 'supplierCode', + sort: 'custom', + isSearch: false, + isForm: true, + isDetail: false, + isTable: false, + isTableForm: false, + form: { + component: 'Select', + componentProps: { + options: equipmentSupplierList, + optionsAlias: { + labelField: 'name', + valueField: 'number' + }, + filterable: true, + disabled: true, + } + } + }, + // { + // label: '供应商编号', + // field: 'supplierName', + // sort: 'custom', + // isSearch: false, + // isForm: true, + // isDetail: false, + // isTable: false, + // isTableForm: false, + // form: { + // component: 'Input', + // componentProps: { + // disabled: true + // } + // } + // }, + { + label: '供应商联系人', + field: 'supplierPeople', + sort: 'custom', + isSearch: true, + formatter: (_: Recordable, __: TableColumn, cellValue: number) => { + return userList.value.find((item) => item.id == cellValue)?.nickname + }, + form: { + component: 'Select', + componentProps: { + options: userList.value, + optionsAlias: { + labelField: 'nickname', + valueField: 'id' + }, + disabled: true, + } + } + }, + { + label: '供应商联系方式', + field: 'supplierTelephone', + sort: 'custom', + isSearch: false, + isForm: true, + form: { + component: 'Input', + componentProps: { + disabled: true + } + } + }, + // { + // label: '流程状态', + // field: 'status', + // sort: 'custom', + // isSearch: true, + // dictType: DICT_TYPE.JOB_STATUS, + // dictClass: 'string', // 默认都是字符串类型其他暂不考虑 + // form: { + // component: 'Select' + // } + // }, + // { + // label: '审核人', + // field: 'approver', + // sort: 'custom', + // isSearch: true, + // form: { + // component: 'InputNumber', + // value: 0 + // } + // }, + // { + // label: '审核内容', + // field: 'approveContent', + // sort: 'custom', + // isSearch: false, + // form: { + // component: 'Input', + // componentProps: { + // type: 'textarea', + // valueHtml: '', + // height: 200 + // } + // } + // }, + // { + // label: '审核时间', + // field: 'approveTime', + // sort: 'custom', + // formatter: dateFormatter, + // isSearch: false, + // search: { + // component: 'DatePicker', + // componentProps: { + // valueFormat: 'YYYY-MM-DD HH:mm:ss', + // type: 'daterange', + // defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] + // } + // }, + // form: { + // component: 'DatePicker', + // componentProps: { + // type: 'datetime', + // valueFormat: 'x' + // } + // } + // }, + // { + // label: '自动审核', + // field: 'autoExamine', + // sort: 'custom', + // dictType: DICT_TYPE.TRUE_FALSE, + // dictClass: 'string', // 默认都是字符串类型其他暂不考虑 + // isSearch: false, + // form: { + // component: 'Switch', + // value: 'TRUE', + // componentProps: { + // inactiveValue: 'FALSE', + // activeValue: 'TRUE' + // } + // } + // }, + // { + // label: '自动通过', + // field: 'autoAgree', + // sort: 'custom', + // dictType: DICT_TYPE.TRUE_FALSE, + // dictClass: 'string', // 默认都是字符串类型其他暂不考虑 + // isSearch: false, + // form: { + // component: 'Switch', + // value: 'TRUE', + // componentProps: { + // inactiveValue: 'FALSE', + // activeValue: 'TRUE' + // } + // } + // }, + // { + // label: '直接生成记录', + // field: 'directCreateRecord', + // sort: 'custom', + // dictType: DICT_TYPE.TRUE_FALSE, + // dictClass: 'string', // 默认都是字符串类型其他暂不考虑 + // isSearch: false, + // form: { + // component: 'Switch', + // value: 'TRUE', + // componentProps: { + // inactiveValue: 'FALSE', + // activeValue: 'TRUE' + // } + // } + // }, + { + label: '存放位置描述', + field: 'storageLocation', + sort: 'custom', + isSearch: false, + isForm: true, + form: { + component: 'Input', + componentProps: { + type: 'textarea', + placeholder: '请输入存放位置描述' + } + } + }, + // { + // label: '所属厂区编号', + // field: 'factoryAreaCode', + // sort: 'custom', + // isSearch: false + // }, + { + label: '车间编号', + field: 'workshopCode', + sort: 'custom', + isSearch: true, + isForm: true, + formatter: (_: Recordable, __: TableColumn, cellValue: string) => { + return workshopList.find((item) => item.code == cellValue)?.name + }, + form: { + component: 'Select', + componentProps: { + options: workshopList, + placeholder: '请选择车间编号', + optionsAlias: { + valueField: 'code', + labelField: 'name' + } + } + } + }, + // { + // label: '产线编号', + // field: 'lineCode', + // sort: 'custom', + // isSearch: true, + // form: { + // // labelMessage: '信息提示说明!!!', + // componentProps: { + // isSearchList: true, // 开启查询弹窗 + // searchListPlaceholder: '请选择生产线代码', // 输入框占位文本 + // multiple:true, + // searchField: 'code', // 查询弹窗赋值字段 + // searchTitle: '生产线信息', // 查询弹窗标题 + // searchAllSchemas: Productionline.allSchemas, // 查询弹窗所需类 + // searchPage: ProductionlineApi.getProductionlinePage, // 查询弹窗所需分页方法 + // searchCondition: [{ + // key:'workshopCode', + // value:'workshopCode', + // message: '请填写车间代码!', + // isMainValue: true + // },{ + // key: 'available', + // value: 'TRUE', + // isMainValue: false + // }] + // } + // } + // }, + // { + // label: '工序编号', + // field: 'processCode', + // sort: 'custom', + // isSearch: true, + // form:{ + // componentProps: { + // isSearchList: true, + // searchListPlaceholder: '请选择工序代码', + // searchField: 'code', + // searchTitle: '工序信息', + // searchAllSchemas: Process.allSchemas, + // searchPage: ProcessApi.getProcessPage, + // searchCondition: [{ + // key:'productionLineCode', + // value:'lineCode', + // message: '请填写生产线代码!', + // isMainValue: true + // },{ + // key:'workshopCode', + // value:'workshopCode', + // message: '请填写车间代码!', + // isMainValue: true + // },{ + // key: 'available', + // value: 'TRUE', + // isMainValue: false + // }] + // } + // }, + // }, + // { + // label: '工位编号', + // field: 'workstationCode', + // sort: 'custom', + // isSearch: true, + // form:{ + // componentProps: { + // isSearchList: true, // 开启查询弹窗 + // searchListPlaceholder: '请选择工位', // 输入框占位文本 + // searchField: 'code', // 查询弹窗赋值字段 + // searchTitle: '工位信息', // 查询弹窗标题 + // searchAllSchemas: Workstation.allSchemas, // 查询弹窗所需类 + // searchPage: WorkStationApi.getWorkstationPage, // 查询弹窗所需分页方法 + // searchCondition: [{ + // key:'productionLineCode', + // value:'lineCode', + // message: '请填写生产线代码!', + // isMainValue: true + // },{ + // key:'workshopCode', + // value:'workshopCode', + // message: '请填写车间代码!', + // isMainValue: true + // },{ + // key:'available', + // value:'TRUE', + // isMainValue: false + // }] + // } + // }, + // }, + { + label: '备注', + field: 'remark', + sort: 'custom', + isSearch: false + }, + // { + // label: '是否可用', + // field: 'available', + // sort: 'custom', + // dictType: DICT_TYPE.TRUE_FALSE, + // dictClass: 'string', // 默认都是字符串类型其他暂不考虑 + // isSearch: true, + // form: { + // component: 'Switch', + // value: 'TRUE', + // componentProps: { + // inactiveValue: 'FALSE', + // activeValue: 'TRUE' + // } + // } + // }, + // { + // label: '操作', + // field: 'action', + // isForm: false, + // table: { + // width: 150, + // fixed: 'right' + // } + // } +])) diff --git a/src/views/qms/counter/counter.data.ts b/src/views/qms/counter/counter.data.ts index 96a3cb3ea..9723b65a8 100644 --- a/src/views/qms/counter/counter.data.ts +++ b/src/views/qms/counter/counter.data.ts @@ -21,6 +21,7 @@ export const Counter = useCrudSchemas( sort: 'custom', isSearch: true, fixed: 'left', + isForm: false, table: { fixed: 'left', width: 175 @@ -32,6 +33,7 @@ export const Counter = useCrudSchemas( sort: 'custom', isSearch: true, dictType: DICT_TYPE.INSPECTION_TYPE, + isForm: false, table: { width: 175 } @@ -41,6 +43,7 @@ export const Counter = useCrudSchemas( field: 'supplierCode', sort: 'custom', isSearch: true, + isForm: false, table: { width: 175 } @@ -50,6 +53,7 @@ export const Counter = useCrudSchemas( field: 'qualifiedTimes', sort: 'custom', isSearch: false, + isForm: false, table: { width: 140 } @@ -59,6 +63,7 @@ export const Counter = useCrudSchemas( field: 'lastQualifiedBatch', sort: 'custom', isSearch: false, + isForm: false, table: { width: 140 } @@ -69,6 +74,7 @@ export const Counter = useCrudSchemas( sort: 'custom', formatter: dateFormatter, isSearch: true, + isForm: false, search: { component: 'DatePicker', componentProps: { @@ -93,6 +99,7 @@ export const Counter = useCrudSchemas( field: 'unqualifiedTimes', sort: 'custom', isSearch: false, + isForm: false, form: { component: 'InputNumber', value: 0 @@ -106,6 +113,7 @@ export const Counter = useCrudSchemas( field: 'lastUnqualifiedBatch', sort: 'custom', isSearch: false, + isForm: false, form: { component: 'InputNumber', value: 0 @@ -120,6 +128,7 @@ export const Counter = useCrudSchemas( sort: 'custom', formatter: dateFormatter, isSearch: false, + isForm: false, search: { component: 'DatePicker', componentProps: { @@ -144,6 +153,16 @@ export const Counter = useCrudSchemas( field: 'nextStage', sort: 'custom', isSearch: false, + form:{ + component: 'Select', + componentProps: { + options:[], + optionsAlias: { + labelField: 'stage', + valueField: 'stage' + } + } + }, table: { width: 140 } @@ -213,14 +232,14 @@ export const Counter = useCrudSchemas( } }, - // { - // label: '操作', - // field: 'action', - // isForm: false, - // table: { - // width: 150, - // fixed: 'right' - // } - // } + { + label: '操作', + field: 'action', + isForm: false, + table: { + width: 150, + fixed: 'right' + } + } ]) ) diff --git a/src/views/qms/counter/index.vue b/src/views/qms/counter/index.vue index d58b262cf..943033c8e 100644 --- a/src/views/qms/counter/index.vue +++ b/src/views/qms/counter/index.vue @@ -134,7 +134,7 @@ const buttonBaseClick = (val, item) => { // 列表-操作按钮 const butttondata = [ - // defaultButtons.mainListEditBtn({hasPermi:'qms:counter:update'}), // 编辑 + defaultButtons.mainListEditBtn({hasPermi:'qms:counter:update'}), // 编辑 // defaultButtons.mainListDeleteBtn({hasPermi:'qms:counter:delete'}), // 删除 ] @@ -149,7 +149,13 @@ const buttonTableClick = async (val, row) => { /** 添加/修改操作 */ const basicFormRef = ref() -const openForm = (type: string, row?: any) => { + +const openForm = async (type: string, row?: any) => { + for (const item of Counter.allSchemas.formSchema) { + if (item.field === 'nextStage') { + item.componentProps.options = await CounterApi.getNextStage(row.id) + } + } basicFormRef.value.open(type, row) } diff --git a/src/views/qms/inspectionJob/inspectionJobMain.data.ts b/src/views/qms/inspectionJob/inspectionJobMain.data.ts index def7f46a5..9358b43cb 100644 --- a/src/views/qms/inspectionJob/inspectionJobMain.data.ts +++ b/src/views/qms/inspectionJob/inspectionJobMain.data.ts @@ -211,10 +211,11 @@ export const InspectionJobMain = useCrudSchemas( } }, { - label: '检验批次', + label: '批次', field: 'inspectionBatch', sort: 'custom', isSearch: false, + isDetail: true, form: { componentProps: { disabled: true diff --git a/src/views/qms/inspectionRecord/inspectionRecordMain.data.ts b/src/views/qms/inspectionRecord/inspectionRecordMain.data.ts index 356557dd2..5289f11ae 100644 --- a/src/views/qms/inspectionRecord/inspectionRecordMain.data.ts +++ b/src/views/qms/inspectionRecord/inspectionRecordMain.data.ts @@ -466,7 +466,7 @@ export const InspectionRecordMain = useCrudSchemas( isForm: false, isDetail: false, table: { - width: 150, + width: 200, fixed: 'right' } } diff --git a/src/views/wms/basicDataManage/itemManage/itembasic/itembasic.data.ts b/src/views/wms/basicDataManage/itemManage/itembasic/itembasic.data.ts index 50d706355..fbb97b258 100644 --- a/src/views/wms/basicDataManage/itemManage/itembasic/itembasic.data.ts +++ b/src/views/wms/basicDataManage/itemManage/itembasic/itembasic.data.ts @@ -64,27 +64,27 @@ export const Itembasic = useCrudSchemas(reactive([ width: 150 } , }, - { - label: '状态', - field: 'status', - sort: 'custom', - dictType: DICT_TYPE.ITEM_STATUS, - dictClass: 'string', - isForm: false, - isSearch: false, - isTable: false, - table: { - width: 100 - } , - form: { - component: 'Switch', - value: 'ENABLE', - componentProps: { - inactiveValue: 'DISABLE', - activeValue: 'ENABLE' - } - }, - }, + // { + // label: '状态', + // field: 'status', + // sort: 'custom', + // dictType: DICT_TYPE.ITEM_STATUS, + // dictClass: 'string', + // isForm: false, + // isSearch: false, + // isTable: false, + // table: { + // width: 100 + // } , + // form: { + // component: 'Switch', + // value: 'ENABLE', + // componentProps: { + // inactiveValue: 'DISABLE', + // activeValue: 'ENABLE' + // } + // }, + // }, { label: '计量单位', field: 'uom', @@ -498,9 +498,9 @@ export const rules = reactive({ { required: true, message: '请输入名称', trigger: 'blur' }, { max: 50, message: '不得超过50个字符', trigger: 'blur' }, ], - status: [ - { required: true, message: '请选择状态', trigger: 'change' }, - ], + // status: [ + // { required: true, message: '请选择状态', trigger: 'change' }, + // ], uom: [ { required: true, message: '请选择计量单位', trigger: 'change' }, ], diff --git a/src/views/wms/basicDataManage/itemManage/packageunit/packageunit.data.ts b/src/views/wms/basicDataManage/itemManage/packageunit/packageunit.data.ts index 1c20eec7f..70ae30975 100644 --- a/src/views/wms/basicDataManage/itemManage/packageunit/packageunit.data.ts +++ b/src/views/wms/basicDataManage/itemManage/packageunit/packageunit.data.ts @@ -73,7 +73,7 @@ export const Packageunit1 = useCrudSchemas(reactive([ label: '单位', field: 'unit', sort: 'custom', - dictType: DICT_TYPE.UOM, + dictType: DICT_TYPE.PACK_UNIT, dictClass: 'string', isSearch: false, table: { @@ -417,7 +417,7 @@ export const Packageunit = useCrudSchemas(reactive([ label: '单位', field: 'unit', sort: 'custom', - dictType: DICT_TYPE.UOM, + dictType: DICT_TYPE.PACK_UNIT, dictClass: 'string', isSearch: false, table: { diff --git a/src/views/wms/basicDataManage/itemManage/productionitemcodeSpareitemcode/index.vue b/src/views/wms/basicDataManage/itemManage/productionitemcodeSpareitemcode/index.vue new file mode 100644 index 000000000..94a81bb16 --- /dev/null +++ b/src/views/wms/basicDataManage/itemManage/productionitemcodeSpareitemcode/index.vue @@ -0,0 +1,244 @@ + + + diff --git a/src/views/wms/basicDataManage/itemManage/productionitemcodeSpareitemcode/productionitemcodeSpareitemcode.data.ts b/src/views/wms/basicDataManage/itemManage/productionitemcodeSpareitemcode/productionitemcodeSpareitemcode.data.ts new file mode 100644 index 000000000..2ebe01c0d --- /dev/null +++ b/src/views/wms/basicDataManage/itemManage/productionitemcodeSpareitemcode/productionitemcodeSpareitemcode.data.ts @@ -0,0 +1,72 @@ +import type { CrudSchema } from '@/hooks/web/useCrudSchemas' +import { dateFormatter } from '@/utils/formatTime' + +// 表单校验 +export const ProductionitemcodeSpareitemcodeRules = reactive({ + productionItemCode: [required], + available: [required], +}) + +export const ProductionitemcodeSpareitemcode = useCrudSchemas(reactive([ + { + label: '量产件', + field: 'productionItemCode', + sort: 'custom', + isSearch: true, + }, + { + label: '备件', + field: 'spareItemCode', + sort: 'custom', + isSearch: true, + }, + { + label: '是否可用', + field: 'available', + dictType: DICT_TYPE.TRUE_FALSE, + dictClass: 'string', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } + }, + { + label: '备注', + field: 'remark', + sort: 'custom', + isSearch: true, + }, + { + label: '创建时间', + field: 'createTime', + sort: 'custom', + formatter: dateFormatter, + isSearch: true, + search: { + component: 'DatePicker', + componentProps: { + valueFormat: 'YYYY-MM-DD HH:mm:ss', + type: 'daterange', + defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] + } + }, + isForm: false, + }, + { + label: '操作', + field: 'action', + isForm: false, + table: { + width: 150, + fixed: 'right' + } + } +])) diff --git a/src/views/wms/basicDataManage/itemManage/productionlineitem/productionlineitem.data.ts b/src/views/wms/basicDataManage/itemManage/productionlineitem/productionlineitem.data.ts index 3349d07b3..b429541ac 100644 --- a/src/views/wms/basicDataManage/itemManage/productionlineitem/productionlineitem.data.ts +++ b/src/views/wms/basicDataManage/itemManage/productionlineitem/productionlineitem.data.ts @@ -81,7 +81,8 @@ export const Productionlineitem = useCrudSchemas(reactive([ form: { show:true, component: 'SelectV2', - value:'undefined', + // value:'undefined', + value:lineCodeData?.list.length>0?lineCodeData.list[0].code:'undefined', // labelMessage: '信息提示说明!!!', componentProps: { // isSearchList: true, diff --git a/src/views/wms/basicDataManage/itemManage/relegate/relegateRecord/relegateRecordMain.data.ts b/src/views/wms/basicDataManage/itemManage/relegate/relegateRecord/relegateRecordMain.data.ts index bce38edda..a8fd06e38 100644 --- a/src/views/wms/basicDataManage/itemManage/relegate/relegateRecord/relegateRecordMain.data.ts +++ b/src/views/wms/basicDataManage/itemManage/relegate/relegateRecord/relegateRecordMain.data.ts @@ -117,15 +117,6 @@ export const RelegateRecordMain = useCrudSchemas(reactive([ width: 150 }, }, - { - label: '操作', - field: 'action', - isForm: false, - table: { - width: 150, - fixed: 'right' - } - } ])) // 表单校验 export const RelegateRecordDetailRules = reactive({ @@ -317,14 +308,4 @@ export const RelegateRecordDetail = useCrudSchemas(reactive([ width: 150 }, }, - { - label: '操作', - field: 'action', - isForm: false, - hiddenInMain:true, - table: { - width: 150, - fixed: 'right' - } - } ])) diff --git a/src/views/wms/basicDataManage/itemManage/relegate/relegateRequest/relegateRequestMain.data.ts b/src/views/wms/basicDataManage/itemManage/relegate/relegateRequest/relegateRequestMain.data.ts index 64ce34152..6df677b5e 100644 --- a/src/views/wms/basicDataManage/itemManage/relegate/relegateRequest/relegateRequestMain.data.ts +++ b/src/views/wms/basicDataManage/itemManage/relegate/relegateRequest/relegateRequestMain.data.ts @@ -70,7 +70,15 @@ export const RelegateRequestMain = useCrudSchemas(reactive([ key: 'available', value: 'TRUE', isMainValue: false - }] + }], + verificationParams: [{ + key: 'code', + action: '==', + value: '', + isMainValue: false, + isSearch: true, + isFormModel: true, + }], // 失去焦点校验参数 } }, table: { @@ -350,6 +358,7 @@ export const RelegateRequestDetail = useCrudSchemas(reactive([ sort: 'custom', form: { componentProps: { + enterSearch: true, isSearchList: true, searchListPlaceholder: '请选择降级物料代码', searchField: 'code', @@ -364,7 +373,15 @@ export const RelegateRequestDetail = useCrudSchemas(reactive([ key: 'type', value: confgiData.itemType, isMainValue: false - }] + }], + verificationParams: [{ + key: 'code', + action: '==', + value: '', + isMainValue: false, + isSearch: true, + isFormModel: true, + }], // 失去焦点校验参数 } }, tableForm:{ diff --git a/src/views/wms/basicDataManage/labelManage/callmaterials/callmaterials.data.ts b/src/views/wms/basicDataManage/labelManage/callmaterials/callmaterials.data.ts index b26aca289..1f380e974 100644 --- a/src/views/wms/basicDataManage/labelManage/callmaterials/callmaterials.data.ts +++ b/src/views/wms/basicDataManage/labelManage/callmaterials/callmaterials.data.ts @@ -37,7 +37,8 @@ export const CallmaterialsRules = reactive({ workshopCode: [required], workStationCode: [required], uom: [required], - callmaterialQty: [required] + callmaterialQty: [required], + project: [{ max: 50, message: '最多50字符', trigger: 'blur'}] }) export const Callmaterials = useCrudSchemas(reactive([ @@ -358,6 +359,13 @@ export const Callmaterials = useCrudSchemas(reactive([ table: { width: 100 } , + form: { + componentProps:{ + maxlength: 50, + type:'textarea', + showWordLimit:true + } + }, }, { label: '库位', diff --git a/src/views/wms/basicDataManage/labelManage/callmaterials/index.vue b/src/views/wms/basicDataManage/labelManage/callmaterials/index.vue index 2d39e52da..c13150278 100644 --- a/src/views/wms/basicDataManage/labelManage/callmaterials/index.vue +++ b/src/views/wms/basicDataManage/labelManage/callmaterials/index.vue @@ -199,7 +199,7 @@ const buttonTableClick = async (val, row) => { /** 添加/修改操作 */ const basicFormRef = ref() const openForm = (type: string, row?: any) => { - + basicFormRef.value.open(type, row) if (type == 'create') { // nextTick(() => { @@ -272,8 +272,17 @@ const BASE_URL = getJmreportBaseUrl() const src = ref(BASE_URL + '/jmreport/view/924811818898698240?token=' + getAccessToken()) const srcPoint = ref(BASE_URL + '/jmreport/view/940818992169918464?token=' + getAccessToken()) // 标签打印 +// const handlePoint = async (row) => { +// window.open(src.value+'&relateNumber='+row.id) +// } const handlePoint = async (row) => { - window.open(src.value+'&relateNumber='+row.id) + let rows = [row.id]; // 将单个 row.id 转换成数组 + await PackageApi.batchPrintingLable(rows.join(',')).then(res => { + window.open(srcPoint.value + '&relateNumber=' + res); + message.success('创建标签成功'); + }).catch(err => { + message.error('创建标签失败'); + }); } // 批量打印 const handleSelectionPoint = async ()=>{ diff --git a/src/views/wms/countManage/count/countRecordMain/countRecordMain.data.ts b/src/views/wms/countManage/count/countRecordMain/countRecordMain.data.ts index a130cb322..f94821a4a 100644 --- a/src/views/wms/countManage/count/countRecordMain/countRecordMain.data.ts +++ b/src/views/wms/countManage/count/countRecordMain/countRecordMain.data.ts @@ -155,27 +155,27 @@ export const CountRecordMain = useCrudSchemas(reactive([ } }, }, - { - label: '生效日期', - field: 'activeDate', - formatter: dateFormatter2, - detail: { - dateFormat: 'YYYY-MM-DD' - }, - sort: 'custom', - table: { - width: 180 - }, - form: { - component: 'DatePicker', - componentProps: { - style: {width: '100%'}, - type: 'date', - dateFormat: 'YYYY-MM-DD', - valueFormat: 'x', - } - }, - }, + // { + // label: '生效日期', + // field: 'activeDate', + // formatter: dateFormatter2, + // detail: { + // dateFormat: 'YYYY-MM-DD' + // }, + // sort: 'custom', + // table: { + // width: 180 + // }, + // form: { + // component: 'DatePicker', + // componentProps: { + // style: {width: '100%'}, + // type: 'date', + // dateFormat: 'YYYY-MM-DD', + // valueFormat: 'x', + // } + // }, + // }, { label: '业务类型', field: 'businessType', diff --git a/src/views/wms/countManage/countadjust/countadjustRecordMain/countadjustRecordMain.data.ts b/src/views/wms/countManage/countadjust/countadjustRecordMain/countadjustRecordMain.data.ts index 3c7f73c51..0ffb1d39b 100644 --- a/src/views/wms/countManage/countadjust/countadjustRecordMain/countadjustRecordMain.data.ts +++ b/src/views/wms/countManage/countadjust/countadjustRecordMain/countadjustRecordMain.data.ts @@ -127,27 +127,27 @@ export const CountadjustRecordMain = useCrudSchemas(reactive([ } }, }, - { - label: '生效日期', - field: 'activeDate', - formatter: dateFormatter2, - detail: { - dateFormat: 'YYYY-MM-DD' - }, - sort: 'custom', - table: { - width: 180 - }, - form: { - component: 'DatePicker', - componentProps: { - style: {width: '100%'}, - type: 'date', - dateFormat: 'YYYY-MM-DD', - valueFormat: 'x', - } - }, - }, + // { + // label: '生效日期', + // field: 'activeDate', + // formatter: dateFormatter2, + // detail: { + // dateFormat: 'YYYY-MM-DD' + // }, + // sort: 'custom', + // table: { + // width: 180 + // }, + // form: { + // component: 'DatePicker', + // componentProps: { + // style: {width: '100%'}, + // type: 'date', + // dateFormat: 'YYYY-MM-DD', + // valueFormat: 'x', + // } + // }, + // }, { label: '业务类型', field: 'businessType', diff --git a/src/views/wms/deliversettlementManage/customerreceipt/customerreceiptRecordMain/customerreceiptRecordMain.data.ts b/src/views/wms/deliversettlementManage/customerreceipt/customerreceiptRecordMain/customerreceiptRecordMain.data.ts index 6324d6ec0..976ac1f58 100644 --- a/src/views/wms/deliversettlementManage/customerreceipt/customerreceiptRecordMain/customerreceiptRecordMain.data.ts +++ b/src/views/wms/deliversettlementManage/customerreceipt/customerreceiptRecordMain/customerreceiptRecordMain.data.ts @@ -341,7 +341,6 @@ export const CustomerreceiptRecordMain = useCrudSchemas(reactive([ field: 'available', dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', - isSearch: true, isTable: false, sort: 'custom', table: { diff --git a/src/views/wms/deliversettlementManage/customerreturn/customerreturnRequestMain/customerreturnRequestMain.data.ts b/src/views/wms/deliversettlementManage/customerreturn/customerreturnRequestMain/customerreturnRequestMain.data.ts index 8f442d8b0..586c9f476 100644 --- a/src/views/wms/deliversettlementManage/customerreturn/customerreturnRequestMain/customerreturnRequestMain.data.ts +++ b/src/views/wms/deliversettlementManage/customerreturn/customerreturnRequestMain/customerreturnRequestMain.data.ts @@ -100,7 +100,15 @@ export const CustomerreturnRequestMain = useCrudSchemas(reactive([ key: 'available', value: 'TRUE', isMainValue: false - }] + }], + verificationParams: [{ + key: 'code', + action: '==', + value: '', + isMainValue: false, + isSearch: true, + isFormModel: true, + }], // 失去焦点校验参数 } } }, @@ -114,6 +122,7 @@ export const CustomerreturnRequestMain = useCrudSchemas(reactive([ form: { // labelMessage: '信息提示说明!!!', componentProps: { + enterSearch: true, isSearchList: true, // 开启查询弹窗 searchListPlaceholder: '请选择发货记录单号', // 输入框占位文本 searchField: 'number', // 查询弹窗赋值字段 @@ -144,7 +153,15 @@ export const CustomerreturnRequestMain = useCrudSchemas(reactive([ message: '请选择客户代码!', // 前置添加没填的提示语 isMainValue: false // 拼接条件必须要 false 同时不能与 isMainValue: true 同用 } - ] + ], + verificationParams: [{ + key: 'number', + action: '==', + value: '', + isMainValue: false, + isSearch: true, + isFormModel: true, + }], // 失去焦点校验参数 } } }, @@ -175,6 +192,7 @@ export const CustomerreturnRequestMain = useCrudSchemas(reactive([ form: { // labelMessage: '信息提示说明!!!', componentProps: { + enterSearch: true, isSearchList: true, // 开启查询弹窗 searchListPlaceholder: '请选择客户月台代码', // 输入框占位文本 searchField: 'code', // 查询弹窗赋值字段 @@ -191,7 +209,15 @@ export const CustomerreturnRequestMain = useCrudSchemas(reactive([ value: 'customerCode', message: '请填写客户代码!', isMainValue: true - }] + }], + verificationParams: [{ + key: 'code', + action: '==', + value: '', + isMainValue: false, + isSearch: true, + isFormModel: true, + }], // 失去焦点校验参数 } } }, @@ -206,6 +232,7 @@ export const CustomerreturnRequestMain = useCrudSchemas(reactive([ form: { // labelMessage: '信息提示说明!!!', componentProps: { + enterSearch: true, isSearchList: true, // 开启查询弹窗 searchListPlaceholder: '请选择承运商', // 输入框占位文本 searchField: 'code', // 查询弹窗赋值字段 @@ -216,7 +243,15 @@ export const CustomerreturnRequestMain = useCrudSchemas(reactive([ key: 'available', value: 'TRUE', isMainValue: false - }] + }], + verificationParams: [{ + key: 'code', + action: '==', + value: '', + isMainValue: false, + isSearch: true, + isFormModel: true, + }], // 失去焦点校验参数 } } }, @@ -917,7 +952,8 @@ export const CustomerreturnRequestDetail = useCrudSchemas(reactive width: 150 }, isSearch: true, - tableForm:{ + tableForm: { + enterSearch:true, isInpuFocusShow: true, // 开启查询弹窗 searchListPlaceholder: '请选择到库位代码', searchField: 'toLocationCode', @@ -933,7 +969,15 @@ export const CustomerreturnRequestDetail = useCrudSchemas(reactive key: 'isIn', value: 'in', isMainValue: false - }] + }], + verificationParams: [{ + key: 'code', + action: '==', + value: '', + isMainValue: false, + isSearch: true, + isFormModel: true, + }], // 失去焦点校验参数 }, }, { @@ -1318,7 +1362,15 @@ export const CustomerReturnRequestDetailLabel = useCrudSchemas(reactive([ - { - label: '单据号', - field: 'number', - sort: 'custom', - table: { - width: 180, - fixed: 'left' - }, - isSearch: true, - }, - { - label: '申请单号', - field: 'requestNumber', - sort: 'custom', - table: { - width: 180 - }, - isSearch: true, - }, - { - label: '状态', - field: 'status', - dictType: DICT_TYPE.JOB_STATUS, - dictClass: 'string', - isSearch: true, - isTable: true, - sort: 'custom', - table: { - width: 150 - }, - }, - { - label: '客户代码', - field: 'customerCode', - sort: 'custom', - table: { - width: 150 - }, - }, - { - label: '客户月台代码', - field: 'customerDockCode', - sort: 'custom', - table: { - width: 150 +export const DeliverJobMain = useCrudSchemas( + reactive([ + { + label: '单据号', + field: 'number', + sort: 'custom', + table: { + width: 180, + fixed: 'left' + }, + isSearch: true + }, + { + label: '申请单号', + field: 'requestNumber', + sort: 'custom', + table: { + width: 180 + }, + isSearch: true + }, + { + label: '状态', + field: 'status', + dictType: DICT_TYPE.JOB_STATUS, + dictClass: 'string', + isSearch: true, + isTable: true, + sort: 'custom', + table: { + width: 150 + } }, - isTable: true, - }, - { - label: '发货月台', - field: 'deliverDock', - sort: 'custom', - isSearch: false, - isTable: false, - isDetail: false, - isForm: false, - table: { - width: 150 + { + label: '客户代码', + field: 'customerCode', + sort: 'custom', + table: { + width: 150 + } }, - }, - { - label: '发货类型', - field: 'deliverType', - sort: 'custom', - dictType: DICT_TYPE.DELIVER_TYPE, - dictClass: 'string', - table: { - width: 150 + { + label: '客户月台代码', + field: 'customerDockCode', + sort: 'custom', + table: { + width: 150 + }, + isTable: true + }, + { + label: '发货月台', + field: 'deliverDock', + sort: 'custom', + isSearch: false, + isTable: false, + isDetail: false, + isForm: false, + table: { + width: 150 + } }, - }, - { - label: '发货计划单号', - field: 'deliverPlanNumber', - sort: 'custom', - table: { - width: 180 + { + label: '发货类型', + field: 'deliverType', + sort: 'custom', + dictType: DICT_TYPE.DELIVER_TYPE, + dictClass: 'string', + table: { + width: 150 + } }, - isTable: false, - }, - { - label: '客户发货单号', - field: 'customerDeliverNumber', - sort: 'custom', - table: { - width: 180 + { + label: '发货计划单号', + field: 'deliverPlanNumber', + sort: 'custom', + table: { + width: 180 + }, + isTable: true, + isDetail: true + }, + { + label: '客户发货单号', + field: 'customerDeliverNumber', + sort: 'custom', + table: { + width: 180 + }, + isTable: false }, - isTable: false, - }, - { - label: '承运商', - field: 'carrierCode', - sort: 'custom', - table: { - width: 150 - }, - isTable: false, - }, - { - label: '运输方式', - field: 'transferMode', - dictType: DICT_TYPE.TRANSFER_MODE, - sort: 'custom', - table: { - width: 150 - }, - isTable: false, - }, - { - label: '车牌号', - field: 'vehiclePlateNumber', - sort: 'custom', - table: { - width: 150 - }, - isTable: false, - }, - { - label: '申请时间', - field: 'requestTime', - formatter: dateFormatter, - detail: { - dateFormat: 'YYYY-MM-DD HH:mm:ss' - }, - sort: 'custom', - table: { - width: 180 - }, - isTable: false, - form: { - component: 'DatePicker', - componentProps: { - type: 'datetime', - dateFormat: 'YYYY-MM-DD HH:mm:ss', - valueFormat: 'x', + { + label: '承运商', + field: 'carrierCode', + sort: 'custom', + table: { + width: 150 + }, + isTable: false + }, + { + label: '运输方式', + field: 'transferMode', + dictType: DICT_TYPE.TRANSFER_MODE, + sort: 'custom', + table: { + width: 150 + }, + isTable: false + }, + { + label: '车牌号', + field: 'vehiclePlateNumber', + sort: 'custom', + table: { + width: 150 + }, + isTable: false + }, + { + label: '申请时间', + field: 'requestTime', + formatter: dateFormatter, + detail: { + dateFormat: 'YYYY-MM-DD HH:mm:ss' + }, + sort: 'custom', + table: { + width: 180 + }, + isTable: false, + form: { + component: 'DatePicker', + componentProps: { + type: 'datetime', + dateFormat: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'x' + } } }, - }, - { - label: '要求截止时间', - field: 'requestDueTime', - formatter: dateFormatter, - detail: { - dateFormat: 'YYYY-MM-DD HH:mm:ss' - }, - sort: 'custom', - table: { - width: 180 - }, - isTable: false, - form: { - component: 'DatePicker', - componentProps: { - type: 'datetime', - dateFormat: 'YYYY-MM-DD HH:mm:ss', - valueFormat: 'x', + { + label: '要求截止时间', + field: 'requestDueTime', + formatter: dateFormatter, + detail: { + dateFormat: 'YYYY-MM-DD HH:mm:ss' + }, + sort: 'custom', + table: { + width: 180 + }, + isTable: false, + form: { + component: 'DatePicker', + componentProps: { + type: 'datetime', + dateFormat: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'x' + } } }, - }, - { - label: '过期时间', - field: 'expiredTime', - formatter: dateFormatter, - detail: { - dateFormat: 'YYYY-MM-DD HH:mm:ss' - }, - sort: 'custom', - table: { - width: 180 - }, - isTable: false, - form: { - component: 'DatePicker', - componentProps: { - type: 'datetime', - dateFormat: 'YYYY-MM-DD HH:mm:ss', - valueFormat: 'x', + { + label: '过期时间', + field: 'expiredTime', + formatter: dateFormatter, + detail: { + dateFormat: 'YYYY-MM-DD HH:mm:ss' + }, + sort: 'custom', + table: { + width: 180 + }, + isTable: false, + form: { + component: 'DatePicker', + componentProps: { + type: 'datetime', + dateFormat: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'x' + } } }, - }, - { - label: '从仓库代码', - field: 'fromWarehouseCode', - sort: 'custom', - table: { - width: 150 - }, - isTable: false, - }, - { - label: '到仓库代码', - field: 'toWarehouseCode', - sort: 'custom', - table: { - width: 150 - }, - isTable: false, - }, - { - label: '从库区类型范围', - field: 'fromAreaTypes', - dictType: DICT_TYPE.AREA_TYPE, - dictClass: 'string', - isTable: false, - sort: 'custom', - table: { - width: 150 - }, - }, - { - label: '到库区类型范围', - field: 'toAreaTypes', - dictType: DICT_TYPE.AREA_TYPE, - dictClass: 'string', - isTable: false, - sort: 'custom', - table: { - width: 150 - }, - }, - { - label: '从库区代码范围', - field: 'fromAreaCodes', - sort: 'custom', - table: { - width: 150 - }, - isTable: false, - }, - { - label: '到库区代码范围', - field: 'toAreaCodes', - sort: 'custom', - table: { - width: 150 - }, - isTable: false, - }, - { - label: '从月台代码', - field: 'fromDockCode', - sort: 'custom', - table: { - width: 150 - }, - isTable: false, - }, - // { - // label: '状态', - // field: 'jobStageStatus', - // sort: 'custom', - // table: { - // width: 150 - // }, - // }, - { - label: '优先级', - field: 'priority', - sort: 'custom', - table: { - width: 150 - }, - isTable: false, - form: { - component: 'InputNumber', - } - }, - { - label: '优先级增量', - field: 'priorityIncrement', - sort: 'custom', - table: { - width: 150 - }, - isTable: false, - form: { - component: 'InputNumber', - } - }, - { - label: '业务类型', - field: 'businessType', - sort: 'custom', - table: { - width: 150 - }, - isTable: false, - }, - { - label: '部门', - field: 'departmentCode', - sort: 'custom', - table: { - width: 150 - }, - isTable: false, - }, - { - label: '自动完成', - field: 'autoComplete', - dictType: DICT_TYPE.TRUE_FALSE, - dictClass: 'string', - isTable: false, - sort: 'custom', - table: { - width: 150 - }, - form: { - component: 'Switch', - value: 'TRUE', - componentProps: { - inactiveValue: 'FALSE', - activeValue: 'TRUE' + { + label: '从仓库代码', + field: 'fromWarehouseCode', + sort: 'custom', + table: { + width: 150 + }, + isTable: false + }, + { + label: '到仓库代码', + field: 'toWarehouseCode', + sort: 'custom', + table: { + width: 150 + }, + isTable: false + }, + { + label: '从库区类型范围', + field: 'fromAreaTypes', + dictType: DICT_TYPE.AREA_TYPE, + dictClass: 'string', + isTable: false, + sort: 'custom', + table: { + width: 150 } - } - }, - { - label: '允许修改库位', - field: 'allowModifyLocation', - dictType: DICT_TYPE.TRUE_FALSE, - dictClass: 'string', - isTable: false, - sort: 'custom', - table: { - width: 150 }, - form: { - component: 'Switch', - value: 'TRUE', - componentProps: { - inactiveValue: 'FALSE', - activeValue: 'TRUE' + { + label: '到库区类型范围', + field: 'toAreaTypes', + dictType: DICT_TYPE.AREA_TYPE, + dictClass: 'string', + isTable: false, + sort: 'custom', + table: { + width: 150 } - } - }, - { - label: '允许修改数量', - field: 'allowModifyQty', - dictType: DICT_TYPE.TRUE_FALSE, - dictClass: 'string', - isTable: false, - sort: 'custom', - table: { - width: 150 }, - form: { - component: 'Switch', - value: 'TRUE', - componentProps: { - inactiveValue: 'FALSE', - activeValue: 'TRUE' + { + label: '从库区代码范围', + field: 'fromAreaCodes', + sort: 'custom', + table: { + width: 150 + }, + isTable: false + }, + { + label: '到库区代码范围', + field: 'toAreaCodes', + sort: 'custom', + table: { + width: 150 + }, + isTable: false + }, + { + label: '从月台代码', + field: 'fromDockCode', + sort: 'custom', + table: { + width: 150 + }, + isTable: false + }, + // { + // label: '状态', + // field: 'jobStageStatus', + // sort: 'custom', + // table: { + // width: 150 + // }, + // }, + { + label: '优先级', + field: 'priority', + sort: 'custom', + table: { + width: 150 + }, + isTable: false, + form: { + component: 'InputNumber' } - } - }, - { - label: '允许大于推荐数量', - field: 'allowBiggerQty', - dictType: DICT_TYPE.TRUE_FALSE, - dictClass: 'string', - isTable: false, - sort: 'custom', - table: { - width: 150 }, - form: { - component: 'Switch', - value: 'TRUE', - componentProps: { - inactiveValue: 'FALSE', - activeValue: 'TRUE' + { + label: '优先级增量', + field: 'priorityIncrement', + sort: 'custom', + table: { + width: 150 + }, + isTable: false, + form: { + component: 'InputNumber' } - } - }, - { - label: '允许小于推荐数量', - field: 'allowSmallerQty', - dictType: DICT_TYPE.TRUE_FALSE, - dictClass: 'string', - isTable: false, - sort: 'custom', - table: { - width: 150 }, - form: { - component: 'Switch', - value: 'TRUE', - componentProps: { - inactiveValue: 'FALSE', - activeValue: 'TRUE' + { + label: '业务类型', + field: 'businessType', + sort: 'custom', + table: { + width: 150 + }, + isTable: false + }, + { + label: '部门', + field: 'departmentCode', + sort: 'custom', + table: { + width: 150 + }, + isTable: false + }, + { + label: '自动完成', + field: 'autoComplete', + dictType: DICT_TYPE.TRUE_FALSE, + dictClass: 'string', + isTable: false, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } } - } - }, - { - label: '允许修改库存状态', - field: 'allowModifyInventoryStatus', - dictType: DICT_TYPE.TRUE_FALSE, - dictClass: 'string', - isTable: false, - sort: 'custom', - table: { - width: 150 }, - form: { - component: 'Switch', - value: 'TRUE', - componentProps: { - inactiveValue: 'FALSE', - activeValue: 'TRUE' + { + label: '允许修改库位', + field: 'allowModifyLocation', + dictType: DICT_TYPE.TRUE_FALSE, + dictClass: 'string', + isTable: false, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } } - } - }, - { - label: '允许连续扫描', - field: 'allowContinuousScanning', - dictType: DICT_TYPE.TRUE_FALSE, - dictClass: 'string', - isTable: false, - sort: 'custom', - table: { - width: 150 }, - form: { - component: 'Switch', - value: 'TRUE', - componentProps: { - inactiveValue: 'FALSE', - activeValue: 'TRUE' + { + label: '允许修改数量', + field: 'allowModifyQty', + dictType: DICT_TYPE.TRUE_FALSE, + dictClass: 'string', + isTable: false, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } } - } - }, - { - label: '允许部分完成', - field: 'allowPartialComplete', - dictType: DICT_TYPE.TRUE_FALSE, - dictClass: 'string', - isTable: false, - sort: 'custom', - table: { - width: 150 }, - form: { - component: 'Switch', - value: 'TRUE', - componentProps: { - inactiveValue: 'FALSE', - activeValue: 'TRUE' + { + label: '允许大于推荐数量', + field: 'allowBiggerQty', + dictType: DICT_TYPE.TRUE_FALSE, + dictClass: 'string', + isTable: false, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } } - } - }, - { - label: '允许修改批次', - field: 'allowModifyBatch', - dictType: DICT_TYPE.TRUE_FALSE, - dictClass: 'string', - isTable: false, - sort: 'custom', - table: { - width: 150 }, - form: { - component: 'Switch', - value: 'TRUE', - componentProps: { - inactiveValue: 'FALSE', - activeValue: 'TRUE' + { + label: '允许小于推荐数量', + field: 'allowSmallerQty', + dictType: DICT_TYPE.TRUE_FALSE, + dictClass: 'string', + isTable: false, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } } - } - }, - { - label: '允许修改箱码', - field: 'allowModifyPackingNumber', - dictType: DICT_TYPE.TRUE_FALSE, - dictClass: 'string', - isTable: false, - sort: 'custom', - table: { - width: 150 }, - form: { - component: 'Switch', - value: 'TRUE', - componentProps: { - inactiveValue: 'FALSE', - activeValue: 'TRUE' + { + label: '允许修改库存状态', + field: 'allowModifyInventoryStatus', + dictType: DICT_TYPE.TRUE_FALSE, + dictClass: 'string', + isTable: false, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } } - } - }, - { - label: '备注', - field: 'remark', - sort: 'custom', - table: { - width: 150 - }, - isTable: false, - }, - { - label: '承接时间', - field: 'acceptTime', - formatter: dateFormatter, - detail: { - dateFormat: 'YYYY-MM-DD HH:mm:ss' }, - sort: 'custom', - table: { - width: 180 - }, - isTable: false, - form: { - component: 'DatePicker', - componentProps: { - type: 'datetime', - dateFormat: 'YYYY-MM-DD HH:mm:ss', - valueFormat: 'x', + { + label: '允许连续扫描', + field: 'allowContinuousScanning', + dictType: DICT_TYPE.TRUE_FALSE, + dictClass: 'string', + isTable: false, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } } }, - }, - { - label: '承接人', - field: 'acceptUserId', - sort: 'custom', - table: { - width: 150 - }, - isTable: false, - }, - { - label: '完成时间', - field: 'completeTime', - formatter: dateFormatter, - detail: { - dateFormat: 'YYYY-MM-DD HH:mm:ss' - }, - sort: 'custom', - table: { - width: 180 - }, - isTable: false, - form: { - component: 'DatePicker', - componentProps: { - type: 'datetime', - dateFormat: 'YYYY-MM-DD HH:mm:ss', - valueFormat: 'x', + { + label: '允许部分完成', + field: 'allowPartialComplete', + dictType: DICT_TYPE.TRUE_FALSE, + dictClass: 'string', + isTable: false, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } } }, - }, - { - label: '完成人', - field: 'completeUserId', - sort: 'custom', - table: { - width: 150 - }, - isTable: false, - }, - { - label: '创建时间', - field: 'createTime', - formatter: dateFormatter, - detail: { - dateFormat: 'YYYY-MM-DD HH:mm:ss' - }, - sort: 'custom', - table: { - width: 180 - }, - isTable: true, - form: { - component: 'DatePicker', - componentProps: { - type: 'datetime', - dateFormat: 'YYYY-MM-DD HH:mm:ss', - valueFormat: 'x', + { + label: '允许修改批次', + field: 'allowModifyBatch', + dictType: DICT_TYPE.TRUE_FALSE, + dictClass: 'string', + isTable: false, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } } }, - }, - { - label: '创建者', - field: 'creator', - sort: 'custom', - table: { - width: 150 - }, - isTable: true, - }, - { - label: '最后更新时间', - field: 'updateTime', - formatter: dateFormatter, - detail: { - dateFormat: 'YYYY-MM-DD HH:mm:ss' + { + label: '允许修改箱码', + field: 'allowModifyPackingNumber', + dictType: DICT_TYPE.TRUE_FALSE, + dictClass: 'string', + isTable: false, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, - sort: 'custom', - table: { - width: 180 + { + label: '备注', + field: 'remark', + sort: 'custom', + table: { + width: 150 + }, + isTable: false + }, + { + label: '承接时间', + field: 'acceptTime', + formatter: dateFormatter, + detail: { + dateFormat: 'YYYY-MM-DD HH:mm:ss' + }, + sort: 'custom', + table: { + width: 180 + }, + isTable: false, + form: { + component: 'DatePicker', + componentProps: { + type: 'datetime', + dateFormat: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'x' + } + } }, - isTable: false, - form: { - component: 'DatePicker', - componentProps: { - type: 'datetime', - dateFormat: 'YYYY-MM-DD HH:mm:ss', - valueFormat: 'x', + { + label: '承接人', + field: 'acceptUserId', + sort: 'custom', + table: { + width: 150 + }, + isTable: false + }, + { + label: '完成时间', + field: 'completeTime', + formatter: dateFormatter, + detail: { + dateFormat: 'YYYY-MM-DD HH:mm:ss' + }, + sort: 'custom', + table: { + width: 180 + }, + isTable: false, + form: { + component: 'DatePicker', + componentProps: { + type: 'datetime', + dateFormat: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'x' + } } }, - }, - { - label: '最后更新者', - field: 'updater', - sort: 'custom', - table: { - width: 150 + { + label: '完成人', + field: 'completeUserId', + sort: 'custom', + table: { + width: 150 + }, + isTable: false + }, + { + label: '创建时间', + field: 'createTime', + formatter: dateFormatter, + detail: { + dateFormat: 'YYYY-MM-DD HH:mm:ss' + }, + sort: 'custom', + table: { + width: 180 + }, + isTable: true, + form: { + component: 'DatePicker', + componentProps: { + type: 'datetime', + dateFormat: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'x' + } + } }, - isTable: false, - }, - { - label: '操作', - field: 'action', - isDetail: false, - isForm: false, - table: { - width: 150, - fixed: 'right' + { + label: '创建者', + field: 'creator', + sort: 'custom', + table: { + width: 150 + }, + isTable: true + }, + { + label: '最后更新时间', + field: 'updateTime', + formatter: dateFormatter, + detail: { + dateFormat: 'YYYY-MM-DD HH:mm:ss' + }, + sort: 'custom', + table: { + width: 180 + }, + isTable: false, + form: { + component: 'DatePicker', + componentProps: { + type: 'datetime', + dateFormat: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'x' + } + } }, - } -])) + { + label: '最后更新者', + field: 'updater', + sort: 'custom', + table: { + width: 150 + }, + isTable: false + }, + { + label: '操作', + field: 'action', + isDetail: false, + isForm: false, + table: { + width: 150, + fixed: 'right' + } + } + ]) +) //表单校验 export const DeliverJobMainRules = reactive({ diff --git a/src/views/wms/deliversettlementManage/deliver/deliverRecordMain/deliverRecordMain.data.ts b/src/views/wms/deliversettlementManage/deliver/deliverRecordMain/deliverRecordMain.data.ts index c5249f5e5..b5b256b13 100644 --- a/src/views/wms/deliversettlementManage/deliver/deliverRecordMain/deliverRecordMain.data.ts +++ b/src/views/wms/deliversettlementManage/deliver/deliverRecordMain/deliverRecordMain.data.ts @@ -1,391 +1,395 @@ import type { CrudSchema } from '@/hooks/web/useCrudSchemas' -import { dateFormatter,dateFormatter2 } from '@/utils/formatTime' +import { dateFormatter, dateFormatter2 } from '@/utils/formatTime' /** * @returns {Array} 发货记录主表 */ -export const DeliverRecordMain = useCrudSchemas(reactive([ - { - label: '单据号', - field: 'number', - sort: 'custom', - table: { - width: 180, - fixed: 'left' - }, - isSearch: true - }, - { - label: '申请单号', - field: 'requestNumber', - sort: 'custom', - table: { - width: 180 - }, - isSearch: true - }, - { - label: '任务单号', - field: 'jobNumber', - sort: 'custom', - table: { - width: 180 - }, - }, - { - label: '发货记录单号', - field: 'deliverRecordNumber', - sort: 'custom', - table: { - width: 150 - }, - isSearch: false, - isTable: false, - isForm: false, - isDetail:false, - }, - // { - // label: '发货计划单号', - // field: 'deliverPlanNumber', - // sort: 'custom', - // table: { - // width: 180 - // }, - // }, - // { - // label: '客户发货单号', - // field: 'customerDeliverNumber', - // sort: 'custom', - // table: { - // width: 150 - // }, - // }, - { - label: '状态', - field: 'status', - dictType: DICT_TYPE.REQUEST_STATUS, - dictClass: 'string', - isSearch: false, - isTable: false, - isForm: false, - isDetail:false, - sort: 'custom', - table: { - width: 150 - }, - }, - { - label: '客户代码', - field: 'customerCode', - sort: 'custom', - table: { - width: 150 - }, - isSearch: true - }, - { - label: '客户月台代码', - field: 'customerDockCode', - sort: 'custom', - table: { - width: 150 - }, - isTable: false, - }, - { - label: '承运商', - field: 'carrierCode', - sort: 'custom', - table: { - width: 150 - }, - isTable: false, - }, - { - label: '运输方式', - field: 'transferMode', - sort: 'custom', - table: { - width: 150 - }, - isTable: false, - }, - { - label: '车牌号', - field: 'vehiclePlateNumber', - sort: 'custom', - table: { - width: 150 - }, - isTable: false, - }, - { - label: '申请时间', - field: 'requestTime', - formatter: dateFormatter, - detail: { - dateFormat: 'YYYY-MM-DD HH:mm:ss' - }, - sort: 'custom', - table: { - width: 180 - }, - isTable: false, - form: { - component: 'DatePicker', - componentProps: { - type: 'datetime', - dateFormat: 'YYYY-MM-DD HH:mm:ss', - valueFormat: 'x', +export const DeliverRecordMain = useCrudSchemas( + reactive([ + { + label: '单据号', + field: 'number', + sort: 'custom', + table: { + width: 180, + fixed: 'left' + }, + isSearch: true + }, + { + label: '申请单号', + field: 'requestNumber', + sort: 'custom', + table: { + width: 180 + }, + isSearch: true + }, + { + label: '任务单号', + field: 'jobNumber', + sort: 'custom', + table: { + width: 180 } }, - }, - { - label: '截止时间', - field: 'dueTime', - formatter: dateFormatter, - detail: { - dateFormat: 'YYYY-MM-DD HH:mm:ss' - }, - sort: 'custom', - table: { - width: 180 - }, - isTable: false, - form: { - component: 'DatePicker', - componentProps: { - type: 'datetime', - dateFormat: 'YYYY-MM-DD HH:mm:ss', - valueFormat: 'x', + { + label: '发货记录单号', + field: 'deliverRecordNumber', + sort: 'custom', + table: { + width: 150 + }, + isSearch: false, + isTable: false, + isForm: false, + isDetail: false + }, + { + label: '发货计划单号', + field: 'deliverPlanNumber', + sort: 'custom', + table: { + width: 180 + }, + isTable: true, + isDetail: true + }, + // { + // label: '客户发货单号', + // field: 'customerDeliverNumber', + // sort: 'custom', + // table: { + // width: 150 + // }, + // }, + { + label: '状态', + field: 'status', + dictType: DICT_TYPE.REQUEST_STATUS, + dictClass: 'string', + isSearch: false, + isTable: false, + isForm: false, + isDetail: false, + sort: 'custom', + table: { + width: 150 } }, - }, - { - label: '执行时间', - field: 'executeTime', - formatter: dateFormatter, - detail: { - dateFormat: 'YYYY-MM-DD HH:mm:ss' - }, - sort: 'custom', - table: { - width: 180 - }, - isTable: false, - form: { - component: 'DatePicker', - componentProps: { - type: 'datetime', - dateFormat: 'YYYY-MM-DD HH:mm:ss', - valueFormat: 'x', + { + label: '客户代码', + field: 'customerCode', + sort: 'custom', + table: { + width: 150 + }, + isSearch: true + }, + { + label: '客户月台代码', + field: 'customerDockCode', + sort: 'custom', + table: { + width: 150 + }, + isTable: false + }, + { + label: '承运商', + field: 'carrierCode', + sort: 'custom', + table: { + width: 150 + }, + isTable: false + }, + { + label: '运输方式', + field: 'transferMode', + sort: 'custom', + table: { + width: 150 + }, + isTable: false + }, + { + label: '车牌号', + field: 'vehiclePlateNumber', + sort: 'custom', + table: { + width: 150 + }, + isTable: false + }, + { + label: '申请时间', + field: 'requestTime', + formatter: dateFormatter, + detail: { + dateFormat: 'YYYY-MM-DD HH:mm:ss' + }, + sort: 'custom', + table: { + width: 180 + }, + isTable: false, + form: { + component: 'DatePicker', + componentProps: { + type: 'datetime', + dateFormat: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'x' + } } }, - }, - { - label: '生效日期', - field: 'activeDate', - formatter: dateFormatter2, - detail: { - dateFormat: 'YYYY-MM-DD' - }, - sort: 'custom', - table: { - width: 180 - }, - isTable: false, - form: { - component: 'DatePicker', - componentProps: { - style: {width: '100%'}, - type: 'date', - dateFormat: 'YYYY-MM-DD', - valueFormat: 'x', + { + label: '截止时间', + field: 'dueTime', + formatter: dateFormatter, + detail: { + dateFormat: 'YYYY-MM-DD HH:mm:ss' + }, + sort: 'custom', + table: { + width: 180 + }, + isTable: false, + form: { + component: 'DatePicker', + componentProps: { + type: 'datetime', + dateFormat: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'x' + } } }, - }, - { - label: '从仓库代码', - field: 'fromWarehouseCode', - sort: 'custom', - table: { - width: 150 - }, - isTable: false, - }, - { - label: '到仓库代码', - field: 'toWarehouseCode', - sort: 'custom', - table: { - width: 150 - }, - isTable: false, - }, - { - label: '从库区类型范围', - field: 'fromAreaTypes', - dictType: DICT_TYPE.AREA_TYPE, - dictClass: 'string', - isTable: false, - sort: 'custom', - table: { - width: 150 - }, - }, - { - label: '到库区类型范围', - field: 'toAreaTypes', - dictType: DICT_TYPE.AREA_TYPE, - dictClass: 'string', - isTable: false, - sort: 'custom', - table: { - width: 150 - }, - }, - { - label: '从库区代码范围', - field: 'fromAreaCodes', - sort: 'custom', - table: { - width: 150 - }, - isTable: false, - }, - { - label: '到库区代码范围', - field: 'toAreaCodes', - sort: 'custom', - table: { - width: 150 - }, - isTable: false, - }, - { - label: '从月台代码', - field: 'fromDockCode', - sort: 'custom', - table: { - width: 150 - }, - isTable: false, - }, - { - label: '出库事务类型', - field: 'outTransactionType', - sort: 'custom', - table: { - width: 150 - }, - isTable: false, - }, - { - label: '入库事务类型', - field: 'inTransactionType', - sort: 'custom', - table: { - width: 150 - }, - isTable: false, - }, - { - label: '业务类型', - field: 'businessType', - sort: 'custom', - table: { - width: 150 - }, - isTable: false, - }, - { - label: '部门', - field: 'departmentCode', - sort: 'custom', - table: { - width: 150 - }, - isTable: false, - }, - { - label: '接口类型', - field: 'interfaceType', - dictType: DICT_TYPE.INTERFACE_TYPE, - dictClass: 'string', - isTable: false, - sort: 'custom', - table: { - width: 150 - }, - }, - { - label: '备注', - field: 'remark', - sort: 'custom', - table: { - width: 150 + { + label: '执行时间', + field: 'executeTime', + formatter: dateFormatter, + detail: { + dateFormat: 'YYYY-MM-DD HH:mm:ss' + }, + sort: 'custom', + table: { + width: 180 + }, + isTable: false, + form: { + component: 'DatePicker', + componentProps: { + type: 'datetime', + dateFormat: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'x' + } + } }, - isTable: false, - }, - { - label: '创建时间', - field: 'createTime', - formatter: dateFormatter, - detail: { - dateFormat: 'YYYY-MM-DD HH:mm:ss' + { + label: '生效日期', + field: 'activeDate', + formatter: dateFormatter2, + detail: { + dateFormat: 'YYYY-MM-DD' + }, + sort: 'custom', + table: { + width: 180 + }, + isTable: false, + form: { + component: 'DatePicker', + componentProps: { + style: { width: '100%' }, + type: 'date', + dateFormat: 'YYYY-MM-DD', + valueFormat: 'x' + } + } }, - sort: 'custom', - table: { - width: 180 + { + label: '从仓库代码', + field: 'fromWarehouseCode', + sort: 'custom', + table: { + width: 150 + }, + isTable: false + }, + { + label: '到仓库代码', + field: 'toWarehouseCode', + sort: 'custom', + table: { + width: 150 + }, + isTable: false + }, + { + label: '从库区类型范围', + field: 'fromAreaTypes', + dictType: DICT_TYPE.AREA_TYPE, + dictClass: 'string', + isTable: false, + sort: 'custom', + table: { + width: 150 + } }, - isTable: true, - form: { - component: 'DatePicker', - componentProps: { - type: 'datetime', - dateFormat: 'YYYY-MM-DD HH:mm:ss', - valueFormat: 'x', + { + label: '到库区类型范围', + field: 'toAreaTypes', + dictType: DICT_TYPE.AREA_TYPE, + dictClass: 'string', + isTable: false, + sort: 'custom', + table: { + width: 150 } }, - }, - { - label: '创建者', - field: 'creator', - sort: 'custom', - table: { - width: 150 + { + label: '从库区代码范围', + field: 'fromAreaCodes', + sort: 'custom', + table: { + width: 150 + }, + isTable: false + }, + { + label: '到库区代码范围', + field: 'toAreaCodes', + sort: 'custom', + table: { + width: 150 + }, + isTable: false + }, + { + label: '从月台代码', + field: 'fromDockCode', + sort: 'custom', + table: { + width: 150 + }, + isTable: false + }, + { + label: '出库事务类型', + field: 'outTransactionType', + sort: 'custom', + table: { + width: 150 + }, + isTable: false + }, + { + label: '入库事务类型', + field: 'inTransactionType', + sort: 'custom', + table: { + width: 150 + }, + isTable: false + }, + { + label: '业务类型', + field: 'businessType', + sort: 'custom', + table: { + width: 150 + }, + isTable: false + }, + { + label: '部门', + field: 'departmentCode', + sort: 'custom', + table: { + width: 150 + }, + isTable: false + }, + { + label: '接口类型', + field: 'interfaceType', + dictType: DICT_TYPE.INTERFACE_TYPE, + dictClass: 'string', + isTable: false, + sort: 'custom', + table: { + width: 150 + } }, - isTable: true, - }, - // { - // label: '代码', - // field: 'code', - // sort: 'custom', - // table: { - // width: 150 - // }, - // }, - { - label: '是否可用', - field: 'available', - dictType: DICT_TYPE.TRUE_FALSE, - dictClass: 'string', - isSearch: false, - isTable: false, - sort: 'custom', - table: { - width: 150 + { + label: '备注', + field: 'remark', + sort: 'custom', + table: { + width: 150 + }, + isTable: false + }, + { + label: '创建时间', + field: 'createTime', + formatter: dateFormatter, + detail: { + dateFormat: 'YYYY-MM-DD HH:mm:ss' + }, + sort: 'custom', + table: { + width: 180 + }, + isTable: true, + form: { + component: 'DatePicker', + componentProps: { + type: 'datetime', + dateFormat: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'x' + } + } }, - form: { - component: 'Switch', - value: 'TRUE', - componentProps: { - inactiveValue: 'FALSE', - activeValue: 'TRUE' + { + label: '创建者', + field: 'creator', + sort: 'custom', + table: { + width: 150 + }, + isTable: true + }, + // { + // label: '代码', + // field: 'code', + // sort: 'custom', + // table: { + // width: 150 + // }, + // }, + { + label: '是否可用', + field: 'available', + dictType: DICT_TYPE.TRUE_FALSE, + dictClass: 'string', + isSearch: false, + isTable: false, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } } } - }, -])) + ]) +) //表单校验 export const DeliverRecordMainRules = reactive({ diff --git a/src/views/wms/deliversettlementManage/deliver/deliverRequestMain/deliverRequestMain.data.ts b/src/views/wms/deliversettlementManage/deliver/deliverRequestMain/deliverRequestMain.data.ts index b9c9fbe01..618115d95 100644 --- a/src/views/wms/deliversettlementManage/deliver/deliverRequestMain/deliverRequestMain.data.ts +++ b/src/views/wms/deliversettlementManage/deliver/deliverRequestMain/deliverRequestMain.data.ts @@ -2,11 +2,15 @@ import type { CrudSchema } from '@/hooks/web/useCrudSchemas' import { TableColumn } from '@/types/table' import { dateFormatter } from '@/utils/formatTime' -import * as getRequestsettingApi from '@/api/wms/requestsetting/index' +import * as getRequestsettingApi from '@/api/wms/requestsetting/index' import * as DeliverPlanMainApi from '@/api/wms/deliverPlanMain' import * as DeliverPlanDetailApi from '@/api/wms/deliverPlanDetail' -import { DeliverPlanMain ,DeliverPlanDetail,DeliverPlanDetailRequest} from '../../deliverplan/deliverPlanMain/deliverPlanMain.data' +import { + DeliverPlanMain, + DeliverPlanDetail, + DeliverPlanDetailRequest +} from '../../deliverplan/deliverPlanMain/deliverPlanMain.data' import * as CustomerItemApi from '@/api/wms/customeritem' import { Customeritem } from '@/views/wms/basicDataManage/customerManage/customeritem/customeritem.data' @@ -27,569 +31,622 @@ const { t } = useI18n() // 国际化 // 获取自动提交自动通过自动执行,跳过任务直接删生成记录的默认值 const queryParams = { - pageSize:10, - pageNo:1, - code:'DeliverRequest' + pageSize: 10, + pageNo: 1, + code: 'DeliverRequest' } - const data = await getRequestsettingApi.getRequestsettingPage(queryParams) - const requestsettingData =data?.list[0]||{} +const data = await getRequestsettingApi.getRequestsettingPage(queryParams) +const requestsettingData = data?.list[0] || {} - // 获取当前操作人的部门 +// 获取当前操作人的部门 import { useUserStore } from '@/store/modules/user' const userStore = useUserStore() const userDept = userStore.userSelfInfo.dept - // id 转str 否则form回显匹配不到 - userDept.id = userDept.id.toString() -const userDeptArray:any = [userDept] +// id 转str 否则form回显匹配不到 +userDept.id = userDept.id.toString() +const userDeptArray: any = [userDept] /** * @returns {Array} 发货申请主表 */ -export const DeliverRequestMain = useCrudSchemas(reactive([ - { - label: '单据号', - field: 'number', - sort: 'custom', - table: { - width: 180, - fixed: 'left' - }, - isForm: false, - isSearch: true, - }, - { - label: '状态', - field: 'status', - dictType: DICT_TYPE.REQUEST_STATUS, - dictClass: 'string', - isSearch: true, - isForm: false, - isTable: true, - sort: 'custom', - table: { - width: 150 - }, - }, - { - label: '客户代码', - field: 'customerCode', - sort: 'custom', - table: { - width: 150 - }, - isSearch: true, - form: { - // labelMessage: '信息提示说明!!!', - componentProps: { - enterSearch: true, - isSearchList: true, // 开启查询弹窗 - searchListPlaceholder: '请选择客户代码', // 输入框占位文本 - searchField: 'code', // 查询弹窗赋值字段 - searchTitle: '客户信息', // 查询弹窗标题 - searchAllSchemas: Customer.allSchemas, // 查询弹窗所需类 - searchPage: CustomerApi.getCustomerPage, // 查询弹窗所需分页方法 - searchCondition: [{ - key: 'available', - value: 'TRUE', - isMainValue: false - }] +export const DeliverRequestMain = useCrudSchemas( + reactive([ + { + label: '单据号', + field: 'number', + sort: 'custom', + table: { + width: 180, + fixed: 'left' + }, + isForm: false, + isSearch: true + }, + { + label: '状态', + field: 'status', + dictType: DICT_TYPE.REQUEST_STATUS, + dictClass: 'string', + isSearch: true, + isForm: false, + isTable: true, + sort: 'custom', + table: { + width: 150 } - } - }, - { - label: '客户月台', - field: 'customerDockCode', - sort: 'custom', - table: { - width: 150 }, - isSearch: true, - form: { - // labelMessage: '信息提示说明!!!', - componentProps: { - isSearchList: true, // 开启查询弹窗 - searchListPlaceholder: '请选择客户月台代码', // 输入框占位文本 - searchField: 'code', // 查询弹窗赋值字段 - searchTitle: '客户月台信息', // 查询弹窗标题 - searchAllSchemas: Customerdock.allSchemas, // 查询弹窗所需类 - searchPage: CustomerdockApi.getCustomerdockPage, // 查询弹窗所需分页方法 - searchCondition: [{ - key: 'available', - value: 'TRUE', - isMainValue: false - }, - { - key: 'customerCode', - value: 'customerCode', - message: '请填写客户代码!', - isMainValue: true - }] + { + label: '客户代码', + field: 'customerCode', + sort: 'custom', + table: { + width: 150 + }, + isSearch: true, + form: { + // labelMessage: '信息提示说明!!!', + componentProps: { + enterSearch: true, + isSearchList: true, // 开启查询弹窗 + searchListPlaceholder: '请选择客户代码', // 输入框占位文本 + searchField: 'code', // 查询弹窗赋值字段 + searchTitle: '客户信息', // 查询弹窗标题 + searchAllSchemas: Customer.allSchemas, // 查询弹窗所需类 + searchPage: CustomerApi.getCustomerPage, // 查询弹窗所需分页方法 + searchCondition: [ + { + key: 'available', + value: 'TRUE', + isMainValue: false + } + ], + verificationParams: [ + { + key: 'code', + action: '==', + value: '', + isMainValue: false, + isSearch: true, + isFormModel: true + } + ] // 失去焦点校验参数 + } } - } - }, - { - label: '到仓库', - field: 'toWarehouseCode', - sort: 'custom', - table: { - width: 150 }, - isForm: true, - isTableForm:false, - isDetail:false, - form: { - componentProps: { - disabled:true + { + label: '客户月台', + field: 'customerDockCode', + sort: 'custom', + table: { + width: 150 + }, + isSearch: true, + form: { + // labelMessage: '信息提示说明!!!', + componentProps: { + enterSearch: true, + isSearchList: true, // 开启查询弹窗 + searchListPlaceholder: '请选择客户月台代码', // 输入框占位文本 + searchField: 'code', // 查询弹窗赋值字段 + searchTitle: '客户月台信息', // 查询弹窗标题 + searchAllSchemas: Customerdock.allSchemas, // 查询弹窗所需类 + searchPage: CustomerdockApi.getCustomerdockPage, // 查询弹窗所需分页方法 + searchCondition: [ + { + key: 'available', + value: 'TRUE', + isMainValue: false + }, + { + key: 'customerCode', + value: 'customerCode', + message: '请填写客户代码!', + isMainValue: true + } + ], + verificationParams: [ + { + key: 'code', + action: '==', + value: '', + isMainValue: false, + isSearch: true, + isFormModel: true + } + ] // 失去焦点校验参数 + } } - } - }, - { - label: '到库位', - field: 'toLocationCode', - sort: 'custom', - table: { - width: 150 }, - isForm: true, - isTableForm:false, - isDetail:false, - form: { - componentProps: { - disabled:true + { + label: '到仓库', + field: 'toWarehouseCode', + sort: 'custom', + table: { + width: 150 + }, + isForm: true, + isTableForm: false, + isDetail: false, + form: { + componentProps: { + disabled: true + } } - } - }, - { - label: '发货类型', - field: 'deliverType', - sort: 'custom', - dictType: DICT_TYPE.DELIVER_TYPE, - dictClass: 'string', - table: { - width: 150 }, - form: { - componentProps: { - disabled:true + { + label: '到库位', + field: 'toLocationCode', + sort: 'custom', + table: { + width: 150 + }, + isForm: true, + isTableForm: false, + isDetail: false, + form: { + componentProps: { + disabled: true + } } - } - }, - { - label: '发货计划单号', - field: 'deliverPlanNumber', - sort: 'custom', - table: { - width: 180 }, - isTable:false, - form: { - // labelMessage: '信息提示说明!!!', - componentProps: { - enterSearch: true, - isSearchList: true, // 开启查询弹窗 - searchListPlaceholder: '请选择发货计划单号', // 输入框占位文本 - searchField: 'number', // 查询弹窗赋值字段 - searchTitle: '发货计划信息', // 查询弹窗标题 - searchAllSchemas: DeliverPlanDetailRequest.allSchemas, // 查询弹窗所需类 - searchPage: DeliverPlanDetailApi.getDeliverPlanDetailPage, // 查询弹窗所需分页方法 - searchCondition: [{ - key: 'available', - value: 'TRUE', - isMainValue: false - }, - { - key: 'status', - value: '6', - isMainValue: false - }] + { + label: '发货类型', + field: 'deliverType', + sort: 'custom', + dictType: DICT_TYPE.DELIVER_TYPE, + dictClass: 'string', + table: { + width: 150 + }, + form: { + componentProps: { + disabled: true + } } - } - }, - { - label: '客户发货单号', - field: 'customerDeliverNumber', - sort: 'custom', - table: { - width: 180 }, - isTable:false, - isForm: false, - }, - { - label: '承运商', - field: 'carrierCode', - sort: 'custom', - table: { - width: 150 - }, - isTable:false, - form: { - // labelMessage: '信息提示说明!!!', - componentProps: { - isSearchList: true, // 开启查询弹窗 - searchListPlaceholder: '请选择承运商', // 输入框占位文本 - searchField: 'code', // 查询弹窗赋值字段 - searchTitle: '承运商信息', // 查询弹窗标题 - searchAllSchemas: Carrier.allSchemas, // 查询弹窗所需类 - searchPage: CarrierApi.getCarrierPage, // 查询弹窗所需分页方法 - searchCondition: [{ - key: 'available', - value: 'TRUE', - isMainValue: false - }] + { + label: '发货计划单号', + field: 'deliverPlanNumber', + sort: 'custom', + table: { + width: 180 + }, + isTable: true, + isDetail: true, + form: { + // labelMessage: '信息提示说明!!!', + componentProps: { + enterSearch: true, + isSearchList: true, // 开启查询弹窗 + searchListPlaceholder: '请选择发货计划单号', // 输入框占位文本 + searchField: 'number', // 查询弹窗赋值字段 + searchTitle: '发货计划信息', // 查询弹窗标题 + searchAllSchemas: DeliverPlanDetailRequest.allSchemas, // 查询弹窗所需类 + searchPage: DeliverPlanDetailApi.getDeliverPlanDetailPage, // 查询弹窗所需分页方法 + searchCondition: [ + { + key: 'available', + value: 'TRUE', + isMainValue: false + }, + { + key: 'status', + value: '6', + isMainValue: false + } + ], + verificationParams: [ + { + key: 'number', + action: '==', + value: '', + isMainValue: false, + isSearch: true, + isFormModel: true + } + ] // 失去焦点校验参数 + } } - } - }, - { - label: '运输方式', - field: 'transferMode', - sort: 'custom', - dictType: DICT_TYPE.TRANSFER_MODE, - dictClass: 'string', - table: { - width: 150 - }, - isTable:false, - }, - { - label: '车牌号', - field: 'vehiclePlateNumber', - sort: 'custom', - table: { - width: 150 - }, - isTable:false, - }, - { - label: '申请时间', - field: 'requestTime', - formatter: dateFormatter, - detail: { - dateFormat: 'YYYY-MM-DD HH:mm:ss' }, - sort: 'custom', - table: { - width: 180 - }, - isTable:false, - form: { - component: 'DatePicker', - componentProps: { - style: {width:'100%'}, - type: 'datetime', - dateFormat: 'YYYY-MM-DD HH:mm:ss', - valueFormat: 'x', + { + label: '客户发货单号', + field: 'customerDeliverNumber', + sort: 'custom', + table: { + width: 180 + }, + isTable: false, + isForm: false + }, + { + label: '承运商', + field: 'carrierCode', + sort: 'custom', + table: { + width: 150 + }, + isTable: false, + form: { + // labelMessage: '信息提示说明!!!', + componentProps: { + enterSearch: true, + isSearchList: true, // 开启查询弹窗 + searchListPlaceholder: '请选择承运商', // 输入框占位文本 + searchField: 'code', // 查询弹窗赋值字段 + searchTitle: '承运商信息', // 查询弹窗标题 + searchAllSchemas: Carrier.allSchemas, // 查询弹窗所需类 + searchPage: CarrierApi.getCarrierPage, // 查询弹窗所需分页方法 + searchCondition: [ + { + key: 'available', + value: 'TRUE', + isMainValue: false + } + ], + verificationParams: [ + { + key: 'code', + action: '==', + value: '', + isMainValue: false, + isSearch: true, + isFormModel: true + } + ] // 失去焦点校验参数 + } } }, - isForm: false - }, - { - label: '截止时间', - field: 'dueTime', - formatter: dateFormatter, - detail: { - dateFormat: 'YYYY-MM-DD HH:mm:ss' - }, - sort: 'custom', - table: { - width: 180 - }, - isTable:false, - form: { - component: 'DatePicker', - componentProps: { - style: {width:'100%'}, - type: 'datetime', - dateFormat: 'YYYY-MM-DD HH:mm:ss', - valueFormat: 'x', + { + label: '运输方式', + field: 'transferMode', + sort: 'custom', + dictType: DICT_TYPE.TRANSFER_MODE, + dictClass: 'string', + table: { + width: 150 + }, + isTable: false + }, + { + label: '车牌号', + field: 'vehiclePlateNumber', + sort: 'custom', + table: { + width: 150 + }, + isTable: false + }, + { + label: '申请时间', + field: 'requestTime', + formatter: dateFormatter, + detail: { + dateFormat: 'YYYY-MM-DD HH:mm:ss' + }, + sort: 'custom', + table: { + width: 180 + }, + isTable: false, + form: { + component: 'DatePicker', + componentProps: { + style: { width: '100%' }, + type: 'datetime', + dateFormat: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'x' + } + }, + isForm: false + }, + { + label: '截止时间', + field: 'dueTime', + formatter: dateFormatter, + detail: { + dateFormat: 'YYYY-MM-DD HH:mm:ss' + }, + sort: 'custom', + table: { + width: 180 + }, + isTable: false, + form: { + component: 'DatePicker', + componentProps: { + style: { width: '100%' }, + type: 'datetime', + dateFormat: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'x' + } } }, - }, - { - label: '从仓库代码', - field: 'fromWarehouseCode', - sort: 'custom', - table: { - width: 150 - }, - isTable:false, - isForm: false, - }, - { - label: '到仓库代码', - field: 'toWarehouseCode', - sort: 'custom', - table: { - width: 150 - }, - isTable:false, - isForm: false, - }, - { - label: '从库区类型范围', - field: 'fromAreaTypes', - dictType: DICT_TYPE.AREA_TYPE, - dictClass: 'string', - isTable:false, - sort: 'custom', - table: { - width: 150 - }, - isForm: false, - }, - { - label: '到库区类型范围', - field: 'toAreaTypes', - dictType: DICT_TYPE.AREA_TYPE, - dictClass: 'string', - isTable:false, - sort: 'custom', - table: { - width: 150 - }, - isForm: false, - }, - { - label: '从库区代码范围', - field: 'fromAreaCodes', - sort: 'custom', - table: { - width: 150 - }, - isTable:false, - isForm: false, - }, - { - label: '到库区代码范围', - field: 'toAreaCodes', - sort: 'custom', - table: { - width: 150 - }, - isTable:false, - isForm: false, - }, - { - label: '从月台代码', - field: 'fromDockCode', - sort: 'custom', - table: { - width: 150 - }, - isTable:false, - isForm: false, - }, - { - label: '业务类型', - field: 'businessType', - sort: 'custom', - table: { - width: 150 - }, - isTable:false, - form: { - value: 'Deliver', - componentProps: { - disabled: true, + { + label: '从仓库代码', + field: 'fromWarehouseCode', + sort: 'custom', + table: { + width: 150 + }, + isTable: false, + isForm: false + }, + { + label: '到仓库代码', + field: 'toWarehouseCode', + sort: 'custom', + table: { + width: 150 + }, + isTable: false, + isForm: false + }, + { + label: '从库区类型范围', + field: 'fromAreaTypes', + dictType: DICT_TYPE.AREA_TYPE, + dictClass: 'string', + isTable: false, + sort: 'custom', + table: { + width: 150 + }, + isForm: false + }, + { + label: '到库区类型范围', + field: 'toAreaTypes', + dictType: DICT_TYPE.AREA_TYPE, + dictClass: 'string', + isTable: false, + sort: 'custom', + table: { + width: 150 + }, + isForm: false + }, + { + label: '从库区代码范围', + field: 'fromAreaCodes', + sort: 'custom', + table: { + width: 150 + }, + isTable: false, + isForm: false + }, + { + label: '到库区代码范围', + field: 'toAreaCodes', + sort: 'custom', + table: { + width: 150 + }, + isTable: false, + isForm: false + }, + { + label: '从月台代码', + field: 'fromDockCode', + sort: 'custom', + table: { + width: 150 + }, + isTable: false, + isForm: false + }, + { + label: '业务类型', + field: 'businessType', + sort: 'custom', + table: { + width: 150 + }, + isTable: false, + form: { + value: 'Deliver', + componentProps: { + disabled: true + } + }, + isForm: false + }, + { + label: '部门', + field: 'departmentCode', + sort: 'custom', + isForm: false, + table: { + width: 150 + }, + isTable: false, + formatter: (_: Recordable, __: TableColumn, cellValue: number) => { + return userDeptArray.find((account) => account.id == cellValue)?.name + }, + form: { + value: userDept.id, + component: 'Select', + api: () => userDeptArray, + componentProps: { + disabled: true, + optionsAlias: { + labelField: 'name', + valueField: 'id' + } + } } }, - isForm: false, - }, - { - label: '部门', - field: 'departmentCode', - sort: 'custom', - isForm: false, - table: { - width: 150 - }, - isTable:false, - formatter: (_: Recordable, __: TableColumn, cellValue: number) => { - return userDeptArray.find((account) => account.id == cellValue)?.name - }, - form: { - value: userDept.id, - component: 'Select', - api: () => userDeptArray, - componentProps: { - disabled: true, - optionsAlias: { - labelField: 'name', - valueField: 'id' + { + label: '自动提交', + field: 'autoCommit', + dictType: DICT_TYPE.TRUE_FALSE, + dictClass: 'string', + isTable: false, + isForm: false, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: requestsettingData.autoCommit, + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE', + disabled: true } } - } - }, - { - label: '自动提交', - field: 'autoCommit', - dictType: DICT_TYPE.TRUE_FALSE, - dictClass: 'string', - isTable: false, - isForm: false, - sort: 'custom', - table: { - width: 150 }, - form: { - component: 'Switch', - value: requestsettingData.autoCommit, - componentProps: { - inactiveValue: 'FALSE', - activeValue: 'TRUE', - disabled: true + { + label: '自动通过', + field: 'autoAgree', + dictType: DICT_TYPE.TRUE_FALSE, + dictClass: 'string', + isTable: false, + isForm: false, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: requestsettingData.autoAgree, + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE', + disabled: true + } } - } - }, - { - label: '自动通过', - field: 'autoAgree', - dictType: DICT_TYPE.TRUE_FALSE, - dictClass: 'string', - isTable: false, - isForm: false, - sort: 'custom', - table: { - width: 150 }, - form: { - component: 'Switch', - value: requestsettingData.autoAgree, - componentProps: { - inactiveValue: 'FALSE', - activeValue: 'TRUE', - disabled: true + { + label: '自动执行', + field: 'autoExecute', + dictType: DICT_TYPE.TRUE_FALSE, + dictClass: 'string', + isTable: false, + isForm: false, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: requestsettingData.autoExecute, + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE', + disabled: true + } } - } - }, - { - label: '自动执行', - field: 'autoExecute', - dictType: DICT_TYPE.TRUE_FALSE, - dictClass: 'string', - isTable: false, - isForm: false, - sort: 'custom', - table: { - width: 150 }, - form: { - component: 'Switch', - value: requestsettingData.autoExecute, - componentProps: { - inactiveValue: 'FALSE', - activeValue: 'TRUE', - disabled: true + { + label: '直接生成记录', + field: 'directCreateRecord', + dictType: DICT_TYPE.TRUE_FALSE, + dictClass: 'string', + isForm: false, + isTable: false, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: requestsettingData.directCreateRecord, + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE', + disabled: true + } } - } - }, - { - label: '直接生成记录', - field: 'directCreateRecord', - dictType: DICT_TYPE.TRUE_FALSE, - dictClass: 'string', - isForm: false, - isTable: false, - sort: 'custom', - table: { - width: 150 }, - form: { - component: 'Switch', - value: requestsettingData.directCreateRecord, - componentProps: { - inactiveValue: 'FALSE', - activeValue: 'TRUE', - disabled: true + { + label: '备注', + field: 'remark', + sort: 'custom', + table: { + width: 150 + }, + isTable: false + }, + { + label: '创建时间', + field: 'createTime', + formatter: dateFormatter, + detail: { + dateFormat: 'YYYY-MM-DD HH:mm:ss' + }, + sort: 'custom', + table: { + width: 180 + }, + isTable: true, + form: { + component: 'DatePicker', + componentProps: { + style: { width: '100%' }, + type: 'datetime', + dateFormat: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'x' + } + }, + isForm: false + }, + { + label: '创建者', + field: 'creator', + sort: 'custom', + table: { + width: 150 + }, + isTable: true, + isForm: false + }, + { + label: '最后更新时间', + field: 'updateTime', + formatter: dateFormatter, + detail: { + dateFormat: 'YYYY-MM-DD HH:mm:ss' + }, + sort: 'custom', + table: { + width: 180 + }, + isTable: false, + form: { + component: 'DatePicker', + componentProps: { + style: { width: '100%' }, + type: 'datetime', + dateFormat: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'x' + } + }, + isForm: false + }, + { + label: '最后更新者', + field: 'updater', + sort: 'custom', + table: { + width: 150 + }, + isTable: false, + isForm: false + }, + { + label: '操作', + field: 'action', + isDetail: false, + isForm: false, + table: { + width: 300, + fixed: 'right' } } - }, - { - label: '备注', - field: 'remark', - sort: 'custom', - table: { - width: 150 - }, - isTable: false, - }, - { - label: '创建时间', - field: 'createTime', - formatter: dateFormatter, - detail: { - dateFormat: 'YYYY-MM-DD HH:mm:ss' - }, - sort: 'custom', - table: { - width: 180 - }, - isTable: true, - form: { - component: 'DatePicker', - componentProps: { - style: {width:'100%'}, - type: 'datetime', - dateFormat: 'YYYY-MM-DD HH:mm:ss', - valueFormat: 'x', - } - }, - isForm: false, - }, - { - label: '创建者', - field: 'creator', - sort: 'custom', - table: { - width: 150 - }, - isTable: true, - isForm: false, - }, - { - label: '最后更新时间', - field: 'updateTime', - formatter: dateFormatter, - detail: { - dateFormat: 'YYYY-MM-DD HH:mm:ss' - }, - sort: 'custom', - table: { - width: 180 - }, - isTable: false, - form: { - component: 'DatePicker', - componentProps: { - style: {width:'100%'}, - type: 'datetime', - dateFormat: 'YYYY-MM-DD HH:mm:ss', - valueFormat: 'x', - } - }, - isForm: false, - }, - { - label: '最后更新者', - field: 'updater', - sort: 'custom', - table: { - width: 150 - }, - isTable: false, - isForm: false, - }, - { - label: '操作', - field: 'action', - isDetail: false, - isForm: false, - table: { - width: 300, - fixed: 'right' - }, - } -])) + ]) +) //表单校验 export const DeliverRequestMainRules = reactive({ @@ -731,11 +788,21 @@ export const DeliverRequestDetail = useCrudSchemas(reactive([ tableForm:{ multiple:true, isInpuFocusShow: true, // 开启查询弹窗 + isShowTableFormSearch: true, searchListPlaceholder: '请选择物料代码', searchField: 'itemCode', searchTitle: '客户物料基础信息', searchAllSchemas: Customeritem.allSchemas, searchPage: CustomerItemApi.getPageBusinessTypeToItemCode, + verificationPage: CustomerItemApi.getCustomerItemListByCodes, // 校验数去焦点输入是否正确的方法 + verificationParams: [{ + key: 'itemCode', + action: '==', + value: '', + isMainValue: false, + isSearch: true, + isFormModel: true, + }], // 失去焦点校验参数 }, form: { componentProps: { diff --git a/src/views/wms/deliversettlementManage/deliverplan/deliverPlanMain/deliverPlanMain.data.ts b/src/views/wms/deliversettlementManage/deliverplan/deliverPlanMain/deliverPlanMain.data.ts index 06e18de14..c1b0b4b1b 100644 --- a/src/views/wms/deliversettlementManage/deliverplan/deliverPlanMain/deliverPlanMain.data.ts +++ b/src/views/wms/deliversettlementManage/deliverplan/deliverPlanMain/deliverPlanMain.data.ts @@ -87,7 +87,15 @@ export const DeliverPlanMain = useCrudSchemas(reactive([ key: 'available', value: 'TRUE', isMainValue: false - }] + }], + verificationParams: [{ + key: 'code', + action: '==', + value: '', + isMainValue: false, + isSearch: true, + isFormModel: true, + }], // 失去焦点校验参数 } } }, @@ -119,6 +127,7 @@ export const DeliverPlanMain = useCrudSchemas(reactive([ // }, form: { componentProps: { + enterSearch: true, isSearchList: true, searchListPlaceholder: '请选择客户月台代码', searchField: 'code', @@ -133,7 +142,15 @@ export const DeliverPlanMain = useCrudSchemas(reactive([ key: 'customerCode', value: 'customerCode', isMainValue: true - }] + }], + verificationParams: [{ + key: 'code', + action: '==', + value: '', + isMainValue: false, + isSearch: true, + isFormModel: true, + }], // 失去焦点校验参数 } }, }, @@ -594,10 +611,21 @@ export const DeliverPlanDetail = useCrudSchemas(reactive([ multiple:true, // isInpuFocusShow: true, // 开启查询弹窗 searchListPlaceholder: '请选择物料代码', + disabled:true, searchField: 'itemCode', searchTitle: '客户物料基础信息', searchAllSchemas: Customeritem.allSchemas, searchPage: CustomerItemApi.getPageBusinessTypeToItemCode, + verificationPage: CustomerItemApi.getCustomerItemListByCodes, // 校验数去焦点输入是否正确的方法 + isShowTableFormSearch: true, + verificationParams: [{ + key: 'itemCode', + action: '==', + value: '', + isMainValue: false, + isSearch: true, + isFormModel: true, + }], // 失去焦点校验参数 }, form: { componentProps: { diff --git a/src/views/wms/deliversettlementManage/saleShipmentMainRecord/saleShipmentMainRecord.data.ts b/src/views/wms/deliversettlementManage/saleShipmentMainRecord/saleShipmentMainRecord.data.ts index 0b74c9c86..4023e9dba 100644 --- a/src/views/wms/deliversettlementManage/saleShipmentMainRecord/saleShipmentMainRecord.data.ts +++ b/src/views/wms/deliversettlementManage/saleShipmentMainRecord/saleShipmentMainRecord.data.ts @@ -139,15 +139,15 @@ export const SaleShipmentMainRecord = useCrudSchemas(reactive([ sort: 'custom', isTable:false }, - { - label: '操作', - field: 'action', - isForm: false, - table: { - width: 150, - fixed: 'right' - } - } + // { + // label: '操作', + // field: 'action', + // isForm: false, + // table: { + // width: 150, + // fixed: 'right' + // } + // } ])) // 表单校验 diff --git a/src/views/wms/deliversettlementManage/saleShipmentMainRequest/saleShipmentMain.data.ts b/src/views/wms/deliversettlementManage/saleShipmentMainRequest/saleShipmentMain.data.ts index 139f6b6f4..e88fe8756 100644 --- a/src/views/wms/deliversettlementManage/saleShipmentMainRequest/saleShipmentMain.data.ts +++ b/src/views/wms/deliversettlementManage/saleShipmentMainRequest/saleShipmentMain.data.ts @@ -73,7 +73,15 @@ export const SaleShipmentMain = useCrudSchemas(reactive([ key: 'available', value: 'TRUE', isMainValue: false - }] + }], + verificationParams: [{ + key: 'code', + action: '==', + value: '', + isMainValue: false, + isSearch: true, + isFormModel: true, + }], // 失去焦点校验参数 } } }, @@ -321,15 +329,11 @@ export const SaleShipmentDetail = useCrudSchemas(reactive([ table: { width: 200 }, - tableForm: { - type: 'Select', - disabled: true - }, form: { componentProps: { disabled: true } - } + }, }, { label: '销售订单行', diff --git a/src/views/wms/deliversettlementManage/stockup/stockupMainRequest/stockupMainRequest.data.ts b/src/views/wms/deliversettlementManage/stockup/stockupMainRequest/stockupMainRequest.data.ts index e40c37748..373e50f03 100644 --- a/src/views/wms/deliversettlementManage/stockup/stockupMainRequest/stockupMainRequest.data.ts +++ b/src/views/wms/deliversettlementManage/stockup/stockupMainRequest/stockupMainRequest.data.ts @@ -61,6 +61,7 @@ export const StockupMainRequest = useCrudSchemas(reactive([ form: { // labelMessage: '信息提示说明!!!', componentProps: { + enterSearch:true, isSearchList: true, // 开启查询弹窗 searchListPlaceholder: '请选择发货计划单号', // 输入框占位文本 searchField: 'number', // 查询弹窗赋值字段 @@ -76,7 +77,15 @@ export const StockupMainRequest = useCrudSchemas(reactive([ key: 'status', value: '6', isMainValue: false - }] + }], + verificationParams: [{ + key: 'number', + action: '==', + value: '', + isMainValue: false, + isSearch: true, + isFormModel: true, + }], // 失去焦点校验参数 } } }, @@ -650,7 +659,17 @@ export const StockupDetailRequest = useCrudSchemas(reactive([ key: 'available', value: 'TRUE', isMainValue: false - }] + }], + verificationPage: ItemBasicApi.getItemListByCodes, // 校验数去焦点输入是否正确的方法 + isShowTableFormSearch: true, + verificationParams: [{ + key: 'code', + action: '==', + value: '', + isMainValue: false, + isSearch: true, + isFormModel: true, + }], // 失去焦点校验参数 }, form: { componentProps: { @@ -664,7 +683,15 @@ export const StockupDetailRequest = useCrudSchemas(reactive([ key: 'available', value: 'TRUE', isMainValue: false - }] + }], + verificationParams: [{ + key: 'code', + action: '==', + value: '', + isMainValue: false, + isSearch: true, + isFormModel: true, + }], // 失去焦点校验参数 } } }, @@ -754,7 +781,8 @@ export const StockupDetailRequest = useCrudSchemas(reactive([ table: { width: 120 }, - tableForm:{ + tableForm: { + enterSearch:true, isInpuFocusShow: true, // 开启查询弹窗 searchListPlaceholder: '请选择库位代码', searchField: 'location', @@ -770,10 +798,19 @@ export const StockupDetailRequest = useCrudSchemas(reactive([ key: 'areaType', value: confgiDataOne.areaType, isMainValue: false - }] + }], + verificationParams: [{ + key: 'code', + action: '==', + value: '', + isMainValue: false, + isSearch: true, + isFormModel: true, + }], // 失去焦点校验参数 }, form: { componentProps: { + enterSearch: true, isSearchList: true, searchListPlaceholder: '请选择库位代码', searchField: 'location', @@ -789,7 +826,15 @@ export const StockupDetailRequest = useCrudSchemas(reactive([ key: 'areaType', value: confgiDataOne.areaType, isMainValue: false - }] + }], + verificationParams: [{ + key: 'code', + action: '==', + value: '', + isMainValue: false, + isSearch: true, + isFormModel: true, + }], // 失去焦点校验参数 } } }, diff --git a/src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRequestMain/unplannedreceiptRequestMain.data.ts b/src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRequestMain/unplannedreceiptRequestMain.data.ts index 96b8bc38c..f4bdae616 100644 --- a/src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRequestMain/unplannedreceiptRequestMain.data.ts +++ b/src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRequestMain/unplannedreceiptRequestMain.data.ts @@ -618,6 +618,7 @@ export const UnplannedreceiptRequestDetail = useCrudSchemas(reactive([ // isSearch: true, sortTableDefault:1100, isTableForm: false, + form: { + componentProps: { + disabled:true, + } + } }, // { diff --git a/src/views/wms/productionManage/processproduction/processproductionRequest/index.vue b/src/views/wms/productionManage/processproduction/processproductionRequest/index.vue index c6d753817..e4708e8f2 100644 --- a/src/views/wms/productionManage/processproduction/processproductionRequest/index.vue +++ b/src/views/wms/productionManage/processproduction/processproductionRequest/index.vue @@ -98,7 +98,7 @@ import * as defaultButtons from '@/utils/disposition/defaultButtons' import TableHead from '@/components/TableHead/src/TableHead.vue' import ImportForm from '@/components/ImportForm/src/ImportForm.vue' import Detail from '@/components/Detail/src/Detail.vue' -import * as BomApi from "@/api/wms/bom"; + defineOptions({ name: 'ProcessproductionRequestMain' }) @@ -119,20 +119,20 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => // if(tableData.value.find(item1=>item1['productionLine'] == item['productionLineCode'])) return const newRow = JSON.parse(JSON.stringify(tableFormKeys)) newRow['productionLine'] = item['productionLineCode'] - const param1 = { - productItemCode: formRef.formModel['itemCode'], - available: 'TRUE', - pageSize: 20, - pageNo: 1, - sort: '', - by: 'ASC', - } - await BomApi.getBomPage(param1).then(res => { - console.log(res) - if(res?.list?.length>0){ - newRow['componentItemCode'] = res.list[0].componentItemCode - } - }) + // const param1 = { + // productItemCode: formRef.formModel['itemCode'], + // available: 'TRUE', + // pageSize: 20, + // pageNo: 1, + // sort: '', + // by: 'ASC', + // } + // await BomApi.getBomPage(param1).then(res => { + // console.log(res) + // if(res?.list?.length>0){ + // newRow['componentItemCode'] = res.list[0].componentItemCode + // } + // }) tableData.value.push(newRow) }) }else if(formField === 'processCode'){ @@ -140,7 +140,11 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => }else if(formField === 'locationCode'){ row['locationCode']=val[0]['code'] }else if(formField === 'componentItemCode'){ - row['componentItemCode']=val[0]['componentItemCode'] + row['componentItemCode']=val[0]['itemCode'] + row['locationCode']=val[0]['locationCode'] + row['batch']=val[0]['batch'] + row['componentItemcodeQty']=val[0]['qty'] + row['effectiveDate']=val[0]['produceDate'] } else { row[formField] = val[0][searchField] } diff --git a/src/views/wms/productionManage/processproduction/processproductionRequest/processproductionRequestMain.data.ts b/src/views/wms/productionManage/processproduction/processproductionRequest/processproductionRequestMain.data.ts index 07cd13ca5..469b3e238 100644 --- a/src/views/wms/productionManage/processproduction/processproductionRequest/processproductionRequestMain.data.ts +++ b/src/views/wms/productionManage/processproduction/processproductionRequest/processproductionRequestMain.data.ts @@ -10,6 +10,10 @@ import * as LocationApi from '@/api/wms/location' import { Location } from '@/views/wms/basicDataManage/factoryModeling/location/location.data' import {Bom} from "@/views/wms/basicDataManage/itemManage/bom/bom.data"; import * as BomApi from "@/api/wms/bom"; +import * as BalanceApi from '@/api/wms/balance' +import * as ProcessproductionRequestMainApi from '@/api/wms/processproductionRequestMain' +import { Balance } from '@/views/wms/inventoryManage/balance/balance.data' + import { fa } from 'element-plus/es/locale' export const ProcessproductionRequestMain = useCrudSchemas(reactive([ @@ -64,7 +68,15 @@ export const ProcessproductionRequestMain = useCrudSchemas(reactive multiple: true, // isInpuFocusShow: true, isSearchList: true, // 开启查询弹窗 + disabled:true, searchListPlaceholder: '请选择物料代码', // 输入框占位文本 searchField: 'itemCode', // 查询弹窗赋值字段 searchTitle: '库存余额信息', // 查询弹窗标题 diff --git a/src/views/wms/productionManage/productreceiptscrap/productreceiptscrapRequestMain/index.vue b/src/views/wms/productionManage/productreceiptscrap/productreceiptscrapRequestMain/index.vue index a95bf54c1..664b1d5f9 100644 --- a/src/views/wms/productionManage/productreceiptscrap/productreceiptscrapRequestMain/index.vue +++ b/src/views/wms/productionManage/productreceiptscrap/productreceiptscrapRequestMain/index.vue @@ -686,7 +686,7 @@ const tableFormButton = async (val , row) => { bomModelVisible.value = true DialogTitle.value = '物料代码【' + row.itemCode + '】——Bom信息' detatableDataBom.params = { - masterId: row.masterId + masterId: row.id } await getDetailListBom() } diff --git a/src/views/wms/productionManage/productreceiptscrap/productreceiptscrapRequestMain/productreceiptscrapRequestMain.data.ts b/src/views/wms/productionManage/productreceiptscrap/productreceiptscrapRequestMain/productreceiptscrapRequestMain.data.ts index 2b914c87e..8ba578742 100644 --- a/src/views/wms/productionManage/productreceiptscrap/productreceiptscrapRequestMain/productreceiptscrapRequestMain.data.ts +++ b/src/views/wms/productionManage/productreceiptscrap/productreceiptscrapRequestMain/productreceiptscrapRequestMain.data.ts @@ -32,6 +32,9 @@ import { Supplieritem } from '@/views/wms/basicDataManage/supplierManage/supplie import { Itempackaging } from '@/views/wms/basicDataManage/itemManage/itempackage/itempackage.data' import * as ItemPackageApi from '@/api/wms/itempackage/index' +import {Location} from "@/views/wms/basicDataManage/factoryModeling/location/location.data"; +import * as LocationApi from "@/api/wms/location"; + const { t } = useI18n() // 国际化 // 获取自动提交自动通过自动执行,跳过任务直接删生成记录的默认值 @@ -975,6 +978,61 @@ export const ProductreceiptRequestDetail = useCrudSchemas(reactive width: 150 }, }, + { + label: '到库位代码', + field: 'toLocationCode', + sort: 'custom', + table: { + width: 150 + }, + tableForm: { + isInpuFocusShow: true, // 开启查询弹窗 + searchListPlaceholder: '请选择库位代码', + searchField: 'code', + searchTitle: '库位信息', + searchAllSchemas: Location.allSchemas, + searchPage: LocationApi.getLocationListByAreaAndBusinesstype, + searchCondition: [{ + key: 'available', + value: 'TRUE', + isMainValue: false + }, + { + key: 'businessType', + value: 'ProductReceiptScrap', + isMainValue: false + },{ + key: 'isIn', + value: 'in', + isMainValue: false + }] + }, + form: { + // labelMessage: '信息提示说明!!!!', + componentProps: { + isSearchList: true, // 开启查询弹窗 + searchListPlaceholder: '请选择库位代码', // 输入框占位文本 + searchField: 'code', // 查询弹窗赋值字段 + searchTitle: '库位信息', // 查询弹窗标题 + searchAllSchemas: Location.allSchemas, // 查询弹窗所需类 + searchPage: LocationApi.getLocationListByAreaAndBusinesstype, // 查询弹窗所需分页方法 + searchCondition: [{ + key: 'available', + value: 'TRUE', + isMainValue: false + }, + { + key: 'businessType', + value: 'ProductReceiptScrap', + isMainValue: false + },{ + key: 'isIn', + value: 'in', + isMainValue: false + }] + } + } + }, { label: '物料名称', field: 'itemName', diff --git a/src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnJobMain/purchasereturnJobMain.data.ts b/src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnJobMain/purchasereturnJobMain.data.ts index 253c42c5a..1fc7c1d07 100644 --- a/src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnJobMain/purchasereturnJobMain.data.ts +++ b/src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnJobMain/purchasereturnJobMain.data.ts @@ -653,26 +653,6 @@ export const PurchasereturnJobMainRules = reactive({ * @returns {Array} 采购退货任务子表 */ export const PurchasereturnJobDetail = useCrudSchemas(reactive([ - { - label: '从货主代码', - field: 'fromOwnerCode', - sort: 'custom', - table: { - width: 150 - }, - sortTableDefault: 17, - hiddenInMain:true, - }, - { - label: '到货主代码', - field: 'toOwnerCode', - sort: 'custom', - table: { - width: 150 - }, - sortTableDefault: 17, - hiddenInMain:true, - }, { label: '包装号', field: 'packingNumber', @@ -758,17 +738,36 @@ export const PurchasereturnJobDetail = useCrudSchemas(reactive([ sortTableDefault: 15, hiddenInMain:true, }, + // { + // label: '到库位代码', + // field: 'toLocationCode', + // sort: 'custom', + // table: { + // width: 150 + // }, + // sortTableDefault: 15, + // hiddenInMain:true, + // }, { - label: '到库位代码', - field: 'toLocationCode', + label: '从货主代码', + field: 'fromOwnerCode', sort: 'custom', table: { width: 150 }, - sortTableDefault: 15, + sortTableDefault: 16, + hiddenInMain:true, + }, + { + label: '到货主代码', + field: 'toOwnerCode', + sort: 'custom', + table: { + width: 150 + }, + sortTableDefault: 16, hiddenInMain:true, }, - { label: '订单号', field: 'poNumber', diff --git a/src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRecordMain/purchasereturnRecordMain.data.ts b/src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRecordMain/purchasereturnRecordMain.data.ts index c31afc702..ef0a33ad3 100644 --- a/src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRecordMain/purchasereturnRecordMain.data.ts +++ b/src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRecordMain/purchasereturnRecordMain.data.ts @@ -569,16 +569,16 @@ export const PurchasereturnRecordDetail = useCrudSchemas(reactive( sortTableDefault: 1009, hiddenInMain: true }, - { - label: '到库位代码', - field: 'toLocationCode', - sort: 'custom', - table: { - width: 150 - }, - sortTableDefault: 1009, - hiddenInMain: true - }, + // { + // label: '到库位代码', + // field: 'toLocationCode', + // sort: 'custom', + // table: { + // width: 150 + // }, + // sortTableDefault: 1009, + // hiddenInMain: true + // }, { label: '从库位组代码', field: 'fromLocationGroupCode', @@ -589,16 +589,16 @@ export const PurchasereturnRecordDetail = useCrudSchemas(reactive( sortTableDefault: 1010, hiddenInMain: true }, - { - label: '到库位组代码', - field: 'toLocationGroupCode', - sort: 'custom', - table: { - width: 150 - }, - sortTableDefault: 1010, - hiddenInMain: true - }, + // { + // label: '到库位组代码', + // field: 'toLocationGroupCode', + // sort: 'custom', + // table: { + // width: 150 + // }, + // sortTableDefault: 1010, + // hiddenInMain: true + // }, { label: '从库区代码', field: 'fromAreaCode', @@ -609,16 +609,16 @@ export const PurchasereturnRecordDetail = useCrudSchemas(reactive( sortTableDefault: 1010, hiddenInMain: true }, - { - label: '到库区代码', - field: 'toAreaCode', - sort: 'custom', - table: { - width: 150 - }, - sortTableDefault: 1010, - hiddenInMain: true - }, + // { + // label: '到库区代码', + // field: 'toAreaCode', + // sort: 'custom', + // table: { + // width: 150 + // }, + // sortTableDefault: 1010, + // hiddenInMain: true + // }, { label: '从货主代码', field: 'fromOwnerCode', @@ -663,7 +663,7 @@ export const PurchasereturnRecordDetail = useCrudSchemas(reactive( }, { label: '订单行', - field: 'poline', + field: 'poLine', sort: 'custom', table: { width: 150 diff --git a/src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRequestMain/purchasereturnRequestMain.data.ts b/src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRequestMain/purchasereturnRequestMain.data.ts index d46fac093..cf443b66b 100644 --- a/src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRequestMain/purchasereturnRequestMain.data.ts +++ b/src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRequestMain/purchasereturnRequestMain.data.ts @@ -112,25 +112,25 @@ export const PurchasereceiptRecordMain1 = useCrudSchemas(reactive( width: 150 }, }, - { - label: '包装规格', - field: 'packUnit', - dictClass: 'string', - isTable: true, - sort: 'custom', - table: { - width: 150 - }, - }, - { - label: '从库位代码2', - field: 'fromLocationCode', - sort: 'custom', - table: { - width: 150 - }, - - }, + // { + // label: '包装规格', + // field: 'packUnit', + // dictClass: 'string', + // isTable: true, + // sort: 'custom', + // table: { + // width: 150 + // }, + // }, + // { + // label: '从库位代码', + // field: 'fromLocationCode', + // sort: 'custom', + // table: { + // width: 150 + // }, + // + // }, { label: '到库位代码', field: 'toLocationCode', diff --git a/src/views/wms/purchasereceiptManage/supplierdeliver/purchaseMain/index.vue b/src/views/wms/purchasereceiptManage/supplierdeliver/purchaseMain/index.vue index a4eb14d17..0350efbf0 100644 --- a/src/views/wms/purchasereceiptManage/supplierdeliver/purchaseMain/index.vue +++ b/src/views/wms/purchasereceiptManage/supplierdeliver/purchaseMain/index.vue @@ -356,7 +356,7 @@ console.log('PurchaseMain.allSchemas.searchSchema',PurchaseMain.allSchemas.searc } }) } - detailRef.value.openDetail(row, titleName, titleValue,'orderPurchaseMain') + detailRef.value.openDetail(row, titleName, titleValue,'order_purchase_main') } /** 删除按钮操作 */ diff --git a/src/views/wms/purchasereceiptManage/supplierdeliver/purchaseMain/purchaseMain.data.ts b/src/views/wms/purchasereceiptManage/supplierdeliver/purchaseMain/purchaseMain.data.ts index 53b585e74..42551cc5c 100644 --- a/src/views/wms/purchasereceiptManage/supplierdeliver/purchaseMain/purchaseMain.data.ts +++ b/src/views/wms/purchasereceiptManage/supplierdeliver/purchaseMain/purchaseMain.data.ts @@ -421,6 +421,7 @@ export const PurchaseDetail = useCrudSchemas(reactive([ multiple:true,//多选 isInpuFocusShow: true, searchListPlaceholder: '请选择供应商物料', + isShowTableFormSearch: true, searchField: 'itemCode', searchTitle: '供应商物料信息', searchAllSchemas: Supplieritem.allSchemas, diff --git a/src/views/wms/supplierManage/supplierApbalance/supplierApbalanceDetail/supplierApbalanceDetail.data.ts b/src/views/wms/supplierManage/supplierApbalance/supplierApbalanceDetail/supplierApbalanceDetail.data.ts index 6db5af625..5f870287d 100644 --- a/src/views/wms/supplierManage/supplierApbalance/supplierApbalanceDetail/supplierApbalanceDetail.data.ts +++ b/src/views/wms/supplierManage/supplierApbalance/supplierApbalanceDetail/supplierApbalanceDetail.data.ts @@ -60,12 +60,12 @@ export const SupplierApbalanceDetail = useCrudSchemas(reactive([ sort: 'custom', isSearch: true, }, - { - label: '完整凭证号', - field: 'ttInvoiceno', - sort: 'custom', - isSearch: true, - }, + // { + // label: '完整凭证号', + // field: 'ttInvoiceno', + // sort: 'custom', + // isSearch: true, + // }, { label: '发票TC原始金额', field: 'ttTcAmt', diff --git a/src/views/wms/supplierManage/supplierApbalance/supplierApbalanceMain/index.vue b/src/views/wms/supplierManage/supplierApbalance/supplierApbalanceMain/index.vue index 42b27103a..c96faf99f 100644 --- a/src/views/wms/supplierManage/supplierApbalance/supplierApbalanceMain/index.vue +++ b/src/views/wms/supplierManage/supplierApbalance/supplierApbalanceMain/index.vue @@ -28,7 +28,7 @@ v-model:sort="tableObject.sort" > @@ -61,10 +61,22 @@ :detailButtonIsShowAdd=false :detailButtonIsShowEdit=false :detailButtonIsShowDelete=false - /> + :slotDetailTabList="[ + { + label: '回调函明细', + prop: 'adjustment' + } + ]" + > + + + +