diff --git a/src/api/wms/unitConversion/index.ts b/src/api/wms/unitConversion/index.ts new file mode 100644 index 000000000..1c43bd535 --- /dev/null +++ b/src/api/wms/unitConversion/index.ts @@ -0,0 +1,57 @@ +import request from '@/config/axios' + +export interface UnitConversionVO { + id: number + itemCode: string + uom: string + purchaseUom: string + convertRate: number + available: string + remark: string +} + +// 查询品番单位转换表(WMS)列表 +export const getUnitConversionPage = async (params) => { + if (params.isSearch) { + delete params.isSearch + const data = {...params} + return await request.post({ url: '/wms/unit-conversion/senior', data }) + } else { + return await request.get({ url: `/wms/unit-conversion/page`, params }) + } +} + +// 查询品番单位转换表(WMS)详情 +export const getUnitConversion = async (id: number) => { + return await request.get({ url: `/wms/unit-conversion/get?id=` + id }) +} + +// 新增品番单位转换表(WMS) +export const createUnitConversion = async (data: UnitConversionVO) => { + return await request.post({ url: `/wms/unit-conversion/create`, data }) +} + +// 修改品番单位转换表(WMS) +export const updateUnitConversion = async (data: UnitConversionVO) => { + return await request.put({ url: `/wms/unit-conversion/update`, data }) +} + +// 删除品番单位转换表(WMS) +export const deleteUnitConversion = async (id: number) => { + return await request.delete({ url: `/wms/unit-conversion/delete?id=` + id }) +} + +// 导出品番单位转换表(WMS) Excel +export const exportUnitConversion = async (params) => { + if (params.isSearch) { + const data = {...params} + return await request.downloadPost({ url: `/wms/unit-conversion/export-excel-senior`, data }) + } else { + return await request.download({ url: `/wms/unit-conversion/export-excel`, params }) + } +} + +// 下载用户导入模板 +export const importTemplate = () => { + return request.download({ url: '/wms/unit-conversion/get-import-template' }) +} \ No newline at end of file diff --git a/src/views/wms/basicDataManage/itemManage/unitConversion/index.vue b/src/views/wms/basicDataManage/itemManage/unitConversion/index.vue new file mode 100644 index 000000000..f193d68b5 --- /dev/null +++ b/src/views/wms/basicDataManage/itemManage/unitConversion/index.vue @@ -0,0 +1,244 @@ + + + diff --git a/src/views/wms/basicDataManage/itemManage/unitConversion/unitConversion.data.ts b/src/views/wms/basicDataManage/itemManage/unitConversion/unitConversion.data.ts new file mode 100644 index 000000000..7d6d6210a --- /dev/null +++ b/src/views/wms/basicDataManage/itemManage/unitConversion/unitConversion.data.ts @@ -0,0 +1,171 @@ +import type { CrudSchema } from '@/hooks/web/useCrudSchemas' +import { dateFormatter } from '@/utils/formatTime' + +// 表单校验 +export const UnitConversionRules = reactive({ + itemCode: [required], + uom: [required], + purchaseUom: [required], + convertRate: [required], +}) + +export const UnitConversion = useCrudSchemas(reactive([ + { + label: 'id', + field: 'id', + sort: 'custom', + isTable: false, + isForm: false, + }, + { + label: '品番', + field: 'itemCode', + sort: 'custom', + isSearch: true, + }, + { + label: '背番', + field: 'backNumber', + hiddenSearchHigh:true, + sort: 'custom', + isSearch: true, + }, + { + label: '计量单位', + field: 'uom', + sort: 'custom', + dictType: DICT_TYPE.UOM, + dictClass: 'string', // 默认都是字符串类型其他暂不考虑 + isSearch: true, + form: { + component: 'SelectV2' + }, + }, + { + label: '采购计量单位', + field: 'purchaseUom', + sort: 'custom', + dictType: DICT_TYPE.UOM, + dictClass: 'string', // 默认都是字符串类型其他暂不考虑 + isSearch: true, + form: { + component: 'SelectV2' + }, + }, + { + label: '转换率', + field: 'convertRate', + sort: 'custom', + }, + { + label: '是否可用', + field: 'available', + sort: 'custom', + isTable: false, + }, + // { + // label: '备注', + // field: 'remark', + // sort: 'custom', + // }, + { + label: '创建者', + field: 'creator', + isForm: false, + isTable: true, + table: { + width: 180 + }, + }, + { + 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')] + } + }, + form: { + component: 'DatePicker', + componentProps: { + style: {width:'100%'}, + type: 'datetime', + dateFormat: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'x', + } + } + }, + { + label: '最后更新者', + field: 'updater', + isDetail: true, + isForm: false, + isTable: true, + table: { + width: 180 + }, + }, + { + label: '最后更新时间', + field: 'updateTime', + sort: 'custom', + isTable: true, + isDetail: true, + formatter: dateFormatter, + isForm: false, + detail: { + dateFormat: 'YYYY-MM-DD HH:mm:ss' + }, + table: { + width: 180 + }, + form: { + component: 'DatePicker', + componentProps: { + style: {width:'100%'}, + type: 'datetime', + dateFormat: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'x', + } + } + }, + + // { + // label: '创建时间', + // field: 'createTime', + // sort: 'custom', + // isTable: true, + // formatter: dateFormatter, + // isForm: false, + // detail: { + // dateFormat: 'YYYY-MM-DD HH:mm:ss' + // }, + // table: { + // width: 180 + // }, + // form: { + // component: 'DatePicker', + // componentProps: { + // style: {width:'100%'}, + // type: 'datetime', + // dateFormat: 'YYYY-MM-DD HH:mm:ss', + // valueFormat: 'x', + // } + // } + // }, + // { + // label: '操作', + // field: 'action', + // isForm: false, + // table: { + // width: 150, + // fixed: 'right' + // } + // } +])) diff --git a/src/views/wms/countManage/count/countRequestMain/countRequestMain.data.ts b/src/views/wms/countManage/count/countRequestMain/countRequestMain.data.ts index 4c979636c..e68425b7b 100644 --- a/src/views/wms/countManage/count/countRequestMain/countRequestMain.data.ts +++ b/src/views/wms/countManage/count/countRequestMain/countRequestMain.data.ts @@ -411,6 +411,7 @@ export const CountRequestDetail = useCrudSchemas(reactive([ label: '背番', field: 'itemDesc1', sort: 'custom', + hiddenSearchHigh:true, table: { width: 150 }, diff --git a/src/views/wms/countManage/countadjust/countadjustRecordMain/countadjustRecordMain.data.ts b/src/views/wms/countManage/countadjust/countadjustRecordMain/countadjustRecordMain.data.ts index a5079c34d..f77c44782 100644 --- a/src/views/wms/countManage/countadjust/countadjustRecordMain/countadjustRecordMain.data.ts +++ b/src/views/wms/countManage/countadjust/countadjustRecordMain/countadjustRecordMain.data.ts @@ -333,6 +333,7 @@ export const CountadjustRecordDetail = useCrudSchemas(reactive([ label: '背番', field: 'itemDesc1', sort: 'custom', + hiddenSearchHigh:true, table: { width: 150 }, diff --git a/src/views/wms/countManage/countadjust/countadjustRequestMain/countadjustRequestMain.data.ts b/src/views/wms/countManage/countadjust/countadjustRequestMain/countadjustRequestMain.data.ts index e9acaff7c..2e0425e8a 100644 --- a/src/views/wms/countManage/countadjust/countadjustRequestMain/countadjustRequestMain.data.ts +++ b/src/views/wms/countManage/countadjust/countadjustRequestMain/countadjustRequestMain.data.ts @@ -389,6 +389,7 @@ export const CountadjustRequestDetail = useCrudSchemas(reactive([ label: '背番', field: 'itemDesc1', sort: 'custom', + hiddenSearchHigh:true, table: { width: 150 }, diff --git a/src/views/wms/deliversettlementManage/customerSaleInvoiceRecordMain/customerSaleInvoiceRecordMain.data.ts b/src/views/wms/deliversettlementManage/customerSaleInvoiceRecordMain/customerSaleInvoiceRecordMain.data.ts index bf02b7f9d..6f3a6a436 100644 --- a/src/views/wms/deliversettlementManage/customerSaleInvoiceRecordMain/customerSaleInvoiceRecordMain.data.ts +++ b/src/views/wms/deliversettlementManage/customerSaleInvoiceRecordMain/customerSaleInvoiceRecordMain.data.ts @@ -350,6 +350,25 @@ export const CustomerSaleInvoiceDetail = useCrudSchemas(reactive([ // } }, + { + label: '背番', + field: 'backNumber', + sort: 'custom', + isSearch: true, +isForm:false, +hiddenSearchHigh:true, + table: { + width: 150 + }, +form:{ + componentProps:{ + disabled: true, + } + }, + tableForm:{ + disabled:true + } + }, { label: '品号', field: 'articleNumber', diff --git a/src/views/wms/deliversettlementManage/customerSaleInvoiceRequestMain/customerSaleInvoiceRequestMain.data.ts b/src/views/wms/deliversettlementManage/customerSaleInvoiceRequestMain/customerSaleInvoiceRequestMain.data.ts index 1df99173c..b6092b8db 100644 --- a/src/views/wms/deliversettlementManage/customerSaleInvoiceRequestMain/customerSaleInvoiceRequestMain.data.ts +++ b/src/views/wms/deliversettlementManage/customerSaleInvoiceRequestMain/customerSaleInvoiceRequestMain.data.ts @@ -379,6 +379,25 @@ export const CustomerSaleInvoiceDetail = useCrudSchemas(reactive([ // } }, + { + label: '背番', + field: 'backNumber', + sort: 'custom', + isSearch: true, +isForm:false, +hiddenSearchHigh:true, + table: { + width: 150 + }, +form:{ + componentProps:{ + disabled: true, + } + }, + tableForm:{ + disabled:true + } + }, { label: '品号', field: 'articleNumber', diff --git a/src/views/wms/deliversettlementManage/deliverPdaRecordMain/deliverRecordMain/deliverRecordMain.data.ts b/src/views/wms/deliversettlementManage/deliverPdaRecordMain/deliverRecordMain/deliverRecordMain.data.ts index 03795ba93..038302597 100644 --- a/src/views/wms/deliversettlementManage/deliverPdaRecordMain/deliverRecordMain/deliverRecordMain.data.ts +++ b/src/views/wms/deliversettlementManage/deliverPdaRecordMain/deliverRecordMain/deliverRecordMain.data.ts @@ -275,7 +275,8 @@ export const DeliverRecordDetail = useCrudSchemas(reactive([ table: { width: 150 }, - hiddenInMain: true + isTableForm: false, + isForm: false }, { label: '描述', diff --git a/src/views/wms/deliversettlementManage/deliverplan/deliverPlanMain/deliverPlanMain.data.ts b/src/views/wms/deliversettlementManage/deliverplan/deliverPlanMain/deliverPlanMain.data.ts index b0b2ecff8..0773a3858 100644 --- a/src/views/wms/deliversettlementManage/deliverplan/deliverPlanMain/deliverPlanMain.data.ts +++ b/src/views/wms/deliversettlementManage/deliverplan/deliverPlanMain/deliverPlanMain.data.ts @@ -655,7 +655,8 @@ export const DeliverPlanDetail = useCrudSchemas(reactive([ minWidth: 150 }, isTableForm: false, - isForm: false + isForm: false, + hiddenSearchHigh: true }, { label: '计划数量', @@ -975,7 +976,8 @@ export const DeliverPlanDetailRequest = useCrudSchemas(reactive([ width: 150 }, isTableForm: false, - isForm: false + isForm: false, + hiddenSearchHigh:true }, { label: '计划数量', diff --git a/src/views/wms/deliversettlementManage/deliverplan/saleMain/saleMain.data.ts b/src/views/wms/deliversettlementManage/deliverplan/saleMain/saleMain.data.ts index 159b008ee..9d3a42f7d 100644 --- a/src/views/wms/deliversettlementManage/deliverplan/saleMain/saleMain.data.ts +++ b/src/views/wms/deliversettlementManage/deliverplan/saleMain/saleMain.data.ts @@ -626,6 +626,7 @@ export const SaleDetail = useCrudSchemas(reactive([ label: '背番', field: 'itemDesc1', sort: 'custom', + hiddenSearchHigh:true, table: { width: 150 }, diff --git a/src/views/wms/deliversettlementManage/directSupplyPinRecordMain/deliverRecordMain/deliverRecordMain.data.ts b/src/views/wms/deliversettlementManage/directSupplyPinRecordMain/deliverRecordMain/deliverRecordMain.data.ts index cc2438032..2342adb94 100644 --- a/src/views/wms/deliversettlementManage/directSupplyPinRecordMain/deliverRecordMain/deliverRecordMain.data.ts +++ b/src/views/wms/deliversettlementManage/directSupplyPinRecordMain/deliverRecordMain/deliverRecordMain.data.ts @@ -329,7 +329,8 @@ export const DeliverRecordDetail = useCrudSchemas(reactive([ table: { width: 150 }, - hiddenInMain: true + isTableForm: false, + isForm: false }, { label: '描述', diff --git a/src/views/wms/deliversettlementManage/ftSuppliesRecordMain/deliverRecordMain/deliverRecordMain.data.ts b/src/views/wms/deliversettlementManage/ftSuppliesRecordMain/deliverRecordMain/deliverRecordMain.data.ts index e7a3cd1df..70d8c6923 100644 --- a/src/views/wms/deliversettlementManage/ftSuppliesRecordMain/deliverRecordMain/deliverRecordMain.data.ts +++ b/src/views/wms/deliversettlementManage/ftSuppliesRecordMain/deliverRecordMain/deliverRecordMain.data.ts @@ -272,7 +272,8 @@ export const DeliverRecordDetail = useCrudSchemas(reactive([ table: { width: 150 }, - hiddenInMain: true + isTableForm: false, + isForm: false }, { label: '描述', diff --git a/src/views/wms/deliversettlementManage/inducedProduct/deliverRecordMain/deliverRecordMain.data.ts b/src/views/wms/deliversettlementManage/inducedProduct/deliverRecordMain/deliverRecordMain.data.ts index 5cf345dac..95d338743 100644 --- a/src/views/wms/deliversettlementManage/inducedProduct/deliverRecordMain/deliverRecordMain.data.ts +++ b/src/views/wms/deliversettlementManage/inducedProduct/deliverRecordMain/deliverRecordMain.data.ts @@ -596,8 +596,9 @@ export const DeliverRecordDetail = useCrudSchemas(reactive([ table: { width: 150 }, - hiddenInMain: true, isTableForm: false, + isSearch: true, + isForm: false }, { label: '描述', diff --git a/src/views/wms/deliversettlementManage/saleShipmentMainRecord/saleShipmentMainRecord.data.ts b/src/views/wms/deliversettlementManage/saleShipmentMainRecord/saleShipmentMainRecord.data.ts index 04f1bc054..d4a2f3487 100644 --- a/src/views/wms/deliversettlementManage/saleShipmentMainRecord/saleShipmentMainRecord.data.ts +++ b/src/views/wms/deliversettlementManage/saleShipmentMainRecord/saleShipmentMainRecord.data.ts @@ -304,7 +304,20 @@ export const SaleShipmentDetailRecord = useCrudSchemas(reactive([ label: '背番', field: 'itemDesc1', sort: 'custom', - isTable:false + isSearch: true, +isForm:false, +hiddenSearchHigh:true, + table: { + width: 150 + }, +tableForm:{ + disabled:true + }, +form:{ + componentProps:{ + disabled: true, + } + } }, { label: '描述', diff --git a/src/views/wms/deliversettlementManage/saleShipmentMainRequest/saleShipmentMain.data.ts b/src/views/wms/deliversettlementManage/saleShipmentMainRequest/saleShipmentMain.data.ts index 53ec78613..501bb1637 100644 --- a/src/views/wms/deliversettlementManage/saleShipmentMainRequest/saleShipmentMain.data.ts +++ b/src/views/wms/deliversettlementManage/saleShipmentMainRequest/saleShipmentMain.data.ts @@ -407,6 +407,25 @@ export const SaleShipmentDetail = useCrudSchemas(reactive([ width: 150 }, }, + { + label: '背番', + field: 'itemDesc1', + sort: 'custom', + isSearch: true, +isForm:false, +hiddenSearchHigh:true, + table: { + width: 150 + }, +tableForm:{ + disabled:true + }, +form:{ + componentProps:{ + disabled: true, + } + } + }, { label: '批次', field: 'batch', diff --git a/src/views/wms/deliversettlementManage/ssSuppliesRecordMain/deliverRecordMain/deliverRecordMain.data.ts b/src/views/wms/deliversettlementManage/ssSuppliesRecordMain/deliverRecordMain/deliverRecordMain.data.ts index 478811166..ebddd865f 100644 --- a/src/views/wms/deliversettlementManage/ssSuppliesRecordMain/deliverRecordMain/deliverRecordMain.data.ts +++ b/src/views/wms/deliversettlementManage/ssSuppliesRecordMain/deliverRecordMain/deliverRecordMain.data.ts @@ -351,7 +351,8 @@ export const DeliverRecordDetail = useCrudSchemas(reactive([ table: { width: 150 }, - hiddenInMain: true + isTableForm: false, + isForm: false }, { label: '描述', diff --git a/src/views/wms/deliversettlementManage/stockup/stockupMainRequest/stockupMainRequest.data.ts b/src/views/wms/deliversettlementManage/stockup/stockupMainRequest/stockupMainRequest.data.ts index 1de98e3b1..bc4bcee35 100644 --- a/src/views/wms/deliversettlementManage/stockup/stockupMainRequest/stockupMainRequest.data.ts +++ b/src/views/wms/deliversettlementManage/stockup/stockupMainRequest/stockupMainRequest.data.ts @@ -708,11 +708,11 @@ export const StockupDetailRequest = useCrudSchemas(reactive([ label: '背番', field: 'itemDesc1', sort: 'custom', - isTableForm: false, table: { - width: 120 + width: 150 }, - hiddenInMain: true + isTableForm: false, + isForm: false }, { label: '描述', diff --git a/src/views/wms/deliversettlementManage/tjdtSuppliesRecordMain/deliverRecordMain/deliverRecordMain.data.ts b/src/views/wms/deliversettlementManage/tjdtSuppliesRecordMain/deliverRecordMain/deliverRecordMain.data.ts index 9e41f03af..1e22a5e60 100644 --- a/src/views/wms/deliversettlementManage/tjdtSuppliesRecordMain/deliverRecordMain/deliverRecordMain.data.ts +++ b/src/views/wms/deliversettlementManage/tjdtSuppliesRecordMain/deliverRecordMain/deliverRecordMain.data.ts @@ -264,7 +264,8 @@ export const DeliverRecordDetail = useCrudSchemas(reactive([ table: { width: 150 }, - hiddenInMain: true + isTableForm: false, + isForm: false }, { label: '描述', diff --git a/src/views/wms/inventoryManage/expectin/expectin.data.ts b/src/views/wms/inventoryManage/expectin/expectin.data.ts index 0bca62df5..264199338 100644 --- a/src/views/wms/inventoryManage/expectin/expectin.data.ts +++ b/src/views/wms/inventoryManage/expectin/expectin.data.ts @@ -38,6 +38,7 @@ export const Expectin = useCrudSchemas(reactive([ width: 150 }, isSearch: true, + hiddenSearchHigh: true }, { label: '批次', diff --git a/src/views/wms/inventoryManage/expectout/expectout.data.ts b/src/views/wms/inventoryManage/expectout/expectout.data.ts index aa209337c..1d9136dc9 100644 --- a/src/views/wms/inventoryManage/expectout/expectout.data.ts +++ b/src/views/wms/inventoryManage/expectout/expectout.data.ts @@ -38,6 +38,7 @@ export const Expectout = useCrudSchemas(reactive([ width: 150 }, isSearch: true, + hiddenSearchHigh: true }, { label: '包装号', diff --git a/src/views/wms/inventoryManage/transaction/transaction.data.ts b/src/views/wms/inventoryManage/transaction/transaction.data.ts index b59d93d93..bf377b82b 100644 --- a/src/views/wms/inventoryManage/transaction/transaction.data.ts +++ b/src/views/wms/inventoryManage/transaction/transaction.data.ts @@ -98,6 +98,18 @@ export const Transaction = useCrudSchemas(reactive([ }, isSearch: true, }, + { + label: '背番', + field: 'itemDesc1', + sort: 'custom', + table: { + width: 150 + }, + isTableForm: false, + isForm: false, + isSearch: true, + hiddenSearchHigh: true + }, { label: '数量', field: 'qty', diff --git a/src/views/wms/inventoryManage/transferlog/transferlog.data.ts b/src/views/wms/inventoryManage/transferlog/transferlog.data.ts index 9f20592e5..c27d2de17 100644 --- a/src/views/wms/inventoryManage/transferlog/transferlog.data.ts +++ b/src/views/wms/inventoryManage/transferlog/transferlog.data.ts @@ -55,6 +55,18 @@ export const Transferlog = useCrudSchemas(reactive([ }, isSearch: true, }, + { + label: '背番', + field: 'itemDesc1', + sort: 'custom', + table: { + width: 150 + }, + isTableForm: false, + isForm: false, + isSearch: true, + hiddenSearchHigh: true + }, { label: '数量', field: 'qty', diff --git a/src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRequestMain/unplannedreceiptRequestMain.data.ts b/src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRequestMain/unplannedreceiptRequestMain.data.ts index e82073ed5..08e7cc0c4 100644 --- a/src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRequestMain/unplannedreceiptRequestMain.data.ts +++ b/src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRequestMain/unplannedreceiptRequestMain.data.ts @@ -45,6 +45,7 @@ const queryParams = { // 获取当前操作人的部门 import { useUserStore } from '@/store/modules/user' import { TableColumn } from '@/types/table' +import { table } from 'console' const userStore = useUserStore() const userDept = userStore.userSelfInfo.dept // id 转str 否则form回显匹配不到 @@ -1520,8 +1521,12 @@ export const UnplannedreceiptRequestDetailLabel = useCrudSchemas(reactive( } } }, - { - label: '背番', - field: 'backNumber', - sort: 'custom', - table: { - width: 150 - }, - tableForm: { - disabled: true - }, - form: { - componentProps: { - disabled: true - } - } - }, + // { + // label: '背番', + // field: 'backNumber', + // sort: 'custom', + // table: { + // width: 150 + // }, + // tableForm: { + // disabled: true, + // isPlaceholder:false + // }, + // form: { + // componentProps: { + // disabled: true + // } + // } + // }, { label: '批次', field: 'batch', diff --git a/src/views/wms/purchasereceiptManage/supplierdeliver/purchaseMain/purchaseMain.data.ts b/src/views/wms/purchasereceiptManage/supplierdeliver/purchaseMain/purchaseMain.data.ts index a6f67b895..1784ec0be 100644 --- a/src/views/wms/purchasereceiptManage/supplierdeliver/purchaseMain/purchaseMain.data.ts +++ b/src/views/wms/purchasereceiptManage/supplierdeliver/purchaseMain/purchaseMain.data.ts @@ -250,7 +250,7 @@ export const PurchaseMain = useCrudSchemas(reactive([ }, { label: '订单备注', - field: 'poRmks', + field: 'remark', sort: 'custom', isTable: false, isForm:false,