k94314517
2025-03-19 5b1b663f77cb59599302a93fb6cb2da208602c34
Merge remote-tracking branch 'origin/2.0.1' into 2.0.1
已添加1个文件
已修改8个文件
298 ■■■■ 文件已修改
admin/.env.development 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
admin/src/api/business/goodsorder.js 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
admin/src/components/business/billDetail.vue 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
admin/src/views/business/analysis.vue 203 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
admin/src/views/business/goodsorder.vue 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
admin/src/views/business/onlinePayStatistics.vue 11 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
admin/src/views/business/wxBill.vue 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
admin/src/views/business/wxBillDetail.vue 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
admin/src/views/combo/record.vue 23 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
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
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
  })
}
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>
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>
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()]
    }
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 },
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"
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 {
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">正常</span>
@@ -144,8 +145,17 @@
          clearable: true,
          options: [
            { value: '0', label: '正常' },
            { value: '1', label: '作废' },
            // { value: '2', label: '待支付' }
            { value: '1', label: '作废' }
          ]
        },{
          filed: 'createDate',
          type: 'daterange',
          label: '创建日期',
          placeholder: '请选择状态',
          clearable: true,
          options: [
            { value: '0', label: '正常' },
            { 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,