Parcourir la source

Merge branch 'master' of http://139.196.39.194:9021/yuansh/global-web

jingbb il y a 5 mois
Parent
commit
5b8864ccf8
20 fichiers modifiés avec 3482 ajouts et 0 suppressions
  1. 71 0
      src/views/cuspCode/CustomerProfile/CuspCustomerProfile.api.ts
  2. 450 0
      src/views/cuspCode/CustomerProfile/CuspCustomerProfile.data.ts
  3. 192 0
      src/views/cuspCode/CustomerProfile/CuspCustomerProfileList.vue
  4. 118 0
      src/views/cuspCode/CustomerProfile/components/CuspCustomerProfileForm.vue
  5. 113 0
      src/views/cuspCode/CustomerProfile/components/CuspCustomerProfileModal.vue
  6. 64 0
      src/views/cuspCode/Intermediator/CuspIntermediator.api.ts
  7. 217 0
      src/views/cuspCode/Intermediator/CuspIntermediator.data.ts
  8. 190 0
      src/views/cuspCode/Intermediator/CuspIntermediatorList.vue
  9. 70 0
      src/views/cuspCode/Intermediator/components/CuspIntermediatorForm.vue
  10. 75 0
      src/views/cuspCode/Intermediator/components/CuspIntermediatorModal.vue
  11. 71 0
      src/views/cuspCode/SupplierEvaluation/CuspSupplierEvaluation.api.ts
  12. 293 0
      src/views/cuspCode/SupplierEvaluation/CuspSupplierEvaluation.data.ts
  13. 193 0
      src/views/cuspCode/SupplierEvaluation/CuspSupplierEvaluationList.vue
  14. 118 0
      src/views/cuspCode/SupplierEvaluation/components/CuspSupplierEvaluationForm.vue
  15. 113 0
      src/views/cuspCode/SupplierEvaluation/components/CuspSupplierEvaluationModal.vue
  16. 77 0
      src/views/cuspCode/SupplierProfile/CuspSupplierProfile.api.ts
  17. 581 0
      src/views/cuspCode/SupplierProfile/CuspSupplierProfile.data.ts
  18. 192 0
      src/views/cuspCode/SupplierProfile/CuspSupplierProfileList.vue
  19. 147 0
      src/views/cuspCode/SupplierProfile/components/CuspSupplierProfileForm.vue
  20. 137 0
      src/views/cuspCode/SupplierProfile/components/CuspSupplierProfileModal.vue

+ 71 - 0
src/views/cuspCode/CustomerProfile/CuspCustomerProfile.api.ts

@@ -0,0 +1,71 @@
+import {defHttp} from '/@/utils/http/axios';
+import { useMessage } from "/@/hooks/web/useMessage";
+
+const { createConfirm } = useMessage();
+
+enum Api {
+  list = '/cuspCode/cuspCustomerProfile/list',
+  save='/cuspCode/cuspCustomerProfile/add',
+  edit='/cuspCode/cuspCustomerProfile/edit',
+  deleteOne = '/cuspCode/cuspCustomerProfile/delete',
+  deleteBatch = '/cuspCode/cuspCustomerProfile/deleteBatch',
+  importExcel = '/cuspCode/cuspCustomerProfile/importExcel',
+  exportXls = '/cuspCode/cuspCustomerProfile/exportXls',
+  cuspCustomerProfileManList = '/cuspCode/cuspCustomerProfile/queryCuspCustomerProfileManByMainId',
+}
+/**
+ * 导出api
+ * @param params
+ */
+export const getExportUrl = Api.exportXls;
+
+/**
+ * 导入api
+ */
+export const getImportUrl = Api.importExcel;
+/**
+ * 查询子表数据
+ * @param params
+ */
+export const cuspCustomerProfileManList = Api.cuspCustomerProfileManList;
+/**
+ * 列表接口
+ * @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});
+}

+ 450 - 0
src/views/cuspCode/CustomerProfile/CuspCustomerProfile.data.ts

@@ -0,0 +1,450 @@
+import {BasicColumn} from '/@/components/Table';
+import {FormSchema} from '/@/components/Table';
+import { rules} from '/@/utils/helper/validator';
+import { render } from '/@/utils/common/renderUtils';
+import {JVxeTypes,JVxeColumn} from '/@/components/jeecg/JVxeTable/types'
+import { getWeekMonthQuarterYear } from '/@/utils';
+//列表数据
+export const columns: BasicColumn[] = [
+   {
+    title: '状态(1-启用,0-停用)',
+    align:"center",
+    dataIndex: 'status'
+   },
+   {
+    title: '编码',
+    align:"center",
+    dataIndex: 'code'
+   },
+   {
+    title: '名称',
+    align:"center",
+    dataIndex: 'name'
+   },
+   {
+    title: '简称',
+    align:"center",
+    dataIndex: 'abbreviation'
+   },
+   {
+    title: '曾用名',
+    align:"center",
+    dataIndex: 'nameUsedBefore'
+   },
+   {
+    title: '税号',
+    align:"center",
+    dataIndex: 'dutyParagraph'
+   },
+   {
+    title: '法人',
+    align:"center",
+    dataIndex: 'legalPerson'
+   },
+   {
+    title: '联系人',
+    align:"center",
+    dataIndex: 'contacts'
+   },
+   {
+    title: '联系电话',
+    align:"center",
+    dataIndex: 'phone'
+   },
+   {
+    title: '邮箱',
+    align:"center",
+    dataIndex: 'email'
+   },
+   {
+    title: '注册地址',
+    align:"center",
+    dataIndex: 'registerAddress'
+   },
+   {
+    title: '办公地址',
+    align:"center",
+    dataIndex: 'officeAddress'
+   },
+   {
+    title: '发票地址',
+    align:"center",
+    dataIndex: 'invoiceAddress'
+   },
+   {
+    title: '币种',
+    align:"center",
+    dataIndex: 'currency'
+   },
+   {
+    title: '国家',
+    align:"center",
+    dataIndex: 'country'
+   },
+   {
+    title: '付款条件',
+    align:"center",
+    dataIndex: 'paymentTerms_dictText'
+   },
+   {
+    title: '信用额度',
+    align:"center",
+    dataIndex: 'creditLimit'
+   },
+   {
+    title: '折扣',
+    align:"center",
+    dataIndex: 'discount'
+   },
+   {
+    title: '佣金',
+    align:"center",
+    dataIndex: 'commission'
+   },
+   {
+    title: '中间人',
+    align:"center",
+    dataIndex: 'intermediator'
+   },
+   {
+    title: '中间人佣金',
+    align:"center",
+    dataIndex: 'intermediatorCommission'
+   },
+   {
+    title: '优先级',
+    align:"center",
+    dataIndex: 'priority_dictText'
+   },
+   {
+    title: '备注',
+    align:"center",
+    dataIndex: 'notes'
+   },
+   {
+    title: '文件',
+    align:"center",
+    dataIndex: 'files'
+   },
+];
+//查询数据
+export const searchFormSchema: FormSchema[] = [
+	{
+      label: "状态(1-启用,0-停用)",
+      field: "status",
+      component: 'InputNumber',
+      //colProps: {span: 6},
+ 	},
+	{
+      label: "编码",
+      field: "code",
+      component: 'Input',
+      //colProps: {span: 6},
+ 	},
+	{
+      label: "名称",
+      field: "name",
+      component: 'Input',
+      //colProps: {span: 6},
+ 	},
+	{
+      label: "简称",
+      field: "abbreviation",
+      component: 'Input',
+      //colProps: {span: 6},
+ 	},
+	{
+      label: "税号",
+      field: "dutyParagraph",
+      component: 'Input',
+      //colProps: {span: 6},
+ 	},
+	{
+      label: "联系人",
+      field: "contacts",
+      component: 'Input',
+      //colProps: {span: 6},
+ 	},
+	{
+      label: "联系电话",
+      field: "phone",
+      component: 'Input',
+      //colProps: {span: 6},
+ 	},
+	{
+      label: "国家",
+      field: "country",
+      component: 'Input',
+      //colProps: {span: 6},
+ 	},
+	{
+      label: "付款条件",
+      field: "paymentTerms",
+      component: 'JSelectMultiple',
+      componentProps:{
+      },
+      //colProps: {span: 6},
+ 	},
+	{
+      label: "中间人",
+      field: "intermediator",
+      component: 'Input',
+      //colProps: {span: 6},
+ 	},
+	{
+      label: "优先级",
+      field: "priority",
+      component: 'JSelectMultiple',
+      componentProps:{
+      },
+      //colProps: {span: 6},
+ 	},
+];
+//表单数据
+export const formSchema: FormSchema[] = [
+  {
+    label: '状态(1-启用,0-停用)',
+    field: 'status',
+    component: 'InputNumber',
+  },
+  {
+    label: '编码',
+    field: 'code',
+    component: 'Input',
+  },
+  {
+    label: '名称',
+    field: 'name',
+    component: 'Input',
+  },
+  {
+    label: '简称',
+    field: 'abbreviation',
+    component: 'Input',
+  },
+  {
+    label: '曾用名',
+    field: 'nameUsedBefore',
+    component: 'Input',
+  },
+  {
+    label: '税号',
+    field: 'dutyParagraph',
+    component: 'Input',
+  },
+  {
+    label: '法人',
+    field: 'legalPerson',
+    component: 'Input',
+  },
+  {
+    label: '联系人',
+    field: 'contacts',
+    component: 'Input',
+  },
+  {
+    label: '联系电话',
+    field: 'phone',
+    component: 'Input',
+  },
+  {
+    label: '邮箱',
+    field: 'email',
+    component: 'Input',
+  },
+  {
+    label: '注册地址',
+    field: 'registerAddress',
+    component: 'Input',
+  },
+  {
+    label: '办公地址',
+    field: 'officeAddress',
+    component: 'Input',
+  },
+  {
+    label: '发票地址',
+    field: 'invoiceAddress',
+    component: 'Input',
+  },
+  {
+    label: '币种',
+    field: 'currency',
+    component: 'Input',
+  },
+  {
+    label: '国家',
+    field: 'country',
+    component: 'Input',
+  },
+  {
+    label: '付款条件',
+    field: 'paymentTerms',
+    component: 'JDictSelectTag',
+    componentProps:{
+        dictCode:""
+     },
+  },
+  {
+    label: '信用额度',
+    field: 'creditLimit',
+    component: 'InputNumber',
+  },
+  {
+    label: '折扣',
+    field: 'discount',
+    component: 'InputNumber',
+  },
+  {
+    label: '佣金',
+    field: 'commission',
+    component: 'InputNumber',
+  },
+  {
+    label: '中间人',
+    field: 'intermediator',
+    component: 'Input',
+  },
+  {
+    label: '中间人佣金',
+    field: 'intermediatorCommission',
+    component: 'InputNumber',
+  },
+  {
+    label: '优先级',
+    field: 'priority',
+    component: 'JDictSelectTag',
+    componentProps:{
+        dictCode:""
+     },
+  },
+  {
+    label: '备注',
+    field: 'notes',
+    component: 'Input',
+  },
+  {
+    label: '文件',
+    field: 'files',
+    component: 'Input',
+  },
+	// TODO 主键隐藏字段,目前写死为ID
+	{
+	  label: '',
+	  field: 'id',
+	  component: 'Input',
+	  show: false
+	},
+];
+//子表单数据
+//子表表格配置
+export const cuspCustomerProfileManColumns: JVxeColumn[] = [
+    {
+      title: '状态(1-启用,0-停用)',
+      key: 'status',
+      type: JVxeTypes.inputNumber,
+      width:"200px",
+      placeholder: '请输入${title}',
+      defaultValue:'',
+    },
+    {
+      title: '主表主键(客户档案)',
+      key: 'headId',
+      type: JVxeTypes.input,
+      width:"200px",
+      placeholder: '请输入${title}',
+      defaultValue:'',
+    },
+    {
+      title: '编码',
+      key: 'code',
+      type: JVxeTypes.input,
+      width:"200px",
+      placeholder: '请输入${title}',
+      defaultValue:'',
+    },
+    {
+      title: '姓名',
+      key: 'name',
+      type: JVxeTypes.input,
+      width:"200px",
+      placeholder: '请输入${title}',
+      defaultValue:'',
+    },
+    {
+      title: '电话',
+      key: 'mobile',
+      type: JVxeTypes.input,
+      width:"200px",
+      placeholder: '请输入${title}',
+      defaultValue:'',
+    },
+    {
+      title: '邮箱',
+      key: 'email',
+      type: JVxeTypes.input,
+      width:"200px",
+      placeholder: '请输入${title}',
+      defaultValue:'',
+    },
+    {
+      title: '职位',
+      key: 'position',
+      type: JVxeTypes.input,
+      width:"200px",
+      placeholder: '请输入${title}',
+      defaultValue:'',
+    },
+  ]
+
+
+// 高级查询数据
+export const superQuerySchema = {
+  status: {title: '状态(1-启用,0-停用)',order: 0,view: 'number', type: 'number',},
+  code: {title: '编码',order: 2,view: 'text', type: 'string',},
+  name: {title: '名称',order: 3,view: 'text', type: 'string',},
+  abbreviation: {title: '简称',order: 4,view: 'text', type: 'string',},
+  nameUsedBefore: {title: '曾用名',order: 5,view: 'text', type: 'string',},
+  dutyParagraph: {title: '税号',order: 6,view: 'text', type: 'string',},
+  legalPerson: {title: '法人',order: 7,view: 'text', type: 'string',},
+  contacts: {title: '联系人',order: 8,view: 'text', type: 'string',},
+  phone: {title: '联系电话',order: 9,view: 'text', type: 'string',},
+  email: {title: '邮箱',order: 10,view: 'text', type: 'string',},
+  registerAddress: {title: '注册地址',order: 11,view: 'text', type: 'string',},
+  officeAddress: {title: '办公地址',order: 12,view: 'text', type: 'string',},
+  invoiceAddress: {title: '发票地址',order: 13,view: 'text', type: 'string',},
+  currency: {title: '币种',order: 14,view: 'text', type: 'string',},
+  country: {title: '国家',order: 15,view: 'text', type: 'string',},
+  paymentTerms: {title: '付款条件',order: 16,view: 'list', type: 'string',dictCode: '',},
+  creditLimit: {title: '信用额度',order: 17,view: 'number', type: 'number',},
+  discount: {title: '折扣',order: 18,view: 'number', type: 'number',},
+  commission: {title: '佣金',order: 19,view: 'number', type: 'number',},
+  intermediator: {title: '中间人',order: 20,view: 'text', type: 'string',},
+  intermediatorCommission: {title: '中间人佣金',order: 21,view: 'number', type: 'number',},
+  priority: {title: '优先级',order: 22,view: 'list', type: 'string',dictCode: '',},
+  notes: {title: '备注',order: 23,view: 'text', type: 'string',},
+  files: {title: '文件',order: 24,view: 'text', type: 'string',},
+  //子表高级查询
+  cuspCustomerProfileMan: {
+    title: '客户档案-联系人',
+    view: 'table',
+    fields: {
+        status: {title: '状态(1-启用,0-停用)',order: 0,view: 'number', type: 'number',},
+        headId: {title: '主表主键(客户档案)',order: 2,view: 'text', type: 'string',},
+        code: {title: '编码',order: 3,view: 'text', type: 'string',},
+        name: {title: '姓名',order: 4,view: 'text', type: 'string',},
+        mobile: {title: '电话',order: 5,view: 'text', type: 'string',},
+        email: {title: '邮箱',order: 6,view: 'text', type: 'string',},
+        position: {title: '职位',order: 7,view: 'text', type: 'string',},
+    }
+  },
+};
+
+/**
+* 流程表单调用这个方法获取formSchema
+* @param param
+*/
+export function getBpmFormSchema(_formData): FormSchema[]{
+// 默认和原始表单保持一致 如果流程中配置了权限数据,这里需要单独处理formSchema
+  return formSchema;
+}

