From 5b1b663f77cb59599302a93fb6cb2da208602c34 Mon Sep 17 00:00:00 2001
From: k94314517 <8417338+k94314517@user.noreply.gitee.com>
Date: 星期三, 19 三月 2025 14:26:47 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/2.0.1' into 2.0.1
---
admin/src/views/business/onlinePayStatistics.vue | 11 +-
admin/src/views/combo/record.vue | 23 +++
admin/src/views/business/goodsorder.vue | 7 -
admin/src/api/business/goodsorder.js | 12 ++
admin/src/components/business/billDetail.vue | 8 +
admin/src/views/business/analysis.vue | 203 ++++++++++++++++++++++++++++++++++++++++
admin/src/views/business/wxBillDetail.vue | 11 +
admin/.env.development | 8 -
admin/src/views/business/wxBill.vue | 15 ++-
9 files changed, 267 insertions(+), 31 deletions(-)
diff --git a/admin/.env.development b/admin/.env.development
index b5a4f77..b3b255b 100644
--- a/admin/.env.development
+++ b/admin/.env.development
@@ -8,17 +8,11 @@
# VUE_APP_API_BASE_URL = 'http://192.168.0.191:10026'
# 浠诲悍鏈湴
-VUE_APP_API_BASE_URL = 'http://192.168.0.134:10026'
+VUE_APP_API_BASE_URL = 'http://192.168.0.137:10026'
# 钀嶅鏈湴
-<<<<<<< HEAD
# VUE_APP_API_BASE_URL = 'http://192.168.0.102:10026'
# 鍚庣鎺ュ彛鍦板潃
# VUE_APP_API_BASE_URL = 'https://dmtest.ahapp.net/bike_admin_api'
-=======
-# VUE_APP_API_BASE_URL = 'http://192.168.0.129:10026'
-# 鍚庣鎺ュ彛鍦板潃
-VUE_APP_API_BASE_URL = 'https://dmtest.ahapp.net/bike_admin_api'
->>>>>>> 32dbee794a7f1b0e407eaf8aa17fa55d9c4f6883
diff --git a/admin/src/api/business/goodsorder.js b/admin/src/api/business/goodsorder.js
index cfbb69b..c2178e4 100644
--- a/admin/src/api/business/goodsorder.js
+++ b/admin/src/api/business/goodsorder.js
@@ -35,7 +35,19 @@
export function closerGoodsorder (id) {
return request.post('/business/goodsorder/closerGoodsorder', {id})
}
+// 杞﹀瀷鏀跺叆鍒嗘瀽
+export function getBikeIncomeReportVOList (data) {
+ return request.post('/business/goodsorder/getBikeIncomeReportVOList', data)
+}
// 鑾峰彇鍙��娆句俊鎭�
export function getGoodsorderCanBanlanceDTO (params) {
return request.get('/business/goodsorder/getGoodsorderCanBanlanceDTO', {params})
}
+
+// 瀵煎嚭Excel
+export function bikeIncomeExportExcel (data) {
+ return request.post('/business/goodsorder/bikeIncomeExportExcel', data, {
+ trim: true,
+ download: true
+ })
+}
diff --git a/admin/src/components/business/billDetail.vue b/admin/src/components/business/billDetail.vue
index 7b9c974..7165abb 100644
--- a/admin/src/components/business/billDetail.vue
+++ b/admin/src/components/business/billDetail.vue
@@ -12,6 +12,14 @@
>
<el-table-column prop="openid" label="鐢ㄦ埛" min-width="100px" align="center"></el-table-column>
<el-table-column prop="code" label="璁㈠崟缂栧彿" min-width="100px" align="center"></el-table-column>
+ <el-table-column label="璁㈠崟绫诲瀷" min-width="100px" align="center">
+ <template slot-scope="scope">
+ <span v-if="scope.row.bikeType === 1">濂楅璁㈠崟</span>
+ <span v-else-if="scope.row.bikeType === 3">鑷杞﹁鍗�</span>
+ <span v-else-if="scope.row.bikeType === 4">鐢靛姩杞﹁鍗�</span>
+ <span v-else>-</span>
+ </template>
+ </el-table-column>
<el-table-column prop="payDate" label="鏀粯鏃堕棿" min-width="100px" align="center"></el-table-column>
<el-table-column prop="money" label="鏀粯閲戦" width="80px" align="center"></el-table-column>
<el-table-column prop="refundDate" label="閫�娆炬椂闂�" width="150px" align="center"></el-table-column>
diff --git a/admin/src/views/business/analysis.vue b/admin/src/views/business/analysis.vue
new file mode 100644
index 0000000..4438759
--- /dev/null
+++ b/admin/src/views/business/analysis.vue
@@ -0,0 +1,203 @@
+<template>
+ <TableLayout :permissions="['business:wxbill:query']">
+ <!-- 鎼滅储琛ㄥ崟 -->
+ <el-form ref="searchForm" slot="search-form" :model="searchForm" label-width="100px" inline>
+ <el-form-item label="瀵硅处鏃ユ湡" prop="name">
+ <el-date-picker
+ v-model="value1"
+ type="daterange"
+ range-separator="鑷�"
+ start-placeholder="寮�濮嬫棩鏈�"
+ end-placeholder="缁撴潫鏃ユ湡"
+ :picker-options="pickerOptions"
+ format="yyyy-MM-dd" value-format="yyyy-MM-dd HH:mm:ss"
+ @change="selectDate"
+ ></el-date-picker>
+ </el-form-item>
+ <section>
+ <el-button type="primary" @click="search">鎼滅储</el-button>
+ <el-button @click="reset">閲嶇疆</el-button>
+ <el-button type="primary" @click="daochu">瀵煎嚭</el-button>
+ </section>
+ </el-form>
+ <!-- 琛ㄦ牸鍜屽垎椤� -->
+ <template v-slot:table-wrap>
+ <el-table
+ v-loading="isWorking.search"
+ :data="list"
+ stripe
+ border
+ >
+ <el-table-column :prop="item" :label="item" align="center" v-for="(item, index) in column" :key="index"></el-table-column>
+ </el-table>
+ </template>
+ </TableLayout>
+</template>
+
+<script>
+ import BaseTable from '@/components/base/BaseTable'
+ import TableLayout from '@/layouts/TableLayout'
+ import Pagination from '@/components/common/Pagination'
+ import { getBikeIncomeReportVOList, bikeIncomeExportExcel } from '@/api/business/goodsorder'
+ export default {
+ name: 'analysis',
+ extends: BaseTable,
+ components: { TableLayout, Pagination },
+ data () {
+ return {
+ value1: [],
+ list: [],
+ column: [],
+ // 鎼滅储
+ searchForm: {
+ endDate: '',
+ startDate: ''
+ },
+ sumData: {
+ },
+ pickerOptions: {}
+ }
+ },
+ created () {
+ this.config({
+ module: '',
+ api: '/business/wxBill',
+ 'field.id': 'id',
+ 'field.main': 'id'
+ })
+ this.pickerOptions.disabledDate = (time) => {
+ // 涓�澶�
+ const tempTime = 3600 * 1000 * 24
+ return time.getTime() > new Date() - tempTime
+ }
+ const yesterday = new Date();
+ yesterday.setDate(yesterday.getDate() - 1);
+ const startDate = new Date(yesterday);
+ startDate.setDate(startDate.getDate() - 30);
+ this.searchForm.startDate = startDate.toISOString().split('T')[0] + ' 00:00:00'
+ this.searchForm.endDate = yesterday.toISOString().split('T')[0] + ' 00:00:00'
+ this.value1 = [this.searchForm.startDate, this.searchForm.endDate]
+ this.search()
+ },
+ methods: {
+ search() {
+ getBikeIncomeReportVOList({
+ startDate: this.searchForm.startDate,
+ endDate: this.searchForm.endDate
+ }).then(res => {
+ this.column = res.map(item => item[0])
+
+ const keys = res.map(row => row[0]); // 鑾峰彇閿悕
+ const values = res.map(row => row.slice(1, row.length)); // 鑾峰彇鍊�
+
+ this.list = values[0].map((_, index) => {
+ return keys.reduce((obj, key, i) => {
+ obj[key] = values[i][index];
+ return obj;
+ }, {});
+ });
+ })
+ },
+ daochu() {
+ bikeIncomeExportExcel({
+ startDate: this.searchForm.startDate,
+ endDate: this.searchForm.endDate
+ }).then(res => {
+ this.download(res)
+ console.log(res.data)
+ })
+ },
+ reset () {
+ const yesterday = new Date();
+ yesterday.setDate(yesterday.getDate() - 1);
+ const startDate = new Date(yesterday);
+ startDate.setDate(startDate.getDate() - 30);
+ this.searchForm.startDate = startDate.toISOString().split('T')[0] + ' 00:00:00'
+ this.searchForm.endDate = yesterday.toISOString().split('T')[0] + ' 00:00:00'
+ this.value1 = [this.searchForm.startDate, this.searchForm.endDate]
+ this.search()
+ },
+ getDays(startDate, endDate) {
+ const date1 = new Date(startDate); // 绗竴涓棩鏈�
+ const date2 = new Date(endDate); // 绗簩涓棩鏈�
+
+ const timeDifference = date2 - date1;
+
+ return timeDifference / (1000 * 3600 * 24);
+ },
+ selectDate (v) {
+ // this.searchForm.startDate = ''
+ // this.searchForm.endDate = ''
+ if (v) {
+ if (this.getDays(v[0], v[1]) > 30) {
+ this.$message.warning('鏈�澶氬彧鑳介�夋嫨30澶�')
+ const yesterday = new Date();
+ yesterday.setDate(yesterday.getDate() - 1);
+ const startDate = new Date(yesterday);
+ startDate.setDate(startDate.getDate() - 30);
+ this.searchForm.startDate = startDate.toISOString().split('T')[0] + ' 00:00:00'
+ this.searchForm.endDate = yesterday.toISOString().split('T')[0] + ' 00:00:00'
+ this.value1 = [this.searchForm.startDate, this.searchForm.endDate]
+ } else {
+ this.searchForm.startDate = v[0]
+ this.searchForm.endDate = v[1]
+ }
+ }
+ this.search()
+ },
+ // 椤电爜鍙樻洿澶勭悊
+ handlePageChange (pageIndex) {
+ this.__checkApi()
+ this.tableData.pagination.pageIndex = pageIndex || this.tableData.pagination.pageIndex
+ this.isWorking.search = true
+ this.api.fetchList({
+ page: this.tableData.pagination.pageIndex,
+ capacity: this.tableData.pagination.pageSize,
+ model: this.searchForm,
+ sorts: this.tableData.sorts
+ })
+ .then(data => {
+ this.tableData.list = data.records
+ this.tableData.pagination.total = data.total
+ this.sumData = data.extData
+ })
+ .catch(e => {
+ this.$tip.apiFailed(e)
+ })
+ .finally(() => {
+ this.isWorking.search = false
+ })
+ }
+ }
+ }
+</script>
+<style lang="scss" scoped>
+ ::v-deep .el-table tr:last-child {
+ font-size: 16px;
+ font-weight: bold;
+ background-color: #f3f3fb;
+ }
+ .sum {
+ display: flex;
+ font-size: 16px;
+ margin-bottom: 10px;
+ background-color: rgb(243, 243, 251);
+ .sum-title {
+ flex-shrink: 0;
+ background-color: rgb(111, 129, 198);
+ color: #fff;
+ font-weight: 500;
+ text-align: center;
+ padding: 15px;
+ }
+ .sum-value {
+ padding: 15px 30px;
+ :first-child {
+ font-size: 14px;
+ }
+ :last-child {
+ font-weight: 600;
+ }
+ }
+ }
+</style>
diff --git a/admin/src/views/business/goodsorder.vue b/admin/src/views/business/goodsorder.vue
index e862a01..3319ed0 100644
--- a/admin/src/views/business/goodsorder.vue
+++ b/admin/src/views/business/goodsorder.vue
@@ -161,16 +161,11 @@
payStatus: '',
payWay: '',
payDate: '',
- type: '',
+ type: 0,
closeMoney: '',
startDate: '',
endDate: '',
-<<<<<<< HEAD
bikeType: ''
-=======
- type: 0
-
->>>>>>> 32dbee794a7f1b0e407eaf8aa17fa55d9c4f6883
},
value1: [new Date(), new Date()]
}
diff --git a/admin/src/views/business/onlinePayStatistics.vue b/admin/src/views/business/onlinePayStatistics.vue
index 5178a32..0ed4b12 100644
--- a/admin/src/views/business/onlinePayStatistics.vue
+++ b/admin/src/views/business/onlinePayStatistics.vue
@@ -2,12 +2,12 @@
<TableLayout>
<!-- 鎼滅储琛ㄥ崟 -->
<el-form ref="searchForm" slot="search-form" :model="searchForm" label-width="100px" inline>
-
+
<el-form-item label="鍒涘缓鏃堕棿" prop="name">
<el-date-picker
v-model="value1"
type="daterange"
-
+
range-separator="鑷�"
start-placeholder="寮�濮嬫棩鏈�"
end-placeholder="缁撴潫鏃ユ湡"
@@ -15,7 +15,7 @@
@change="selectDate"
></el-date-picker>
</el-form-item>
-
+
<section>
<el-button type="primary" @click="search">鎼滅储</el-button>
<el-button @click="reset">閲嶇疆</el-button>
@@ -45,7 +45,7 @@
></el-table-column>
</el-table-column>
</el-table>
-
+
</template>
<!-- 鏂板缓/淇敼 -->
</TableLayout>
@@ -83,11 +83,12 @@
this.$refs.searchForm.resetFields()
this.search()
},
-
+
search() {
fetchList(this.searchForm)
.then(res => {
this.tableData.list = [
+ { name: '濂楅鏀跺叆', payNum: res.discountNum, payMoney: res.discountMoney },
{ name: '鏀粯鎶奸噾', payNum: res.payNum, payMoney: res.payMoney },
{ name: '閫�娆�', payNum: res.refundNum, payMoney: res.refundMoney },
{ name: '鏈粨绠�', payNum: res.unClosedNum, payMoney: res.unClosedMoney },
diff --git a/admin/src/views/business/wxBill.vue b/admin/src/views/business/wxBill.vue
index 0f5042d..3f014da 100644
--- a/admin/src/views/business/wxBill.vue
+++ b/admin/src/views/business/wxBill.vue
@@ -55,6 +55,14 @@
<div>缁撶畻閲戦(鍏�)</div>
<div>{{ sumData.total }}</div>
</div>
+ <div class="sum-value">
+ <div>楠戣鏀跺叆(鍏�)</div>
+ <div>{{ sumData.bikeFee }}</div>
+ </div>
+ <div class="sum-value">
+ <div>濂楅鏀跺叆(鍏�)</div>
+ <div>{{ sumData.discountFee }}</div>
+ </div>
</div>
<el-table
v-loading="isWorking.search"
@@ -70,12 +78,9 @@
<el-table-column prop="sumRefundBill" label="閫�娆剧瑪鏁�" min-width="100px" align="center"></el-table-column>
<el-table-column prop="sumRefundFee" label="閫�娆鹃噾棰�(鍏�)" min-width="100px" align="center"></el-table-column>
<el-table-column prop="sumRefundCmmsAmt" label="閫�娆炬墜缁垂(鍏�)" min-width="100px" align="center"></el-table-column>
-
- <!-- <el-table-column prop="sumSuccessFee" label="搴旂粨璁㈠崟鎬婚噾棰�" min-width="100px" align="center"></el-table-column>
- <el-table-column prop="sumCouponRefundFee" label="鍏呭�煎埜閫�娆炬�婚噾棰�" min-width="100px" align="center"></el-table-column>
- <el-table-column prop="sumApplyRefundFee" label="鐢宠閫�娆炬�婚噾棰�" min-width="100px" align="center"></el-table-column> -->
<el-table-column prop="total" label="缁撶畻閲戦(鍏�)" min-width="100px" align="center"></el-table-column>
- <el-table-column prop="bikeFee" label="鑷杞︽敹鍏�(鍏�)" min-width="100px" align="center"></el-table-column>
+ <el-table-column prop="bikeFee" label="楠戣鏀跺叆(鍏�)" min-width="100px" align="center"></el-table-column>
+ <el-table-column prop="discountFee" label="濂楅鏀跺叆(鍏�)" min-width="100px" align="center"></el-table-column>
</el-table>
<pagination
@size-change="handleSizeChange"
diff --git a/admin/src/views/business/wxBillDetail.vue b/admin/src/views/business/wxBillDetail.vue
index 2f72f38..8f3bbb4 100644
--- a/admin/src/views/business/wxBillDetail.vue
+++ b/admin/src/views/business/wxBillDetail.vue
@@ -60,9 +60,14 @@
<span>{{scope.row.total == 0 ? '-' : scope.row.total }}</span>
</template>
</el-table-column>
- <el-table-column prop="bikefee" label="鑷杞︽敹鍏ワ紙鍏冿級" min-width="100px" align="center">
+ <el-table-column prop="bikefee" label="楠戣鏀跺叆锛堝厓锛�" min-width="100px" align="center">
<template slot-scope="scope">
<span>{{scope.row.bikeFee == 0 ? '-' : scope.row.bikeFee }}</span>
+ </template>
+ </el-table-column>
+ <el-table-column label="濂楅鏀跺叆(鍏�)" min-width="100px" align="center">
+ <template slot-scope="scope">
+ <span>{{scope.row.discountFee == 0 ? '-' : scope.row.discountFee }}</span>
</template>
</el-table-column>
<!-- v-if="containPermissions(['business:pricingparam:update', 'business:pricingparam:delete'])" -->
@@ -81,7 +86,6 @@
</template>
</el-table-column>
</el-table>
-
</template>
<BillDetailWindow ref="billDetailWindow"/>
</TableLayout>
@@ -192,7 +196,6 @@
search () {
fetchList(this.searchForm)
.then(res => {
- console.log(res)
this.tableData.list = [
{ billType: '浜ゆ槗瀹炴敹', ...res[0], cmmsAmt: (res[0].sumCmmsAmt + res[0].sumRefundCmmsAmt).toFixed(2) },
{ billType: '閫�娆�', ...res[1], cmmsAmt: (res[1].sumCmmsAmt + res[1].sumRefundCmmsAmt).toFixed(2) },
@@ -212,7 +215,7 @@
this.search()
},
arraySpanMethod ({ row, column, rowIndex, columnIndex }) {
- if (rowIndex == 3) {
+ if (rowIndex === 3) {
if (columnIndex === 0) {
return [1, 8]
} else {
diff --git a/admin/src/views/combo/record.vue b/admin/src/views/combo/record.vue
index 4333ac9..d87a233 100644
--- a/admin/src/views/combo/record.vue
+++ b/admin/src/views/combo/record.vue
@@ -32,6 +32,7 @@
<span>{{ scope.row.useStartDate }}鑷硔{ scope.row.useEndDate }}</span>
</template>
</el-table-column>
+ <el-table-column align="center" label="鍒涘缓鏃堕棿" min-width="150" prop="createDate" show-overflow-tooltip />
<el-table-column align="center" label="濂楅鐘舵��" min-width="80">
<template v-slot="scope">
<span v-if="scope.row.status == '0'" class="text_success">姝e父</span>
@@ -144,8 +145,17 @@
clearable: true,
options: [
{ value: '0', label: '姝e父' },
- { value: '1', label: '浣滃簾' },
- // { value: '2', label: '寰呮敮浠�' }
+ { value: '1', label: '浣滃簾' }
+ ]
+ },{
+ filed: 'createDate',
+ type: 'daterange',
+ label: '鍒涘缓鏃ユ湡',
+ placeholder: '璇烽�夋嫨鐘舵��',
+ clearable: true,
+ options: [
+ { value: '0', label: '姝e父' },
+ { value: '1', label: '浣滃簾' }
]
}],
online: true
@@ -171,7 +181,6 @@
remarkCan: '',
// 猬囷笍adjust璋冩暣鐩稿叧
isShowAdjust: false,
- isShowCan: false,
canList: [],
adjustData: {
flag: 0,
@@ -233,9 +242,15 @@
const { pagination, filters } = this
this.loading = true
if (page) { pagination.page = page }
+ let form = JSON.parse(JSON.stringify(filters))
+ if (form.createDate && form.createDate.length > 0) {
+ form.startCreateDate = form.createDate[0]
+ form.endCreateDate = form.createDate[1]
+ delete form.createDate
+ }
comboSalePage({
model: {
- ...filters
+ ...form
},
capacity: pagination.pageSize,
page: pagination.page,
--
Gitblit v1.9.3