update 订单列表页、站点订单列表页 创建时间 为 结算时间

This commit is contained in:
Lemon
2023-08-21 11:42:33 +08:00
parent 09bc80b2bc
commit 256cd1d2e2
3 changed files with 687 additions and 684 deletions

View File

@@ -385,12 +385,12 @@ public class OrderBasicInfoServiceImpl implements IOrderBasicInfoService {
} }
OrderTotalDataVO vo = new OrderTotalDataVO(); OrderTotalDataVO vo = new OrderTotalDataVO();
String startTime = dto.getStartTime() == null ? DateUtils.parseDateToStr(DateUtils.YYYY_MM_DD, DateUtils.addDays(new Date(), -7)) : dto.getStartTime(); // 2023-08-16 00:00:00 String startTime = dto.getStartSettleTime() == null ? DateUtils.parseDateToStr(DateUtils.YYYY_MM_DD, DateUtils.addDays(new Date(), -7)) : dto.getStartSettleTime(); // 2023-08-16 00:00:00
String endTime = dto.getEndTime() == null ? DateUtils.parseDateToStr(DateUtils.YYYY_MM_DD, new Date()) : dto.getEndTime(); // 2023-08-16 23:59:59 String endTime = dto.getEndSettleTime() == null ? DateUtils.parseDateToStr(DateUtils.YYYY_MM_DD, new Date()) : dto.getEndSettleTime(); // 2023-08-16 23:59:59
vo.setDateDescription(startTime + " - " + endTime);
// 格式化时间 // 格式化时间
startTime = DateUtils.parseDateToStr(DateUtils.YYYY_MM_DD, DateUtils.parseDate(startTime)); // 2023-08-16 startTime = DateUtils.parseDateToStr(DateUtils.YYYY_MM_DD, DateUtils.parseDate(startTime)); // 2023-08-16
endTime = DateUtils.parseDateToStr(DateUtils.YYYY_MM_DD, DateUtils.parseDate(endTime)); // 2023-08-16 endTime = DateUtils.parseDateToStr(DateUtils.YYYY_MM_DD, DateUtils.parseDate(endTime)); // 2023-08-16
vo.setDateDescription(startTime + "" + endTime);
List<SettleOrderReport> settleOrderReports = settleOrderReportService.queryOrderReport(stationIdList, startTime, endTime); List<SettleOrderReport> settleOrderReports = settleOrderReportService.queryOrderReport(stationIdList, startTime, endTime);
// 总消费金额 // 总消费金额
BigDecimal sumOrderAmount = BigDecimal.ZERO; BigDecimal sumOrderAmount = BigDecimal.ZERO;

File diff suppressed because it is too large Load Diff

View File

@@ -36,9 +36,9 @@
/> />
</el-form-item> </el-form-item>
<el-form-item label="创建时间"> <el-form-item label="结算时间">
<el-date-picker <el-date-picker
v-model="createTimeRange" v-model="settleTimeRange"
style="width: 240px" style="width: 240px"
value-format="yyyy-MM-dd HH:mm:ss" value-format="yyyy-MM-dd HH:mm:ss"
:default-time="['00:00:00', '23:59:59']" :default-time="['00:00:00', '23:59:59']"
@@ -157,7 +157,7 @@ export default {
dicts: ['order_status', 'start_mode', 'pay_mode', 'pay_status'], dicts: ['order_status', 'start_mode', 'pay_mode', 'pay_status'],
data() { data() {
return { return {
dateDescription: '', dateDescription: "",
sumOrderAmount:'', sumOrderAmount:'',
sumUsedElectricity:'', sumUsedElectricity:'',
// 遮罩 // 遮罩
@@ -190,8 +190,8 @@ export default {
mobileNumber: null, mobileNumber: null,
orderStatus: null, orderStatus: null,
stationId: this.stationId, stationId: this.stationId,
startTime: null, startSettleTime: null,
endTime: null, endSettleTime: null,
}, },
// 表单参数 // 表单参数
form: {}, form: {},
@@ -199,8 +199,8 @@ export default {
rules: {}, rules: {},
// 站点列表 // 站点列表
stationList: [], stationList: [],
// 订单创建时间范围 // 订单结算时间范围
createTimeRange: [], settleTimeRange: [],
}; };
}, },
created() { created() {
@@ -222,7 +222,8 @@ export default {
this.loading = true; this.loading = true;
listOrder(this.queryParams).then(response => { listOrder(this.queryParams).then(response => {
this.orderList = response.rows; this.orderList = response.rows;
console.log('order里面的参数', this.orderList) console.log('this.queryParams', this.queryParams)
console.log('response', response)
this.total = response.total; this.total = response.total;
this.loading = false; this.loading = false;
}); });
@@ -322,15 +323,15 @@ export default {
//字符串拼接,开始时间,结束时间 //字符串拼接,开始时间,结束时间
let beg = getDay(-7) + " 00:00:00"; //当月第一天 let beg = getDay(-7) + " 00:00:00"; //当月第一天
let end = getDay(0) + " 23:59:59"; //当天 let end = getDay(0) + " 23:59:59"; //当天
this.createTimeRange = [beg, end] //将值设置给插件绑定的数据 this.settleTimeRange = [beg, end] //将值设置给插件绑定的数据
// console.log("defaultDate", this.createTimeRange); // console.log("defaultDate", this.settleTimeRange);
}, },
}, },
watch: { watch: {
createTimeRange(newValue, oldValue) { settleTimeRange(newValue, oldValue) {
if (newValue != null && newValue.length > 0) { if (newValue != null && newValue.length > 0) {
this.queryParams.startTime = newValue[0]; this.queryParams.startSettleTime = newValue[0];
this.queryParams.endTime = newValue[1]; this.queryParams.endSettleTime = newValue[1];
} }
}, },
} }