From e622bd5e3b2638b9ab9a712ed1160a66018d6fd7 Mon Sep 17 00:00:00 2001
From: MrShi <1878285526@qq.com>
Date: 星期四, 22 二月 2024 09:21:15 +0800
Subject: [PATCH] mrshi

---
 company/src/components/business/OperaTaxesWindow.vue |   66 ++++++++++++++++++++++++++------
 1 files changed, 53 insertions(+), 13 deletions(-)

diff --git a/company/src/components/business/OperaTaxesWindow.vue b/company/src/components/business/OperaTaxesWindow.vue
index 271fc8e..e4c8953 100644
--- a/company/src/components/business/OperaTaxesWindow.vue
+++ b/company/src/components/business/OperaTaxesWindow.vue
@@ -51,11 +51,15 @@
                     <div class="info_list_item_val" style="color:rgba(249, 86, 1, 0.996078431372549);">{{ model.price }}</div>
                 </div>
             </div>
-            <el-table v-if="model.type ==0"
+<<<<<<< HEAD
+            <el-table v-if="model.applyType == 0"
+=======
+            <el-table v-if="model.applyType ==0"
+>>>>>>> c421d2deeec5530d8060d8e06b5b86bb02e72dbf
                 :data="tableData"
                 border
                 show-summary
-                :summary-method="getSummaries"
+                :summary-method="getSummaries1"
                 style="width: 100%; margin-bottom: 20px;">
                 <el-table-column
                     label="搴忓彿"
@@ -77,11 +81,6 @@
                 </el-table-column>
                 <el-table-column
                     align="center"
-                    prop="createDate"
-                    label="鐢宠寮�绁ㄦ椂闂�">
-                </el-table-column>
-                <el-table-column
-                    align="center"
                     prop="fee"
                     label="閲戦">
                   <template slot-scope="{row}">
@@ -89,12 +88,22 @@
                   </template>
                 </el-table-column>
             </el-table>
-          <el-table v-if="model.type ==1"
+<<<<<<< HEAD
+          <el-table
+            v-if="model.applyType == 1"
+            :data="tableData1"
+            border
+            show-summary
+            :summary-method="getSummaries"
+            style="width: 100%; margin-bottom: 20px;">
+=======
+          <el-table v-if="model.applyType ==1"
                     :data="tableData1"
                     border
                     show-summary
                     :summary-method="getSummaries"
                     style="width: 100%; margin-bottom: 20px;">
+>>>>>>> c421d2deeec5530d8060d8e06b5b86bb02e72dbf
             <el-table-column
                 label="淇濆崟"
                 align="center"
@@ -109,14 +118,17 @@
                 label="淇濋櫓鏂规">
             </el-table-column>
             <el-table-column
+                v-if="model.applyType == 1"
                 align="center"
                 prop="applyCode"
                 label="淇濆崟鍙�">
             </el-table-column>
             <el-table-column
                 align="center"
-                prop="changApplyCode"
                 label="鎵瑰崟鍙�">
+                <template slot-scope="{row}">
+                    <span>{{row.changApplyCode ? row.changApplyCode : '-'}}</span>
+                </template>
             </el-table-column>
             <el-table-column
                 align="center"
@@ -127,7 +139,7 @@
               </template>
             </el-table-column>
           </el-table>
-            <el-table v-if="model.type == 1"
+            <el-table v-if="model.applyType == 1"
                 :data="tableData2"
                 border
                 show-summary
@@ -192,8 +204,8 @@
             </span>
       </el-dialog>
       <template v-slot:footer>
-        <el-button v-if="model.status ==0 && !visible1" type="danger" @click="visible1=true">閫�鍥炵敵璇�</el-button>
-        <el-button @click="visible=false">鍙栨秷</el-button>
+        <el-button v-if="userInfo.type !== 1 && model.status ==0 && !visible1" type="danger" @click="visible1 = true">閫�鍥炵敵璇�</el-button>
+        <el-button @click="visible = false">鍙栨秷</el-button>
       </template>
     </GlobalWindow>
 </template>
@@ -202,6 +214,7 @@
 import BaseOpera from '@/components/base/BaseOpera'
 import GlobalWindow from '@/components/common/GlobalWindow'
 import { getDetail,backApply } from '@/api/business/taxes'
+import { mapState } from 'vuex'
 export default {
   name: 'OperaCompanyWindow',
   extends: BaseOpera,
@@ -225,6 +238,9 @@
       tableData2: []
     }
   },
+    computed: {
+      ...mapState(['userInfo'])
+    },
   created () {
     this.config({
       api: '/business/taxes',
@@ -266,7 +282,7 @@
     getDetails  () {
       getDetail(this.model.id).then(res => {
         this.model = res
-        if (res.type == 0) {
+        if (res.applyType == 0) {
           this.tableData=(res.applyList)
         } else {
           this.tableData1=(res.applyList)
@@ -276,6 +292,30 @@
       }).catch(err => {
       })
     },
+    getSummaries1 (param) {
+        const { columns, data } = param
+        const sums = []
+        columns.forEach((column, index) => {
+            if (index === 0) {
+                sums[index] = '鍚堣'
+            } else {
+                if (index == 3) {
+                    const values = data.map(item => Number(item[column.property]))
+                    if (!values.every(value => isNaN(value))) {
+                        sums[index] = values.reduce((prev, curr) => {
+                            const value = Number(curr)
+                            if (!isNaN(value)) {
+                                return prev + curr
+                            } else {
+                                return prev
+                            }
+                        }, 0)
+                    }
+                }
+            }
+        })
+        return  sums
+    },
     getSummaries (param) {
       const { columns, data } = param
       const sums = []

--
Gitblit v1.9.3