Browse Source

供应商档案-转正式申请/供货目录

jingbb 1 ngày trước cách đây
mục cha
commit
d6733810f4

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

@@ -13,6 +13,8 @@ enum Api {
   exportXls = '/cuspCode/cuspSupplierProfile/exportXls',
   cuspSupplierProfileManList = '/cuspCode/cuspSupplierProfile/queryCuspSupplierProfileManByMainId',
   cuspSupplierProfileQualificationList = '/cuspCode/cuspSupplierProfile/queryCuspSupplierProfileQualificationByMainId',
+  apply='/cuspCode/cuspSupplierProfile/applyFor',
+  approvalApply='/cuspCode/cuspSupplierProfile/approveTemp',
 }
 /**
  * 导出api
@@ -34,6 +36,19 @@ export const cuspSupplierProfileManList = Api.cuspSupplierProfileManList;
  * @param params
  */
 export const cuspSupplierProfileQualificationList = Api.cuspSupplierProfileQualificationList;
+
+// 转正式申请
+export const apply = (params,handleSuccess) => {
+  return defHttp.get({url: Api.apply, params}, {joinParamsToUrl: true}).then(() => {
+    handleSuccess();
+  });
+}
+// 转正式申请审批
+export const approvalApply = (params,handleSuccess) => {
+  return defHttp.get({url: Api.approvalApply, params}, {joinParamsToUrl: true}).then(() => {
+    handleSuccess();
+  });
+}
 /**
  * 列表接口
  * @param params

+ 231 - 230
src/views/cuspCode/SupplierProfile/CuspSupplierProfile.data.ts

@@ -4,378 +4,404 @@ import { rules} from '/@/utils/helper/validator';
 import { render } from '/@/utils/common/renderUtils';
 import {JVxeTypes,JVxeColumn} from '/@/components/jeecg/JVxeTable/types'
 import { getWeekMonthQuarterYear } from '/@/utils';
+import { uploadUrl } from '/@/api/common/api';
 //列表数据
 export const columns: BasicColumn[] = [
    {
-    title: '状态(1-启用,0-停用)',
-    align:"center",
-    dataIndex: 'status_dictText'
-   },
-   {
-    title: '编码',
+    title: '编码(code)',
     align:"center",
     dataIndex: 'code'
    },
    {
-    title: '名称',
+    title: '名称(name)',
     align:"center",
     dataIndex: 'name'
    },
    {
-    title: '简称',
+    title: '简称(abbreviation)',
     align:"center",
     dataIndex: 'abbreviation'
    },
    {
-    title: '曾用名',
+    title: '供应商性质(supplier nature)',
     align:"center",
-    dataIndex: 'nameUsedBefore'
+    dataIndex: 'supplierNature_dictText'
    },
    {
-    title: '税号',
+    title: '税号(duty paragraph)',
     align:"center",
     dataIndex: 'dutyParagraph'
    },
    {
-    title: '法人',
+    title: '法人(legal person)',
     align:"center",
     dataIndex: 'legalPerson'
    },
    {
-    title: '联系人',
+    title: '联系人(contacts)',
     align:"center",
     dataIndex: 'contacts'
    },
    {
-    title: '联系电话',
+    title: '联系电话(phone)',
     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: '国家',
+    title: '国家(country)',
     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: '付款条件',
+    title: '付款条件(payment terms)',
     align:"center",
     dataIndex: 'paymentTerms_dictText'
    },
    {
-    title: '银行代码',
-    align:"center",
-    dataIndex: 'swiftCode'
-   },
-   {
-    title: '银行帐号',
-    align:"center",
-    dataIndex: 'bankAccount'
-   },
-   {
-    title: '营业执照',
-    align:"center",
-    dataIndex: 'businessLicense'
-   },
-   {
-    title: '其他文件',
+    title: '原厂(original factory)',
     align:"center",
-    dataIndex: 'otherFiles'
+    dataIndex: 'originalFactory_dictText'
    },
    {
-    title: '备注',
+    title: '状态(status)',
     align:"center",
-    dataIndex: 'notes'
+    dataIndex: 'status_dictText'
    },
    {
-    title: '临时供应商',
+    title: '考评等级(evaluation level)',
     align:"center",
-    dataIndex: 'temporarySupplier_dictText'
+    dataIndex: 'evaluationLevel_dictText'
    },
    {
-    title: '供应商等级',
+    title: '临时供应商(temporary supplier)',
     align:"center",
-    dataIndex: 'evaluationLevel_dictText'
+    dataIndex: 'temporarySupplier',
+    customRender:function (t, r, index) {
+      if(t.text==1){
+        return '申请中(application in progress)'
+      }else if(t.text==0){
+        return '是(yes)'
+      }else  if(t.text==2){
+        return '否'
+      } 
+    }
+
    },
+   
 ];
 //查询数据
 export const searchFormSchema: FormSchema[] = [
 	{
-      label: "状态(1-启用,0-停用)",
-      field: "status",
-      component: 'JSelectMultiple',
-      componentProps:{
-      },
-      //colProps: {span: 6},
- 	},
-	{
-      label: "编码",
+      label: "编码(code)",
       field: "code",
       component: 'Input',
+      labelWidth: 150,
       //colProps: {span: 6},
  	},
 	{
-      label: "名称",
+      label: "名称(name)",
       field: "name",
       component: 'Input',
+      labelWidth: 150,
       //colProps: {span: 6},
  	},
 	{
-      label: "简称",
+      label: "简称(abbreviation)",
       field: "abbreviation",
       component: 'Input',
+      labelWidth: 180,
       //colProps: {span: 6},
  	},
 	{
-      label: "税号",
+      label: "税号(dutyParagraph)",
       field: "dutyParagraph",
       component: 'Input',
+      labelWidth: 150,
       //colProps: {span: 6},
  	},
 	{
-      label: "联系人",
+      label: "联系人(contacts)",
       field: "contacts",
       component: 'Input',
+      labelWidth: 150,
       //colProps: {span: 6},
  	},
 	{
-      label: "联系电话",
+      label: "联系电话(phone)",
       field: "phone",
       component: 'Input',
+      labelWidth: 150,
       //colProps: {span: 6},
  	},
 	{
-      label: "供应商性质",
-      field: "supplierNature",
+      label: "付款条件(payment terms)",
+      field: "paymentTerms",
       component: 'JSelectMultiple',
+      labelWidth: 180,
       componentProps:{
+        dictCode:"payment_terms"
       },
       //colProps: {span: 6},
  	},
 	{
-      label: "国家",
+      label: "国家(country)",
       field: "country",
       component: 'JSelectMultiple',
+      labelWidth: 150,
       componentProps:{
+        dictCode: 'country'
       },
       //colProps: {span: 6},
  	},
-	{
-      label: "原厂",
-      field: "originalFactory",
+   {
+      label: "考评评级(evaluation level)",
+      field: "evaluationLevel",
       component: 'JSelectMultiple',
+      labelWidth: 180,
       componentProps:{
+        dictCode:"grade"
       },
       //colProps: {span: 6},
- 	},
-	{
-      label: "临时供应商",
-      field: "temporarySupplier",
+  },
+  {
+    label: "原厂(original factory)",
+    field: "originalFactory",
+    component: 'JSelectMultiple',
+    labelWidth: 150,
+    componentProps:{
+      dictCode: "yes_or_no"
+    },
+    //colProps: {span: 6},
+ },
+ {
+    label: "供应商性质(supplier nature)",
+    field: "supplierNature",
+    component: 'JSelectMultiple',
+    labelWidth: 180,
+    componentProps:{
+      dictCode: "supplier_nature"
+    },
+    //colProps: {span: 6},
+  },
+	
+   {
+      label: "状态(status)",
+      field: "status",
+      labelWidth: 150,
       component: 'JSelectMultiple',
       componentProps:{
+        dictCode: "valid_status"
       },
       //colProps: {span: 6},
- 	},
+  },
 	{
-      label: "供应商等级",
-      field: "evaluationLevel",
+      label: "临时供应商(temporary supplier)",
+      field: "temporarySupplier",
       component: 'JSelectMultiple',
+      labelWidth: 210,
       componentProps:{
+        dictCode: "should_apply"
       },
       //colProps: {span: 6},
  	},
+	
 ];
 //表单数据
 export const formSchema: FormSchema[] = [
   {
-    label: '状态(1-启用,0-停用)',
-    field: 'status',
-    component: 'JDictSelectTag',
-    componentProps:{
-        dictCode:""
-     },
-  },
-  {
-    label: '编码',
+    label: '编码(code)',
     field: 'code',
     component: 'Input',
+    colProps: {span: 12},
   },
   {
-    label: '名称',
+    label: '名称(name)',
     field: 'name',
+    colProps: {span: 12},
     component: 'Input',
+    labelWidth: 200,
   },
   {
-    label: '简称',
+    label: '简称(abbreviation)',
     field: 'abbreviation',
+    colProps: {span: 12},
     component: 'Input',
   },
   {
-    label: '曾用名',
+    label: '曾用名(name used before)',
     field: 'nameUsedBefore',
+    colProps: {span: 12},
     component: 'Input',
+    labelWidth: 200,
   },
   {
-    label: '税号',
+    label: '税号(duty paragraph)',
     field: 'dutyParagraph',
+    colProps: {span: 12},
     component: 'Input',
   },
   {
-    label: '法人',
+    label: '法人(legal person)',
     field: 'legalPerson',
+    colProps: {span: 12},
     component: 'Input',
+    labelWidth: 200,
   },
   {
-    label: '联系人',
+    label: '联系人(contacts)',
     field: 'contacts',
+    colProps: {span: 12},
     component: 'Input',
   },
   {
-    label: '联系电话',
+    label: '联系电话(phone)',
     field: 'phone',
+    colProps: {span: 12},
     component: 'Input',
+    labelWidth: 200,
   },
   {
-    label: '邮箱',
+    label: '邮箱(email)',
     field: 'email',
+    colProps: {span: 12},
     component: 'Input',
   },
   {
-    label: '注册地址',
+    label: '注册地址(register address)',
     field: 'registerAddress',
+    colProps: {span: 12},
     component: 'Input',
+    labelWidth: 200,
   },
   {
-    label: '公司地址',
+    label: '公司地址(address)',
     field: 'address',
+    colProps: {span: 12},
     component: 'Input',
   },
   {
-    label: '供应商性质',
+    label: '供应商性质(supplier nature)',
     field: 'supplierNature',
+    colProps: {span: 12},
+    labelWidth: 200,
     component: 'JDictSelectTag',
     componentProps:{
-        dictCode:""
+        dictCode:"supplier_nature"
      },
   },
   {
-    label: '国家',
+    label: '国家(country)',
     field: 'country',
+    colProps: {span: 12},
     component: 'JDictSelectTag',
     componentProps:{
-        dictCode:""
+        dictCode:"country"
      },
   },
   {
-    label: '币种',
-    field: 'currency',
-    component: 'Input',
+    label: '国外供应商(abroad supplier)',
+    field: 'abroadSupplier',
+    colProps: {span: 12},
+    component: 'JDictSelectTag',
+    componentProps:{
+        dictCode:"yes_or_no",
+        stringToNumber: true,
+     },
+    labelWidth: 200,
   },
   {
-    label: '国外供应商',
-    field: 'abroadSupplier',
-    component: 'InputNumber',
+    label: '币种(currency)',
+    field: 'currency',
+    colProps: {span: 12},
+    component: 'JDictSelectTag',
+    componentProps:{
+        dictCode:"currency	"
+     },
   },
   {
-    label: '原厂',
+    label: '原厂(original factory)',
     field: 'originalFactory',
+    colProps: {span: 12},
+    labelWidth: 200,
     component: 'JDictSelectTag',
     componentProps:{
-        dictCode:""
+        dictCode:"yes_or_no",
+        stringToNumber: true,
      },
   },
   {
-    label: '开户行',
+    label: '开户行(opening bank)',
     field: 'openingBank',
+    colProps: {span: 12},
     component: 'Input',
   },
   {
-    label: '付款条件',
+    label: '付款条件(payment terms)',
     field: 'paymentTerms',
+    colProps: {span: 12},
+    labelWidth: 200,
     component: 'JDictSelectTag',
     componentProps:{
-        dictCode:""
+        dictCode:"payment_terms"
      },
   },
   {
-    label: '银行代码',
-    field: 'swiftCode',
-    component: 'Input',
-  },
-  {
-    label: '银行帐号',
-    field: 'bankAccount',
+    label: '户名(opening name)',
+    field: 'openingName',
+    colProps: {span: 12},
     component: 'Input',
   },
   {
-    label: '营业执照',
-    field: 'businessLicense',
+    label: '银行代码(swift code)',
+    field: 'swiftCode',
+    labelWidth: 200,
+    colProps: {span: 12},
     component: 'Input',
   },
   {
-    label: '其他文件',
-    field: 'otherFiles',
+    label: '备注(notes)',
+    field: 'notes',
+    colProps: {span: 12},
     component: 'Input',
   },
   {
-    label: '备注',
-    field: 'notes',
+    label: '银行帐号(bank account)',
+    field: 'bankAccount',
+    colProps: {span: 12},
+    labelWidth: 200,
     component: 'Input',
   },
   {
-    label: '临时供应商',
-    field: 'temporarySupplier',
+    label: '状态(status)',
+    field: 'status',
+    colProps: {span: 12},
     component: 'JDictSelectTag',
     componentProps:{
-        dictCode:""
+        dictCode:"valid_status",
+        stringToNumber: true,
      },
   },
   {
-    label: '供应商等级',
-    field: 'evaluationLevel',
-    component: 'JDictSelectTag',
-    componentProps:{
-        dictCode:""
-     },
+    label: '营业执照(business license)',
+    field: 'businessLicense',
+    colProps: {span: 6},
+    labelWidth: 200,
+    component: 'JUpload',
+    componentProps: {
+      //是否显示选择按钮
+      text: '上传',
+      //最大上传数
+      maxCount: 1,
+      //是否显示下载按钮
+      download: true,
+    },
+  },
+  {
+    label: '其他文件(other files)',
+    field: 'otherFiles',
+    colProps: {span: 6},
+    labelWidth: 200,
+    component: 'JUpload',
   },
 	// TODO 主键隐藏字段,目前写死为ID
 	{
@@ -389,97 +415,57 @@ export const formSchema: FormSchema[] = [
 //子表表格配置
 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: '姓名',
+      title: '姓名(name)',
       key: 'name',
       type: JVxeTypes.input,
-      width:"200px",
       placeholder: '请输入${title}',
       defaultValue:'',
     },
     {
-      title: '电话',
+      title: '电话(mobile)',
       key: 'mobile',
       type: JVxeTypes.input,
-      width:"200px",
       placeholder: '请输入${title}',
       defaultValue:'',
     },
     {
-      title: '邮箱',
+      title: '邮箱(email)',
       key: 'email',
       type: JVxeTypes.input,
-      width:"200px",
       placeholder: '请输入${title}',
       defaultValue:'',
     },
     {
-      title: '职位',
+      title: '职位(position)',
       key: 'position',
       type: JVxeTypes.input,
-      width:"200px",
       placeholder: '请输入${title}',
       defaultValue:'',
     },
-  ]
-export const cuspSupplierProfileQualificationColumns: JVxeColumn[] = [
     {
-      title: '状态(1-启用,0-停用)',
-      key: 'status',
-      type: JVxeTypes.inputNumber,
+      title: '操作(operation)',
+      key: 'action',
       width:"200px",
-      placeholder: '请输入${title}',
-      defaultValue:'',
-    },
-    {
-      title: '主表主键(供应商档案)',
-      key: 'headId',
-      type: JVxeTypes.input,
-      width:"200px",
-      placeholder: '请输入${title}',
-      defaultValue:'',
+      // 固定在右侧
+      fixed: 'right',
+      // 对齐方式为居中
+      align: 'center',
+      // 组件类型定义为【插槽】
+      type: JVxeTypes.slot,
+      // slot 的名称,对应 v-slot 冒号后面和等号前面的内容
+      slotName: 'action',
     },
+  ]
+export const cuspSupplierProfileQualificationColumns: JVxeColumn[] = [
     {
-      title: '资质证书名称',
+      title: '资质证书名称(qualification certificate name)',
       key: 'qualificationCertificateName',
       type: JVxeTypes.input,
-      width:"200px",
       placeholder: '请输入${title}',
       defaultValue:'',
-    },
+    }, 
     {
-      title: '资质证书编码',
-      key: 'qualificationCertificateCode',
-      type: JVxeTypes.input,
-      width:"200px",
-      placeholder: '请输入${title}',
-      defaultValue:'',
-    },
-    {
-      title: '有效期始',
+      title: '有效期始(valid begin)',
       key: 'validBegin',
       type: JVxeTypes.datetime,
       width:"200px",
@@ -487,7 +473,7 @@ export const cuspSupplierProfileQualificationColumns: JVxeColumn[] = [
       defaultValue:'',
     },
     {
-      title: '有效期止',
+      title: '有效期止(valid end)',
       key: 'validEnd',
       type: JVxeTypes.datetime,
       width:"200px",
@@ -495,20 +481,35 @@ export const cuspSupplierProfileQualificationColumns: JVxeColumn[] = [
       defaultValue:'',
     },
     {
-      title: '资质证书附件',
+      title: '资质证书附件(qualification certificate)',
       key: 'qualificationCertificate',
-      type: JVxeTypes.input,
-      width:"200px",
-      placeholder: '请输入${title}',
-      defaultValue:'',
+      type: JVxeTypes.upload,
+      btnText: '点击上传',
+      token: true,
+      responseName: 'message',
+      action: uploadUrl,
     },
     {
       title: '临期提醒',
       key: 'deadlineReminder',
-      type: JVxeTypes.inputNumber,
+      type: JVxeTypes.select,
+      options: [],
+      dictCode: 'yes_or_no',
+      stringToNumber: true,
+      placeholder: '请选择',
+    },
+    {
+      title: '操作(operation)',
+      key: 'action',
       width:"200px",
-      placeholder: '请输入${title}',
-      defaultValue:'',
+      // 固定在右侧
+      fixed: 'right',
+      // 对齐方式为居中
+      align: 'center',
+      // 组件类型定义为【插槽】
+      type: JVxeTypes.slot,
+      // slot 的名称,对应 v-slot 冒号后面和等号前面的内容
+      slotName: 'action',
     },
   ]
 

+ 48 - 17
src/views/cuspCode/SupplierProfile/CuspSupplierProfileList.vue

@@ -1,18 +1,20 @@
 <template>
   <div>
     <!--引用表格-->
-   <BasicTable @register="registerTable" :rowSelection="rowSelection">
+   <BasicTable @register="registerTable" :rowSelection="rowSelection" size="small">
      <!--插槽: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-button type="primary" v-auth="'cuspCode:cusp_supplier_profile:add'"  @click="handleAdd" preIcon="ant-design:plus-outlined"> 新增(add)</a-button>
+          <a-button  type="primary" v-auth="'cuspCode:cusp_supplier_profile:exportXls'"  @click="onExportXls"> 导出(export)</a-button>
+          <a-button  type="primary" v-auth="'cuspCode:cusp_supplier_profile:exportXls'" @click="getCatalog"> 供货目录(supply catalog)</a-button>
+          <a-button  type="primary" v-auth="'cuspCode:cusp_supplier_profile:exportXls'" @click="formallyConverted"> 申请转正式(apply for formal conversion)</a-button>
+          <a-button  type="primary" v-auth="'cuspCode:cusp_supplier_profile:exportXls'" @click="ApprovalFormallyConverted">申请转正式审批 (apply for formal conversion Approval)</a-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>
-                    删除
+                    删除(delete)
                   </a-menu-item>
                 </a-menu>
               </template>
@@ -20,8 +22,6 @@
                 <Icon icon="mdi:chevron-down"></Icon>
               </a-button>
         </a-dropdown>
-        <!-- 高级查询 -->
-        <super-query :config="superQueryConfig" @search="handleSuperQuery" />
       </template>
        <!--操作栏-->
       <template #action="{ record }">
@@ -33,6 +33,7 @@
     </BasicTable>
     <!-- 表单区域 -->
     <CuspSupplierProfileModal @register="registerModal" @success="handleSuccess"></CuspSupplierProfileModal>
+    <SupplyCatalogModal  ref="SupplyCatalogModalRef" @success="handleSuccess"></SupplyCatalogModal>
   </div>
 </template>
 
@@ -42,15 +43,18 @@
   import { useListPage } from '/@/hooks/system/useListPage'
   import {useModal} from '/@/components/Modal';
   import CuspSupplierProfileModal from './components/CuspSupplierProfileModal.vue'
+  import SupplyCatalogModal from './components/SupplyCatalogModal.vue'
   import {columns, searchFormSchema, superQuerySchema} from './CuspSupplierProfile.data';
-  import {list, deleteOne, batchDelete, getImportUrl,getExportUrl} from './CuspSupplierProfile.api';
-  import {downloadFile} from '/@/utils/common/renderUtils';
+  import {list, deleteOne, batchDelete, getImportUrl,getExportUrl,apply,approvalApply} from './CuspSupplierProfile.api';
+  import { useMessage } from '/@/hooks/web/useMessage';
   import { useUserStore } from '/@/store/modules/user';
+  const { createMessage} = useMessage();
   const queryParam = reactive<any>({});
   const checkedKeys = ref<Array<string | number>>([]);
   const userStore = useUserStore();
   //注册model
   const [registerModal, {openModal}] = useModal();
+  const SupplyCatalogModalRef = ref();
    //注册table数据
   const { prefixCls,tableContext,onExportXls,onImportXls } = useListPage({
       tableProps:{
@@ -69,7 +73,7 @@
                 ],
             },
            actionColumn: {
-               width: 120,
+               width: 200,
                fixed:'right'
            },
            beforeFetch: (params) => {
@@ -89,9 +93,6 @@
 
   const [registerTable, {reload},{ rowSelection, selectedRowKeys }] = tableContext
 
-  // 高级查询配置
-  const superQueryConfig = reactive(superQuerySchema);
-
   /**
    * 高级查询事件
    */