+ 192 - 0
src/views/cuspCode/CustomerProfile/CuspCustomerProfileList.vue

@@ -0,0 +1,192 @@
+<template>
+  <div>
+    <!--引用表格-->
+   <BasicTable @register="registerTable" :rowSelection="rowSelection">
+     <!--插槽:table标题-->
+      <template #tableTitle>
+          <a-button type="primary" v-auth="'cuspCode:cusp_customer_profile:add'"  @click="handleAdd" preIcon="ant-design:plus-outlined"> 新增</a-button>
+          <a-button  type="primary" v-auth="'cuspCode:cusp_customer_profile:exportXls'"  preIcon="ant-design:export-outlined" @click="onExportXls"> 导出</a-button>
+          <j-upload-button  type="primary" v-auth="'cuspCode:cusp_customer_profile:importExcel'"  preIcon="ant-design:import-outlined" @click="onImportXls">导入</j-upload-button>
+          <a-dropdown v-if="selectedRowKeys.length > 0">
+              <template #overlay>
+                <a-menu>
+                  <a-menu-item key="1" @click="batchHandleDelete">
+                    <Icon icon="ant-design:delete-outlined"></Icon>
+                    删除
+                  </a-menu-item>
+                </a-menu>
+              </template>
+              <a-button v-auth="'cuspCode:cusp_customer_profile:deleteBatch'">批量操作
+                <Icon icon="mdi:chevron-down"></Icon>
+              </a-button>
+        </a-dropdown>
+        <!-- 高级查询 -->
+        <super-query :config="superQueryConfig" @search="handleSuperQuery" />
+      </template>
+       <!--操作栏-->
+      <template #action="{ record }">
+        <TableAction :actions="getTableAction(record)" :dropDownActions="getDropDownAction(record)"/>
+      </template>
+      <!--字段回显插槽-->
+      <template v-slot:bodyCell="{ column, record, index, text }">
+      </template>
+    </BasicTable>
+    <!-- 表单区域 -->
+    <CuspCustomerProfileModal @register="registerModal" @success="handleSuccess"></CuspCustomerProfileModal>
+  </div>
+</template>
+
+<script lang="ts" name="cuspCode-cuspCustomerProfile" setup>
+  import {ref, reactive, computed, unref} from 'vue';
+  import {BasicTable, useTable, TableAction} from '/@/components/Table';
+  import { useListPage } from '/@/hooks/system/useListPage'
+  import {useModal} from '/@/components/Modal';
+  import CuspCustomerProfileModal from './components/CuspCustomerProfileModal.vue'
+  import {columns, searchFormSchema, superQuerySchema} from './CuspCustomerProfile.data';
+  import {list, deleteOne, batchDelete, getImportUrl,getExportUrl} from './CuspCustomerProfile.api';
+  import {downloadFile} from '/@/utils/common/renderUtils';
+  import { useUserStore } from '/@/store/modules/user';
+  const queryParam = reactive<any>({});
+  const checkedKeys = ref<Array<string | number>>([]);
+  const userStore = useUserStore();
+  //注册model
+  const [registerModal, {openModal}] = useModal();
+   //注册table数据
+  const { prefixCls,tableContext,onExportXls,onImportXls } = useListPage({
+      tableProps:{
+           title: '客户档案',
+           api: list,
+           columns,
+           canResize:false,
+           formConfig: {
+                //labelWidth: 120,
+                schemas: searchFormSchema,
+                autoSubmitOnEnter:true,
+                showAdvancedButton:true,
+                fieldMapToNumber: [
+                ],
+                fieldMapToTime: [
+                ],
+            },
+           actionColumn: {
+               width: 120,
+               fixed:'right'
+           },
+           beforeFetch: (params) => {
+             return Object.assign(params, queryParam);
+           },
+        },
+        exportConfig: {
+            name:"客户档案",
+            url: getExportUrl,
+            params: queryParam,
+        },
+        importConfig: {
+            url: getImportUrl,
+            success: handleSuccess
+        },
+    })
+
+  const [registerTable, {reload},{ rowSelection, selectedRowKeys }] = tableContext
+
+  // 高级查询配置
+  const superQueryConfig = reactive(superQuerySchema);
+
+  /**
+   * 高级查询事件
+   */
+  function handleSuperQuery(params) {
+    Object.keys(params).map((k) => {
+      queryParam[k] = params[k];
+    });
+    reload();
+  }
+
+   /**
+    * 新增事件
+    */
+  function handleAdd() {
+     openModal(true, {
+       isUpdate: false,
+       showFooter: true,
+     });
+  }
+   /**
+    * 编辑事件
+    */
+  function handleEdit(record: Recordable) {
+     openModal(true, {
+       record,
+       isUpdate: true,
+       showFooter: true,
+     });
+   }
+   /**
+    * 详情
+   */
+  function handleDetail(record: Recordable) {
+     openModal(true, {
+       record,
+       isUpdate: true,
+       showFooter: false,
+     });
+   }
+   /**
+    * 删除事件
+    */
+  async function handleDelete(record) {
+     await deleteOne({id: record.id}, handleSuccess);
+   }
+   /**
+    * 批量删除事件
+    */
+  async function batchHandleDelete() {
+     await batchDelete({ids: selectedRowKeys.value},handleSuccess);
+   }
+   /**
+    * 成功回调
+    */
+  function handleSuccess() {
+      (selectedRowKeys.value = []) && reload();
+   }
+   /**
+      * 操作栏
+      */
+  function getTableAction(record){
+       return [
+         {
+           label: '编辑',
+           onClick: handleEdit.bind(null, record),
+           auth: 'cuspCode:cusp_customer_profile:edit'
+         }
+       ]
+   }
+
+
+  /**
+   * 下拉操作栏
+   */
+  function getDropDownAction(record){
+    return [
+      {
+        label: '详情',
+        onClick: handleDetail.bind(null, record),
+      }, {
+        label: '删除',
+        popConfirm: {
+          title: '是否确认删除',
+          confirm: handleDelete.bind(null, record),
+          placement: 'topLeft'
+        },
+        auth: 'cuspCode:cusp_customer_profile:delete'
+      }
+    ]
+  }
+
+</script>
+
+<style lang="less" scoped>
+  :deep(.ant-picker),:deep(.ant-input-number){
+    width: 100%;
+  }
+</style>

+ 118 - 0
src/views/cuspCode/CustomerProfile/components/CuspCustomerProfileForm.vue

@@ -0,0 +1,118 @@
+<template>
+  <div>
+    <BasicForm @register="registerForm" ref="formRef"/>
+    <!-- 子表单区域 -->
+    <a-tabs v-model:activeKey="activeKey" animated  @change="handleChangeTabs">
+      <a-tab-pane tab="客户档案-联系人" key="cuspCustomerProfileMan" :forceRender="true">
+        <JVxeTable
+          keep-source
+          resizable
+          ref="cuspCustomerProfileMan"
+          v-if="cuspCustomerProfileManTable.show"
+          :loading="cuspCustomerProfileManTable.loading"
+          :columns="cuspCustomerProfileManTable.columns"
+          :dataSource="cuspCustomerProfileManTable.dataSource"
+          :height="340"
+          :rowNumber="true"
+          :rowSelection="true"
+          :disabled="formDisabled"
+          :toolbar="true"
+        />
+      </a-tab-pane>
+    </a-tabs>
+
+    <div style="width: 100%;text-align: center" v-if="!formDisabled">
+      <a-button @click="handleSubmit" pre-icon="ant-design:check" type="primary">提 交</a-button>
+    </div>
+  </div>
+</template>
+
+<script lang="ts">
+
+  import {BasicForm, useForm} from '/@/components/Form/index';
+  import { computed, defineComponent, reactive, ref, unref } from 'vue';
+  import {defHttp} from '/@/utils/http/axios';
+  import { propTypes } from '/@/utils/propTypes';
+  import { useJvxeMethod } from '/@/hooks/system/useJvxeMethods';
+  import { VALIDATE_FAILED } from '/@/utils/common/vxeUtils';
+  import {getBpmFormSchema,cuspCustomerProfileManColumns} from '../CuspCustomerProfile.data';
+  import {saveOrUpdate,cuspCustomerProfileManList} from '../CuspCustomerProfile.api';
+
+  export default defineComponent({
+    name: "CuspCustomerProfileForm",
+    components:{
+      BasicForm,
+    },
+    props:{
+      formData: propTypes.object.def({}),
+      formBpm: propTypes.bool.def(true),
+    },
+    setup(props){
+      const [registerForm, { setFieldsValue, setProps }] = useForm({
+        labelWidth: 150,
+        schemas: getBpmFormSchema(props.formData),
+        showActionButtonGroup: false,
+        baseColProps: {span: 8}
+      });
+
+      const formDisabled = computed(()=>{
+        if(props.formData.disabled === false){
+          return false;
+        }
+        return true;
+      });
+
+      const refKeys = ref(['cuspCustomerProfileMan', ]);
+      const activeKey = ref('cuspCustomerProfileMan');
+      const cuspCustomerProfileMan = ref();
+      const tableRefs = {cuspCustomerProfileMan, };
+      const cuspCustomerProfileManTable = reactive({
+        loading: false,
+        dataSource: [],
+        columns:cuspCustomerProfileManColumns,
+        show: false
+      })
+
+      const [handleChangeTabs,handleSubmit,requestSubTableData,formRef] = useJvxeMethod(requestAddOrEdit,classifyIntoFormData,tableRefs,activeKey,refKeys,validateSubForm);
+
+      function classifyIntoFormData(allValues) {
+        let main = Object.assign({}, allValues.formValue)
+        return {
+          ...main, // 展开
+          cuspCustomerProfileManList: allValues.tablesValue[0].tableData,
+        }
+      }
+
+      //表单提交事件
+      async function requestAddOrEdit(values) {
+        await saveOrUpdate(values, true);
+      }
+
+      const queryByIdUrl = '/cuspCode/cuspCustomerProfile/queryById';
+      async function initFormData(){
+        let params = {id: props.formData.dataId};
+        const data = await defHttp.get({url: queryByIdUrl, params});
+        //设置表单的值
+        await setFieldsValue({...data});
+        requestSubTableData(cuspCustomerProfileManList, {id: data.id}, cuspCustomerProfileManTable, ()=>{
+          cuspCustomerProfileManTable.show = true;
+        });
+        //默认是禁用
+        await setProps({disabled: formDisabled.value})
+      }
+
+      initFormData();
+
+      return {
+        registerForm,
+        formDisabled,
+        formRef,
+        handleSubmit,
+        activeKey,
+        handleChangeTabs,
+        cuspCustomerProfileMan,
+        cuspCustomerProfileManTable,
+      }
+    }
+  });
+</script>

+ 113 - 0
src/views/cuspCode/CustomerProfile/components/CuspCustomerProfileModal.vue

