Commit 39eef640 by 李长胜

权益修改

1 parent 3920ec25
.equity-wrap .contain {
background: #FFFFFF;
margin: 20px 20px 20px 40px;
padding: 20px;
box-shadow: 0 1px 5px 0 rgba(38, 38, 38, 0.10);
}
// 单行省略
.ellipsis-1 {
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
-o-text-overflow: ellipsis;
/* for Opera */
}
// 我这里以两行为例,该方法基本兼容市场上面所有主流浏览器。
.ellipsis-2 {
overflow: hidden;
height: 40px;
line-height: 20px;
position: relative;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
/*显示的行数*/
}
.ellipsis-2-text:after {
content: "...";
position: absolute;
bottom: 0;
right: 15px;
padding-left: 20px;
background: -webkit-linear-gradient(left, transparent, #fff 55%);
/*我在Safari上测试时发现透明到白色中间会有一个黑色的过渡后来我就写成-webkit-linear-gradient(left,rgba(255,255,255,0),rgba(255,255,255,1) 55%)*/
background: -o-linear-gradient(left, transparent, #fff 55%);
background: -moz-linear-gradient(left, transparent, #fff 55%);
background: linear-gradient(to right, transparent, #fff 55%);
}
.el-scrollbar__bar.is-horizontal{
height: 10px !important;
left: 10px;
}
.base-container-right .el-main-scroll .el-scrollbar__thumb {
background-color: rgba(144, 147, 153, 0.5) !important;
}
.equity-wrap .el-table .cell {
line-height: 16px;
}
.equity-wrap .table-btns .el-button {
padding: 0 0 0 5px;
margin-left: 5px;
border-left: 1px solid #DCDFE6;
border-radius: 0;
}
.equity-wrap .table-btns .el-button:first-child {
padding: 0;
border: 0;
}
.equity-wrap .img-60 {
width: 60px;
height: 60px;
}
.equity-wrap .edit-container {
margin: 20px 40px 84px;
}
.equity-wrap .footer {
position: absolute;
bottom: 0;
width: 100%;
height: 64px;
text-align: center;
line-height: 64px;
background: #FFFFFF;
z-index: 999;
}
.equity-wrap .flex {
display: flex;
justify-content: space-between;
}
.equity-wrap .edit-title {
font-size: 16px;
font-weight: bold;
height: 48px;
line-height: 48px;
// color: #0947C6;
border-bottom: 1px solid #E7EAEC;
// padding-left: 20px;
margin: 0 0;
}
.equity-wrap .edit-sub-title::before {
position: absolute;
display: inline-block;
content: '';
height: 18px;
width: 4px;
top: 2px;
left: 0;
background-color: #0947C6;
}
.equity-wrap .edit-sub-title {
position: relative;
font-size: 16px;
font-weight: 700;
color: #333333;
margin: 0 0 30px 0;
padding-left: 8px;
}
// .equity-wrap table {
// width: 98%;
// color: #666666;
// border: 1px solid #e5e6e7;
// border-width: 1px 0 0 1px;
// }
// .equity-wrap table tr {
// height: 30px;
// // line-height: 30px;
// }
// .equity-wrap table th,
// .equity-wrap table td {
// font-size: 12px;
// font-weight: normal;
// padding: 0px 10px;
// border: 1px solid #e5e6e7;
// border-width: 0px 1px 1px 0px;
// border-spacing: 0;
// text-align: center;
// vertical-align: middle;
// }
// .equity-wrap table td {
// min-width: 50px;
// }
\ No newline at end of file \ No newline at end of file
...@@ -11,6 +11,7 @@ import Vue from 'vue' ...@@ -11,6 +11,7 @@ import Vue from 'vue'
import apis from './api' import apis from './api'
import './public-path' import './public-path'
import { start } from '@/setup' import { start } from '@/setup'
import '@/assets/css/public.scss'
//引入富文本css //引入富文本css
import 'quill/dist/quill.core.css' import 'quill/dist/quill.core.css'
import 'quill/dist/quill.snow.css' import 'quill/dist/quill.snow.css'
......
<template> <template>
<!-- <div class="container"> <div class="equity-wrap">
<div class="box"> <div class="equity-wrap contain">
<div class="followForm"> <el-form :inline="true" style="width: 100%" :model="searchForm" label-width="70px" label-position="right">
<el-form :inline="true" class="demo-form-inline"> <el-row style="display:flex;align-items:center">
<el-form-item label="日期:"> <el-form-item size="small" label="加油日期">
<el-date-picker v-model="date" type="daterange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" size="small" value-format="yyyy-MM-dd"></el-date-picker> <el-date-picker size="small" v-model="searchForm.daterange" type="daterange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" value-format="yyyy-MM-dd" :picker-options="pickerOptions || {}"></el-date-picker>
</el-form-item> </el-form-item>
<el-form-item label="订单号:"> <el-form-item label="订单号">
<el-input v-model="searchObj.orderId" placeholder="" size="small" class="formItem"></el-input> <el-input v-model="searchForm.orderId" placeholder="请输入" size="small" clearable></el-input>
</el-form-item> </el-form-item>
<el-form-item label="用户信息:"> <el-form-item label="用户信息">
<el-input v-model="searchObj.phone" placeholder="" size="small" class="formItem"></el-input> <el-input v-model="searchForm.phone" placeholder="请输入" size="small" clearable></el-input>
</el-form-item> </el-form-item>
<el-form-item label="订单状态:"> </el-row>
<el-select v-model="searchObj.orderStatus" size="small" placeholder="请选择" class="formItem"> <el-row>
<el-form-item size="small" label="订单状态">
<el-select size="small" v-model="searchForm.orderStatus" placeholder="请选择">
<el-option v-for="item in statusList" :key="item.value" :label="item.label" :value="item.value"></el-option> <el-option v-for="item in statusList" :key="item.value" :label="item.label" :value="item.value"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item size="small" style="float: right">
<el-button-group> <el-button :size="size" type="primary" @click="handleSearch">查询</el-button>
<el-button type="primary" size="small" @click="search">查询</el-button> <el-button :size="size" @click="handleReset">重置</el-button>
<el-button type="default" size="small" @click="reset">重置</el-button>
</el-button-group>
</el-form-item> </el-form-item>
</el-row>
</el-form> </el-form>
</div> <GLTable v-if="flag" ref="table" @setTableFinishFun="setTableFinishFun" :searchForm="searchFormTable" :tableParams="tableParams" :getListApi="tableParams.getListApi" :hasNum="false" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn"></GLTable>
<div class="tableCtn">
<GLTable v-if="flag" ref="table" :searchForm="searchObj" :tableParams="tableParams" :getListApi="tableParams.getListApi" :hasNum="false"></GLTable>
</div>
</div>
</div> -->
<div class="container">
<div class="box">
<div class="layout">
<div class="tableBox">
<div class="search-box">
<div class="top">
<div class="item">
日期:
<el-date-picker v-model="date" type="daterange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" size="small" value-format="yyyy-MM-dd" style="width: 220px"></el-date-picker>
</div>
<div class="item">
订单号:
<div class="input">
<el-input v-model="searchObj.orderId" placeholder="" size="small" class="formItem"></el-input>
</div>
</div>
<div class="item">
用户信息:
<div class="input">
<el-input v-model="searchObj.phone" placeholder="" size="small" class="formItem"></el-input>
</div>
</div>
<div class="item">
订单状态:
<el-select v-model="searchObj.orderStatus" size="small" placeholder="请选择" class="formItem">
<el-option v-for="item in statusList" :key="item.value" :label="item.label" :value="item.value"></el-option>
</el-select>
</div>
<div class="item" style="margin-left: auto">
<el-button type="primary" size="small" @click="search">查询</el-button>
<el-button type="default" size="small" @click="reset">重置</el-button>
</div>
</div>
</div>
<div class="tableCtn">
<GLTable v-if="flag" ref="table" :searchForm="searchObj" :tableParams="tableParams" :getListApi="tableParams.getListApi" :hasNum="false" :pageConf="pageConf"></GLTable>
</div>
</div>
</div>
</div> </div>
</div> </div>
</template> </template>
<script type='text/ecmascript-6'> <script>
// type='text/ecmascript-6'
function date_format(date) { function date_format(date) {
var date2 = new Date(date) var date2 = new Date(date)
var YY = date2.getFullYear() + '-' var YY = date2.getFullYear() + '-'
...@@ -85,12 +42,22 @@ function date_format(date) { ...@@ -85,12 +42,22 @@ function date_format(date) {
var ss = date2.getSeconds() < 10 ? '0' + date2.getSeconds() : date2.getSeconds() var ss = date2.getSeconds() < 10 ? '0' + date2.getSeconds() : date2.getSeconds()
return YY + MM + DD + ' ' + hh + mm + ss return YY + MM + DD + ' ' + hh + mm + ss
} }
import { searchMixin } from '@/mixins' // import { searchMixin } from '@/mixins'
export default { export default {
name: '', name: '',
mixins: [searchMixin], // mixins: [searchMixin],
data() { data() {
return { return {
size: 'small',
pickerOptions: {
disabledDate(time) {
return time.getTime() > Date.now() || time.getTime() < new Date('2017-12-31').getTime()
}
},
searchForm: {
orderId:''
},
searchFormTable: {},
pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'total' }, pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'total' },
date_format, date_format,
flag: true, flag: true,
...@@ -114,7 +81,7 @@ export default { ...@@ -114,7 +81,7 @@ export default {
tableColumns: [ tableColumns: [
{ {
label: '日期', label: '日期',
minWidth: '200', width: '200',
formatter: cell => { formatter: cell => {
return this.date_format(cell.callTime) return this.date_format(cell.callTime)
} }
...@@ -122,11 +89,11 @@ export default { ...@@ -122,11 +89,11 @@ export default {
{ {
label: '用户信息', label: '用户信息',
prop: 'phone', prop: 'phone',
minWidth: '200'
}, },
{ {
label: '订单里程', label: '订单里程',
minWidth: '200',
formatter: cell => { formatter: cell => {
return `${cell.distance}km` return `${cell.distance}km`
} }
...@@ -134,22 +101,22 @@ export default { ...@@ -134,22 +101,22 @@ export default {
{ {
label: '实付金额', label: '实付金额',
prop: 'price', prop: 'price',
minWidth: '200'
}, },
{ {
label: '订单总额', label: '订单总额',
prop: 'income', prop: 'income',
minWidth: '200'
}, },
{ {
label: '订单号', label: '订单号',
prop: 'orderId', prop: 'orderId',
minWidth: '200'
}, },
{ {
label: '司机工号', label: '司机工号',
prop: 'driverId', prop: 'driverId',
minWidth: '200'
}, },
{ {
...@@ -158,21 +125,66 @@ export default { ...@@ -158,21 +125,66 @@ export default {
formatter: cell => { formatter: cell => {
return ['已结算', '待结算', '已失效'][cell.orderStatus] return ['已结算', '待结算', '已失效'][cell.orderStatus]
}, },
minWidth: '200'
} }
] ]
} }
} }
}, },
watch: { // watch: {
date(n) { // date(n) {
let [callDateStart, callDateEnd] = n // let [callDateStart, callDateEnd] = n
this.searchObj.callDateStart = callDateStart || '' // this.searchObj.callDateStart = callDateStart || ''
this.searchObj.callDateEnd = callDateEnd || '' // this.searchObj.callDateEnd = callDateEnd || ''
// }
// },
mounted() {},
methods: {
beforeSearchFn() {
return new Promise((resolve, reject) => {
this.searchFormTable = JSON.parse(JSON.stringify(this.searchForm))
if (this.searchFormTable.daterange) {
this.searchFormTable.callDateStart = this.searchForm.daterange[0]
this.searchFormTable.callDateEnd = this.searchForm.daterange[1]
} else {
if (this.searchFormTable.callDateStart) delete this.searchFormTable.callDateStart && delete this.searchFormTable.callDateEnd
} }
delete this.searchFormTable.daterange
resolve()
})
}, },
mounted() {}, setTableFinishFun() {
methods: {} //接收到的数据为空
if (!this.$refs.table.data.length) {
this.$refs.table.setTableHeightFun()
}
},
handleReset() {
this.flag = false
this.searchForm = {}
this.$nextTick(() => {
this.flag = true
})
},
handleSearch() {
this.$refs.table.refreshTable()
}
}
} }
</script> </script>
<style src="@a/css/tao.css"></style> <style lang="scss" scoped>
.el-form-item {
margin-bottom: 15px;
}
.el-range-editor.is-active,
.el-range-editor.is-active:hover {
border-color: #5850ff;
width: 215px;
}
.el-range-editor--small.el-input__inner {
width: 215px;
}
/deep/ .contain .el-input--small .el-input__inner {
width: 215px;
}
</style>
<template>
<!-- <div class="container">
<div class="box">
<div class="followForm">
<el-form :inline="true" class="demo-form-inline">
<el-form-item label="日期:">
<el-date-picker v-model="date" type="daterange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" size="small" value-format="yyyy-MM-dd"></el-date-picker>
</el-form-item>
<el-form-item label="订单号:">
<el-input v-model="searchObj.orderId" placeholder="" size="small" class="formItem"></el-input>
</el-form-item>
<el-form-item label="用户信息:">
<el-input v-model="searchObj.phone" placeholder="" size="small" class="formItem"></el-input>
</el-form-item>
<el-form-item label="订单状态:">
<el-select v-model="searchObj.orderStatus" size="small" placeholder="请选择" class="formItem">
<el-option v-for="item in statusList" :key="item.value" :label="item.label" :value="item.value"></el-option>
</el-select>
</el-form-item>
<el-form-item>
<el-button-group>
<el-button type="primary" size="small" @click="search">查询</el-button>
<el-button type="default" size="small" @click="reset">重置</el-button>
</el-button-group>
</el-form-item>
</el-form>
</div>
<div class="tableCtn">
<GLTable v-if="flag" ref="table" :searchForm="searchObj" :tableParams="tableParams" :getListApi="tableParams.getListApi" :hasNum="false"></GLTable>
</div>
</div>
</div> -->
<div class="container">
<div class="box">
<div class="layout">
<div class="tableBox">
<div class="search-box">
<div class="top">
<div class="item">
加油日期:
<el-date-picker v-model="date" type="daterange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" size="small" value-format="yyyy-MM-dd" style="width: 220px"></el-date-picker>
</div>
<div class="item">
订单号:
<div class="input">
<el-input v-model="searchObj.orderId" placeholder="" size="small" class="formItem"></el-input>
</div>
</div>
<div class="item">
用户信息:
<div class="input">
<el-input v-model="searchObj.phone" placeholder="" size="small" class="formItem"></el-input>
</div>
</div>
<div class="item">
订单状态:
<el-select v-model="searchObj.orderStatus" size="small" placeholder="请选择" class="formItem">
<el-option v-for="item in statusList" :key="item.value" :label="item.label" :value="item.value"></el-option>
</el-select>
</div>
<div class="item" style="margin-left: auto">
<el-button type="primary" size="small" @click="search">查询</el-button>
<el-button type="default" size="small" @click="reset">重置</el-button>
</div>
</div>
</div>
<div class="tableCtn">
<GLTable v-if="flag" ref="table" :searchForm="searchObj" :tableParams="tableParams" :getListApi="tableParams.getListApi" :hasNum="false" :pageConf="pageConf"></GLTable>
</div>
</div>
</div>
</div>
</div>
</template>
<script type='text/ecmascript-6'>
function date_format(date) {
var date2 = new Date(date)
var YY = date2.getFullYear() + '-'
var MM = (date2.getMonth() + 1 < 10 ? '0' + (date2.getMonth() + 1) : date2.getMonth() + 1) + '-'
var DD = date2.getDate() < 10 ? '0' + date2.getDate() : date2.getDate()
var hh = (date2.getHours() < 10 ? '0' + date2.getHours() : date2.getHours()) + ':'
var mm = (date2.getMinutes() < 10 ? '0' + date2.getMinutes() : date2.getMinutes()) + ':'
var ss = date2.getSeconds() < 10 ? '0' + date2.getSeconds() : date2.getSeconds()
return YY + MM + DD + ' ' + hh + mm + ss
}
import { searchMixin } from '@/mixins'
export default {
name: '',
mixins: [searchMixin],
data() {
return {
pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'total' },
date_format,
flag: true,
statusList: [
{
label: '已结算',
value: '0'
},
{
label: '待结算',
value: '1'
},
{
label: '已失效',
value: '2'
}
],
tableParams: {
listName: 'list',
getListApi: this.$apis.orderApi.getEDJOrderList,
tableColumns: [
{
label: '日期',
minWidth: '200',
formatter: cell => {
return this.date_format(cell.callTime)
}
},
{
label: '用户信息',
prop: 'phone',
minWidth: '200'
},
{
label: '订单里程',
minWidth: '200',
formatter: cell => {
return `${cell.distance}km`
}
},
{
label: '实付金额',
prop: 'price',
minWidth: '200'
},
{
label: '订单总额',
prop: 'income',
minWidth: '200'
},
{
label: '订单号',
prop: 'orderId',
minWidth: '200'
},
{
label: '司机工号',
prop: 'driverId',
minWidth: '200'
},
{
label: '订单状态',
prop: 'status',
formatter: cell => {
return ['已结算', '待结算', '已失效'][cell.orderStatus]
},
minWidth: '200'
}
]
}
}
},
watch: {
date(n) {
let [callDateStart, callDateEnd] = n
this.searchObj.callDateStart = callDateStart || ''
this.searchObj.callDateEnd = callDateEnd || ''
}
},
mounted() {},
methods: {}
}
</script>
<style src="@a/css/tao.css">
</style>
<template>
<div class="container">
<div class="layout">
<div class="operationBox">
<div class="item lineCtn">
账户余额:{{ price }}元
<div style="margin-left: auto" class="operationBtn">
<el-button type="primary" @click="exportExcel">导出</el-button>
<el-button size="small" type="primary" @click="getHwAccount">刷新余额</el-button>
</div>
</div>
</div>
<div class="tableBox">
<div class="search-box">
<div class="top">
<div class="item">
日期:
<el-date-picker v-model="date" type="daterange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" size="small" value-format="yyyy-MM-dd" style="width: 228px"></el-date-picker>
</div>
<div class="item">
品牌名称:
<div class="input">
<el-select v-model="searchObj.brandName" filterable size="small" placeholder="请选择" class="formItem">
<el-option v-for="item in brandList" :key="item.brandId" :label="item.brandName" :value="item.brandName"></el-option>
</el-select>
</div>
</div>
<div class="item">
商品名称:
<div class="input">
<el-input v-model="searchObj.productName" placeholder="" size="small" class="formItem"></el-input>
</div>
</div>
<div class="item">
商品形态:
<el-select size="small" v-model="searchObj.appereance" placeholder="请选择" class="formItem">
<el-option v-for="item in appereanceList" :key="item.value" :label="item.label" :value="item.value"></el-option>
</el-select>
</div>
<div class="item">
门店名称:
<div class="input">
<el-input v-model="searchObj.merchantName" placeholder="" size="small" class="formItem"></el-input>
</div>
</div>
<div class="item">
订单状态:
<el-select size="small" v-model="searchObj.orderStatus" placeholder="请选择" class="formItem">
<el-option v-for="item in statusList" :key="item.value" :label="item.label" :value="item.value"></el-option>
</el-select>
</div>
<div class="item" style="margin-left: auto">
<el-button type="primary" size="small" @click="search">查询</el-button>
<el-button type="default" size="small" @click="reset">重置</el-button>
</div>
</div>
</div>
<div class="tableCtn">
<GLTable v-if="flag" ref="table" :searchForm="searchObj" :tableParams="tableParams" :getListApi="tableParams.getListApi" :hasNum="false" :pageConf="pageConf">
<template slot="custom">
<div class="table-custom exportBtn"></div>
</template>
</GLTable>
</div>
</div>
</div>
</div>
</template>
<script type='text/ecmascript-6'>
import { orderMixin, searchMixin } from '@/mixins'
export default {
name: '',
mixins: [orderMixin, searchMixin],
data() {
return {
pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'total' },
flag: true,
price: 0,
tableParams: {
listName: 'list',
showSummary: true,
getListApi: this.$apis.orderApi.getBalanceList,
summaryMethod({ columns, data }) {
let sums = []
columns.forEach((column, index) => {
if (index == 0) {
sums[index] = '合计'
return
}
const values = data.map(item => {
if (column.property == 'costPrices' || column.property == 'orderPrices' || column.property == 'discount') {
return Number(item[column.property])
}
return NaN
})
if (!values.every(value => isNaN(value))) {
sums[index] = values.reduce((prev, curr) => {
const value = Number(curr)
if (!isNaN(value)) {
return prev + curr
} else {
return prev
}
}, 0)
sums[index] = `${this.decimal(sums[index], 2).toFixed(2)}元`
} else {
sums[index] = ''
}
})
return sums
},
tableColumns: [
{
label: '订单编号',
prop: 'orderCode',
minWidth: '200'
},
{
label: '品牌名称',
prop: 'brandName',
minWidth: '200'
},
{
label: '商品形态',
prop: 'appearanceDesc',
minWidth: '100'
},
{
label: '商品名称',
minWidth: '200',
formatter(cell) {
return cell.appearance == 2 ? `${cell.productName}${cell.denomination}` : cell.productName
}
},
{
label: '订单成本金额',
prop: 'costPrices',
minWidth: '200'
},
{
label: '订单支付金额',
prop: 'orderPrices',
minWidth: '200'
},
{
label: '销售差额',
prop: 'discount',
minWidth: '200'
},
{
label: '下单渠道',
minWidth: '200',
formatter(cell) {
return `${cell.merchantName || ''}${cell.merchantName ? '-' : ''}${cell.channelName}`
}
},
{
label: '订单状态',
minWidth: '200',
formatter: cell => {
return cell.appearance == 1 ? this.statusEnum[cell.orderStatus] : this.qb_statusEnum[cell.orderStatus]
}
},
{
label: '下单时间',
prop: 'orderDate',
minWidth: '200',
formatter(cell) {
return cell.orderDate ? new Date(cell.orderDate).format('yyyy-MM-dd hh:mm:ss') : '- -'
}
}
]
}
}
},
mounted() {
this.getHwAccount()
},
methods: {
getHwAccount() {
this.$apis.orderApi.getHwAccount().then(({ code, data }) => {
if (code == 0) {
this.price = data
}
})
},
exportExcel() {
this.$apis.orderApi.exportBalanceList(this.searchObj).then(({ code, data, message }) => {
if (code == 0) {
let a = document.createElement('a')
a.setAttribute('href', data)
a.setAttribute('target', '_blank')
a.setAttribute('download', '权益订单统计数据.xlsx')
a.click()
} else {
this.$message.error(message)
}
})
}
}
}
</script>
<style src="@a/css/tao.css"></style>
<style>
.exportBtn {
float: right;
margin-top: 10px;
}
.lineCtn {
display: flex;
flex-direction: row;
}
</style>
<style src="@a/css/tao.css"></style>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!