diff --git a/.env.prod b/.env.prod index cb7c3aa46..c269d3296 100644 --- a/.env.prod +++ b/.env.prod @@ -41,3 +41,7 @@ VITE_TENANT='["长春1379","成都1397","长春2379"]' # 查看质检报告环境 VITE_REPORT_URL = 'http://dev.ccwin-in.com:25400' + +# 登录系统升级的提示 +VITE_SYSTERM_UPDATE_ALERT = true +VITE_SYSTERM_UPDATE_URL = 'https://scptest.faway-hella.com/' diff --git a/README.md b/README.md index 237938dee..0e77af65b 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,9 @@ ## dev发布2024-06-01-002 **xxxx.data.ts 文件配置说明** +dictType: DICT_TYPE.INVENTORY_STATUS, +dictClass: 'string', +dictAllOption:true,// true 字典中--下拉框中展示全选按钮 +dictAllValue:'全选', // 全选按钮的value值 **form表单查询弹窗配置** form: { labelMessage: '信息提示说明!!!', diff --git a/public/systemConfig.js b/public/systemConfig.js index 1908c7089..c84fd37fb 100644 --- a/public/systemConfig.js +++ b/public/systemConfig.js @@ -10,5 +10,7 @@ let systemConfig = { // 查看质检报告环境 reportUrl: 'https://scp.faway-hella.com', // 租户配置 - tenant: '["成都"]' + tenant: '["成都"]', + systermUpdateAlert: true, + systermUpdateUrl: 'https://scptest.faway-hella.com/' } diff --git a/src/api/qms/inspectionRecord/inspectionRecordMain/index.ts b/src/api/qms/inspectionRecord/inspectionRecordMain/index.ts index 375e69b2f..dfd99059f 100644 --- a/src/api/qms/inspectionRecord/inspectionRecordMain/index.ts +++ b/src/api/qms/inspectionRecord/inspectionRecordMain/index.ts @@ -46,6 +46,10 @@ export const createInspectionRecordMain = async (data: InspectionRecordMainVO) = // 修改检验申请 export const updateInspectionRecordMain = async (data: InspectionRecordMainVO) => { + return await request.put({ url: `/qms/inspection-record-main/update`, data }) +} +// 首件检验保存 +export const updateInspectionRecordFirstMain = async (data: InspectionRecordMainVO) => { return await request.put({ url: `/qms/inspection-record-main/firstInspectionUpdate`, data }) } diff --git a/src/api/qms/inspectionScheme/index.ts b/src/api/qms/inspectionScheme/index.ts index 3c5f30e93..53c305c2a 100644 --- a/src/api/qms/inspectionScheme/index.ts +++ b/src/api/qms/inspectionScheme/index.ts @@ -1,21 +1,21 @@ import request from '@/config/axios' // 新增 export const InspectionSchemeCreat = async (data) => { - return await request.post({ url: `/qms/inspection-scheme/create`,data}) + return await request.post({ url: `/qms/inspection-scheme/create`, data }) } // 编辑 export const InspectionSchemeUpdate = async (data) => { - return await request.put({ url: `/qms/inspection-scheme/update`,data}) + return await request.put({ url: `/qms/inspection-scheme/update`, data }) } // 删除 export const InspectionSchemeDelete = async (id) => { - return await request.delete({ url: `/qms/inspection-scheme/delete?id=`+id}) + return await request.delete({ url: `/qms/inspection-scheme/delete?id=` + id }) } // 列表 export const InspectionSchemePage = async (params) => { if (params.isSearch) { delete params.isSearch - const data = {...params} + const data = { ...params } return request.post({ url: '/qms/inspection-scheme/senior', data }) } else { return await request.get({ url: `/qms/inspection-scheme/page`, params }) @@ -31,6 +31,11 @@ export const disableInspectionScheme = async (id: number) => { return await request.disable({ url: `/qms/inspection-scheme/disable?id=` + id }) } +// 导出检验阶段 Excel +export const exportInspectionScheme = async (params) => { + return await request.download({ url: `/qms/inspection-scheme/export-excel`, params }) +} + // 下载用户导入模板 export const importTemplate = () => { return request.download({ url: '/qms/inspection-scheme/get-import-template' }) diff --git a/src/api/qms/inspectionTemplate/index.ts b/src/api/qms/inspectionTemplate/index.ts index eb80285c8..577fadd6f 100644 --- a/src/api/qms/inspectionTemplate/index.ts +++ b/src/api/qms/inspectionTemplate/index.ts @@ -1,28 +1,26 @@ import request from '@/config/axios' - - // 列表 export const getListByTempleteCode = async (code) => { - return await request.get({ url: `/qms/inspection-process/getListByTempleteCode?code=`+code}) + return await request.get({ url: `/qms/inspection-process/getListByTempleteCode?code=` + code }) } // 新增 export const inspectionTemplateCreat = async (data) => { - return await request.post({ url: `/qms/programme-template/create`,data}) + return await request.post({ url: `/qms/programme-template/create`, data }) } // 编辑 export const inspectionTemplateUpdate = async (data) => { - return await request.put({ url: `/qms/programme-template/update`,data}) + return await request.put({ url: `/qms/programme-template/update`, data }) } // 删除 export const inspectionTemplateDelete = async (id) => { - return await request.delete({ url: `/qms/programme-template/delete?id=`+id}) + return await request.delete({ url: `/qms/programme-template/delete?id=` + id }) } // 列表 export const inspectionTemplatePage = async (params) => { if (params.isSearch) { delete params.isSearch - const data = {...params} + const data = { ...params } return request.post({ url: '/qms/programme-template/senior', data }) } else { return await request.get({ url: `/qms/programme-template/page`, params }) @@ -38,6 +36,11 @@ export const disableInspectionTemplate = async (id: number) => { return await request.disable({ url: `/qms/programme-template/disable?id=` + id }) } +// 导出检验模版 Excel +export const exportInspectionTemplate = async (params) => { + return await request.download({ url: `/qms/programme-template/export-excel`, params }) +} + // 下载用户导入模板 export const importTemplate = () => { return request.download({ url: '/qms/programme-template/get-import-template' }) diff --git a/src/components/Descriptions/src/Descriptions.vue b/src/components/Descriptions/src/Descriptions.vue index a7c49f853..23ed47eb2 100644 --- a/src/components/Descriptions/src/Descriptions.vue +++ b/src/components/Descriptions/src/Descriptions.vue @@ -149,7 +149,7 @@ const showAll = () =>{
- + {{ data[item.field] }} diff --git a/src/hooks/web/useCrudSchemas.ts b/src/hooks/web/useCrudSchemas.ts index 541ca87b6..5f6c183f9 100644 --- a/src/hooks/web/useCrudSchemas.ts +++ b/src/hooks/web/useCrudSchemas.ts @@ -264,6 +264,10 @@ const filterFormSchema = (crudSchema: CrudSchema[], allSchemas: AllSchemas): For options.push(dict) }) } else { + if(schemaItem.dictAllOption){ + const allOptions: ComponentOptions = { label: '全选', value: schemaItem.dictAllValue||'' } + options.push(allOptions) + } getDictOptions(schemaItem.dictType).forEach((dict) => { options.push(dict) }) diff --git a/src/utils/systemParam.ts b/src/utils/systemParam.ts index 347b564dd..d165d58fa 100644 --- a/src/utils/systemParam.ts +++ b/src/utils/systemParam.ts @@ -4,6 +4,9 @@ const interfaceUrl = ref(import.meta.env.VITE_INTERFACE_URL) const jmreportBaseUrl = ref(import.meta.env.VITE_JMREPORT_BASE_URL) const reportUrl = ref(import.meta.env.VITE_REPORT_URL) const tenant = ref(import.meta.env.VITE_TENANT) +const systermUpdateAlert = ref(import.meta.env.VITE_SYSTERM_UPDATE_ALERT) +const systermUpdateUrl = ref(import.meta.env.VITE_SYSTERM_UPDATE_URL) + const mode = ref(import.meta.env.MODE) // 获取baseUrl export const getBaseUrl = () => { @@ -53,3 +56,23 @@ export const getTenant = () => { return tenant.value } } + + +// 获取系统升级是否弹出alert +export const getSystermUpdateAlert = () => { + if(mode.value === 'prod') { + return systemConfig.systermUpdateAlert + } else { + return systermUpdateAlert.value + } +} + +// 获取系统升级是否弹出alert地址 +export const getSystermUpdateUrl = () => { + if(mode.value === 'prod') { + return systemConfig.systermUpdateUrl + } else { + return systermUpdateUrl.value + } +} + diff --git a/src/views/login/components/LoginForm.vue b/src/views/login/components/LoginForm.vue index 9409377c3..3fb492c08 100644 --- a/src/views/login/components/LoginForm.vue +++ b/src/views/login/components/LoginForm.vue @@ -96,6 +96,7 @@ import { CACHE_KEY, useCache } from '@/hooks/web/useCache' import * as DeptApi from '@/api/system/dept' import { getTenant } from '@/utils/systemParam' + import { getSystermUpdateAlert,getSystermUpdateUrl } from '@/utils/systemParam' defineOptions({ name: 'LoginForm' }) @@ -211,6 +212,16 @@ // 登录 const handleLogin = async (params) => { console.log('登录-185') + if(getSystermUpdateAlert()){ + await ElMessageBox.alert( + '系统迁移,请移步至' + + `${getSystermUpdateUrl()}`, + '重要提示', + { + dangerouslyUseHTMLString: true, + } + ) + } loginLoading.value = true try { await getTenantId() diff --git a/src/views/qms/inspectionQ2/inspectionQ2.data.ts b/src/views/qms/inspectionQ2/inspectionQ2.data.ts index 9085a2ffd..2367309c2 100644 --- a/src/views/qms/inspectionQ2/inspectionQ2.data.ts +++ b/src/views/qms/inspectionQ2/inspectionQ2.data.ts @@ -50,7 +50,7 @@ export const Q2 = useCrudSchemas( } }, { - label: 'q1通知单号', + label: 'Q1通知单号', field: 'q1Number', sort: 'custom', table: { diff --git a/src/views/qms/inspectionQ3/inspectionQ3.data.ts b/src/views/qms/inspectionQ3/inspectionQ3.data.ts index 62606af62..ed0b771d3 100644 --- a/src/views/qms/inspectionQ3/inspectionQ3.data.ts +++ b/src/views/qms/inspectionQ3/inspectionQ3.data.ts @@ -44,7 +44,7 @@ export const Q3 = useCrudSchemas( } }, { - label: 'q1通知单号', + label: 'Q1通知单号', field: 'q1Number', sort: 'custom', table: { diff --git a/src/views/qms/inspectionRecordFirst/index.vue b/src/views/qms/inspectionRecordFirst/index.vue index de5d008bf..75bff36cf 100644 --- a/src/views/qms/inspectionRecordFirst/index.vue +++ b/src/views/qms/inspectionRecordFirst/index.vue @@ -135,7 +135,7 @@ const buttonBaseClick = (val, item) => { // 列表-操作按钮 const butttondata = (row) => { return [ - defaultButtons.mainListEditBtn({hasPermi: 'wms:inspection-recode-first-main:update' }), // 编辑 + defaultButtons.mainListEditBtn({ hide: isShowMainButton(row, 'publish'),hasPermi: 'wms:inspection-recode-first-main:update' }), // 编辑 defaultButtons.mainListDeleteBtn({hasPermi: 'wms:inspection-recode-first-main:delete' }), // 删除 defaultButtons.mainListOrderPubBtn({ hide: isShowMainButton(row, 'publish'), hasPermi:'qms:inspection-recode-first-main:pub'}), // 发布 ] @@ -228,7 +228,7 @@ const buttonBaseClick = (val, item) => { await InspectionRecordMainApi.createInspectionRecordMain(data) message.success(t('common.createSuccess')) }else { - await InspectionRecordMainApi.updateInspectionRecordMain(data) + await InspectionRecordMainApi.updateInspectionRecordFirstMain(data) message.success(t('common.updateSuccess')) } basicFormRef.value.dialogVisible = false diff --git a/src/views/qms/inspectionScheme/index.vue b/src/views/qms/inspectionScheme/index.vue index 1241fda5d..e385e67c2 100644 --- a/src/views/qms/inspectionScheme/index.vue +++ b/src/views/qms/inspectionScheme/index.vue @@ -59,6 +59,7 @@