@@ -155,24 +156,51 @@
   function getTableAction(record){
        return [
          {
-           label: '编辑',
+           label: '编辑(edit)',
            onClick: handleEdit.bind(null, record),
            auth: 'cuspCode:cusp_supplier_profile:edit'
          }
        ]
    }
+  //  获取供货目录
+   function getCatalog(){
+      if (selectedRowKeys.value.length != 1) {
+        createMessage.warn('请选择一条数据');
+      }else{
+        SupplyCatalogModalRef.value.getTable(selectedRowKeys.value[0])
+      }
+   }
 
-
+   /**
+   *申请转正式
+   */
+   function formallyConverted(){
+      if (selectedRowKeys.value.length == 0) {
+        createMessage.warn('请选择数据');
+      }else{
+        var ids = selectedRowKeys.value.join(',')
+        apply({ids:ids}, handleSuccess);
+      }
+   }
+  //  申请转正式审批
+  function ApprovalFormallyConverted(){
+    if (selectedRowKeys.value.length == 0) {
+        createMessage.warn('请选择数据');
+      }else{
+        var ids = selectedRowKeys.value.join(',')
+        approvalApply({ids:ids}, handleSuccess);
+      }
+  }
   /**
    * 下拉操作栏
    */
   function getDropDownAction(record){
     return [
       {
-        label: '详情',
+        label: '详情(detail)',
         onClick: handleDetail.bind(null, record),
       }, {
-        label: '删除',
+        label: '删除(delete)',
         popConfirm: {
           title: '是否确认删除',
           confirm: handleDelete.bind(null, record),
@@ -189,4 +217,7 @@
   :deep(.ant-picker),:deep(.ant-input-number){
     width: 100%;
   }
+  /deep/.jeecg-basic-table-form-container .table-page-search-submitButtons{
+    margin-bottom: 2px !important;
+  }
 </style>

+ 67 - 36
src/views/cuspCode/SupplierProfile/components/CuspSupplierProfileModal.vue

@@ -1,40 +1,55 @@
 <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>
+  <div ref="globalModal">
+      <BasicModal v-bind="$attrs" @register="registerModal" destroyOnClose :title="title" :get-container="() => globalModal" width="90%"  @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"
+              >
+                  <template #action="props">
+                    <a-divider type="vertical"/>
+                    <a-popconfirm title="确定删除吗?" @confirm="handleDelete(props)">
+                      <a>删除(delete)</a>
+                    </a-popconfirm>
+                  </template>
+            </JVxeTable>
+          </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"
+              >
+                  <template #action="props">
+                    <a-divider type="vertical"/>
+                    <a-popconfirm title="确定删除吗?" @confirm="handleDelete1(props)">
+                      <a>删除(delete)</a>
+                    </a-popconfirm>
+                  </template></JVxeTable>
+          </a-tab-pane>
+        </a-tabs>
+      </BasicModal>
+  </div>
 </template>
 
 <script lang="ts" setup>
@@ -50,6 +65,7 @@
     const emit = defineEmits(['register','success']);
     const isUpdate = ref(true);
     const formDisabled = ref(false);
+    const globalModal = ref()
     const refKeys = ref(['cuspSupplierProfileMan', 'cuspSupplierProfileQualification', ]);
     const activeKey = ref('cuspSupplierProfileMan');
     const cuspSupplierProfileMan = ref();
@@ -123,6 +139,12 @@
             setModalProps({confirmLoading: false});
         }
     }
+    function handleDelete({row}) {
+      cuspSupplierProfileMan.value?.removeRows(row)    
+    }
+    function handleDelete1({row}) {
+      cuspSupplierProfileQualification.value?.removeRows(row)    
+    }
 </script>
 
 <style lang="less" scoped>
@@ -134,4 +156,13 @@
   :deep(.ant-calendar-picker) {
     width: 100%;
   }
+  /deep/.ant-form-item{
+      margin-bottom: 8px !important;
+  }
+  /deep/.ant-tabs{
+    margin-left: 2%;
+  }
+  /deep/.ant-modal{
+   top: 34px;
+  }
 </style>

+ 327 - 0
src/views/cuspCode/SupplierProfile/components/SelectProductModal.vue

@@ -0,0 +1,327 @@
+<template>
+    <a-modal
+      title="选择产品(select product)"
+      width="95%"
+      :visible="visible"
+      :maskClosable="false"
+      switchFullscreen
+      @ok = "handleOk"
+      @cancel="handleCancel">
+        <div>
+            <a-card  :body-style="{ padding: '10px' }" :bordered="false" style="margin: 10px;">
+                <div class="table-page-search-wrapper">
+                    <a-form :model="queryParams" :label-col="labelCol" :wrapper-col="wrapperCol" @keyup.enter.native="searchQuery">
+                    <a-row :gutter="24">
+                        <a-col :md="6" :sm="8">
+                            <a-form-item label="分类(class)">
+                                <!-- <a-input placeholder="请输入" v-model:value="queryParams.classId"></a-input> -->
+                                <JSelectInput   v-model:value="queryParams.classId"  placeholder="请选择" :options="classOption" ></JSelectInput>
+                            </a-form-item>
+                        </a-col>
+                        <a-col :md="6" :sm="8">
+                            <a-form-item label="编码(code)">
+                                <a-input placeholder="请输入" v-model:value="queryParams.code"></a-input>
+                            </a-form-item>
+                        </a-col>
+                        <a-col :md="6" :sm="8">
+                            <a-form-item label="中文名(Chinese name)">
+                                <a-input placeholder="请输入" v-model:value="queryParams.chineseName"></a-input>
+                            </a-form-item>
+                        </a-col>
+                        <template v-if="toggleSearchStatus">
+                            <a-col :md="6" :sm="8">
+                                <a-form-item label="英文名(English name)">
+                                    <a-input placeholder="请输入" v-model:value="queryParams.englishName"></a-input>
+                                </a-form-item>
+                            </a-col>
+                            <a-col :md="6" :sm="8">
+                                <a-form-item label="规格(specifications)">
+                                    <a-input placeholder="请输入" v-model:value="queryParams.specifications"></a-input>
+                                </a-form-item>
+                            </a-col>
+                            <a-col :md="6" :sm="8">
+                                <a-form-item label="型号(model)">
+                                    <a-input placeholder="请输入" v-model:value="queryParams.model"></a-input>
+                                </a-form-item>
+                            </a-col>
+                            <a-col :md="6" :sm="8">
+                                <a-form-item label="虚拟产品(virtual product)" :label-col="labelCol1" :wrapper-col="wrapperCol1">
+                                    <JDictSelectTag v-model:value="queryParams.virtualProduct" placeholder="请选择" dictCode="yes_or_no"/>
+                                </a-form-item>
+                            </a-col>
+                            <a-col :md="6" :sm="8">
+                                <a-form-item label="有害物质(harmful substances)" :label-col="labelCol1" :wrapper-col="wrapperCol1">
+                                    <JDictSelectTag v-model:value="queryParams.harmfulSubstances" placeholder="请选择" dictCode="yes_or_no"/>
+                                </a-form-item>
+                            </a-col>
+                        </template>
+                        <a-col :md="6" :sm="8">
+                            <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
+                                <a-button type="primary" @click="searchQuery" >查询(search)</a-button>
+                                <a-button type="primary" @click="searchReset"  style="margin-left: 8px">重置(reset)</a-button>
+                                <a @click="handleToggleSearch" style="margin-left: 8px">
+                                {{ toggleSearchStatus ? '收起' : '展开' }}
+                                <a-icon :type="toggleSearchStatus ? 'up' : 'down'" />
+                                </a>
+                            </span>
+                        </a-col>
+                    </a-row>
+                </a-form>
+                </div>
+            </a-card>
+
+            <a-card  :body-style="{ padding: '10px' }" :bordered="false" style="margin: 10px;">
+                <a-table
+                    :columns="columns"
+                    :row-key="record => record.id"
+                    :data-source="dataSource"
+                    bordered
+                    size="small"
+                    @change="handleTableChange"
+                    :pagination="pagination"
+                    :scroll="{ x: 1800, y: 300 }"
+                    :rowSelection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
+                >
+                </a-table>
+            </a-card>
+        </div>
+      </a-modal>
+</template>
+<script lang="ts" setup>
+    import { defHttp } from '/@/utils/http/axios';
+    import { message } from 'ant-design-vue';
+    import { JDictSelectTag} from '/@/components/Form';
+    import JSelectInput from '/@/components/Form/src/jeecg/components/JSelectInput.vue';
+    import { ref, reactive, toRaw, toRefs, watch, nextTick, onMounted, getCurrentInstance } from 'vue';
+    import { filterObj, getFileAccessHttpUrl } from '/@/utils/common/compUtils';
+    const emit = defineEmits([ 'success']); //定义emit
+    var visible = ref(false)
+    let classOption = ref([])
+    const columns = [
+        {
+            title: '分类(class)',
+            dataIndex: 'classId',
+            key: 'classId',
+            align:"center"
+        },
+        {
+            title: '编码(code)',
+            dataIndex: 'code',
+            key: 'code',
+            align:"center"
+        },
+        {
+            title: '中文名(Chinese name)',
+            dataIndex: 'chineseName',
+            key: 'chineseName',
+            align:"center",
+            width:200
+        },
+        {
+            title: '英文名(English name)',
+            key: 'englishName',
+            dataIndex: 'englishName',
+            align:"center"
+        },
+        {
+            title: '规格(specifications)',
+            key: 'specifications',
+            dataIndex: 'specifications',
+            align:"center"
+        },
+        {
+            title: '型号(model)',
+            key: 'model',
+            dataIndex: 'model',
+            align:"center"
+        },
+        {
+            title: '计量单位(measurement unit)',
+            key: 'measurementUnit',
+            dataIndex: 'measurementUnit',
+            align:"center",
+            width:250
+        },
+        {
+            title: '虚拟产品(virtual product)',
+            key: 'virtualProduct',
+            dataIndex: 'virtualProduct',
+            align:"center",
+            customRender:function (t, r, index) {
+              if(t.text==1){
+                return '是(yes)'
+              }else if(t.text==0){
+                return '否(no)'
+              }else{
+                return ''
+              } 
+            }
+        },
+        {
+            title: '有害物质(harmful substances)',
+            key: 'harmfulSubstances',
+            dataIndex: 'harmfulSubstances',
+            align:"center",
+            width:250,
+            customRender:function (t, r, index) {
+              if(t.text==1){
+                return '是(yes)'
+              }else if(t.text==0){
+                return '否(no)'
+              }else{
+                return ''
+              } 
+            }
+        },
+    ];
+    const labelCol = ref({
+    xs: { span: 24 },
+    sm: { span: 9 },
+    });
+    const wrapperCol = ref({
+        xs: { span: 24 },
+        sm: { span: 15 },
+    });
+    const labelCol1 = ref({
+    xs: { span: 24 },
+    sm: { span: 12 },
+    });
+    const wrapperCol1 = ref({
+        xs: { span: 24 },
+        sm: { span: 12 },
+    });
+    const dataSource =ref([]);
+    let selectedRowKeys = ref([]);
+    let selectedRows = ref([]);
+    const toggleSearchStatus = ref(false);
+    const queryParams = ref({
+        classId:'',
+        code:'',
+        chineseName:'',
+        englishName:'',
+        specifications:'',
+        model:'',
+        chineseAlias:'',
+        englishAlias:'',
+        status:'',
+        virtualProduct:'',
+        harmfulSubstances:'',
+    });
+    let pagination = ref({
+      current: 1,
+      pageSize: 10,
+      total: '', // 假设总共有100条数据
+      showSizeChanger: true,
+      showQuickJumper: true,
+      showTotal: (total, range) => {
+          return range[0] + "-" + range[1] + " 共" + total + "条"
+      },
+      size:'small'
+    });
+  function handleOk() {
+    emit('success',selectedRows);
+    visible.value = false
+    selectedRowKeys.value = []
+    selectedRows.value = []
+    dataSource.value = []
+  }
+  function handleCancel() {
+    visible.value = false
+    selectedRowKeys.value = []
+    selectedRows.value = []
+    dataSource.value = []
+  }
+  function getTable(record){
+    visible.value = true
+    loadData()
+    getOptiom()
+  }  
+  function loadData(){
+        let params = getQueryParams();
+        defHttp
+        .get({ url: '/baseCode/baseProductArchive/list',params}, { isTransformResponse: false })
+        .then((res) => {
+            if (res.success) {
+                dataSource.value = res.result.records;
+                pagination.value.total = res.result.total;
+                pagination.value.current = res.result.current;
+                pagination.value.pageSize = res.result.size;                
+            } else {
+                message.error(res.message);
+            }
+        })
+        .finally(() => {
+            // loading.value = false;
+        });
+  }
+  function getOptiom(){
+    defHttp
+        .get({ url: 'baseCode/baseProductClass/list'}, { isTransformResponse: false })
+        .then((res) => {
+            if (res.success) {
+              classOption.value = []
+              res.result.records.forEach(element => {
+                  var obj = {
+                    label: element.name?element.name:'无名称请维护',
+                    value: element.id?element.id:''
+                  };
+                  classOption.value.push(obj)
+              });    
+            }
+        })
+        .finally(() => {
+            // loading.value = false;
+        });
+  }
+  function getQueryParams(){
+        let params = Object.assign(queryParams.value);
+        params.pageNo = pagination.value.current;
+        params.pageSize = pagination.value.pageSize;
+        return filterObj(params);
+    }
+   function handleTableChange(paginations, filters, sorter){
+        pagination.value.total = paginations.total;
+        pagination.value.current = paginations.current;
+        pagination.value.pageSize = paginations.pageSize;
+        loadData()
+   };
+   function searchQuery(){
+        loadData();
+    }
+    function searchReset(){
+        queryParams.value = {
+            classId:'',
+            code:'',
+            chineseName:'',
+            englishName:'',
+            specifications:'',
+            model:'',
+            chineseAlias:'',
+            englishAlias:'',
+            status:'',
+            virtualProduct:'',
+            harmfulSubstances:'',
+        }
+        pagination.value.current =1;
+        pagination.value.pageSize = 10; 
+        loadData();
+    }
+    function handleToggleSearch(){
+        toggleSearchStatus.value = !toggleSearchStatus.value;
+    }
+    function onSelectChange(keys,rows){
+        selectedRowKeys.value = keys
+        selectedRows.value = rows
+    }
+  defineExpose({
+    getTable
+  });
+</script>
+<style lang="less" scoped>
+/deep/.ant-spin-container{
+    padding: 8px;
+}
+/deep/.ant-form-item{
+    margin-bottom: 8px !important;
+}
+</style>

+ 187 - 0
src/views/cuspCode/SupplierProfile/components/SupplyCatalogModal.vue

@@ -0,0 +1,187 @@
+<template>
+    <a-modal
+      title="供货目录(supply catalog)"
+      width="95%"
+      :visible="visible"
+      :maskClosable="false"
+      switchFullscreen
+      @ok = "handleOk"
+      @cancel="handleCancel">
+        <a-spin :spinning="loading" >
+           <a-button type="primary" v-auth="'cuspCode:cusp_supplier_profile:add'"  @click="selectProducts" preIcon="ant-design:plus-outlined">选择产品(select product)</a-button>
+            <a-table
+                :columns="columns"
+                :row-key="record => record.id"
+                :data-source="dataSource"
+                bordered
+                size="small"
+                height="500"
+                :pagination="false"
+                :scroll="{ x: 1800, y: 500 }"
+            > 
+                <template #valid="{ text, record }">
+                  <!-- <a-select v-model:value="record.valid" v-bind="attrs">
+                    <a-select-option  value="1">是(yes)</a-select-option>
+                    <a-select-option  value="1">否(no)</a-select-option>
+                  </a-select> -->
+                    <JDictSelectTag v-model:value="record.valid"  placeholder="请选择" dictCode="yes_or_no" stringToNumber/>
+                </template>
+                <template #action="{ text, record,index }">
+                    <a @click="deleteRow(index)">删除(delete)</a>
+                </template>
+            </a-table>
+        </a-spin>
+        <SelectProductModal ref="SelectProductModalRef" @success="addRow"></SelectProductModal>
+    </a-modal>
+</template>
+<script lang="ts" setup>
+  import { defHttp } from '/@/utils/http/axios';
+  import { message } from 'ant-design-vue';
+  import { JDictSelectTag} from '/@/components/Form';
+  import SelectProductModal from './SelectProductModal.vue';
+  import { ref, reactive, toRaw, toRefs, watch, nextTick, onMounted, getCurrentInstance,readonly  } from 'vue';
+  const emit = defineEmits([ 'success']); //定义emit
+  var visible = ref(false)
+  let loading = ref(false)
+  var dataSource = ref([]);
+  var SelectProductModalRef = ref()
+  var headId = ref('')
+  var columns = reactive([
+        {
+            title: '分类(class)',
+            dataIndex: 'classId',
+            key: 'classId',
+            align:"center",
+           ellipsis: true,
+        },
+        {
+            title: '编码(code)',
+            dataIndex: 'code',
+            key: 'code',
+            align:"center"
+        },
+        {
+            title: '中文名(Chinese name)',
+            dataIndex: 'chineseName',
+            key: 'chineseName',
+            align:"center",
+            width:200
+        },
+        {
+            title: '英文名(English name)',
+            key: 'englishName',
+            dataIndex: 'englishName',
+            align:"center",
+            width:200
+        },
+        {
+            title: '规格(specifications)',
+            key: 'specifications',
+            dataIndex: 'specifications',
+            align:"center",
+            width:150
+        },
+        {
+            title: '型号(model)',
+            key: 'model',
+            dataIndex: 'model',
+            align:"center"
+        },
+        {
+            title: '计量单位(measurement unit)',
+            key: 'measurementUnit',
+            dataIndex: 'measurementUnit',
+            align:"center",
+            width:250
+        },
+        {
+            title: '有害物质(harmful substances)',
+            key: 'harmfulSubstances',
+            dataIndex: 'harmfulSubstances',
+            align:"center",
+            width:250,
+            customRender:function (t, r, index) {
+              if(t.text==1){
+                return '是(yes)'
+              }else if(t.text==0){
+                return '否(no)'
+              }else{
+                return ''
+              } 
+            }
+        },
+        {
+            title: '是否有效(valid)',
+            key: 'valid',
+            dataIndex: 'valid',
+            align:"center",
+            slots: { customRender: 'valid' },
+        },
+        {
+            title: '操作(operation)',
+            key: 'operation',
+            dataIndex: 'operation',
+            align:"center",
+            fixed: 'right',
+            slots: { customRender: 'action' },
+        },
+  ]);
+  function handleOk() {
+    if(dataSource.value.length==0){
+      message.warn('请选择产品');
+    }else{
+      dataSource.value.map(item=>{
+        item.headId = headId.value
+        item.productId =item.productId&&item.productId!==''?item.productId:item.id
+      })
+      defHttp.post({ url: '/cuspCode/cuspSupplierProfileCatalog/add', params: {cuspSupplierProfileCatalog:dataSource.value} }, { isTransformResponse: false }).then((res)=>{
+        if(res.success){
+          emit('success');
+          visible.value = false
+        }else{
+          message.warning(res.message);
+        }
+
+      });
+    }
+    
+  }
+  function handleCancel() {
+    visible.value = false
+    emit('success');
+    dataSource.value = []
+  }
+  function getTable(record){
+    visible.value = true
+    headId.value = record
+    let params = {id:record}
+    defHttp.get({url:"/cuspCode/cuspSupplierProfileCatalog/querySupplierProfileCatalogByMainId",params}).then(res=>{
+      if(res){
+        dataSource.value = res
+      }
+    })
+  }  
+  function selectProducts(){
+    SelectProductModalRef.value.getTable()
+  }
+  function deleteRow(index){
+    dataSource.value.splice(index, 1);
+  }
+  function addRow(selectedRows){
+    var arr =[...selectedRows.value, ...dataSource.value]
+    dataSource.value = arr    
+  }
+  defineExpose({
+    getTable
+  });
+</script>
+<style lang="less" scoped>
+/deep/.ant-spin-container{
+    padding: 8px;
+}
+/deep/.ant-select-dropdown{
+  position: fixed !important;
+  // margin-top: 15%;
+  // margin-left: 82%;
+}
+</style>