@@ -0,0 +1,113 @@
+<template>
+  <BasicModal v-bind="$attrs" @register="registerModal" destroyOnClose :title="title" :width="1024" @ok="handleSubmit">
+    <BasicForm @register="registerForm" ref="formRef" name="CuspCustomerProfileForm"/>
+    <!-- 子表单区域 -->
+    <a-tabs v-model:activeKey="activeKey" animated @change="handleChangeTabs">
+      <a-tab-pane tab="客户档案-联系人" key="cuspCustomerProfileMan" :forceRender="true">
+        <JVxeTable
+          keep-source
+          resizable
+          ref="cuspCustomerProfileMan"
+          :loading="cuspCustomerProfileManTable.loading"
+          :columns="cuspCustomerProfileManTable.columns"
+          :dataSource="cuspCustomerProfileManTable.dataSource"
+          :height="340"
+          :rowNumber="true"
+          :rowSelection="true"
+          :disabled="formDisabled"
+          :toolbar="true"
+          />
+      </a-tab-pane>
+    </a-tabs>
+  </BasicModal>
+</template>
+
+<script lang="ts" setup>
+    import {ref, computed, unref,reactive} from 'vue';
+    import {BasicModal, useModalInner} from '/@/components/Modal';
+    import {BasicForm, useForm} from '/@/components/Form/index';
+    import { JVxeTable } from '/@/components/jeecg/JVxeTable'
+    import { useJvxeMethod } from '/@/hooks/system/useJvxeMethods.ts'
+    import {formSchema,cuspCustomerProfileManColumns} from '../CuspCustomerProfile.data';
+    import {saveOrUpdate,cuspCustomerProfileManList} from '../CuspCustomerProfile.api';
+    import { VALIDATE_FAILED } from '/@/utils/common/vxeUtils'
+    // Emits声明
+    const emit = defineEmits(['register','success']);
+    const isUpdate = ref(true);
+    const formDisabled = ref(false);
+    const refKeys = ref(['cuspCustomerProfileMan', ]);
+    const activeKey = ref('cuspCustomerProfileMan');
+    const cuspCustomerProfileMan = ref();
+    const tableRefs = {cuspCustomerProfileMan, };
+    const cuspCustomerProfileManTable = reactive({
+          loading: false,
+          dataSource: [],
+          columns:cuspCustomerProfileManColumns
+    })
+    //表单配置
+    const [registerForm, {setProps,resetFields, setFieldsValue, validate}] = useForm({
+        schemas: formSchema,
+        showActionButtonGroup: false,
+        baseColProps: {span: 8}
+    });
+     //表单赋值
+    const [registerModal, {setModalProps, closeModal}] = useModalInner(async (data) => {
+        //重置表单
+        await reset();
+        setModalProps({confirmLoading: false,showCancelBtn:data?.showFooter,showOkBtn:data?.showFooter});
+        isUpdate.value = !!data?.isUpdate;
+        formDisabled.value = !data?.showFooter;
+        if (unref(isUpdate)) {
+            //表单赋值
+            await setFieldsValue({
+                ...data.record,
+            });
+             requestSubTableData(cuspCustomerProfileManList, {id:data?.record?.id}, cuspCustomerProfileManTable)
+        }
+        // 隐藏底部时禁用整个表单
+       setProps({ disabled: !data?.showFooter })
+    });
+    //方法配置
+    const [handleChangeTabs,handleSubmit,requestSubTableData,formRef] = useJvxeMethod(requestAddOrEdit,classifyIntoFormData,tableRefs,activeKey,refKeys);
+
+    //设置标题
+    const title = computed(() => (!unref(isUpdate) ? '新增' : !unref(formDisabled) ? '编辑' : '详情'));
+
+    async function reset(){
+      await resetFields();
+      activeKey.value = 'cuspCustomerProfileMan';
+      cuspCustomerProfileManTable.dataSource = [];
+    }
+    function classifyIntoFormData(allValues) {
+         let main = Object.assign({}, allValues.formValue)
+         return {
+           ...main, // 展开
+           cuspCustomerProfileManList: allValues.tablesValue[0].tableData,
+         }
+       }
+    //表单提交事件
+    async function requestAddOrEdit(values) {
+        try {
+            setModalProps({confirmLoading: true});
+            //提交表单
+            await saveOrUpdate(values, isUpdate.value);
+            //关闭弹窗
+            closeModal();
+            //刷新列表
+            emit('success');
+        } finally {
+            setModalProps({confirmLoading: false});
+        }
+    }
+</script>
+
+<style lang="less" scoped>
+	/** 时间和数字输入框样式 */
+  :deep(.ant-input-number) {
+    width: 100%;
+  }
+
+  :deep(.ant-calendar-picker) {
+    width: 100%;
+  }
+</style>

+ 64 - 0
src/views/cuspCode/Intermediator/CuspIntermediator.api.ts

@@ -0,0 +1,64 @@
+import {defHttp} from '/@/utils/http/axios';
+import { useMessage } from "/@/hooks/web/useMessage";
+
+const { createConfirm } = useMessage();
+
+enum Api {
+  list = '/cuspCode/cuspIntermediator/list',
+  save='/cuspCode/cuspIntermediator/add',
+  edit='/cuspCode/cuspIntermediator/edit',
+  deleteOne = '/cuspCode/cuspIntermediator/delete',
+  deleteBatch = '/cuspCode/cuspIntermediator/deleteBatch',
+  importExcel = '/cuspCode/cuspIntermediator/importExcel',
+  exportXls = '/cuspCode/cuspIntermediator/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});
+}

+ 217 - 0
src/views/cuspCode/Intermediator/CuspIntermediator.data.ts

@@ -0,0 +1,217 @@
+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: '状态(1-启用,0-停用)',
+    align:"center",
+    dataIndex: 'status_dictText'
+   },
+   {
+    title: '编码',
+    align:"center",
+    dataIndex: 'code'
+   },
+   {
+    title: '名称',
+    align:"center",
+    dataIndex: 'name'
+   },
+   {
+    title: '简称',
+    align:"center",
+    dataIndex: 'abbreviation'
+   },
+   {
+    title: '税号',
+    align:"center",
+    dataIndex: 'dutyParagraph'
+   },
+   {
+    title: '法人',
+    align:"center",
+    dataIndex: 'legalPerson'
+   },
+   {
+    title: '联系人',
+    align:"center",
+    dataIndex: 'contacts'
+   },
+   {
+    title: '联系电话',
+    align:"center",
+    dataIndex: 'phone'
+   },
+   {
+    title: '办公地址',
+    align:"center",
+    dataIndex: 'address'
+   },
+   {
+    title: '邮箱',
+    align:"center",
+    dataIndex: 'email'
+   },
+   {
+    title: '国家',
+    align:"center",
+    dataIndex: 'country'
+   },
+   {
+    title: '备注',
+    align:"center",
+    dataIndex: 'notes'
+   },
+];
+//查询数据
+export const searchFormSchema: FormSchema[] = [
+	{
+      label: "编码",
+      field: 'code',
+      component: 'Input',
+      //colProps: {span: 6},
+ 	},
+	{
+      label: "名称",
+      field: 'name',
+      component: 'Input',
+      //colProps: {span: 6},
+ 	},
+	{
+      label: "简称",
+      field: 'abbreviation',
+      component: 'Input',
+      //colProps: {span: 6},
+ 	},
+	{
+      label: "税号",
+      field: 'dutyParagraph',
+      component: 'Input',
+      //colProps: {span: 6},
+ 	},
+	{
+      label: "法人",
+      field: 'legalPerson',
+      component: 'Input',
+      //colProps: {span: 6},
+ 	},
+	{
+      label: "联系人",
+      field: 'contacts',
+      component: 'Input',
+      //colProps: {span: 6},
+ 	},
+	{
+      label: "联系电话",
+      field: 'phone',
+      component: 'Input',
+      //colProps: {span: 6},
+ 	},
+	{
+      label: "国家",
+      field: 'country',
+      component: 'Input',
+      //colProps: {span: 6},
+ 	},
+];
+//表单数据
+export const formSchema: FormSchema[] = [
+  {
+    label: '状态(1-启用,0-停用)',
+    field: 'status',
+    component: 'JDictSelectTag',
+    componentProps:{
+        dictCode:""
+     },
+  },
+  {
+    label: '编码',
+    field: 'code',
+    component: 'Input',
+  },
+  {
+    label: '名称',
+    field: 'name',
+    component: 'Input',
+  },
+  {
+    label: '简称',
+    field: 'abbreviation',
+    component: 'Input',
+  },
+  {
+    label: '税号',
+    field: 'dutyParagraph',
+    component: 'Input',
+  },
+  {
+    label: '法人',
+    field: 'legalPerson',
+    component: 'Input',
+  },
+  {
+    label: '联系人',
+    field: 'contacts',
+    component: 'Input',
+  },
+  {
+    label: '联系电话',
+    field: 'phone',
+    component: 'Input',
+  },
+  {
+    label: '办公地址',
+    field: 'address',
+    component: 'Input',
+  },
+  {
+    label: '邮箱',
+    field: 'email',
+    component: 'Input',
+  },
+  {
+    label: '国家',
+    field: 'country',
+    component: 'Input',
+  },
+  {
+    label: '备注',
+    field: 'notes',
+    component: 'Input',
+  },
+	// TODO 主键隐藏字段,目前写死为ID
+	{
+	  label: '',
+	  field: 'id',
+	  component: 'Input',
+	  show: false
+	},
+];
+
+// 高级查询数据
+export const superQuerySchema = {
+  status: {title: '状态(1-启用,0-停用)',order: 0,view: 'number', type: 'number',dictCode: '',},
+  code: {title: '编码',order: 2,view: 'text', type: 'string',},
+  name: {title: '名称',order: 3,view: 'text', type: 'string',},
+  abbreviation: {title: '简称',order: 4,view: 'text', type: 'string',},
+  dutyParagraph: {title: '税号',order: 5,view: 'text', type: 'string',},
+  legalPerson: {title: '法人',order: 6,view: 'text', type: 'string',},
+  contacts: {title: '联系人',order: 7,view: 'text', type: 'string',},
+  phone: {title: '联系电话',order: 8,view: 'text', type: 'string',},
+  address: {title: '办公地址',order: 9,view: 'text', type: 'string',},
+  email: {title: '邮箱',order: 10,view: 'text', type: 'string',},
+  country: {title: '国家',order: 11,view: 'text', type: 'string',},
+  notes: {title: '备注',order: 12,view: 'text', type: 'string',},
+};
+
+/**
+* 流程表单调用这个方法获取formSchema
+* @param param
+*/
+export function getBpmFormSchema(_formData): FormSchema[]{
+  // 默认和原始表单保持一致 如果流程中配置了权限数据,这里需要单独处理formSchema
+  return formSchema;
+}

+ 190 - 0
src/views/cuspCode/Intermediator/CuspIntermediatorList.vue

@@ -0,0 +1,190 @@
+<template>
+  <div>
+    <!--引用表格-->
+   <BasicTable @register="registerTable" :rowSelection="rowSelection">
+     <!--插槽:table标题-->
+      <template #tableTitle>
+          <a-button type="primary" v-auth="'cuspCode:cusp_intermediator:add'" @click="handleAdd" preIcon="ant-design:plus-outlined"> 新增</a-button>
+          <a-button  type="primary" v-auth="'cuspCode:cusp_intermediator:exportXls'" preIcon="ant-design:export-outlined" @click="onExportXls"> 导出</a-button>
+          <j-upload-button type="primary" v-auth="'cuspCode:cusp_intermediator:importExcel'" preIcon="ant-design:import-outlined" @click="onImportXls">导入</j-upload-button>
+          <a-dropdown v-if="selectedRowKeys.length > 0">
+              <template #overlay>
+                <a-menu>
+                  <a-menu-item key="1" @click="batchHandleDelete">
+                    <Icon icon="ant-design:delete-outlined"></Icon>
+                    删除
+                  </a-menu-item>
+                </a-menu>
+              </template>
+              <a-button v-auth="'cuspCode:cusp_intermediator:deleteBatch'">批量操作
+                <Icon icon="mdi:chevron-down"></Icon>
+              </a-button>
+        </a-dropdown>
+        <!-- 高级查询 -->
+        <super-query :config="superQueryConfig" @search="handleSuperQuery" />
+      </template>
+       <!--操作栏-->
+      <template #action="{ record }">
+        <TableAction :actions="getTableAction(record)" :dropDownActions="getDropDownAction(record)"/>
+      </template>
+      <!--字段回显插槽-->
+      <template v-slot:bodyCell="{ column, record, index, text }">
+      </template>
+    </BasicTable>
+    <!-- 表单区域 -->
+    <CuspIntermediatorModal @register="registerModal" @success="handleSuccess"></CuspIntermediatorModal>
+  </div>
+</template>
+
+<script lang="ts" name="cuspCode-cuspIntermediator" setup>
+  import {ref, reactive, computed, unref} from 'vue';
+  import {BasicTable, useTable, TableAction} from '/@/components/Table';
+  import {useModal} from '/@/components/Modal';
+  import { useListPage } from '/@/hooks/system/useListPage'
+  import CuspIntermediatorModal from './components/CuspIntermediatorModal.vue'
+  import {columns, searchFormSchema, superQuerySchema} from './CuspIntermediator.data';
+  import {list, deleteOne, batchDelete, getImportUrl,getExportUrl} from './CuspIntermediator.api';
+  import { downloadFile } from '/@/utils/common/renderUtils';
+  import { useUserStore } from '/@/store/modules/user';
+  const queryParam = reactive<any>({});
+  const checkedKeys = ref<Array<string | number>>([]);
+  const userStore = useUserStore();
+  //注册model
+  const [registerModal, {openModal}] = useModal();
+  //注册table数据
+  const { prefixCls,tableContext,onExportXls,onImportXls } = useListPage({
+      tableProps:{
+           title: '中间人',
+           api: list,
+           columns,
+           canResize:false,
+           formConfig: {
+              //labelWidth: 120,
+              schemas: searchFormSchema,
+              autoSubmitOnEnter:true,
+              showAdvancedButton:true,
+              fieldMapToNumber: [
+              ],
+              fieldMapToTime: [
+              ],
+            },
+           actionColumn: {
+               width: 120,
+               fixed:'right'
+            },
+            beforeFetch: (params) => {
+              return Object.assign(params, queryParam);
+            },
+      },
+       exportConfig: {
+            name:"中间人",
+            url: getExportUrl,
+            params: queryParam,
+          },
+          importConfig: {
+            url: getImportUrl,
+            success: handleSuccess
+          },
+  })
+
+  const [registerTable, {reload},{ rowSelection, selectedRowKeys }] = tableContext
+
+  // 高级查询配置
+  const superQueryConfig = reactive(superQuerySchema);
+
+  /**
+   * 高级查询事件
+   */
+  function handleSuperQuery(params) {
+    Object.keys(params).map((k) => {
+      queryParam[k] = params[k];
+    });
+    reload();
+  }
+   /**
+    * 新增事件
+    */
+  function handleAdd() {
+     openModal(true, {
+       isUpdate: false,
+       showFooter: true,
+     });
+  }
+   /**
+    * 编辑事件
+    */
+  function handleEdit(record: Recordable) {
+     openModal(true, {
+       record,
+       isUpdate: true,
+       showFooter: true,
+     });
+   }
+   /**
+    * 详情
+   */
+  function handleDetail(record: Recordable) {
+     openModal(true, {
+       record,
+       isUpdate: true,
+       showFooter: false,
+     });
+   }
+   /**
+    * 删除事件
+    */
+  async function handleDelete(record) {
+     await deleteOne({id: record.id}, handleSuccess);
+   }
+   /**
+    * 批量删除事件
+    */
+  async function batchHandleDelete() {
+     await batchDelete({ids: selectedRowKeys.value}, handleSuccess);
+   }
+   /**
+    * 成功回调
+    */
+  function handleSuccess() {
+      (selectedRowKeys.value = []) && reload();
+   }
+   /**
+      * 操作栏
+      */
+  function getTableAction(record){
+       return [
+         {
+           label: '编辑',
+           onClick: handleEdit.bind(null, record),
+           auth: 'cuspCode:cusp_intermediator:edit'
+         }
+       ]
+   }
+     /**
+        * 下拉操作栏
+        */
+  function getDropDownAction(record){
+       return [
+         {
+           label: '详情',
+           onClick: handleDetail.bind(null, record),
+         }, {
+           label: '删除',
+           popConfirm: {
+             title: '是否确认删除',
+             confirm: handleDelete.bind(null, record),
+             placement: 'topLeft',
+           },
+           auth: 'cuspCode:cusp_intermediator:delete'
+         }
+       ]
+   }
+
+
+</script>
+
+<style lang="less" scoped>
+  :deep(.ant-picker),:deep(.ant-input-number){
+    width: 100%;
+  }
+</style>

