diff --git a/src/api/wms/containerBindRecordDetail/index.ts b/src/api/wms/containerBindRecordDetail/index.ts new file mode 100644 index 000000000..6b702797c --- /dev/null +++ b/src/api/wms/containerBindRecordDetail/index.ts @@ -0,0 +1,57 @@ +import request from '@/config/axios' + +export interface ContainerBindRecordDetailVO { + id: number + containerContentType: string + contentNumber: string + itemCode: string + batch: string + inventoryStatus: string + uom: string + qty: number + masterId: number + number: string + siteId: string + remark: string +} + +// 查询器具绑定记录子列表 +export const getContainerBindRecordDetailPage = async (params) => { + if (params.isSearch) { + delete params.isSearch + const data = {...params} + return await request.post({ url: '/wms/container-bind-record-detail/senior', data }) + } else { + return await request.get({ url: `/wms/container-bind-record-detail/page`, params }) + } +} + +// 查询器具绑定记录子详情 +export const getContainerBindRecordDetail = async (id: number) => { + return await request.get({ url: `/wms/container-bind-record-detail/get?id=` + id }) +} + +// 新增器具绑定记录子 +export const createContainerBindRecordDetail = async (data: ContainerBindRecordDetailVO) => { + return await request.post({ url: `/wms/container-bind-record-detail/create`, data }) +} + +// 修改器具绑定记录子 +export const updateContainerBindRecordDetail = async (data: ContainerBindRecordDetailVO) => { + return await request.put({ url: `/wms/container-bind-record-detail/update`, data }) +} + +// 删除器具绑定记录子 +export const deleteContainerBindRecordDetail = async (id: number) => { + return await request.delete({ url: `/wms/container-bind-record-detail/delete?id=` + id }) +} + +// 导出器具绑定记录子 Excel +export const exportContainerBindRecordDetail = async (params) => { + return await request.download({ url: `/wms/container-bind-record-detail/export-excel`, params }) +} + +// 下载用户导入模板 +export const importTemplate = () => { + return request.download({ url: '/wms/container-bind-record-detail/get-import-template' }) +} \ No newline at end of file diff --git a/src/api/wms/containerBindRecordMain/index.ts b/src/api/wms/containerBindRecordMain/index.ts new file mode 100644 index 000000000..7fa35ac2d --- /dev/null +++ b/src/api/wms/containerBindRecordMain/index.ts @@ -0,0 +1,69 @@ +import request from '@/config/axios' + +export interface ContainerBindRecordMainVO { + id: number + number: string + containerNumber: string + fromWarehouseCode: string + toWarehouseCode: string + outTransactionType: string + inTransactionType: string + executeTime: Date + activeDate: Date + available: string + requestTime: Date + dueTime: Date + departmentCode: string + userGroupCode: string + interfaceType: string + businessType: string + remark: string + extraProperties: string + siteId: string + code: string + fromLocationTypes: string + toLocationTypes: string + fromAreaCodes: string + toAreaCodes: string +} + +// 查询器具绑定记录主列表 +export const getContainerBindRecordMainPage = async (params) => { + if (params.isSearch) { + delete params.isSearch + const data = {...params} + return await request.post({ url: '/wms/container-bind-record-main/senior', data }) + } else { + return await request.get({ url: `/wms/container-bind-record-main/page`, params }) + } +} + +// 查询器具绑定记录主详情 +export const getContainerBindRecordMain = async (id: number) => { + return await request.get({ url: `/wms/container-bind-record-main/get?id=` + id }) +} + +// 新增器具绑定记录主 +export const createContainerBindRecordMain = async (data: ContainerBindRecordMainVO) => { + return await request.post({ url: `/wms/container-bind-record-main/create`, data }) +} + +// 修改器具绑定记录主 +export const updateContainerBindRecordMain = async (data: ContainerBindRecordMainVO) => { + return await request.put({ url: `/wms/container-bind-record-main/update`, data }) +} + +// 删除器具绑定记录主 +export const deleteContainerBindRecordMain = async (id: number) => { + return await request.delete({ url: `/wms/container-bind-record-main/delete?id=` + id }) +} + +// 导出器具绑定记录主 Excel +export const exportContainerBindRecordMain = async (params) => { + return await request.download({ url: `/wms/container-bind-record-main/export-excel`, params }) +} + +// 下载用户导入模板 +export const importTemplate = () => { + return request.download({ url: '/wms/container-bind-record-main/get-import-template' }) +} \ No newline at end of file diff --git a/src/views/wms/inventoryManage/containerinit/containerBindRecord/containerBindRecordMain.data.ts b/src/views/wms/inventoryManage/containerinit/containerBindRecord/containerBindRecordMain.data.ts new file mode 100644 index 000000000..a2ed3a301 --- /dev/null +++ b/src/views/wms/inventoryManage/containerinit/containerBindRecord/containerBindRecordMain.data.ts @@ -0,0 +1,165 @@ +import type { CrudSchema } from '@/hooks/web/useCrudSchemas' +import { dateFormatter } from '@/utils/formatTime' + +// 表单校验 +export const ContainerBindRecordMainRules = reactive({ +}) + +export const ContainerBindRecordMain = useCrudSchemas(reactive([ + { + label: '单据号', + field: 'number', + sort: 'custom', + isSearch: true, + }, + { + label: '器具号', + field: 'containerNumber', + sort: 'custom', + isSearch: true, + }, + { + label: '仓库代码', + field: 'fromWarehouseCode', + sort: 'custom', + }, + { + label: '部门', + field: 'departmentCode', + sort: 'custom', + }, + { + label: '创建时间', + field: 'createTime', + sort: 'custom', + formatter: dateFormatter, + isForm: false, + }, + { + label: '操作', + field: 'action', + isForm: false, + table: { + width: 150, + fixed: 'right' + } + } +])) + + +// 表单校验 +export const ContainerBindRecordDetailRules = reactive({ + +}) + +export const ContainerBindRecordDetail = useCrudSchemas(reactive([ + { + label: '单据号', + field: 'number', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '内容物类型', + field: 'containerContentType', + sort: 'custom', + isSearch: true, + form: { + component: 'SelectV2' + }, + table: { + width: 150 + } + }, + { + label: '内容物号', + field: 'contentNumber', + sort: 'custom', + isSearch: true, + table: { + width: 150 + } + }, + { + label: '物料代码', + field: 'itemCode', + sort: 'custom', + isSearch: true, + table: { + width: 150 + } + }, + { + label: '批次', + field: 'batch', + sort: 'custom', + isSearch: true, + table: { + width: 150 + } + }, + { + label: '库存状态', + field: 'inventoryStatus', + sort: 'custom', + form: { + component: 'Radio' + }, + table: { + width: 150 + } + }, + { + label: '计量单位', + field: 'uom', + sort: 'custom', + table: { + width: 150 + } + }, + { + label: '数量', + field: 'qty', + sort: 'custom', + table: { + width: 150 + } + }, + { + label: '创建时间', + field: 'createTime', + sort: 'custom', + formatter: dateFormatter, + table: { + width: 150 + }, + search: { + component: 'DatePicker', + componentProps: { + valueFormat: 'YYYY-MM-DD HH:mm:ss', + type: 'daterange', + defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] + } + }, + isForm: false, + }, + { + label: '备注', + field: 'remark', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '操作', + field: 'action', + isForm: false, + table: { + width: 150, + fixed: 'right' + } + } +])) diff --git a/src/views/wms/inventoryManage/containerinit/containerBindRecord/index.vue b/src/views/wms/inventoryManage/containerinit/containerBindRecord/index.vue new file mode 100644 index 000000000..d48823fab --- /dev/null +++ b/src/views/wms/inventoryManage/containerinit/containerBindRecord/index.vue @@ -0,0 +1,286 @@ + + + diff --git a/src/views/wms/inventoryManage/containerinit/containerinitadd/containerMain.data.ts b/src/views/wms/inventoryManage/containerinit/containerinitadd/containerMain.data.ts index f395202ee..37c395eaa 100644 --- a/src/views/wms/inventoryManage/containerinit/containerinitadd/containerMain.data.ts +++ b/src/views/wms/inventoryManage/containerinit/containerinitadd/containerMain.data.ts @@ -3,6 +3,8 @@ import {Owner} from "@/views/wms/basicDataManage/orderManage/owner/owner.data"; import * as OwnerApi from "@/api/wms/owner"; import {Warehouse} from "@/views/wms/basicDataManage/factoryModeling/warehouse/warehouse.data"; import * as WarehouseApi from "@/api/wms/warehouse"; +import {Balance} from "@/views/wms/inventoryManage/balance/balance.data"; +import * as BalanceApi from "@/api/wms/balance"; // 表单校验 export const ContainerMainRules = reactive({ @@ -47,8 +49,8 @@ export const ContainerMain = useCrudSchemas(reactive([ isSearch: true, }, { - label: '状态', - field: 'status', + label: '器具状态', + field: 'containerStatus', dictType: DICT_TYPE.CONTAINER_STATUS, dictClass: 'string', isTable: true, @@ -157,6 +159,40 @@ export const ContainerDetail = useCrudSchemas(reactive([ table: { width: 150 }, + tableForm:{ + disabled:true, + isInpuFocusShow: true, + earchListPlaceholder: '请选择包装号', + searchField: 'packingNumber', + searchTitle: '库存余额信息', + searchAllSchemas: Balance.allSchemas, + searchPage: BalanceApi.getBalancePage, + searchCondition:[{ + key: 'available', + value: 'TRUE', + isMainValue: false + },{ + key: 'workshopCode', + value: 'workshopCode', + isMainValue: true + }] + }, + form:{ + // labelMessage: '信息提示说明!!!', + componentProps: { + isSearchList: true, // 开启查询弹窗 + searchListPlaceholder: '请选择包装号', + searchField: 'packingNumber', + searchTitle: '库存余额信息', + searchAllSchemas: Balance.allSchemas, + searchPage: BalanceApi.getBalancePage, + searchCondition: [{ + key: 'warehouseCode', + value: 'fromWarehouseCode', + isMainValue: true, + }] + } + } }, { label: '物料代码', @@ -209,6 +245,17 @@ export const ContainerDetail = useCrudSchemas(reactive([ width: 150 }, }, + { + label: '操作', + field: 'action', + isDetail: false, + isForm: false , + table: { + width: 150, + fixed: 'right' + }, + isTableForm:false, + } ])) // 表单校验 diff --git a/src/views/wms/inventoryManage/containerinit/containerinitadd/index.vue b/src/views/wms/inventoryManage/containerinit/containerinitadd/index.vue index cc96b8cf1..3e80e71e6 100644 --- a/src/views/wms/inventoryManage/containerinit/containerinitadd/index.vue +++ b/src/views/wms/inventoryManage/containerinit/containerinitadd/index.vue @@ -57,7 +57,12 @@ :allSchemas="ContainerMain.allSchemas" :detailAllSchemas="ContainerDetail.allSchemas" :detailAllSchemasRules="ContainerDetailRules" + :searchTableParams="searchTableParams" :apiPage="ContainerDetailApi.getContainerDetailPage" + :apiCreate="ContainerDetailApi.createContainerDetail" + :apiUpdate="ContainerDetailApi.updateContainerDetail" + :apiDelete="ContainerDetailApi.deleteContainerDetail" + @searchTableSuccessDetail="searchTableSuccessDetail" /> @@ -167,6 +172,24 @@ const searchTableSuccess = (formField, searchField, val, formRef) => { }) } +// 查询页面返回——详情 +const searchTableSuccessDetail = (formField, searchField, val, formRef ) => { + nextTick(() => { + const setV = {} + if(formField == 'contentNumber'){ + setV['contentNumber'] = val[0]['packingNumber'] + setV['batch'] = val[0]['batch'] + setV['inventoryStatus'] = val[0]['inventoryStatus'] + setV['qty'] = val[0]['qty'] + setV['uom'] = val[0]['uom'] + setV['itemCode'] = val[0]['itemCode'] + }else { + setV[formField] = val[0][searchField] + } + formRef.setValues(setV) + }) +} + /** 详情操作 */ const detailRef = ref() const openDetail = (row: any, titleName: any, titleValue: any) => { diff --git a/src/views/wms/inventoryManage/containerinit/containerinitrecord/index.vue b/src/views/wms/inventoryManage/containerinit/containerinitrecord/index.vue index a386987ca..2171abea4 100644 --- a/src/views/wms/inventoryManage/containerinit/containerinitrecord/index.vue +++ b/src/views/wms/inventoryManage/containerinit/containerinitrecord/index.vue @@ -69,7 +69,6 @@ :apiUpdate="ContainerInitRecordDetailApi.updateContainerInitRecordDetail" :apiPage="ContainerInitRecordDetailApi.getContainerInitRecordDetailPage" :apiDelete="ContainerInitRecordDetailApi.deleteContainerInitRecordDetail" - :Echo="Echo" />