diff --git a/src/api/wms/settlementConfiguration/index.ts b/src/api/wms/settlementConfiguration/index.ts new file mode 100644 index 000000000..6a75bd7c4 --- /dev/null +++ b/src/api/wms/settlementConfiguration/index.ts @@ -0,0 +1,52 @@ +import request from '@/config/axios' + +export interface SettlementConfigurationVO { + id: number + supplierCode: string + itemCode: string + fromWarehouseCode: string + toWarehouseCode: string + remark: string + concurrencyStamp: number +} + +// 查询上线结算配置列表 +export const getSettlementConfigurationPage = async (params) => { + if (params.isSearch) { + delete params.isSearch + const data = {...params} + return await request.post({ url: '/wms/settlement-configuration/senior', data }) + } else { + return await request.get({ url: `/wms/settlement-configuration/page`, params }) + } +} + +// 查询上线结算配置详情 +export const getSettlementConfiguration = async (id: number) => { + return await request.get({ url: `/wms/settlement-configuration/get?id=` + id }) +} + +// 新增上线结算配置 +export const createSettlementConfiguration = async (data: SettlementConfigurationVO) => { + return await request.post({ url: `/wms/settlement-configuration/create`, data }) +} + +// 修改上线结算配置 +export const updateSettlementConfiguration = async (data: SettlementConfigurationVO) => { + return await request.put({ url: `/wms/settlement-configuration/update`, data }) +} + +// 删除上线结算配置 +export const deleteSettlementConfiguration = async (id: number) => { + return await request.delete({ url: `/wms/settlement-configuration/delete?id=` + id }) +} + +// 导出上线结算配置 Excel +export const exportSettlementConfiguration = async (params) => { + return await request.download({ url: `/wms/settlement-configuration/export-excel`, params }) +} + +// 下载用户导入模板 +export const importTemplate = () => { + return request.download({ url: '/wms/settlement-configuration/get-import-template' }) +} \ No newline at end of file diff --git a/src/views/wms/issueManage/onlinesettlement/settlementConfiguration/index.vue b/src/views/wms/issueManage/onlinesettlement/settlementConfiguration/index.vue new file mode 100644 index 000000000..a83603ffd --- /dev/null +++ b/src/views/wms/issueManage/onlinesettlement/settlementConfiguration/index.vue @@ -0,0 +1,244 @@ + + + diff --git a/src/views/wms/issueManage/onlinesettlement/settlementConfiguration/settlementConfiguration.data.ts b/src/views/wms/issueManage/onlinesettlement/settlementConfiguration/settlementConfiguration.data.ts new file mode 100644 index 000000000..0fc48c77b --- /dev/null +++ b/src/views/wms/issueManage/onlinesettlement/settlementConfiguration/settlementConfiguration.data.ts @@ -0,0 +1,105 @@ +import type { CrudSchema } from '@/hooks/web/useCrudSchemas' +import { dateFormatter } from '@/utils/formatTime' + +// 表单校验 +export const SettlementConfigurationRules = reactive({ + concurrencyStamp: [required], +}) + +export const SettlementConfiguration = useCrudSchemas(reactive([ + { + label: 'ID', + field: 'id', + sort: 'custom', + isForm: false, + }, + { + label: '供应商代码', + field: 'supplierCode', + sort: 'custom', + isSearch: true, + }, + { + label: '供应商名称', + field: 'supplierName', + sort: 'custom', + }, + { + label: '物料代码', + field: 'itemCode', + sort: 'custom', + isSearch: true, + }, + { + label: '物品名称', + field: 'itemName', + sort: 'custom', + isSearch: true, + }, + { + label: '物品描述', + field: 'itemDesc1', + sort: 'custom', + }, + { + label: '物品描述2', + field: 'itemDesc2', + sort: 'custom', + isTable: false, + isForm: false, + }, + { + label: '来源仓库', + field: 'fromWarehouseCode', + sort: 'custom', + isSearch: true, + }, + { + label: '目标仓库', + field: 'toWarehouseCode', + sort: 'custom', + isSearch: true, + }, + { + label: '备注', + field: 'remark', + sort: 'custom', + isSearch: true, + }, + { + label: '创建时间', + field: 'createTime', + sort: 'custom', + formatter: dateFormatter, + isSearch: true, + search: { + component: 'DatePicker', + componentProps: { + valueFormat: 'YYYY-MM-DD HH:mm:ss', + type: 'daterange', + defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] + } + }, + isForm: false, + }, + { + label: '并发乐观锁', + field: 'concurrencyStamp', + sort: 'custom', + isSearch: false, + isTable: false, + form: { + component: 'InputNumber', + value: 0 + }, + }, + { + label: '操作', + field: 'action', + isForm: false, + table: { + width: 150, + fixed: 'right' + } + } +]))