+ 70 - 0
src/views/cuspCode/Intermediator/components/CuspIntermediatorForm.vue

@@ -0,0 +1,70 @@
+<template>
+    <div style="min-height: 400px">
+        <BasicForm @register="registerForm"></BasicForm>
+        <div style="width: 100%;text-align: center" v-if="!formDisabled">
+            <a-button @click="submitForm" pre-icon="ant-design:check" type="primary">提 交</a-button>
+        </div>
+    </div>
+</template>
+
+<script lang="ts">
+    import {BasicForm, useForm} from '/@/components/Form/index';
+    import {computed, defineComponent} from 'vue';
+    import {defHttp} from '/@/utils/http/axios';
+    import { propTypes } from '/@/utils/propTypes';
+    import {getBpmFormSchema} from '../CuspIntermediator.data';
+    import {saveOrUpdate} from '../CuspIntermediator.api';
+    
+    export default defineComponent({
+        name: "CuspIntermediatorForm",
+        components:{
+            BasicForm
+        },
+        props:{
+            formData: propTypes.object.def({}),
+            formBpm: propTypes.bool.def(true),
+        },
+        setup(props){
+            const [registerForm, { setFieldsValue, setProps, getFieldsValue }] = useForm({
+                labelWidth: 150,
+                schemas: getBpmFormSchema(props.formData),
+                showActionButtonGroup: false,
+                baseColProps: {span: 12}
+            });
+
+            const formDisabled = computed(()=>{
+                if(props.formData.disabled === false){
+                    return false;
+                }
+                return true;
+            });
+
+            let formData = {};
+            const queryByIdUrl = '/cuspCode/cuspIntermediator/queryById';
+            async function initFormData(){
+                let params = {id: props.formData.dataId};
+                const data = await defHttp.get({url: queryByIdUrl, params});
+                formData = {...data}
+                //设置表单的值
+                await setFieldsValue(formData);
+                //默认是禁用
+                await setProps({disabled: formDisabled.value})
+            }
+
+            async function submitForm() {
+                let data = getFieldsValue();
+                let params = Object.assign({}, formData, data);
+                console.log('表单数据', params)
+                await saveOrUpdate(params, true)
+            }
+
+            initFormData();
+            
+            return {
+                registerForm,
+                formDisabled,
+                submitForm,
+            }
+        }
+    });
+</script>

+ 75 - 0
src/views/cuspCode/Intermediator/components/CuspIntermediatorModal.vue

@@ -0,0 +1,75 @@
+<template>
+  <BasicModal v-bind="$attrs" @register="registerModal" destroyOnClose :title="title" :width="896" @ok="handleSubmit">
+      <BasicForm @register="registerForm" name="CuspIntermediatorForm" />
+  </BasicModal>
+</template>
+
+<script lang="ts" setup>
+    import {ref, computed, unref} from 'vue';
+    import {BasicModal, useModalInner} from '/@/components/Modal';
+    import {BasicForm, useForm} from '/@/components/Form/index';
+    import {formSchema} from '../CuspIntermediator.data';
+    import {saveOrUpdate} from '../CuspIntermediator.api';
+    // Emits声明
+    const emit = defineEmits(['register','success']);
+    const isUpdate = ref(true);
+    const isDetail = ref(false);
+    //表单配置
+    const [registerForm, { setProps,resetFields, setFieldsValue, validate, scrollToField }] = useForm({
+        schemas: formSchema,
+        showActionButtonGroup: false,
+        baseColProps: {span: 12}
+    });
+    //表单赋值
+    const [registerModal, {setModalProps, closeModal}] = useModalInner(async (data) => {
+        //重置表单
+        await resetFields();
+        setModalProps({confirmLoading: false,showCancelBtn:!!data?.showFooter,showOkBtn:!!data?.showFooter});
+        isUpdate.value = !!data?.isUpdate;
+        isDetail.value = !!data?.showFooter;
+        if (unref(isUpdate)) {
+            //表单赋值
+            await setFieldsValue({
+                ...data.record,
+            });
+        }
+        // 隐藏底部时禁用整个表单
+       setProps({ disabled: !data?.showFooter })
+    });
+    //设置标题
+    const title = computed(() => (!unref(isUpdate) ? '新增' : !unref(isDetail) ? '详情' : '编辑'));
+    //表单提交事件
+    async function handleSubmit(v) {
+        try {
+            let values = await validate();
+            setModalProps({confirmLoading: true});
+            //提交表单
+            await saveOrUpdate(values, isUpdate.value);
+            //关闭弹窗
+            closeModal();
+            //刷新列表
+            emit('success');
+        } catch ({ errorFields }) {
+           if (errorFields) {
+             const firstField = errorFields[0];
+             if (firstField) {
+               scrollToField(firstField.name, { behavior: 'smooth', block: 'center' });
+             }
+           }
+           return Promise.reject(errorFields);
+        } finally {
+            setModalProps({confirmLoading: false});
+        }
+    }
+</script>
+
+<style lang="less" scoped>
+	/** 时间和数字输入框样式 */
+  :deep(.ant-input-number) {
+    width: 100%;
+  }
+
+  :deep(.ant-calendar-picker) {
+    width: 100%;
+  }
+</style>

+ 71 - 0
src/views/cuspCode/SupplierEvaluation/CuspSupplierEvaluation.api.ts

@@ -0,0 +1,71 @@
+import {defHttp} from '/@/utils/http/axios';
+import { useMessage } from "/@/hooks/web/useMessage";
+
+const { createConfirm } = useMessage();
+
+enum Api {
+  list = '/cuspCode/cuspSupplierEvaluation/list',
+  save='/cuspCode/cuspSupplierEvaluation/add',
+  edit='/cuspCode/cuspSupplierEvaluation/edit',
+  deleteOne = '/cuspCode/cuspSupplierEvaluation/delete',
+  deleteBatch = '/cuspCode/cuspSupplierEvaluation/deleteBatch',
+  importExcel = '/cuspCode/cuspSupplierEvaluation/importExcel',
+  exportXls = '/cuspCode/cuspSupplierEvaluation/exportXls',
+  cuspSupplierEvaluationScoreList = '/cuspCode/cuspSupplierEvaluation/queryCuspSupplierEvaluationScoreByMainId',
+}
+/**
+ * 导出api
+ * @param params
+ */
+export const getExportUrl = Api.exportXls;
+
+/**
+ * 导入api
+ */
+export const getImportUrl = Api.importExcel;
+/**
+ * 查询子表数据
+ * @param params
+ */
+export const cuspSupplierEvaluationScoreList = Api.cuspSupplierEvaluationScoreList;
+/**
+ * 列表接口
+ * @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});
+}

+ 293 - 0
src/views/cuspCode/SupplierEvaluation/CuspSupplierEvaluation.data.ts

@@ -0,0 +1,293 @@
+import {BasicColumn} from '/@/components/Table';
+import {FormSchema} from '/@/components/Table';
+import { rules} from '/@/utils/helper/validator';
+import { render } from '/@/utils/common/renderUtils';
+import {JVxeTypes,JVxeColumn} from '/@/components/jeecg/JVxeTable/types'
+import { getWeekMonthQuarterYear } from '/@/utils';
+//列表数据
+export const columns: BasicColumn[] = [
+   {
+    title: '状态(1-启用,0-停用)',
+    align:"center",
+    dataIndex: 'status'
+   },
+   {
+    title: '单据日期',
+    align:"center",
+    dataIndex: 'billDate'
+   },
+   {
+    title: '考评单号',
+    align:"center",
+    dataIndex: 'billCode'
+   },
+   {
+    title: '供应商',
+    align:"center",
+    dataIndex: 'supplierId_dictText'
+   },
+   {
+    title: '考评期间',
+    align:"center",
+    dataIndex: 'evaluationPeriod'
+   },
+   {
+    title: '考评等级',
+    align:"center",
+    dataIndex: 'evaluationLevel_dictText'
+   },
+   {
+    title: '备注',
+    align:"center",
+    dataIndex: 'notes'
+   },
+   {
+    title: '提交(1-是 ,0-否)',
+    align:"center",
+    dataIndex: 'submit_dictText'
+   },
+];
+//查询数据
+export const searchFormSchema: FormSchema[] = [
+     {
+      label: "单据日期",
+      field: "billDate",
+      component: 'RangePicker',
+      componentProps: {
+          valueType: 'Date',
+          showTime:true
+      },
+      //colProps: {span: 6},
+	},
+	{
+      label: "考评单号",
+      field: "billCode",
+      component: 'Input',
+      //colProps: {span: 6},
+ 	},
+	{
+      label: "供应商",
+      field: "supplierId",
+      component: 'JSelectMultiple',
+      componentProps:{
+      },
+      //colProps: {span: 6},
+ 	},
+	{
+      label: "考评期间",
+      field: "evaluationPeriod",
+      component: 'Input',
+      //colProps: {span: 6},
+ 	},
+	{
+      label: "考评等级",
+      field: "evaluationLevel",
+      component: 'JSelectMultiple',
+      componentProps:{
+      },
+      //colProps: {span: 6},
+ 	},
+	{
+      label: "提交(1-是 ,0-否)",
+      field: "submit",
+      component: 'JSelectMultiple',
+      componentProps:{
+      },
+      //colProps: {span: 6},
+ 	},
+];
+//表单数据
+export const formSchema: FormSchema[] = [
+  {
+    label: '状态(1-启用,0-停用)',
+    field: 'status',
+    component: 'InputNumber',
+  },
+  {
+    label: '单据日期',
+    field: 'billDate',
+    component: 'DatePicker',
+    componentProps: {
+       showTime:true,
+       valueFormat: 'YYYY-MM-DD HH:mm:ss'
+     },
+  },
+  {
+    label: '考评单号',
+    field: 'billCode',
+    component: 'Input',
+  },
+  {
+    label: '供应商',
+    field: 'supplierId',
+    component: 'JDictSelectTag',
+    componentProps:{
+        dictCode:""
+     },
+  },
+  {
+    label: '考评期间',
+    field: 'evaluationPeriod',
+    component: 'Input',
+  },
+  {
+    label: '考评等级',
+    field: 'evaluationLevel',
+    component: 'JDictSelectTag',
+    componentProps:{
+        dictCode:""
+     },
+  },
+  {
+    label: '备注',
+    field: 'notes',
+    component: 'Input',
+  },
+  {
+    label: '提交(1-是 ,0-否)',
+    field: 'submit',
+    component: 'JDictSelectTag',
+    componentProps:{
+        dictCode:""
+     },
+  },
+	// TODO 主键隐藏字段,目前写死为ID
+	{
+	  label: '',
+	  field: 'id',
+	  component: 'Input',
+	  show: false
+	},
+];
+//子表单数据
+//子表表格配置
+export const cuspSupplierEvaluationScoreColumns: JVxeColumn[] = [
+    {
+      title: '状态(1-启用,0-停用)',
+      key: 'status',
+      type: JVxeTypes.inputNumber,
+      width:"200px",
+      placeholder: '请输入${title}',
+      defaultValue:'',
+    },
+    {
+      title: '主表主键(供应商档案)',
+      key: 'headId',
+      type: JVxeTypes.inputNumber,
+      width:"200px",
+      placeholder: '请输入${title}',
+      defaultValue:'',
+    },
+    {
+      title: '价格得分',
+      key: 'priceScore',
+      type: JVxeTypes.inputNumber,
+      width:"200px",
+      placeholder: '请输入${title}',
+      defaultValue:'',
+    },
+    {
+      title: '质量得分',
+      key: 'qualityScore',
+      type: JVxeTypes.inputNumber,
+      width:"200px",
+      placeholder: '请输入${title}',
+      defaultValue:'',
+    },
+    {
+      title: '交期得分',
+      key: 'deliveryTimeScore',
+      type: JVxeTypes.inputNumber,
+      width:"200px",
+      placeholder: '请输入${title}',
+      defaultValue:'',
+    },
+    {
+      title: '服务得分',
+      key: 'serviceScore',
+      type: JVxeTypes.inputNumber,
+      width:"200px",
+      placeholder: '请输入${title}',
+      defaultValue:'',
+    },
+    {
+      title: '总计得分',
+      key: 'totalScore',
+      type: JVxeTypes.inputNumber,
+      width:"200px",
+      placeholder: '请输入${title}',
+      defaultValue:'',
+    },
+    {
+      title: '价格自动取数',
+      key: 'priceAuto',
+      type: JVxeTypes.input,
+      width:"200px",
+      placeholder: '请输入${title}',
+      defaultValue:'',
+    },
+    {
+      title: '质量自动取数',
+      key: 'qualityAuto',
+      type: JVxeTypes.input,
+      width:"200px",
+      placeholder: '请输入${title}',
+      defaultValue:'',
+    },
+    {
+      title: '交期自动取数',
+      key: 'deliveryTimeAuto',
+      type: JVxeTypes.input,
+      width:"200px",
+      placeholder: '请输入${title}',
+      defaultValue:'',
+    },
+    {
+      title: '服务自动取数',
+      key: 'serviceAuto',
+      type: JVxeTypes.input,
+      width:"200px",
+      placeholder: '请输入${title}',
+      defaultValue:'',
+    },
+  ]
+
+
+// 高级查询数据
+export const superQuerySchema = {
+  status: {title: '状态(1-启用,0-停用)',order: 0,view: 'number', type: 'number',},
+  billDate: {title: '单据日期',order: 2,view: 'datetime', type: 'string',},
+  billCode: {title: '考评单号',order: 3,view: 'text', type: 'string',},
+  supplierId: {title: '供应商',order: 4,view: 'number', type: 'number',dictCode: '',},
+  evaluationPeriod: {title: '考评期间',order: 5,view: 'text', type: 'string',},
+  evaluationLevel: {title: '考评等级',order: 6,view: 'list', type: 'string',dictCode: '',},
+  notes: {title: '备注',order: 7,view: 'text', type: 'string',},
+  submit: {title: '提交(1-是 ,0-否)',order: 8,view: 'number', type: 'number',dictCode: '',},
+  //子表高级查询
+  cuspSupplierEvaluationScore: {
+    title: '供应商考评-得分',
+    view: 'table',
+    fields: {
+        status: {title: '状态(1-启用,0-停用)',order: 0,view: 'number', type: 'number',},
+        headId: {title: '主表主键(供应商档案)',order: 2,view: 'number', type: 'number',},
+        priceScore: {title: '价格得分',order: 3,view: 'number', type: 'number',},
+        qualityScore: {title: '质量得分',order: 4,view: 'number', type: 'number',},
+        deliveryTimeScore: {title: '交期得分',order: 5,view: 'number', type: 'number',},
+        serviceScore: {title: '服务得分',order: 6,view: 'number', type: 'number',},
+        totalScore: {title: '总计得分',order: 7,view: 'number', type: 'number',},
+        priceAuto: {title: '价格自动取数',order: 8,view: 'text', type: 'string',},
+        qualityAuto: {title: '质量自动取数',order: 9,view: 'text', type: 'string',},
+        deliveryTimeAuto: {title: '交期自动取数',order: 10,view: 'text', type: 'string',},
+        serviceAuto: {title: '服务自动取数',order: 11,view: 'text', type: 'string',},
+    }
+  },
+};
+
+/**
+* 流程表单调用这个方法获取formSchema
+* @param param
+*/
+export function getBpmFormSchema(_formData): FormSchema[]{
+// 默认和原始表单保持一致 如果流程中配置了权限数据,这里需要单独处理formSchema
+  return formSchema;
+}

