@dongkboy 3 mesi fa
parent
commit
10ea10e321
2 ha cambiato i file con 26 aggiunte e 19 eliminazioni
  1. 1 0
      src/api/modules/finance.ts
  2. 25 19
      src/views/finance/modules/auditDetail.vue

+ 1 - 0
src/api/modules/finance.ts

@@ -14,6 +14,7 @@ const financeApi = (axiosInstance: ApiInstance) => ({
     saveCostInfo: (data: any) => axiosInstance.post('/feeAudit/saveCostInfo', data), // 保存调整后的费用
     isLock: (data: string) => axiosInstance.get(`/feeAudit/isLock?orderNo=${data}`), // 判断领取按钮是否锁定
     verifyOrder: (data: any) => axiosInstance.post('/feeAudit/verifyOrder', data), // 审核通过/不通过
+    computedCostInfo: (data: any) => axiosInstance.post('/feeAudit/computedCostInfo', data), // 计算费用
 
     deleteIncomesByIds:(data: any) => axiosInstance.post('/receivable/deleteIncomesByIds',data), //私有协议-手续费应收-应收列表删除
     getCommissionReceivableList:(data: any) => axiosInstance.post('/receivable/getCommissionReceivableList',data), //私有协议-手续费应收-应收列表

+ 25 - 19
src/views/finance/modules/auditDetail.vue

@@ -559,6 +559,7 @@
             <el-button size="small" v-if="!costShow" type="primary" plain @click="handleCostChange">调整费用</el-button>
             <div v-else style="display: flex; align-items: center; justify-content: flex-end">
               <el-button size="small" type="primary" plain @click="costShow = false">取消调整</el-button>
+              <el-button size="small" type="primary" plain @click="handleComputedCostInfo">留点计算</el-button>
               <el-button size="small" type="primary" plain @click="handleSaveCostChange">保存</el-button>
             </div>
           </div>
@@ -651,9 +652,9 @@
               </th>
 
               <th>
-                <el-input-number v-model="detailData.costRatio.jqKeepPointRatio" controls-position="right" v-if="costShow"
-                  style="width: 80px" :min="0" :max="100" />
-                <div v-else>{{ detailData?.costRatio?.jqKeepPointRatio }}%</div>
+                <!-- <el-input-number v-model="detailData.costRatio.jqKeepPointRatio" controls-position="right" v-if="costShow"
+                  style="width: 80px" :min="0" :max="100" /> -->
+                <div >{{ detailData?.costRatio?.jqKeepPointRatio }}%</div>
               </th>
               <th>
                 <div>¥{{ detailData?.insFeeOrders?.jqKeepPointPremium }}</div>
@@ -722,9 +723,9 @@
               </th>
 
               <th>
-                <el-input-number v-model="detailData.costRatio.syKeepPointRatio" controls-position="right" v-if="costShow"
-                  style="width: 80px" :min="0" :max="100" />
-                <div v-else>{{ detailData?.costRatio?.syKeepPointRatio }}%</div>
+                <!-- <el-input-number v-model="detailData.costRatio.syKeepPointRatio" controls-position="right" v-if="costShow"
+                  style="width: 80px" :min="0" :max="100" /> -->
+                <div >{{ detailData?.costRatio?.syKeepPointRatio }}%</div>
               </th>
               <th>
                 <div>¥{{ detailData?.insFeeOrders?.syKeepPointPremium }}</div>
@@ -793,9 +794,9 @@
               </th>
 
               <th>
-                <el-input-number v-model="detailData.costRatio.jyKeepPointRatio" controls-position="right" v-if="costShow"
-                  style="width: 80px" :min="0" :max="100" />
-                <div v-else>{{ detailData?.costRatio?.jyKeepPointRatio }}%</div>
+                <!-- <el-input-number v-model="detailData.costRatio.jyKeepPointRatio" controls-position="right" v-if="costShow"
+                  style="width: 80px" :min="0" :max="100" /> -->
+                <div >{{ detailData?.costRatio?.jyKeepPointRatio }}%</div>
               </th>
               <th>
                 <div>¥{{ detailData?.insFeeOrders?.jyKeepPointPremium }}</div>
@@ -1102,9 +1103,22 @@ let bbList = ref([
 // 调整费用
 let costShow = ref(false)
 const handleCostChange = () => {
-  getCostDetail();
   costShow.value = true
 }
+// 留点费用计算
+const handleComputedCostInfo = () => {
+  api.financeApi.computedCostInfo({
+    ...detailData.value.costRatio,
+    orderNo: myRoute.query.id
+  }).then((res: any) => {
+    if (res.code == 200) {
+      detailData.value.costRatio = res.data.costRatio
+      detailData.value.insFeeOrders = res.data.insFeeOrders
+    } else {
+    }
+  })
+}
+// 保存费用
 const handleSaveCostChange = () => {
   api.financeApi.saveCostInfo({
     ...detailData.value.costRatio,
@@ -1291,15 +1305,7 @@ const handleAudit = (type) => {
   })
 }
 
-// 获取费用详情
-let costDetail = ref({})
-const getCostDetail = () => {
-  api.financeApi.auditCostInfo(myRoute.query.id).then((res: any) => {
-    if (res.code == 200) {
-      costDetail.value = res.data
-    }
-  })
-}
+
 
 let isShow = ref('0')