Bladeren bron

供应商考评-提交or取消提交方法更改/操作里按钮按需展示

jingbb 7 uur geleden
bovenliggende
commit
845c7fabde

+ 2 - 2
src/views/cuspCode/SupplierEvaluation/CuspSupplierEvaluation.api.ts

@@ -79,7 +79,7 @@ export const batchSubmit = (params, handleSuccess) => {
     okText: '确认',
     cancelText: '取消',
     onOk: () => {
-      return defHttp.delete({url: Api.submitBatch, data: params}, {joinParamsToUrl: true}).then(() => {
+      return defHttp.get({url: Api.submitBatch, params}, {joinParamsToUrl: true}).then(() => {
         handleSuccess();
       });
     }
@@ -94,7 +94,7 @@ export const cancelBatchSubmit = (params, handleSuccess) => {
     okText: '确认',
     cancelText: '取消',
     onOk: () => {
-      return defHttp.delete({url: Api.cancelSubmitBatch, data: params}, {joinParamsToUrl: true}).then(() => {
+      return defHttp.get({url: Api.cancelSubmitBatch, params}, {joinParamsToUrl: true}).then(() => {
         handleSuccess();
       });
     }

+ 15 - 11
src/views/cuspCode/SupplierEvaluation/CuspSupplierEvaluationList.vue

@@ -4,10 +4,10 @@
    <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_evaluation:exportXls'"  preIcon="ant-design:export-outlined" @click="onExportXls"> 导出</a-button>
-          <a-button  type="primary" v-auth="'cuspCode:cusp_supplier_evaluation:exportXls'"  preIcon="ant-design:export-outlined" @click="submit"> 提交</a-button>
-          <a-button  type="primary" v-auth="'cuspCode:cusp_supplier_evaluation:exportXls'"  preIcon="ant-design:export-outlined" @click="cancelSubmission"> 取消提交</a-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_evaluation:exportXls'"  preIcon="ant-design:export-outlined" @click="onExportXls"> 导出(export)</a-button>
+          <a-button  type="primary" v-auth="'cuspCode:cusp_supplier_evaluation:exportXls'"  preIcon="ant-design:export-outlined" @click="submit"> 提交(submit)</a-button>
+          <a-button  type="primary" v-auth="'cuspCode:cusp_supplier_evaluation:exportXls'"  preIcon="ant-design:export-outlined" @click="cancelSubmission"> 取消提交(canaelSubmit)</a-button>
           <a-dropdown v-if="selectedRowKeys.length > 0">
               <template #overlay>
                 <a-menu>
@@ -139,8 +139,14 @@
          {
            label: '编辑(edit)',
            onClick: handleEdit.bind(null, record),
-           auth: 'cuspCode:cusp_supplier_evaluation:edit'
-         }
+           auth: 'cuspCode:cusp_supplier_evaluation:edit',
+           ifShow: record.submit!==0
+         },
+         {
+          label: '详情(detail)',
+          onClick: handleDetail.bind(null, record),
+          ifShow: record.submit==0
+        },
        ]
    }
 
@@ -150,17 +156,15 @@
    */
   function getDropDownAction(record){
     return [
-      {
-        label: '详情(detail)',
-        onClick: handleDetail.bind(null, record),
-      }, {
+       {
         label: '删除(delete)',
         popConfirm: {
           title: '是否确认删除',
           confirm: handleDelete.bind(null, record),
           placement: 'topLeft'
         },
-        auth: 'cuspCode:cusp_supplier_evaluation:delete'
+        auth: 'cuspCode:cusp_supplier_evaluation:delete',
+        ifShow: record.submit!==0
       }
     ]
   }