diff --git a/src/api/print/printApi.js b/src/api/print/printApi.js index e243bae..c8319ee 100644 --- a/src/api/print/printApi.js +++ b/src/api/print/printApi.js @@ -13,6 +13,10 @@ export default { printTemplatePage(data) { return request('page', data, 'get') }, + // 获取打印模板列表 + printTemplateList(data) { + return request('list', data, 'get') + }, // 提交打印模板表单 edit为true时为编辑,默认为新增 printTemplateSubmitForm(data, edit = false) { return request(edit ? 'edit' : 'add', data) @@ -24,5 +28,6 @@ export default { // 获取打印模板详情 printTemplateDetail(data) { return request('detail', data, 'get') - } + }, + } diff --git a/src/api/print/printRecordsApi.js b/src/api/print/printRecordsApi.js new file mode 100644 index 0000000..dfdb572 --- /dev/null +++ b/src/api/print/printRecordsApi.js @@ -0,0 +1,36 @@ +import { baseRequest } from '@/utils/request' + +const request = (url, ...arg) => baseRequest(`/print/records/` + url, ...arg) + +/** + * 标签打印记录Api接口管理器 + * + * @author luojun + * @date 2024/09/16 14:49 + **/ +export default { + // 获取标签打印记录分页 + printRecordsPage(data) { + return request('page', data, 'get') + }, + // 提交标签打印记录表单 edit为true时为编辑,默认为新增 + printRecordsSubmitForm(data, edit = false) { + return request(edit ? 'edit' : 'add', data) + }, + // 删除标签打印记录 + printRecordsDelete(data) { + return request('delete', data) + }, + // 获取标签打印记录详情 + printRecordsDetail(data) { + return request('detail', data, 'get') + }, + // 打印标签并保存打印记录 + printRecordsPrint(data) { + return request('print', data, 'post') + }, + // 更具标签打印记录 id + printTemplateGetProductCode(data) { + return request('getProductCode', data, 'post') + }, +} diff --git a/src/api/production/productcode/produceBarcodeHistoryApi.js b/src/api/production/productcode/produceBarcodeHistoryApi.js index cb0d0f9..51504d0 100644 --- a/src/api/production/productcode/produceBarcodeHistoryApi.js +++ b/src/api/production/productcode/produceBarcodeHistoryApi.js @@ -13,6 +13,10 @@ export default { produceBarcodeHistoryPage(data) { return request('page', data, 'get') }, + // 获取产品条码历史记录列表 + produceBarcodeHistoryList(data) { + return request('list', data, 'get') + }, // 提交产品条码历史记录表单 edit为true时为编辑,默认为新增 produceBarcodeHistorySubmitForm(data, edit = false) { return request(edit ? 'edit' : 'add', data) diff --git a/src/hook/useFormHandler.js b/src/hook/useFormHandler.js index 94d33ac..739203f 100644 --- a/src/hook/useFormHandler.js +++ b/src/hook/useFormHandler.js @@ -89,6 +89,7 @@ export default function useFormHandler(formItems, api, backRouter) { // 填充表单数据 const populateFormData = (data) => { + console.log(formData, 'formData') Object.keys(formData).forEach((key) => { if (data[key] !== undefined) formData[key] = data[key] }) diff --git a/src/views/productionBusiness/basicData/brand/counterfeiting/index.vue b/src/views/productionBusiness/basicData/brand/counterfeiting/index.vue index 15d7432..a8b87a7 100644 --- a/src/views/productionBusiness/basicData/brand/counterfeiting/index.vue +++ b/src/views/productionBusiness/basicData/brand/counterfeiting/index.vue @@ -1,120 +1,188 @@ diff --git a/src/views/productionBusiness/basicData/brand/counterfeiting/iphone.vue b/src/views/productionBusiness/basicData/brand/counterfeiting/iphone.vue index 5b51e0b..6dbcd0d 100644 --- a/src/views/productionBusiness/basicData/brand/counterfeiting/iphone.vue +++ b/src/views/productionBusiness/basicData/brand/counterfeiting/iphone.vue @@ -11,9 +11,7 @@

产品信息

-

产品名称:莫个葡萄红酒

-

产品名称:莫个葡萄红酒

-

产品名称:莫个葡萄红酒

+

产品名称:

防伪查询结果

@@ -21,9 +19,6 @@

溯源记录

-

产品名称:莫个葡萄红酒

-

产品名称:莫个葡萄红酒

-

产品名称:莫个葡萄红酒

@@ -31,7 +26,12 @@ diff --git a/src/views/productionBusiness/labelPrinting/materialPrint/formFields/drawerForm.js b/src/views/productionBusiness/labelPrinting/materialPrint/formFields/drawerForm.js new file mode 100644 index 0000000..5b432f9 --- /dev/null +++ b/src/views/productionBusiness/labelPrinting/materialPrint/formFields/drawerForm.js @@ -0,0 +1,157 @@ +import tool from '@/utils/tool' +import { required } from '@/utils/formRules' + +export const drawerForm = reactive([ + { + label: '打印模版:', + name: 'templateId', + type: 'a-select', + span: 8, + attrs: { + placeholder: '请选择打印模版', + allowClear: true, + fieldNames: { + children: 'children', + label: 'name', + value: 'id' + } + } + }, + { + label: '收货数量:', + name: 'harvestNumber', + type: 'a-input', + span: 8, + attrs: { + placeholder: '请输入收货数量', + allowClear: true + } + }, + { + label: '单位:', + name: 'unitId', + type: 'a-select', + span: 8, + attrs: { + placeholder: '请选择单位', + fieldNames: { + children: 'children', + label: 'name', + value: 'id' + } + } + }, + { + label: '标签数(张):', + name: 'printNumber', + type: 'a-input-number', + span: 8, + attrs: { + placeholder: '请输入标签数', + treeData: [], + fieldNames: { + children: 'children', + label: 'name', + value: 'id' + }, + disabled: true + } + }, + { + label: '标准包装数量:', + name: 'standardPackageNumber', + type: 'a-input-number', + span: 8, + attrs: { + placeholder: '请输入标准包装数量', + treeData: [], + fieldNames: { + children: 'children', + label: 'name', + value: 'id' + } + } + }, + { + label: '包装:', + name: 'materialPackageId', + type: 'a-select', + span: 8, + attrs: { + placeholder: '请选择包装', + treeData: [], + fieldNames: { + children: 'children', + label: 'name', + value: 'id' + } + } + }, + { + label: '包装单位:', + name: 'packageUnit', + type: 'a-tree-select', + span: 8, + attrs: { + placeholder: '请选择包装单位', + treeData: [], + fieldNames: { + children: 'children', + label: 'name', + value: 'id' + }, + disabled: true + } + }, + { + label: '二维码规则:', + name: 'packageConfigId', + type: 'a-select', + span: 8, + attrs: { + placeholder: '请选择二维码规则', + fieldNames: { + children: 'children', + label: 'name', + value: 'id' + } + } + }, + { + label: '生产日期:', + name: 'productionTime', + type: 'a-date-picker', + span: 8, + attrs: { + placeholder: '请输入生产日期', + allowClear: true, + valueFormat: 'YYYY-MM-DD HH:mm:ss' + } + }, + { + label: '失效日期:', + name: 'failureTime', + type: 'a-date-picker', + span: 8, + attrs: { + placeholder: '请输入失效日期', + allowClear: true, + valueFormat: 'YYYY-MM-DD HH:mm:ss' + } + }, + + { + label: '批次:', + name: 'batch', + type: 'a-input', + span: 8, + attrs: { + placeholder: '请输入批次' + } + } +]) + +export const formRules = { + name: [required('请输入名称')], + parentId: [required('请选择上级物料')] +} diff --git a/src/views/productionBusiness/labelPrinting/materialPrint/index.vue b/src/views/productionBusiness/labelPrinting/materialPrint/index.vue index 2efd375..07ab32f 100644 --- a/src/views/productionBusiness/labelPrinting/materialPrint/index.vue +++ b/src/views/productionBusiness/labelPrinting/materialPrint/index.vue @@ -13,7 +13,6 @@ ref="dynamicTreeRef" treeTitle="物料分类" :tableRef="tableRef" - :openFormRef="materialCategoryFormRef" :apiModel="{ getTree: materialCategoryApi.materialCategoryTree, delTree: materialCategoryApi.materialCategoryDelete @@ -55,7 +54,7 @@ @@ -64,33 +63,25 @@ - + + diff --git a/src/views/productionBusiness/labelPrinting/records/formFields/drawerForm.js b/src/views/productionBusiness/labelPrinting/records/formFields/drawerForm.js new file mode 100644 index 0000000..6e2fbb0 --- /dev/null +++ b/src/views/productionBusiness/labelPrinting/records/formFields/drawerForm.js @@ -0,0 +1,13 @@ +import tool from '@/utils/tool' + +export const drawerForm = [ + { + label: '单据号:', + name: 'number', + type: 'a-input', + attrs: { + placeholder: '请输入单号', + allowClear: true, + disabled: true + } + }] diff --git a/src/views/productionBusiness/labelPrinting/records/index.vue b/src/views/productionBusiness/labelPrinting/records/index.vue new file mode 100644 index 0000000..5759840 --- /dev/null +++ b/src/views/productionBusiness/labelPrinting/records/index.vue @@ -0,0 +1,72 @@ + + +