|
@@ -159,10 +159,10 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="line flex-col"></div>
|
|
|
- <!-- <div class="layer2 flex-row justify-between">
|
|
|
- <span class="info2">{{ $t('orderCenter.accountBalance') }}</span>
|
|
|
- <span class="txt6">{{ accountDetail.altAvilBalance }}</span>
|
|
|
- </div> -->
|
|
|
+ <div class="orderDetailBox flex-row justify-between" v-if="user.ifForeign === '0' && user.type === 2">
|
|
|
+ <span class="title">{{ $t('orderCenter.accountBalance') }}</span>
|
|
|
+ <span class="content">{{ "¥ " + balance }} </span>
|
|
|
+ </div>
|
|
|
<div class="orderDetailBox flex-row justify-between">
|
|
|
<span class="title">{{ $t('orderCenter.orderNo') }}</span>
|
|
|
<!-- <span class="content">{{ refundObject.sn }}</span> -->
|
|
@@ -299,7 +299,7 @@ import orderSearch from "./orderSearch.vue";
|
|
|
import { getOrderList, refundOrder, refundWechatOrder, updateIsInvoice, sentMessage, exportOrder, refundSqbOrder } from "../../service/order/index";
|
|
|
import { showFailToast, showToast, showLoadingToast } from "vant";
|
|
|
import { getLoginUser, $M_IsDate, Format_time, $M_ExportFile, styleUrl } from "../../common/js/utils";
|
|
|
-import { getHuifuId } from "../../service/huifuMch/index";
|
|
|
+import { getHuifuId, checkBalance } from "../../service/huifuMch/index";
|
|
|
import dateUtil from "../../utils/dateUtil";
|
|
|
import dateSelectList from "../../components/dateSelectList";
|
|
|
// import typeSelectList from "../../components/typeSelectList";
|
|
@@ -328,6 +328,8 @@ export default {
|
|
|
const orderType = ref('');
|
|
|
// 是否开发票
|
|
|
const isInvoice = ref(0);
|
|
|
+ // 账户余额
|
|
|
+ const balance = ref(0);
|
|
|
// 更新是否开发票
|
|
|
const updateInvoice = async (id) => {
|
|
|
const params = {
|
|
@@ -692,8 +694,6 @@ export default {
|
|
|
onMounted(async () => {
|
|
|
// 加载样式
|
|
|
styleUrl('orderCenter');
|
|
|
- // orderList.value = [];
|
|
|
- // searchParams.current = 1;
|
|
|
if (user) {
|
|
|
searchParams.adminId = user.id;
|
|
|
searchParams.userName = user.username;
|
|
@@ -721,8 +721,12 @@ export default {
|
|
|
addEventListener('load', onLoad);
|
|
|
// 获取账户详情
|
|
|
if (user.ifForeign === '0') {
|
|
|
- getAccountDetail(user.id);
|
|
|
- }
|
|
|
+ if (user.payPlatform === '0' || user.payPlatform === null) {
|
|
|
+ getAccountDetail(user.id);
|
|
|
+ } else if (user.payPlatform === '1') {
|
|
|
+ getHuifuBalance(user.id);
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
});
|
|
|
|
|
@@ -783,8 +787,15 @@ export default {
|
|
|
const getAccountDetail = (id) => {
|
|
|
getAdminMch({ id }).then(res => {
|
|
|
accountDetail.value = res.data.data;
|
|
|
+ balance.value = res.data.data.altMainBalance;
|
|
|
})
|
|
|
};
|
|
|
+ // 查询汇付账户余额
|
|
|
+ const getHuifuBalance = (id) => {
|
|
|
+ checkBalance({ adminId: id }).then(res => {
|
|
|
+ balance.value = res.data.data;
|
|
|
+ })
|
|
|
+ }
|
|
|
// 订单时间格式转换
|
|
|
const showOrderTime = (item, idx) => {
|
|
|
if (idx === 1) {
|
|
@@ -966,7 +977,8 @@ export default {
|
|
|
orderType,
|
|
|
isInvoice,
|
|
|
updateInvoice,
|
|
|
- total
|
|
|
+ total,
|
|
|
+ balance
|
|
|
};
|
|
|
},
|
|
|
};
|