pull/17/head
xk_chenlianjie 1 year ago
parent ad61e9693b
commit 9682a02cd8
  1. 2
      src/api/order/orderInfo.js
  2. 11
      src/views/dashboard/admin/index.scss
  3. 6
      src/views/dashboard/admin/index.vue
  4. 4
      src/views/order/orderList.vue
  5. 4
      src/views/order/orderListDetail.vue
  6. 38
      src/views/product/productList/index.vue
  7. 50
      src/views/statistics/productStatisticsList.vue

@ -79,7 +79,7 @@ export default {
exportExcel(page) { exportExcel(page) {
// 导出 // 导出
return request({ return request({
url: `/${service_name}/${group_name}/exportWeb`, url: `/${service_name}/${group_name}/getByPageExport`,
method: 'post', method: 'post',
data: page, data: page,
responseType: 'blob' responseType: 'blob'

@ -84,7 +84,10 @@
font-size: 20px; font-size: 20px;
font-weight: 600; font-weight: 600;
} }
.page{ .mt{
height:calc(100vh - 144px); margin-top: 30px;
box-sizing: border-box; }
} // .page{
// height:calc(100vh - 144px);
// box-sizing: border-box;
// }

@ -104,14 +104,14 @@
<span class="card-title">订单统计</span> <span class="card-title">订单统计</span>
</div> </div>
<div class="orderStatistics-card flex"> <div class="orderStatistics-card flex">
<div class="orderStatistics-card-left flex column js"> <div class="orderStatistics-card-left flex column jc">
<div class="orderStatistics-card-left-item"> <div class="orderStatistics-card-left-item">
<div class="orderStatistics-card-left-item-title">本月订单总数</div> <div class="orderStatistics-card-left-item-title">本月订单总数</div>
<div class="orderStatistics-card-left-item-number">10000</div> <div class="orderStatistics-card-left-item-number">10000</div>
<div class="orderStatistics-card-left-item-title">10% 同比上周</div> <div class="orderStatistics-card-left-item-title">10% 同比上周</div>
</div> </div>
<div class="orderStatistics-card-left-item"> <div class="orderStatistics-card-left-item mt">
<div class="orderStatistics-card-left-item-title">月订单总数</div> <div class="orderStatistics-card-left-item-title">周订单数量</div>
<div class="orderStatistics-card-left-item-number">10000</div> <div class="orderStatistics-card-left-item-number">10000</div>
<div class="orderStatistics-card-left-item-title">10% 同比上周</div> <div class="orderStatistics-card-left-item-title">10% 同比上周</div>
</div> </div>

@ -60,7 +60,7 @@
</el-table-column> </el-table-column>
<el-table-column label="用户账号" min-width="120" align="center"> <el-table-column label="用户账号" min-width="120" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ scope.row.acctId }}</span> <span>{{ scope.row.customerPhone }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="订单金额" min-width="60" align="center"> <el-table-column label="订单金额" min-width="60" align="center">
@ -283,7 +283,7 @@ export default {
const searchParam = { ...this.page } const searchParam = { ...this.page }
searchParam.pageSize = endIndex searchParam.pageSize = endIndex
searchParam.currentPage = this.output.startPage searchParam.currentPage = this.output.startPage
orderInfoApi.getByPage(searchParam).then(res => { orderInfoApi.exportExcel(searchParam).then(res => {
const link = document.createElement('a') const link = document.createElement('a')
// Blob // Blob
const blob = new Blob([res], { type: 'application/vnd.ns-excel' }) // MIME const blob = new Blob([res], { type: 'application/vnd.ns-excel' }) // MIME

@ -6,7 +6,7 @@
</div> </div>
<el-descriptions title="基本信息" class="text" direction="vertical" :column="6" border> <el-descriptions title="基本信息" class="text" direction="vertical" :column="6" border>
<el-descriptions-item label="订单编号">{{ detailData.orderCode }}</el-descriptions-item> <el-descriptions-item label="订单编号">{{ detailData.orderCode }}</el-descriptions-item>
<el-descriptions-item label="用户账号">{{ detailData.acctId }}</el-descriptions-item> <el-descriptions-item label="用户账号">{{ detailData.customerPhone }}</el-descriptions-item>
<el-descriptions-item label="支付积分">{{ detailData.integral }}</el-descriptions-item> <el-descriptions-item label="支付积分">{{ detailData.integral }}</el-descriptions-item>
<el-descriptions-item label="下单时间">{{ detailData.createTime }}</el-descriptions-item> <el-descriptions-item label="下单时间">{{ detailData.createTime }}</el-descriptions-item>
<el-descriptions-item label="自提油站">{{ detailData.takeSiteName }}</el-descriptions-item> <el-descriptions-item label="自提油站">{{ detailData.takeSiteName }}</el-descriptions-item>
@ -112,7 +112,7 @@ export default {
case '0': case '0':
return '待支付' return '待支付'
case '1': case '1':
return '已经发' return '已支付'
case '2': case '2':
return '退款申请' return '退款申请'
case '3': case '3':

@ -41,8 +41,8 @@
</el-form> </el-form>
</div> </div>
<div class="Button"> <div class="Button">
<!-- <el-button type="primary" class="mr14">添加商品</el-button>--> <!-- <el-button type="primary" class="mr14">添加商品</el-button>-->
<!-- <el-button type="success" class="mr14" @click="onCopy">商品采集</el-button>--> <!-- <el-button type="success" class="mr14" @click="onCopy">商品采集</el-button>-->
<!-- <el-dropdown class="bnt mr14" @command="batchSelect"> <!-- <el-dropdown class="bnt mr14" @command="batchSelect">
<el-button>批量修改<i class="el-icon-arrow-down el-icon--right"></i></el-button> <el-button>批量修改<i class="el-icon-arrow-down el-icon--right"></i></el-button>
<el-dropdown-menu slot="dropdown"> <el-dropdown-menu slot="dropdown">
@ -54,9 +54,9 @@
<el-dropdown-item :command="6">活动推荐</el-dropdown-item> <el-dropdown-item :command="6">活动推荐</el-dropdown-item>
</el-dropdown-menu> </el-dropdown-menu>
</el-dropdown> --> </el-dropdown> -->
<!-- <el-button @click="onDismount" v-show="artFrom.type === '1'">批量下架</el-button>--> <!-- <el-button @click="onDismount" v-show="artFrom.type === '1'">批量下架</el-button>-->
<!-- <el-button @click="onShelves" v-show="artFrom.type === '2'">批量上架</el-button>--> <!-- <el-button @click="onShelves" v-show="artFrom.type === '2'">批量上架</el-button>-->
<!-- <el-button class="export" @click="exports">导出</el-button>--> <!-- <el-button class="export" @click="exports">导出</el-button>-->
<el-button @click="batchShelves('1')">批量上架</el-button> <el-button @click="batchShelves('1')">批量上架</el-button>
<el-button @click="batchShelves('2')">批量下架</el-button> <el-button @click="batchShelves('2')">批量下架</el-button>
</div> </div>
@ -128,7 +128,7 @@
<el-table-column label="油站" min-width="150" align="center"> <el-table-column label="油站" min-width="150" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<span> <span>
{{ scope.row.siteName }} {{ scope.row.siteName || '暂无' }}
</span> </span>
</template> </template>
</el-table-column> </el-table-column>
@ -591,18 +591,20 @@ export default {
// //
batchShelves(productStatus) { batchShelves(productStatus) {
let selected = this.$refs.table.selection let selected = this.$refs.table.selection
if (selected&&selected.length>0){ if (selected && selected.length > 0) {
let selectedIds = selected.map(item=>item.id) let selectedIds = selected.map(item => item.id)
productApi.batchShelves({ productApi
list:selectedIds, .batchShelves({
productStatus:productStatus list: selectedIds,
}).then(res=>{ productStatus: productStatus
if (res.code===20000){ })
this.$message.success(res.msg) .then(res => {
this.getDataList() if (res.code === 20000) {
} this.$message.success(res.msg)
}) this.getDataList()
}else { }
})
} else {
this.$message.error('请选择需要操作的数据') this.$message.error('请选择需要操作的数据')
} }
}, },

@ -45,7 +45,7 @@
</el-table-column> </el-table-column>
<el-table-column label="数量比例" align="center"> <el-table-column label="数量比例" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ scope.row.sellScale }}</span> <span>{{ scope.row.sellScale }}%</span>
</template> </template>
</el-table-column> </el-table-column>
@ -56,7 +56,7 @@
</el-table-column> </el-table-column>
<el-table-column label="金额比例" align="center"> <el-table-column label="金额比例" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ scope.row.sellMoneyScale }}</span> <span>{{ scope.row.sellMoneyScale }}%</span>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -391,12 +391,22 @@ export default {
}) })
console.log('tableList', this.tableList) console.log('tableList', this.tableList)
}, },
// //
productSearchs() { productSearchs() {
console.log(this.Time) console.log('time', this.Time)
if (this.Time !== null && this.Time.length !== 0) { if (this.Time !== null && this.Time.length !== 0) {
this.createTime = this.Time[0] + '/' + this.Time[1] if (this.isDate(this.Time[0])) {
this.createTime = this.Time[0] + '/' + this.Time[1]
console.log('-----')
} else {
var time1 = this.getSimpleDate(this.Time[0])
var time2 = this.getSimpleDate(this.Time[1])
this.createTime = time1 + '/' + time2
}
console.log('createTime------', this.createTime)
this.getChartList() this.getChartList()
} else { } else {
this.$message.error('请选择要查询的时间段!') this.$message.error('请选择要查询的时间段!')
@ -404,15 +414,43 @@ export default {
}, },
// //
userSearchs() { userSearchs() {
console.log('createTime2', this.createTime2)
this.page.currentPage = 1 this.page.currentPage = 1
if (this.createTime2 !== null && this.createTime2.length !== 0) { if (this.createTime2 !== null && this.createTime2.length !== 0) {
this.page.params.startTime = this.createTime2[0] if (this.isDate(this.createTime2[0])) {
this.page.params.endTime = this.createTime2[1] this.page.params.startTime = this.createTime2[0]
this.page.params.endTime = this.createTime2[1]
} else {
var time1 = this.getSimpleDate(this.createTime2[0])
var time2 = this.getSimpleDate(this.createTime2[1])
this.page.params.startTime = time1
this.page.params.endTime = time2
}
this.getList() this.getList()
} else { } else {
this.$message.error('请选择要查询的时间段!') this.$message.error('请选择要查询的时间段!')
} }
}, },
isDate(dateStr) {
var pattern = /^\d{4}-\d{2}-\d{2}$/
return pattern.test(dateStr)
},
getSimpleDate(date) {
var y = date.getFullYear()
var m = date.getMonth() + 1
m = m < 10 ? '0' + m : m
var d = date.getDate()
d = d < 10 ? '0' + d : d
// var h = date.getHours()
// var minute = date.getMinutes()
// minute = minute < 10 ? '0' + minute : minute
// var s = date.getSeconds()
// s = s < 10 ? '0' + s : s
return y + '-' + m + '-' + d
},
// //
exportData: function() {}, exportData: function() {},

Loading…
Cancel
Save