From 1be20ceb6fefc7dcda35ae6e76e1f1c749ffc83f Mon Sep 17 00:00:00 2001 From: zhaoyiran Date: Tue, 13 Aug 2024 15:38:24 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=9B=B4=E6=96=B0?= =?UTF-8?q?=E4=BA=BA=E3=80=81=E6=97=B6=E9=97=B4=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../factoryModeling/areabasic/areabasic.data.ts | 4 ++-- .../wms/basicDataManage/factoryModeling/dock/dock.data.ts | 4 ++-- .../basicDataManage/factoryModeling/location/location.data.ts | 4 ++-- .../factoryModeling/locationgroup/locationgroup.data.ts | 4 ++-- .../basicDataManage/factoryModeling/process/process.data.ts | 4 ++-- .../factoryModeling/productionline/productionline.data.ts | 4 ++-- .../factoryModeling/warehouse/warehouse.data.ts | 4 ++-- .../basicDataManage/factoryModeling/workshop/workshop.data.ts | 4 ++-- .../factoryModeling/workstation/workstation.data.ts | 4 ++-- .../systemSetting/accountcalendar/accountcalendar.data.ts | 4 ++-- .../systemSetting/currencyexchange/currencyexchange.data.ts | 4 ++-- .../systemSetting/systemcalendar/systemcalendar.data.ts | 4 ++-- 12 files changed, 24 insertions(+), 24 deletions(-) diff --git a/src/views/wms/basicDataManage/factoryModeling/areabasic/areabasic.data.ts b/src/views/wms/basicDataManage/factoryModeling/areabasic/areabasic.data.ts index dfa823146..257a5f71a 100644 --- a/src/views/wms/basicDataManage/factoryModeling/areabasic/areabasic.data.ts +++ b/src/views/wms/basicDataManage/factoryModeling/areabasic/areabasic.data.ts @@ -214,7 +214,7 @@ export const Area = useCrudSchemas(reactive([ sort: 'custom', isDetail: true, isForm: false, - isTable: false, + isTable: true, formatter: dateFormatter, detail: { dateFormat: 'YYYY-MM-DD HH:mm:ss' @@ -237,7 +237,7 @@ export const Area = useCrudSchemas(reactive([ field: 'updater', isDetail: true, isForm: false, - isTable: false, + isTable: true, table: { width: 150 } diff --git a/src/views/wms/basicDataManage/factoryModeling/dock/dock.data.ts b/src/views/wms/basicDataManage/factoryModeling/dock/dock.data.ts index dbbc72a7a..11a7c465a 100644 --- a/src/views/wms/basicDataManage/factoryModeling/dock/dock.data.ts +++ b/src/views/wms/basicDataManage/factoryModeling/dock/dock.data.ts @@ -252,7 +252,7 @@ export const Dock = useCrudSchemas(reactive([ sort: 'custom', isDetail: true, isForm: false, - isTable: false, + isTable: true, formatter: dateFormatter, detail: { dateFormat: 'YYYY-MM-DD HH:mm:ss' @@ -275,7 +275,7 @@ export const Dock = useCrudSchemas(reactive([ field: 'updater', isDetail: true, isForm: false, - isTable: false, + isTable: true, table: { width: 150 } diff --git a/src/views/wms/basicDataManage/factoryModeling/location/location.data.ts b/src/views/wms/basicDataManage/factoryModeling/location/location.data.ts index 1a74eea06..07ef0409c 100644 --- a/src/views/wms/basicDataManage/factoryModeling/location/location.data.ts +++ b/src/views/wms/basicDataManage/factoryModeling/location/location.data.ts @@ -392,7 +392,7 @@ export const Location = useCrudSchemas(reactive([ sort: 'custom', isDetail: true, isForm: false, - isTable: false, + isTable: true, formatter: dateFormatter, detail: { dateFormat: 'YYYY-MM-DD HH:mm:ss' @@ -415,7 +415,7 @@ export const Location = useCrudSchemas(reactive([ field: 'updater', isDetail: true, isForm: false, - isTable: false, + isTable: true, table: { width: 150 } diff --git a/src/views/wms/basicDataManage/factoryModeling/locationgroup/locationgroup.data.ts b/src/views/wms/basicDataManage/factoryModeling/locationgroup/locationgroup.data.ts index da5fdfbd5..70ee060af 100644 --- a/src/views/wms/basicDataManage/factoryModeling/locationgroup/locationgroup.data.ts +++ b/src/views/wms/basicDataManage/factoryModeling/locationgroup/locationgroup.data.ts @@ -214,7 +214,7 @@ export const Locationgroup = useCrudSchemas(reactive([ sort: 'custom', isDetail: true, isForm: false, - isTable: false, + isTable: true, formatter: dateFormatter, detail: { dateFormat: 'YYYY-MM-DD HH:mm:ss' @@ -237,7 +237,7 @@ export const Locationgroup = useCrudSchemas(reactive([ field: 'updater', isDetail: true, isForm: false, - isTable: false, + isTable: true, table: { width: 150 } diff --git a/src/views/wms/basicDataManage/factoryModeling/process/process.data.ts b/src/views/wms/basicDataManage/factoryModeling/process/process.data.ts index 7f4690a51..6db2fb2f5 100644 --- a/src/views/wms/basicDataManage/factoryModeling/process/process.data.ts +++ b/src/views/wms/basicDataManage/factoryModeling/process/process.data.ts @@ -217,7 +217,7 @@ export const Process = useCrudSchemas(reactive([ sort: 'custom', isDetail: true, isForm: false, - isTable: false, + isTable: true, formatter: dateFormatter, detail: { dateFormat: 'YYYY-MM-DD HH:mm:ss' @@ -240,7 +240,7 @@ export const Process = useCrudSchemas(reactive([ field: 'updater', isDetail: true, isForm: false, - isTable: false, + isTable: true, table: { width: 150 } diff --git a/src/views/wms/basicDataManage/factoryModeling/productionline/productionline.data.ts b/src/views/wms/basicDataManage/factoryModeling/productionline/productionline.data.ts index 1e17db6d5..72cee3e30 100644 --- a/src/views/wms/basicDataManage/factoryModeling/productionline/productionline.data.ts +++ b/src/views/wms/basicDataManage/factoryModeling/productionline/productionline.data.ts @@ -227,7 +227,7 @@ export const Productionline = useCrudSchemas(reactive([ sort: 'custom', isDetail: true, isForm: false, - isTable: false, + isTable: true, formatter: dateFormatter, detail: { dateFormat: 'YYYY-MM-DD HH:mm:ss' @@ -250,7 +250,7 @@ export const Productionline = useCrudSchemas(reactive([ field: 'updater', isDetail: true, isForm: false, - isTable: false, + isTable: true, table: { width: 150 } diff --git a/src/views/wms/basicDataManage/factoryModeling/warehouse/warehouse.data.ts b/src/views/wms/basicDataManage/factoryModeling/warehouse/warehouse.data.ts index ffb93df3e..3f82b7907 100644 --- a/src/views/wms/basicDataManage/factoryModeling/warehouse/warehouse.data.ts +++ b/src/views/wms/basicDataManage/factoryModeling/warehouse/warehouse.data.ts @@ -156,7 +156,7 @@ export const Warehouse = useCrudSchemas(reactive([ sort: 'custom', isDetail: true, isForm: false, - isTable: false, + isTable: true, formatter: dateFormatter, detail: { dateFormat: 'YYYY-MM-DD HH:mm:ss' @@ -179,7 +179,7 @@ export const Warehouse = useCrudSchemas(reactive([ field: 'updater', isDetail: true, isForm: false, - isTable: false, + isTable: true, table: { width: 150 } diff --git a/src/views/wms/basicDataManage/factoryModeling/workshop/workshop.data.ts b/src/views/wms/basicDataManage/factoryModeling/workshop/workshop.data.ts index b7ea81be4..569ded4e1 100644 --- a/src/views/wms/basicDataManage/factoryModeling/workshop/workshop.data.ts +++ b/src/views/wms/basicDataManage/factoryModeling/workshop/workshop.data.ts @@ -124,7 +124,7 @@ export const Workshop = useCrudSchemas(reactive([ sort: 'custom', isDetail: true, isForm: false, - isTable: false, + isTable: true, formatter: dateFormatter, detail: { dateFormat: 'YYYY-MM-DD HH:mm:ss' @@ -147,7 +147,7 @@ export const Workshop = useCrudSchemas(reactive([ field: 'updater', isDetail: true, isForm: false, - isTable: false, + isTable: true, table: { width: 150 } diff --git a/src/views/wms/basicDataManage/factoryModeling/workstation/workstation.data.ts b/src/views/wms/basicDataManage/factoryModeling/workstation/workstation.data.ts index b8da1ff1c..cebf01a68 100644 --- a/src/views/wms/basicDataManage/factoryModeling/workstation/workstation.data.ts +++ b/src/views/wms/basicDataManage/factoryModeling/workstation/workstation.data.ts @@ -302,7 +302,7 @@ export const Workstation = useCrudSchemas(reactive([ sort: 'custom', isDetail: true, isForm: false, - isTable: false, + isTable: true, formatter: dateFormatter, detail: { dateFormat: 'YYYY-MM-DD HH:mm:ss' @@ -325,7 +325,7 @@ export const Workstation = useCrudSchemas(reactive([ field: 'updater', isDetail: true, isForm: false, - isTable: false, + isTable: true, table: { width: 150 } diff --git a/src/views/wms/basicDataManage/systemSetting/accountcalendar/accountcalendar.data.ts b/src/views/wms/basicDataManage/systemSetting/accountcalendar/accountcalendar.data.ts index 7d383b84d..6ce4163de 100644 --- a/src/views/wms/basicDataManage/systemSetting/accountcalendar/accountcalendar.data.ts +++ b/src/views/wms/basicDataManage/systemSetting/accountcalendar/accountcalendar.data.ts @@ -246,7 +246,7 @@ export const Accountcalendar = useCrudSchemas(reactive([ sort: 'custom', isDetail: true, isForm: false, - isTable: false, + isTable: true, formatter: dateFormatter, detail: { dateFormat: 'YYYY-MM-DD HH:mm:ss' @@ -269,7 +269,7 @@ export const Accountcalendar = useCrudSchemas(reactive([ field: 'updater', isDetail: true, isForm: false, - isTable: false, + isTable: true, table: { width: 150 } diff --git a/src/views/wms/basicDataManage/systemSetting/currencyexchange/currencyexchange.data.ts b/src/views/wms/basicDataManage/systemSetting/currencyexchange/currencyexchange.data.ts index a0451761d..02366d873 100644 --- a/src/views/wms/basicDataManage/systemSetting/currencyexchange/currencyexchange.data.ts +++ b/src/views/wms/basicDataManage/systemSetting/currencyexchange/currencyexchange.data.ts @@ -155,7 +155,7 @@ export const Currencyexchange = useCrudSchemas(reactive([ sort: 'custom', isDetail: true, isForm: false, - isTable: false, + isTable: true, formatter: dateFormatter, detail: { dateFormat: 'YYYY-MM-DD HH:mm:ss' @@ -178,7 +178,7 @@ export const Currencyexchange = useCrudSchemas(reactive([ field: 'updater', isDetail: true, isForm: false, - isTable: false, + isTable: true, table: { width: 150 } diff --git a/src/views/wms/basicDataManage/systemSetting/systemcalendar/systemcalendar.data.ts b/src/views/wms/basicDataManage/systemSetting/systemcalendar/systemcalendar.data.ts index 4e41b2ff4..c413767db 100644 --- a/src/views/wms/basicDataManage/systemSetting/systemcalendar/systemcalendar.data.ts +++ b/src/views/wms/basicDataManage/systemSetting/systemcalendar/systemcalendar.data.ts @@ -179,7 +179,7 @@ export const Systemcalendar = useCrudSchemas(reactive([ sort: 'custom', isDetail: true, isForm: false, - isTable: false, + isTable: true, formatter: dateFormatter, detail: { dateFormat: 'YYYY-MM-DD HH:mm:ss' @@ -202,7 +202,7 @@ export const Systemcalendar = useCrudSchemas(reactive([ field: 'updater', isDetail: true, isForm: false, - isTable: false, + isTable: true, table: { width: 150 } From 365cc0d8d57983f6aa4d913c476e7d0e3bf66b03 Mon Sep 17 00:00:00 2001 From: zhang_li <2235006734@qqq.com> Date: Tue, 13 Aug 2024 15:46:33 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E6=A3=80=E9=AA=8C=E4=BB=BB=E5=8A=A1?= =?UTF-8?q?=E4=B8=89=E4=B8=AA=E9=A1=B5=E9=9D=A2=E5=90=88=E6=88=90=E4=B8=80?= =?UTF-8?q?=E4=B8=AA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/qms/inspectionJob/index.vue | 73 +- .../qms/inspectionJobProduction/addForm.vue | 1552 ----------------- .../qms/inspectionJobProduction/detail.vue | 194 --- .../qms/inspectionJobProduction/index.vue | 442 ----- .../inspectionJobMain.data.ts | 885 ---------- .../qms/inspectionJobPurchase/addForm.vue | 1552 ----------------- .../qms/inspectionJobPurchase/detail.vue | 194 --- src/views/qms/inspectionJobPurchase/index.vue | 442 ----- .../inspectionJobMain.data.ts | 885 ---------- 9 files changed, 56 insertions(+), 6163 deletions(-) delete mode 100644 src/views/qms/inspectionJobProduction/addForm.vue delete mode 100644 src/views/qms/inspectionJobProduction/detail.vue delete mode 100644 src/views/qms/inspectionJobProduction/index.vue delete mode 100644 src/views/qms/inspectionJobProduction/inspectionJobMain.data.ts delete mode 100644 src/views/qms/inspectionJobPurchase/addForm.vue delete mode 100644 src/views/qms/inspectionJobPurchase/detail.vue delete mode 100644 src/views/qms/inspectionJobPurchase/index.vue delete mode 100644 src/views/qms/inspectionJobPurchase/inspectionJobMain.data.ts diff --git a/src/views/qms/inspectionJob/index.vue b/src/views/qms/inspectionJob/index.vue index dc84cb9e6..c7e3423da 100644 --- a/src/views/qms/inspectionJob/index.vue +++ b/src/views/qms/inspectionJob/index.vue @@ -4,12 +4,7 @@ @@ -316,9 +311,8 @@ const showQualityReport = ref(false) const qualityReport = ref('') const checkQualityReport = async (row) => { showQualityReport.value = true - qualityReport.value =getReportUrl() + '/purchasereceiptReport?asnNumber=' + row.asnNumber + qualityReport.value = getReportUrl() + '/purchasereceiptReport?asnNumber=' + row.asnNumber } - /** 添加/修改操作 */ // const formRef = ref() @@ -457,11 +451,25 @@ const handleImport = () => { const searchFormClick = (searchData) => { let isHave = searchData?.filters?.some((item) => item.column == 'inspectionType') if (!isHave) { - searchData.filters.push({ - action: 'notIn', - column: 'inspectionType', - value: '1,4' - }) + if (route.name == 'inspectionJobProductionMain') { + searchData.filters.push({ + action: '==', + column: 'inspectionType', + value: '4' + }) + } else if (route.name == 'inspectionJobPurchaseMain') { + searchData.filters.push({ + action: '==', + column: 'inspectionType', + value: '1' + }) + } else { + searchData.filters.push({ + action: 'notIn', + column: 'excludeInspectionType', + value: '1,4' + }) + } } tableObject.params = { isSearch: true, @@ -469,13 +477,44 @@ const searchFormClick = (searchData) => { } getList() // 刷新当前列表 } - +const resetSearch = () => { + if (route.name == 'inspectionJobProductionMain') { + setSearchParams({ + available: true, + inspectionType: '4' + }) + } else if (route.name == 'inspectionJobPurchaseMain') { + setSearchParams({ + available: true, + inspectionType: '1' + }) + } else { + setSearchParams({ + available: true, + excludeInspectionType: '1,4' + }) + } +} /** 初始化 **/ onMounted(async () => { - tableObject.params = { - available: true, - excludeInspectionType: '1,4' + console.log(11,route.name) + if (route.name == 'inspectionJobProductionMain') { + tableObject.params = { + available: true, + inspectionType: '4' + } + } else if (route.name == 'inspectionJobPurchaseMain') { + tableObject.params = { + available: true, + inspectionType: '1' + } + } else { + tableObject.params = { + available: true, + excludeInspectionType: '1,4' + } } + getList() // importTemplateData.templateUrl = await InspectionJobMainApi.importTemplate() }) diff --git a/src/views/qms/inspectionJobProduction/addForm.vue b/src/views/qms/inspectionJobProduction/addForm.vue deleted file mode 100644 index 6b2e16b28..000000000 --- a/src/views/qms/inspectionJobProduction/addForm.vue +++ /dev/null @@ -1,1552 +0,0 @@ - - - - diff --git a/src/views/qms/inspectionJobProduction/detail.vue b/src/views/qms/inspectionJobProduction/detail.vue deleted file mode 100644 index 3dc132caf..000000000 --- a/src/views/qms/inspectionJobProduction/detail.vue +++ /dev/null @@ -1,194 +0,0 @@ - - - - - diff --git a/src/views/qms/inspectionJobProduction/index.vue b/src/views/qms/inspectionJobProduction/index.vue deleted file mode 100644 index 04c960c99..000000000 --- a/src/views/qms/inspectionJobProduction/index.vue +++ /dev/null @@ -1,442 +0,0 @@ - - - diff --git a/src/views/qms/inspectionJobProduction/inspectionJobMain.data.ts b/src/views/qms/inspectionJobProduction/inspectionJobMain.data.ts deleted file mode 100644 index 802586cd9..000000000 --- a/src/views/qms/inspectionJobProduction/inspectionJobMain.data.ts +++ /dev/null @@ -1,885 +0,0 @@ -import type { CrudSchema } from '@/hooks/web/useCrudSchemas' -import { dateFormatter2 } from '@/utils/formatTime' -import { validateHanset, validateEmail } from '@/utils/validator' -import { dateFormatter } from '@/utils/formatTime' -import { validateTwoNum, validateSixNum } from '@/utils/validator' -const { t } = useI18n() // 国际化 -import { DICT_TYPE, getStrDictOptions } from '@/utils/dict' -const resultEntryMethodList = getStrDictOptions(DICT_TYPE.INSPECTION_CHARACTERISTICS_RESULT_ENTRY) -const featureTypeList = getStrDictOptions(DICT_TYPE.INSPECTION_CHARACTERISTICS_FEATURE_TYPE) -const isCanUpdateList = [ - { - label: '是', - value: true - }, - { - label: '否', - value: false - } -] - -/** - * @returns {Array} 检验任务主表 - */ -export const InspectionJobMain = useCrudSchemas( - reactive([ - { - label: '编码', - field: 'number', - sort: 'custom', - isSearch: true, - form: { - componentProps: { - disabled: true - } - }, - table: { - width: 200, - fixed: 'left' - } - }, - { - label: '申请单号', - field: 'requestNumber', - sort: 'custom', - isSearch: true, - form: { - componentProps: { - disabled: true - } - }, - table: { - width: 200 - } - }, - { - label: '发货单号', - field: 'asnNumber', - sort: 'custom', - isSearch: true, - form: { - componentProps: { - disabled: true - } - }, - table: { - width: 180 - } - }, - { - label: '供应商编码', - field: 'supplierCode', - sort: 'custom', - isSearch: true, - form: { - componentProps: { - disabled: true - } - }, - table: { - width: 175 - } - }, - { - label: '供应商名称', - field: 'supplierName', - sort: 'custom', - isSearch: false, - table: { - width: 175 - }, - form: { - componentProps: { - disabled: true - } - } - }, - { - label: '物料编码', - field: 'itemCode', - sort: 'custom', - isSearch: false, - table: { - width: 150 - }, - form: { - componentProps: { - disabled: true - } - } - }, - { - label: '物料名称', - field: 'itemName', - sort: 'custom', - isSearch: false, - table: { - width: 175 - }, - form: { - componentProps: { - disabled: true - } - } - }, - { - label: '物料批次', - field: 'batch', - sort: 'custom', - isSearch: false, - form: { - componentProps: { - disabled: true - } - }, - table: { - width: 150 - } - }, - { - label: '参考订单号', - field: 'referenceOrderCode', - sort: 'custom', - isSearch: false, - form: { - componentProps: { - disabled: true - } - }, - table: { - width: 150 - } - }, - { - label: '参考订单行', - field: 'referenceOrderRow', - sort: 'custom', - isSearch: false, - form: { - component: 'InputNumber', - value: 0, - componentProps: { - disabled: true - } - }, - table: { - width: 150 - } - }, - { - label: '参考凭证号', - field: 'referenceCertificateCode', - sort: 'custom', - isSearch: false, - form: { - componentProps: { - disabled: true - } - }, - table: { - width: 150 - } - }, - { - label: '参考凭证行', - field: 'referenceCertificateRow', - sort: 'custom', - isSearch: false, - form: { - component: 'InputNumber', - value: 0, - componentProps: { - disabled: true - } - }, - table: { - width: 150 - } - }, - { - label: '检验方案编码', - field: 'inspectionSchemeCode', - sort: 'custom', - isSearch: false, - form: { - componentProps: { - disabled: true - } - }, - table: { - width: 200 - } - }, - { - label: '批次', - field: 'inspectionBatch', - sort: 'custom', - isSearch: false, - isDetail: true, - form: { - componentProps: { - disabled: true - } - }, - table: { - width: 150 - } - }, - { - label: '供应商批次', - field: 'supplierBatch', - sort: 'custom', - isSearch: false, - isDetail: true, - form: { - componentProps: { - disabled: true - } - }, - table: { - width: 150 - } - }, - { - label: '检验批数量', - field: 'inspectionBatchAmount', - sort: 'custom', - isSearch: false, - form: { - componentProps: { - disabled: true - } - }, - table: { - width: 150 - } - }, - // { - // label: '采样总数量', - // field: 'sampleTotalAmount', - // sort: 'custom', - // isSearch: false, - // form: { - // componentProps:{ - // disabled:true - // } - // }, - // table: { - // width: 150 - // } - // }, - { - label: '检验类型', - field: 'inspectionType', - sort: 'custom', - dictType: DICT_TYPE.INSPECTION_TYPE, - dictClass: 'string', - isSearch: false, - form: { - component: 'Select', - componentProps: { - disabled: true - } - }, - table: { - width: 150 - } - }, - { - label: '完成人', - field: 'completeUser', - sort: 'custom', - dictType: DICT_TYPE.TRUE_FALSE, - dictClass: 'string', // 默认都是字符串类型其他暂不考虑 - isTable: false, - isDetail: false, - isSearch: true, - isTableForm: false, - isForm: false - }, - // { - // label: '检验批来源', - // field: 'inspectionBatchSource', - // sort: 'custom', - // isSearch: false, - // dictType: DICT_TYPE.INSPECTION_BATCH_SOURCE, - // dictClass: 'string', - // form:{ - // componentProps:{ - // disabled:true - // } - // }, - // table: { - // width: 150 - // } - // }, - { - label: '检验阶段', - field: 'inspectionStage', - sort: 'custom', - isSearch: false, - form: { - component: 'InputNumber', - value: 0, - componentProps: { - disabled: true - } - }, - table: { - width: 150 - } - }, - { - label: '检验严格性', - field: 'inspectionStringency', - sort: 'custom', - isSearch: false, - dictType: DICT_TYPE.INSPECTION_SEVERITY, - dictClass: 'string', - form: { - componentProps: { - disabled: true - } - }, - table: { - width: 150 - } - }, - { - label: '计划开始时间', - field: 'planStartTime', - sort: 'custom', - formatter: dateFormatter, - isSearch: false, - 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: { - type: 'datetime', - valueFormat: 'x', - disabled: true - } - }, - detail: { - dateFormat: 'YYYY-MM-DD HH:mm:ss' - }, - table: { - width: 175 - } - }, - { - label: '计划结束时间', - field: 'planEndTime', - sort: 'custom', - formatter: dateFormatter, - isSearch: false, - 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: { - type: 'datetime', - valueFormat: 'x', - disabled: true - } - }, - detail: { - dateFormat: 'YYYY-MM-DD HH:mm:ss' - }, - table: { - width: 175 - } - }, - { - label: '检验水平', - field: 'inspectionLevel', - sort: 'custom', - isSearch: false, - dictType: DICT_TYPE.INSPECTION_LEVEL, - dictClass: 'string', - form: { - componentProps: { - disabled: true - } - }, - table: { - width: 150 - } - }, - { - label: 'AQL值', - field: 'aqlValue', - sort: 'custom', - isSearch: false, - dictType: DICT_TYPE.BASIC_AQL, - dictClass: 'string', - form: { - componentProps: { - disabled: true - } - }, - table: { - width: 150 - } - }, - // { - // label: '使用决策', - // field: 'usageDecision', - // sort: 'custom', - // isSearch: false, - // dictType: DICT_TYPE.USAGE_DECISION, - // form:{ - // componentProps:{ - // } - // } - // }, - // { - // label: '是否可用', - // field: 'available', - // dictType: DICT_TYPE.TRUE_FALSE, - // dictClass: 'string', - // isTable: true, - // sort: 'custom', - // table: { - // width: 150 - // }, - // form: { - // component: 'Switch', - // value: 'TRUE', - // componentProps: { - // inactiveValue: 'FALSE', - // activeValue: 'TRUE', - // disabled:true - // } - // } - // }, - { - label: '承接人', - field: 'acceptUserName', - table: { - width: 130 - }, - isForm: false, - isTable: false, - isDetail: true - }, - { - label: '承接时间', - field: 'acceptTime', - isForm: false, - table: { - width: 180 - }, - isTable: false, - isDetail: true, - formatter: dateFormatter, - detail: { - dateFormat: 'YYYY-MM-DD HH:mm:ss' - }, - form: { - component: 'DatePicker', - componentProps: { - style: { width: '100%' }, - type: 'datetime', - dateFormat: 'YYYY-MM-DD HH:mm:ss', - valueFormat: 'x' - } - } - }, - - { - label: '收货时间', - field: 'deliveryTime', - sort: 'custom', - formatter: dateFormatter, - isSearch: false, - 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: { - type: 'datetime', - valueFormat: 'x' - } - }, - detail: { - dateFormat: 'YYYY-MM-DD HH:mm:ss' - }, - table: { - width: 175 - } - }, - - { - label: '完成人', - field: 'completeUserName', - table: { - width: 130 - }, - isForm: false, - isTable: true, - isDetail: true - }, - { - label: '完成时间', - field: 'completeTime', - isForm: false, - table: { - width: 180 - }, - formatter: dateFormatter, - detail: { - dateFormat: 'YYYY-MM-DD HH:mm:ss' - }, - form: { - component: 'DatePicker', - componentProps: { - style: { width: '100%' }, - type: 'datetime', - dateFormat: 'YYYY-MM-DD HH:mm:ss', - valueFormat: 'x' - } - } - }, - { - label: '状态', - field: 'status', - dictType: DICT_TYPE.JOB_STATUS, - dictClass: 'string', - isForm: false, - isTable: true, - sort: 'custom', - table: { - width: 150 - } - }, - { - label: '是否可用', - field: 'available', - sort: 'custom', - isSearch: true, - dictType: DICT_TYPE.TRUE_FALSE, - dictClass: 'string', // 默认都是字符串类型其他暂不考虑 - search: { - value: 'TRUE' - }, - form: { - component: 'Switch', - value: 'TRUE', - componentProps: { - inactiveValue: 'FALSE', - activeValue: 'TRUE' - } - }, - table: { - width: 110 - } - }, - { - label: '包装号', - field: 'packageCode', - sort: 'custom', - isSearch: true, - isTable: false, - isForm: false, - tableForm: { - disabled: false - } - }, - { - label: '创建时间', - field: 'createTime', - isForm: false, - isTable: true, - table: { - width: 180 - }, - formatter: dateFormatter, - detail: { - dateFormat: 'YYYY-MM-DD HH:mm:ss' - }, - form: { - component: 'DatePicker', - componentProps: { - style: { width: '100%' }, - type: 'datetime', - dateFormat: 'YYYY-MM-DD HH:mm:ss', - valueFormat: 'x' - } - }, - 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')] - } - } - }, - { - label: '创建者', - field: 'creator', - table: { - width: 130 - }, - isForm: false, - isTable: true - }, - { - label: '最后更新时间', - field: 'updateTime', - sort: 'custom', - isDetail: true, - isForm: false, - isTable: false, - formatter: dateFormatter, - 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: 'updater', - isDetail: true, - isForm: false, - isTable: false, - table: { - width: 150 - } - }, - - { - label: '操作', - field: 'action', - isForm: false, - isDetail: false, - table: { - width: 300, - fixed: 'right' - } - } - ]) -) - -//表单校验 -export const InspectionJobMainRules = reactive({ - // usageDecision: [required], -}) - -/** - * @returns {Array} 检验任务子表 - */ -export const InspectionJobDetail = useCrudSchemas( - reactive([ - { - label: '编码', - field: 'number', - sort: 'custom', - isSearch: true - }, - { - label: '检验方案模板编码', - field: 'inspectionCode', - sort: 'custom', - isSearch: true - }, - { - label: '描述', - field: 'processDescribe', - sort: 'custom', - isSearch: true - }, - { - label: '顺序号', - field: 'sequenceCode', - sort: 'custom', - isSearch: true, - form: { - component: 'InputNumber', - value: 0 - } - }, - { - label: '检验特性编号', - field: 'inspectionCharCode', - sort: 'custom', - isSearch: true - }, - { - label: '检验特性编码', - field: 'inspectionJobCharacteristicsRespVO.number', - sort: 'custom' - }, - { - label: '检验特性描述', - field: 'inspectionJobCharacteristicsRespVO.description', - sort: 'custom' - }, - { - label: '检验方法', - field: 'inspectionJobCharacteristicsRespVO.inspectionMethodCode', - sort: 'custom' - }, - { - label: '采样过程编码', - field: 'inspectionJobCharacteristicsRespVO.samplingProcessCode', - sort: 'custom' - }, - { - label: '动态修改规则编码', - field: 'inspectionJobCharacteristicsRespVO.dynamicUpdateCode', - sort: 'custom' - }, - { - label: '是否允许修改特征值', - field: 'inspectionJobCharacteristicsRespVO.isCanUpdate', - sort: 'custom', - formatter: (_: Recordable, __: TableColumn, cellValue: number) => { - return isCanUpdateList.find((account) => account.value == cellValue)?.label - } - }, - { - label: '结果录入方式', - field: 'inspectionJobCharacteristicsRespVO.resultEntryMethod', - sort: 'custom', - // dictType: DICT_TYPE.INSPECTION_CHARACTERISTICS_RESULT_ENTRY, - // dictClass: 'string', - formatter: (_: Recordable, __: TableColumn, cellValue: number) => { - return resultEntryMethodList.find((account) => account.value == cellValue)?.label - } - }, - { - label: '特征类型', - field: 'inspectionJobCharacteristicsRespVO.featureType', - sort: 'custom', - formatter: (_: Recordable, __: TableColumn, cellValue: number) => { - return featureTypeList.find((account) => account.value == cellValue)?.label - } - } - ]) -) - -//表单校验 -export const InspectionJobDetailRules = reactive({ - taskCode: [required], - processCode: [required], - sequenceCode: [required], - available: [required] -}) -/** - * @returns {Array} 检验任务包装 - */ -export const InspectionJobPackage = useCrudSchemas( - reactive([ - { - label: '编码', - field: 'number', - sort: 'custom', - isSearch: true, - tableForm: { - disabled: true - }, - table: { - width: 200 - } - }, - { - label: '包装号', - field: 'packageCode', - sort: 'custom', - isSearch: true, - tableForm: { - disabled: true - }, - table: { - width: 200 - } - }, - { - label: '包装规格', - field: 'packageSpecificationCode', - sort: 'custom', - isSearch: true, - tableForm: { - disabled: true - }, - table: { - width: 180 - } - }, - { - label: '数量', - field: 'amount', - sort: 'custom', - isSearch: true, - form: { - component: 'InputNumber', - value: 0 - }, - tableForm: { - disabled: true - }, - table: { - width: 150 - } - }, - { - label: '计量单位', - field: 'measuringUnit', - sort: 'custom', - isSearch: true, - tableForm: { - disabled: true - }, - table: { - width: 150 - } - }, - { - label: '采样数量', - field: 'sampleAmount', - sort: 'custom', - isSearch: true, - isTable: false, - table: { - width: 150 - } - } - ]) -) -//表单校验 -export const InspectionJobPackageRules = reactive({ - sampleAmount: [required, { validator: validateSixNum, trigger: 'blur' }] -}) diff --git a/src/views/qms/inspectionJobPurchase/addForm.vue b/src/views/qms/inspectionJobPurchase/addForm.vue deleted file mode 100644 index 6b2e16b28..000000000 --- a/src/views/qms/inspectionJobPurchase/addForm.vue +++ /dev/null @@ -1,1552 +0,0 @@ - - - - diff --git a/src/views/qms/inspectionJobPurchase/detail.vue b/src/views/qms/inspectionJobPurchase/detail.vue deleted file mode 100644 index 3dc132caf..000000000 --- a/src/views/qms/inspectionJobPurchase/detail.vue +++ /dev/null @@ -1,194 +0,0 @@ - - - - - diff --git a/src/views/qms/inspectionJobPurchase/index.vue b/src/views/qms/inspectionJobPurchase/index.vue deleted file mode 100644 index 3b9d26dd4..000000000 --- a/src/views/qms/inspectionJobPurchase/index.vue +++ /dev/null @@ -1,442 +0,0 @@ - - - diff --git a/src/views/qms/inspectionJobPurchase/inspectionJobMain.data.ts b/src/views/qms/inspectionJobPurchase/inspectionJobMain.data.ts deleted file mode 100644 index fa86592bf..000000000 --- a/src/views/qms/inspectionJobPurchase/inspectionJobMain.data.ts +++ /dev/null @@ -1,885 +0,0 @@ -import type { CrudSchema } from '@/hooks/web/useCrudSchemas' -import { dateFormatter2 } from '@/utils/formatTime' -import { validateHanset, validateEmail } from '@/utils/validator' -import { dateFormatter } from '@/utils/formatTime' -import { validateTwoNum, validateSixNum } from '@/utils/validator' -const { t } = useI18n() // 国际化 -import { DICT_TYPE, getStrDictOptions } from '@/utils/dict' -const resultEntryMethodList = getStrDictOptions(DICT_TYPE.INSPECTION_CHARACTERISTICS_RESULT_ENTRY) -const featureTypeList = getStrDictOptions(DICT_TYPE.INSPECTION_CHARACTERISTICS_FEATURE_TYPE) -const isCanUpdateList = [ - { - label: '是', - value: true - }, - { - label: '否', - value: false - } -] - -/** - * @returns {Array} 检验任务主表 - */ -export const InspectionJobMain = useCrudSchemas( - reactive([ - { - label: '编码', - field: 'number', - sort: 'custom', - isSearch: true, - form: { - componentProps: { - disabled: true - } - }, - table: { - width: 200, - fixed: 'left' - } - }, - { - label: '申请单号', - field: 'requestNumber', - sort: 'custom', - isSearch: true, - form: { - componentProps: { - disabled: true - } - }, - table: { - width: 200 - } - }, - { - label: '发货单号', - field: 'asnNumber', - sort: 'custom', - isSearch: true, - form: { - componentProps: { - disabled: true - } - }, - table: { - width: 180 - } - }, - { - label: '供应商编码', - field: 'supplierCode', - sort: 'custom', - isSearch: true, - form: { - componentProps: { - disabled: true - } - }, - table: { - width: 175 - } - }, - { - label: '供应商名称', - field: 'supplierName', - sort: 'custom', - isSearch: false, - table: { - width: 175 - }, - form: { - componentProps: { - disabled: true - } - } - }, - { - label: '物料编码', - field: 'itemCode', - sort: 'custom', - isSearch: false, - table: { - width: 150 - }, - form: { - componentProps: { - disabled: true - } - } - }, - { - label: '物料名称', - field: 'itemName', - sort: 'custom', - isSearch: false, - table: { - width: 175 - }, - form: { - componentProps: { - disabled: true - } - } - }, - { - label: '物料批次', - field: 'batch', - sort: 'custom', - isSearch: false, - form: { - componentProps: { - disabled: true - } - }, - table: { - width: 150 - } - }, - { - label: '参考订单号', - field: 'referenceOrderCode', - sort: 'custom', - isSearch: false, - form: { - componentProps: { - disabled: true - } - }, - table: { - width: 150 - } - }, - { - label: '参考订单行', - field: 'referenceOrderRow', - sort: 'custom', - isSearch: false, - form: { - component: 'InputNumber', - value: 0, - componentProps: { - disabled: true - } - }, - table: { - width: 150 - } - }, - { - label: '参考凭证号', - field: 'referenceCertificateCode', - sort: 'custom', - isSearch: false, - form: { - componentProps: { - disabled: true - } - }, - table: { - width: 150 - } - }, - { - label: '参考凭证行', - field: 'referenceCertificateRow', - sort: 'custom', - isSearch: false, - form: { - component: 'InputNumber', - value: 0, - componentProps: { - disabled: true - } - }, - table: { - width: 150 - } - }, - { - label: '检验方案编码', - field: 'inspectionSchemeCode', - sort: 'custom', - isSearch: false, - form: { - componentProps: { - disabled: true - } - }, - table: { - width: 200 - } - }, - { - label: '批次', - field: 'inspectionBatch', - sort: 'custom', - isSearch: false, - isDetail: true, - form: { - componentProps: { - disabled: true - } - }, - table: { - width: 150 - } - }, - { - label: '供应商批次', - field: 'supplierBatch', - sort: 'custom', - isSearch: false, - isDetail: true, - form: { - componentProps: { - disabled: true - } - }, - table: { - width: 150 - } - }, - { - label: '检验批数量', - field: 'inspectionBatchAmount', - sort: 'custom', - isSearch: false, - form: { - componentProps: { - disabled: true - } - }, - table: { - width: 150 - } - }, - // { - // label: '采样总数量', - // field: 'sampleTotalAmount', - // sort: 'custom', - // isSearch: false, - // form: { - // componentProps:{ - // disabled:true - // } - // }, - // table: { - // width: 150 - // } - // }, - { - label: '检验类型', - field: 'inspectionType', - sort: 'custom', - dictType: DICT_TYPE.INSPECTION_TYPE, - dictClass: 'string', - isSearch: false, - form: { - component: 'Select', - componentProps: { - disabled: true - } - }, - table: { - width: 150 - } - }, - { - label: '完成人', - field: 'completeUser', - sort: 'custom', - dictType: DICT_TYPE.TRUE_FALSE, - dictClass: 'string', // 默认都是字符串类型其他暂不考虑 - isTable: false, - isDetail: false, - isSearch: true, - isTableForm: false, - isForm: false - }, - // { - // label: '检验批来源', - // field: 'inspectionBatchSource', - // sort: 'custom', - // isSearch: false, - // dictType: DICT_TYPE.INSPECTION_BATCH_SOURCE, - // dictClass: 'string', - // form:{ - // componentProps:{ - // disabled:true - // } - // }, - // table: { - // width: 150 - // } - // }, - { - label: '检验阶段', - field: 'inspectionStage', - sort: 'custom', - isSearch: false, - form: { - component: 'InputNumber', - value: 0, - componentProps: { - disabled: true - } - }, - table: { - width: 150 - } - }, - { - label: '检验严格性', - field: 'inspectionStringency', - sort: 'custom', - isSearch: false, - dictType: DICT_TYPE.INSPECTION_SEVERITY, - dictClass: 'string', - form: { - componentProps: { - disabled: true - } - }, - table: { - width: 150 - } - }, - { - label: '计划开始时间', - field: 'planStartTime', - sort: 'custom', - formatter: dateFormatter, - isSearch: false, - 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: { - type: 'datetime', - valueFormat: 'x', - disabled: true - } - }, - detail: { - dateFormat: 'YYYY-MM-DD HH:mm:ss' - }, - table: { - width: 175 - } - }, - { - label: '计划结束时间', - field: 'planEndTime', - sort: 'custom', - formatter: dateFormatter, - isSearch: false, - 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: { - type: 'datetime', - valueFormat: 'x', - disabled: true - } - }, - detail: { - dateFormat: 'YYYY-MM-DD HH:mm:ss' - }, - table: { - width: 175 - } - }, - { - label: '检验水平', - field: 'inspectionLevel', - sort: 'custom', - isSearch: false, - dictType: DICT_TYPE.INSPECTION_LEVEL, - dictClass: 'string', - form: { - componentProps: { - disabled: true - } - }, - table: { - width: 150 - } - }, - { - label: 'AQL值', - field: 'aqlValue', - sort: 'custom', - isSearch: false, - dictType: DICT_TYPE.BASIC_AQL, - dictClass: 'string', - form: { - componentProps: { - disabled: true - } - }, - table: { - width: 150 - } - }, - // { - // label: '使用决策', - // field: 'usageDecision', - // sort: 'custom', - // isSearch: false, - // dictType: DICT_TYPE.USAGE_DECISION, - // form:{ - // componentProps:{ - // } - // } - // }, - // { - // label: '是否可用', - // field: 'available', - // dictType: DICT_TYPE.TRUE_FALSE, - // dictClass: 'string', - // isTable: true, - // sort: 'custom', - // table: { - // width: 150 - // }, - // form: { - // component: 'Switch', - // value: 'TRUE', - // componentProps: { - // inactiveValue: 'FALSE', - // activeValue: 'TRUE', - // disabled:true - // } - // } - // }, - { - label: '承接人', - field: 'acceptUserName', - table: { - width: 130 - }, - isForm: false, - isTable: false, - isDetail: true - }, - { - label: '承接时间', - field: 'acceptTime', - isForm: false, - table: { - width: 180 - }, - isTable: false, - isDetail: true, - formatter: dateFormatter, - detail: { - dateFormat: 'YYYY-MM-DD HH:mm:ss' - }, - form: { - component: 'DatePicker', - componentProps: { - style: { width: '100%' }, - type: 'datetime', - dateFormat: 'YYYY-MM-DD HH:mm:ss', - valueFormat: 'x' - } - } - }, - - { - label: '收货时间', - field: 'deliveryTime', - sort: 'custom', - formatter: dateFormatter, - isSearch: false, - 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: { - type: 'datetime', - valueFormat: 'x' - } - }, - detail: { - dateFormat: 'YYYY-MM-DD HH:mm:ss' - }, - table: { - width: 175 - } - }, - - { - label: '完成人', - field: 'completeUserName', - table: { - width: 130 - }, - isForm: false, - isTable: true, - isDetail: true - }, - { - label: '完成时间', - field: 'completeTime', - isForm: false, - table: { - width: 180 - }, - formatter: dateFormatter, - detail: { - dateFormat: 'YYYY-MM-DD HH:mm:ss' - }, - form: { - component: 'DatePicker', - componentProps: { - style: { width: '100%' }, - type: 'datetime', - dateFormat: 'YYYY-MM-DD HH:mm:ss', - valueFormat: 'x' - } - } - }, - { - label: '状态', - field: 'status', - dictType: DICT_TYPE.JOB_STATUS, - dictClass: 'string', - isForm: false, - isTable: true, - sort: 'custom', - table: { - width: 150 - } - }, - { - label: '是否可用', - field: 'available', - sort: 'custom', - isSearch: true, - dictType: DICT_TYPE.TRUE_FALSE, - dictClass: 'string', // 默认都是字符串类型其他暂不考虑 - search: { - value: 'TRUE' - }, - form: { - component: 'Switch', - value: 'TRUE', - componentProps: { - inactiveValue: 'FALSE', - activeValue: 'TRUE' - } - }, - table: { - width: 110 - } - }, - { - label: '包装号', - field: 'packageCode', - sort: 'custom', - isSearch: true, - isTable: false, - isForm: false, - tableForm: { - disabled: false - } - }, - { - label: '创建时间', - field: 'createTime', - isForm: false, - table: { - width: 180 - }, - formatter: dateFormatter, - detail: { - dateFormat: 'YYYY-MM-DD HH:mm:ss' - }, - form: { - component: 'DatePicker', - componentProps: { - style: { width: '100%' }, - type: 'datetime', - dateFormat: 'YYYY-MM-DD HH:mm:ss', - valueFormat: 'x' - } - }, - isTable: true, - 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')] - } - } - }, - { - label: '创建者', - field: 'creator', - table: { - width: 130 - }, - isForm: false, - isTable: true - }, - { - label: '最后更新时间', - field: 'updateTime', - sort: 'custom', - isDetail: true, - isForm: false, - isTable: false, - formatter: dateFormatter, - 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: 'updater', - isDetail: true, - isForm: false, - isTable: false, - table: { - width: 150 - } - }, - - { - label: '操作', - field: 'action', - isForm: false, - isDetail: false, - table: { - width: 300, - fixed: 'right' - } - } - ]) -) - -//表单校验 -export const InspectionJobMainRules = reactive({ - // usageDecision: [required], -}) - -/** - * @returns {Array} 检验任务子表 - */ -export const InspectionJobDetail = useCrudSchemas( - reactive([ - { - label: '编码', - field: 'number', - sort: 'custom', - isSearch: true - }, - { - label: '检验方案模板编码', - field: 'inspectionCode', - sort: 'custom', - isSearch: true - }, - { - label: '描述', - field: 'processDescribe', - sort: 'custom', - isSearch: true - }, - { - label: '顺序号', - field: 'sequenceCode', - sort: 'custom', - isSearch: true, - form: { - component: 'InputNumber', - value: 0 - } - }, - { - label: '检验特性编号', - field: 'inspectionCharCode', - sort: 'custom', - isSearch: true - }, - { - label: '检验特性编码', - field: 'inspectionJobCharacteristicsRespVO.number', - sort: 'custom' - }, - { - label: '检验特性描述', - field: 'inspectionJobCharacteristicsRespVO.description', - sort: 'custom' - }, - { - label: '检验方法', - field: 'inspectionJobCharacteristicsRespVO.inspectionMethodCode', - sort: 'custom' - }, - { - label: '采样过程编码', - field: 'inspectionJobCharacteristicsRespVO.samplingProcessCode', - sort: 'custom' - }, - { - label: '动态修改规则编码', - field: 'inspectionJobCharacteristicsRespVO.dynamicUpdateCode', - sort: 'custom' - }, - { - label: '是否允许修改特征值', - field: 'inspectionJobCharacteristicsRespVO.isCanUpdate', - sort: 'custom', - formatter: (_: Recordable, __: TableColumn, cellValue: number) => { - return isCanUpdateList.find((account) => account.value == cellValue)?.label - } - }, - { - label: '结果录入方式', - field: 'inspectionJobCharacteristicsRespVO.resultEntryMethod', - sort: 'custom', - // dictType: DICT_TYPE.INSPECTION_CHARACTERISTICS_RESULT_ENTRY, - // dictClass: 'string', - formatter: (_: Recordable, __: TableColumn, cellValue: number) => { - return resultEntryMethodList.find((account) => account.value == cellValue)?.label - } - }, - { - label: '特征类型', - field: 'inspectionJobCharacteristicsRespVO.featureType', - sort: 'custom', - formatter: (_: Recordable, __: TableColumn, cellValue: number) => { - return featureTypeList.find((account) => account.value == cellValue)?.label - } - } - ]) -) - -//表单校验 -export const InspectionJobDetailRules = reactive({ - taskCode: [required], - processCode: [required], - sequenceCode: [required], - available: [required] -}) -/** - * @returns {Array} 检验任务包装 - */ -export const InspectionJobPackage = useCrudSchemas( - reactive([ - { - label: '编码', - field: 'number', - sort: 'custom', - isSearch: true, - tableForm: { - disabled: true - }, - table: { - width: 200 - } - }, - { - label: '包装号', - field: 'packageCode', - sort: 'custom', - isSearch: true, - tableForm: { - disabled: true - }, - table: { - width: 200 - } - }, - { - label: '包装规格', - field: 'packageSpecificationCode', - sort: 'custom', - isSearch: true, - tableForm: { - disabled: true - }, - table: { - width: 180 - } - }, - { - label: '数量', - field: 'amount', - sort: 'custom', - isSearch: true, - form: { - component: 'InputNumber', - value: 0 - }, - tableForm: { - disabled: true - }, - table: { - width: 150 - } - }, - { - label: '计量单位', - field: 'measuringUnit', - sort: 'custom', - isSearch: true, - tableForm: { - disabled: true - }, - table: { - width: 150 - } - }, - { - label: '采样数量', - field: 'sampleAmount', - sort: 'custom', - isSearch: true, - isTable: false, - table: { - width: 150 - } - } - ]) -) -//表单校验 -export const InspectionJobPackageRules = reactive({ - sampleAmount: [required, { validator: validateSixNum, trigger: 'blur' }] -}) From 04b7ce32572509be5993a8c5b6499e79fc23bc6c Mon Sep 17 00:00:00 2001 From: zhang_li <2235006734@qqq.com> Date: Tue, 13 Aug 2024 16:41:28 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E7=BB=B4=E4=BF=AE=E5=A4=87=E4=BB=B6?= =?UTF-8?q?=E9=80=80=E8=B4=A7=EF=BC=8C=E9=87=87=E8=B4=AD=E4=B8=8A=E6=9E=B6?= =?UTF-8?q?=EF=BC=8C=E9=87=87=E8=B4=AD=E7=B4=A2=E8=B5=94=EF=BC=8C=E4=B8=8A?= =?UTF-8?q?=E6=9E=B6=E8=AE=B0=E5=BD=95,=E5=AF=BC=E5=87=BA=E6=96=87?= =?UTF-8?q?=E4=BB=B6=E5=90=8D=E5=AD=97=EF=BC=8C=E6=A3=80=E9=AA=8C=E4=BB=BB?= =?UTF-8?q?=E5=8A=A1=E5=92=8C=E8=AE=B0=E5=BD=95=E9=87=8D=E7=BD=AE=E9=97=AE?= =?UTF-8?q?=E9=A2=98=EF=BC=8C=E9=A1=B5=E9=9D=A2=E5=88=B7=E6=96=B0=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/qms/inspectionJob/index.vue | 30 ++++++++++--------- src/views/qms/inspectionRecord/index.vue | 27 +++++++++-------- .../inspect/inspectJobMain/index.vue | 3 +- .../inspect/inspectRecordMain/index.vue | 3 +- .../inspect/inspectRequestMain/index.vue | 5 ++-- .../purchasereturnRecordSpareMain/index.vue | 5 ++-- .../purchasereturnRequestSpareMain/index.vue | 3 +- .../putaway/putawayJobMain/index.vue | 3 +- .../putaway/putawayRecordMain/index.vue | 3 +- .../putaway/putawayRequestMain/index.vue | 5 ++-- .../purchaseclaimRecordMain/index.vue | 3 +- .../purchaseclaimRequestMain/index.vue | 5 ++-- 12 files changed, 55 insertions(+), 40 deletions(-) diff --git a/src/views/qms/inspectionJob/index.vue b/src/views/qms/inspectionJob/index.vue index c7e3423da..47f35526a 100644 --- a/src/views/qms/inspectionJob/index.vue +++ b/src/views/qms/inspectionJob/index.vue @@ -4,7 +4,7 @@ @@ -477,27 +477,30 @@ const searchFormClick = (searchData) => { } getList() // 刷新当前列表 } -const resetSearch = () => { - if (route.name == 'inspectionJobProductionMain') { - setSearchParams({ +/** 初始化 **/ +onMounted(async () => { + console.log(11,route.name) + if (route.name == 'inspectionJobProductionMain') { + tableObject.params = { available: true, inspectionType: '4' - }) + } } else if (route.name == 'inspectionJobPurchaseMain') { - setSearchParams({ + tableObject.params = { available: true, inspectionType: '1' - }) + } } else { - setSearchParams({ + tableObject.params = { available: true, excludeInspectionType: '1,4' - }) + } } -} -/** 初始化 **/ -onMounted(async () => { - console.log(11,route.name) + + getList() + // importTemplateData.templateUrl = await InspectionJobMainApi.importTemplate() +}) +onActivated(() => { if (route.name == 'inspectionJobProductionMain') { tableObject.params = { available: true, @@ -516,6 +519,5 @@ onMounted(async () => { } getList() - // importTemplateData.templateUrl = await InspectionJobMainApi.importTemplate() }) diff --git a/src/views/qms/inspectionRecord/index.vue b/src/views/qms/inspectionRecord/index.vue index 2cd165f05..75bc47e35 100644 --- a/src/views/qms/inspectionRecord/index.vue +++ b/src/views/qms/inspectionRecord/index.vue @@ -4,7 +4,7 @@ @@ -464,26 +464,29 @@ const searchFormClick = (searchData) => { } getList() // 刷新当前列表 } -const resetSearch = () => { - if (route.name == 'inspectionRecordPurchaseMain') { - setSearchParams({ + +/** 初始化 **/ +onMounted(async () => { + if (route.name == 'inspectionRecordPurchaseMain') { + tableObject.params = { available: true, inspectionType: '1' - }) + } } else if (route.name == 'inspectionRecordProductionMain') { - setSearchParams({ + tableObject.params = { available: true, inspectionType: '4' - }) + } } else { - setSearchParams({ + tableObject.params = { available: true, excludeInspectionType: '1,4,11' - }) + } } -} -/** 初始化 **/ -onMounted(async () => { + + getList() +}) +onActivated(() => { if (route.name == 'inspectionRecordPurchaseMain') { tableObject.params = { available: true, diff --git a/src/views/wms/purchasereceiptManage/inspect/inspectJobMain/index.vue b/src/views/wms/purchasereceiptManage/inspect/inspectJobMain/index.vue index b2779c087..73a95c56b 100644 --- a/src/views/wms/purchasereceiptManage/inspect/inspectJobMain/index.vue +++ b/src/views/wms/purchasereceiptManage/inspect/inspectJobMain/index.vue @@ -73,6 +73,7 @@ import * as InspectJobMainApi from '@/api/wms/inspectJobMain' import * as InspectJobDetailApi from '@/api/wms/inspectJobDetail' import * as defaultButtons from '@/utils/disposition/defaultButtons' import { CACHE_KEY, useCache } from '@/hooks/web/useCache' + import { formatDate } from '@/utils/formatTime' // 检验任务主 defineOptions({ name: 'InspectJobMain' }) @@ -233,7 +234,7 @@ const handleExport = async () => { // 发起导出 exportLoading.value = true const data = await InspectJobMainApi.exportInspectJobMain(tableObject.params) - download.excel(data, '检验任务主.xlsx') + download.excel(data, `【${route.meta.title}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { exportLoading.value = false diff --git a/src/views/wms/purchasereceiptManage/inspect/inspectRecordMain/index.vue b/src/views/wms/purchasereceiptManage/inspect/inspectRecordMain/index.vue index b7f63eff1..a987cad02 100644 --- a/src/views/wms/purchasereceiptManage/inspect/inspectRecordMain/index.vue +++ b/src/views/wms/purchasereceiptManage/inspect/inspectRecordMain/index.vue @@ -72,6 +72,7 @@ import * as InspectRecordDetailApi from '@/api/wms/inspectRecordDetail' import * as defaultButtons from '@/utils/disposition/defaultButtons' import Preview from '@/components/UploadFile/src/Preview.vue' import { CACHE_KEY, useCache } from '@/hooks/web/useCache' + import { formatDate } from '@/utils/formatTime' // 检验记录主 defineOptions({ name: 'InspectRecordMain' }) @@ -179,7 +180,7 @@ const handleExport = async () => { // 发起导出 exportLoading.value = true const data = await InspectRecordMainApi.exportInspectRecordMain(tableObject.params) - download.excel(data, '检验记录主.xlsx') + download.excel(data, `【${route.meta.title}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { exportLoading.value = false diff --git a/src/views/wms/purchasereceiptManage/inspect/inspectRequestMain/index.vue b/src/views/wms/purchasereceiptManage/inspect/inspectRequestMain/index.vue index 91b579ad2..4cbc8f5df 100644 --- a/src/views/wms/purchasereceiptManage/inspect/inspectRequestMain/index.vue +++ b/src/views/wms/purchasereceiptManage/inspect/inspectRequestMain/index.vue @@ -53,6 +53,7 @@ import * as InspectRequestMainApi from '@/api/wms/inspectRequestMain' import * as InspectRequestDetailApi from '@/api/wms/inspectRequestDetail' import * as defaultButtons from '@/utils/disposition/defaultButtons' + import { formatDate } from '@/utils/formatTime' // 到货检验申请 defineOptions({ name: 'InspectRequestMain' }) @@ -322,7 +323,7 @@ // 发起导出 exportLoading.value = true const data = await InspectRequestMainApi.exportInspectRequestMain(tableObject.params) - download.excel(data, '检验申请主.xlsx') + download.excel(data, `【${route.meta.title}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { exportLoading.value = false @@ -385,7 +386,7 @@ // 导入附件弹窗所需的参数 const importTemplateData = reactive({ templateUrl: '', - templateTitle: '检验申请主导入模版.xlsx' + templateTitle: `【${route.meta.title}】导入模版.xlsx` }) // 导入成功之后 diff --git a/src/views/wms/purchasereceiptManage/purchasereturnspare/purchasereturnRecordSpareMain/index.vue b/src/views/wms/purchasereceiptManage/purchasereturnspare/purchasereturnRecordSpareMain/index.vue index 5f5e2b9ed..a2ec773c7 100644 --- a/src/views/wms/purchasereceiptManage/purchasereturnspare/purchasereturnRecordSpareMain/index.vue +++ b/src/views/wms/purchasereceiptManage/purchasereturnspare/purchasereturnRecordSpareMain/index.vue @@ -70,6 +70,7 @@ import * as defaultButtons from '@/utils/disposition/defaultButtons' import { getAccessToken } from '@/utils/auth' import { CACHE_KEY, useCache } from '@/hooks/web/useCache' import { getJmreportBaseUrl } from '@/utils/systemParam' + import { formatDate } from '@/utils/formatTime' // 采购退货记录主 defineOptions({ name: 'PurchasereturnRecordSpareMain' }) @@ -170,10 +171,10 @@ const handleExport = async () => { exportLoading.value = true if(routeName.value.includes('SCP')){ const data = await PurchasereturnRecordMainApi.exportPurchasereturnRecordMainSCP(tableObject.params) - download.excel(data, `${t('ts.采购退货记录主')}.xlsx`) + download.excel(data, `【${route.meta.title}】【${formatDate(new Date())}】.xlsx`) }else{ const data = await PurchasereturnRecordMainApi.exportPurchasereturnRecordMainSpare(tableObject.params) - download.excel(data, `维修备件退货记录主.xlsx`) + download.excel(data, `【${route.meta.title}】【${formatDate(new Date())}】.xlsx`) } } catch { diff --git a/src/views/wms/purchasereceiptManage/purchasereturnspare/purchasereturnRequestSpareMain/index.vue b/src/views/wms/purchasereceiptManage/purchasereturnspare/purchasereturnRequestSpareMain/index.vue index bea529f22..a5de550cc 100644 --- a/src/views/wms/purchasereceiptManage/purchasereturnspare/purchasereturnRequestSpareMain/index.vue +++ b/src/views/wms/purchasereceiptManage/purchasereturnspare/purchasereturnRequestSpareMain/index.vue @@ -141,6 +141,7 @@ import { getAccessToken } from '@/utils/auth' import * as BalanceApi from '@/api/wms/balance' import { async } from '@antv/x6/lib/registry/marker/async' import { getJmreportBaseUrl } from '@/utils/systemParam' + import { formatDate } from '@/utils/formatTime' // 采购退货申请 defineOptions({ name: 'PurchasereturnRequestSpareMain' }) @@ -708,7 +709,7 @@ const handleExport = async () => { const data = await PurchasereturnRequestMainApi.exportPurchasereturnRequestMainSpare( tableObject.params ) - download.excel(data, '维修备件退货申请主.xlsx') + download.excel(data, `【${route.meta.title}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { exportLoading.value = false diff --git a/src/views/wms/purchasereceiptManage/putaway/putawayJobMain/index.vue b/src/views/wms/purchasereceiptManage/putaway/putawayJobMain/index.vue index c4a0dd4b4..7dee1ed75 100644 --- a/src/views/wms/purchasereceiptManage/putaway/putawayJobMain/index.vue +++ b/src/views/wms/purchasereceiptManage/putaway/putawayJobMain/index.vue @@ -101,6 +101,7 @@ import * as defaultButtons from '@/utils/disposition/defaultButtons' import { CACHE_KEY, useCache } from '@/hooks/web/useCache' import {getAccessToken} from "@/utils/auth"; import { getJmreportBaseUrl } from '@/utils/systemParam' + import { formatDate } from '@/utils/formatTime' // 上架任务主 defineOptions({ name: 'PutawayJobMain' }) @@ -348,7 +349,7 @@ const handleExport = async () => { // 发起导出 exportLoading.value = true const data = await PutawayJobMainApi.exportPutawayJobMain(tableObject.params) - download.excel(data, '上架任务主.xlsx') + download.excel(data, `【${route.meta.title}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { exportLoading.value = false diff --git a/src/views/wms/purchasereceiptManage/putaway/putawayRecordMain/index.vue b/src/views/wms/purchasereceiptManage/putaway/putawayRecordMain/index.vue index 3d07d9ad2..9aa5e6792 100644 --- a/src/views/wms/purchasereceiptManage/putaway/putawayRecordMain/index.vue +++ b/src/views/wms/purchasereceiptManage/putaway/putawayRecordMain/index.vue @@ -91,6 +91,7 @@ import * as PutawayRecordMainApi from '@/api/wms/putawayRecordMain' import * as PutawayRecordDetailApi from '@/api/wms/putawayRecordDetail' import * as defaultButtons from '@/utils/disposition/defaultButtons' import { CACHE_KEY, useCache } from '@/hooks/web/useCache' + import { formatDate } from '@/utils/formatTime' // 上架记录主 defineOptions({ name: 'PutawayRecordMain' }) @@ -211,7 +212,7 @@ const handleExport = async () => { // 发起导出 exportLoading.value = true const data = await PutawayRecordMainApi.exportPutawayRecordMain(tableObject.params) - download.excel(data, '上架记录主.xlsx') + download.excel(data, `【${route.meta.title}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { exportLoading.value = false diff --git a/src/views/wms/purchasereceiptManage/putaway/putawayRequestMain/index.vue b/src/views/wms/purchasereceiptManage/putaway/putawayRequestMain/index.vue index 1223cadad..ad499e129 100644 --- a/src/views/wms/purchasereceiptManage/putaway/putawayRequestMain/index.vue +++ b/src/views/wms/purchasereceiptManage/putaway/putawayRequestMain/index.vue @@ -110,6 +110,7 @@ import { PutawayRequestMain, import * as PutawayRequestMainApi from '@/api/wms/putawayRequestMain' import * as PutawayRequestDetailApi from '@/api/wms/putawayRequestDetail' import * as defaultButtons from '@/utils/disposition/defaultButtons' + import { formatDate } from '@/utils/formatTime' // 上架申请 defineOptions({ name: 'PutawayRequestMain' }) @@ -406,7 +407,7 @@ const handleExport = async () => { // 发起导出 exportLoading.value = true const data = await PutawayRequestMainApi.exportPutawayRequestMain(tableObject.params) - download.excel(data, '上架申请主.xlsx') + download.excel(data, `【${route.meta.title}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { exportLoading.value = false @@ -475,7 +476,7 @@ const handleImport = () => { // 导入附件弹窗所需的参数 const importTemplateData = reactive({ templateUrl: '', - templateTitle: '上架申请主导入模版.xlsx' + templateTitle: `【${route.meta.title}】导入模版.xlsx` }) // 导入成功之后 diff --git a/src/views/wms/supplierManage/purchaseclaim/purchaseclaimRecordMain/index.vue b/src/views/wms/supplierManage/purchaseclaim/purchaseclaimRecordMain/index.vue index f3342060f..6784b9653 100644 --- a/src/views/wms/supplierManage/purchaseclaim/purchaseclaimRecordMain/index.vue +++ b/src/views/wms/supplierManage/purchaseclaim/purchaseclaimRecordMain/index.vue @@ -68,6 +68,7 @@ import * as PurchaseclaimRecordMainApi from '@/api/wms/purchaseclaimRecordMain' import * as PurchaseclaimRecordDetailApi from '@/api/wms/purchaseclaimRecordDetail' import * as defaultButtons from '@/utils/disposition/defaultButtons' import { CACHE_KEY, useCache } from '@/hooks/web/useCache' + import { formatDate } from '@/utils/formatTime' // 采购索赔记录主 defineOptions({ name: 'PurchaseclaimRecordMain' }) @@ -156,7 +157,7 @@ const handleExport = async () => { // 发起导出 exportLoading.value = true const data = await PurchaseclaimRecordMainApi.exportPurchaseclaimRecordMain(tableObject.params) - download.excel(data, '采购索赔记录主.xlsx') + download.excel(data, `【${route.meta.title}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { exportLoading.value = false diff --git a/src/views/wms/supplierManage/purchaseclaim/purchaseclaimRequestMain/index.vue b/src/views/wms/supplierManage/purchaseclaim/purchaseclaimRequestMain/index.vue index d95021822..3b4377640 100644 --- a/src/views/wms/supplierManage/purchaseclaim/purchaseclaimRequestMain/index.vue +++ b/src/views/wms/supplierManage/purchaseclaim/purchaseclaimRequestMain/index.vue @@ -77,6 +77,7 @@ import BasicForm from '@/components/BasicForm/src/BasicForm.vue' import TableHead from '@/components/TableHead/src/TableHead.vue' import { getJmreportBaseUrl } from '@/utils/systemParam' + import { formatDate } from '@/utils/formatTime' // 供应商索赔申请 defineOptions({ name: 'PurchaseclaimRequestMain' }) @@ -414,7 +415,7 @@ import { getJmreportBaseUrl } from '@/utils/systemParam' // 发起导出 exportLoading.value = true const data = await PurchaseclaimRequestMainApi.exportPurchaseclaimRequestMain(tableObject.params) - download.excel(data, '采购索赔申请主.xlsx') + download.excel(data, `【${route.meta.title}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { exportLoading.value = false @@ -484,7 +485,7 @@ import { getJmreportBaseUrl } from '@/utils/systemParam' // 导入附件弹窗所需的参数 const importTemplateData = reactive({ templateUrl: '', - templateTitle: '采购索赔申请信息导入模版.xlsx' + templateTitle: `【${route.meta.title}】导入模版.xlsx` }) // 导入成功之后 const importSuccess = () => {