+ 193 - 0
src/views/cuspCode/SupplierEvaluation/CuspSupplierEvaluationList.vue

@@ -0,0 +1,193 @@
+<template>
+  <div>
+    <!--引用表格-->
+   <BasicTable @register="registerTable" :rowSelection="rowSelection">
+     <!--插槽:table标题-->
+      <template #tableTitle>
+          <a-button type="primary" v-auth="'cuspCode:cusp_supplier_evaluation:add'"  @click="handleAdd" preIcon="ant-design:plus-outlined"> 新增</a-button>
+          <a-button  type="primary" v-auth="'cuspCode:cusp_supplier_evaluation:exportXls'"  preIcon="ant-design:export-outlined" @click="onExportXls"> 导出</a-button>
+          <j-upload-button  type="primary" v-auth="'cuspCode:cusp_supplier_evaluation:importExcel'"  preIcon="ant-design:import-outlined" @click="onImportXls">导入</j-upload-button>
+          <a-dropdown v-if="selectedRowKeys.length > 0">
+              <template #overlay>
+                <a-menu>
+                  <a-menu-item key="1" @click="batchHandleDelete">
+                    <Icon icon="ant-design:delete-outlined"></Icon>
+                    删除
+                  </a-menu-item>
+                </a-menu>
+              </template>
+              <a-button v-auth="'cuspCode:cusp_supplier_evaluation:deleteBatch'">批量操作
+                <Icon icon="mdi:chevron-down"></Icon>
+              </a-button>
+        </a-dropdown>
+        <!-- 高级查询 -->
+        <super-query :config="superQueryConfig" @search="handleSuperQuery" />
+      </template>
+       <!--操作栏-->
+      <template #action="{ record }">
+        <TableAction :actions="getTableAction(record)" :dropDownActions="getDropDownAction(record)"/>
+      </template>
+      <!--字段回显插槽-->
+      <template v-slot:bodyCell="{ column, record, index, text }">
+      </template>
+    </BasicTable>
+    <!-- 表单区域 -->
+    <CuspSupplierEvaluationModal @register="registerModal" @success="handleSuccess"></CuspSupplierEvaluationModal>
+  </div>
+</template>
+
+<script lang="ts" name="cuspCode-cuspSupplierEvaluation" setup>
+  import {ref, reactive, computed, unref} from 'vue';
+  import {BasicTable, useTable, TableAction} from '/@/components/Table';
+  import { useListPage } from '/@/hooks/system/useListPage'
+  import {useModal} from '/@/components/Modal';
+  import CuspSupplierEvaluationModal from './components/CuspSupplierEvaluationModal.vue'
+  import {columns, searchFormSchema, superQuerySchema} from './CuspSupplierEvaluation.data';
+  import {list, deleteOne, batchDelete, getImportUrl,getExportUrl} from './CuspSupplierEvaluation.api';
+  import {downloadFile} from '/@/utils/common/renderUtils';
+  import { useUserStore } from '/@/store/modules/user';
+  const queryParam = reactive<any>({});
+  const checkedKeys = ref<Array<string | number>>([]);
+  const userStore = useUserStore();
+  //注册model
+  const [registerModal, {openModal}] = useModal();
+   //注册table数据
+  const { prefixCls,tableContext,onExportXls,onImportXls } = useListPage({
+      tableProps:{
+           title: '供应商考评',
+           api: list,
+           columns,
+           canResize:false,
+           formConfig: {
+                //labelWidth: 120,
+                schemas: searchFormSchema,
+                autoSubmitOnEnter:true,
+                showAdvancedButton:true,
+                fieldMapToNumber: [
+                ],
+                fieldMapToTime: [
+                   ['billDate', ['billDate_begin', 'billDate_end'], 'YYYY-MM-DD HH:mm:ss'],
+                ],
+            },
+           actionColumn: {
+               width: 120,
+               fixed:'right'
+           },
+           beforeFetch: (params) => {
+             return Object.assign(params, queryParam);
+           },
+        },
+        exportConfig: {
+            name:"供应商考评",
+            url: getExportUrl,
+            params: queryParam,
+        },
+        importConfig: {
+            url: getImportUrl,
+            success: handleSuccess
+        },
+    })
+
+  const [registerTable, {reload},{ rowSelection, selectedRowKeys }] = tableContext
+
+  // 高级查询配置
+  const superQueryConfig = reactive(superQuerySchema);
+
+  /**
+   * 高级查询事件
+   */
+  function handleSuperQuery(params) {
+    Object.keys(params).map((k) => {
+      queryParam[k] = params[k];
+    });
+    reload();
+  }
+
+   /**
+    * 新增事件
+    */
+  function handleAdd() {
+     openModal(true, {
+       isUpdate: false,
+       showFooter: true,
+     });
+  }
+   /**
+    * 编辑事件
+    */
+  function handleEdit(record: Recordable) {
+     openModal(true, {
+       record,
+       isUpdate: true,
+       showFooter: true,
+     });
+   }
+   /**
+    * 详情
+   */
+  function handleDetail(record: Recordable) {
+     openModal(true, {
+       record,
+       isUpdate: true,
+       showFooter: false,
+     });
+   }
+   /**
+    * 删除事件
+    */
+  async function handleDelete(record) {
+     await deleteOne({id: record.id}, handleSuccess);
+   }
+   /**
+    * 批量删除事件
+    */
+  async function batchHandleDelete() {
+     await batchDelete({ids: selectedRowKeys.value},handleSuccess);
+   }
+   /**
+    * 成功回调
+    */
+  function handleSuccess() {
+      (selectedRowKeys.value = []) && reload();
+   }
+   /**
+      * 操作栏
+      */
+  function getTableAction(record){
+       return [
+         {
+           label: '编辑',
+           onClick: handleEdit.bind(null, record),
+           auth: 'cuspCode:cusp_supplier_evaluation:edit'
+         }
+       ]
+   }
+
+
+  /**
+   * 下拉操作栏
+   */
+  function getDropDownAction(record){
+    return [
+      {
+        label: '详情',
+        onClick: handleDetail.bind(null, record),
+      }, {
+        label: '删除',
+        popConfirm: {
+          title: '是否确认删除',
+          confirm: handleDelete.bind(null, record),
+          placement: 'topLeft'
+        },
+        auth: 'cuspCode:cusp_supplier_evaluation:delete'
+      }
+    ]
+  }
+
+</script>
+
+<style lang="less" scoped>
+  :deep(.ant-picker),:deep(.ant-input-number){
+    width: 100%;
+  }
+</style>

+ 118 - 0
src/views/cuspCode/SupplierEvaluation/components/CuspSupplierEvaluationForm.vue

@@ -0,0 +1,118 @@
+<template>
+  <div>
+    <BasicForm @register="registerForm" ref="formRef"/>
+    <!-- 子表单区域 -->
+    <a-tabs v-model:activeKey="activeKey" animated  @change="handleChangeTabs">
+      <a-tab-pane tab="供应商考评-得分" key="cuspSupplierEvaluationScore" :forceRender="true">
+        <JVxeTable
+          keep-source
+          resizable
+          ref="cuspSupplierEvaluationScore"
+          v-if="cuspSupplierEvaluationScoreTable.show"
+          :loading="cuspSupplierEvaluationScoreTable.loading"
+          :columns="cuspSupplierEvaluationScoreTable.columns"
+          :dataSource="cuspSupplierEvaluationScoreTable.dataSource"
+          :height="340"
+          :rowNumber="true"
+          :rowSelection="true"
+          :disabled="formDisabled"
+          :toolbar="true"
+        />
+      </a-tab-pane>
+    </a-tabs>
+
+    <div style="width: 100%;text-align: center" v-if="!formDisabled">
+      <a-button @click="handleSubmit" pre-icon="ant-design:check" type="primary">提 交</a-button>
+    </div>
+  </div>
+</template>
+
+<script lang="ts">
+
+  import {BasicForm, useForm} from '/@/components/Form/index';
+  import { computed, defineComponent, reactive, ref, unref } from 'vue';
+  import {defHttp} from '/@/utils/http/axios';
+  import { propTypes } from '/@/utils/propTypes';
+  import { useJvxeMethod } from '/@/hooks/system/useJvxeMethods';
+  import { VALIDATE_FAILED } from '/@/utils/common/vxeUtils';
+  import {getBpmFormSchema,cuspSupplierEvaluationScoreColumns} from '../CuspSupplierEvaluation.data';
+  import {saveOrUpdate,cuspSupplierEvaluationScoreList} from '../CuspSupplierEvaluation.api';
+
+  export default defineComponent({
+    name: "CuspSupplierEvaluationForm",
+    components:{
+      BasicForm,
+    },
+    props:{
+      formData: propTypes.object.def({}),
+      formBpm: propTypes.bool.def(true),
+    },
+    setup(props){
+      const [registerForm, { setFieldsValue, setProps }] = useForm({
+        labelWidth: 150,
+        schemas: getBpmFormSchema(props.formData),
+        showActionButtonGroup: false,
+        baseColProps: {span: 8}
+      });
+
+      const formDisabled = computed(()=>{
+        if(props.formData.disabled === false){
+          return false;
+        }
+        return true;
+      });
+
+      const refKeys = ref(['cuspSupplierEvaluationScore', ]);
+      const activeKey = ref('cuspSupplierEvaluationScore');
+      const cuspSupplierEvaluationScore = ref();
+      const tableRefs = {cuspSupplierEvaluationScore, };
+      const cuspSupplierEvaluationScoreTable = reactive({
+        loading: false,
+        dataSource: [],
+        columns:cuspSupplierEvaluationScoreColumns,
+        show: false
+      })
+
+      const [handleChangeTabs,handleSubmit,requestSubTableData,formRef] = useJvxeMethod(requestAddOrEdit,classifyIntoFormData,tableRefs,activeKey,refKeys,validateSubForm);
+
+      function classifyIntoFormData(allValues) {
+        let main = Object.assign({}, allValues.formValue)
+        return {
+          ...main, // 展开
+          cuspSupplierEvaluationScoreList: allValues.tablesValue[0].tableData,
+        }
+      }
+
+      //表单提交事件
+      async function requestAddOrEdit(values) {
+        await saveOrUpdate(values, true);
+      }
+
+      const queryByIdUrl = '/cuspCode/cuspSupplierEvaluation/queryById';
+      async function initFormData(){
+        let params = {id: props.formData.dataId};
+        const data = await defHttp.get({url: queryByIdUrl, params});
+        //设置表单的值
+        await setFieldsValue({...data});
+        requestSubTableData(cuspSupplierEvaluationScoreList, {id: data.id}, cuspSupplierEvaluationScoreTable, ()=>{
+          cuspSupplierEvaluationScoreTable.show = true;
+        });
+        //默认是禁用
+        await setProps({disabled: formDisabled.value})
+      }
+
+      initFormData();
+
+      return {
+        registerForm,
+        formDisabled,
+        formRef,
+        handleSubmit,
+        activeKey,
+        handleChangeTabs,
+        cuspSupplierEvaluationScore,
+        cuspSupplierEvaluationScoreTable,
+      }
+    }
+  });
+</script>

