|
@@ -60,7 +60,7 @@
|
|
|
<div class="o-mtb-10" style="height: 10px; background: #f5f5f5"></div>
|
|
|
<!-- 时间 -->
|
|
|
<div class="c-text-c c-text-18">
|
|
|
- {{ $M_FormatTime(searchParams.startDate, 'YYYY-MM-DD') }}--{{ $M_FormatTime(searchParams.endDate, 'YYYY-MM-DD')
|
|
|
+ {{ Format_time(searchParams.startDate, 'YYYY-MM-DD') }}--{{ Format_time(searchParams.endDate, 'YYYY-MM-DD')
|
|
|
}}
|
|
|
</div>
|
|
|
<div class="group7 flex-col justify-center">
|
|
@@ -170,7 +170,7 @@
|
|
|
<div class="outer1 flex-col">
|
|
|
<!-- <span class="txt4">这里是设备名称</span> -->
|
|
|
<span class="info1">{{ $t('orderCenter.business') }}</span>
|
|
|
- <span class="txt5">+{{ refundObject.price }}</span>
|
|
|
+ <span class="txt5">+ {{ refundObject.refundAmount == null ? refundObject.price.toFixed(2) : (refundObject.price - refundObject.refundAmount).toFixed(2) }}</span>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="layer1 flex-col"></div>
|
|
@@ -225,7 +225,6 @@
|
|
|
<kDialog :isCloseForConfirm="false" :dialogTitle="$t('orderCenter.refundTip')"
|
|
|
:confirmBtnTxt="$t('orderCenter.refundSubmit')" ref="kDialogRef" @confirmclk="confirmClk">
|
|
|
<template #content>
|
|
|
-
|
|
|
<!-- <van-field colon required type="number" clearable v-model="cofficentForm.price" class="inputAmount"
|
|
|
:placeholder="$t('orderCenter.refundAmountPlace')" :label="$t('orderCenter.refundAmount')">
|
|
|
<template #extra>
|
|
@@ -278,7 +277,7 @@ import sHeader from "../../components/SimpleHeader";
|
|
|
import orderSearch from "./orderSearch.vue";
|
|
|
import { getOrderList, refundOrder } from "../../service/order/index";
|
|
|
import { Toast } from "vant";
|
|
|
-import { getLoginUser, $M_IsDate, $M_FormatTime, $M_ExportFile, styleUrl } from "../../common/js/utils";
|
|
|
+import { getLoginUser, $M_IsDate, Format_time, $M_ExportFile, styleUrl } from "../../common/js/utils";
|
|
|
import { getHuifuId } from "../../service/huifuMch/index";
|
|
|
import dateUtil from "../../utils/dateUtil";
|
|
|
import dateSelectList from "../../components/dateSelectList";
|
|
@@ -302,7 +301,7 @@ export default {
|
|
|
// 退款商户数量
|
|
|
const refundNum = ref([]);
|
|
|
// 加载状态
|
|
|
- const isLoading = ref(false);
|
|
|
+ // const isLoading = ref(false);
|
|
|
// 监控退款选择框状态
|
|
|
const checkGood = (index) => {
|
|
|
if (isChecked.value[index]) {
|
|
@@ -397,9 +396,9 @@ export default {
|
|
|
// title: "提示",
|
|
|
message: t('orderCenter.refundCheck'),
|
|
|
}).then(() => {
|
|
|
- isLoading.value = true; // 开始加载
|
|
|
+ // isLoading.value = true; // 开始加载
|
|
|
refundAjax();
|
|
|
- isLoading.value = false; // 加载完成
|
|
|
+ // isLoading.value = false; // 加载完成
|
|
|
|
|
|
kDialogRef.value.closeDialog();
|
|
|
}).catch(() => {
|
|
@@ -484,6 +483,7 @@ export default {
|
|
|
// 滚动加载
|
|
|
const onLoad = () => {
|
|
|
if (!finished.value) {
|
|
|
+ loading.value = true;
|
|
|
searchParams.current = searchParams.current + 1;
|
|
|
getList();
|
|
|
}
|
|
@@ -504,8 +504,8 @@ export default {
|
|
|
dateType: "0", // 所选时间类型 String 0:创建时间 1:退款时间
|
|
|
startDate: "", // 开始时间 Date
|
|
|
endDate: "", // 结束时间 Date
|
|
|
- current: 1, // 页数
|
|
|
- size: 20, // 页大小
|
|
|
+ current: 0, // 页数
|
|
|
+ size: 15, // 页大小
|
|
|
status: "",//支付状态
|
|
|
companyType: "", // 公司平台
|
|
|
machineType: "", // 设备类型
|
|
@@ -514,6 +514,7 @@ export default {
|
|
|
let chartType = "day";
|
|
|
// 获取订单列表数据
|
|
|
const getList = async () => {
|
|
|
+ console.log("loading",loading.value);
|
|
|
finished.value = false;
|
|
|
getStatisticsFun();
|
|
|
// 因为订单的时间格式不一样
|
|
@@ -538,38 +539,42 @@ export default {
|
|
|
// 获取订单列表
|
|
|
const { data } = await getOrderList(Object.assign({}, params));
|
|
|
if (data.code === "00000") {
|
|
|
- if (params.current === 1) {
|
|
|
- orderList.value = [];
|
|
|
- }
|
|
|
- // 列表值叠加
|
|
|
- if (data.data) {
|
|
|
- orderList.value = orderList.value.concat(
|
|
|
- data.data.records.map((item) => {
|
|
|
- return {
|
|
|
- ...item,
|
|
|
- statusText:
|
|
|
- item.altInfo != null
|
|
|
- ? t('orderCenter.onlinePayment')
|
|
|
- : t('orderCenter.offlinePayment'),
|
|
|
- };
|
|
|
- })
|
|
|
- );
|
|
|
- orderTotal.value = data.data.total;
|
|
|
- if (
|
|
|
- data.data.total === 0 ||
|
|
|
- (data.data.total > 0 &&
|
|
|
- orderList.value.length === data.data.total) ||
|
|
|
- data.data.records.length === 0
|
|
|
- ) {
|
|
|
+ if (data.data.total === 0) {
|
|
|
+ finished.value = true;
|
|
|
+ } else {
|
|
|
+ // orderTotal.value = data.data.total;
|
|
|
+ if (params.current === 1) {
|
|
|
+ orderList.value = [];
|
|
|
+ orderTotal.value = 0;
|
|
|
+ }
|
|
|
+ // 列表值叠加
|
|
|
+ if (data.data.records.length > 0) {
|
|
|
+ orderList.value = orderList.value.concat(
|
|
|
+ data.data.records.map((item) => {
|
|
|
+ return {
|
|
|
+ ...item,
|
|
|
+ statusText:
|
|
|
+ item.altInfo != null
|
|
|
+ ? t('orderCenter.onlinePayment')
|
|
|
+ : t('orderCenter.offlinePayment'),
|
|
|
+ };
|
|
|
+ })
|
|
|
+ );
|
|
|
+ orderTotal.value = data.data.records.length + orderTotal.value;
|
|
|
+ if (orderTotal.value === data.data.total) {
|
|
|
+ finished.value = true;
|
|
|
+ }
|
|
|
+ } else {
|
|
|
finished.value = true;
|
|
|
}
|
|
|
- } else {
|
|
|
- finished.value = true;
|
|
|
}
|
|
|
loading.value = false;
|
|
|
} else {
|
|
|
- Toast.fail(data.message);
|
|
|
+ // error.value = true;
|
|
|
+ Toast.fail("数据加载失败");
|
|
|
}
|
|
|
+ console.log("finished", finished.value);
|
|
|
+ console.log("loading",loading.value);
|
|
|
};
|
|
|
// 搜索表单点击
|
|
|
const searchClick = () => {
|
|
@@ -602,8 +607,8 @@ export default {
|
|
|
onMounted(async () => {
|
|
|
// 加载样式
|
|
|
styleUrl('orderCenter');
|
|
|
- orderList.value = [];
|
|
|
- searchParams.current = 1;
|
|
|
+ // orderList.value = [];
|
|
|
+ // searchParams.current = 1;
|
|
|
if (user) {
|
|
|
searchParams.adminId = user.id;
|
|
|
searchParams.userName = user.username;
|
|
@@ -624,8 +629,10 @@ export default {
|
|
|
let endDate = new Date(now.getFullYear(), now.getMonth(), now.getDate(), 23, 59, 59);
|
|
|
searchParams.endDate = dateUtil.formateDate(endDate, "yyyy-MM-dd hh:mm:ss");
|
|
|
|
|
|
- finished.value = false;
|
|
|
- getList();
|
|
|
+ // finished.value = false;
|
|
|
+ // getList();
|
|
|
+ onLoad();
|
|
|
+ addEventListener('load', onLoad);
|
|
|
// 获取账户详情
|
|
|
getAccountDetail(user.id);
|
|
|
}
|
|
@@ -815,7 +822,7 @@ export default {
|
|
|
confirmClk,
|
|
|
cofficentForm,
|
|
|
accountDetail,
|
|
|
- $M_FormatTime,
|
|
|
+ Format_time,
|
|
|
searchParams,
|
|
|
orderDetails,
|
|
|
huifuId,
|
|
@@ -828,7 +835,7 @@ export default {
|
|
|
checkGood,
|
|
|
plusRefundGood,
|
|
|
minusRefundGood,
|
|
|
- isLoading,
|
|
|
+ // isLoading,
|
|
|
isRefund,
|
|
|
};
|
|
|
},
|