From 1cf001d5b01d893281fdd87024ac864482fc670c Mon Sep 17 00:00:00 2001 From: zhaoxuebing <1291173720@qq.com> Date: Fri, 24 May 2024 10:02:55 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../qadCostcentre/qadCostcentre.data.ts | 14 ++++ .../subject/subjectAccount/index.vue | 9 +++ .../subjectAccount/subjectAccount.data.ts | 68 ++++++++++++++++--- 3 files changed, 81 insertions(+), 10 deletions(-) diff --git a/src/views/wms/basicDataManage/subject/qadCostcentre/qadCostcentre.data.ts b/src/views/wms/basicDataManage/subject/qadCostcentre/qadCostcentre.data.ts index cccc8aeac..4600bf6bd 100644 --- a/src/views/wms/basicDataManage/subject/qadCostcentre/qadCostcentre.data.ts +++ b/src/views/wms/basicDataManage/subject/qadCostcentre/qadCostcentre.data.ts @@ -62,6 +62,20 @@ export const QadCostcentre = useCrudSchemas(reactive([ field: 'available', sort: 'custom', isSearch: false, + dictType: DICT_TYPE.TRUE_FALSE, + dictClass: 'string', + isTable: true, + table: { + width: 120 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + }, }, { label: '备注', diff --git a/src/views/wms/basicDataManage/subject/subjectAccount/index.vue b/src/views/wms/basicDataManage/subject/subjectAccount/index.vue index 4c6654736..9a239983f 100644 --- a/src/views/wms/basicDataManage/subject/subjectAccount/index.vue +++ b/src/views/wms/basicDataManage/subject/subjectAccount/index.vue @@ -80,6 +80,15 @@ const tableColumns = ref(SubjectAccount.allSchemas.tableColumns) const searchTableSuccess = (formField, searchField, val, formRef) => { nextTick(() => { const setV = {} + if (formField === 'costecentreCode') { + setV['costecentreId'] = val[0]['costcentreId'] + setV['costcentreCode'] = val[0]['costcentreCode'] + setV['costecentreType'] = val[0]['costcentreType'] + } + if( formField === 'projectCode'){ + setV['projectId'] = val[0]['projectId'] + setV['projectCode'] = val[0]['projectCode'] + } setV[formField] = val[0][searchField] formRef.setValues(setV) }) diff --git a/src/views/wms/basicDataManage/subject/subjectAccount/subjectAccount.data.ts b/src/views/wms/basicDataManage/subject/subjectAccount/subjectAccount.data.ts index c53804311..1b990aeeb 100644 --- a/src/views/wms/basicDataManage/subject/subjectAccount/subjectAccount.data.ts +++ b/src/views/wms/basicDataManage/subject/subjectAccount/subjectAccount.data.ts @@ -1,5 +1,9 @@ import type { CrudSchema } from '@/hooks/web/useCrudSchemas' import { dateFormatter } from '@/utils/formatTime' +import * as QadCostcentreApi from '@/api/wms/qadCostcentre' +import { QadCostcentre } from '../qadCostcentre/qadCostcentre.data' +import * as QadProjectApi from '@/api/wms/qadProject' +import { QadProject } from '../qadProject/qadProject.data' // 表单校验 export const SubjectAccountRules = reactive({ @@ -35,13 +39,12 @@ export const SubjectAccount = useCrudSchemas(reactive([ isSearch: true, }, { - label: '成本中心ID111', + label: '成本中心ID', field: 'costecentreId', sort: 'custom', isSearch: false, isTable:false, - disabled:true, - from:{ + form:{ componentProps:{ disabled:true } @@ -52,12 +55,33 @@ export const SubjectAccount = useCrudSchemas(reactive([ field: 'costecentreCode', sort: 'custom', isSearch: false, + form: { + // labelMessage: '信息提示说明!!!', + componentProps: { + isSearchList: true, // 开启查询弹窗 + searchListPlaceholder: '请选择物料代码', // 输入框占位文本 + searchField: 'costcentreCode', // 查询弹窗赋值字段 + searchTitle: '物料基础信息', // 查询弹窗标题 + searchAllSchemas: QadCostcentre.allSchemas, // 查询弹窗所需类 + searchPage: QadCostcentreApi.getQadCostcentrePage, // 查询弹窗所需分页方法 + searchCondition: [{ + key: 'available', + value: 'TRUE', + isMainValue: false + }] + } + } }, { label: '成本中心类型', field: 'costecentreType', sort: 'custom', isSearch: false, + form:{ + componentProps:{ + disabled:true + } + } }, { label: '项目ID', @@ -66,7 +90,7 @@ export const SubjectAccount = useCrudSchemas(reactive([ isSearch: false, isTable:false, disabled:true, - from:{ + form:{ componentProps:{ disabled:true } @@ -77,17 +101,41 @@ export const SubjectAccount = useCrudSchemas(reactive([ field: 'projectCode', sort: 'custom', isSearch: false, - }, - { - label: '科目', - field: 'address', - sort: 'custom', - isSearch: false, + form: { + // labelMessage: '信息提示说明!!!', + componentProps: { + isSearchList: true, // 开启查询弹窗 + searchListPlaceholder: '请选择物料代码', // 输入框占位文本 + searchField: 'projectCode', // 查询弹窗赋值字段 + searchTitle: '物料基础信息', // 查询弹窗标题 + searchAllSchemas: QadProject.allSchemas, // 查询弹窗所需类 + searchPage: QadProjectApi.getQadProjectPage, // 查询弹窗所需分页方法 + searchCondition: [{ + key: 'available', + value: 'TRUE', + isMainValue: false + }] + } + } }, { label: '是否可用', field: 'available', sort: 'custom', + dictType: DICT_TYPE.TRUE_FALSE, + dictClass: 'string', + isTable: true, + table: { + width: 120 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + }, }, { label: '备注', From 11961b1862f9f33abb5583d392c17e2727bf3579 Mon Sep 17 00:00:00 2001 From: zhaoyiran Date: Fri, 24 May 2024 10:31:39 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E6=A3=80=E9=AA=8C=E6=96=B9=E6=A1=88?= =?UTF-8?q?=E5=AF=BC=E5=85=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/qms/inspectionScheme/index.ts | 5 +++++ src/views/qms/inspectionScheme/index.vue | 22 +++++++++++++++++++++- 2 files changed, 26 insertions(+), 1 deletion(-) diff --git a/src/api/qms/inspectionScheme/index.ts b/src/api/qms/inspectionScheme/index.ts index 358acd359..3c5f30e93 100644 --- a/src/api/qms/inspectionScheme/index.ts +++ b/src/api/qms/inspectionScheme/index.ts @@ -30,3 +30,8 @@ export const enableInspectionScheme = async (id: number) => { export const disableInspectionScheme = async (id: number) => { return await request.disable({ url: `/qms/inspection-scheme/disable?id=` + id }) } + +// 下载用户导入模板 +export const importTemplate = () => { + return request.download({ url: '/qms/inspection-scheme/get-import-template' }) +} diff --git a/src/views/qms/inspectionScheme/index.vue b/src/views/qms/inspectionScheme/index.vue index b746fd17b..e2cfe3f75 100644 --- a/src/views/qms/inspectionScheme/index.vue +++ b/src/views/qms/inspectionScheme/index.vue @@ -49,6 +49,8 @@ @submitForm="submitForm" /> + + From 46c74afd8f5fec6f88299620e9f7b014c62acf88 Mon Sep 17 00:00:00 2001 From: zhaoxuebing <1291173720@qq.com> Date: Fri, 24 May 2024 10:57:30 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E8=B4=A6=E6=88=B7=E7=A7=91=E7=9B=AE?= =?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/subjectAccount/index.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/api/wms/subjectAccount/index.ts b/src/api/wms/subjectAccount/index.ts index 9674cd532..351203c3c 100644 --- a/src/api/wms/subjectAccount/index.ts +++ b/src/api/wms/subjectAccount/index.ts @@ -52,7 +52,12 @@ export const deleteSubjectAccount = async (id: number) => { // 导出科目账户配置 Excel export const exportSubjectAccount = async (params) => { - return await request.download({ url: `/wms/subject-account/export-excel`, params }) + if (params.isSearch) { + const data = {...params} + return await request.downloadPost({ url: `/wms/subject-account/export-excel-senior`, data }) + }else{ + return await request.download({ url: `/wms/subject-account/export-excel`, params }) + } } // 下载用户导入模板