Эх сурвалжийг харах

调整费用保存按钮加loding,防止连点

@dongkboy 1 сар өмнө
parent
commit
8d687ad83c

+ 5 - 1
src/views/finance/modules/auditDetail.vue

@@ -587,7 +587,7 @@
             <div v-else style="display: flex; align-items: center; justify-content: flex-end">
             <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="costShow = false">取消调整</el-button>
               <el-button size="small" type="primary" plain @click="handleComputedCostInfo">留点计算</el-button>
               <el-button size="small" type="primary" plain @click="handleComputedCostInfo">留点计算</el-button>
-              <el-button size="small" type="primary" plain @click="handleSaveCostChange">保存</el-button>
+              <el-button size="small" type="primary" :loading="handleSaveCostloading" plain @click="handleSaveCostChange">保存</el-button>
             </div>
             </div>
           </div>
           </div>
         </div>
         </div>
@@ -1155,6 +1155,8 @@ const previousRoute = ref(myRouter.options.history.state.back)
 const getAssetsFile = (url: string) => {
 const getAssetsFile = (url: string) => {
   return new URL(`../../../assets/images/insurancePolicy/${url}.png`, import.meta.url).href;
   return new URL(`../../../assets/images/insurancePolicy/${url}.png`, import.meta.url).href;
 };
 };
+// 保存费用信息loading
+let handleSaveCostloading = ref(false)
 // 页签
 // 页签
 let tipsIndex = ref('TBMsg')
 let tipsIndex = ref('TBMsg')
 let tipsList = ref([
 let tipsList = ref([
@@ -1342,11 +1344,13 @@ const handleComputedCostInfo = () => {
 }
 }
 // 保存费用
 // 保存费用
 const handleSaveCostChange = () => {
 const handleSaveCostChange = () => {
+  handleSaveCostloading.value = true
   api.financeApi.saveCostInfo({
   api.financeApi.saveCostInfo({
     ...detailData.value.costRatio,
     ...detailData.value.costRatio,
     orderNo: myRoute.query.id
     orderNo: myRoute.query.id
   }).then((res: any) => {
   }).then((res: any) => {
     if (res.code == 200) {
     if (res.code == 200) {
+      handleSaveCostloading.value = false
       ElMessage({
       ElMessage({
         message: '调整成功',
         message: '调整成功',
         type: 'success'
         type: 'success'