diff --git a/src/api/sales/Customer/index.ts b/src/api/sales/Customer/index.ts new file mode 100644 index 0000000..c56b269 --- /dev/null +++ b/src/api/sales/Customer/index.ts @@ -0,0 +1,121 @@ +import { LngCustomerPageModel, LngCustomerPageParams, LngCustomerPageResult } from './model/CustomerModel'; +import { defHttp } from '/@/utils/http/axios'; +import { ErrorMessageMode } from '/#/axios'; + +enum Api { + Page = '/sales/customer/page', + List = '/sales/customer/list', + Info = '/sales/customer/info', + LngCustomer = '/sales/customer', + + + + Enable = '/sales/customer/enable', + Disable= '/sales/customer/disable', + +} + +/** + * @description: 查询LngCustomer分页列表 + */ +export async function getLngCustomerPage(params: LngCustomerPageParams, mode: ErrorMessageMode = 'modal') { + return defHttp.get( + { + url: Api.Page, + params, + }, + { + errorMessageMode: mode, + }, + ); +} + +/** + * @description: 获取LngCustomer信息 + */ +export async function getLngCustomer(id: String, mode: ErrorMessageMode = 'modal') { + return defHttp.get( + { + url: Api.Info, + params: { id }, + }, + { + errorMessageMode: mode, + }, + ); +} + +/** + * @description: 新增LngCustomer + */ +export async function addLngCustomer(lngCustomer: Recordable, mode: ErrorMessageMode = 'modal') { + return defHttp.post( + { + url: Api.LngCustomer, + params: lngCustomer, + }, + { + errorMessageMode: mode, + }, + ); +} + +/** + * @description: 更新LngCustomer + */ +export async function updateLngCustomer(lngCustomer: Recordable, mode: ErrorMessageMode = 'modal') { + return defHttp.put( + { + url: Api.LngCustomer, + params: lngCustomer, + }, + { + errorMessageMode: mode, + }, + ); +} + +/** + * @description: 删除LngCustomer(批量删除) + */ +export async function deleteLngCustomer(ids: string[], mode: ErrorMessageMode = 'modal') { + return defHttp.delete( + { + url: Api.LngCustomer, + data: ids, + }, + { + errorMessageMode: mode, + }, + ); +} + + +/** + * @description: 启用数据LngCustomer + */ +export async function enableLngCustomer(ids: string[], mode: ErrorMessageMode = 'modal') { + return defHttp.post( + { + url: Api.Enable, + data: ids, + }, + { + errorMessageMode: mode, + }, + ); +} +/** + * @description: 作废数据LngCustomer + */ +export async function disableLngCustomer(ids: string[], mode: ErrorMessageMode = 'modal') { + return defHttp.post( + { + url: Api.Disable, + data: ids, + }, + { + errorMessageMode: mode, + }, + ); +} \ No newline at end of file diff --git a/src/api/sales/Customer/model/CustomerModel.ts b/src/api/sales/Customer/model/CustomerModel.ts new file mode 100644 index 0000000..73ff089 --- /dev/null +++ b/src/api/sales/Customer/model/CustomerModel.ts @@ -0,0 +1,56 @@ +import { BasicPageParams, BasicFetchResult } from '/@/api/model/baseModel'; + +/** + * @description: LngCustomer分页参数 模型 + */ +export interface LngCustomerPageParams extends BasicPageParams { + cuCode: string; + + cuName: string; + + cuSname: string; + + cuMcode: string; + + classCode: string; + + typeCode: string; + + natureCode: string; + + valid: string; + + approCode: string; +} + +/** + * @description: LngCustomer分页返回值模型 + */ +export interface LngCustomerPageModel { + id: string; + + cuCode: string; + + cuName: string; + + cuSname: string; + + cuMcode: string; + + classCode: string; + + typeCode: string; + + natureCode: string; + + valid: string; + + approCode: string; +} + +0; + +/** + * @description: LngCustomer分页返回值结构 + */ +export type LngCustomerPageResult = BasicFetchResult; \ No newline at end of file diff --git a/src/views/sales/Customer/components/CustomerModal.vue b/src/views/sales/Customer/components/CustomerModal.vue new file mode 100644 index 0000000..168dd47 --- /dev/null +++ b/src/views/sales/Customer/components/CustomerModal.vue @@ -0,0 +1,110 @@ + + \ No newline at end of file diff --git a/src/views/sales/Customer/components/Form.vue b/src/views/sales/Customer/components/Form.vue new file mode 100644 index 0000000..0d5bf01 --- /dev/null +++ b/src/views/sales/Customer/components/Form.vue @@ -0,0 +1,224 @@ + + \ No newline at end of file diff --git a/src/views/sales/Customer/components/config.ts b/src/views/sales/Customer/components/config.ts new file mode 100644 index 0000000..93e94aa --- /dev/null +++ b/src/views/sales/Customer/components/config.ts @@ -0,0 +1,520 @@ +import { FormProps, FormSchema } from '/@/components/Form'; +import { BasicColumn } from '/@/components/Table'; + +export const formConfig = { + useCustomConfig: false, +}; + +export const searchFormSchema: FormSchema[] = [ + { + field: 'cuCode', + label: '客户编码', + component: 'Input', + }, + { + field: 'cuName', + label: '客户名称', + component: 'Input', + }, + { + field: 'cuSname', + label: '客户简称', + component: 'Input', + }, + { + field: 'cuMcode', + label: '企业性质', + component: 'Input', + }, + { + field: 'classCode', + label: '客户分类', + component: 'Input', + }, + { + field: 'typeCode', + label: '客户类别', + component: 'Input', + }, + { + field: 'natureCode', + label: '国内国际', + component: 'Input', + }, + { + field: 'valid', + label: '有效', + component: 'Input', + }, + { + field: 'approCode', + label: '审批状态', + component: 'Input', + }, +]; + +export const columns: BasicColumn[] = [ + { + dataIndex: 'cuCode', + title: '客户编码', + componentType: 'input', + align: 'left', + + sorter: true, + }, + + { + dataIndex: 'cuName', + title: '客户名称', + componentType: 'input', + align: 'left', + + sorter: true, + }, + + { + dataIndex: 'cuSname', + title: '客户简称', + componentType: 'input', + align: 'left', + + sorter: true, + }, + + { + dataIndex: 'cuMcode', + title: '企业性质', + componentType: 'input', + align: 'left', + + sorter: true, + }, + + { + dataIndex: 'classCode', + title: '客户分类', + componentType: 'input', + align: 'left', + + sorter: true, + }, + + { + dataIndex: 'typeCode', + title: '客户类别', + componentType: 'input', + align: 'left', + + sorter: true, + }, + + { + dataIndex: 'natureCode', + title: '国内国际', + componentType: 'input', + align: 'left', + + sorter: true, + }, + + { + dataIndex: 'valid', + title: '有效', + componentType: 'input', + align: 'left', + + sorter: true, + }, + + { + dataIndex: 'approCode', + title: '审批状态', + componentType: 'input', + align: 'left', + + sorter: true, + }, +]; +//表单事件 +export const formEventConfigs = { + 0: [ + { + type: 'circle', + color: '#2774ff', + text: '开始节点', + icon: '#icon-kaishi', + bgcColor: '#D8E5FF', + isUserDefined: false, + }, + { + color: '#F6AB01', + icon: '#icon-chushihua', + text: '初始化表单', + bgcColor: '#f9f5ea', + isUserDefined: false, + nodeInfo: { processEvent: [] }, + }, + ], + 1: [ + { + color: '#B36EDB', + icon: '#icon-shujufenxi', + text: '获取表单数据', + detail: '(新增无此操作)', + bgcColor: '#F8F2FC', + isUserDefined: false, + nodeInfo: { processEvent: [] }, + }, + ], + 2: [ + { + color: '#F8625C', + icon: '#icon-jiazai', + text: '加载表单', + bgcColor: '#FFF1F1', + isUserDefined: false, + nodeInfo: { processEvent: [] }, + }, + ], + 3: [ + { + color: '#6C6AE0', + icon: '#icon-jsontijiao', + text: '提交表单', + bgcColor: '#F5F4FF', + isUserDefined: false, + nodeInfo: { processEvent: [] }, + }, + ], + 4: [ + { + type: 'circle', + color: '#F8625C', + text: '结束节点', + icon: '#icon-jieshuzhiliao', + bgcColor: '#FFD6D6', + isLast: true, + isUserDefined: false, + }, + ], +}; +export const formProps: FormProps = { + labelCol: { span: 3, offset: 0 }, + labelAlign: 'right', + layout: 'horizontal', + size: 'default', + schemas: [ + { + key: 'bd37a8bc47ee4f27a05b973a1fc4bb0e', + field: 'cuCode', + label: '客户编码', + type: 'input', + component: 'Input', + colProps: { span: 24 }, + defaultValue: '', + componentProps: { + width: '100%', + span: '', + defaultValue: '', + labelWidthMode: 'fix', + labelFixWidth: 120, + responsive: false, + respNewRow: false, + placeholder: '请输入客户编码', + maxlength: null, + prefix: '', + suffix: '', + addonBefore: '', + addonAfter: '', + disabled: false, + allowClear: false, + showLabel: true, + required: false, + rules: [], + events: {}, + isSave: false, + isShow: true, + scan: false, + style: { width: '100%' }, + }, + }, + { + key: '586d890102554d0faa997b35ee395e2e', + field: 'cuName', + label: '客户名称', + type: 'input', + component: 'Input', + colProps: { span: 24 }, + defaultValue: '', + componentProps: { + width: '100%', + span: '', + defaultValue: '', + labelWidthMode: 'fix', + labelFixWidth: 120, + responsive: false, + respNewRow: false, + placeholder: '请输入客户名称', + maxlength: null, + prefix: '', + suffix: '', + addonBefore: '', + addonAfter: '', + disabled: false, + allowClear: false, + showLabel: true, + required: false, + rules: [], + events: {}, + isSave: false, + isShow: true, + scan: false, + style: { width: '100%' }, + }, + }, + { + key: 'd2317dbcb9af4d538a23227fa8676f63', + field: 'cuSname', + label: '客户简称', + type: 'input', + component: 'Input', + colProps: { span: 24 }, + defaultValue: '', + componentProps: { + width: '100%', + span: '', + defaultValue: '', + labelWidthMode: 'fix', + labelFixWidth: 120, + responsive: false, + respNewRow: false, + placeholder: '请输入客户简称', + maxlength: null, + prefix: '', + suffix: '', + addonBefore: '', + addonAfter: '', + disabled: false, + allowClear: false, + showLabel: true, + required: false, + rules: [], + events: {}, + isSave: false, + isShow: true, + scan: false, + style: { width: '100%' }, + }, + }, + { + key: '2fecf58a5ef44a24a449eb923af58661', + field: 'cuMcode', + label: '企业性质', + type: 'input', + component: 'Input', + colProps: { span: 24 }, + defaultValue: '', + componentProps: { + width: '100%', + span: '', + defaultValue: '', + labelWidthMode: 'fix', + labelFixWidth: 120, + responsive: false, + respNewRow: false, + placeholder: '请输入企业性质', + maxlength: null, + prefix: '', + suffix: '', + addonBefore: '', + addonAfter: '', + disabled: false, + allowClear: false, + showLabel: true, + required: false, + rules: [], + events: {}, + isSave: false, + isShow: true, + scan: false, + style: { width: '100%' }, + }, + }, + { + key: '3d3488738e5348768ccc8d4ad383efe2', + field: 'classCode', + label: '客户分类', + type: 'input', + component: 'Input', + colProps: { span: 24 }, + defaultValue: '', + componentProps: { + width: '100%', + span: '', + defaultValue: '', + labelWidthMode: 'fix', + labelFixWidth: 120, + responsive: false, + respNewRow: false, + placeholder: '请输入客户分类', + maxlength: null, + prefix: '', + suffix: '', + addonBefore: '', + addonAfter: '', + disabled: false, + allowClear: false, + showLabel: true, + required: false, + rules: [], + events: {}, + isSave: false, + isShow: true, + scan: false, + style: { width: '100%' }, + }, + }, + { + key: '01e7677d954e4436890681d7c1b74de0', + field: 'typeCode', + label: '客户类别', + type: 'input', + component: 'Input', + colProps: { span: 24 }, + defaultValue: '', + componentProps: { + width: '100%', + span: '', + defaultValue: '', + labelWidthMode: 'fix', + labelFixWidth: 120, + responsive: false, + respNewRow: false, + placeholder: '请输入客户类别', + maxlength: null, + prefix: '', + suffix: '', + addonBefore: '', + addonAfter: '', + disabled: false, + allowClear: false, + showLabel: true, + required: false, + rules: [], + events: {}, + isSave: false, + isShow: true, + scan: false, + style: { width: '100%' }, + }, + }, + { + key: '5e5cc97203854b539736d29387c56639', + field: 'natureCode', + label: '国内国际', + type: 'input', + component: 'Input', + colProps: { span: 24 }, + defaultValue: '', + componentProps: { + width: '100%', + span: '', + defaultValue: '', + labelWidthMode: 'fix', + labelFixWidth: 120, + responsive: false, + respNewRow: false, + placeholder: '请输入国内国际', + maxlength: null, + prefix: '', + suffix: '', + addonBefore: '', + addonAfter: '', + disabled: false, + allowClear: false, + showLabel: true, + required: false, + rules: [], + events: {}, + isSave: false, + isShow: true, + scan: false, + style: { width: '100%' }, + }, + }, + { + key: '15e79f8d43ea4e088f13828f2df1e97a', + field: 'valid', + label: '有效', + type: 'input', + component: 'Input', + colProps: { span: 24 }, + defaultValue: '', + componentProps: { + width: '100%', + span: '', + defaultValue: '', + labelWidthMode: 'fix', + labelFixWidth: 120, + responsive: false, + respNewRow: false, + placeholder: '请输入有效', + maxlength: null, + prefix: '', + suffix: '', + addonBefore: '', + addonAfter: '', + disabled: false, + allowClear: false, + showLabel: true, + required: false, + rules: [], + events: {}, + isSave: false, + isShow: true, + scan: false, + style: { width: '100%' }, + }, + }, + { + key: 'e7c5ad93ace741f3a3f3b55e154e7e29', + field: 'approCode', + label: '审批状态', + type: 'input', + component: 'Input', + colProps: { span: 24 }, + defaultValue: '', + componentProps: { + width: '100%', + span: '', + defaultValue: '', + labelWidthMode: 'fix', + labelFixWidth: 120, + responsive: false, + respNewRow: false, + placeholder: '请输入审批状态', + maxlength: null, + prefix: '', + suffix: '', + addonBefore: '', + addonAfter: '', + disabled: false, + allowClear: false, + showLabel: true, + required: false, + rules: [], + events: {}, + isSave: false, + isShow: true, + scan: false, + style: { width: '100%' }, + }, + }, + ], + showActionButtonGroup: false, + buttonLocation: 'center', + actionColOptions: { span: 24 }, + showResetButton: false, + showSubmitButton: false, + hiddenComponent: [], +}; \ No newline at end of file diff --git a/src/views/sales/Customer/components/workflowPermission.ts b/src/views/sales/Customer/components/workflowPermission.ts new file mode 100644 index 0000000..bf9b8fc --- /dev/null +++ b/src/views/sales/Customer/components/workflowPermission.ts @@ -0,0 +1,137 @@ +export const permissionList = [ + { + required: true, + view: true, + edit: true, + disabled: false, + isSaveTable: false, + tableName: '', + fieldName: '客户编码', + fieldId: 'cuCode', + isSubTable: false, + showChildren: true, + type: 'input', + key: 'bd37a8bc47ee4f27a05b973a1fc4bb0e', + children: [], + }, + { + required: true, + view: true, + edit: true, + disabled: false, + isSaveTable: false, + tableName: '', + fieldName: '客户名称', + fieldId: 'cuName', + isSubTable: false, + showChildren: true, + type: 'input', + key: '586d890102554d0faa997b35ee395e2e', + children: [], + }, + { + required: true, + view: true, + edit: true, + disabled: false, + isSaveTable: false, + tableName: '', + fieldName: '客户简称', + fieldId: 'cuSname', + isSubTable: false, + showChildren: true, + type: 'input', + key: 'd2317dbcb9af4d538a23227fa8676f63', + children: [], + }, + { + required: true, + view: true, + edit: true, + disabled: false, + isSaveTable: false, + tableName: '', + fieldName: '企业性质', + fieldId: 'cuMcode', + isSubTable: false, + showChildren: true, + type: 'input', + key: '2fecf58a5ef44a24a449eb923af58661', + children: [], + }, + { + required: true, + view: true, + edit: true, + disabled: false, + isSaveTable: false, + tableName: '', + fieldName: '客户分类', + fieldId: 'classCode', + isSubTable: false, + showChildren: true, + type: 'input', + key: '3d3488738e5348768ccc8d4ad383efe2', + children: [], + }, + { + required: true, + view: true, + edit: true, + disabled: false, + isSaveTable: false, + tableName: '', + fieldName: '客户类别', + fieldId: 'typeCode', + isSubTable: false, + showChildren: true, + type: 'input', + key: '01e7677d954e4436890681d7c1b74de0', + children: [], + }, + { + required: true, + view: true, + edit: true, + disabled: false, + isSaveTable: false, + tableName: '', + fieldName: '国内国际', + fieldId: 'natureCode', + isSubTable: false, + showChildren: true, + type: 'input', + key: '5e5cc97203854b539736d29387c56639', + children: [], + }, + { + required: true, + view: true, + edit: true, + disabled: false, + isSaveTable: false, + tableName: '', + fieldName: '有效', + fieldId: 'valid', + isSubTable: false, + showChildren: true, + type: 'input', + key: '15e79f8d43ea4e088f13828f2df1e97a', + children: [], + }, + { + required: true, + view: true, + edit: true, + disabled: false, + isSaveTable: false, + tableName: '', + fieldName: '审批状态', + fieldId: 'approCode', + isSubTable: false, + showChildren: true, + type: 'input', + key: 'e7c5ad93ace741f3a3f3b55e154e7e29', + children: [], + }, +]; \ No newline at end of file diff --git a/src/views/sales/Customer/index.vue b/src/views/sales/Customer/index.vue new file mode 100644 index 0000000..d56eb80 --- /dev/null +++ b/src/views/sales/Customer/index.vue @@ -0,0 +1,462 @@ + + + \ No newline at end of file