|
@@ -57,10 +57,10 @@
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
</div>
|
|
|
- <div style="width:100%; height: 360px;margin: 0px 30px;background: #FFFFFF;">
|
|
|
+ <div style="width:100%; height: 360px;background: #FFFFFF;">
|
|
|
<span style="color:#ff9955;font-size:25px;">|</span>
|
|
|
<span style="font-size:20px;">销售情况</span>
|
|
|
- <div ref="myChart" style="width:100%; height: 350px;"></div>
|
|
|
+ <div ref="myChart" style="width:100%; height: 350px;margin: 0px 25px;"></div>
|
|
|
</div>
|
|
|
<div style="width:100%; height: 181px;">
|
|
|
<span style="color:#ff9955;font-size:25px;">|</span>
|
|
@@ -89,17 +89,24 @@
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
|
+ <pagination
|
|
|
+ v-show="total>0"
|
|
|
+ :total="total"
|
|
|
+ :page.sync="queryParams.pageNum"
|
|
|
+ :limit.sync="queryParams.pageSize"
|
|
|
+ @pagination="dayReportDetail"
|
|
|
+ />
|
|
|
</div>
|
|
|
<el-dialog :title="title" width="800px" :visible.sync="open" append-to-body>
|
|
|
<el-table v-loading="loading" :data="dayReportDetailsList">
|
|
|
<el-table-column label="油品" align="center" prop="oilName" />
|
|
|
<el-table-column label="油枪号" align="center" prop="oilGun" />
|
|
|
<el-table-column label="销量(L)" align="center" prop="orderLiters" />
|
|
|
- <el-table-column label="销额(元)" align="center" prop="amt" />
|
|
|
- <el-table-column label="优惠" align="center" prop v-if="false" />
|
|
|
- <el-table-column label="优惠卷" align="center" prop />
|
|
|
- <el-table-column label="实收" align="center" prop />
|
|
|
- <el-table-column label="会员支付" align="center" prop="menberAmt" />
|
|
|
+ <el-table-column label="销额(元)" align="center" prop="receivableAmt" />
|
|
|
+ <el-table-column label="优惠" align="center" prop="discountAmt" v-if="false" />
|
|
|
+ <el-table-column label="优惠卷" align="center" prop="discountCouponAmt" />
|
|
|
+ <el-table-column label="实收" align="center" prop="amt" />
|
|
|
+ <el-table-column label="会员支付" align="center" prop="menberAmt" v-if="false" />
|
|
|
<el-table-column label="微信支付" align="center" prop="wxAmt" />
|
|
|
<el-table-column label="支付宝支付" align="center" prop="zfbAmt" />
|
|
|
<el-table-column label="会员充值" align="center" prop v-if="false" />
|
|
@@ -124,6 +131,7 @@ import {
|
|
|
listSum,
|
|
|
listOilType,
|
|
|
listDayReport,
|
|
|
+ selectDayReportDetail,
|
|
|
getDetails,
|
|
|
listXdata,
|
|
|
listQydata92,
|
|
@@ -189,6 +197,7 @@ export default {
|
|
|
pageSize: 10,
|
|
|
payDate: null,
|
|
|
status: null,
|
|
|
+ createdDate: null,
|
|
|
beginTime: null,
|
|
|
endTime: null
|
|
|
},
|
|
@@ -209,7 +218,6 @@ export default {
|
|
|
this.$nextTick(() => {
|
|
|
this.queryParams.beginTime = this.getMonthDate();
|
|
|
this.queryParams.endTime = this.getEndFormatDate(new Date());
|
|
|
- // this.initChart();
|
|
|
setTimeout(() => {
|
|
|
this.initChart();
|
|
|
}, 1000);
|
|
@@ -222,17 +230,10 @@ export default {
|
|
|
this.queryParams.endTime = this.getEndFormatDate(new Date());
|
|
|
this.getDatas();
|
|
|
this.dayDataSource();
|
|
|
- //不加等待时间的话,初始化了echarts,,getDatas的数据没有获取到。等待后数据获取到,重新加载就可以了。
|
|
|
- // setTimeout(() =>{
|
|
|
- // this.initChart();
|
|
|
- // },2000);
|
|
|
},
|
|
|
methods: {
|
|
|
initChart() {
|
|
|
- console.log("打印查询参数1", this.queryParams);
|
|
|
// 初始化echarts
|
|
|
- console.log("6", this.xdata);
|
|
|
- console.log("7", this.cydata0);
|
|
|
this.charts = echarts.init(this.$refs.myChart, "macarons");
|
|
|
this.charts.setOption(
|
|
|
{
|
|
@@ -357,12 +358,10 @@ export default {
|
|
|
true
|
|
|
);
|
|
|
},
|
|
|
-
|
|
|
getXData() {
|
|
|
return listXdata(this.queryParams).then(response => {
|
|
|
this.xdata = [];
|
|
|
- if (response.rows === "undefined") {
|
|
|
- } else {
|
|
|
+ if(response.hasOwnProperty('rows')){
|
|
|
for (let i in response.rows) {
|
|
|
this.xdata.push(response.rows[i].createdDate);
|
|
|
}
|
|
@@ -373,8 +372,7 @@ export default {
|
|
|
getQyData92() {
|
|
|
return listQydata92(this.queryParams).then(response => {
|
|
|
this.qydata92 = [];
|
|
|
- if (response.rows === "undefined") {
|
|
|
- } else {
|
|
|
+ if(response.hasOwnProperty('rows')){
|
|
|
for (let i in response.rows) {
|
|
|
let data = [];
|
|
|
data.push(response.rows[i].createdDate);
|
|
@@ -388,8 +386,7 @@ export default {
|
|
|
getQydata95() {
|
|
|
return listQydata95(this.queryParams).then(response => {
|
|
|
this.qydata95 = [];
|
|
|
- if (response.rows === "undefined") {
|
|
|
- } else {
|
|
|
+ if(response.hasOwnProperty('rows')){
|
|
|
for (let i in response.rows) {
|
|
|
let data = [];
|
|
|
data.push(response.rows[i].createdDate);
|
|
@@ -403,8 +400,7 @@ export default {
|
|
|
getQydata97() {
|
|
|
return listQydata97(this.queryParams).then(response => {
|
|
|
this.qydata97 = [];
|
|
|
- if (response.rows === "undefined") {
|
|
|
- } else {
|
|
|
+ if(response.hasOwnProperty('rows')){
|
|
|
for (let i in response.rows) {
|
|
|
let data = [];
|
|
|
data.push(response.rows[i].createdDate);
|
|
@@ -418,8 +414,7 @@ export default {
|
|
|
getQydata0() {
|
|
|
return listQydata0(this.queryParams).then(response => {
|
|
|
this.cydata0 = [];
|
|
|
- if (response.rows === "undefined") {
|
|
|
- } else {
|
|
|
+ if(response.hasOwnProperty('rows')){
|
|
|
for (let i in response.rows) {
|
|
|
let data = [];
|
|
|
data.push(response.rows[i].createdDate);
|
|
@@ -433,8 +428,7 @@ export default {
|
|
|
getQydata10() {
|
|
|
return listQydata10(this.queryParams).then(response => {
|
|
|
this.cydata10 = [];
|
|
|
- if (response.rows === "undefined") {
|
|
|
- } else {
|
|
|
+ if(response.hasOwnProperty('rows')){
|
|
|
for (let i in response.rows) {
|
|
|
let data = [];
|
|
|
data.push(response.rows[i].createdDate);
|
|
@@ -448,8 +442,7 @@ export default {
|
|
|
getQydata20() {
|
|
|
return listQydata20(this.queryParams).then(response => {
|
|
|
this.cydata20 = [];
|
|
|
- if (response.rows === "undefined") {
|
|
|
- } else {
|
|
|
+ if(response.hasOwnProperty('rows')){
|
|
|
for (let i in response.rows) {
|
|
|
let data = [];
|
|
|
data.push(response.rows[i].createdDate);
|
|
@@ -478,15 +471,13 @@ export default {
|
|
|
/** 查询优惠劵管理列表 */
|
|
|
getList() {
|
|
|
listSum(this.queryParams).then(response => {
|
|
|
- if (response.data === "undefined") {
|
|
|
- } else {
|
|
|
+ if (response.hasOwnProperty('data')) {
|
|
|
this.form.zongAmt = response.data.amt;
|
|
|
this.form.zongliters = response.data.orderLiters;
|
|
|
}
|
|
|
});
|
|
|
listOilType(this.queryParams).then(response => {
|
|
|
- if (response.rows === "undefined") {
|
|
|
- } else {
|
|
|
+ if(response.hasOwnProperty('rows')){
|
|
|
for (let i in response.rows) {
|
|
|
if (response.rows[i].oilType === "1") {
|
|
|
this.form.qyamt = response.rows[i].amt;
|
|
@@ -496,8 +487,12 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
- listDayReport(this.queryParams).then(response => {
|
|
|
+ this.dayReportDetail();
|
|
|
+ },
|
|
|
+ dayReportDetail(){
|
|
|
+ selectDayReportDetail(this.queryParams).then(response => {
|
|
|
this.dayReportList = response.rows;
|
|
|
+ console.log("response",response);
|
|
|
this.total = response.total;
|
|
|
this.loading = false;
|
|
|
});
|
|
@@ -642,13 +637,18 @@ export default {
|
|
|
|
|
|
/** 查看详情按钮操作 */
|
|
|
handleLook(row) {
|
|
|
- const createdDate = row.createdDate;
|
|
|
+ this.row =row;
|
|
|
+ row.page= this.queryInfo.pageNum;
|
|
|
+ row.limit= this.queryInfo.pageSize;
|
|
|
+ this.getLookOrder(row);
|
|
|
+ },
|
|
|
+ getLookOrder(row) {
|
|
|
+ const createdDate = this.row.createdDate;
|
|
|
this.queryInfo.beginTime =createdDate.substring(0,10) +" 00:00:00";
|
|
|
this.queryInfo.endTime =createdDate.substring(0,10) +" 23:59:59";
|
|
|
this.queryInfo.status = "1";
|
|
|
- this.getLookOrder();
|
|
|
- },
|
|
|
- getLookOrder() {
|
|
|
+ this.queryInfo.pageNum=row.page;
|
|
|
+ this.queryInfo.pageSize =row.limit;
|
|
|
getDetails(this.queryInfo).then(response => {
|
|
|
this.dayReportDetailsList = response.rows;
|
|
|
this.total1 = response.total;
|