diff --git a/src/views/audit/gold/refundAudit.vue b/src/views/audit/gold/refundAudit.vue index 4472628..7235552 100644 --- a/src/views/audit/gold/refundAudit.vue +++ b/src/views/audit/gold/refundAudit.vue @@ -177,6 +177,7 @@ const tableData = ref([]) const marketOptions = ref([]) const refundGoodsOptions = ref([]) const adminInfo = ref({}) + // 统计合计数 const stats = ref({ totalNum: 0, @@ -284,7 +285,7 @@ const handleApprove = async (row) => { try { const params = { orderCode: row.orderCode, - auditId: adminInfo.value.id, + auditId: adminData.value.id, action: 1,// action的1是通过,2是驳回 rejectReason: '' } diff --git a/src/views/usergold/gold/clientCountBalance.vue b/src/views/usergold/gold/clientCountBalance.vue index c76e86f..639ac40 100644 --- a/src/views/usergold/gold/clientCountBalance.vue +++ b/src/views/usergold/gold/clientCountBalance.vue @@ -137,7 +137,20 @@ const get = async function (val) { // 分页总数设置为 0 total.value = 0 // ElMessage.warning('精网号不存在,请检查输入') - } else { + } + // 判断合计数是否存在,不存在时 result.data.list 为空数组 + if(resultGoldTotal.data===0){ + // 将表格数据设置为空数组 + tableData.value = [] + // 将合计数设置为 0 + permanentGold.value = 0 + freeJuneGold.value = 0 + freeDecemberGold.value = 0 + taskGold.value = 0 + goldtotal.value = 0 + freeGold.value = 0 + } + else { // 将响应结果存储到响应式数据中 console.log('总数据请求成功', result) // 存储表格数据 diff --git a/src/views/usergold/gold/clientCountDetail.vue b/src/views/usergold/gold/clientCountDetail.vue index b2286be..1fd2daa 100644 --- a/src/views/usergold/gold/clientCountDetail.vue +++ b/src/views/usergold/gold/clientCountDetail.vue @@ -203,6 +203,15 @@ const get = async function (val) { totalFreeGold.value = data.freeGolds totalTaskGold.value = data.taskGolds totalGoldTotal.value = data.sumGolds + } + if (totalResult.code === 0) { + // 将表格数据设置为空数组 + tableData.value = [] + totalPermanentGold.value = 0 + totalFreeGold.value = 0 + totalTaskGold.value = 0 + totalGoldTotal.value = 0 + } else { ElMessage.error('获取合计数据失败') } @@ -216,9 +225,7 @@ const get = async function (val) { // 重置 const reset = function () { - goldDetail.value ={ - - } + goldDetail.value = {} goldDetail.value.markets = [] selectedMarketPath.value = [] delete sortField.value @@ -478,8 +485,8 @@ const getMarket = async function () { } } const format3 = (num) => { - // 每三位添加逗号 - return num.toLocaleString('en-US') + // 每三位添加逗号 + return num.toLocaleString('en-US') }