From ff455ec59cb63857c53dd19d9af5d42911fb82d4 Mon Sep 17 00:00:00 2001 From: yangjun <1173114630@qq.com> Date: Wed, 12 Mar 2025 16:01:03 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8E=BB=E6=8E=89=E9=A6=96=E9=A1=B5=E6=97=A0?= =?UTF-8?q?=E7=94=A8=E7=9A=84=E6=8C=89=E9=92=AE=20=E5=88=9D=E5=A7=8B?= =?UTF-8?q?=E5=8C=96=E4=BE=9B=E5=BA=94=E5=95=86=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/layouts/default/header/index.vue | 4 +- .../ConfigSuppliersInfo.api.ts | 64 ++++++ .../ConfigSuppliersInfo.data.ts | 192 ++++++++++++++++++ .../ConfigSuppliersInfoList.vue | 189 +++++++++++++++++ .../components/ConfigSuppliersInfoForm.vue | 70 +++++++ .../components/ConfigSuppliersInfoModal.vue | 76 +++++++ .../depart/components/DepartLeftTree.vue | 2 - src/views/system/loginmini/MiniLogin.vue | 62 ------ src/views/system/user/index.vue | 8 +- src/views/system/user/user.data.ts | 38 +--- 10 files changed, 605 insertions(+), 100 deletions(-) create mode 100644 src/views/config/configSuppliersInfo/ConfigSuppliersInfo.api.ts create mode 100644 src/views/config/configSuppliersInfo/ConfigSuppliersInfo.data.ts create mode 100644 src/views/config/configSuppliersInfo/ConfigSuppliersInfoList.vue create mode 100644 src/views/config/configSuppliersInfo/components/ConfigSuppliersInfoForm.vue create mode 100644 src/views/config/configSuppliersInfo/components/ConfigSuppliersInfoModal.vue diff --git a/src/layouts/default/header/index.vue b/src/layouts/default/header/index.vue index 4fb2023..c55e434 100644 --- a/src/layouts/default/header/index.vue +++ b/src/layouts/default/header/index.vue @@ -23,7 +23,7 @@
- + @@ -33,7 +33,7 @@ - + diff --git a/src/views/config/configSuppliersInfo/ConfigSuppliersInfo.api.ts b/src/views/config/configSuppliersInfo/ConfigSuppliersInfo.api.ts new file mode 100644 index 0000000..ef9beab --- /dev/null +++ b/src/views/config/configSuppliersInfo/ConfigSuppliersInfo.api.ts @@ -0,0 +1,64 @@ +import {defHttp} from '/@/utils/http/axios'; +import { useMessage } from "/@/hooks/web/useMessage"; + +const { createConfirm } = useMessage(); + +enum Api { + list = '/configSuppliersInfo/configSuppliersInfo/list', + save='/configSuppliersInfo/configSuppliersInfo/add', + edit='/configSuppliersInfo/configSuppliersInfo/edit', + deleteOne = '/configSuppliersInfo/configSuppliersInfo/delete', + deleteBatch = '/configSuppliersInfo/configSuppliersInfo/deleteBatch', + importExcel = '/configSuppliersInfo/configSuppliersInfo/importExcel', + exportXls = '/configSuppliersInfo/configSuppliersInfo/exportXls', +} +/** + * 导出api + * @param params + */ +export const getExportUrl = Api.exportXls; +/** + * 导入api + */ +export const getImportUrl = Api.importExcel; +/** + * 列表接口 + * @param params + */ +export const list = (params) => + defHttp.get({url: Api.list, params}); + +/** + * 删除单个 + */ +export const deleteOne = (params,handleSuccess) => { + return defHttp.delete({url: Api.deleteOne, params}, {joinParamsToUrl: true}).then(() => { + handleSuccess(); + }); +} +/** + * 批量删除 + * @param params + */ +export const batchDelete = (params, handleSuccess) => { + createConfirm({ + iconType: 'warning', + title: '确认删除', + content: '是否删除选中数据', + okText: '确认', + cancelText: '取消', + onOk: () => { + return defHttp.delete({url: Api.deleteBatch, data: params}, {joinParamsToUrl: true}).then(() => { + handleSuccess(); + }); + } + }); +} +/** + * 保存或者更新 + * @param params + */ +export const saveOrUpdate = (params, isUpdate) => { + let url = isUpdate ? Api.edit : Api.save; + return defHttp.post({url: url, params}); +} \ No newline at end of file diff --git a/src/views/config/configSuppliersInfo/ConfigSuppliersInfo.data.ts b/src/views/config/configSuppliersInfo/ConfigSuppliersInfo.data.ts new file mode 100644 index 0000000..4323b65 --- /dev/null +++ b/src/views/config/configSuppliersInfo/ConfigSuppliersInfo.data.ts @@ -0,0 +1,192 @@ +import {BasicColumn} from '/@/components/Table'; +import {FormSchema} from '/@/components/Table'; +import { rules} from '/@/utils/helper/validator'; +import { render } from '/@/utils/common/renderUtils'; +import { getWeekMonthQuarterYear } from '/@/utils'; +//列表数据 +export const columns: BasicColumn[] = [ + { + title: '供应商名称', + align:"center", + dataIndex: 'suppliersName' + }, + { + title: '供应商性质', + align:"center", + dataIndex: 'suppliersNature_dictText' + }, + { + title: '供应商地址', + align:"center", + dataIndex: 'suppliersAddress' + }, + { + title: '负责人', + align:"center", + dataIndex: 'personInCharge' + }, + { + title: '联系电话', + align:"center", + dataIndex: 'contactNumber' + }, + { + title: '供应状态', + align:"center", + dataIndex: 'supplyState_dictText' + }, + { + title: '开户行', + align:"center", + dataIndex: 'openingBank' + }, + { + title: '开户行账号', + align:"center", + dataIndex: 'openingBankNo' + }, + { + title: '微信账号', + align:"center", + dataIndex: 'wechartId' + }, + { + title: '资质照片', + align:"center", + dataIndex: 'imgPath', + customRender:render.renderImage, + }, +]; +//查询数据 +export const searchFormSchema: FormSchema[] = [ + { + label: "供应商名称", + field: 'suppliersName', + component: 'Input', + //colProps: {span: 6}, + }, + { + label: "负责人", + field: 'personInCharge', + component: 'Input', + //colProps: {span: 6}, + }, + { + label: "供应状态", + field: 'supplyState', + component: 'JSelectMultiple', + componentProps:{ + dictCode:"supply_state" + }, + //colProps: {span: 6}, + }, +]; +//表单数据 +export const formSchema: FormSchema[] = [ + { + label: '供应商名称', + field: 'suppliersName', + component: 'Input', + dynamicRules: ({model,schema}) => { + return [ + { required: true, message: '请输入供应商名称!'}, + ]; + }, + }, + { + label: '供应商性质', + field: 'suppliersNature', + component: 'JDictSelectTag', + componentProps:{ + dictCode:"suppliers_nature", + type: "radio" + }, + }, + { + label: '供应商地址', + field: 'suppliersAddress', + component: 'Input', + }, + { + label: '负责人', + field: 'personInCharge', + component: 'Input', + }, + { + label: '联系电话', + field: 'contactNumber', + component: 'Input', + dynamicRules: ({model,schema}) => { + return [ + { required: true, message: '请输入联系电话!'}, + ]; + }, + }, + { + label: '供应状态', + field: 'supplyState', + component: 'JDictSelectTag', + componentProps:{ + dictCode:"supply_state", + type: "radio" + }, + dynamicRules: ({model,schema}) => { + return [ + { required: true, message: '请输入供应状态!'}, + ]; + }, + }, + { + label: '开户行', + field: 'openingBank', + component: 'Input', + }, + { + label: '开户行账号', + field: 'openingBankNo', + component: 'Input', + }, + { + label: '微信账号', + field: 'wechartId', + component: 'Input', + }, + { + label: '资质照片', + field: 'imgPath', + component: 'JImageUpload', + componentProps:{ + fileMax: 0 + }, + }, + // TODO 主键隐藏字段,目前写死为ID + { + label: '', + field: 'id', + component: 'Input', + show: false + }, +]; + +// 高级查询数据 +export const superQuerySchema = { + suppliersName: {title: '供应商名称',order: 0,view: 'text', type: 'string',}, + suppliersNature: {title: '供应商性质',order: 1,view: 'radio', type: 'string',dictCode: 'suppliers_nature',}, + suppliersAddress: {title: '供应商地址',order: 2,view: 'text', type: 'string',}, + personInCharge: {title: '负责人',order: 3,view: 'text', type: 'string',}, + contactNumber: {title: '联系电话',order: 4,view: 'text', type: 'string',}, + supplyState: {title: '供应状态',order: 5,view: 'radio', type: 'string',dictCode: 'supply_state',}, + openingBank: {title: '开户行',order: 6,view: 'text', type: 'string',}, + openingBankNo: {title: '开户行账号',order: 7,view: 'text', type: 'string',}, + wechartId: {title: '微信账号',order: 8,view: 'text', type: 'string',}, + imgPath: {title: '资质照片',order: 9,view: 'image', type: 'string',}, +}; + +/** +* 流程表单调用这个方法获取formSchema +* @param param +*/ +export function getBpmFormSchema(_formData): FormSchema[]{ + // 默认和原始表单保持一致 如果流程中配置了权限数据,这里需要单独处理formSchema + return formSchema; +} \ No newline at end of file diff --git a/src/views/config/configSuppliersInfo/ConfigSuppliersInfoList.vue b/src/views/config/configSuppliersInfo/ConfigSuppliersInfoList.vue new file mode 100644 index 0000000..55fb341 --- /dev/null +++ b/src/views/config/configSuppliersInfo/ConfigSuppliersInfoList.vue @@ -0,0 +1,189 @@ + + + + + \ No newline at end of file diff --git a/src/views/config/configSuppliersInfo/components/ConfigSuppliersInfoForm.vue b/src/views/config/configSuppliersInfo/components/ConfigSuppliersInfoForm.vue new file mode 100644 index 0000000..13537fd --- /dev/null +++ b/src/views/config/configSuppliersInfo/components/ConfigSuppliersInfoForm.vue @@ -0,0 +1,70 @@ + + + \ No newline at end of file diff --git a/src/views/config/configSuppliersInfo/components/ConfigSuppliersInfoModal.vue b/src/views/config/configSuppliersInfo/components/ConfigSuppliersInfoModal.vue new file mode 100644 index 0000000..72f9be3 --- /dev/null +++ b/src/views/config/configSuppliersInfo/components/ConfigSuppliersInfoModal.vue @@ -0,0 +1,76 @@ + + + + + \ No newline at end of file diff --git a/src/views/system/depart/components/DepartLeftTree.vue b/src/views/system/depart/components/DepartLeftTree.vue index 7d3785f..f4cad96 100644 --- a/src/views/system/depart/components/DepartLeftTree.vue +++ b/src/views/system/depart/components/DepartLeftTree.vue @@ -7,8 +7,6 @@ 导入 导出 - 同步企微? - 同步钉钉?