Selaa lähdekoodia

费用审核驳回数据条数未显示

@dongkboy 5 kuukautta sitten
vanhempi
commit
dc5ec7adf4
1 muutettua tiedostoa jossa 27 lisäystä ja 15 poistoa
  1. 27 15
      src/views/representative/externalCostApproval.vue

+ 27 - 15
src/views/representative/externalCostApproval.vue

@@ -25,7 +25,8 @@
           </el-dropdown>
         </template>
         <template v-slot:operation="scope">
-          <el-button v-if="scope.operationData.auditStatus == '0'" type="primary"  link @click="agreemenUpdate(scope.operationData.id)"> 审核
+          <el-button v-if="scope.operationData.auditStatus == '0'" type="primary" link
+            @click="agreemenUpdate(scope.operationData.id)"> 审核
           </el-button>
           <el-button v-if="scope.operationData.auditStatus == '2'" type="primary" link
             @click="agreemenUpdate(scope.operationData.id)"> 详情
@@ -43,7 +44,7 @@
 <script lang="ts" setup>
 import { ref, reactive } from 'vue'
 import { useRoute } from 'vue-router';
-import { ElMessage, ElMessageBox  } from 'element-plus'
+import { ElMessage, ElMessageBox } from 'element-plus'
 import { loadDicts, getDict } from '@/utils/composables/dictService';//字典组件
 import contactPersonFeeDialogEdit from "../externalAgreement/agreement/components/contactPersonFeeDialogEdit.vue";
 
@@ -59,7 +60,8 @@ onBeforeMount(async () => {
   if (id.value) {
     formInline.agreement = id.value;
   }
-  findpage();//列表数据
+  findpage(0);//列表数据
+  findpage(2);//列表数据
   valid_status.value = getDict('valid_status');//生效状态
   is_enable.value = getDict('is_enable');//协议状态
   insurance_type.value = getDict('insurance_type')
@@ -131,8 +133,8 @@ const fields = ref([
 ]);
 
 //费用数据查询
-function findpage() {
-  api.agreementApi.CostExternalFeePageList({ pages: pageInfo.value.pageNum, size: pageInfo.value.pageSize, ...formInline }).then((res: any) => {
+function findpage(status: any) {
+  api.agreementApi.CostExternalFeePageList({ pages: pageInfo.value.pageNum, size: pageInfo.value.pageSize, ...formInline, auditStatus: status }).then((res: any) => {
     if (res.code == '200') {
       tableData.value = res.data.records;
       pageInfo.value.pageNum = res.data.current;
@@ -234,7 +236,11 @@ const columns = [
 function getList(item: PageInfo) {
   pageInfo.value.pageNum = item.pageNum;
   pageInfo.value.pageSize = item.pageSize;
-  findpage();
+  if (activeName.value == 'pendingReview') {
+    findpage(0);
+  } else {
+    findpage(2);
+  }
 
 };
 // 费用编辑
@@ -261,7 +267,11 @@ const ruleFeeEditSave = (data: object) => {
         plain: true,
       })
       ruleFeeEditVisible.value = false;
-      findpage();
+      if (activeName.value == 'pendingReview') {
+        findpage(0);
+      } else {
+        findpage(2);
+      }
     } else {
     }
   });
@@ -311,12 +321,16 @@ const rejectOperation = (automatic: any, id: any, value: any) => {
   ExternalauditFailed([id], value, automatic)
 }
 const agreementQuery = () => {
-  findpage();
+  if (activeName.value == 'pendingReview') {
+    findpage(0);
+  } else {
+    findpage(2);
+  }
 }
 const ExternalauditSuccess = async (list: string[], automatic?: boolean) => {
   await api.agreementApi.ExternalauditSuccess({ ids: list, automatic: automatic }).then((res: any) => {
     if (res.code == '200') {
-      findpage();
+      findpage(0);
       ElMessage({
         type: 'success',
         message: res.msg,
@@ -335,7 +349,7 @@ const ExternalauditSuccess = async (list: string[], automatic?: boolean) => {
 const ExternalauditFailed = async (list: string[], value: string, automatic?: boolean) => {
   await api.agreementApi.ExternalauditFailed({ ids: list, reason: value, automatic: automatic }).then((res: any) => {
     if (res.code == '200') {
-      findpage();
+      findpage(0);
       ElMessage({
         type: 'success',
         message: res.msg,
@@ -361,16 +375,14 @@ const resetForm = () => {
   formInline.validState = "";
   formInline.effectiveTime = [];
   formInline.failureTime = [];
-  findpage();
+  findpage(0);
 }
 // 批量编辑
 const handleClick = (pane: any) => {
   if (pane.props.name == 'pendingReview') {
-    formInline.auditStatus = '0';
-    findpage()
+    findpage(0);
   } else {
-    formInline.auditStatus = '2';
-    findpage();
+    findpage(2);
   }
 }
 </script>