+ 113 - 0
src/views/cuspCode/SupplierEvaluation/components/CuspSupplierEvaluationModal.vue

@@ -0,0 +1,113 @@
+<template>
+  <BasicModal v-bind="$attrs" @register="registerModal" destroyOnClose :title="title" :width="1024" @ok="handleSubmit">
+    <BasicForm @register="registerForm" ref="formRef" name="CuspSupplierEvaluationForm"/>
+    <!-- 子表单区域 -->
+    <a-tabs v-model:activeKey="activeKey" animated @change="handleChangeTabs">
+      <a-tab-pane tab="供应商考评-得分" key="cuspSupplierEvaluationScore" :forceRender="true">
+        <JVxeTable
+          keep-source
+          resizable
+          ref="cuspSupplierEvaluationScore"
+          :loading="cuspSupplierEvaluationScoreTable.loading"
+          :columns="cuspSupplierEvaluationScoreTable.columns"
+          :dataSource="cuspSupplierEvaluationScoreTable.dataSource"
+          :height="340"
+          :rowNumber="true"
+          :rowSelection="true"
+          :disabled="formDisabled"
+          :toolbar="true"
+          />
+      </a-tab-pane>
+    </a-tabs>
+  </BasicModal>
+</template>
+
+<script lang="ts" setup>
+    import {ref, computed, unref,reactive} from 'vue';
+    import {BasicModal, useModalInner} from '/@/components/Modal';
+    import {BasicForm, useForm} from '/@/components/Form/index';
+    import { JVxeTable } from '/@/components/jeecg/JVxeTable'
+    import { useJvxeMethod } from '/@/hooks/system/useJvxeMethods.ts'
+    import {formSchema,cuspSupplierEvaluationScoreColumns} from '../CuspSupplierEvaluation.data';
+    import {saveOrUpdate,cuspSupplierEvaluationScoreList} from '../CuspSupplierEvaluation.api';
+    import { VALIDATE_FAILED } from '/@/utils/common/vxeUtils'
+    // Emits声明
+    const emit = defineEmits(['register','success']);
+    const isUpdate = ref(true);
+    const formDisabled = ref(false);
+    const refKeys = ref(['cuspSupplierEvaluationScore', ]);
+    const activeKey = ref('cuspSupplierEvaluationScore');
+    const cuspSupplierEvaluationScore = ref();
+    const tableRefs = {cuspSupplierEvaluationScore, };
+    const cuspSupplierEvaluationScoreTable = reactive({
+          loading: false,
+          dataSource: [],
+          columns:cuspSupplierEvaluationScoreColumns
+    })
+    //表单配置
+    const [registerForm, {setProps,resetFields, setFieldsValue, validate}] = useForm({
+        schemas: formSchema,
+        showActionButtonGroup: false,
+        baseColProps: {span: 8}
+    });
+     //表单赋值
+    const [registerModal, {setModalProps, closeModal}] = useModalInner(async (data) => {
+        //重置表单
+        await reset();
+        setModalProps({confirmLoading: false,showCancelBtn:data?.showFooter,showOkBtn:data?.showFooter});
+        isUpdate.value = !!data?.isUpdate;
+        formDisabled.value = !data?.showFooter;
+        if (unref(isUpdate)) {
+            //表单赋值
+            await setFieldsValue({
+                ...data.record,
+            });
+             requestSubTableData(cuspSupplierEvaluationScoreList, {id:data?.record?.id}, cuspSupplierEvaluationScoreTable)
+        }
+        // 隐藏底部时禁用整个表单
+       setProps({ disabled: !data?.showFooter })
+    });
+    //方法配置
+    const [handleChangeTabs,handleSubmit,requestSubTableData,formRef] = useJvxeMethod(requestAddOrEdit,classifyIntoFormData,tableRefs,activeKey,refKeys);
+
+    //设置标题
+    const title = computed(() => (!unref(isUpdate) ? '新增' : !unref(formDisabled) ? '编辑' : '详情'));
+
+    async function reset(){
+      await resetFields();
+      activeKey.value = 'cuspSupplierEvaluationScore';
+      cuspSupplierEvaluationScoreTable.dataSource = [];
+    }
+    function classifyIntoFormData(allValues) {
+         let main = Object.assign({}, allValues.formValue)
+         return {
+           ...main, // 展开
+           cuspSupplierEvaluationScoreList: allValues.tablesValue[0].tableData,
+         }
+       }
+    //表单提交事件
+    async function requestAddOrEdit(values) {
+        try {
+            setModalProps({confirmLoading: true});
+            //提交表单
+            await saveOrUpdate(values, isUpdate.value);
+            //关闭弹窗
+            closeModal();
+            //刷新列表
+            emit('success');
+        } finally {
+            setModalProps({confirmLoading: false});
+        }
+    }
+</script>
+
+<style lang="less" scoped>
+	/** 时间和数字输入框样式 */
+  :deep(.ant-input-number) {
+    width: 100%;
+  }
+
+  :deep(.ant-calendar-picker) {
+    width: 100%;
+  }
+</style>

+ 77 - 0
src/views/cuspCode/SupplierProfile/CuspSupplierProfile.api.ts

