Explorar o código

fix: 调整金额传两位小数格式给支付宝

alphah hai 1 mes
pai
achega
5947721c38

+ 1 - 1
backend/app/plugin/module_payment/expense/quota/service.py

@@ -798,7 +798,7 @@ class QuotaService:
         model.action = "ADD" if diff >= 0 else "DEDUCT"
         model.outer_source_id = outer_source_id
         model.enterprise_id = data.enterprise_id
-        model.amount = str(abs(diff))
+        model.amount = f"{abs(diff):.2f}"
 
         request = AlipayEbppInvoiceExpensecontrolQuotaModifyRequest()
         request.biz_model = model

+ 2 - 2
frontend/src/views/module_payment/institution/components/QuotaList.vue

@@ -50,8 +50,8 @@
       <el-table-column label="操作" width="220" align="center" fixed="right">
         <template #default="scope">
           <el-button type="text" size="small" @click="handleDetail(scope.row)">详情</el-button>
-          <el-button v-if="scope.row.quota_id" type="text" size="small" @click="handleAdjust(scope.row)">调整金额</el-button>
-          <el-button v-if="scope.row.quota_id" type="text" size="small" @click="handleChanges(scope.row)">变更记录</el-button>
+          <el-button type="text" size="small" @click="handleAdjust(scope.row)">调整金额</el-button>
+          <el-button type="text" size="small" @click="handleChanges(scope.row)">变更记录</el-button>
         </template>
       </el-table-column>
     </el-table>