diff --git a/.env.wyf b/.env.wyf index ee1d6eb3a..4c5de71c6 100644 --- a/.env.wyf +++ b/.env.wyf @@ -4,9 +4,9 @@ NODE_ENV=test VITE_DEV=false # 请求路径 -VITE_BASE_URL='http://192.168.0.108:12080' +VITE_BASE_URL='http://192.168.0.113:12080' # 上传路径 -VITE_UPLOAD_URL='http://192.168.0.108:12080/admin-api/infra/file/upload' +VITE_UPLOAD_URL='http://192.168.0.113:12080/admin-api/infra/file/upload' # # 请求路径 # VITE_BASE_URL='http://dev.ccwin-in.com:25300/api' diff --git a/README.md b/README.md index 4efd818f0..9ddf0ac73 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -## dev发布2024-05-13-002 +## dev发布2024-05-15-002 **xxxx.data.ts 文件配置说明** **form表单查询弹窗配置** form: { @@ -48,9 +48,47 @@ tableForm:{ }] }, -// 主子合并隐藏子 -hiddenInMain:true -// 主子排序 不配置默认999,不要设置0(留给左侧固定列使用) -sortTableDefault: -// 查询条件排序 -sortSearchDefault: + + +**主子表合并需要修改的代码** +1、影响Table表头 +const tableColumns = +ref([…”PurchaseMain”.allSchemas.tableColumns,…”PurchaseDetail”.allSchemas.tableMainColumns]) + +PurchaseMain:主表 +PurchaseDetail:子表 + +2、影响搜索头部 +在TableHead标签内部添加属性: + + +3、影响操作按钮 +3.1 修改 { + const findIndex = row['masterId']?tableObject.tableList.findIndex(item=>item['masterId'] == row['masterId']):-1 + if(findIndex>0&&findIndex<$index){ + return [] + } +…下面是原有的按钮逻辑,不变 +} + +4、更换子表的请求接口 +const { tableObject, tableMethods } = useTable({ + getListApi: “PurchasereceiptRequestDetailApi.getPurchasereceiptRequestDetailPage”// 分页接口 +}) + +5、ts文件配置: +hiddenInMain:true, //子表中数据不展示在主表 +sortTableDefault:1000, // 主页面中Table表中展示的排序位置:默认值999 ,最小值1,值越大越靠后,值越小越靠前 +sortSearchDefault:1000,// 搜素框中展示的排序位置,用法同sortTableDefault diff --git a/src/api/eam/basicFaultCause/index.ts b/src/api/eam/basicFaultCause/index.ts new file mode 100644 index 000000000..391442089 --- /dev/null +++ b/src/api/eam/basicFaultCause/index.ts @@ -0,0 +1,57 @@ +import request from '@/config/axios' + +export interface BasicFaultCauseVO { + id: number + parentId: number + code: string + name: string + describing: string + departmentCode: string + remark: string + siteId: string + available: string + deletionTime: Date + deleterId: byte[] + concurrencyStamp: number +} + +// 查询故障原因列表 +export const getBasicFaultCausePage = async (params) => { + if (params.isSearch) { + delete params.isSearch + const data = {...params} + return await request.post({ url: '/eam/basic-fault-cause/senior', data }) + } else { + return await request.get({ url: `/eam/basic-fault-cause/page`, params }) + } +} + +// 查询故障原因详情 +export const getBasicFaultCause = async (id: number) => { + return await request.get({ url: `/eam/basic-fault-cause/get?id=` + id }) +} + +// 新增故障原因 +export const createBasicFaultCause = async (data: BasicFaultCauseVO) => { + return await request.post({ url: `/eam/basic-fault-cause/create`, data }) +} + +// 修改故障原因 +export const updateBasicFaultCause = async (data: BasicFaultCauseVO) => { + return await request.put({ url: `/eam/basic-fault-cause/update`, data }) +} + +// 删除故障原因 +export const deleteBasicFaultCause = async (id: number) => { + return await request.delete({ url: `/eam/basic-fault-cause/delete?id=` + id }) +} + +// 导出故障原因 Excel +export const exportBasicFaultCause = async (params) => { + return await request.download({ url: `/eam/basic-fault-cause/export-excel`, params }) +} + +// 下载用户导入模板 +export const importTemplate = () => { + return request.download({ url: '/eam/basic-fault-cause/get-import-template' }) +} \ No newline at end of file diff --git a/src/api/eam/basicFaultType/index.ts b/src/api/eam/basicFaultType/index.ts new file mode 100644 index 000000000..727094608 --- /dev/null +++ b/src/api/eam/basicFaultType/index.ts @@ -0,0 +1,56 @@ +import request from '@/config/axios' + +export interface BasicFaultTypeVO { + id: number + code: string + name: string + describing: string + departmentCode: string + remark: string + siteId: string + available: string + deletionTime: Date + deleterId: byte[] + concurrencyStamp: number +} + +// 查询故障类型列表 +export const getBasicFaultTypePage = async (params) => { + if (params.isSearch) { + delete params.isSearch + const data = {...params} + return await request.post({ url: '/eam/basic-fault-type/senior', data }) + } else { + return await request.get({ url: `/eam/basic-fault-type/page`, params }) + } +} + +// 查询故障类型详情 +export const getBasicFaultType = async (id: number) => { + return await request.get({ url: `/eam/basic-fault-type/get?id=` + id }) +} + +// 新增故障类型 +export const createBasicFaultType = async (data: BasicFaultTypeVO) => { + return await request.post({ url: `/eam/basic-fault-type/create`, data }) +} + +// 修改故障类型 +export const updateBasicFaultType = async (data: BasicFaultTypeVO) => { + return await request.put({ url: `/eam/basic-fault-type/update`, data }) +} + +// 删除故障类型 +export const deleteBasicFaultType = async (id: number) => { + return await request.delete({ url: `/eam/basic-fault-type/delete?id=` + id }) +} + +// 导出故障类型 Excel +export const exportBasicFaultType = async (params) => { + return await request.download({ url: `/eam/basic-fault-type/export-excel`, params }) +} + +// 下载用户导入模板 +export const importTemplate = () => { + return request.download({ url: '/eam/basic-fault-type/get-import-template' }) +} \ No newline at end of file diff --git a/src/api/eam/documentType/index.ts b/src/api/eam/documentType/index.ts new file mode 100644 index 000000000..4d73e1d21 --- /dev/null +++ b/src/api/eam/documentType/index.ts @@ -0,0 +1,56 @@ +import request from '@/config/axios' + +export interface DocumentTypeVO { + id: number + code: string + name: string + type: string + departmentCode: string + remark: string + siteId: string + available: string + deletionTime: Date + deleterId: byte[] + concurrencyStamp: number +} + +// 查询文档类型列表 +export const getDocumentTypePage = async (params) => { + if (params.isSearch) { + delete params.isSearch + const data = {...params} + return await request.post({ url: '/eam/document-type/senior', data }) + } else { + return await request.get({ url: `/eam/document-type/page`, params }) + } +} + +// 查询文档类型详情 +export const getDocumentType = async (id: number) => { + return await request.get({ url: `/eam/document-type/get?id=` + id }) +} + +// 新增文档类型 +export const createDocumentType = async (data: DocumentTypeVO) => { + return await request.post({ url: `/eam/document-type/create`, data }) +} + +// 修改文档类型 +export const updateDocumentType = async (data: DocumentTypeVO) => { + return await request.put({ url: `/eam/document-type/update`, data }) +} + +// 删除文档类型 +export const deleteDocumentType = async (id: number) => { + return await request.delete({ url: `/eam/document-type/delete?id=` + id }) +} + +// 导出文档类型 Excel +export const exportDocumentType = async (params) => { + return await request.download({ url: `/eam/document-type/export-excel`, params }) +} + +// 下载用户导入模板 +export const importTemplate = () => { + return request.download({ url: '/eam/document-type/get-import-template' }) +} \ No newline at end of file diff --git a/src/api/eam/equipmentMainPart/index.ts b/src/api/eam/equipmentMainPart/index.ts new file mode 100644 index 000000000..482c17209 --- /dev/null +++ b/src/api/eam/equipmentMainPart/index.ts @@ -0,0 +1,56 @@ +import request from '@/config/axios' + +export interface EquipmentMainPartVO { + id: number + name: string + code: string + type: string + departmentCode: string + remark: string + siteId: string + available: string + deletionTime: Date + deleterId: byte[] + concurrencyStamp: number +} + +// 查询主要部件列表 +export const getEquipmentMainPartPage = async (params) => { + if (params.isSearch) { + delete params.isSearch + const data = {...params} + return await request.post({ url: '/eam/equipment-main-part/senior', data }) + } else { + return await request.get({ url: `/eam/equipment-main-part/page`, params }) + } +} + +// 查询主要部件详情 +export const getEquipmentMainPart = async (id: number) => { + return await request.get({ url: `/eam/equipment-main-part/get?id=` + id }) +} + +// 新增主要部件 +export const createEquipmentMainPart = async (data: EquipmentMainPartVO) => { + return await request.post({ url: `/eam/equipment-main-part/create`, data }) +} + +// 修改主要部件 +export const updateEquipmentMainPart = async (data: EquipmentMainPartVO) => { + return await request.put({ url: `/eam/equipment-main-part/update`, data }) +} + +// 删除主要部件 +export const deleteEquipmentMainPart = async (id: number) => { + return await request.delete({ url: `/eam/equipment-main-part/delete?id=` + id }) +} + +// 导出主要部件 Excel +export const exportEquipmentMainPart = async (params) => { + return await request.download({ url: `/eam/equipment-main-part/export-excel`, params }) +} + +// 下载用户导入模板 +export const importTemplate = () => { + return request.download({ url: '/eam/equipment-main-part/get-import-template' }) +} \ No newline at end of file diff --git a/src/api/infra/config/index.ts b/src/api/infra/config/index.ts index 8942cde25..d9b00314b 100644 --- a/src/api/infra/config/index.ts +++ b/src/api/infra/config/index.ts @@ -13,6 +13,7 @@ export interface ConfigVO { visible: boolean remark: string createTime: Date + locoationCode: string } // 查询参数列表 diff --git a/src/api/mes/workScheduling/index.ts b/src/api/mes/workScheduling/index.ts index 7df13e502..f6f118c7a 100644 --- a/src/api/mes/workScheduling/index.ts +++ b/src/api/mes/workScheduling/index.ts @@ -52,10 +52,14 @@ export const importTemplate = () => { export const completeHandle = async (data) => { return await request.post({ url: `/mes/workScheduling/completeHandle`, data }) } -//报工 +//工序报工 export const reportWorkByProcess = async (data) => { return await request.post({ url: `/mes/work-scheduling-detail/reportWorkByProcess`, data }) } +//批量报工 +export const reportWorkByTask = async (data) => { + return await request.post({ url: `/mes/workScheduling/reportForAll`, data }) +} //检查当前节点是否可以完工 export const getNodePosition = async (params) => { return await request.get({ url: `/mes/workScheduling/getNodePosition`, params }) @@ -68,5 +72,9 @@ export const getCurrentWorkerList = async (params) => { export const getProcessList = async (params) => { return await request.get({ url: `/mes/workScheduling/getProcessList`, params }) } +//工序质检 +export const processQualified = async (data) => { + return await request.post({ url: `/mes/work-scheduling-detail/processQualified`, data }) +} diff --git a/src/api/mes/workSchedulingDetail/index.ts b/src/api/mes/workSchedulingDetail/index.ts index f39e63513..122291bcc 100644 --- a/src/api/mes/workSchedulingDetail/index.ts +++ b/src/api/mes/workSchedulingDetail/index.ts @@ -63,3 +63,7 @@ export const exportWorkSchedulingDetail = async (params) => { export const importTemplate = () => { return request.download({ url: '/mes/work-scheduling-detail/get-import-template' }) } +//工序报工 +export const reportWorkByProcess = async (data) => { + return await request.post({ url: `/mes/work-scheduling-detail/reportWorkByProcess`, data }) +} \ No newline at end of file diff --git a/src/api/wms/balance/index.ts b/src/api/wms/balance/index.ts index 4b21cda4d..15189a33d 100644 --- a/src/api/wms/balance/index.ts +++ b/src/api/wms/balance/index.ts @@ -150,3 +150,14 @@ export const selectLocationTypeToBalance = async (params) => { return request.get({ url: '/wms/balance/pageLocationCodeToBalance', params}) } } + +// 获得配置筛选出的库存余额分页 +export const selectConfigToBalance = async (params) => { + if (params.isSearch) { + delete params.isSearch + const data = {...params} + return await request.post({ url: '/wms/balance/pageConfigToBalanceSenior', data }) + } else { + return request.get({ url: '/wms/balance/pageConfigToBalance', params}) + } +} diff --git a/src/api/wms/containerDetailRequest/index.ts b/src/api/wms/containerDetailRequest/index.ts new file mode 100644 index 000000000..43ec7211f --- /dev/null +++ b/src/api/wms/containerDetailRequest/index.ts @@ -0,0 +1,60 @@ +import request from '@/config/axios' + +export interface ContainerDetailRequestVO { + id: number + masterId: number + number: string + containerNumber: string + fromLocationCode: string + toLocationCode: string + qty: number + uom: string + remark: string + siteId: string + concurrencyStamp: number + fromOwnerCode: string + toOwnerCode: string +} + +// 查询器具管理申请子列表 +export const getContainerDetailRequestPage = async (params) => { + console.log(params); + + if (params.isSearch) { + delete params.isSearch + const data = {...params} + return await request.post({ url: '/wms/container-detail-request/senior', data }) + } else { + return await request.get({ url: `/wms/container-detail-request/page`, params }) + } +} + +// 查询器具管理申请子详情 +export const getContainerDetailRequest = async (id: number) => { + return await request.get({ url: `/wms/container-detail-request/get?id=` + id }) +} + +// 新增器具管理申请子 +export const createContainerDetailRequest = async (data: ContainerDetailRequestVO) => { + return await request.post({ url: `/wms/container-detail-request/create`, data }) +} + +// 修改器具管理申请子 +export const updateContainerDetailRequest = async (data: ContainerDetailRequestVO) => { + return await request.put({ url: `/wms/container-detail-request/update`, data }) +} + +// 删除器具管理申请子 +export const deleteContainerDetailRequest = async (id: number) => { + return await request.delete({ url: `/wms/container-detail-request/delete?id=` + id }) +} + +// 导出器具管理申请子 Excel +export const exportContainerDetailRequest = async (params) => { + return await request.download({ url: `/wms/container-detail-request/export-excel`, params }) +} + +// 下载用户导入模板 +export const importTemplate = () => { + return request.download({ url: '/wms/container-detail-request/get-import-template' }) +} \ No newline at end of file diff --git a/src/api/wms/containerMainRequest/index.ts b/src/api/wms/containerMainRequest/index.ts new file mode 100644 index 000000000..35e7a9f8d --- /dev/null +++ b/src/api/wms/containerMainRequest/index.ts @@ -0,0 +1,82 @@ +import request from '@/config/axios' + +export interface ContainerMainRequestVO { + id: number + type: string + available: string + remark: string + extraProperties: string + concurrencyStamp: number + siteId: string +} + +// 查询器具管理申请主列表 +export const getContainerMainRequestPage = async (params) => { + if (params.isSearch) { + delete params.isSearch + const data = {...params} + return await request.post({ url: '/wms/container-main-request/senior', data }) + } else { + return await request.get({ url: `/wms/container-main-request/page`, params }) + } +} + +// 查询器具管理申请主详情 +export const getContainerMainRequest = async (id: number) => { + return await request.get({ url: `/wms/container-main-request/get?id=` + id }) +} + +// 新增器具管理申请主 +export const createContainerMainRequest = async (data: ContainerMainRequestVO) => { + return await request.post({ url: `/wms/container-main-request/create`, data }) +} + +// 修改器具管理申请主 +export const updateContainerMainRequest = async (data: ContainerMainRequestVO) => { + return await request.put({ url: `/wms/container-main-request/update`, data }) +} + +// 删除器具管理申请主 +export const deleteContainerMainRequest = async (id: number) => { + return await request.delete({ url: `/wms/container-main-request/delete?id=` + id }) +} + +// 导出器具管理申请主 Excel +export const exportContainerMainRequest = async (params) => { + return await request.download({ url: `/wms/container-main-request/export-excel`, params }) +} + +// 下载用户导入模板 +export const importTemplate = () => { + return request.download({ url: '/wms/container-main-request/get-import-template' }) +} + +// 关闭 +export const close = (id) => { + return request.put({ url: '/wms/container-main-request/close?id=' + id }) +} + +// 重新添加 +export const reAdd = (id) => { + return request.put({ url: '/wms/container-main-request/reAdd?id=' + id }) +} + +// 提交审批 +export const submit = (id) => { + return request.put({ url: '/wms/container-main-request/submit?id=' + id }) +} + +// 驳回 +export const refused = (id) => { + return request.put({ url: '/wms/container-main-request/refused?id=' + id }) +} + +// 审批通过 +export const agree = (id) => { + return request.put({ url: '/wms/container-main-request/agree?id=' + id }) +} + +// 处理 +export const handle = (id) => { + return request.put({ url: '/wms/container-main-request/handle?id=' + id }) +} \ No newline at end of file diff --git a/src/api/wms/containerRecordDetail/index.ts b/src/api/wms/containerRecordDetail/index.ts new file mode 100644 index 000000000..e8993f74e --- /dev/null +++ b/src/api/wms/containerRecordDetail/index.ts @@ -0,0 +1,58 @@ +import request from '@/config/axios' + +export interface ContainerRecordDetailVO { + id: number + masterId: number + number: string + containerNumber: string + fromLocationCode: string + toLocationCode: string + qty: number + uom: string + remark: string + siteId: string + concurrencyStamp: number + fromOwnerCode: string + toOwnerCode: string +} + +// 查询器具管理记录子列表 +export const getContainerRecordDetailPage = async (params) => { + if (params.isSearch) { + delete params.isSearch + const data = {...params} + return await request.post({ url: '/wms/container-record-detail/senior', data }) + } else { + return await request.get({ url: `/wms/container-record-detail/page`, params }) + } +} + +// 查询器具管理记录子详情 +export const getContainerRecordDetail = async (id: number) => { + return await request.get({ url: `/wms/container-record-detail/get?id=` + id }) +} + +// 新增器具管理记录子 +export const createContainerRecordDetail = async (data: ContainerRecordDetailVO) => { + return await request.post({ url: `/wms/container-record-detail/create`, data }) +} + +// 修改器具管理记录子 +export const updateContainerRecordDetail = async (data: ContainerRecordDetailVO) => { + return await request.put({ url: `/wms/container-record-detail/update`, data }) +} + +// 删除器具管理记录子 +export const deleteContainerRecordDetail = async (id: number) => { + return await request.delete({ url: `/wms/container-record-detail/delete?id=` + id }) +} + +// 导出器具管理记录子 Excel +export const exportContainerRecordDetail = async (params) => { + return await request.download({ url: `/wms/container-record-detail/export-excel`, params }) +} + +// 下载用户导入模板 +export const importTemplate = () => { + return request.download({ url: '/wms/container-record-detail/get-import-template' }) +} \ No newline at end of file diff --git a/src/api/wms/containerRecordMain/index.ts b/src/api/wms/containerRecordMain/index.ts new file mode 100644 index 000000000..ea84c1260 --- /dev/null +++ b/src/api/wms/containerRecordMain/index.ts @@ -0,0 +1,56 @@ +import request from '@/config/axios' + +export interface ContainerRecordMainVO { + id: number + type: string + number: string + requestNumber: string + status: string + available: string + remark: string + extraProperties: string + concurrencyStamp: number + siteId: string + departmentCode: string +} + +// 查询器具管理记录主列表 +export const getContainerRecordMainPage = async (params) => { + if (params.isSearch) { + delete params.isSearch + const data = {...params} + return await request.post({ url: '/wms/container-record-main/senior', data }) + } else { + return await request.get({ url: `/wms/container-record-main/page`, params }) + } +} + +// 查询器具管理记录主详情 +export const getContainerRecordMain = async (id: number) => { + return await request.get({ url: `/wms/container-record-main/get?id=` + id }) +} + +// 新增器具管理记录主 +export const createContainerRecordMain = async (data: ContainerRecordMainVO) => { + return await request.post({ url: `/wms/container-record-main/create`, data }) +} + +// 修改器具管理记录主 +export const updateContainerRecordMain = async (data: ContainerRecordMainVO) => { + return await request.put({ url: `/wms/container-record-main/update`, data }) +} + +// 删除器具管理记录主 +export const deleteContainerRecordMain = async (id: number) => { + return await request.delete({ url: `/wms/container-record-main/delete?id=` + id }) +} + +// 导出器具管理记录主 Excel +export const exportContainerRecordMain = async (params) => { + return await request.download({ url: `/wms/container-record-main/export-excel`, params }) +} + +// 下载用户导入模板 +export const importTemplate = () => { + return request.download({ url: '/wms/container-record-main/get-import-template' }) +} \ No newline at end of file diff --git a/src/api/wms/customerDeliveryForecast/index.ts b/src/api/wms/customerDeliveryForecast/index.ts new file mode 100644 index 000000000..65322ff1d --- /dev/null +++ b/src/api/wms/customerDeliveryForecast/index.ts @@ -0,0 +1,63 @@ +import request from '@/config/axios' + +export interface CustomerDeliveryForecastVO { + schdSite: string + schdOrder: string + schdLine: string + schdCust: string + schdShipto: string + schdDock: string + schdPart: string + schdNetReq: string + schdDate: Date + schdTime: Date + schdReference: string + schdOrdMult: string + schdCustpart: string + schdPkgCode: string + schdModelyr: string + schdCustref: string + schdPcrQty: string + available: string +} + +// 查询客户发货预测列表 +export const getCustomerDeliveryForecastPage = async (params) => { + if (params.isSearch) { + delete params.isSearch + const data = {...params} + return await request.post({ url: '/wms/customer-delivery-forecast/senior', data }) + } else { + return await request.get({ url: `/wms/customer-delivery-forecast/page`, params }) + } +} + +// 查询客户发货预测详情 +export const getCustomerDeliveryForecast = async (id: number) => { + return await request.get({ url: `/wms/customer-delivery-forecast/get?id=` + id }) +} + +// 新增客户发货预测 +export const createCustomerDeliveryForecast = async (data: CustomerDeliveryForecastVO) => { + return await request.post({ url: `/wms/customer-delivery-forecast/create`, data }) +} + +// 修改客户发货预测 +export const updateCustomerDeliveryForecast = async (data: CustomerDeliveryForecastVO) => { + return await request.put({ url: `/wms/customer-delivery-forecast/update`, data }) +} + +// 删除客户发货预测 +export const deleteCustomerDeliveryForecast = async (id: number) => { + return await request.delete({ url: `/wms/customer-delivery-forecast/delete?id=` + id }) +} + +// 导出客户发货预测 Excel +export const exportCustomerDeliveryForecast = async (params) => { + return await request.download({ url: `/wms/customer-delivery-forecast/export-excel`, params }) +} + +// 下载用户导入模板 +export const importTemplate = () => { + return request.download({ url: '/wms/customer-delivery-forecast/get-import-template' }) +} diff --git a/src/api/wms/itembasic/index.ts b/src/api/wms/itembasic/index.ts index 20f58f85c..a92781ac3 100644 --- a/src/api/wms/itembasic/index.ts +++ b/src/api/wms/itembasic/index.ts @@ -98,4 +98,14 @@ export const selectTypeToItembasic = async (params) => { } else { return await request.get({ url: `/wms/itembasic/pageTypeToItembasic`, params }) } +} + +// 查询物料类型为器具的信息列表 +export const selectConfigToItembasic = async (params) => { + if (params.isSearch) { + const data = {...params} + return request.post({ url: '/wms/itembasic/pageConfigToItembasicSenior', data }) + } else { + return await request.get({ url: `/wms/itembasic/pageConfigToItembasic`, params }) + } } \ No newline at end of file diff --git a/src/api/wms/location/index.ts b/src/api/wms/location/index.ts index 4d7182995..183224ff5 100644 --- a/src/api/wms/location/index.ts +++ b/src/api/wms/location/index.ts @@ -86,12 +86,12 @@ export const selectBusinessTypeToLocation = async (params) => { } -export const selectConfigToLocation = async (params) => { +export const selectPageItemAreaToLocation = async (params) => { if (params.isSearch) { delete params.isSearch const data = {...params} - return await request.post({ url: '/wms/location/pageConfigToLocationSenior', data }) + return await request.post({ url: '/wms/location/pageItemAreaToLocationSenior', data }) } else { - return request.get({ url: `/wms/location/pageConfigToLocation`, params }) + return request.get({ url: `/wms/location/pageItemAreaToLocation`, params }) } } \ No newline at end of file diff --git a/src/api/wms/productionreturnRequestDetail/index.ts b/src/api/wms/productionreturnRequestDetail/index.ts index 0b7bdd7c6..c47890e71 100644 --- a/src/api/wms/productionreturnRequestDetail/index.ts +++ b/src/api/wms/productionreturnRequestDetail/index.ts @@ -27,6 +27,7 @@ export interface ProductionreturnRequestDetailVO { // 查询生产退料申请子列表 export const getProductionreturnRequestDetailPage = async (params) => { + params.businessType = 'ReturnToStore' if (params.isSearch) { delete params.isSearch const data = {...params} diff --git a/src/api/wms/productionreturnRequestDetailNo/index.ts b/src/api/wms/productionreturnRequestDetailNo/index.ts index 66dd5921d..7b9ca6319 100644 --- a/src/api/wms/productionreturnRequestDetailNo/index.ts +++ b/src/api/wms/productionreturnRequestDetailNo/index.ts @@ -27,6 +27,7 @@ export interface ProductionreturnRequestDetailVO { // 查询生产退料申请子列表 export const getProductionreturnRequestDetailPage = async (params) => { + params.businessType = 'ReturnToHold' if (params.isSearch) { delete params.isSearch const data = {...params} diff --git a/src/api/wms/purchaseprice/index.ts b/src/api/wms/purchaseprice/index.ts index cf2438619..03c6af883 100644 --- a/src/api/wms/purchaseprice/index.ts +++ b/src/api/wms/purchaseprice/index.ts @@ -22,6 +22,17 @@ export const getPurchasepricePage = async (params) => { } } +// 查询采购价格单列表 +export const getPurchasepricePageSCP = async (params) => { + if (params.isSearch) { + delete params.isSearch + const data = {...params} + return request.post({ url: '/wms/purchaseprice/seniorSCP', data }) + } else { + return await request.get({ url: `/wms/purchaseprice/pageSCP`, params }) + } +} + // 查询采购价格单详情 export const getPurchaseprice = async (id: number) => { return await request.get({ url: `/wms/purchaseprice/get?id=` + id }) @@ -52,6 +63,16 @@ export const exportPurchaseprice = async (params) => { } } +// 导出采购价格单 Excel +export const exportPurchasepriceSCP = async (params) => { + if (params.isSearch) { + const data = {...params} + return await request.downloadPost({ url: `/wms/purchaseprice/export-excel-senior-SCP`, data }) + } else { + return await request.download({ url: `/wms/purchaseprice/export-excel-SCP`, params }) + } +} + // 下载用户导入模板 export const importTemplate = () => { return request.download({ url: '/wms/purchaseprice/get-import-template' }) diff --git a/src/api/wms/purchasereceiptRecordMain/index.ts b/src/api/wms/purchasereceiptRecordMain/index.ts index b3eccfdf4..5f1ad8101 100644 --- a/src/api/wms/purchasereceiptRecordMain/index.ts +++ b/src/api/wms/purchasereceiptRecordMain/index.ts @@ -89,6 +89,16 @@ export const exportPurchasereceiptRecordMain = async (params) => { } } +// 导出采购收货记录主 Excel +export const exportPurchasereceiptRecordMainSCP = async (params) => { + if (params.isSearch) { + const data = {...params} + return await request.downloadPost({ url: `/wms/purchasereceipt-record-main/export-excel-senior-SCP`, data }) + } else { + return await request.download({ url: `/wms/purchasereceipt-record-main/export-excel-SCP`, params }) + } +} + // 下载用户导入模板 export const importTemplate = () => { return request.download({ url: '/wms/purchasereceipt-record-main/get-import-template' }) diff --git a/src/api/wms/purchasereturnRecordMain/index.ts b/src/api/wms/purchasereturnRecordMain/index.ts index b08fddfe7..caa8fc615 100644 --- a/src/api/wms/purchasereturnRecordMain/index.ts +++ b/src/api/wms/purchasereturnRecordMain/index.ts @@ -75,6 +75,16 @@ export const exportPurchasereturnRecordMain = async (params) => { } } +// 导出采购退货记录主 Excel +export const exportPurchasereturnRecordMainSCP = async (params) => { + if (params.isSearch) { + const data = {...params} + return await request.downloadPost({ url: `/wms/purchasereturn-record-main/export-excel-senior-SCP`, data }) + } else { + return await request.download({url: `/wms/purchasereturn-record-main/export-excel-SCP`, params}) + } +} + // 下载用户导入模板 export const importTemplate = () => { return request.download({ url: '/wms/purchasereturn-record-main/get-import-template' }) diff --git a/src/api/wms/supplier/index.ts b/src/api/wms/supplier/index.ts index 805a4163c..961d949a0 100644 --- a/src/api/wms/supplier/index.ts +++ b/src/api/wms/supplier/index.ts @@ -31,6 +31,18 @@ export const getSupplierPage = async (params) => { return await request.get({ url: `/wms/supplier/page`, params }) } } + +// 查询供应商列表分页 +export const getSupplierPageSCP = async (params) => { + if (params.isSearch) { + delete params.isSearch + const data = {...params} + return request.post({ url: '/wms/supplier/seniorSCP', data }) + } else { + return await request.get({ url: `/wms/supplier/pageSCP`, params }) + } +} + // 查询供应商列表 export const getSupplierList = async (params) => { return await request.get({ url: `/wms/supplier/list`, params }) @@ -66,6 +78,17 @@ export const exportSupplier = async (params) => { } } + +// 导出供应商 Excel +export const exportSupplierSCP = async (params) => { + if (params.isSearch) { + const data = {...params} + return await request.downloadPost({ url: `/wms/supplier/export-excel-senior-SCP`, data }) + } else { + return await request.download({ url: `/wms/supplier/export-excel-SCP`, params }) + } +} + // 下载用户导入模板 export const importTemplate = () => { return request.download({ url: '/wms/supplier/get-import-template' }) diff --git a/src/api/wms/supplieritem/index.ts b/src/api/wms/supplieritem/index.ts index 448b6b108..e6002d3c7 100644 --- a/src/api/wms/supplieritem/index.ts +++ b/src/api/wms/supplieritem/index.ts @@ -31,6 +31,17 @@ export const getSupplieritemPage = async (params) => { } } +// 查询供应商物料列表 +export const getSupplieritemPageSCP = async (params) => { + if (params.isSearch) { + delete params.isSearch + const data = {...params} + return request.post({ url: '/wms/supplieritem/seniorSCP', data }) + } else { + return await request.get({ url: `/wms/supplieritem/pageSCP`, params }) + } +} + // 查询供应商物料详情 export const getSupplieritem = async (id: number) => { return await request.get({ url: `/wms/supplieritem/get?id=` + id }) @@ -61,6 +72,16 @@ export const exportSupplieritem = async (params) => { } } +// 导出供应商物料 Excel +export const exportSupplieritemSCP = async (params) => { + if (params.isSearch) { + const data = {...params} + return await request.downloadPost({ url: `/wms/supplieritem/export-excel-senior-SCP`, data }) + } else { + return await request.download({ url: `/wms/supplieritem/export-excel-SCP`, params }) + } +} + // 下载用户导入模板 export const importTemplate = () => { return request.download({ url: '/wms/supplieritem/get-import-template' }) diff --git a/src/components/SearchTable/src/SearchTable.vue b/src/components/SearchTable/src/SearchTable.vue index 92fc2ef02..39e93b2ce 100644 --- a/src/components/SearchTable/src/SearchTable.vue +++ b/src/components/SearchTable/src/SearchTable.vue @@ -1,7 +1,9 @@ -->
- +
- - + -->
+ \ + 0) { tabsList.value.unshift({ @@ -554,7 +549,9 @@ const masterParmas = ref({ // 列表头部按钮 const HeadButttondata = ref() // 列表-操作按钮 -const buttondata = ref() +const buttondata = ref( + +) /** 表格弹窗 */ const initModel = (schema: FormSchema[], formModel: Recordable) => { const model: Recordable = { ...formModel } @@ -585,10 +582,13 @@ const searchTableFormType = ref('') // 表单的类型:create - 新增;updat const formRef = ref() const titleNameRef = ref() const titleValueRef = ref() +const planDayCode=ref() const count = ref(0) const openDetail = async (row: any, titleName: any, titleValue: any, tableName: any) => { titleNameRef.value = titleName titleValueRef.value = titleValue + + planDayCode.value=row.planMasterCode remarksData.data = { tableId: row.id, tableName: tableName @@ -658,12 +658,7 @@ const openDetail = async (row: any, titleName: any, titleValue: any, tableName: }) ] } - - if(row.status == '1'){ - props.buttondataTable[0].hide = false - }else{ - props.buttondataTable[0].hide = true - } + //console.log("props.buttondataTable-663",props.buttondataTable); buttondata.value = [...detailButtonEdit, ...detailButtonDelete, ...props.buttondataTable] } finally { detailLoading.value = false @@ -671,7 +666,6 @@ const openDetail = async (row: any, titleName: any, titleValue: any, tableName: } } defineExpose({ openDetail, formRef }) // 提供 open 方法,用于打开弹窗 - // 获取备注列表 const getRemarkList = async () => { detailLoading.value = true @@ -807,39 +801,46 @@ const opensearchTable = ( // } // 列表-操作按钮事件 -const buttonTableClick = async (val, row) => { - if (val == 'edit') { - // 编辑 - if (props.isOpenSearchTable) { - searchTableFormType.value = 'update' - if (row?.id || row?.masterId) { - searchTableFormModel.value = Object.assign(unref(searchTableFormModel), row) - } - const item = props.detailAllSchemas.formSchema[0] - opensearchTable( - item.field, - item?.componentProps?.searchField, - item?.componentProps?.searchTitle, - item?.componentProps?.searchAllSchemas, - item?.componentProps?.searchPage, - item?.componentProps?.searchCondition, - item?.componentProps?.multiple, - undefined, - undefined - ) - } else { - openForm('update', row) - } - } else if (val == 'delete') { - // 删除 - handleDelete(row.id) - } else if (val == 'pfinished') { - - WorkSchedulingDetailApi.processFinished(row.id) - getList() - }else { - emit('tableFormButton', val, row) - } +// const buttonTableClick = async (val, row) => { +// if (val == 'edit') { +// // 编辑 +// if (props.isOpenSearchTable) { +// searchTableFormType.value = 'update' +// if (row?.id || row?.masterId) { +// searchTableFormModel.value = Object.assign(unref(searchTableFormModel), row) +// } +// const item = props.detailAllSchemas.formSchema[0] +// opensearchTable( +// item.field, +// item?.componentProps?.searchField, +// item?.componentProps?.searchTitle, +// item?.componentProps?.searchAllSchemas, +// item?.componentProps?.searchPage, +// item?.componentProps?.searchCondition, +// item?.componentProps?.multiple, +// undefined, +// undefined +// ) +// } else { +// openForm('update', row) +// } +// } else if (val == 'delete') { +// // 删除 +// handleDelete(row.id) +// } else { +// emit('tableFormButton', val, row) +// } +// } +const buttonClick=(type,row)=>{ + if (type == 'pfinished') { + WorkSchedulingDetailApi.processFinished(row.id) + getList() + }else if (type == 'reprotProcess') { + refreport.value.openDetail(row,"工序报工", planDayCode.value) +}else if (type == 'checkProcess') { + qualifiedCheck.value.openDetail(row,"质检",planDayCode.value) +} +getList() } /** 添加/修改操作 */ const openForm = async (type: string, row?: number) => { diff --git a/src/views/mes/workScheduling/components/qualifiedCheck.vue b/src/views/mes/workScheduling/components/qualifiedCheck.vue new file mode 100644 index 000000000..bf2d7733e --- /dev/null +++ b/src/views/mes/workScheduling/components/qualifiedCheck.vue @@ -0,0 +1,127 @@ + + diff --git a/src/views/mes/workScheduling/components/report.vue b/src/views/mes/workScheduling/components/report.vue index 2adaf1dbe..3f4acfec5 100644 --- a/src/views/mes/workScheduling/components/report.vue +++ b/src/views/mes/workScheduling/components/report.vue @@ -4,89 +4,38 @@ v-model="dialogVisible" :close-on-click-modal="true" :vLoading="formLoading" - width="fit-content" + width="600px" > - 添加 - - - - - - - - - - - - - - - - - - - - - - - - - - - - + @@ -83,10 +85,11 @@ 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.vue' -import Report from './components/report.vue' +import ReportAll from './components/reportAll.vue' import Finish from './components/finish.vue' + defineOptions({ name: 'MesWorkScheduling' }) const message = useMessage() // 消息弹窗 @@ -96,17 +99,7 @@ const route = useRoute() // 路由信息 const routeName = ref() routeName.value = route.name const tableColumns = ref(WorkScheduling.allSchemas.tableColumns) -// 详情 table 操作扩展 按钮 -const buttondataTable = ref([{ - label: '完工', - name: 'pfinished', - hide: false, - type: 'primary', - icon: '', - color: '', - hasPermi: '', - link: true, // 文本展现按钮 - }]) + // 查看 Bom 按钮回调事件 const tableFormButton = async (val , row) => { getList() @@ -191,14 +184,15 @@ const butttondata=(row) =>{ return [ defaultButtons.mainListHandleBtn({label:"暂停",name:'pause',hide: isShowMainButton(row,['1']),hasPermi:'mes:workScheduling:update'}), defaultButtons.mainListHandleBtn({label:"恢复",name:'resume',hide: isShowMainButton(row,['3']),hasPermi:'mes:workScheduling:update'}), defaultButtons.mainListHandleBtn({label:"开工",name:'start',hide: isShowMainButton(row,['-1','0']),hasPermi:'mes:workScheduling:update'}), - defaultButtons.mainListHandleBtn({label:"报工",name:'report',hide: isShowMainButton(row,['4'] ),hasPermi:'mes:workScheduling:update'}), - defaultButtons.mainListHandleBtn({label:"质检",name:'check',hide: isShowMainButton(row,['5'] ),hasPermi:'mes:workScheduling:update'}), + // defaultButtons.mainListHandleBtn({label:"报工",name:'report',hide: isShowMainButton(row,['3','1'] ),hasPermi:'mes:workScheduling:update'}), + //defaultButtons.mainListHandleBtn({label:"质检",name:'check',hide: isShowMainButton(row,['5'] ),hasPermi:'mes:workScheduling:update'}), defaultButtons.mainListHandleBtn({label:"完工",name:'finish',hide: isShowMainButton(row,['1']),hasPermi:'mes:workScheduling:update'}), //defaultButtons.mainListHandleBtn({label:"叫料",name:'callMaterial',hide: isShowMainButton(row,['1']),hasPermi:'mes:workScheduling:update'}), ]} const reportRef=ref() const reportFinishRef=ref() +const qualifiedCheck=ref() // 列表-操作按钮事件 const buttonTableClick = async (val, row) => { if (val == 'edit') { // 编辑 @@ -214,7 +208,7 @@ const buttonTableClick = async (val, row) => { }else if(val=='report'){ reportRef.value.openDetail(row,"报工") }else if(val=='check'){ - //reportRef.value.openDetail(row,"报工") + //qualifiedCheck.value.openDetail(row,"质检") }else if(val=='finish'){ finishReport(row) } else if(val=='callMaterial'){ @@ -228,7 +222,7 @@ const basicFormRef = ref() const openForm = (type: string, row?: any) => { basicFormRef.value.open(type, row) } -//完工报工 +//完工 const finishReport=async(row)=>{ let params={ id:row.id, @@ -238,7 +232,8 @@ const finishReport=async(row)=>{ //console.log("workscheduling-finishReport-213",row) let res=await WorkSchedulingApi.getNodePosition(params) if(res==='end'){ - reportFinishRef.value.openDetail(row,"完工") + //reportFinishRef.value.openDetail(row,"完工") + WorkSchedulingApi.completeHandle(params) }else{ message.alert("当前工序不是完工工序,不能进行完工操作!") } diff --git a/src/views/qms/inspectionJob/addForm.vue b/src/views/qms/inspectionJob/addForm.vue index 0814259de..88e5dc8d3 100644 --- a/src/views/qms/inspectionJob/addForm.vue +++ b/src/views/qms/inspectionJob/addForm.vue @@ -1,13 +1,17 @@ diff --git a/src/views/wms/basicDataManage/customerManage/customerDeliveryForecast/customerDeliveryForecast.data.ts b/src/views/wms/basicDataManage/customerManage/customerDeliveryForecast/customerDeliveryForecast.data.ts new file mode 100644 index 000000000..ef5e1682f --- /dev/null +++ b/src/views/wms/basicDataManage/customerManage/customerDeliveryForecast/customerDeliveryForecast.data.ts @@ -0,0 +1,135 @@ +import type { CrudSchema } from '@/hooks/web/useCrudSchemas' +import { dateFormatter } from '@/utils/formatTime' + +// 表单校验 +export const CustomerDeliveryForecastRules = reactive({ +}) + +export const CustomerDeliveryForecast = useCrudSchemas(reactive([ + { + label: '地点代码', + field: 'schdSite', + sort: 'custom', + isSearch: true + }, + { + label: '销售日程单号', + field: 'schdOrder', + sort: 'custom', + isSearch: true + }, + { + label: '日程单行号', + field: 'schdLine', + sort: 'custom', + isSearch: true + }, + { + label: '客户代码', + field: 'schdCust', + sort: 'custom', + isSearch: true + }, + { + label: '发货至', + field: 'schdShipto', + sort: 'custom', + }, + { + label: '码头', + field: 'schdDock', + sort: 'custom', + }, + { + label: '物料编码', + field: 'schdPart', + sort: 'custom', + }, + { + label: '净需求', + field: 'schdNetReq', + sort: 'custom', + }, + { + label: '需求日期', + field: 'schdDate', + sort: 'custom', + formatter: dateFormatter, + form: { + component: 'DatePicker', + componentProps: { + type: 'datetime', + valueFormat: 'x' + } + } + }, + { + label: '需求时间', + field: 'schdTime', + sort: 'custom', + formatter: dateFormatter, + form: { + component: 'DatePicker', + componentProps: { + type: 'datetime', + valueFormat: 'x' + } + } + }, + { + label: '需求参考', + field: 'schdReference', + sort: 'custom', + }, + { + label: '包装倍数', + field: 'schdOrdMult', + sort: 'custom', + }, + { + label: '客户零件号', + field: 'schdCustpart', + sort: 'custom', + }, + { + label: '包装代码', + field: 'schdPkgCode', + sort: 'custom', + }, + { + label: '模型年', + field: 'schdModelyr', + sort: 'custom', + }, + { + label: '客户参考', + field: 'schdCustref', + sort: 'custom', + }, + { + label: '先前累计需求数量', + field: 'schdPcrQty', + sort: 'custom', + }, + { + label: '创建时间', + field: 'createTime', + sort: 'custom', + formatter: dateFormatter, + isForm: false + }, + { + label: '是否可用', + field: 'available', + sort: 'custom', + }, + // { + // label: '操作', + // field: 'action', + // isForm: false, + // table: { + // width: 150, + // fixed: 'right' + // } + // } +])) diff --git a/src/views/wms/basicDataManage/customerManage/customerDeliveryForecast/index.vue b/src/views/wms/basicDataManage/customerManage/customerDeliveryForecast/index.vue new file mode 100644 index 000000000..a018a70e7 --- /dev/null +++ b/src/views/wms/basicDataManage/customerManage/customerDeliveryForecast/index.vue @@ -0,0 +1,244 @@ + + + diff --git a/src/views/wms/basicDataManage/itemManage/packageunit/index.vue b/src/views/wms/basicDataManage/itemManage/packageunit/index.vue index 1177ae564..075c78dbd 100644 --- a/src/views/wms/basicDataManage/itemManage/packageunit/index.vue +++ b/src/views/wms/basicDataManage/itemManage/packageunit/index.vue @@ -149,6 +149,31 @@ const buttonTableClick = async (val, row) => { /** 添加/修改操作 */ const basicFormRef = ref() const openForm = (type: string, row?: any) => { + if(type == "update"){ + Packageunit.allSchemas.formSchema.forEach((item) => { + if (item.field == 'code') { + item.componentProps.disabled = true + } + if (item.field == 'name') { + item.componentProps.disabled = true + } + if (item.field == 'manageBalance') { + item.componentProps.disabled = true + } + }) + }else { + Packageunit.allSchemas.formSchema.forEach((item) => { + if (item.field == 'code') { + item.componentProps.disabled = false + } + if (item.field == 'name') { + item.componentProps.disabled = false + } + if (item.field == 'manageBalance') { + item.componentProps.disabled = false + } + }) + } basicFormRef.value.open(type, row) } diff --git a/src/views/wms/basicDataManage/supplierManage/purchaseprice/index.vue b/src/views/wms/basicDataManage/supplierManage/purchaseprice/index.vue index 02bca4f0b..1f9694b7c 100644 --- a/src/views/wms/basicDataManage/supplierManage/purchaseprice/index.vue +++ b/src/views/wms/basicDataManage/supplierManage/purchaseprice/index.vue @@ -84,7 +84,7 @@ const updataTableColumns = (val) => { } const { tableObject, tableMethods } = useTable({ - getListApi: PurchasepriceApi.getPurchasepricePage // 分页接口 + getListApi: routeName.value.includes('SCP')?PurchasepriceApi.getPurchasepricePageSCP:PurchasepriceApi.getPurchasepricePage // 分页接口 }) // 获得表格的各种操作 @@ -238,8 +238,13 @@ const handleExport = async () => { await message.exportConfirm() // 发起导出 exportLoading.value = true - const data = await PurchasepriceApi.exportPurchaseprice(tableObject.params) - download.excel(data, `${t('ts.采购价格单')}.xlsx`) + if(routeName.value.includes('SCP')){ + const data = await PurchasepriceApi.exportPurchasepriceSCP(tableObject.params) + download.excel(data, `${t('ts.采购价格单')}.xlsx`) + }else{ + const data = await PurchasepriceApi.exportPurchaseprice(tableObject.params) + download.excel(data, `${t('ts.采购价格单')}.xlsx`) + } } catch { } finally { exportLoading.value = false diff --git a/src/views/wms/basicDataManage/supplierManage/supplier/index.vue b/src/views/wms/basicDataManage/supplierManage/supplier/index.vue index 896737aac..b79d5b41a 100644 --- a/src/views/wms/basicDataManage/supplierManage/supplier/index.vue +++ b/src/views/wms/basicDataManage/supplierManage/supplier/index.vue @@ -82,7 +82,7 @@ const updataTableColumns = (val) => { } const { tableObject, tableMethods } = useTable({ - getListApi: SupplierApi.getSupplierPage // 分页接口 + getListApi: routeName.value.includes('SCP')?SupplierApi.getSupplierPageSCP:SupplierApi.getSupplierPage // 分页接口 }) // 获得表格的各种操作 @@ -220,8 +220,13 @@ const handleExport = async () => { await message.exportConfirm() // 发起导出 exportLoading.value = true - const data = await SupplierApi.exportSupplier(tableObject.params) - download.excel(data, `${t('ts.供应商')}.xlsx`) + if(routeName.value.includes('SCP')){ + const data = await SupplierApi.exportSupplierSCP(tableObject.params) + download.excel(data, `${t('ts.供应商')}.xlsx`) + }else{ + const data = await SupplierApi.exportSupplier(tableObject.params) + download.excel(data, `${t('ts.供应商')}.xlsx`) + } } catch { } finally { exportLoading.value = false diff --git a/src/views/wms/basicDataManage/supplierManage/supplieritem/index.vue b/src/views/wms/basicDataManage/supplierManage/supplieritem/index.vue index b3c637e76..182966119 100644 --- a/src/views/wms/basicDataManage/supplierManage/supplieritem/index.vue +++ b/src/views/wms/basicDataManage/supplierManage/supplieritem/index.vue @@ -83,7 +83,7 @@ const updataTableColumns = (val) => { } const { tableObject, tableMethods } = useTable({ - getListApi: SupplieritemApi.getSupplieritemPage // 分页接口 + getListApi: routeName.value.includes('SCP')?SupplieritemApi.getSupplieritemPageSCP:SupplieritemApi.getSupplieritemPage // 分页接口 }) // 获得表格的各种操作 @@ -237,8 +237,13 @@ const handleExport = async () => { await message.exportConfirm() // 发起导出 exportLoading.value = true - const data = await SupplieritemApi.exportSupplieritem(tableObject.params) - download.excel(data, `${t('ts.供应商物料')}.xlsx`) + if(routeName.value.includes('SCP')){ + const data = await SupplieritemApi.exportSupplieritemSCP(tableObject.params) + download.excel(data, `${t('ts.供应商物料')}.xlsx`) + }else{ + const data = await SupplieritemApi.exportSupplieritem(tableObject.params) + download.excel(data, `${t('ts.供应商物料')}.xlsx`) + } } catch { } finally { exportLoading.value = false diff --git a/src/views/wms/deliversettlementManage/deliverplan/saleMain/index.vue b/src/views/wms/deliversettlementManage/deliverplan/saleMain/index.vue index 721ca03ec..44cbf66a7 100644 --- a/src/views/wms/deliversettlementManage/deliverplan/saleMain/index.vue +++ b/src/views/wms/deliversettlementManage/deliverplan/saleMain/index.vue @@ -134,8 +134,8 @@ const { getList, setSearchParams } = tableMethods // 列表头部按钮 const HeadButttondata = [ - defaultButtons.defaultAddBtn({hasPermi:'wms:sale-main:create'}), // 新增 - defaultButtons.defaultImportBtn({hasPermi:'wms:sale-main:import'}), // 导入 + // defaultButtons.defaultAddBtn({hasPermi:'wms:sale-main:create'}), // 新增 + // defaultButtons.defaultImportBtn({hasPermi:'wms:sale-main:import'}), // 导入 defaultButtons.defaultExportBtn({hasPermi:'wms:sale-main:export'}), // 导出 defaultButtons.defaultFreshBtn(null), // 刷新 defaultButtons.defaultFilterBtn(null), // 筛选 diff --git a/src/views/wms/deliversettlementManage/deliverplan/saleMain/saleMain.data.ts b/src/views/wms/deliversettlementManage/deliverplan/saleMain/saleMain.data.ts index 1b0e5640e..39362227c 100644 --- a/src/views/wms/deliversettlementManage/deliverplan/saleMain/saleMain.data.ts +++ b/src/views/wms/deliversettlementManage/deliverplan/saleMain/saleMain.data.ts @@ -264,16 +264,16 @@ export const SaleMain = useCrudSchemas(reactive([ } } }, - { - label: '操作', - field: 'action', - isDetail: false, - isForm: false, - table: { - width: 150, - fixed: 'right' - } - } + // { + // label: '操作', + // field: 'action', + // isDetail: false, + // isForm: false, + // table: { + // width: 150, + // fixed: 'right' + // } + // } ])) //表单校验 diff --git a/src/views/wms/inventoryjobManage/containermanage/containerMainRequest/containerMainRequest.data.ts b/src/views/wms/inventoryjobManage/containermanage/containerMainRequest/containerMainRequest.data.ts new file mode 100644 index 000000000..9b7584156 --- /dev/null +++ b/src/views/wms/inventoryjobManage/containermanage/containerMainRequest/containerMainRequest.data.ts @@ -0,0 +1,504 @@ +import type { CrudSchema } from '@/hooks/web/useCrudSchemas' +import { TableColumn } from '@/types/table' +import { dateFormatter } from '@/utils/formatTime' + +import * as BalanceApi from '@/api/wms/balance' +import { Balance } from '@/views/wms/inventoryManage/balance/balance.data' + +import * as LocationApi from '@/api/wms/location' +import { Location } from '@/views/wms/basicDataManage/factoryModeling/location/location.data' + +import * as getRequestsettingApi from '@/api/wms/requestsetting/index' + +// 表单校验 +export const ContainerMainRequestRules = reactive({ + type:[ + { required: true, message: '请选择类型', trigger: 'change' }, + ], + concurrencyStamp: [required], +}) + +// 获取自动提交自动通过自动执行,跳过任务直接删生成记录的默认值 +const queryParams = { + pageSize:10, + pageNo:1, + code:'ContainerRequest' +} + 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] + +export const ContainerMainRequest = useCrudSchemas(reactive([ + { + label: '单据号', + field: 'number', + sort: 'custom', + isSearch: true, + isForm: false, + table: { + width: 100 + }, + }, { + label: '状态', + field: 'status', + dictType: DICT_TYPE.REQUEST_STATUS, + dictClass: 'string', + isSearch: true, + isForm: false, + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + componentProps: { + disabled: true + } + } + }, + { + label: '类型', + field: 'type', + sort: 'custom', + dictType: DICT_TYPE.CONTAIN_MANAGE_TYPE, + dictClass: 'string', + isSearch: true, + isTable: true, + table: { + width: 120 + }, + form:{ + componentProps:{ + disabled: true, + } + } + }, + { + label: '是否可用', + field: 'available', + sort: 'custom', + dictType: DICT_TYPE.TRUE_FALSE, + dictClass: 'string', + isForm: false, + table: { + width: 150 + }, + }, + { + label: '备注', + field: 'remark', + sort: 'custom', + isSearch: true, + }, + { + 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: '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: '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: 'createTime', + sort: 'custom', + formatter: dateFormatter, + 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')] + } + }, + table: { + width: 200 + }, + isForm: false, + }, + { + label: '扩展属性', + field: 'extraProperties', + sort: 'custom', + isForm: false, + isTable: false + }, + { + label: '并发乐观锁', + field: 'concurrencyStamp', + sort: 'custom', + form: { + component: 'InputNumber', + value: 0 + }, + isForm: false, + isTable: false + }, + { + label: '地点ID', + field: 'siteId', + sort: 'custom', + isForm: false, + table: { + width: 100 + }, + }, + { + label: '操作', + field: 'action', + isForm: false, + table: { + width: 150, + fixed: 'right' + } + } +])) + +// 表单校验 +export const ContainerDetailRequestRules = reactive({ + toLocationCode: [ + { required: true, message: '请选择目标库位', trigger: 'blur' } + ], + containerNumber: [ + { required: true, message: '请选择器具号', trigger: 'blur' } + ], + toinventoryStatus: [ + { required: true, message: '请选择倒库存状态', trigger: 'blur' } + ], + toQty: [ + { required: true, message: '请输入到数量', trigger: 'blur' } + ], +}) + +export const ContainerDetailRequest = useCrudSchemas(reactive([ + { + label: 'id', + field: 'id', + sort: 'custom', + isForm: false, + isTableForm: false, + isTable: false + }, + { + label: '主表ID', + field: 'masterId', + sort: 'custom', + isSearch: true, + form: { + component: 'InputNumber', + value: 0 + }, + isForm: false, + isTableForm: false, + isTable: false + }, + { + label: '单据号', + field: 'number', + sort: 'custom', + isSearch: true, + isForm: false, + isTableForm: false, + isTable: false + }, + { + label: '器具号', + field: 'containerNumber', + sort: 'custom', + tableForm:{ + isInpuFocusShow: true, // 开启查询弹窗 + searchListPlaceholder: '请选择器具号', + searchField: 'itemCode', + searchTitle: '库存余额信息', + searchAllSchemas: Balance.allSchemas, + searchPage: BalanceApi.selectConfigToBalance, + }, + form: { + // labelMessage: '信息提示说明!!!', + componentProps: { + isSearchList: true, // 开启查询弹窗 + searchListPlaceholder: '请选择器具号', + searchField: 'itemCode', + searchTitle: '库存余额信息', + searchAllSchemas: Balance.allSchemas, + searchPage: BalanceApi.selectConfigToBalance, + } + } + }, + { + label: '来源库位代码', + field: 'fromLocationCode', + sort: 'custom', + table: { + width: 150 + }, + tableForm: { + disabled: true, + type: 'Select' + }, + form: { + // labelMessage: '信息提示说明!!!', + componentProps: { + disabled: true, + } + } + }, + { + label: '目标库位代码', + field: 'toLocationCode', + sort: 'custom', + table: { + width: 150 + }, + tableForm:{ + isInpuFocusShow: true, // 开启查询弹窗 + searchListPlaceholder: '请选择到库位代码', + searchField: 'code', + searchTitle: '库位信息', + searchAllSchemas: Location.allSchemas, + searchPage: LocationApi.selectBusinessTypeToLocation, + }, + form: { + // labelMessage: '信息提示说明!!!', + componentProps: { + isSearchList: true, // 开启查询弹窗 + searchListPlaceholder: '请选择到库位代码', + searchField: 'code', + searchTitle: '库位信息', + searchAllSchemas: Location.allSchemas, + searchPage: LocationApi.selectBusinessTypeToLocation, + } + } + }, + { + label: '从库存状态', + field: 'fromInventoryStatus', + dictType: DICT_TYPE.INVENTORY_STATUS, + dictClass: 'string', + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + tableForm: { + disabled: true, + type: 'Select' + }, + }, + { + label: '到库存状态', + field: 'toInventoryStatus', + dictType: DICT_TYPE.INVENTORY_STATUS, + dictClass: 'string', + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + tableForm: { + type: 'Select' + }, + }, + // { + // label: '从数量', + // field: 'fromQty', + // sort: 'custom', + // tableForm: { + // disabled: true, + // }, + // }, + { + label: '到数量', + field: 'toQty', + sort: 'custom', + }, + { + label: '计量单位', + field: 'uom', + dictType: DICT_TYPE.UOM, + dictClass: 'string', + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + tableForm:{ + disabled: true, + type: 'Select' + } + }, + { + label: '备注', + field: 'remark', + sort: 'custom', + }, + { + label: '创建时间', + field: 'createTime', + sort: 'custom', + formatter: dateFormatter, + 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')] + } + }, + table: { + width: 200 + }, + isForm: false, + isTableForm: false + }, + { + label: '地点ID', + field: 'siteId', + sort: 'custom', + isForm: false, + isTableForm: false, + isTable: false + }, + { + label: '并发乐观锁', + field: 'concurrencyStamp', + sort: 'custom', + isForm: false, + isTableForm: false, + isTable: false + }, + { + label: '从货主代码', + field: 'fromOwnerCode', + sort: 'custom', + isForm: false, + isTableForm: false, + isTable: false + }, + { + label: '到货主代码', + field: 'toOwnerCode', + sort: 'custom', + isForm: false, + isTableForm: false, + isTable: false + }, + { + label: '操作', + field: 'action', + isForm: false, + table: { + width: 150, + fixed: 'right' + } + } +])) + diff --git a/src/views/wms/inventoryjobManage/containermanage/containerMainRequest/index.vue b/src/views/wms/inventoryjobManage/containermanage/containerMainRequest/index.vue new file mode 100644 index 000000000..98a33615b --- /dev/null +++ b/src/views/wms/inventoryjobManage/containermanage/containerMainRequest/index.vue @@ -0,0 +1,507 @@ + + + diff --git a/src/views/wms/inventoryjobManage/containermanage/containerRecordMain/containerRecordMain.data.ts b/src/views/wms/inventoryjobManage/containermanage/containerRecordMain/containerRecordMain.data.ts new file mode 100644 index 000000000..862df9340 --- /dev/null +++ b/src/views/wms/inventoryjobManage/containermanage/containerRecordMain/containerRecordMain.data.ts @@ -0,0 +1,284 @@ +import type { CrudSchema } from '@/hooks/web/useCrudSchemas' +import { TableColumn } from '@/types/table' +import { dateFormatter } from '@/utils/formatTime' + +// 表单校验 +export const ContainerRecordMainRules = reactive({ + available: [required], + concurrencyStamp: [required], +}) + + // 获取当前操作人的部门 + 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] + +export const ContainerRecordMain = useCrudSchemas(reactive([ + { + label: '单据号', + field: 'number', + sort: 'custom', + isSearch: true, + isForm: false, + table: { + width: 200 + }, + }, + { + label: '申请单号', + field: 'requestNumber', + sort: 'custom', + isSearch: true, + }, + { + label: '类型', + field: 'type', + sort: 'custom', + dictType: DICT_TYPE.CONTAIN_MANAGE_TYPE, + dictClass: 'string', + isSearch: true, + isTable: true, + table: { + width: 120 + }, + form:{ + componentProps:{ + disabled: true, + } + } + }, + { + label: '是否可用', + field: 'available', + sort: 'custom', + dictType: DICT_TYPE.TRUE_FALSE, + dictClass: 'string', + isForm: false, + isTable:false + }, + { + label: '备注', + field: 'remark', + sort: 'custom', + }, + { + 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: 'extraProperties', + sort: 'custom', + isForm: false, + isTable: false + }, + { + label: '并发乐观锁', + field: 'concurrencyStamp', + sort: 'custom', + form: { + component: 'InputNumber', + value: 0 + }, + isForm: false, + isTable: false + }, + { + label: '地点ID', + field: 'siteId', + sort: 'custom', + isForm: false, + table: { + width: 100 + }, + }, + { + label: '创建时间', + field: 'createTime', + sort: 'custom', + formatter: dateFormatter, + 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')] + } + }, + table: { + width: 200 + }, + isForm: false, + }, + { + label: '操作', + field: 'action', + isForm: false, + table: { + width: 150, + fixed: 'right' + } + } +])) + +// 表单校验 +export const ContainerRecordDetailRules = reactive({ + fromLocationCode: [required], + toLocationCode: [required], + concurrencyStamp: [required], +}) + +export const ContainerRecordDetail = useCrudSchemas(reactive([ + { + label: 'id', + field: 'id', + sort: 'custom', + isForm: false, + isTableForm: false, + isTable: false + }, + { + label: '主表ID', + field: 'masterId', + sort: 'custom', + form: { + component: 'InputNumber', + value: 0 + }, + isForm: false, + isTableForm: false, + isTable: false + }, + { + label: '单据号', + field: 'number', + sort: 'custom', + isForm: false, + isTableForm: false, + isTable: false + }, + { + label: '器具号', + field: 'containerNumber', + sort: 'custom' + }, + { + label: '来源库位代码', + field: 'fromLocationCode', + sort: 'custom', + }, + { + label: '目标库位代码', + field: 'toLocationCode', + sort: 'custom', + }, + { + label: '到数量', + field: 'toQty', + sort: 'custom', + }, + { + label: '计量单位', + field: 'uom', + dictType: DICT_TYPE.UOM, + dictClass: 'string', + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + tableForm:{ + disabled: true, + type: 'Select' + } + }, + { + label: '备注', + field: 'remark', + sort: 'custom', + }, + { + label: '创建时间', + field: 'createTime', + sort: 'custom', + formatter: dateFormatter, + 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')] + } + }, + table: { + width: 200 + }, + isForm: false, + isTableForm: false + }, + { + label: '地点ID', + field: 'siteId', + sort: 'custom', + isForm: false, + isTableForm: false, + isTable: false + }, + { + label: '并发乐观锁', + field: 'concurrencyStamp', + sort: 'custom', + isForm: false, + isTableForm: false, + isTable: false + }, + { + label: '从货主代码', + field: 'fromOwnerCode', + sort: 'custom', + isForm: false, + isTableForm: false, + isTable: false + }, + { + label: '到货主代码', + field: 'toOwnerCode', + sort: 'custom', + isForm: false, + isTableForm: false, + isTable: false + }, + { + label: '操作', + field: 'action', + isForm: false, + table: { + width: 150, + fixed: 'right' + } + } +])) \ No newline at end of file diff --git a/src/views/wms/inventoryjobManage/containermanage/containerRecordMain/index.vue b/src/views/wms/inventoryjobManage/containermanage/containerRecordMain/index.vue new file mode 100644 index 000000000..1c422db7b --- /dev/null +++ b/src/views/wms/inventoryjobManage/containermanage/containerRecordMain/index.vue @@ -0,0 +1,249 @@ + + + diff --git a/src/views/wms/inventoryjobManage/containermanage/initialContainerMainRequest/index.vue b/src/views/wms/inventoryjobManage/containermanage/initialContainerMainRequest/index.vue new file mode 100644 index 000000000..bed6ff8ad --- /dev/null +++ b/src/views/wms/inventoryjobManage/containermanage/initialContainerMainRequest/index.vue @@ -0,0 +1,462 @@ + + + +./initialContainerMainRequest.data diff --git a/src/views/wms/inventoryjobManage/containermanage/initialContainerMainRequest/initialContainerMainRequest.data.ts b/src/views/wms/inventoryjobManage/containermanage/initialContainerMainRequest/initialContainerMainRequest.data.ts new file mode 100644 index 000000000..93ef9ec97 --- /dev/null +++ b/src/views/wms/inventoryjobManage/containermanage/initialContainerMainRequest/initialContainerMainRequest.data.ts @@ -0,0 +1,475 @@ +import type { CrudSchema } from '@/hooks/web/useCrudSchemas' +import { TableColumn } from '@/types/table' +import { dateFormatter } from '@/utils/formatTime' + +import * as BalanceApi from '@/api/wms/balance' +import { Balance } from '@/views/wms/inventoryManage/balance/balance.data' + +import * as LocationApi from '@/api/wms/location' +import { Location } from '@/views/wms/basicDataManage/factoryModeling/location/location.data' + +import * as ItembasicApi from '@/api/wms/itembasic' +import { Itembasic } from '@/views/wms/basicDataManage/itemManage/itembasic/itembasic.data' + +import * as getRequestsettingApi from '@/api/wms/requestsetting/index' + +// 表单校验 +export const ContainerMainRequestRules = reactive({ + type:[ + { required: true, message: '请选择类型', trigger: 'change' }, + ], + concurrencyStamp: [required], +}) + +// 获取自动提交自动通过自动执行,跳过任务直接删生成记录的默认值 +const queryParams = { + pageSize:10, + pageNo:1, + code:'ContainerRequest' +} + 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] + +export const ContainerMainRequest = useCrudSchemas(reactive([ + { + label: '单据号', + field: 'number', + sort: 'custom', + isSearch: true, + isForm: false, + table: { + width: 100 + }, + }, + { + label: '状态', + field: 'status', + dictType: DICT_TYPE.REQUEST_STATUS, + dictClass: 'string', + isSearch: true, + isForm: false, + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + componentProps: { + disabled: true + } + } + }, + { + label: '类型', + field: 'type', + sort: 'custom', + dictType: DICT_TYPE.CONTAIN_MANAGE_TYPE, + dictClass: 'string', + isSearch: true, + isTable: true, + table: { + width: 120 + }, + form:{ + componentProps:{ + disabled: true, + } + } + }, + { + label: '是否可用', + field: 'available', + sort: 'custom', + dictType: DICT_TYPE.TRUE_FALSE, + dictClass: 'string', + isForm: false, + table: { + width: 150 + }, + }, + { + label: '备注', + field: 'remark', + sort: 'custom', + isSearch: true, + }, + { + 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: '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: '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: 'createTime', + sort: 'custom', + formatter: dateFormatter, + 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')] + } + }, + table: { + width: 200 + }, + isForm: false, + }, + { + label: '扩展属性', + field: 'extraProperties', + sort: 'custom', + isForm: false, + isTable: false + }, + { + label: '并发乐观锁', + field: 'concurrencyStamp', + sort: 'custom', + form: { + component: 'InputNumber', + value: 0 + }, + isForm: false, + isTable: false + }, + { + label: '地点ID', + field: 'siteId', + sort: 'custom', + isForm: false, + table: { + width: 100 + }, + }, + { + label: '操作', + field: 'action', + isForm: false, + table: { + width: 200, + fixed: 'right' + } + } +])) + +// 表单校验 +export const ContainerDetailRequestRules = reactive({ + toLocationCode: [ + { required: true, message: '请选择目标库位', trigger: 'blur' } + ], + containerNumber: [ + { required: true, message: '请选择器具号', trigger: 'blur' } + ], + toQty: [ + { required: true, message: '请输入到数量', trigger: 'blur' } + ], +}) + +export const ContainerDetailRequest = useCrudSchemas(reactive([ + { + label: 'id', + field: 'id', + sort: 'custom', + isForm: false, + isTableForm: false, + isTable: false + }, + { + label: '主表ID', + field: 'masterId', + sort: 'custom', + isSearch: true, + form: { + component: 'InputNumber', + value: 0 + }, + isForm: false, + isTableForm: false, + isTable: false + }, + { + label: '单据号', + field: 'number', + sort: 'custom', + isSearch: true, + isForm: false, + isTableForm: false, + isTable: false + }, + { + label: '器具号', + field: 'containerNumber', + sort: 'custom', + tableForm:{ + isInpuFocusShow: true, // 开启查询弹窗 + searchListPlaceholder: '请选择器具号', + searchField: 'itemCode', + searchTitle: '器具信息', + searchAllSchemas: Itembasic.allSchemas, + searchPage: ItembasicApi.selectConfigToItembasic, + }, + form: { + // labelMessage: '信息提示说明!!!', + componentProps: { + isSearchList: true, // 开启查询弹窗 + searchListPlaceholder: '请选择器具号', + searchField: 'itemCode', + searchTitle: '器具信息', + searchAllSchemas: Itembasic.allSchemas, + searchPage: ItembasicApi.selectConfigToItembasic, + } + } + }, + { + label: '目标库位代码', + field: 'toLocationCode', + sort: 'custom', + table: { + width: 150 + }, + tableForm:{ + isInpuFocusShow: true, // 开启查询弹窗 + searchListPlaceholder: '请选择到库位代码', + searchField: 'code', + searchTitle: '库位信息', + searchAllSchemas: Location.allSchemas, + searchPage: LocationApi.selectBusinessTypeToLocation, + }, + form: { + // labelMessage: '信息提示说明!!!', + componentProps: { + isSearchList: true, // 开启查询弹窗 + searchListPlaceholder: '请选择到库位代码', + searchField: 'code', + searchTitle: '库位信息', + searchAllSchemas: Location.allSchemas, + searchPage: LocationApi.selectBusinessTypeToLocation, + } + } + }, + { + label: '到库存状态', + field: 'toInventoryStatus', + dictType: DICT_TYPE.INVENTORY_STATUS, + dictClass: 'string', + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + tableForm: { + disabled: true, + type: 'Select' + }, + form: { + componentProps: { + disabled: true + } + } + }, + { + label: '到数量', + field: 'toQty', + sort: 'custom', + }, + { + label: '计量单位', + field: 'uom', + dictType: DICT_TYPE.UOM, + dictClass: 'string', + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + tableForm: { + type: 'Select', + disabled: true + }, + form: { + componentProps: { + disabled: true + } + } + }, + { + label: '备注', + field: 'remark', + sort: 'custom', + }, + { + label: '创建时间', + field: 'createTime', + sort: 'custom', + formatter: dateFormatter, + 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')] + } + }, + table: { + width: 200 + }, + isForm: false, + isTableForm: false + }, + { + label: '地点ID', + field: 'siteId', + sort: 'custom', + isForm: false, + isTableForm: false, + isTable: false + }, + { + label: '并发乐观锁', + field: 'concurrencyStamp', + sort: 'custom', + isForm: false, + isTableForm: false, + isTable: false + }, + { + label: '从货主代码', + field: 'fromOwnerCode', + sort: 'custom', + isForm: false, + isTableForm: false, + isTable: false + }, + { + label: '到货主代码', + field: 'toOwnerCode', + sort: 'custom', + isForm: false, + isTableForm: false, + isTable: false + }, + { + label: '操作', + field: 'action', + isForm: false, + table: { + width: 200, + fixed: 'right' + } + } +])) + diff --git a/src/views/wms/inventoryjobManage/containermanage/scrapContainerMainRequest/index.vue b/src/views/wms/inventoryjobManage/containermanage/scrapContainerMainRequest/index.vue new file mode 100644 index 000000000..ea5089cda --- /dev/null +++ b/src/views/wms/inventoryjobManage/containermanage/scrapContainerMainRequest/index.vue @@ -0,0 +1,487 @@ + + + diff --git a/src/views/wms/inventoryjobManage/containermanage/scrapContainerMainRequest/scrapContainerMainRequest.data.ts b/src/views/wms/inventoryjobManage/containermanage/scrapContainerMainRequest/scrapContainerMainRequest.data.ts new file mode 100644 index 000000000..d14b1c371 --- /dev/null +++ b/src/views/wms/inventoryjobManage/containermanage/scrapContainerMainRequest/scrapContainerMainRequest.data.ts @@ -0,0 +1,502 @@ +import type { CrudSchema } from '@/hooks/web/useCrudSchemas' +import { TableColumn } from '@/types/table' +import { dateFormatter } from '@/utils/formatTime' + +import * as BalanceApi from '@/api/wms/balance' +import { Balance } from '@/views/wms/inventoryManage/balance/balance.data' + +import * as LocationApi from '@/api/wms/location' +import { Location } from '@/views/wms/basicDataManage/factoryModeling/location/location.data' + +import * as getRequestsettingApi from '@/api/wms/requestsetting/index' + +// 表单校验 +export const ContainerMainRequestRules = reactive({ + type: [ + { required: true, message: '请选择类型', trigger: 'change' }, + ], + concurrencyStamp: [required], +}) + +// 获取自动提交自动通过自动执行,跳过任务直接删生成记录的默认值 +const queryParams = { + pageSize: 10, + pageNo: 1, + code: 'ContainerRequest' +} +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] + +export const ContainerMainRequest = useCrudSchemas(reactive([ + { + label: '单据号', + field: 'number', + sort: 'custom', + isSearch: true, + isForm: false, + table: { + width: 100 + }, + }, { + label: '状态', + field: 'status', + dictType: DICT_TYPE.REQUEST_STATUS, + dictClass: 'string', + isSearch: true, + isForm: false, + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + componentProps: { + disabled: true + } + } + }, + { + label: '类型', + field: 'type', + sort: 'custom', + dictType: DICT_TYPE.CONTAIN_MANAGE_TYPE, + dictClass: 'string', + isSearch: true, + isTable: true, + table: { + width: 120 + }, + form: { + componentProps: { + disabled: true, + } + } + }, + { + label: '是否可用', + field: 'available', + sort: 'custom', + dictType: DICT_TYPE.TRUE_FALSE, + dictClass: 'string', + isForm: false, + table: { + width: 150 + }, + }, + { + label: '备注', + field: 'remark', + sort: 'custom', + isSearch: true, + }, + { + 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: '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: '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: 'createTime', + sort: 'custom', + formatter: dateFormatter, + 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')] + } + }, + table: { + width: 200 + }, + isForm: false, + }, + { + label: '扩展属性', + field: 'extraProperties', + sort: 'custom', + isForm: false, + isTable: false + }, + { + label: '并发乐观锁', + field: 'concurrencyStamp', + sort: 'custom', + form: { + component: 'InputNumber', + value: 0 + }, + isForm: false, + isTable: false + }, + { + label: '地点ID', + field: 'siteId', + sort: 'custom', + isForm: false, + table: { + width: 100 + }, + }, + { + label: '操作', + field: 'action', + isForm: false, + table: { + width: 150, + fixed: 'right' + } + } +])) + +// 表单校验 +export const ContainerDetailRequestRules = reactive({ + toLocationCode: [ + { required: true, message: '请选择目标库位', trigger: 'blur' } + ], + containerNumber: [ + { required: true, message: '请选择器具号', trigger: 'blur' } + ], + toQty: [ + { required: true, message: '请输入到数量', trigger: 'blur' } + ], +}) + +export const ContainerDetailRequest = useCrudSchemas(reactive([ + { + label: 'id', + field: 'id', + sort: 'custom', + isForm: false, + isTableForm: false, + isTable: false + }, + { + label: '主表ID', + field: 'masterId', + sort: 'custom', + isSearch: true, + form: { + component: 'InputNumber', + value: 0 + }, + isForm: false, + isTableForm: false, + isTable: false + }, + { + label: '单据号', + field: 'number', + sort: 'custom', + isSearch: true, + isForm: false, + isTableForm: false, + isTable: false + }, + { + label: '器具号', + field: 'containerNumber', + sort: 'custom', + tableForm: { + isInpuFocusShow: true, // 开启查询弹窗 + searchListPlaceholder: '请选择器具号', + searchField: 'itemCode', + searchTitle: '库存余额信息', + searchAllSchemas: Balance.allSchemas, + searchPage: BalanceApi.selectConfigToBalance, + }, + form: { + // labelMessage: '信息提示说明!!!', + componentProps: { + isSearchList: true, // 开启查询弹窗 + searchListPlaceholder: '请选择器具号', + searchField: 'itemCode', + searchTitle: '库存余额信息', + searchAllSchemas: Balance.allSchemas, + searchPage: BalanceApi.selectConfigToBalance, + } + } + }, + { + label: '来源库位代码', + field: 'fromLocationCode', + sort: 'custom', + table: { + width: 150 + }, + tableForm: { + disabled: true, + type: 'Select' + }, + form: { + // labelMessage: '信息提示说明!!!', + componentProps: { + disabled: true, + } + } + }, + { + label: '目标库位代码', + field: 'toLocationCode', + sort: 'custom', + table: { + width: 150 + }, + tableForm: { + isInpuFocusShow: true, // 开启查询弹窗 + searchListPlaceholder: '请选择到库位代码', + searchField: 'code', + searchTitle: '库位信息', + searchAllSchemas: Location.allSchemas, + searchPage: LocationApi.selectPageItemAreaToLocation, + }, + form: { + // labelMessage: '信息提示说明!!!', + componentProps: { + isSearchList: true, // 开启查询弹窗 + searchListPlaceholder: '请选择到库位代码', + searchField: 'code', + searchTitle: '库位信息', + searchAllSchemas: Location.allSchemas, + searchPage: LocationApi.selectPageItemAreaToLocation, + } + } + }, + { + label: '从库存状态', + field: 'fromInventoryStatus', + dictType: DICT_TYPE.INVENTORY_STATUS, + dictClass: 'string', + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + tableForm: { + disabled: true, + type: 'Select' + }, + }, + { + label: '到库存状态', + field: 'toInventoryStatus', + dictType: DICT_TYPE.INVENTORY_STATUS, + dictClass: 'string', + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + tableForm: { + type: 'Select', + disabled: true + }, + }, + // { + // label: '从数量', + // field: 'fromQty', + // sort: 'custom', + // tableForm: { + // disabled: true, + // }, + // }, + { + label: '到数量', + field: 'toQty', + sort: 'custom', + }, + { + label: '计量单位', + field: 'uom', + dictType: DICT_TYPE.UOM, + dictClass: 'string', + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + tableForm: { + disabled: true, + type: 'Select' + } + }, + { + label: '备注', + field: 'remark', + sort: 'custom', + }, + { + label: '创建时间', + field: 'createTime', + sort: 'custom', + formatter: dateFormatter, + 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')] + } + }, + table: { + width: 200 + }, + isForm: false, + isTableForm: false + }, + { + label: '地点ID', + field: 'siteId', + sort: 'custom', + isForm: false, + isTableForm: false, + isTable: false + }, + { + label: '并发乐观锁', + field: 'concurrencyStamp', + sort: 'custom', + isForm: false, + isTableForm: false, + isTable: false + }, + { + label: '从货主代码', + field: 'fromOwnerCode', + sort: 'custom', + isForm: false, + isTableForm: false, + isTable: false + }, + { + label: '到货主代码', + field: 'toOwnerCode', + sort: 'custom', + isForm: false, + isTableForm: false, + isTable: false + }, + { + label: '操作', + field: 'action', + isForm: false, + table: { + width: 150, + fixed: 'right' + } + } +])) + diff --git a/src/views/wms/issueManage/productionreturn/productionreturnRequestMain/productionreturnRequestMain.data.ts b/src/views/wms/issueManage/productionreturn/productionreturnRequestMain/productionreturnRequestMain.data.ts index 99843afc2..ea9a67180 100644 --- a/src/views/wms/issueManage/productionreturn/productionreturnRequestMain/productionreturnRequestMain.data.ts +++ b/src/views/wms/issueManage/productionreturn/productionreturnRequestMain/productionreturnRequestMain.data.ts @@ -1031,12 +1031,11 @@ export const ProductionreturnRequestDetail = useCrudSchemas(reactive { data.subList = tableData.value // 拼接子表数据参数 // 合格退料 添加参数 isOK data.isOK = false // 不合格 false + data.subList.forEach(item => { + item.productionLineCode = data.productionLineCode + }) try { if (formType === 'create') { // 子表不能为空 diff --git a/src/views/wms/issueManage/productionreturn/productionreturnRequestMainNo/productionreturnRequestMainNo.data.ts b/src/views/wms/issueManage/productionreturn/productionreturnRequestMainNo/productionreturnRequestMainNo.data.ts index 8b336d9a3..ec7df828f 100644 --- a/src/views/wms/issueManage/productionreturn/productionreturnRequestMainNo/productionreturnRequestMainNo.data.ts +++ b/src/views/wms/issueManage/productionreturn/productionreturnRequestMainNo/productionreturnRequestMainNo.data.ts @@ -552,12 +552,11 @@ export const ProductionreturnRequestDetail = useCrudSchemas(reactive { // defaultButtons.mainListJobCloBtn({hide:isShowMainButton(row,['1']),hasPermi:'wms:purchasereceipt-job-main:close'}), // 关闭 // defaultButtons.mainListJobAbaBtn({hide:isShowMainButton(row,['2'])}), // 放弃 // defaultButtons.mainListJobExeBtn({hide:isShowMainButton(row,['2'])}), // 执行 - // { - // label: '拒收', - // name: 'mainJobClo', - // hide: isShowMainButton(row, ['1']), - // type: 'primary', - // icon: '', - // color: '', - // hasPermi: 'wms:purchasereceipt-job-main:close', - // link: true // 文本展现按钮 - // } + { + label: '拒收', + name: 'mainJobClo', + hide: isShowMainButton(row, ['1']), + type: 'primary', + icon: '', + color: '', + hasPermi: 'wms:purchasereceipt-job-main:close', + link: true // 文本展现按钮 + } ] } diff --git a/src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRecordMain/index.vue b/src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRecordMain/index.vue index 1e642d36c..482d324ff 100644 --- a/src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRecordMain/index.vue +++ b/src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRecordMain/index.vue @@ -267,8 +267,13 @@ const handleExport = async () => { await message.exportConfirm() // 发起导出 exportLoading.value = true - const data = await PurchasereceiptRecordMainApi.exportPurchasereceiptRecordMain(tableObject.params) - download.excel(data, `${t('ts.采购收货记录主')}.xlsx`) + if(routeName.value.includes('SCP')){ + const data = await PurchasereceiptRecordMainApi.exportPurchasereceiptRecordMainSCP(tableObject.params) + download.excel(data, `${t('ts.采购收货记录主')}.xlsx`) + }else{ + const data = await PurchasereceiptRecordMainApi.exportPurchasereceiptRecordMain(tableObject.params) + download.excel(data, `${t('ts.采购收货记录主')}.xlsx`) + } } catch { } finally { exportLoading.value = false diff --git a/src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRequestMain/index.vue b/src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRequestMain/index.vue index 16b361438..4c9127c44 100644 --- a/src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRequestMain/index.vue +++ b/src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRequestMain/index.vue @@ -198,7 +198,7 @@ const searchTableSuccessLabel = (formField, searchField, val, formRef, type, row // 查询页面返回 const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => { //console.log("formRef",formRef) - //console.log("supplierCode",formRef.value.formRef.formModel.supplierCode) + console.log("searchTableSuccess",formField, searchField, val, formRef, type, row) nextTick(() => { if (type == 'tableForm') { // 明细查询页赋值 @@ -206,7 +206,9 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => if(formField == 'itemCode') { row['itemCode'] = val[0]['code'] } else if(formField == 'poNumber') { - row['poNumber'] = val[0]['number'] + updateTableData(val) + // row['poNumber'] = val[0]['number'] + } else if(formField == 'poLine'){ //添加费用明细--点击确定 val.forEach(item=>{ @@ -457,6 +459,27 @@ const searchTableSuccess1 = async (formField, searchField, val, formRef, type, r }) } +const updateTableData = (tableList)=>{ + tableList.forEach(row=>{ + //poNumber poLine itemCode batch + const newRow = JSON.parse(JSON.stringify({...tableFormKeys,...row})) + newRow['poLine'] = row['lineNumber'] + newRow['itemCode'] = row['itemCode'] + newRow['uom'] = row['uom'] + newRow['poNumber'] =row['number'] + newRow['supplierCode'] =row['supplierCode'] + //生产日期 到货日期 默认当天 + newRow['produceDate'] = dayjs().valueOf() + newRow['arriveDate'] = dayjs().valueOf() + //批次 + newRow['batch'] = formatDate(newRow['produceDate'],'YYYYMMDD'); + newRow['defaultToLocationCode'] =row['defaultLocation'] + if(!tableData.value.find((item:object)=>item.poNumber == newRow.poNumber&&item.itemCode == newRow.itemCode&&item.poLine == newRow.poLine&&item.batch == newRow.batch)){ + tableData.value.push(newRow) + } + }) +} + const getSearchTableData = async (number,isEnter=false)=>{ const {tableObject ,tableMethods} = useTable({ defaultParams:{number}, @@ -470,29 +493,16 @@ const getSearchTableData = async (number,isEnter=false)=>{ item.width = item.table?.width || 150 }) tableData.value = [] + updateTableData(tableObject.tableList) const itemCodes = [] tableObject.tableList.forEach(row=>{ itemCodes.push(row['itemCode']) - const newRow = JSON.parse(JSON.stringify({...tableFormKeys,...row})) - newRow['poLine'] = row['lineNumber'] - newRow['itemCode'] = row['itemCode'] - newRow['uom'] = row['uom'] - newRow['poNumber'] =row['number'] - newRow['supplierCode'] =row['supplierCode'] - //生产日期 到货日期 默认当天 - newRow['produceDate'] = dayjs().valueOf() - newRow['arriveDate'] = dayjs().valueOf() - //批次 - newRow['batch'] = formatDate(newRow['produceDate'],'YYYYMMDD'); - newRow['defaultToLocationCode'] =row['defaultLocation'] - tableData.value.push(newRow) if(isEnter){ //回车--供应商代码 const setV = {} setV['poNumber'] = number setV['supplierCode'] = row.supplierCode formRef.value.formRef.setValues(setV) - } }) //有效期 diff --git a/src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRecordMain/index.vue b/src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRecordMain/index.vue index fc338441d..4303e7e04 100644 --- a/src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRecordMain/index.vue +++ b/src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRecordMain/index.vue @@ -167,8 +167,14 @@ const handleExport = async () => { await message.exportConfirm() // 发起导出 exportLoading.value = true - const data = await PurchasereturnRecordMainApi.exportPurchasereturnRecordMain(tableObject.params) - download.excel(data, `${t('ts.采购退货记录主')}.xlsx`) + if(routeName.value.includes('SCP')){ + const data = await PurchasereturnRecordMainApi.exportPurchasereturnRecordMainSCP(tableObject.params) + download.excel(data, `${t('ts.采购退货记录主')}.xlsx`) + }else{ + const data = await PurchasereturnRecordMainApi.exportPurchasereturnRecordMain(tableObject.params) + download.excel(data, `${t('ts.采购退货记录主')}.xlsx`) + } + } catch { } finally { exportLoading.value = false diff --git a/src/views/wms/purchasereceiptManage/supplierdeliver/purchaseMain/index.vue b/src/views/wms/purchasereceiptManage/supplierdeliver/purchaseMain/index.vue index 6c969f4c1..5cb88ff55 100644 --- a/src/views/wms/purchasereceiptManage/supplierdeliver/purchaseMain/index.vue +++ b/src/views/wms/purchasereceiptManage/supplierdeliver/purchaseMain/index.vue @@ -146,7 +146,9 @@ console.log('PurchaseMain.allSchemas.searchSchema',PurchaseMain.allSchemas.searc if(val.length>0){ //frm表单回显 const setV = {} - tableData.value = [] // 清空子表数据 + if(val[0]['supplierCode']!=formRef.formModel.supplierCode){ + tableData.value = [] // 清空子表数据 + } setV['contactName']=val[0]['contacts'] setV['contactPhone']=val[0]['phone'] setV['contactEmail']=val[0]['email'] diff --git a/src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/index.vue b/src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/index.vue index 37ac30524..1f761bc82 100644 --- a/src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/index.vue +++ b/src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/index.vue @@ -395,6 +395,7 @@ const handleImport = () => { /** 添加/修改操作 */ const formRef = ref() const openForm = async (type : string, row ?: number) => { + if(row&&row.procurementCreator) row.procurementCreator = Number(row.procurementCreator) // 校验是否可以开票 SupplierinvoiceRequestMainApi.checkInvoicingCalendar({}).then(res => { if(res.flag){ @@ -743,6 +744,9 @@ const importSuccess = () => { let id = res[i]; handleSupplierdeliverRecordPrint(id); } + }else{ + message.warning(t('ts.非SCP订单无法打印')) + return; } }) } diff --git a/src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/supplierinvoiceRequestMain.data.ts b/src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/supplierinvoiceRequestMain.data.ts index 73c75ff0d..28b34d9d1 100644 --- a/src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/supplierinvoiceRequestMain.data.ts +++ b/src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/supplierinvoiceRequestMain.data.ts @@ -28,6 +28,7 @@ const requestsettingData = data?.list[0] || {} userDept.id = userDept.id.toString() const userDeptArray:any = [userDept] + const procurementCreators = await SupplierinvoiceRequestMainApi.queryUserInfoByRoleCode({ roleCode: 'purchase',pageSize: 1000,pageNo: 1,sort: '',by: 'ASC' }) /** * @returns {Array} 采购员列表 */ @@ -153,7 +154,7 @@ export const SupplierinvoiceRequestMain = useCrudSchemas(reactive( { label: '订单类型', field: 'orderType', - dictType: DICT_TYPE.PURCHASE_ORDER_TYPE, + dictType: DICT_TYPE.PURCHASE_INVOICE_ORDER_TYPE, dictClass: 'string', isTable: false, sort: 'custom', @@ -514,25 +515,44 @@ export const SupplierinvoiceRequestMain = useCrudSchemas(reactive( width: 150 }, isForm: true, + isTable: false, form: { - // labelMessage: '信息提示说明!!!', + component: 'Select', + api: () => procurementCreators.list, componentProps: { - isSearchList: true, // 开启查询弹窗 - hiddenFilterButton:true,//是否隐藏筛选按钮 - dialogWidth:'665px',//搜索出来弹窗的宽度 - searchListPlaceholder: '请选择采购员', // 输入框占位文本 - searchField: 'id', // 查询弹窗赋值字段 - searchTitle: '采购员信息', // 查询弹窗标题 - searchAllSchemas: PurchaseMemberInfo.allSchemas, // 查询弹窗所需类 - searchPage: SupplierinvoiceRequestMainApi.queryUserInfoByRoleCode, // 查询弹窗所需分页方法 - searchCondition: [{ - key: 'roleCode', // 查询列表中字段 - value: 'purchase', // 指查询具体值 - isMainValue: false // 表示查询条件不是主表的字段的值 - }] - } + optionsAlias: { + labelField: 'nickname', + valueField: 'id' + } + }, + // labelMessage: '信息提示说明!!!', + // componentProps: { + // isSearchList: true, // 开启查询弹窗 + // hiddenFilterButton:true,//是否隐藏筛选按钮 + // dialogWidth:'665px',//搜索出来弹窗的宽度 + // searchListPlaceholder: '请选择采购员', // 输入框占位文本 + // searchField: 'id', // 查询弹窗赋值字段 + // searchTitle: '采购员信息', // 查询弹窗标题 + // searchAllSchemas: PurchaseMemberInfo.allSchemas, // 查询弹窗所需类 + // searchPage: SupplierinvoiceRequestMainApi.queryUserInfoByRoleCode, // 查询弹窗所需分页方法 + // searchCondition: [{ + // key: 'roleCode', // 查询列表中字段 + // value: 'purchase', // 指查询具体值 + // isMainValue: false // 表示查询条件不是主表的字段的值 + // }] + // } } }, + { + label: '采购价格审批人', + field: 'procurementCreatorName', + sortTableDefault:1003, + table: { + width: 150 + }, + isTable:true, + isForm: false, + }, { label: '采购审批时间', field: 'procurementCreateTime', @@ -711,6 +731,20 @@ export const SupplierinvoiceRequestMain = useCrudSchemas(reactive( } ])) +const singlePriceFormart = (row, column, cellValue) => { + cellValue= Number(cellValue).toFixed(5) + cellValue = cellValue + '' || '' + + let x = cellValue.split('.') + let x1 = x[0] + let x2 = x.length > 1 ? '.' + x[1] : '' + const reg = /(\d+)(\d{3})/ + while(reg.test(x1)){ + x1 = x1.replace(reg, '$1,$2') + } + return x1+x2 +} + function validateTaxRate(rule, value, callback) { if (value>0) { callback() @@ -893,7 +927,7 @@ export const SupplierinvoiceRequestDetail = useCrudSchemas(reactive