@@ -0,0 +1,77 @@
+import {defHttp} from '/@/utils/http/axios';
+import { useMessage } from "/@/hooks/web/useMessage";
+
+const { createConfirm } = useMessage();
+
+enum Api {
+  list = '/cuspCode/cuspSupplierProfile/list',
+  save='/cuspCode/cuspSupplierProfile/add',
+  edit='/cuspCode/cuspSupplierProfile/edit',
+  deleteOne = '/cuspCode/cuspSupplierProfile/delete',
+  deleteBatch = '/cuspCode/cuspSupplierProfile/deleteBatch',
+  importExcel = '/cuspCode/cuspSupplierProfile/importExcel',
+  exportXls = '/cuspCode/cuspSupplierProfile/exportXls',
+  cuspSupplierProfileManList = '/cuspCode/cuspSupplierProfile/queryCuspSupplierProfileManByMainId',
+  cuspSupplierProfileQualificationList = '/cuspCode/cuspSupplierProfile/queryCuspSupplierProfileQualificationByMainId',
+}
+/**
+ * 导出api
+ * @param params
+ */
+export const getExportUrl = Api.exportXls;
+
+/**
+ * 导入api
+ */
+export const getImportUrl = Api.importExcel;
+/**
+ * 查询子表数据
+ * @param params
+ */
+export const cuspSupplierProfileManList = Api.cuspSupplierProfileManList;
+/**
+ * 查询子表数据
+ * @param params
+ */
+export const cuspSupplierProfileQualificationList = Api.cuspSupplierProfileQualificationList;
+/**
+ * 列表接口
+ * @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});
+}

+ 581 - 0
src/views/cuspCode/SupplierProfile/CuspSupplierProfile.data.ts

@@ -0,0 +1,581 @@
+import {BasicColumn} from '/@/components/Table';
+import {FormSchema} from '/@/components/Table';
+import { rules} from '/@/utils/helper/validator';
+import { render } from '/@/utils/common/renderUtils';
+import {JVxeTypes,JVxeColumn} from '/@/components/jeecg/JVxeTable/types'
+import { getWeekMonthQuarterYear } from '/@/utils';
+//列表数据
+export const columns: BasicColumn[] = [
+   {
+    title: '状态(1-启用,0-停用)',
+    align:"center",
+    dataIndex: 'status_dictText'
+   },
+   {
+    title: '编码',
+    align:"center",
+    dataIndex: 'code'
+   },
+   {
+    title: '名称',
+    align:"center",
+    dataIndex: 'name'
+   },
+   {
+    title: '简称',
+    align:"center",
+    dataIndex: 'abbreviation'
+   },
+   {
+    title: '曾用名',
+    align:"center",
+    dataIndex: 'nameUsedBefore'
+   },
+   {
+    title: '税号',
+    align:"center",
+    dataIndex: 'dutyParagraph'
+   },
+   {
+    title: '法人',
+    align:"center",
+    dataIndex: 'legalPerson'
+   },
+   {
+    title: '联系人',
+    align:"center",
+    dataIndex: 'contacts'
+   },
+   {
+    title: '联系电话',
+    align:"center",
+    dataIndex: 'phone'
+   },
+   {
+    title: '邮箱',
+    align:"center",
+    dataIndex: 'email'
+   },
+   {
+    title: '注册地址',
+    align:"center",
+    dataIndex: 'registerAddress'
+   },
+   {
+    title: '公司地址',
+    align:"center",
+    dataIndex: 'address'
+   },
+   {
+    title: '供应商性质',
+    align:"center",
+    dataIndex: 'supplierNature_dictText'
+   },
+   {
+    title: '国家',
+    align:"center",
+    dataIndex: 'country_dictText'
+   },
+   {
+    title: '币种',
+    align:"center",
+    dataIndex: 'currency'
+   },
+   {
+    title: '国外供应商',
+    align:"center",
+    dataIndex: 'abroadSupplier'
+   },
+   {
+    title: '原厂',
+    align:"center",
+    dataIndex: 'originalFactory_dictText'
+   },
+   {
+    title: '开户行',
+    align:"center",
+    dataIndex: 'openingBank'
+   },
+   {
+    title: '付款条件',
+    align:"center",
+    dataIndex: 'paymentTerms_dictText'
+   },
+   {
+    title: '银行代码',
+    align:"center",
+    dataIndex: 'swiftCode'
+   },
+   {
+    title: '银行帐号',
+    align:"center",
+    dataIndex: 'bankAccount'
+   },
+   {
+    title: '营业执照',
+    align:"center",
+    dataIndex: 'businessLicense'
+   },
+   {
+    title: '其他文件',
+    align:"center",
+    dataIndex: 'otherFiles'
+   },
+   {
+    title: '备注',
+    align:"center",
+    dataIndex: 'notes'
+   },
+   {
+    title: '临时供应商',
+    align:"center",
+    dataIndex: 'temporarySupplier_dictText'
+   },
+   {
+    title: '供应商等级',
+    align:"center",
+    dataIndex: 'evaluationLevel_dictText'
+   },
+];
+//查询数据
+export const searchFormSchema: FormSchema[] = [
+	{
+      label: "状态(1-启用,0-停用)",
+      field: "status",
+      component: 'JSelectMultiple',
+      componentProps:{
+      },
+      //colProps: {span: 6},
+ 	},
+	{
+      label: "编码",
+      field: "code",
+      component: 'Input',
+      //colProps: {span: 6},
+ 	},
+	{
+      label: "名称",
+      field: "name",
+      component: 'Input',
+      //colProps: {span: 6},
+ 	},
+	{
+      label: "简称",
+      field: "abbreviation",
+      component: 'Input',
+      //colProps: {span: 6},
+ 	},
+	{
+      label: "税号",
+      field: "dutyParagraph",
+      component: 'Input',
+      //colProps: {span: 6},
+ 	},
+	{
+      label: "联系人",
+      field: "contacts",
+      component: 'Input',
+      //colProps: {span: 6},
+ 	},
+	{
+      label: "联系电话",
+      field: "phone",
+      component: 'Input',
+      //colProps: {span: 6},
+ 	},
+	{
+      label: "供应商性质",
+      field: "supplierNature",
+      component: 'JSelectMultiple',
+      componentProps:{
+      },
+      //colProps: {span: 6},
+ 	},
+	{
+      label: "国家",
+      field: "country",
+      component: 'JSelectMultiple',
+      componentProps:{
+      },
+      //colProps: {span: 6},
+ 	},
+	{
+      label: "原厂",
+      field: "originalFactory",
+      component: 'JSelectMultiple',
+      componentProps:{
+      },
+      //colProps: {span: 6},
+ 	},
+	{
+      label: "临时供应商",
+      field: "temporarySupplier",
+      component: 'JSelectMultiple',
+      componentProps:{
+      },
+      //colProps: {span: 6},
+ 	},
+	{
+      label: "供应商等级",
+      field: "evaluationLevel",
+      component: 'JSelectMultiple',
+      componentProps:{
+      },
+      //colProps: {span: 6},
+ 	},
+];
+//表单数据
+export const formSchema: FormSchema[] = [
+  {
+    label: '状态(1-启用,0-停用)',
+    field: 'status',
+    component: 'JDictSelectTag',
+    componentProps:{
+        dictCode:""
+     },
+  },
+  {
+    label: '编码',
+    field: 'code',
+    component: 'Input',
+  },
+  {
+    label: '名称',
+    field: 'name',
+    component: 'Input',
+  },
+  {
+    label: '简称',
+    field: 'abbreviation',
+    component: 'Input',
+  },
+  {
+    label: '曾用名',
+    field: 'nameUsedBefore',
+    component: 'Input',
+  },
+  {
+    label: '税号',
+    field: 'dutyParagraph',
+    component: 'Input',
+  },
+  {
+    label: '法人',
+    field: 'legalPerson',
+    component: 'Input',
+  },
+  {
+    label: '联系人',
+    field: 'contacts',
+    component: 'Input',
+  },
+  {
+    label: '联系电话',
+    field: 'phone',
+    component: 'Input',
+  },
+  {
+    label: '邮箱',
+    field: 'email',
+    component: 'Input',
+  },
+  {
+    label: '注册地址',
+    field: 'registerAddress',
+    component: 'Input',
+  },
+  {
+    label: '公司地址',
+    field: 'address',
+    component: 'Input',
+  },
+  {
+    label: '供应商性质',
+    field: 'supplierNature',
+    component: 'JDictSelectTag',
+    componentProps:{
+        dictCode:""
+     },
+  },
+  {
+    label: '国家',
+    field: 'country',
+    component: 'JDictSelectTag',
+    componentProps:{
+        dictCode:""
+     },
+  },
+  {
+    label: '币种',
+    field: 'currency',
+    component: 'Input',
+  },
+  {
+    label: '国外供应商',
+    field: 'abroadSupplier',
+    component: 'InputNumber',
+  },
+  {
+    label: '原厂',
+    field: 'originalFactory',
+    component: 'JDictSelectTag',
+    componentProps:{
+        dictCode:""
+     },
+  },
+  {
+    label: '开户行',
+    field: 'openingBank',
+    component: 'Input',
+  },
+  {
+    label: '付款条件',
+    field: 'paymentTerms',
+    component: 'JDictSelectTag',
+    componentProps:{
+        dictCode:""
+     },
+  },
+  {
+    label: '银行代码',
+    field: 'swiftCode',
+    component: 'Input',
+  },
+  {
+    label: '银行帐号',
+    field: 'bankAccount',
+    component: 'Input',
+  },
+  {
+    label: '营业执照',
+    field: 'businessLicense',
+    component: 'Input',
+  },
+  {
+    label: '其他文件',
+    field: 'otherFiles',
+    component: 'Input',
+  },
+  {
+    label: '备注',
+    field: 'notes',
+    component: 'Input',
+  },
+  {
+    label: '临时供应商',
+    field: 'temporarySupplier',
+    component: 'JDictSelectTag',
+    componentProps:{
+        dictCode:""
+     },
+  },
+  {
+    label: '供应商等级',
+    field: 'evaluationLevel',
+    component: 'JDictSelectTag',
+    componentProps:{
+        dictCode:""
+     },
+  },
+	// TODO 主键隐藏字段,目前写死为ID
+	{
+	  label: '',
+	  field: 'id',
+	  component: 'Input',
+	  show: false
+	},
+];
+//子表单数据
+//子表表格配置
+export const cuspSupplierProfileManColumns: JVxeColumn[] = [
+    {
+      title: '状态(1-启用,0-停用)',
+      key: 'status',
+      type: JVxeTypes.inputNumber,
+      width:"200px",
+      placeholder: '请输入${title}',
+      defaultValue:'',
+    },
+    {
+      title: '主表主键(供应商档案)',
+      key: 'headId',
+      type: JVxeTypes.input,
+      width:"200px",
+      placeholder: '请输入${title}',
+      defaultValue:'',
+    },
+    {
+      title: '编码',
+      key: 'code',
+      type: JVxeTypes.input,
+      width:"200px",
+      placeholder: '请输入${title}',
+      defaultValue:'',
+    },
+    {
+      title: '姓名',
+      key: 'name',
+      type: JVxeTypes.input,
+      width:"200px",
+      placeholder: '请输入${title}',
+      defaultValue:'',
+    },
+    {
+      title: '电话',
+      key: 'mobile',
+      type: JVxeTypes.input,
+      width:"200px",
+      placeholder: '请输入${title}',
+      defaultValue:'',
+    },
+    {
+      title: '邮箱',
+      key: 'email',
+      type: JVxeTypes.input,
+      width:"200px",
+      placeholder: '请输入${title}',
+      defaultValue:'',
+    },
+    {
+      title: '职位',
+      key: 'position',
+      type: JVxeTypes.input,
+      width:"200px",
+      placeholder: '请输入${title}',
+      defaultValue:'',
+    },
+  ]
+export const cuspSupplierProfileQualificationColumns: JVxeColumn[] = [
+    {
+      title: '状态(1-启用,0-停用)',
+      key: 'status',
+      type: JVxeTypes.inputNumber,
+      width:"200px",
+      placeholder: '请输入${title}',
+      defaultValue:'',
+    },
+    {
+      title: '主表主键(供应商档案)',
+      key: 'headId',
+      type: JVxeTypes.input,
+      width:"200px",
+      placeholder: '请输入${title}',
+      defaultValue:'',
+    },
+    {
+      title: '资质证书名称',
+      key: 'qualificationCertificateName',
+      type: JVxeTypes.input,
+      width:"200px",
+      placeholder: '请输入${title}',
+      defaultValue:'',
+    },
+    {
+      title: '资质证书编码',
+      key: 'qualificationCertificateCode',
+      type: JVxeTypes.input,
+      width:"200px",
+      placeholder: '请输入${title}',
+      defaultValue:'',
+    },
+    {
+      title: '有效期始',
+      key: 'validBegin',
+      type: JVxeTypes.datetime,
+      width:"200px",
+      placeholder: '请输入${title}',
+      defaultValue:'',
+    },
+    {
+      title: '有效期止',
+      key: 'validEnd',
+      type: JVxeTypes.datetime,
+      width:"200px",
+      placeholder: '请输入${title}',
+      defaultValue:'',
+    },
+    {
+      title: '资质证书附件',
+      key: 'qualificationCertificate',
+      type: JVxeTypes.input,
+      width:"200px",
+      placeholder: '请输入${title}',
+      defaultValue:'',
+    },
+    {
+      title: '临期提醒',
+      key: 'deadlineReminder',
+      type: JVxeTypes.inputNumber,
+      width:"200px",
+      placeholder: '请输入${title}',
+      defaultValue:'',
+    },
+  ]
+
+
+// 高级查询数据
+export const superQuerySchema = {
+  status: {title: '状态(1-启用,0-停用)',order: 0,view: 'number', type: 'number',dictCode: '',},
+  code: {title: '编码',order: 2,view: 'text', type: 'string',},
+  name: {title: '名称',order: 3,view: 'text', type: 'string',},
+  abbreviation: {title: '简称',order: 4,view: 'text', type: 'string',},
+  nameUsedBefore: {title: '曾用名',order: 5,view: 'text', type: 'string',},
+  dutyParagraph: {title: '税号',order: 6,view: 'text', type: 'string',},
+  legalPerson: {title: '法人',order: 7,view: 'text', type: 'string',},
+  contacts: {title: '联系人',order: 8,view: 'text', type: 'string',},
+  phone: {title: '联系电话',order: 9,view: 'text', type: 'string',},
+  email: {title: '邮箱',order: 10,view: 'text', type: 'string',},
+  registerAddress: {title: '注册地址',order: 11,view: 'text', type: 'string',},
+  address: {title: '公司地址',order: 12,view: 'text', type: 'string',},
+  supplierNature: {title: '供应商性质',order: 13,view: 'list', type: 'string',dictCode: '',},
+  country: {title: '国家',order: 14,view: 'list', type: 'string',dictCode: '',},
+  currency: {title: '币种',order: 15,view: 'text', type: 'string',},
+  abroadSupplier: {title: '国外供应商',order: 16,view: 'number', type: 'number',},
+  originalFactory: {title: '原厂',order: 17,view: 'number', type: 'number',dictCode: '',},
+  openingBank: {title: '开户行',order: 18,view: 'text', type: 'string',},
+  paymentTerms: {title: '付款条件',order: 19,view: 'list', type: 'string',dictCode: '',},
+  swiftCode: {title: '银行代码',order: 20,view: 'text', type: 'string',},
+  bankAccount: {title: '银行帐号',order: 21,view: 'text', type: 'string',},
+  businessLicense: {title: '营业执照',order: 22,view: 'text', type: 'string',},
+  otherFiles: {title: '其他文件',order: 23,view: 'text', type: 'string',},
+  notes: {title: '备注',order: 24,view: 'text', type: 'string',},
+  temporarySupplier: {title: '临时供应商',order: 25,view: 'number', type: 'number',dictCode: '',},
+  evaluationLevel: {title: '供应商等级',order: 26,view: 'list', type: 'string',dictCode: '',},
+  //子表高级查询
+  cuspSupplierProfileMan: {
+    title: '供应商档案-联系人',
+    view: 'table',
+    fields: {
+        status: {title: '状态(1-启用,0-停用)',order: 0,view: 'number', type: 'number',},
+        headId: {title: '主表主键(供应商档案)',order: 2,view: 'text', type: 'string',},
+        code: {title: '编码',order: 3,view: 'text', type: 'string',},
+        name: {title: '姓名',order: 4,view: 'text', type: 'string',},
+        mobile: {title: '电话',order: 5,view: 'text', type: 'string',},
+        email: {title: '邮箱',order: 6,view: 'text', type: 'string',},
+        position: {title: '职位',order: 7,view: 'text', type: 'string',},
+    }
+  },
+  cuspSupplierProfileQualification: {
+    title: '供应商档案-资质信息',
+    view: 'table',
+    fields: {
+        status: {title: '状态(1-启用,0-停用)',order: 0,view: 'number', type: 'number',},
+        headId: {title: '主表主键(供应商档案)',order: 2,view: 'text', type: 'string',},
+        qualificationCertificateName: {title: '资质证书名称',order: 3,view: 'text', type: 'string',},
+        qualificationCertificateCode: {title: '资质证书编码',order: 4,view: 'text', type: 'string',},
+        validBegin: {title: '有效期始',order: 5,view: 'datetime', type: 'string',},
+        validEnd: {title: '有效期止',order: 6,view: 'datetime', type: 'string',},
+        qualificationCertificate: {title: '资质证书附件',order: 7,view: 'text', type: 'string',},
+        deadlineReminder: {title: '临期提醒',order: 8,view: 'number', type: 'number',},
+    }
+  },
+};
+
+/**
+* 流程表单调用这个方法获取formSchema
+* @param param
+*/
+export function getBpmFormSchema(_formData): FormSchema[]{
+// 默认和原始表单保持一致 如果流程中配置了权限数据,这里需要单独处理formSchema
+  return formSchema;
+}

+ 192 - 0
src/views/cuspCode/SupplierProfile/CuspSupplierProfileList.vue

@@ -0,0 +1,192 @@
+<template>
+  <div>
+    <!--引用表格-->
+   <BasicTable @register="registerTable" :rowSelection="rowSelection">
+     <!--插槽:table标题-->
+      <template #tableTitle>
+          <a-button type="primary" v-auth="'cuspCode:cusp_supplier_profile:add'"  @click="handleAdd" preIcon="ant-design:plus-outlined"> 新增</a-button>
+          <a-button  type="primary" v-auth="'cuspCode:cusp_supplier_profile:exportXls'"  preIcon="ant-design:export-outlined" @click="onExportXls"> 导出</a-button>
+          <j-upload-button  type="primary" v-auth="'cuspCode:cusp_supplier_profile:importExcel'"  preIcon="ant-design:import-outlined" @click="onImportXls">导入</j-upload-button>
+          <a-dropdown v-if="selectedRowKeys.length > 0">
+              <template #overlay>
+                <a-menu>
+                  <a-menu-item key="1" @click="batchHandleDelete">
+                    <Icon icon="ant-design:delete-outlined"></Icon>
+                    删除
+                  </a-menu-item>
+                </a-menu>
+              </template>
+              <a-button v-auth="'cuspCode:cusp_supplier_profile:deleteBatch'">批量操作
+                <Icon icon="mdi:chevron-down"></Icon>
+              </a-button>
+        </a-dropdown>
+        <!-- 高级查询 -->
+        <super-query :config="superQueryConfig" @search="handleSuperQuery" />
+      </template>
+       <!--操作栏-->
+      <template #action="{ record }">
+        <TableAction :actions="getTableAction(record)" :dropDownActions="getDropDownAction(record)"/>
+      </template>
+      <!--字段回显插槽-->
+      <template v-slot:bodyCell="{ column, record, index, text }">
+      </template>
+    </BasicTable>
+    <!-- 表单区域 -->
+    <CuspSupplierProfileModal @register="registerModal" @success="handleSuccess"></CuspSupplierProfileModal>
+  </div>
+</template>
+
+<script lang="ts" name="cuspCode-cuspSupplierProfile" setup>
+  import {ref, reactive, computed, unref} from 'vue';
+  import {BasicTable, useTable, TableAction} from '/@/components/Table';
+  import { useListPage } from '/@/hooks/system/useListPage'
+  import {useModal} from '/@/components/Modal';
+  import CuspSupplierProfileModal from './components/CuspSupplierProfileModal.vue'
+  import {columns, searchFormSchema, superQuerySchema} from './CuspSupplierProfile.data';
+  import {list, deleteOne, batchDelete, getImportUrl,getExportUrl} from './CuspSupplierProfile.api';
+  import {downloadFile} from '/@/utils/common/renderUtils';
+  import { useUserStore } from '/@/store/modules/user';
+  const queryParam = reactive<any>({});
+  const checkedKeys = ref<Array<string | number>>([]);
+  const userStore = useUserStore();
+  //注册model
+  const [registerModal, {openModal}] = useModal();
+   //注册table数据
+  const { prefixCls,tableContext,onExportXls,onImportXls } = useListPage({
+      tableProps:{
+           title: '供应商档案',
+           api: list,
+           columns,
+           canResize:false,
+           formConfig: {
+                //labelWidth: 120,
+                schemas: searchFormSchema,
+                autoSubmitOnEnter:true,
+                showAdvancedButton:true,
+                fieldMapToNumber: [
+                ],
+                fieldMapToTime: [
+                ],
+            },
+           actionColumn: {
+               width: 120,
+               fixed:'right'
+           },
+           beforeFetch: (params) => {
+             return Object.assign(params, queryParam);
+           },
+        },
+        exportConfig: {
+            name:"供应商档案",
+            url: getExportUrl,
+            params: queryParam,
+        },
+        importConfig: {
+            url: getImportUrl,
+            success: handleSuccess
+        },
+    })
+
+  const [registerTable, {reload},{ rowSelection, selectedRowKeys }] = tableContext
+
+  // 高级查询配置
+  const superQueryConfig = reactive(superQuerySchema);
+
+  /**
+   * 高级查询事件
+   */
+  function handleSuperQuery(params) {
+    Object.keys(params).map((k) => {
+      queryParam[k] = params[k];
+    });
+    reload();
+  }
+
+   /**
+    * 新增事件
+    */
+  function handleAdd() {
+     openModal(true, {
+       isUpdate: false,
+       showFooter: true,
+     });
+  }
+   /**
+    * 编辑事件
+    */
+  function handleEdit(record: Recordable) {
+     openModal(true, {
+       record,
+       isUpdate: true,
+       showFooter: true,
+     });
+   }
+   /**
+    * 详情
+   */
+  function handleDetail(record: Recordable) {
+     openModal(true, {
+       record,
+       isUpdate: true,
+       showFooter: false,
+     });
+   }
+   /**
+    * 删除事件
+    */
+  async function handleDelete(record) {
+     await deleteOne({id: record.id}, handleSuccess);
+   }
+   /**
+    * 批量删除事件
+    */
+  async function batchHandleDelete() {
+     await batchDelete({ids: selectedRowKeys.value},handleSuccess);
+   }
+   /**
+    * 成功回调
+    */
+  function handleSuccess() {
+      (selectedRowKeys.value = []) && reload();
+   }
+   /**
+      * 操作栏
+      */
+  function getTableAction(record){
+       return [
+         {
+           label: '编辑',
+           onClick: handleEdit.bind(null, record),
+           auth: 'cuspCode:cusp_supplier_profile:edit'
+         }
+       ]
+   }
+
+
+  /**
+   * 下拉操作栏
+   */
+  function getDropDownAction(record){
+    return [
+      {
+        label: '详情',
+        onClick: handleDetail.bind(null, record),
+      }, {
+        label: '删除',
+        popConfirm: {
+          title: '是否确认删除',
+          confirm: handleDelete.bind(null, record),
+          placement: 'topLeft'
+        },
+        auth: 'cuspCode:cusp_supplier_profile:delete'
+      }
+    ]
+  }
+
+</script>
+
+<style lang="less" scoped>
+  :deep(.ant-picker),:deep(.ant-input-number){
+    width: 100%;
+  }
+</style>

