From ffe915e768cde2deb6b4e57a462d801350c9324e Mon Sep 17 00:00:00 2001 From: zhang_li <2235006734@qqq.com> Date: Thu, 23 Nov 2023 16:01:08 +0800 Subject: [PATCH 1/3] dafault --- .../supplierdeliver/purchaseMain/purchaseMain.data.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/views/wms/purchasereceiptManage/supplierdeliver/purchaseMain/purchaseMain.data.ts b/src/views/wms/purchasereceiptManage/supplierdeliver/purchaseMain/purchaseMain.data.ts index acabf9312..a3a6f524a 100644 --- a/src/views/wms/purchasereceiptManage/supplierdeliver/purchaseMain/purchaseMain.data.ts +++ b/src/views/wms/purchasereceiptManage/supplierdeliver/purchaseMain/purchaseMain.data.ts @@ -685,7 +685,10 @@ export const PurchaseDetail = useCrudSchemas(reactive([ width: 150 }, tableForm:{ - type:'Select' + type:'Select', + default: 'TRUE', + inactiveValue: 'FALSE', + activeValue: 'TRUE' }, form: { component: 'Switch', From ab0b3507c5be3edafe203049b036c5c81f22e05a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E8=83=9C=E6=A5=A0?= <2792649152@qq.com> Date: Thu, 23 Nov 2023 16:42:26 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E6=A0=87=E7=AD=BE=E9=A1=B5=E9=9D=A2?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/wms/barbasic/index.ts | 56 ++++ src/api/wms/barcode/index.ts | 19 +- src/api/wms/labeltype/index.ts | 63 +++++ src/utils/dict.ts | 4 +- .../labelManage/barbasic/barbasic.data.ts | 101 ++++++++ .../labelManage/barbasic/index.vue | 231 +++++++++++++++++ .../labelManage/barcode/barcode.data.ts | 34 ++- .../labelManage/barcode/index.vue | 111 ++++---- .../labelManage/labeltype/index.vue | 244 ++++++++++++++++++ .../labelManage/labeltype/labeltype.data.ts | 154 +++++++++++ 10 files changed, 942 insertions(+), 75 deletions(-) create mode 100644 src/api/wms/barbasic/index.ts create mode 100644 src/api/wms/labeltype/index.ts create mode 100644 src/views/wms/basicDataManage/labelManage/barbasic/barbasic.data.ts create mode 100644 src/views/wms/basicDataManage/labelManage/barbasic/index.vue create mode 100644 src/views/wms/basicDataManage/labelManage/labeltype/index.vue create mode 100644 src/views/wms/basicDataManage/labelManage/labeltype/labeltype.data.ts diff --git a/src/api/wms/barbasic/index.ts b/src/api/wms/barbasic/index.ts new file mode 100644 index 000000000..e5a23798d --- /dev/null +++ b/src/api/wms/barbasic/index.ts @@ -0,0 +1,56 @@ +import request from '@/config/axios' + +export interface BarbasicVO { + id: number + number: string + type: string + template: string + status: string + relateNumber: string + barcodeString: string + printTimes: number + lastPrintTime: string + lastPrintUserId: string + lastPrintUserName: string +} + +// 查询条码实体基类列表 +export const getBarbasicPage = async (params) => { + if (params.isSearch) { + delete params.isSearch + const data = {...params} + return await request.post({ url: '/wms/barbasic/senior', data }) + } else { + return await request.get({ url: `/wms/barbasic/page`, params }) + } +} + +// 查询条码实体基类详情 +export const getBarbasic = async (id: number) => { + return await request.get({ url: `/wms/barbasic/get?id=` + id }) +} + +// 新增条码实体基类 +export const createBarbasic = async (data: BarbasicVO) => { + return await request.post({ url: `/wms/barbasic/create`, data }) +} + +// 修改条码实体基类 +export const updateBarbasic = async (data: BarbasicVO) => { + return await request.put({ url: `/wms/barbasic/update`, data }) +} + +// 删除条码实体基类 +export const deleteBarbasic = async (id: number) => { + return await request.delete({ url: `/wms/barbasic/delete?id=` + id }) +} + +// 导出条码实体基类 Excel +export const exportBarbasic = async (params) => { + return await request.download({ url: `/wms/barbasic/export-excel`, params }) +} + +// 下载用户导入模板 +export const importTemplate = () => { + return request.download({ url: '/wms/barbasic/get-import-template' }) +} \ No newline at end of file diff --git a/src/api/wms/barcode/index.ts b/src/api/wms/barcode/index.ts index 74b03a09c..80739036c 100644 --- a/src/api/wms/barcode/index.ts +++ b/src/api/wms/barcode/index.ts @@ -13,7 +13,8 @@ export interface BarcodeVO { encyptMethod: string masterId: number trimEnd: string - isEncypt: string + isEncypt: string, + labelType: string, } // 查询条码片段列表 @@ -21,38 +22,38 @@ export const getBarcodePage = async (params) => { if (params.isSearch) { delete params.isSearch const data = {...params} - return await request.post({ url: '/wms/barcode/senior', data }) + return await request.post({ url: '/label/barcode/senior', data }) } else { - return await request.get({ url: `/wms/barcode/page`, params }) + return await request.get({ url: `/label/barcode/page`, params }) } } // 查询条码片段详情 export const getBarcode = async (id: number) => { - return await request.get({ url: `/wms/barcode/get?id=` + id }) + return await request.get({ url: `/label/barcode/get?id=` + id }) } // 新增条码片段 export const createBarcode = async (data: BarcodeVO) => { - return await request.post({ url: `/wms/barcode/create`, data }) + return await request.post({ url: `/label/barcode/create`, data }) } // 修改条码片段 export const updateBarcode = async (data: BarcodeVO) => { - return await request.put({ url: `/wms/barcode/update`, data }) + return await request.put({ url: `/label/barcode/update`, data }) } // 删除条码片段 export const deleteBarcode = async (id: number) => { - return await request.delete({ url: `/wms/barcode/delete?id=` + id }) + return await request.delete({ url: `/label/barcode/delete?id=` + id }) } // 导出条码片段 Excel export const exportBarcode = async (params) => { - return await request.download({ url: `/wms/barcode/export-excel`, params }) + return await request.download({ url: `/label/barcode/export-excel`, params }) } // 下载用户导入模板 export const importTemplate = () => { - return request.download({ url: '/wms/barcode/get-import-template' }) + return request.download({ url: '/label/barcode/get-import-template' }) } \ No newline at end of file diff --git a/src/api/wms/labeltype/index.ts b/src/api/wms/labeltype/index.ts new file mode 100644 index 000000000..5a08bf37b --- /dev/null +++ b/src/api/wms/labeltype/index.ts @@ -0,0 +1,63 @@ +import request from '@/config/axios' + +export interface LabeltypeVO { + id: number + labelType: string + description: string + dataProtocol: string + splitMehod: string + header: string + version: string + separators: string + validateMethod: string + validateNumber: number + encyptEthod: string + compressMethod: string + templateName: string + templateFile: string + barcodeSegments: string + labelCode: string + isEncypt: string + isCompress: string +} + +// 查询标签定义列表 +export const getLabeltypePage = async (params) => { + if (params.isSearch) { + delete params.isSearch + const data = {...params} + return await request.post({ url: '/wms/labeltype/senior', data }) + } else { + return await request.get({ url: `/wms/labeltype/page`, params }) + } +} + +// 查询标签定义详情 +export const getLabeltype = async (id: number) => { + return await request.get({ url: `/wms/labeltype/get?id=` + id }) +} + +// 新增标签定义 +export const createLabeltype = async (data: LabeltypeVO) => { + return await request.post({ url: `/wms/labeltype/create`, data }) +} + +// 修改标签定义 +export const updateLabeltype = async (data: LabeltypeVO) => { + return await request.put({ url: `/wms/labeltype/update`, data }) +} + +// 删除标签定义 +export const deleteLabeltype = async (id: number) => { + return await request.delete({ url: `/wms/labeltype/delete?id=` + id }) +} + +// 导出标签定义 Excel +export const exportLabeltype = async (params) => { + return await request.download({ url: `/wms/labeltype/export-excel`, params }) +} + +// 下载用户导入模板 +export const importTemplate = () => { + return request.download({ url: '/wms/labeltype/get-import-template' }) +} \ No newline at end of file diff --git a/src/utils/dict.ts b/src/utils/dict.ts index a2a896063..166dc3280 100644 --- a/src/utils/dict.ts +++ b/src/utils/dict.ts @@ -266,5 +266,7 @@ export enum DICT_TYPE { DATA_TYPE = 'data_type', // 数据类型 PACK_UNIT = 'pack_unit', // 包装单位 DETAIL_STATUS = 'detail_status', // 明细状态 - TRANSFER_MODE = 'transfer_mode' // 运输方式 + TRANSFER_MODE = 'transfer_mode', // 运输方式 + LABEL_TYPE = 'label_type', // 标签类型 + LABEL_STATUS = 'label_status' // 标签状态 } diff --git a/src/views/wms/basicDataManage/labelManage/barbasic/barbasic.data.ts b/src/views/wms/basicDataManage/labelManage/barbasic/barbasic.data.ts new file mode 100644 index 000000000..894f33e4c --- /dev/null +++ b/src/views/wms/basicDataManage/labelManage/barbasic/barbasic.data.ts @@ -0,0 +1,101 @@ +import type { CrudSchema } from '@/hooks/web/useCrudSchemas' +import { dateFormatter } from '@/utils/formatTime' + +// 表单校验 +export const BarbasicRules = reactive({ + number: [required], + type: [required], + template: [required], + status: [required], + barcodeString: [required], + printTimes: [required], +}) + +export const Barbasic = useCrudSchemas(reactive([ + { + label: '标签号', + field: 'number', + sort: 'custom', + isSearch: true, + table: { + fixed: 'left' + } + }, + { + label: '标签类型', + field: 'type', + sort: 'custom', + isSearch: true, + dictType: DICT_TYPE.LABEL_TYPE, + dictClass: 'string' + }, + { + label: '标签模板', + field: 'template', + sort: 'custom', + }, + { + label: '标签状态', + field: 'status', + sort: 'custom', + isSearch: true, + dictType: DICT_TYPE.LABEL_STATUS, + dictClass: 'string' + }, + { + label: '关联号', + field: 'relateNumber', + sort: 'custom', + }, + { + label: '标签条码字符串', + field: 'barcodeString', + sort: 'custom', + }, + { + label: '打印次数', + field: 'printTimes', + sort: 'custom', + form: { + component: 'InputNumber', + componentProps: { + min: 0 + }, + value: 0 + }, + }, + { + label: '最后打印时间', + field: 'lastPrintTime', + sort: 'custom', + formatter: dateFormatter, + form: { + component: 'DatePicker', + componentProps: { + style: {width:'100%'}, + type: 'datetime', + dateFormat: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'x', + } + }, + }, + { + label: '最后打印人ID', + field: 'lastPrintUserId', + sort: 'custom' + }, + { + label: '最后打印人用户名', + field: 'lastPrintUserName', + sort: 'custom', + }, + // { + // label: '操作', + // field: 'action', + // isForm: false, + // table: { + // width: 150, + // fixed: 'right' + // } + // } +])) diff --git a/src/views/wms/basicDataManage/labelManage/barbasic/index.vue b/src/views/wms/basicDataManage/labelManage/barbasic/index.vue new file mode 100644 index 000000000..c75936594 --- /dev/null +++ b/src/views/wms/basicDataManage/labelManage/barbasic/index.vue @@ -0,0 +1,231 @@ + + + diff --git a/src/views/wms/basicDataManage/labelManage/barcode/barcode.data.ts b/src/views/wms/basicDataManage/labelManage/barcode/barcode.data.ts index 6f1a6da9a..a39fb8bc1 100644 --- a/src/views/wms/basicDataManage/labelManage/barcode/barcode.data.ts +++ b/src/views/wms/basicDataManage/labelManage/barcode/barcode.data.ts @@ -12,17 +12,29 @@ export const BarcodeRules = reactive({ }) export const Barcode = useCrudSchemas(reactive([ + // { + // label: 'id', + // field: 'id', + // sort: 'custom', + // isForm: false, + // }, { - label: 'id', - field: 'id', + label: '代码', + field: 'code', sort: 'custom', - isForm: false, + isSearch: true, + table: { + fixed: 'left' + } }, { - label: '代码', - field: 'code', + label: '标签类型', + field: 'labelType', sort: 'custom', + dictType: DICT_TYPE.LABEL_TYPE, + dictClass: 'string', isSearch: true, + isTable: true }, { label: '名称', @@ -54,7 +66,7 @@ export const Barcode = useCrudSchemas(reactive([ form: { component: 'InputNumber', componentProps: { - min: 0 + min: 0, }, value: 0 }, @@ -95,6 +107,16 @@ export const Barcode = useCrudSchemas(reactive([ label: '是否加密', field: 'isEncypt', sort: 'custom', + dictType: DICT_TYPE.TRUE_FALSE, + dictClass: 'string', + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + }, }, { label: '操作', diff --git a/src/views/wms/basicDataManage/labelManage/barcode/index.vue b/src/views/wms/basicDataManage/labelManage/barcode/index.vue index 1c38f6ee8..fb2ed5e6f 100644 --- a/src/views/wms/basicDataManage/labelManage/barcode/index.vue +++ b/src/views/wms/basicDataManage/labelManage/barcode/index.vue @@ -4,15 +4,15 @@ - - + + @@ -41,13 +41,11 @@ @@ -60,45 +58,31 @@ + \ No newline at end of file diff --git a/src/views/wms/basicDataManage/labelManage/labeltype/index.vue b/src/views/wms/basicDataManage/labelManage/labeltype/index.vue new file mode 100644 index 000000000..0920c5eea --- /dev/null +++ b/src/views/wms/basicDataManage/labelManage/labeltype/index.vue @@ -0,0 +1,244 @@ + + + diff --git a/src/views/wms/basicDataManage/labelManage/labeltype/labeltype.data.ts b/src/views/wms/basicDataManage/labelManage/labeltype/labeltype.data.ts new file mode 100644 index 000000000..a6bab3b83 --- /dev/null +++ b/src/views/wms/basicDataManage/labelManage/labeltype/labeltype.data.ts @@ -0,0 +1,154 @@ +import type { CrudSchema } from '@/hooks/web/useCrudSchemas' + +// 表单校验 +export const LabeltypeRules = reactive({ + labelType: [required], + dataProtocol: [required], + splitMehod: [required], + validateMethod: [required], + templateName: [required], + labelCode: [required], + isEncypt: [required], + isCompress: [required], +}) + +export const Labeltype = useCrudSchemas(reactive([ + // { + // label: 'id', + // field: 'id', + // sort: 'custom', + // isForm: false, + // }, + { + label: '标签代码', + field: 'labelCode', + sort: 'custom', + table: { + width: 150, + fixed: 'left' + }, + isSearch: true, + }, + { + label: '标签类型', + field: 'labelType', + sort: 'custom', + dictType: DICT_TYPE.LABEL_TYPE, + dictClass:'string', + isSearch: true, + table: { + width: 150 + }, + }, + { + label: '描述', + field: 'description', + sort: 'custom', + table: { + width:100 + }, + }, + { + label: '数据协议', + field: 'dataProtocol', + sort: 'custom', + }, + { + label: '拆分方法', + field: 'splitMehod', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '数据头', + field: 'header', + sort: 'custom', + }, + { + label: '版本号', + field: 'version', + sort: 'custom', + }, + { + label: '分隔符', + field: 'separators', + sort: 'custom', + }, + { + label: '校验方法', + field: 'validateMethod', + sort: 'custom', + }, + { + label: '校验数', + field: 'validateNumber', + sort: 'custom', + form: { + component: 'InputNumber', + componentProps: { + min: 0 + }, + }, + }, + { + label: '加密方法', + field: 'encyptEthod', + sort: 'custom', + }, + { + label: '压缩方法', + field: 'compressMethod', + sort: 'custom', + }, + { + label: '模板名称', + field: 'templateName', + sort: 'custom', + }, + { + label: '模板文件', + field: 'templateFile', + sort: 'custom', + }, + { + label: '是否加密', + field: 'isEncypt', + sort: 'custom', + dictType: DICT_TYPE.TRUE_FALSE, + dictClass: 'string', + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + }, + }, + { + label: '是否压缩', + field: 'isCompress', + sort: 'custom', + dictType: DICT_TYPE.TRUE_FALSE, + dictClass: 'string', + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + }, + }, + { + label: '操作', + field: 'action', + isForm: false, + table: { + width: 150, + fixed: 'right' + } + } +])) From f287cece11f214f341e89b6c421ce779f2dc6d75 Mon Sep 17 00:00:00 2001 From: zhang_li <2235006734@qqq.com> Date: Thu, 23 Nov 2023 19:41:12 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E6=A3=80=E9=AA=8C=E7=AD=96=E7=95=A5?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Descriptions/src/Descriptions.vue | 17 ++++++- src/components/Detail/src/Detail.vue | 44 ++++++++++++++----- .../strategy/inspectStrategy/AddForm.vue | 23 +++++++--- .../purchasereceiptRequestMain/index.vue | 2 +- .../purchasereceiptRequestMain.data.ts | 2 + 5 files changed, 71 insertions(+), 17 deletions(-) diff --git a/src/components/Descriptions/src/Descriptions.vue b/src/components/Descriptions/src/Descriptions.vue index 18f54ea9f..56540d68b 100644 --- a/src/components/Descriptions/src/Descriptions.vue +++ b/src/components/Descriptions/src/Descriptions.vue @@ -15,6 +15,9 @@ const mobile = computed(() => appStore.getMobile) const attrs = useAttrs() const slots = useSlots() +const height = ref('200px') +const isShow = ref(false) + const props = defineProps({ title: propTypes.string.def(''), @@ -68,6 +71,15 @@ const toggleClick = () => { show.value = !unref(show) } } +const showAll = () =>{ + if(isShow.value){ + height.value ='200px' + }else{ + height.value ='auto' + } + isShow.value = !isShow.value + +} diff --git a/src/components/Detail/src/Detail.vue b/src/components/Detail/src/Detail.vue index 84873ef74..ec5c5f57b 100644 --- a/src/components/Detail/src/Detail.vue +++ b/src/components/Detail/src/Detail.vue @@ -110,6 +110,7 @@ import TableHead from '@/components/TableHead/src/TableHead.vue' defineOptions({ name: 'Detail' }) + const message = useMessage() // 消息弹窗 const { t } = useI18n() // 国际化 @@ -118,6 +119,7 @@ const routeName = ref() routeName.value = route.name routeName.value = routeName.value.substring(0, routeName.value.length - 4) + 'Detail' + const props = defineProps({ // 标签参数 tabs: { @@ -290,12 +292,18 @@ const openDetail = async (row: any, titleName: any, titleValue: any, tableName: getFileList() getChangeRecordList() // 判断详情新增按钮是否显示 - HeadButttondata.value = [ - defaultButtons.defaultAddBtn({ - hide: isShowMainButton(row, ['1']) - }), // 新增 - defaultButtons.defaultFilterBtn(null) // 筛选 - ] + if(routeName.value.indexOf('Job') > -1){ + HeadButttondata.value = [ + defaultButtons.defaultFilterBtn(null) // 筛选 + ] + }else{ + HeadButttondata.value = [ + defaultButtons.defaultAddBtn({ + hide: isShowMainButton(row, ['1']) + }), // 新增 + defaultButtons.defaultFilterBtn(null) // 筛选 + ] + } // 动态显示操作列按钮 buttondata.value = [ defaultButtons.mainListEditBtn({ @@ -437,28 +445,44 @@ const handleDelete = async (id: number) => { } // 筛选提交 const searchFormClick = (searchData) => { - tableObjectRef.value.params = { + const { tableObject, tableMethods } = useTable({ + getListApi: props.apiPage // 分页接口 + }) + tableObject.params = { isSearch: true, filters: searchData.filters ? searchData.filters : [{ column: 'masterId', action: '==', value: masterParmas.value.masterId }] } - getList() // 刷新当前列表 + detailAllSchemasRef.value = props.detailAllSchemas + tableObjectRef.value = tableObject + tableMethodsRef.value = tableMethods + tableObjectRef.value.tableList = [] + const { getList } = tableMethods + getList() + // tableObjectRef.value.params = { + // isSearch: true, + // filters: searchData.filters + // ? searchData.filters + // : [{ column: 'masterId', action: '==', value: masterParmas.value.masterId }] + // } + // getList() // 刷新当前列表 } //监视属性 watch( - () => props.apiPage, + () =>props.apiPage, () => { const { tableObject, tableMethods } = useTable({ getListApi: props.apiPage // 分页接口 }) + tableObject.params.masterId = masterParmas.value.masterId detailAllSchemasRef.value = props.detailAllSchemas tableObjectRef.value = tableObject tableMethodsRef.value = tableMethods const { getList } = tableMethods getList() - } + }, )