From 0edbecba34df8a8670e3d747d3da613a7b493652 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E4=B8=96=E5=BC=BA?= Date: Wed, 27 Sep 2023 17:54:48 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=9A=E5=8A=A1=E7=BA=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/api/xxjj/businessWarehouse/index.ts | 9 +- yudao-ui-admin-vben-master/src/utils/dict.ts | 4 +- .../BusinessOrganizationModal.vue | 57 ++++ .../businessOrganization.data.ts | 258 ++++++++++++++++++ .../views/xxjj/businessOrganization/index.vue | 92 +++++++ .../BusinessTree.vue | 42 +++ .../BusinessWarehouseModal.vue | 57 ++++ .../businessWarehouse.data.ts | 250 +++++++++++++++++ .../xxjj/businessOrganizationConfig/index.vue | 102 +++++++ .../BusinessWarehouseModal.vue | 2 +- .../businessWarehouse.data.ts | 96 ++----- .../views/xxjj/businessWarehouse/index.vue | 8 +- .../system/enums/business/BusinessEnum.java | 18 ++ .../BusinessWarehouseController.java | 19 ++ .../vo/BusinessSimpleRespVo.java | 21 ++ .../vo/BusinessWarehouseRespVO.java | 3 + .../BusinessWarehouseConvert.java | 4 + .../BusinessWarehouseMapper.java | 8 + .../BusinessWarehouseService.java | 5 + .../BusinessWarehouseServiceImpl.java | 5 + 20 files changed, 972 insertions(+), 88 deletions(-) create mode 100644 yudao-ui-admin-vben-master/src/views/xxjj/businessOrganization/BusinessOrganizationModal.vue create mode 100644 yudao-ui-admin-vben-master/src/views/xxjj/businessOrganization/businessOrganization.data.ts create mode 100644 yudao-ui-admin-vben-master/src/views/xxjj/businessOrganization/index.vue create mode 100644 yudao-ui-admin-vben-master/src/views/xxjj/businessOrganizationConfig/BusinessTree.vue create mode 100644 yudao-ui-admin-vben-master/src/views/xxjj/businessOrganizationConfig/BusinessWarehouseModal.vue create mode 100644 yudao-ui-admin-vben-master/src/views/xxjj/businessOrganizationConfig/businessWarehouse.data.ts create mode 100644 yudao-ui-admin-vben-master/src/views/xxjj/businessOrganizationConfig/index.vue create mode 100644 yunxi-module-system/yunxi-module-system-api/src/main/java/com/yunxi/scm/module/system/enums/business/BusinessEnum.java create mode 100644 yunxi-module-system/yunxi-module-system-biz/src/main/java/com/yunxi/scm/module/system/controller/admin/businesswarehouse/vo/BusinessSimpleRespVo.java diff --git a/yudao-ui-admin-vben-master/src/api/xxjj/businessWarehouse/index.ts b/yudao-ui-admin-vben-master/src/api/xxjj/businessWarehouse/index.ts index f77ab45..d254b0a 100644 --- a/yudao-ui-admin-vben-master/src/api/xxjj/businessWarehouse/index.ts +++ b/yudao-ui-admin-vben-master/src/api/xxjj/businessWarehouse/index.ts @@ -25,7 +25,12 @@ export function deleteBusinessWarehouse(id: number) { return defHttp.delete({ url: '/system/business-warehouse/delete?id=' + id }) } -// 导出业务线/仓库 Excel +// 导出业务线 Excel export function exportBusinessWarehouse(params) { - return defHttp.download({ url: '/xxjj/business-warehouse/export-excel', params }, '业务线/仓库.xls') + return defHttp.download({ url: '/system/business-warehouse/export-excel', params }, '业务线.xls') } + +// 查询业务线(精简)列表 +export function listSimpleBusiness() { + return defHttp.get({ url: '/system/business-warehouse/list-all-simple' }) + } diff --git a/yudao-ui-admin-vben-master/src/utils/dict.ts b/yudao-ui-admin-vben-master/src/utils/dict.ts index 79aaa0f..8a150a0 100644 --- a/yudao-ui-admin-vben-master/src/utils/dict.ts +++ b/yudao-ui-admin-vben-master/src/utils/dict.ts @@ -156,9 +156,11 @@ export enum DICT_TYPE { // ============= BUSINESSLINE 模块================= BUSINESS_TYPE = 'business_type', //业务线类型 DIFF_FLAG = 'diff_flag', + CLASS_STATUS = 'class_status', //类别状态 + DUTY_TYPE = 'duty_type', //业务线的所属分类 + BUSINESS_ORGANIZATION_TYPE = 'business_organization_type', //业务组织类型 // ============= ENTERPRISEBRANCHING 模块================= ENTERPRISE_TYPE = 'enterprise_type', //业务线类型 - CLASS_STATUS = 'class_status', } diff --git a/yudao-ui-admin-vben-master/src/views/xxjj/businessOrganization/BusinessOrganizationModal.vue b/yudao-ui-admin-vben-master/src/views/xxjj/businessOrganization/BusinessOrganizationModal.vue new file mode 100644 index 0000000..1f4d021 --- /dev/null +++ b/yudao-ui-admin-vben-master/src/views/xxjj/businessOrganization/BusinessOrganizationModal.vue @@ -0,0 +1,57 @@ + + diff --git a/yudao-ui-admin-vben-master/src/views/xxjj/businessOrganization/businessOrganization.data.ts b/yudao-ui-admin-vben-master/src/views/xxjj/businessOrganization/businessOrganization.data.ts new file mode 100644 index 0000000..75d6aab --- /dev/null +++ b/yudao-ui-admin-vben-master/src/views/xxjj/businessOrganization/businessOrganization.data.ts @@ -0,0 +1,258 @@ +import { BasicColumn, FormSchema, useRender } from '@/components/Table' +import { DICT_TYPE, getDictOptions } from '@/utils/dict' +import { listSimpleBusiness } from '@/api/xxjj/businessWarehouse' + +export const columns: BasicColumn[] = [ + { + title: '业务线名称', + dataIndex: 'name', + width: 160 + }, + { + title: '类型', + dataIndex: 'type', + width: 180, + customRender: ({ text }) => { + return useRender.renderDict(text, DICT_TYPE.BUSINESS_ORGANIZATION_TYPE) + } + }, + { + title: '状态', + dataIndex: 'type', + width: 180, + customRender: ({ text }) => { + return useRender.renderDict(text, DICT_TYPE.CLASS_STATUS) + } + }, + { + title: '成员数量', + dataIndex: 'employeeNum', + width: 160 + }, + { + title: '主管人员', + dataIndex: 'belongUserId', + width: 160 + }, + { + title: '描述', + dataIndex: 'description', + width: 160 + }, + { + title: '更新时间', + dataIndex: 'updateTime', + width: 180, + customRender: ({ text }) => { + return useRender.renderDate(text) + } + }, +] + +export const searchFormSchema: FormSchema[] = [ + { + label: '业务线名称', + field: 'name', + component: 'Input', + colProps: { span: 8 } + }, + // { + // label: '类型', + // field: 'type', + // component: 'Select', + // componentProps: { + // options: getDictOptions(DICT_TYPE.BUSINESS_ORGANIZATION_TYPE) + // }, + // colProps: { span: 8 } + // }, + // { + // label: '所属行业', + // field: 'industry', + // component: 'Select', + // componentProps: { + // options: getDictOptions(DICT_TYPE.DUTY_TYPE) + // }, + // colProps: { span: 8 } + // }, + // { + // label: '成立时间', + // field: 'establishDate', + // component: 'RangePicker', + // colProps: { span: 8 } + // }, + // { + // label: '归属人员', + // field: 'belongUserId', + // component: 'Input', + // colProps: { span: 8 } + // }, + // { + // label: '品牌/业务线/事业群名称', + // field: 'brandName', + // component: 'Input', + // colProps: { span: 8 } + // }, + // { + // label: '业务线仓库区分(0:业务线,1:仓库)', + // field: 'diffFlag', + // component: 'Select', + // componentProps: { + // options: getDictOptions(DICT_TYPE.DIFF_FLAG) + // }, + // colProps: { span: 8 } + // }, +] + +export const createFormSchema: FormSchema[] = [ + { + label: '编号', + field: 'id', + show: false, + component: 'Input' + }, + { + label: '业务组织编号', + field: 'businessCode', + required: true, + component: 'Input' + }, + { + label: '业务组织名称', + field: 'name', + required: true, + component: 'Input' + }, + { + label: '业务组织简称', + field: 'businessSimple', + component: 'Input' + }, + { + label: '业务组织简称', + field: 'businessSimple', + component: 'Input' + }, + { + label: '隶属业务线', + field: 'parentId', + required: true, + component: 'ApiTreeSelect', + componentProps: { + api: () => listSimpleBusiness(), + fieldNames: { + label: 'name', + key: 'id', + value: 'id', + }, + handleTree: 'id', + }, + }, + { + label: '类型', + field: 'type', + component: 'Select', + componentProps: { + options: getDictOptions(DICT_TYPE.BUSINESS_ORGANIZATION_TYPE, 'number') + } + }, + { + label: '所在城市', + field: 'city', + component: 'Input' + }, + { + label: '成立时间', + field: 'establishDate', + component: 'DatePicker' + }, + { + label: '归属人员', + field: 'belongUserId', + component: 'Input' + }, + { + label: '介绍', + field: 'description', + component: 'InputTextArea' + }, + { + label: '区分标志', + field: 'diffFlag', + required: true, + component: 'Select', + componentProps: { + options: getDictOptions(DICT_TYPE.DIFF_FLAG, 'number') + } + }, +] + +export const updateFormSchema: FormSchema[] = [ + { + label: '编号', + field: 'id', + show: false, + component: 'Input' + }, + { + label: '业务线编号', + field: 'businessCode', + required: true, + component: 'Input' + }, + { + label: '业务线名称', + field: 'name', + required: true, + component: 'Input' + }, + { + label: '业务线简称', + field: 'businessSimple', + component: 'Input' + }, + { + label: '类型', + field: 'type', + component: 'Select', + componentProps: { + options: getDictOptions(DICT_TYPE.BUSINESS_ORGANIZATION_TYPE, 'number') + } + }, + { + label: '所属行业', + field: 'industry', + component: 'Select', + componentProps: { + options: getDictOptions(DICT_TYPE.DUTY_TYPE, 'number') + } + }, + { + label: '所在城市', + field: 'city', + component: 'Input' + }, + { + label: '成立时间', + field: 'establishDate', + component: 'DatePicker' + }, + { + label: '介绍', + field: 'description', + component: 'InputTextArea' + }, + { + label: '归属人员', + field: 'belongUserId', + component: 'Input' + }, + { + label: '区分标志', + field: 'diffFlag', + required: true, + component: 'Select', + componentProps: { + options: getDictOptions(DICT_TYPE.DIFF_FLAG, 'number') + } + }, +] \ No newline at end of file diff --git a/yudao-ui-admin-vben-master/src/views/xxjj/businessOrganization/index.vue b/yudao-ui-admin-vben-master/src/views/xxjj/businessOrganization/index.vue new file mode 100644 index 0000000..6f072bd --- /dev/null +++ b/yudao-ui-admin-vben-master/src/views/xxjj/businessOrganization/index.vue @@ -0,0 +1,92 @@ + + diff --git a/yudao-ui-admin-vben-master/src/views/xxjj/businessOrganizationConfig/BusinessTree.vue b/yudao-ui-admin-vben-master/src/views/xxjj/businessOrganizationConfig/BusinessTree.vue new file mode 100644 index 0000000..200b9f1 --- /dev/null +++ b/yudao-ui-admin-vben-master/src/views/xxjj/businessOrganizationConfig/BusinessTree.vue @@ -0,0 +1,42 @@ + + + diff --git a/yudao-ui-admin-vben-master/src/views/xxjj/businessOrganizationConfig/BusinessWarehouseModal.vue b/yudao-ui-admin-vben-master/src/views/xxjj/businessOrganizationConfig/BusinessWarehouseModal.vue new file mode 100644 index 0000000..d75087f --- /dev/null +++ b/yudao-ui-admin-vben-master/src/views/xxjj/businessOrganizationConfig/BusinessWarehouseModal.vue @@ -0,0 +1,57 @@ + + diff --git a/yudao-ui-admin-vben-master/src/views/xxjj/businessOrganizationConfig/businessWarehouse.data.ts b/yudao-ui-admin-vben-master/src/views/xxjj/businessOrganizationConfig/businessWarehouse.data.ts new file mode 100644 index 0000000..0542cdd --- /dev/null +++ b/yudao-ui-admin-vben-master/src/views/xxjj/businessOrganizationConfig/businessWarehouse.data.ts @@ -0,0 +1,250 @@ +import { BasicColumn, FormSchema, useRender } from '@/components/Table' +import { DICT_TYPE, getDictOptions } from '@/utils/dict' + +export const columns: BasicColumn[] = [ + { + title: '业务线名称', + dataIndex: 'name', + width: 160 + }, + { + title: '类型', + dataIndex: 'type', + width: 180, + customRender: ({ text }) => { + return useRender.renderDict(text, DICT_TYPE.BUSINESS_TYPE) + } + }, + { + title: '状态', + dataIndex: 'type', + width: 180, + customRender: ({ text }) => { + return useRender.renderDict(text, DICT_TYPE.CLASS_STATUS) + } + }, + { + title: '关联机构', + dataIndex: 'institutionNum', + width: 160 + }, + { + title: '成员数量', + dataIndex: 'employeeNum', + width: 160 + }, + { + title: '主管人员', + dataIndex: 'belongUserId', + width: 160 + }, + { + title: '介绍', + dataIndex: 'description', + width: 160 + }, + { + title: '更新时间', + dataIndex: 'updateTime', + width: 180, + customRender: ({ text }) => { + return useRender.renderDate(text) + } + }, +] + +export const searchFormSchema: FormSchema[] = [ + { + label: '业务线名称', + field: 'name', + component: 'Input', + colProps: { span: 8 } + }, + // { + // label: '类型', + // field: 'type', + // component: 'Select', + // componentProps: { + // options: getDictOptions(DICT_TYPE.BUSINESS_TYPE) + // }, + // colProps: { span: 8 } + // }, + // { + // label: '所属行业', + // field: 'industry', + // component: 'Select', + // componentProps: { + // options: getDictOptions(DICT_TYPE.DUTY_TYPE) + // }, + // colProps: { span: 8 } + // }, + // { + // label: '成立时间', + // field: 'establishDate', + // component: 'RangePicker', + // colProps: { span: 8 } + // }, + // { + // label: '归属人员', + // field: 'belongUserId', + // component: 'Input', + // colProps: { span: 8 } + // }, + // { + // label: '品牌/业务线/事业群名称', + // field: 'brandName', + // component: 'Input', + // colProps: { span: 8 } + // }, + // { + // label: '业务线仓库区分(0:业务线,1:仓库)', + // field: 'diffFlag', + // component: 'Select', + // componentProps: { + // options: getDictOptions(DICT_TYPE.DIFF_FLAG) + // }, + // colProps: { span: 8 } + // }, +] + +export const createFormSchema: FormSchema[] = [ + { + label: '编号', + field: 'id', + show: false, + component: 'Input' + }, + { + label: '业务线编号', + field: 'businessCode', + required: true, + component: 'Input' + }, + { + label: '业务线名称', + field: 'name', + required: true, + component: 'Input' + }, + { + label: '业务线简称', + field: 'businessSimple', + component: 'Input' + }, + { + label: '类型', + field: 'type', + component: 'Select', + componentProps: { + options: getDictOptions(DICT_TYPE.BUSINESS_TYPE, 'number') + } + }, + { + label: '所属行业', + field: 'industry', + component: 'Select', + componentProps: { + options: getDictOptions(DICT_TYPE.DUTY_TYPE, 'number') + } + }, + { + label: '所在城市', + field: 'city', + component: 'Input' + }, + { + label: '成立时间', + field: 'establishDate', + component: 'DatePicker' + }, + { + label: '介绍', + field: 'description', + component: 'InputTextArea' + }, + { + label: '归属人员', + field: 'belongUserId', + component: 'Input' + }, + { + label: '区分标志', + field: 'diffFlag', + required: true, + component: 'Select', + componentProps: { + options: getDictOptions(DICT_TYPE.DIFF_FLAG, 'number') + } + }, +] + +export const updateFormSchema: FormSchema[] = [ + { + label: '编号', + field: 'id', + show: false, + component: 'Input' + }, + { + label: '业务线编号', + field: 'businessCode', + required: true, + component: 'Input' + }, + { + label: '业务线名称', + field: 'name', + required: true, + component: 'Input' + }, + { + label: '业务线简称', + field: 'businessSimple', + component: 'Input' + }, + { + label: '类型', + field: 'type', + component: 'Select', + componentProps: { + options: getDictOptions(DICT_TYPE.BUSINESS_TYPE, 'number') + } + }, + { + label: '所属行业', + field: 'industry', + component: 'Select', + componentProps: { + options: getDictOptions(DICT_TYPE.DUTY_TYPE, 'number') + } + }, + { + label: '所在城市', + field: 'city', + component: 'Input' + }, + { + label: '成立时间', + field: 'establishDate', + component: 'DatePicker' + }, + { + label: '介绍', + field: 'description', + component: 'InputTextArea' + }, + { + label: '归属人员', + field: 'belongUserId', + component: 'Input' + }, + { + label: '区分标志', + field: 'diffFlag', + required: true, + component: 'Select', + componentProps: { + options: getDictOptions(DICT_TYPE.DIFF_FLAG, 'number') + } + }, +] \ No newline at end of file diff --git a/yudao-ui-admin-vben-master/src/views/xxjj/businessOrganizationConfig/index.vue b/yudao-ui-admin-vben-master/src/views/xxjj/businessOrganizationConfig/index.vue new file mode 100644 index 0000000..7467aa8 --- /dev/null +++ b/yudao-ui-admin-vben-master/src/views/xxjj/businessOrganizationConfig/index.vue @@ -0,0 +1,102 @@ + + diff --git a/yudao-ui-admin-vben-master/src/views/xxjj/businessWarehouse/BusinessWarehouseModal.vue b/yudao-ui-admin-vben-master/src/views/xxjj/businessWarehouse/BusinessWarehouseModal.vue index d75087f..af624f5 100644 --- a/yudao-ui-admin-vben-master/src/views/xxjj/businessWarehouse/BusinessWarehouseModal.vue +++ b/yudao-ui-admin-vben-master/src/views/xxjj/businessWarehouse/BusinessWarehouseModal.vue @@ -21,7 +21,7 @@ const isUpdate = ref(true) const [registerForm, { setFieldsValue, resetFields, resetSchema, validate }] = useForm({ labelWidth: 120, - baseColProps: { span: 24 }, + baseColProps: { span: 12 }, schemas: createFormSchema, showActionButtonGroup: false, actionColOptions: { span: 23 } diff --git a/yudao-ui-admin-vben-master/src/views/xxjj/businessWarehouse/businessWarehouse.data.ts b/yudao-ui-admin-vben-master/src/views/xxjj/businessWarehouse/businessWarehouse.data.ts index 1e2ea6d..0542cdd 100644 --- a/yudao-ui-admin-vben-master/src/views/xxjj/businessWarehouse/businessWarehouse.data.ts +++ b/yudao-ui-admin-vben-master/src/views/xxjj/businessWarehouse/businessWarehouse.data.ts @@ -120,26 +120,6 @@ export const createFormSchema: FormSchema[] = [ required: true, component: 'Input' }, - { - label: '业务线简称', - field: 'businessSimple', - component: 'Input' - }, - { - label: '传真', - field: 'fax', - component: 'Input' - }, - { - label: '网址', - field: 'url', - component: 'Input' - }, - { - label: '介绍', - field: 'description', - component: 'InputTextArea' - }, { label: '业务线名称', field: 'name', @@ -147,17 +127,8 @@ export const createFormSchema: FormSchema[] = [ component: 'Input' }, { - label: '业务线LOGO', - field: 'businessLogo', - component: 'FileUpload', - componentProps: { - fileType: 'file', - maxCount: 1 - } - }, - { - label: '父id', - field: 'parentId', + label: '业务线简称', + field: 'businessSimple', component: 'Input' }, { @@ -187,22 +158,17 @@ export const createFormSchema: FormSchema[] = [ component: 'DatePicker' }, { - label: '归属人员', - field: 'belongUserId', - component: 'Input' - }, - { - label: '品牌/业务线/事业群名称', - field: 'brandName', - component: 'Input' + label: '介绍', + field: 'description', + component: 'InputTextArea' }, { - label: '电话', - field: 'phone', + label: '归属人员', + field: 'belongUserId', component: 'Input' }, { - label: '业务线仓库区分(0:业务线,1:仓库)', + label: '区分标志', field: 'diffFlag', required: true, component: 'Select', @@ -225,11 +191,6 @@ export const updateFormSchema: FormSchema[] = [ required: true, component: 'Input' }, - { - label: '业务线简称', - field: 'businessSimple', - component: 'Input' - }, { label: '业务线名称', field: 'name', @@ -237,13 +198,8 @@ export const updateFormSchema: FormSchema[] = [ component: 'Input' }, { - label: '业务线LOGO', - field: 'businessLogo', - component: 'Upload' - }, - { - label: '父id', - field: 'parentId', + label: '业务线简称', + field: 'businessSimple', component: 'Input' }, { @@ -272,38 +228,18 @@ export const updateFormSchema: FormSchema[] = [ field: 'establishDate', component: 'DatePicker' }, - { - label: '归属人员', - field: 'belongUserId', - component: 'Input' - }, - { - label: '品牌/业务线/事业群名称', - field: 'brandName', - component: 'Input' - }, - { - label: '电话', - field: 'phone', - component: 'Input' - }, - { - label: '传真', - field: 'fax', - component: 'Input' - }, - { - label: '网址', - field: 'url', - component: 'Input' - }, { label: '介绍', field: 'description', component: 'InputTextArea' }, { - label: '业务线仓库区分(0:业务线,1:仓库)', + label: '归属人员', + field: 'belongUserId', + component: 'Input' + }, + { + label: '区分标志', field: 'diffFlag', required: true, component: 'Select', diff --git a/yudao-ui-admin-vben-master/src/views/xxjj/businessWarehouse/index.vue b/yudao-ui-admin-vben-master/src/views/xxjj/businessWarehouse/index.vue index 6090326..6bf4ca8 100644 --- a/yudao-ui-admin-vben-master/src/views/xxjj/businessWarehouse/index.vue +++ b/yudao-ui-admin-vben-master/src/views/xxjj/businessWarehouse/index.vue @@ -2,10 +2,10 @@
@@ -13,12 +13,12 @@