+ 147 - 0
src/views/cuspCode/SupplierProfile/components/CuspSupplierProfileForm.vue

@@ -0,0 +1,147 @@
+<template>
+  <div>
+    <BasicForm @register="registerForm" ref="formRef"/>
+    <!-- 子表单区域 -->
+    <a-tabs v-model:activeKey="activeKey" animated  @change="handleChangeTabs">
+      <a-tab-pane tab="供应商档案-联系人" key="cuspSupplierProfileMan" :forceRender="true">
+        <JVxeTable
+          keep-source
+          resizable
+          ref="cuspSupplierProfileMan"
+          v-if="cuspSupplierProfileManTable.show"
+          :loading="cuspSupplierProfileManTable.loading"
+          :columns="cuspSupplierProfileManTable.columns"
+          :dataSource="cuspSupplierProfileManTable.dataSource"
+          :height="340"
+          :rowNumber="true"
+          :rowSelection="true"
+          :disabled="formDisabled"
+          :toolbar="true"
+        />
+      </a-tab-pane>
+      <a-tab-pane tab="供应商档案-资质信息" key="cuspSupplierProfileQualification" :forceRender="true">
+        <JVxeTable
+          keep-source
+          resizable
+          ref="cuspSupplierProfileQualification"
+          v-if="cuspSupplierProfileQualificationTable.show"
+          :loading="cuspSupplierProfileQualificationTable.loading"
+          :columns="cuspSupplierProfileQualificationTable.columns"
+          :dataSource="cuspSupplierProfileQualificationTable.dataSource"
+          :height="340"
+          :rowNumber="true"
+          :rowSelection="true"
+          :disabled="formDisabled"
+          :toolbar="true"
+        />
+      </a-tab-pane>
+    </a-tabs>
+
+    <div style="width: 100%;text-align: center" v-if="!formDisabled">
+      <a-button @click="handleSubmit" pre-icon="ant-design:check" type="primary">提 交</a-button>
+    </div>
+  </div>
+</template>
+
+<script lang="ts">
+
+  import {BasicForm, useForm} from '/@/components/Form/index';
+  import { computed, defineComponent, reactive, ref, unref } from 'vue';
+  import {defHttp} from '/@/utils/http/axios';
+  import { propTypes } from '/@/utils/propTypes';
+  import { useJvxeMethod } from '/@/hooks/system/useJvxeMethods';
+  import { VALIDATE_FAILED } from '/@/utils/common/vxeUtils';
+  import {getBpmFormSchema,cuspSupplierProfileManColumns,cuspSupplierProfileQualificationColumns} from '../CuspSupplierProfile.data';
+  import {saveOrUpdate,cuspSupplierProfileManList,cuspSupplierProfileQualificationList} from '../CuspSupplierProfile.api';
+
+  export default defineComponent({
+    name: "CuspSupplierProfileForm",
+    components:{
+      BasicForm,
+    },
+    props:{
+      formData: propTypes.object.def({}),
+      formBpm: propTypes.bool.def(true),
+    },
+    setup(props){
+      const [registerForm, { setFieldsValue, setProps }] = useForm({
+        labelWidth: 150,
+        schemas: getBpmFormSchema(props.formData),
+        showActionButtonGroup: false,
+        baseColProps: {span: 8}
+      });
+
+      const formDisabled = computed(()=>{
+        if(props.formData.disabled === false){
+          return false;
+        }
+        return true;
+      });
+
+      const refKeys = ref(['cuspSupplierProfileMan', 'cuspSupplierProfileQualification', ]);
+      const activeKey = ref('cuspSupplierProfileMan');
+      const cuspSupplierProfileMan = ref();
+      const cuspSupplierProfileQualification = ref();
+      const tableRefs = {cuspSupplierProfileMan, cuspSupplierProfileQualification, };
+      const cuspSupplierProfileManTable = reactive({
+        loading: false,
+        dataSource: [],
+        columns:cuspSupplierProfileManColumns,
+        show: false
+      })
+      const cuspSupplierProfileQualificationTable = reactive({
+        loading: false,
+        dataSource: [],
+        columns:cuspSupplierProfileQualificationColumns,
+        show: false
+      })
+
+      const [handleChangeTabs,handleSubmit,requestSubTableData,formRef] = useJvxeMethod(requestAddOrEdit,classifyIntoFormData,tableRefs,activeKey,refKeys,validateSubForm);
+
+      function classifyIntoFormData(allValues) {
+        let main = Object.assign({}, allValues.formValue)
+        return {
+          ...main, // 展开
+          cuspSupplierProfileManList: allValues.tablesValue[0].tableData,
+          cuspSupplierProfileQualificationList: allValues.tablesValue[1].tableData,
+        }
+      }
+
+      //表单提交事件
+      async function requestAddOrEdit(values) {
+        await saveOrUpdate(values, true);
+      }
+
+      const queryByIdUrl = '/cuspCode/cuspSupplierProfile/queryById';
+      async function initFormData(){
+        let params = {id: props.formData.dataId};
+        const data = await defHttp.get({url: queryByIdUrl, params});
+        //设置表单的值
+        await setFieldsValue({...data});
+        requestSubTableData(cuspSupplierProfileManList, {id: data.id}, cuspSupplierProfileManTable, ()=>{
+          cuspSupplierProfileManTable.show = true;
+        });
+        requestSubTableData(cuspSupplierProfileQualificationList, {id: data.id}, cuspSupplierProfileQualificationTable, ()=>{
+          cuspSupplierProfileQualificationTable.show = true;
+        });
+        //默认是禁用
+        await setProps({disabled: formDisabled.value})
+      }
+
+      initFormData();
+
+      return {
+        registerForm,
+        formDisabled,
+        formRef,
+        handleSubmit,
+        activeKey,
+        handleChangeTabs,
+        cuspSupplierProfileMan,
+        cuspSupplierProfileQualification,
+        cuspSupplierProfileManTable,
+        cuspSupplierProfileQualificationTable,
+      }
+    }
+  });
+</script>

+ 137 - 0
src/views/cuspCode/SupplierProfile/components/CuspSupplierProfileModal.vue

@@ -0,0 +1,137 @@
+<template>
+  <BasicModal v-bind="$attrs" @register="registerModal" destroyOnClose :title="title" :width="1024" @ok="handleSubmit">
+    <BasicForm @register="registerForm" ref="formRef" name="CuspSupplierProfileForm"/>
+    <!-- 子表单区域 -->
+    <a-tabs v-model:activeKey="activeKey" animated @change="handleChangeTabs">
+      <a-tab-pane tab="供应商档案-联系人" key="cuspSupplierProfileMan" :forceRender="true">
+        <JVxeTable
+          keep-source
+          resizable
+          ref="cuspSupplierProfileMan"
+          :loading="cuspSupplierProfileManTable.loading"
+          :columns="cuspSupplierProfileManTable.columns"
+          :dataSource="cuspSupplierProfileManTable.dataSource"
+          :height="340"
+          :rowNumber="true"
+          :rowSelection="true"
+          :disabled="formDisabled"
+          :toolbar="true"
+          />
+      </a-tab-pane>
+      <a-tab-pane tab="供应商档案-资质信息" key="cuspSupplierProfileQualification" :forceRender="true">
+        <JVxeTable
+          keep-source
+          resizable
+          ref="cuspSupplierProfileQualification"
+          :loading="cuspSupplierProfileQualificationTable.loading"
+          :columns="cuspSupplierProfileQualificationTable.columns"
+          :dataSource="cuspSupplierProfileQualificationTable.dataSource"
+          :height="340"
+          :rowNumber="true"
+          :rowSelection="true"
+          :disabled="formDisabled"
+          :toolbar="true"
+          />
+      </a-tab-pane>
+    </a-tabs>
+  </BasicModal>
+</template>
+
+<script lang="ts" setup>
+    import {ref, computed, unref,reactive} from 'vue';
+    import {BasicModal, useModalInner} from '/@/components/Modal';
+    import {BasicForm, useForm} from '/@/components/Form/index';
+    import { JVxeTable } from '/@/components/jeecg/JVxeTable'
+    import { useJvxeMethod } from '/@/hooks/system/useJvxeMethods.ts'
+    import {formSchema,cuspSupplierProfileManColumns,cuspSupplierProfileQualificationColumns} from '../CuspSupplierProfile.data';
+    import {saveOrUpdate,cuspSupplierProfileManList,cuspSupplierProfileQualificationList} from '../CuspSupplierProfile.api';
+    import { VALIDATE_FAILED } from '/@/utils/common/vxeUtils'
+    // Emits声明
+    const emit = defineEmits(['register','success']);
+    const isUpdate = ref(true);
+    const formDisabled = ref(false);
+    const refKeys = ref(['cuspSupplierProfileMan', 'cuspSupplierProfileQualification', ]);
+    const activeKey = ref('cuspSupplierProfileMan');
+    const cuspSupplierProfileMan = ref();
+    const cuspSupplierProfileQualification = ref();
+    const tableRefs = {cuspSupplierProfileMan, cuspSupplierProfileQualification, };
+    const cuspSupplierProfileManTable = reactive({
+          loading: false,
+          dataSource: [],
+          columns:cuspSupplierProfileManColumns
+    })
+    const cuspSupplierProfileQualificationTable = reactive({
+          loading: false,
+          dataSource: [],
+          columns:cuspSupplierProfileQualificationColumns
+    })
+    //表单配置
+    const [registerForm, {setProps,resetFields, setFieldsValue, validate}] = useForm({
+        schemas: formSchema,
+        showActionButtonGroup: false,
+        baseColProps: {span: 8}
+    });
+     //表单赋值
+    const [registerModal, {setModalProps, closeModal}] = useModalInner(async (data) => {
+        //重置表单
+        await reset();
+        setModalProps({confirmLoading: false,showCancelBtn:data?.showFooter,showOkBtn:data?.showFooter});
+        isUpdate.value = !!data?.isUpdate;
+        formDisabled.value = !data?.showFooter;
+        if (unref(isUpdate)) {
+            //表单赋值
+            await setFieldsValue({
+                ...data.record,
+            });
+             requestSubTableData(cuspSupplierProfileManList, {id:data?.record?.id}, cuspSupplierProfileManTable)
+             requestSubTableData(cuspSupplierProfileQualificationList, {id:data?.record?.id}, cuspSupplierProfileQualificationTable)
+        }
+        // 隐藏底部时禁用整个表单
+       setProps({ disabled: !data?.showFooter })
+    });
+    //方法配置
+    const [handleChangeTabs,handleSubmit,requestSubTableData,formRef] = useJvxeMethod(requestAddOrEdit,classifyIntoFormData,tableRefs,activeKey,refKeys);
+
+    //设置标题
+    const title = computed(() => (!unref(isUpdate) ? '新增' : !unref(formDisabled) ? '编辑' : '详情'));
+
+    async function reset(){
+      await resetFields();
+      activeKey.value = 'cuspSupplierProfileMan';
+      cuspSupplierProfileManTable.dataSource = [];
+      cuspSupplierProfileQualificationTable.dataSource = [];
+    }
+    function classifyIntoFormData(allValues) {
+         let main = Object.assign({}, allValues.formValue)
+         return {
+           ...main, // 展开
+           cuspSupplierProfileManList: allValues.tablesValue[0].tableData,
+           cuspSupplierProfileQualificationList: allValues.tablesValue[1].tableData,
+         }
+       }
+    //表单提交事件
+    async function requestAddOrEdit(values) {
+        try {
+            setModalProps({confirmLoading: true});
+            //提交表单
+            await saveOrUpdate(values, isUpdate.value);
+            //关闭弹窗
+            closeModal();
+            //刷新列表
+            emit('success');
+        } finally {
+            setModalProps({confirmLoading: false});
+        }
+    }
+</script>
+
+<style lang="less" scoped>
+	/** 时间和数字输入框样式 */
+  :deep(.ant-input-number) {
+    width: 100%;
+  }
+
+  :deep(.ant-calendar-picker) {
+    width: 100%;
+  }
+</style>