Compare commits

...

2 Commits

Author SHA1 Message Date
zhaohengkun
3ccbd60e4f bug修改 2024-11-04 10:42:04 +08:00
zhaohengkun
1a5e536cf6 1 2024-11-04 09:27:46 +08:00
4 changed files with 579 additions and 536 deletions

View File

@ -88,7 +88,10 @@
<div class="box-gang"> <div class="box-gang">
<div class="box"> <div class="box">
<el-tooltip class="item" effect="dark" content="退款金额(元)/笔数" placement="top-start"> <el-tooltip class="item" effect="dark" content="退款金额(元)/笔数" placement="top-start">
<div class="size-bole">{{ orderStatistics.refBalance?orderStatistics.refBalance:0 }}/{{ orderStatistics.refBalanceCount?orderStatistics.refBalanceCount:0 }}</div> <div class="size-bole">{{
orderStatistics.refBalance ? orderStatistics.refBalance : 0
}}/{{ orderStatistics.refBalanceCount ? orderStatistics.refBalanceCount : 0 }}
</div>
</el-tooltip> </el-tooltip>
<div class="size-hui"> <div class="size-hui">
<div class="dian" style="background: #0DC291"></div> <div class="dian" style="background: #0DC291"></div>
@ -97,7 +100,10 @@
</div> </div>
<div class="box"> <div class="box">
<el-tooltip class="item" effect="dark" content="油品订单退款金额(元)/笔数" placement="top-start"> <el-tooltip class="item" effect="dark" content="油品订单退款金额(元)/笔数" placement="top-start">
<div class="size-bole" style="color:#00CAFF;">{{ orderStatistics.oilOrder?orderStatistics.oilOrder:0 }}/{{ orderStatistics.oilOrderCount?orderStatistics.oilOrderCount:0 }}</div> <div class="size-bole" style="color:#00CAFF;">{{
orderStatistics.oilOrder ? orderStatistics.oilOrder : 0
}}/{{ orderStatistics.oilOrderCount ? orderStatistics.oilOrderCount : 0 }}
</div>
</el-tooltip> </el-tooltip>
<div class="size-hui"> <div class="size-hui">
@ -107,7 +113,10 @@
</div> </div>
<div class="box"> <div class="box">
<el-tooltip class="item" effect="dark" content="便利店订单退款金额(元)/笔数" placement="top-start"> <el-tooltip class="item" effect="dark" content="便利店订单退款金额(元)/笔数" placement="top-start">
<div class="size-bole" style="color:#F44522;" >{{ orderStatistics.convenienceStore?orderStatistics.convenienceStore:0 }}/{{ orderStatistics.convenienceStoreCount?orderStatistics.convenienceStoreCount:0 }}</div> <div class="size-bole" style="color:#F44522;">{{
orderStatistics.convenienceStore ? orderStatistics.convenienceStore : 0
}}/{{ orderStatistics.convenienceStoreCount ? orderStatistics.convenienceStoreCount : 0 }}
</div>
</el-tooltip> </el-tooltip>
<div class="size-hui"> <div class="size-hui">
@ -117,7 +126,9 @@
</div> </div>
<div class="box"> <div class="box">
<el-tooltip class="item" effect="dark" content="积分商城订单退款金额(元)/笔数" placement="top-start"> <el-tooltip class="item" effect="dark" content="积分商城订单退款金额(元)/笔数" placement="top-start">
<div class="size-bole" style="color:#FF7E00;" >{{orderStatistics.integral?orderStatistics.integral:0}}/{{orderStatistics.integralCount?orderStatistics.integralCount:0}}</div> <div class="size-bole" style="color:#FF7E00;">
{{ orderStatistics.integral ? orderStatistics.integral : 0 }}/{{ orderStatistics.integralCount ? orderStatistics.integralCount : 0 }}
</div>
</el-tooltip> </el-tooltip>
<div class="size-hui"> <div class="size-hui">
@ -147,10 +158,10 @@
<el-table-column prop="payMoney" align="center" label="会员付款金额(元)"></el-table-column> <el-table-column prop="payMoney" align="center" label="会员付款金额(元)"></el-table-column>
<el-table-column prop="refMoney" align="center" label="退款金额(元)"> <el-table-column prop="refMoney" align="center" label="退款金额(元)">
<template slot-scope="scope"> <!-- <template slot-scope="scope">-->
<span v-if="scope.row.status == 'refund'">{{scope.row.payMoney}}</span> <!-- <span v-if="scope.row.status == 'refund'">{{ scope.row.payMoney }}</span>-->
<span type="danger" v-else>--</span> <!-- <span type="danger" v-else>&#45;&#45;</span>-->
</template> <!-- </template>-->
</el-table-column> </el-table-column>
<el-table-column prop="userName" align="center" label="付款用户"></el-table-column> <el-table-column prop="userName" align="center" label="付款用户"></el-table-column>
<el-table-column prop="payType" align="center" label="支付方式"> <el-table-column prop="payType" align="center" label="支付方式">
@ -158,7 +169,11 @@
<span v-if="scope.row.payType == 'CASH'">现金</span> <span v-if="scope.row.payType == 'CASH'">现金</span>
<span v-else-if="scope.row.payType == 'WECHAT'">微信</span> <span v-else-if="scope.row.payType == 'WECHAT'">微信</span>
<span v-else-if="scope.row.payType == 'ALIPAY'">支付宝</span> <span v-else-if="scope.row.payType == 'ALIPAY'">支付宝</span>
<span v-else="">余额</span> <span v-else-if="scope.row.payType == 'UNIONPAY'">银联二维码</span>
<span v-else-if="scope.row.payType == 'credit'">挂账</span>
<span v-else-if="scope.row.payType == 'oilCard'">囤油卡</span>
<span v-else-if="scope.row.payType == 'balance'">储值卡</span>
<span v-else>未知</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="status" align="center" label="支付状态"> <el-table-column prop="status" align="center" label="支付状态">
@ -245,16 +260,14 @@
<script> <script>
import { import {
exportExcelTradingApi, getmyDataApi, getmyDataApi,
getRunningWaterByTissueApi,
getTissueByDataApi, getTissueByDataApi,
getTradingPageApi,
getDicts, getDicts,
getStaffByStorId, getStaffByStorId,
getTradingOnsPageApi, getTradingOnsPageApi,
exportExcelBackOrderMsgsApi exportExcelBackOrderMsgsApi
} from "@/api/allOrder"; } from "@/api/allOrder";
import {getTradingOnPageApi} from "../../../../api/allOrder";
export default { export default {
name: "reconciliation-trading", name: "reconciliation-trading",
@ -415,6 +428,7 @@ export default {
padding-bottom: 8px; padding-bottom: 8px;
//height: 87.5vh; //height: 87.5vh;
} }
.app-top { .app-top {
width: 100%; width: 100%;
@ -422,19 +436,23 @@ export default {
box-sizing: border-box; box-sizing: border-box;
padding: 10px; padding: 10px;
} }
.clearfix { .clearfix {
width: 100%; width: 100%;
} }
.box-card { .box-card {
width: 100%; width: 100%;
margin-bottom: 15px; margin-bottom: 15px;
} }
.box-gang { .box-gang {
width: 100%; width: 100%;
display: flex; display: flex;
align-items: center; align-items: center;
} }
.box { .box {
padding: 5px; padding: 5px;
padding-left: 20px; padding-left: 20px;
@ -445,6 +463,7 @@ export default {
border: 1px solid #FF9655; border: 1px solid #FF9655;
margin-right: 15px; margin-right: 15px;
} }
.size-hui { .size-hui {
display: flex; display: flex;
align-items: center; align-items: center;
@ -461,6 +480,7 @@ export default {
width: 100%; width: 100%;
} }
} }
.dian { .dian {
width: 6px; width: 6px;
height: 6px; height: 6px;
@ -472,12 +492,14 @@ export default {
margin-bottom: 15px; margin-bottom: 15px;
margin-right: 20px; margin-right: 20px;
} }
.icon-img { .icon-img {
//margin-left: 110px; //margin-left: 110px;
width: 100%; width: 100%;
height: 20px; height: 20px;
margin-right: 5px; margin-right: 5px;
img { img {
float: right; float: right;
//width: 100%; //width: 100%;
@ -486,11 +508,13 @@ export default {
height: 100%; height: 100%;
} }
} }
.f-button { .f-button {
width: 100%; width: 100%;
float: right; float: right;
text-align: right; text-align: right;
} }
.size-bole { .size-bole {
height: 31px; height: 31px;
font-size: 24px; font-size: 24px;
@ -504,6 +528,7 @@ export default {
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
} }
.wgang { .wgang {
width: 100%; width: 100%;
display: flex; display: flex;
@ -512,11 +537,13 @@ export default {
margin-bottom: 20px; margin-bottom: 20px;
} }
.table-box { .table-box {
width: 100%; width: 100%;
height: 52vh; height: 52vh;
overflow: auto; overflow: auto;
} }
.pagination-box { .pagination-box {
width: 100%; width: 100%;
margin: 10px auto; margin: 10px auto;
@ -524,14 +551,17 @@ export default {
align-items: center; align-items: center;
justify-content: center; justify-content: center;
} }
.top-app-sou { .top-app-sou {
width: 20%; width: 20%;
} }
.tk { .tk {
text-align: center; text-align: center;
color: grey; color: grey;
margin: 10px 0; margin: 10px 0;
} }
.new-top { .new-top {
width: 99%; width: 99%;
background: #FFFFFF; background: #FFFFFF;
@ -542,6 +572,7 @@ export default {
border-radius: 4px; border-radius: 4px;
margin-bottom: 5px; margin-bottom: 5px;
} }
.wit_box { .wit_box {
width: 99%; width: 99%;
background: #FFFFFF; background: #FFFFFF;

View File

@ -271,7 +271,11 @@
<span v-if="scope.row.payType == 'CASH'">现金</span> <span v-if="scope.row.payType == 'CASH'">现金</span>
<span v-else-if="scope.row.payType == 'WECHAT'">微信</span> <span v-else-if="scope.row.payType == 'WECHAT'">微信</span>
<span v-else-if="scope.row.payType == 'ALIPAY'">支付宝</span> <span v-else-if="scope.row.payType == 'ALIPAY'">支付宝</span>
<span v-else="">余额</span> <span v-else-if="scope.row.payType == 'UNIONPAY'">银联二维码</span>
<span v-else-if="scope.row.payType == 'credit'">挂账</span>
<span v-else-if="scope.row.payType == 'oilCard'">囤油卡</span>
<span v-else-if="scope.row.payType == 'balance'">储值卡</span>
<span v-else>未知</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="status" align="center" label="订单状态"> <el-table-column prop="status" align="center" label="订单状态">

View File

@ -21,8 +21,10 @@ import com.fuint.business.convenienceSore.dto.LJGoodsDto;
import com.fuint.business.convenienceSore.mapper.LJGoodsMapper; import com.fuint.business.convenienceSore.mapper.LJGoodsMapper;
import com.fuint.business.convenienceSore.service.LJGoodsService; import com.fuint.business.convenienceSore.service.LJGoodsService;
import com.fuint.business.convenienceSore.service.StockTrackService; import com.fuint.business.convenienceSore.service.StockTrackService;
import com.fuint.business.fleet.entity.FleetConsumeRecord;
import com.fuint.business.fleet.entity.FleetInfo; import com.fuint.business.fleet.entity.FleetInfo;
import com.fuint.business.fleet.entity.FleetMember; import com.fuint.business.fleet.entity.FleetMember;
import com.fuint.business.fleet.mapper.FleetConsumeRecordMapper;
import com.fuint.business.fleet.mapper.FleetInfoMapper; import com.fuint.business.fleet.mapper.FleetInfoMapper;
import com.fuint.business.fleet.mapper.FleetLinesChangeMapper; import com.fuint.business.fleet.mapper.FleetLinesChangeMapper;
import com.fuint.business.fleet.mapper.FleetMemberMapper; import com.fuint.business.fleet.mapper.FleetMemberMapper;
@ -125,7 +127,7 @@ public class AllOrderInfoServiceImpl extends ServiceImpl<AllOrderInfoMapper, All
@Autowired @Autowired
private FleetMemberMapper fleetMemberMapper; private FleetMemberMapper fleetMemberMapper;
@Autowired @Autowired
private FleetLinesChangeMapper fleetLinesChangeMapper; private FleetConsumeRecordMapper fleetConsumeRecordMapper;
@Autowired @Autowired
private FleetInfoMapper fleetInfoMapper; private FleetInfoMapper fleetInfoMapper;
@ -595,7 +597,6 @@ public class AllOrderInfoServiceImpl extends ServiceImpl<AllOrderInfoMapper, All
// 参数 // 参数
String orderNo = map.get("orderNo"); String orderNo = map.get("orderNo");
// 1.根据 orderNo 查询 总订单表 收银台表 会员表 油品订单表 // 1.根据 orderNo 查询 总订单表 收银台表 会员表 油品订单表
AllOrderInfo allOrder = selectAllOrderInfoByOrderNo(orderNo); AllOrderInfo allOrder = selectAllOrderInfoByOrderNo(orderNo);
CashierOrder cashierOrder = cashierOrderService.selectCashierOrder(orderNo); CashierOrder cashierOrder = cashierOrderService.selectCashierOrder(orderNo);
@ -646,7 +647,7 @@ public class AllOrderInfoServiceImpl extends ServiceImpl<AllOrderInfoMapper, All
.eq("store_id", userBalance.getStoreId()); .eq("store_id", userBalance.getStoreId());
MtUserFuel mtUserFuel = mtUserFuelMapper.selectOne(q2); MtUserFuel mtUserFuel = mtUserFuelMapper.selectOne(q2);
QueryWrapper<CardFuelChange> q4 = Wrappers.query(); QueryWrapper<CardFuelChange> q4 = Wrappers.query();
q2.eq("order_no", userBalance.getMtUserId()); q2.eq("order_no", allOrder.getOrderNo());
CardFuelChange cardFuelChange = cardFuelChangeMapper.selectOne(q4); CardFuelChange cardFuelChange = cardFuelChangeMapper.selectOne(q4);
mtUserFuel.setFuelAmount(mtUserFuel.getFuelAmount() + cardFuelChange.getBalance()); mtUserFuel.setFuelAmount(mtUserFuel.getFuelAmount() + cardFuelChange.getBalance());
mtUserFuelMapper.updateById(mtUserFuel); mtUserFuelMapper.updateById(mtUserFuel);
@ -660,7 +661,14 @@ public class AllOrderInfoServiceImpl extends ServiceImpl<AllOrderInfoMapper, All
q6.eq("id", fleetMember.getFleetId()); q6.eq("id", fleetMember.getFleetId());
FleetInfo fleetInfo = fleetInfoMapper.selectOne(q6); FleetInfo fleetInfo = fleetInfoMapper.selectOne(q6);
// 待编辑 QueryWrapper<FleetConsumeRecord> q7 = Wrappers.query();
q7.eq("order_no", allOrder.getOrderNo());
FleetConsumeRecord fleetConsumeRecord = fleetConsumeRecordMapper.selectOne(q7);
fleetMember.setRemainingCreditLimit(fleetMember.getRemainingCreditLimit() + fleetConsumeRecord.getAfterTheChange());
fleetInfo.setTotalBalance(fleetInfo.getTotalBalance() + fleetConsumeRecord.getAfterTheChange());
fleetInfoMapper.updateById(fleetInfo);
fleetMemberMapper.updateById(fleetMember);
} }
if (orderNo.equals("card_value")) { if (orderNo.equals("card_value")) {

View File

@ -27,7 +27,8 @@
<el-option v-for="item in payList" <el-option v-for="item in payList"
:key="item.id" :key="item.id"
:label="item.dictLabel" :label="item.dictLabel"
:value="item.dictValue"> :value="item.dictValue"
>
</el-option> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
@ -40,14 +41,16 @@
v-model="beginTime" v-model="beginTime"
style="width: 200px" style="width: 200px"
type="date" type="date"
placeholder="开始日期"> placeholder="开始日期"
>
</el-date-picker> </el-date-picker>
<el-date-picker <el-date-picker
v-model="endTime" v-model="endTime"
style="width: 200px" style="width: 200px"
type="date" type="date"
placeholder="结束日期"> placeholder="结束日期"
>
</el-date-picker> </el-date-picker>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
@ -65,7 +68,7 @@
<div class="box-gang"> <div class="box-gang">
<div class="box2"> <div class="box2">
<div style="font-size: 26px;color: #0DC291;font-weight: bold;margin-top: 5px"> <div style="font-size: 26px;color: #0DC291;font-weight: bold;margin-top: 5px">
{{ orderStatistics.theTotalAmountOfTheOrder ? orderStatistics.theTotalAmountOfTheOrder : 0 }}/{{ orderStatistics.numberOfStrokes ? orderStatistics.numberOfStrokes : 0 }} {{ orderStatistics.s2 || 0 }}/{{ orderStatistics.s1 || 0 }}
</div> </div>
<div class="size-hui"> <div class="size-hui">
<div style="width: 8px;height: 8px;border-radius: 4px;background: #0DC291"></div> <div style="width: 8px;height: 8px;border-radius: 4px;background: #0DC291"></div>
@ -74,7 +77,7 @@
</div> </div>
<div class="box2"> <div class="box2">
<div style="font-size: 26px;color: #00CAFF;font-weight: bold;margin-top: 5px"> <div style="font-size: 26px;color: #00CAFF;font-weight: bold;margin-top: 5px">
{{ orderStatistics.theTotalAmountPaid ? orderStatistics.theTotalAmountPaid : 0 }} {{ orderStatistics.s3 || 0 }}
</div> </div>
<div class="size-hui"> <div class="size-hui">
<div style="width: 8px;height: 8px;border-radius: 4px;background: #00CAFF"></div> <div style="width: 8px;height: 8px;border-radius: 4px;background: #00CAFF"></div>
@ -83,7 +86,7 @@
</div> </div>
<div class="box2"> <div class="box2">
<div style="font-size: 26px;color: #F44522;font-weight: bold;margin-top: 5px"> <div style="font-size: 26px;color: #F44522;font-weight: bold;margin-top: 5px">
{{ orderStatistics.oilDiscounts ? orderStatistics.oilDiscounts : 0 }}/{{ seekZeroAmount }} {{ orderStatistics.s4 || 0 }}/{{ orderStatistics.s5 || 0 }}
</div> </div>
<div class="size-hui"> <div class="size-hui">
<div style="width: 8px;height: 8px;border-radius: 4px;background: #F44522"></div> <div style="width: 8px;height: 8px;border-radius: 4px;background: #F44522"></div>
@ -92,7 +95,7 @@
</div> </div>
<div class="box2"> <div class="box2">
<div style="font-size: 26px;color: #FA6400;font-weight: bold;margin-top: 5px"> <div style="font-size: 26px;color: #FA6400;font-weight: bold;margin-top: 5px">
{{ orderStatistics.numberOfStrokesByOil ? orderStatistics.numberOfStrokesByOil : 0 }}/{{ orderStatistics.theTotalAmountOfOil ? orderStatistics.theTotalAmountOfOil : 0 }} {{ orderStatistics.s7 || 0 }}/{{ orderStatistics.s6 || 0 }}
</div> </div>
<div class="size-hui"> <div class="size-hui">
<div style="width: 8px;height: 8px;border-radius: 4px;background: #FA6400"></div> <div style="width: 8px;height: 8px;border-radius: 4px;background: #FA6400"></div>
@ -101,7 +104,7 @@
</div> </div>
<div class="box2"> <div class="box2">
<div style="font-size: 26px;color: #FE59E5;font-weight: bold;margin-top: 5px"> <div style="font-size: 26px;color: #FE59E5;font-weight: bold;margin-top: 5px">
{{ orderStatistics.numberOfStrokesByGoods ? orderStatistics.numberOfStrokesByGoods : 0 }}/{{ orderStatistics.theTotalAmountOfTheItem ? orderStatistics.theTotalAmountOfTheItem : 0 }} {{ orderStatistics.s9 || 0 }}/{{ orderStatistics.s8 || 0 }}
</div> </div>
<div class="size-hui"> <div class="size-hui">
<div style="width: 8px;height: 8px;border-radius: 4px;background: #FE59E5"></div> <div style="width: 8px;height: 8px;border-radius: 4px;background: #FE59E5"></div>
@ -116,11 +119,16 @@
<el-table <el-table
:data="orderList" :data="orderList"
size="mini" size="mini"
style="width: 100%"> style="width: 100%"
>
<el-table-column type="index" width="50" align="center" label="序号"/> <el-table-column type="index" width="50" align="center" label="序号"/>
<el-table-column prop="orderNo" align="center" label="订单号"></el-table-column> <el-table-column prop="orderNo" align="center" label="订单号"></el-table-column>
<el-table-column prop="amount" align="center" label="订单金额(元)"></el-table-column> <el-table-column prop="amount" align="center" label="订单金额(元)"></el-table-column>
<el-table-column prop="afterDiscountAmount" align="center" label="优惠金额(元)"></el-table-column> <el-table-column prop="afterDiscountAmount" align="center" label="优惠金额(元)">
<template slot-scope="scope">
<span>{{ scope.row.oilDiscountAmount + scope.row.goodsDiscountAmount }}</span>
</template>
</el-table-column>
<el-table-column prop="afterDiscountAmount" align="center" label="应收金额(元)"></el-table-column> <el-table-column prop="afterDiscountAmount" align="center" label="应收金额(元)"></el-table-column>
<el-table-column prop="payAmount" align="center" label="实付金额(元)"></el-table-column> <el-table-column prop="payAmount" align="center" label="实付金额(元)"></el-table-column>
<el-table-column prop="payAmount" align="center" label="已收金额(元)"></el-table-column> <el-table-column prop="payAmount" align="center" label="已收金额(元)"></el-table-column>
@ -151,12 +159,9 @@
</el-table-column> </el-table-column>
<el-table-column prop="payUser" align="center" label="付款用户"></el-table-column> <el-table-column prop="payUser" align="center" label="付款用户"></el-table-column>
<el-table-column prop="status" align="center" label="支付方式"> <el-table-column prop="payType" align="center" label="支付方式">
<template slot-scope="scope"> <template slot-scope="scope">
<el-tag v-if="scope.row.status === 'unpaid'">未支付</el-tag> {{ getPayTypeStr(scope.row.payType) }}
<el-tag type="success" v-else-if="scope.row.status === 'paid'">已支付</el-tag>
<el-tag type="danger" v-else-if="scope.row.status === 'refund'">已退款</el-tag>
<el-tag type="danger" v-else>支付失败</el-tag>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="status" align="center" label="订单状态"> <el-table-column prop="status" align="center" label="订单状态">
@ -167,7 +172,7 @@
<el-tag type="danger" v-else>支付失败</el-tag> <el-tag type="danger" v-else>支付失败</el-tag>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="payUser" align="center" label="关联员工" ></el-table-column> <!-- <el-table-column prop="payUser" align="center" label="关联员工" ></el-table-column>-->
<el-table-column label="操作人" align="center" prop="staffId"> <el-table-column label="操作人" align="center" prop="staffId">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ getRealName(staffList, scope.row.staffId) || '--' }}</span> <span>{{ getRealName(staffList, scope.row.staffId) || '--' }}</span>
@ -176,29 +181,31 @@
<el-table-column label="订单完成时间" align="center" prop="payTime"> <el-table-column label="订单完成时间" align="center" prop="payTime">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ scope.row.payTime ? parseTime(scope.row.payTime) : "--" }}</span> <span>{{ scope.row.payTime ? parseTime(scope.row.payTime) : '--' }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width"> <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope"> <template slot-scope="scope">
<div class="makeupticket" style="color: #fe8c4a" size="mini" <div style="color: #fe8c4a" size="mini"
@click="getOrdersInfo(scope.row.id)" @click="getOrdersInfo(scope.row.id)"
type="text" plain round>详情 type="text" plain round
>详情
</div> </div>
<!-- <el-button style="color: #fe8c4a" size="mini"--> <!-- <el-button style="color: #fe8c4a" size="mini"-->
<!-- @click="getOrdersInfo2(scope.row.id)"--> <!-- @click="getOrdersInfo2(scope.row.id)"-->
<!-- type="text" plain round>详情2--> <!-- type="text" plain round>详情2-->
<!-- </el-button>--> <!-- </el-button>-->
<div class="makeupticket" style="color: #fe8c4a" size="mini" <div style="color: #fe8c4a" size="mini"
v-if="scope.row.status === 'paid'" v-if="scope.row.status === 'paid'"
@click="patchwork(scope.row)" @click="patchwork(scope.row)"
type="text" plain round>补打小票 type="text" plain round
>补打小票
</div> </div>
<div style="color: #fe8c4a" size="mini"
<div class="makeupticket" style="color: #fe8c4a" size="mini"
v-if="scope.row.status === 'paid'" v-if="scope.row.status === 'paid'"
@click="refHandleRefund(scope.row.id)" @click="refHandleRefund(scope.row.id)"
type="text" plain round>退款 type="text" plain round
>退款
</div> </div>
</template> </template>
</el-table-column> </el-table-column>
@ -211,7 +218,7 @@
:total="total" :total="total"
:page.sync="queryParams.page" :page.sync="queryParams.page"
:limit.sync="queryParams.pageSize" :limit.sync="queryParams.pageSize"
@pagination="getList" @pagination="pageList"
/> />
</div> </div>
@ -221,7 +228,8 @@
<el-drawer <el-drawer
title="订单详情" title="订单详情"
:visible.sync="ordersDrawer" :visible.sync="ordersDrawer"
size="50%"> size="50%"
>
<div style="padding-left: 10px"> <div style="padding-left: 10px">
<el-descriptions> <el-descriptions>
<el-descriptions-item label="订单号">{{ cashierOrder.realName }}</el-descriptions-item> <el-descriptions-item label="订单号">{{ cashierOrder.realName }}</el-descriptions-item>
@ -241,20 +249,24 @@
:data="tableData" :data="tableData"
height="250" height="250"
border border
style="width: 100%"> style="width: 100%"
>
<el-table-column <el-table-column
prop="date" prop="date"
label="日期" label="日期"
width="180"> width="180"
>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="name" prop="name"
label="姓名" label="姓名"
width="180"> width="180"
>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="address" prop="address"
label="地址"> label="地址"
>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -264,20 +276,24 @@
:data="tableData" :data="tableData"
height="250" height="250"
border border
style="width: 100%"> style="width: 100%"
>
<el-table-column <el-table-column
prop="date" prop="date"
label="日期" label="日期"
width="180"> width="180"
>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="name" prop="name"
label="姓名" label="姓名"
width="180"> width="180"
>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="address" prop="address"
label="地址"> label="地址"
>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -287,20 +303,24 @@
:data="tableData" :data="tableData"
height="250" height="250"
border border
style="width: 100%"> style="width: 100%"
>
<el-table-column <el-table-column
prop="date" prop="date"
label="日期" label="日期"
width="180"> width="180"
>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="name" prop="name"
label="姓名" label="姓名"
width="180"> width="180"
>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="address" prop="address"
label="地址"> label="地址"
>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -310,20 +330,24 @@
:data="tableData" :data="tableData"
height="250" height="250"
border border
style="width: 100%"> style="width: 100%"
>
<el-table-column <el-table-column
prop="date" prop="date"
label="日期" label="日期"
width="180"> width="180"
>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="name" prop="name"
label="姓名" label="姓名"
width="180"> width="180"
>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="address" prop="address"
label="地址"> label="地址"
>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -333,20 +357,24 @@
:data="tableData" :data="tableData"
height="250" height="250"
border border
style="width: 100%"> style="width: 100%"
>
<el-table-column <el-table-column
prop="date" prop="date"
label="日期" label="日期"
width="180"> width="180"
>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="name" prop="name"
label="姓名" label="姓名"
width="180"> width="180"
>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="address" prop="address"
label="地址"> label="地址"
>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -356,20 +384,24 @@
:data="tableData" :data="tableData"
height="250" height="250"
border border
style="width: 100%"> style="width: 100%"
>
<el-table-column <el-table-column
prop="date" prop="date"
label="日期" label="日期"
width="180"> width="180"
>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="name" prop="name"
label="姓名" label="姓名"
width="180"> width="180"
>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="address" prop="address"
label="地址"> label="地址"
>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -379,20 +411,24 @@
:data="tableData" :data="tableData"
height="250" height="250"
border border
style="width: 100%"> style="width: 100%"
>
<el-table-column <el-table-column
prop="date" prop="date"
label="日期" label="日期"
width="180"> width="180"
>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="name" prop="name"
label="姓名" label="姓名"
width="180"> width="180"
>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="address" prop="address"
label="地址"> label="地址"
>
</el-table-column> </el-table-column>
</el-table> </el-table>
</div> </div>
@ -401,7 +437,8 @@
<!-- 订单详情--> <!-- 订单详情-->
<el-dialog <el-dialog
title="订单详情" title="订单详情"
:visible.sync="dialogVisible"> :visible.sync="dialogVisible"
>
<div> <div>
<el-descriptions> <el-descriptions>
<el-descriptions-item label="收银员姓名">{{ cashierOrder.realName }}</el-descriptions-item> <el-descriptions-item label="收银员姓名">{{ cashierOrder.realName }}</el-descriptions-item>
@ -451,7 +488,7 @@
<el-tag type="info" v-else>退款中</el-tag> <el-tag type="info" v-else>退款中</el-tag>
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item label="交易时间"> <el-descriptions-item label="交易时间">
{{ cashierOrder.payTime ? parseTime(cashierOrder.payTime) : "--" }} {{ cashierOrder.payTime ? parseTime(cashierOrder.payTime) : '--' }}
</el-descriptions-item> </el-descriptions-item>
</el-descriptions> </el-descriptions>
</div> </div>
@ -462,7 +499,8 @@
v-loading="loading" v-loading="loading"
:data="oilInfo" :data="oilInfo"
style="width: 100%"> style="width: 100%"
>
<el-table-column label="油号油枪" prop="terminal"> <el-table-column label="油号油枪" prop="terminal">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ getName(oilNameList, scope.row.oils) }}/{{ <span>{{ getName(oilNameList, scope.row.oils) }}/{{
@ -490,7 +528,8 @@
<el-descriptions-item label="商品详情"> <el-descriptions-item label="商品详情">
<el-table <el-table
:data="goodsInfo" :data="goodsInfo"
style="width: 100%"> style="width: 100%"
>
<el-table-column label="商品名称" prop="name"/> <el-table-column label="商品名称" prop="name"/>
<el-table-column label="单价" align="center" prop="retailPrice"> <el-table-column label="单价" align="center" prop="retailPrice">
<template slot-scope="scope"> <template slot-scope="scope">
@ -523,7 +562,8 @@
:close-on-click-modal="false" :close-on-click-modal="false"
title="订单退款" title="订单退款"
width="25%" width="25%"
:visible.sync="refDialogRefund"> :visible.sync="refDialogRefund"
>
<div style="margin: 10px 0"> <div style="margin: 10px 0">
退款密码<br/> 退款密码<br/>
</div> </div>
@ -542,10 +582,10 @@
:close-on-click-modal="false" :close-on-click-modal="false"
title="订单退款" title="订单退款"
width="25%" width="25%"
:visible.sync="dialogRefund"> :visible.sync="dialogRefund"
>
<div style="text-align: center;font-weight: bold"> <div style="text-align: center;font-weight: bold">
<!-- <span style="font-size: 35px">{{ cashierOrder.payAmount }}</span>--> <span style="font-size: 35px">{{ cashierOrder.afterDiscountAmount }}</span>
<span style="font-size: 35px">{{ cashierOrder.goodsPayAmount + cashierOrder.oilPayAmount }}</span>
</div> </div>
<div class="tk">退款金额</div> <div class="tk">退款金额</div>
<div class="tk">退款单号{{ cashierOrder.orderNo }}</div> <div class="tk">退款单号{{ cashierOrder.orderNo }}</div>
@ -553,26 +593,14 @@
<span>退款内容</span> <span>退款内容</span>
<br> <br>
<span>商品</span> <span>商品</span>
<el-checkbox v-model="isGoods" @click="calculateRefunds()">{{ cashierOrder.goodsPayAmount }}</el-checkbox> <el-checkbox v-model="isGoodsChecked" :disabled="true">{{ cashierOrder.goodsPayAmount || 0}}</el-checkbox>
<br> <br>
<span>油品</span> <span>油品</span>
<template> <el-checkbox v-model="isOilChecked" :disabled="true">{{ cashierOrder.oilPayAmount || 0}}</el-checkbox>
<el-checkbox v-if="oilInfo.length > 0" v-model="isOil" @click="calculateRefunds()"> <br>
<span>优惠券</span>
<span v-if="oilInfo[0].payAmount && oilInfo[0].payAmount!='0.00'"> {{ cashierOrder.oilPayAmount }}</span> <el-checkbox v-model="isCouponChecked" :disabled="true">{{ cardCouponUser.couponName || '' }}</el-checkbox>
<span v-if="oilInfo[0].balanceAmount>0">储值卡{{ oilInfo[0].balanceAmount }} </span> <br>
<span v-if="oilInfo[0].oilCardAmount>0">屯油卡{{ oilInfo[0].oilCardAmount }} </span>
</el-checkbox>
<el-checkbox v-if="isOil && oilInfo.length > 0 && oilInfo[0].couponId" v-model="isOilVouchers">优惠卷
</el-checkbox>
<!-- <el-checkbox v-if="oilInfo.length > 0 && oilInfo[0].balanceAmount>0" v-model="isOilCard">储值卡{{oilInfo[0].balanceAmount}}</el-checkbox>-->
<!-- <el-checkbox v-if="oilInfo.length > 0 && oilInfo[0].oilCardAmount>0" v-model="isOilFuel">屯油卡{{ oilInfo[0].oilCardAmount }}</el-checkbox>-->
</template>
<div style="margin: 10px 0"> <div style="margin: 10px 0">
退款原因<br/> 退款原因<br/>
<el-radio-group v-model="radio1" style="margin: 10px 0"> <el-radio-group v-model="radio1" style="margin: 10px 0">
@ -720,26 +748,33 @@ import {
cashierOrderSeekZeroAmount, cashierOrderSeekZeroAmount,
listCashierOrder, listCashierOrder,
orderStatisticsApi orderStatisticsApi
} from "@/api/cashier/cashierorder"; } from '@/api/cashier/cashierorder'
import {queryStaffs} from "@/api/cashier/staff"; import { queryStaffs } from '@/api/cashier/staff'
import {oilOrderList, oilOrders} from "@/api/cashier/oilorder"; import { oilOrderList, oilOrderInfo } from '@/api/cashier/oilorder'
import {getOilNameList} from "@/api/cashier/oilnumgun"; import { getOilNameList } from '@/api/cashier/oilnumgun'
import {getOrderGoods} from "@/api/cashier/goodsorder"; import { getOrderGoods } from '@/api/cashier/goodsorder'
import {exportExcelCashierApi} from "@/api/order/exportExcel"; import { exportExcelCashierApi } from '@/api/order/exportExcel'
import {refundApi} from "@/api/cashier/refund"; import { cashierRefund } from '@/api/cashier/refund'
import {connectFlag, getLodop} from "@/api/LodopFuncs"; import { connectFlag, getLodop } from '@/api/LodopFuncs'
import {getOilNumberGun} from "@/api/cashier/oilGuns"; import { getOilNumberGun } from '@/api/cashier/oilGuns'
import {formatDate} from "@/utils"; import ScanPayCodeDialog from '@/views/cashier/components/scanPayCodeDialog.vue'
import ScanPayCodeDialog from "@/views/cashier/components/scanPayCodeDialog.vue"; import { printOilOrderReport, rePrintOilOrderReport } from '@/api/print'
import {printOilOrderReport, rePrintOilOrderReport} from "@/api/print"; import { selectOneCardName } from '@/api/coupon'
import {ifRefPassApi} from "@/api/staff/store"; import { ifRefPassApi } from '@/api/staff/store'
import {getDicts} from "../../../api/dict/data"; import { getDicts } from '../../../api/dict/data'
export default { export default {
name: "order_Cashier", name: 'order_Cashier',
components: { ScanPayCodeDialog }, components: { ScanPayCodeDialog },
data() { data() {
return { return {
isGoodsChecked: true, //
isOilChecked: true, //
isCouponChecked: true, //
cardCouponUser:{
cardName:''
}, //
cashierOrder:{}, // 退
tableData: [{ tableData: [{
date: '2016-05-03', date: '2016-05-03',
name: '王小虎', name: '王小虎',
@ -772,9 +807,9 @@ export default {
ordersDrawer: false, ordersDrawer: false,
calculateRefundsV: 0, calculateRefundsV: 0,
// 退 // 退
refundRemark: "", refundRemark: '',
refPass: "", refPass: '',
radio1: "油号选错", radio1: '油号选错',
// //
oilNameList: [], oilNameList: [],
// //
@ -782,8 +817,6 @@ export default {
// //
goodsInfo: [], goodsInfo: [],
oilGunList: [], oilGunList: [],
//
cashierOrder: {},
loading: false, loading: false,
dialogVisible: false, dialogVisible: false,
dialogRefund: false, dialogRefund: false,
@ -792,8 +825,8 @@ export default {
staffList: [], staffList: [],
// //
dateRange: [], dateRange: [],
beginTime: "", beginTime: '',
endTime: "", endTime: '',
isOilVouchers: false, isOilVouchers: false,
isGoods: false, isGoods: false,
isOil: false, isOil: false,
@ -807,8 +840,8 @@ export default {
queryParams: { queryParams: {
page: 1, page: 1,
pageSize: 10, pageSize: 10,
beginTime: "", beginTime: '',
endTime: "", endTime: ''
}, },
orderStatistics: { orderStatistics: {
numberOfStrokes: '0', numberOfStrokes: '0',
@ -816,29 +849,29 @@ export default {
theTotalAmountPaid: '0', theTotalAmountPaid: '0',
oilDiscounts: '0', oilDiscounts: '0',
theTotalAmountOfOil: '0', theTotalAmountOfOil: '0',
theTotalAmountOfTheItem: '0', theTotalAmountOfTheItem: '0'
}, },
// //
payList: [], payList: [],
total: 0, total: 0,
seekZeroAmount: 0, seekZeroAmount: 0,
getId: "" getId: ''
} }
}, },
created() { created() {
let start = new Date(); let start = new Date()
start.setHours(0) start.setHours(0)
start.setMinutes(0) start.setMinutes(0)
start.setSeconds(0) start.setSeconds(0)
start.setMilliseconds(0) start.setMilliseconds(0)
this.dateRange = [start, new Date()]; this.dateRange = [start, new Date()]
this.beginTime = start this.beginTime = start
this.endTime = new Date() this.endTime = new Date()
this.isSysDate = true this.isSysDate = true
this.getList(); this.getList()
// this.getOrderStatistics(); // this.getOrderStatistics();
this.getStaffList(); this.getStaffList()
this.getOilGunList(); this.getOilGunList()
}, },
methods: { methods: {
@ -849,12 +882,11 @@ export default {
dateRange.push(this.endTime.toLocaleDateString()) dateRange.push(this.endTime.toLocaleDateString())
} }
exportExcelCashierApi(this.addDateRange(this.queryParams, dateRange)).then(res => { exportExcelCashierApi(this.addDateRange(this.queryParams, dateRange)).then(res => {
const blob = new Blob([res], {type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'}); const blob = new Blob([res], { type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' })
this.$download.saveAs(blob, '收银台订单统计.xLsx') this.$download.saveAs(blob, '收银台订单统计.xLsx')
}) })
}, },
// //
getOrderStatistics() { getOrderStatistics() {
let dateRange = [] let dateRange = []
if (this.beginTime && this.endTime) { if (this.beginTime && this.endTime) {
@ -867,23 +899,23 @@ export default {
}, },
// //
getRealName(list, val) { getRealName(list, val) {
let name = ""; let name = ''
list.forEach(item => { list.forEach(item => {
if (item.id == val) { if (item.id == val) {
name = item.realName name = item.realName
} }
}) })
return name; return name
}, },
// //
getMobile(list, val) { getMobile(list, val) {
let name = ""; let name = ''
list.forEach(item => { list.forEach(item => {
if (item.id == val) { if (item.id == val) {
name = item.mobile name = item.mobile
} }
}) })
return name; return name
}, },
async printLocally(data) { async printLocally(data) {
@ -1057,6 +1089,13 @@ export default {
// consumeAmount:this.consumeAmount, // consumeAmount:this.consumeAmount,
// // // //
// consumeRefuelMoney:this.consumeRefuelMoney.toFixed(2), // consumeRefuelMoney:this.consumeRefuelMoney.toFixed(2),
},
//
getPayTypeStr(payType) {
const item = this.payList.find(item => item.dictValue === payType)
return item ? item.dictLabel : ''
}, },
// //
@ -1084,7 +1123,7 @@ export default {
this.goodsInfo.forEach(order => { this.goodsInfo.forEach(order => {
let o = { let o = {
oilName: order.name, oilName: order.name,
unit: order.num + "" + order.unit, unit: order.num + '' + order.unit,
amount: order.memberPrice.toString() amount: order.memberPrice.toString()
} }
goodsOrderR.push(o) goodsOrderR.push(o)
@ -1159,120 +1198,60 @@ export default {
this.refDialogRefund = true; this.refDialogRefund = true;
}, },
// 退 退西
// 退
async handleRefund(id) { async handleRefund(id) {
this.dialogRefund = true; this.dialogRefund = true
await cashierOrder(id).then(response => { //id
this.cashierOrder = response.data let res1 = await cashierOrder(id)
this.cashierOrder=res1.data
let couponId = null
// null
if (res1.data.goodsOrderId) {
let resGoodsOrder = await getOrderGoods({ orderId: res1.data.goodsOrderId })
couponId = resGoodsOrder.data.couponId
//
this.getOilList(response.data.orderNo)
if (response.data.status === "refund") {
this.$message({
type: 'info',
message: '该订单已经退款'
});
this.dialogRefund = false;
} }
}) //
//退 if (res1.data.oilOrderId) {
// this.$confirm('退, ?', '', { let resOilOrder = await oilOrderInfo(res1.data.oilOrderId)
// confirmButtonText: '', couponId = resOilOrder.data.couponId
// cancelButtonText: '',
// type: 'warning' }
// }).then(() => { //
// this.dialogRefund = true; if (couponId) {
// cashierOrder(id).then( response => { let resCoupon = await selectOneCardName({ id: couponId })
// this.cashierOrder = response.data console.log('优惠券', resCoupon)
// if (response.data.status === "refund") { this.cardCouponUser = resCoupon.data
// this.$message({ }
// type: 'info', else {
// message: '退' this.cardCouponUser = {
// }); couponName: '无'
// this.dialogRefund = false; }
// } }
// })
// }).catch(() => {
// this.$message({
// type: 'info',
// message: ''
// });
// });
},
// 退
calculateRefunds() {
let refundAmt = 0
if (this.isGoods) {
refundAmt += this.cashierOrder.goodsPayAmount
}
if (this.isOil && this.cashierOrder.oilPayAmount > 0) {
refundAmt += this.cashierOrder.oilPayAmount
}
this.calculateRefundsV = refundAmt;
}, },
//退
async refundConfirmed() { async refundConfirmed() {
this.calculateRefunds();
if (!this.isOil && !this.isGoods) {
this.$message({
type: 'info',
message: '请选择退款项'
});
return
}
this.dialogRefund = false;
this.loading = true;
console.log("cashierOrder", this.cashierOrder)
// 退
let refundAmt = 0
if (this.isGoods) {
refundAmt += this.cashierOrder.goodsPayAmount
}
if (this.isOil && this.cashierOrder.oilPayAmount > 0) {
refundAmt += this.cashierOrder.oilPayAmount
}
// if (this.isOilCard || this.isOilFuel) {
// this.isOil = true
// }
let map ={ let map ={
orderNo: this.cashierOrder.orderNo, orderNo: this.cashierOrder.orderNo,
storeId: this.cashierOrder.storeId, cardCouponUserId: this.cardCouponUser.id,
refundRemark: this.radio1 + "-" + this.refundRemark,
type: "canRefund",
isOilVouchers: this.isOilVouchers,
isGoods: this.isGoods,
isOil: this.isOil,
isOilCard: this.isOilCard, //
isOilFuel: this.isOilFuel, //
refundAmt: refundAmt
} }
await refundApi(map).then(res => { let res = await cashierRefund(map)
if (res.code == 200) { if (res.code == 200) {
this.$message({ this.$message.success("退款成功")
type: 'info', }else {
message: '退款成功' this.$message.error(res.msg)
});
// this.printLocally()
this.reoilOrderReport()
} }
})
this.loading = false; this.dialogRefund = false
this.loading = true
this.getList(); this.loading = false
// this.getOrderStatistics(); this.getList()
this.getStaffList(); this.getStaffList()
// this.oilOrderReport()
}, },
// //
@ -1290,35 +1269,34 @@ export default {
}, },
// //
getName1(oilNameList, id) { getName1(oilNameList, id) {
let name = "" let name = ''
let _this = this; let _this = this
if (oilNameList != null && oilNameList != "") { if (oilNameList != null && oilNameList != '') {
oilNameList.forEach(item => { oilNameList.forEach(item => {
if (item.id == id) { if (item.id == id) {
name = item.gunName; name = item.gunName
} }
}) })
} }
return name; return name
}, },
// //
getName(oilNameList, id) { getName(oilNameList, id) {
let name = "" let name = ''
let _this = this; let _this = this
if (oilNameList != null && oilNameList != "") { if (oilNameList != null && oilNameList != '') {
oilNameList.forEach(item => { oilNameList.forEach(item => {
if (item.id == id) { if (item.id == id) {
name = item.oilName; name = item.oilName
_this.oilType = item.oilType; _this.oilType = item.oilType
} }
}) })
} }
return name; return name
}, },
getOrdersInfo2(id) { getOrdersInfo2(id) {
this.ordersDrawer=true; this.ordersDrawer = true
}, },
// //
@ -1327,7 +1305,7 @@ export default {
this.cashierOrder = response.data this.cashierOrder = response.data
this.getOilList(this.cashierOrder.orderNo) this.getOilList(this.cashierOrder.orderNo)
this.getGoodsLists(this.cashierOrder.goodsOrderId) this.getGoodsLists(this.cashierOrder.goodsOrderId)
this.dialogVisible = true; this.dialogVisible = true
}) })
}, },
async getOilList(orderNo) { async getOilList(orderNo) {
@ -1337,25 +1315,22 @@ export default {
}, },
async getGoodsLists(id) { async getGoodsLists(id) {
await getOrderGoods({ orderId: id }).then(response => { await getOrderGoods({ orderId: id }).then(response => {
this.goodsInfo = response.data; this.goodsInfo = response.data
}) })
}, },
parseTime1(dateTime) { parseTime1(dateTime) {
let date = new Date(dateTime); let date = new Date(dateTime)
let y = date.getFullYear() + "-"; let y = date.getFullYear() + '-'
let mon = ((date.getMonth() + 1 < 10) ? ('0' + date.getMonth()) : date.getMonth()) + "-"; let mon = ((date.getMonth() + 1 < 10) ? ('0' + date.getMonth()) : date.getMonth()) + '-'
let d = ((date.getDate() < 10) ? ('0' + date.getDate()) : date.getDate()) + " "; let d = ((date.getDate() < 10) ? ('0' + date.getDate()) : date.getDate()) + ' '
let h = ((date.getHours() < 10) ? ('0' + date.getHours()) : date.getHours()) + ":"; let h = ((date.getHours() < 10) ? ('0' + date.getHours()) : date.getHours()) + ':'
let m = ((date.getMinutes() < 10) ? ('0' + date.getMinutes()) : date.getMinutes()) + ":"; let m = ((date.getMinutes() < 10) ? ('0' + date.getMinutes()) : date.getMinutes()) + ':'
let s = ((date.getSeconds() < 10) ? ('0' + date.getSeconds()) : date.getSeconds()); let s = ((date.getSeconds() < 10) ? ('0' + date.getSeconds()) : date.getSeconds())
// return new Date(y , mon , d , h , m , s); // return new Date(y , mon , d , h , m , s);
return y + mon + d + h + m + s; return y + mon + d + h + m + s
}, },
// //
getList(val) { pageList(val) {
if (val != undefined) {
this.queryParams.page = val
}
let dateRange1 = this.dateRange let dateRange1 = this.dateRange
let dateRange = [] let dateRange = []
@ -1371,17 +1346,42 @@ export default {
// } // }
listCashierOrder(this.addDateRange(this.queryParams, dateRange)).then(response => { listCashierOrder(this.addDateRange(this.queryParams, dateRange)).then(response => {
this.orderList = response.data.records; this.orderList = response.data.records
this.total = response.data.total; this.total = response.data.total
this.queryParams.page = response.data.current
this.isSysDate = false this.isSysDate = false
}) })
this.getSeekZero(val) this.getSeekZero()
this.getOrderStatistics() this.getOrderStatistics()
}, },
getSeekZero(val) { //
if (val != undefined) { getList() {
this.queryParams.page = val
//
this.queryParams.page = 1
let dateRange1 = this.dateRange
let dateRange = []
if (this.beginTime && this.endTime) {
dateRange.push(this.beginTime.toLocaleDateString())
dateRange.push(this.endTime.toLocaleDateString())
} }
// if (this.isSysDate){
// dateRange.push(dateRange1[0].toLocaleDateString())
// dateRange.push(dateRange1[1].toLocaleDateString())
// }else {
// dateRange = this.dateRange
// }
listCashierOrder(this.addDateRange(this.queryParams, dateRange)).then(response => {
this.orderList = response.data.records
this.total = response.data.total
this.isSysDate = false
})
this.getSeekZero()
this.getOrderStatistics()
},
getSeekZero() {
let dateRange = [] let dateRange = []
if (this.beginTime && this.endTime) { if (this.beginTime && this.endTime) {
dateRange.push(this.beginTime.toLocaleDateString()) dateRange.push(this.beginTime.toLocaleDateString())