Compare commits
2 Commits
62c20b2c15
...
3ccbd60e4f
Author | SHA1 | Date | |
---|---|---|---|
![]() |
3ccbd60e4f | ||
![]() |
1a5e536cf6 |
@ -88,7 +88,10 @@
|
||||
<div class="box-gang">
|
||||
<div class="box">
|
||||
<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>
|
||||
<div class="size-hui">
|
||||
<div class="dian" style="background: #0DC291"></div>
|
||||
@ -97,7 +100,10 @@
|
||||
</div>
|
||||
<div class="box">
|
||||
<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>
|
||||
|
||||
<div class="size-hui">
|
||||
@ -107,7 +113,10 @@
|
||||
</div>
|
||||
<div class="box">
|
||||
<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>
|
||||
|
||||
<div class="size-hui">
|
||||
@ -117,7 +126,9 @@
|
||||
</div>
|
||||
<div class="box">
|
||||
<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>
|
||||
|
||||
<div class="size-hui">
|
||||
@ -147,10 +158,10 @@
|
||||
<el-table-column prop="payMoney" align="center" label="会员付款金额(元)"></el-table-column>
|
||||
|
||||
<el-table-column prop="refMoney" align="center" label="退款金额(元)">
|
||||
<template slot-scope="scope">
|
||||
<span v-if="scope.row.status == 'refund'">{{scope.row.payMoney}}</span>
|
||||
<span type="danger" v-else>--</span>
|
||||
</template>
|
||||
<!-- <template slot-scope="scope">-->
|
||||
<!-- <span v-if="scope.row.status == 'refund'">{{ scope.row.payMoney }}</span>-->
|
||||
<!-- <span type="danger" v-else>--</span>-->
|
||||
<!-- </template>-->
|
||||
</el-table-column>
|
||||
<el-table-column prop="userName" align="center" label="付款用户"></el-table-column>
|
||||
<el-table-column prop="payType" align="center" label="支付方式">
|
||||
@ -158,7 +169,11 @@
|
||||
<span v-if="scope.row.payType == 'CASH'">现金</span>
|
||||
<span v-else-if="scope.row.payType == 'WECHAT'">微信</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>
|
||||
</el-table-column>
|
||||
<el-table-column prop="status" align="center" label="支付状态">
|
||||
@ -245,16 +260,14 @@
|
||||
<script>
|
||||
|
||||
import {
|
||||
exportExcelTradingApi, getmyDataApi,
|
||||
getRunningWaterByTissueApi,
|
||||
getmyDataApi,
|
||||
getTissueByDataApi,
|
||||
getTradingPageApi,
|
||||
getDicts,
|
||||
getStaffByStorId,
|
||||
getTradingOnsPageApi,
|
||||
exportExcelBackOrderMsgsApi
|
||||
} from "@/api/allOrder";
|
||||
import {getTradingOnPageApi} from "../../../../api/allOrder";
|
||||
|
||||
|
||||
export default {
|
||||
name: "reconciliation-trading",
|
||||
@ -415,6 +428,7 @@ export default {
|
||||
padding-bottom: 8px;
|
||||
//height: 87.5vh;
|
||||
}
|
||||
|
||||
.app-top {
|
||||
width: 100%;
|
||||
|
||||
@ -422,19 +436,23 @@ export default {
|
||||
box-sizing: border-box;
|
||||
padding: 10px;
|
||||
}
|
||||
|
||||
.clearfix {
|
||||
width: 100%;
|
||||
|
||||
}
|
||||
|
||||
.box-card {
|
||||
width: 100%;
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
|
||||
.box-gang {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.box {
|
||||
padding: 5px;
|
||||
padding-left: 20px;
|
||||
@ -445,6 +463,7 @@ export default {
|
||||
border: 1px solid #FF9655;
|
||||
margin-right: 15px;
|
||||
}
|
||||
|
||||
.size-hui {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
@ -461,6 +480,7 @@ export default {
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
.dian {
|
||||
width: 6px;
|
||||
height: 6px;
|
||||
@ -472,12 +492,14 @@ export default {
|
||||
margin-bottom: 15px;
|
||||
margin-right: 20px;
|
||||
}
|
||||
|
||||
.icon-img {
|
||||
|
||||
//margin-left: 110px;
|
||||
width: 100%;
|
||||
height: 20px;
|
||||
margin-right: 5px;
|
||||
|
||||
img {
|
||||
float: right;
|
||||
//width: 100%;
|
||||
@ -486,11 +508,13 @@ export default {
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
.f-button {
|
||||
width: 100%;
|
||||
float: right;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.size-bole {
|
||||
height: 31px;
|
||||
font-size: 24px;
|
||||
@ -504,6 +528,7 @@ export default {
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.wgang {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
@ -512,11 +537,13 @@ export default {
|
||||
margin-bottom: 20px;
|
||||
|
||||
}
|
||||
|
||||
.table-box {
|
||||
width: 100%;
|
||||
height: 52vh;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
.pagination-box {
|
||||
width: 100%;
|
||||
margin: 10px auto;
|
||||
@ -524,14 +551,17 @@ export default {
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.top-app-sou {
|
||||
width: 20%;
|
||||
}
|
||||
|
||||
.tk {
|
||||
text-align: center;
|
||||
color: grey;
|
||||
margin: 10px 0;
|
||||
}
|
||||
|
||||
.new-top {
|
||||
width: 99%;
|
||||
background: #FFFFFF;
|
||||
@ -542,6 +572,7 @@ export default {
|
||||
border-radius: 4px;
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
|
||||
.wit_box {
|
||||
width: 99%;
|
||||
background: #FFFFFF;
|
||||
|
@ -271,7 +271,11 @@
|
||||
<span v-if="scope.row.payType == 'CASH'">现金</span>
|
||||
<span v-else-if="scope.row.payType == 'WECHAT'">微信</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>
|
||||
</el-table-column>
|
||||
<el-table-column prop="status" align="center" label="订单状态">
|
||||
|
@ -21,8 +21,10 @@ import com.fuint.business.convenienceSore.dto.LJGoodsDto;
|
||||
import com.fuint.business.convenienceSore.mapper.LJGoodsMapper;
|
||||
import com.fuint.business.convenienceSore.service.LJGoodsService;
|
||||
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.FleetMember;
|
||||
import com.fuint.business.fleet.mapper.FleetConsumeRecordMapper;
|
||||
import com.fuint.business.fleet.mapper.FleetInfoMapper;
|
||||
import com.fuint.business.fleet.mapper.FleetLinesChangeMapper;
|
||||
import com.fuint.business.fleet.mapper.FleetMemberMapper;
|
||||
@ -125,7 +127,7 @@ public class AllOrderInfoServiceImpl extends ServiceImpl<AllOrderInfoMapper, All
|
||||
@Autowired
|
||||
private FleetMemberMapper fleetMemberMapper;
|
||||
@Autowired
|
||||
private FleetLinesChangeMapper fleetLinesChangeMapper;
|
||||
private FleetConsumeRecordMapper fleetConsumeRecordMapper;
|
||||
@Autowired
|
||||
private FleetInfoMapper fleetInfoMapper;
|
||||
|
||||
@ -595,7 +597,6 @@ public class AllOrderInfoServiceImpl extends ServiceImpl<AllOrderInfoMapper, All
|
||||
// 参数
|
||||
String orderNo = map.get("orderNo");
|
||||
|
||||
|
||||
// 1.根据 orderNo 查询 总订单表 收银台表 会员表 油品订单表
|
||||
AllOrderInfo allOrder = selectAllOrderInfoByOrderNo(orderNo);
|
||||
CashierOrder cashierOrder = cashierOrderService.selectCashierOrder(orderNo);
|
||||
@ -646,7 +647,7 @@ public class AllOrderInfoServiceImpl extends ServiceImpl<AllOrderInfoMapper, All
|
||||
.eq("store_id", userBalance.getStoreId());
|
||||
MtUserFuel mtUserFuel = mtUserFuelMapper.selectOne(q2);
|
||||
QueryWrapper<CardFuelChange> q4 = Wrappers.query();
|
||||
q2.eq("order_no", userBalance.getMtUserId());
|
||||
q2.eq("order_no", allOrder.getOrderNo());
|
||||
CardFuelChange cardFuelChange = cardFuelChangeMapper.selectOne(q4);
|
||||
mtUserFuel.setFuelAmount(mtUserFuel.getFuelAmount() + cardFuelChange.getBalance());
|
||||
mtUserFuelMapper.updateById(mtUserFuel);
|
||||
@ -660,7 +661,14 @@ public class AllOrderInfoServiceImpl extends ServiceImpl<AllOrderInfoMapper, All
|
||||
q6.eq("id", fleetMember.getFleetId());
|
||||
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")) {
|
||||
|
@ -27,7 +27,8 @@
|
||||
<el-option v-for="item in payList"
|
||||
:key="item.id"
|
||||
:label="item.dictLabel"
|
||||
:value="item.dictValue">
|
||||
:value="item.dictValue"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
@ -40,14 +41,16 @@
|
||||
v-model="beginTime"
|
||||
style="width: 200px"
|
||||
type="date"
|
||||
placeholder="开始日期">
|
||||
placeholder="开始日期"
|
||||
>
|
||||
</el-date-picker>
|
||||
至
|
||||
<el-date-picker
|
||||
v-model="endTime"
|
||||
style="width: 200px"
|
||||
type="date"
|
||||
placeholder="结束日期">
|
||||
placeholder="结束日期"
|
||||
>
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
@ -65,7 +68,7 @@
|
||||
<div class="box-gang">
|
||||
<div class="box2">
|
||||
<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 class="size-hui">
|
||||
<div style="width: 8px;height: 8px;border-radius: 4px;background: #0DC291"></div>
|
||||
@ -74,7 +77,7 @@
|
||||
</div>
|
||||
<div class="box2">
|
||||
<div style="font-size: 26px;color: #00CAFF;font-weight: bold;margin-top: 5px">
|
||||
{{ orderStatistics.theTotalAmountPaid ? orderStatistics.theTotalAmountPaid : 0 }}
|
||||
{{ orderStatistics.s3 || 0 }}
|
||||
</div>
|
||||
<div class="size-hui">
|
||||
<div style="width: 8px;height: 8px;border-radius: 4px;background: #00CAFF"></div>
|
||||
@ -83,7 +86,7 @@
|
||||
</div>
|
||||
<div class="box2">
|
||||
<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 class="size-hui">
|
||||
<div style="width: 8px;height: 8px;border-radius: 4px;background: #F44522"></div>
|
||||
@ -92,7 +95,7 @@
|
||||
</div>
|
||||
<div class="box2">
|
||||
<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 class="size-hui">
|
||||
<div style="width: 8px;height: 8px;border-radius: 4px;background: #FA6400"></div>
|
||||
@ -101,7 +104,7 @@
|
||||
</div>
|
||||
<div class="box2">
|
||||
<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 class="size-hui">
|
||||
<div style="width: 8px;height: 8px;border-radius: 4px;background: #FE59E5"></div>
|
||||
@ -116,11 +119,16 @@
|
||||
<el-table
|
||||
:data="orderList"
|
||||
size="mini"
|
||||
style="width: 100%">
|
||||
style="width: 100%"
|
||||
>
|
||||
<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="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="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 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">
|
||||
<el-tag v-if="scope.row.status === 'unpaid'">未支付</el-tag>
|
||||
<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>
|
||||
{{ getPayTypeStr(scope.row.payType) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="status" align="center" label="订单状态">
|
||||
@ -167,7 +172,7 @@
|
||||
<el-tag type="danger" v-else>支付失败</el-tag>
|
||||
</template>
|
||||
</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">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ getRealName(staffList, scope.row.staffId) || '--' }}</span>
|
||||
@ -176,29 +181,31 @@
|
||||
|
||||
<el-table-column label="订单完成时间" align="center" prop="payTime">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ scope.row.payTime ? parseTime(scope.row.payTime) : "--" }}</span>
|
||||
<span>{{ scope.row.payTime ? parseTime(scope.row.payTime) : '--' }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<div class="makeupticket" style="color: #fe8c4a" size="mini"
|
||||
<div style="color: #fe8c4a" size="mini"
|
||||
@click="getOrdersInfo(scope.row.id)"
|
||||
type="text" plain round>详情
|
||||
type="text" plain round
|
||||
>详情
|
||||
</div>
|
||||
<!-- <el-button style="color: #fe8c4a" size="mini"-->
|
||||
<!-- @click="getOrdersInfo2(scope.row.id)"-->
|
||||
<!-- type="text" plain round>详情2-->
|
||||
<!-- </el-button>-->
|
||||
<div class="makeupticket" style="color: #fe8c4a" size="mini"
|
||||
<div style="color: #fe8c4a" size="mini"
|
||||
v-if="scope.row.status === 'paid'"
|
||||
@click="patchwork(scope.row)"
|
||||
type="text" plain round>补打小票
|
||||
type="text" plain round
|
||||
>补打小票
|
||||
</div>
|
||||
|
||||
<div class="makeupticket" style="color: #fe8c4a" size="mini"
|
||||
<div style="color: #fe8c4a" size="mini"
|
||||
v-if="scope.row.status === 'paid'"
|
||||
@click="refHandleRefund(scope.row.id)"
|
||||
type="text" plain round>退款
|
||||
type="text" plain round
|
||||
>退款
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
@ -211,7 +218,7 @@
|
||||
:total="total"
|
||||
:page.sync="queryParams.page"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
@pagination="pageList"
|
||||
/>
|
||||
</div>
|
||||
|
||||
@ -221,7 +228,8 @@
|
||||
<el-drawer
|
||||
title="订单详情"
|
||||
:visible.sync="ordersDrawer"
|
||||
size="50%">
|
||||
size="50%"
|
||||
>
|
||||
<div style="padding-left: 10px">
|
||||
<el-descriptions>
|
||||
<el-descriptions-item label="订单号">{{ cashierOrder.realName }}</el-descriptions-item>
|
||||
@ -241,20 +249,24 @@
|
||||
:data="tableData"
|
||||
height="250"
|
||||
border
|
||||
style="width: 100%">
|
||||
style="width: 100%"
|
||||
>
|
||||
<el-table-column
|
||||
prop="date"
|
||||
label="日期"
|
||||
width="180">
|
||||
width="180"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="name"
|
||||
label="姓名"
|
||||
width="180">
|
||||
width="180"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="address"
|
||||
label="地址">
|
||||
label="地址"
|
||||
>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
@ -264,20 +276,24 @@
|
||||
:data="tableData"
|
||||
height="250"
|
||||
border
|
||||
style="width: 100%">
|
||||
style="width: 100%"
|
||||
>
|
||||
<el-table-column
|
||||
prop="date"
|
||||
label="日期"
|
||||
width="180">
|
||||
width="180"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="name"
|
||||
label="姓名"
|
||||
width="180">
|
||||
width="180"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="address"
|
||||
label="地址">
|
||||
label="地址"
|
||||
>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
@ -287,20 +303,24 @@
|
||||
:data="tableData"
|
||||
height="250"
|
||||
border
|
||||
style="width: 100%">
|
||||
style="width: 100%"
|
||||
>
|
||||
<el-table-column
|
||||
prop="date"
|
||||
label="日期"
|
||||
width="180">
|
||||
width="180"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="name"
|
||||
label="姓名"
|
||||
width="180">
|
||||
width="180"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="address"
|
||||
label="地址">
|
||||
label="地址"
|
||||
>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
@ -310,20 +330,24 @@
|
||||
:data="tableData"
|
||||
height="250"
|
||||
border
|
||||
style="width: 100%">
|
||||
style="width: 100%"
|
||||
>
|
||||
<el-table-column
|
||||
prop="date"
|
||||
label="日期"
|
||||
width="180">
|
||||
width="180"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="name"
|
||||
label="姓名"
|
||||
width="180">
|
||||
width="180"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="address"
|
||||
label="地址">
|
||||
label="地址"
|
||||
>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
@ -333,20 +357,24 @@
|
||||
:data="tableData"
|
||||
height="250"
|
||||
border
|
||||
style="width: 100%">
|
||||
style="width: 100%"
|
||||
>
|
||||
<el-table-column
|
||||
prop="date"
|
||||
label="日期"
|
||||
width="180">
|
||||
width="180"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="name"
|
||||
label="姓名"
|
||||
width="180">
|
||||
width="180"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="address"
|
||||
label="地址">
|
||||
label="地址"
|
||||
>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
@ -356,20 +384,24 @@
|
||||
:data="tableData"
|
||||
height="250"
|
||||
border
|
||||
style="width: 100%">
|
||||
style="width: 100%"
|
||||
>
|
||||
<el-table-column
|
||||
prop="date"
|
||||
label="日期"
|
||||
width="180">
|
||||
width="180"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="name"
|
||||
label="姓名"
|
||||
width="180">
|
||||
width="180"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="address"
|
||||
label="地址">
|
||||
label="地址"
|
||||
>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
@ -379,20 +411,24 @@
|
||||
:data="tableData"
|
||||
height="250"
|
||||
border
|
||||
style="width: 100%">
|
||||
style="width: 100%"
|
||||
>
|
||||
<el-table-column
|
||||
prop="date"
|
||||
label="日期"
|
||||
width="180">
|
||||
width="180"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="name"
|
||||
label="姓名"
|
||||
width="180">
|
||||
width="180"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="address"
|
||||
label="地址">
|
||||
label="地址"
|
||||
>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
@ -401,7 +437,8 @@
|
||||
<!-- 订单详情-->
|
||||
<el-dialog
|
||||
title="订单详情"
|
||||
:visible.sync="dialogVisible">
|
||||
:visible.sync="dialogVisible"
|
||||
>
|
||||
<div>
|
||||
<el-descriptions>
|
||||
<el-descriptions-item label="收银员姓名">{{ cashierOrder.realName }}</el-descriptions-item>
|
||||
@ -451,7 +488,7 @@
|
||||
<el-tag type="info" v-else>退款中</el-tag>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="交易时间">
|
||||
{{ cashierOrder.payTime ? parseTime(cashierOrder.payTime) : "--" }}
|
||||
{{ cashierOrder.payTime ? parseTime(cashierOrder.payTime) : '--' }}
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
</div>
|
||||
@ -462,7 +499,8 @@
|
||||
v-loading="loading"
|
||||
|
||||
:data="oilInfo"
|
||||
style="width: 100%">
|
||||
style="width: 100%"
|
||||
>
|
||||
<el-table-column label="油号油枪" prop="terminal">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ getName(oilNameList, scope.row.oils) }}/{{
|
||||
@ -490,7 +528,8 @@
|
||||
<el-descriptions-item label="商品详情">
|
||||
<el-table
|
||||
:data="goodsInfo"
|
||||
style="width: 100%">
|
||||
style="width: 100%"
|
||||
>
|
||||
<el-table-column label="商品名称" prop="name"/>
|
||||
<el-table-column label="单价" align="center" prop="retailPrice">
|
||||
<template slot-scope="scope">
|
||||
@ -523,7 +562,8 @@
|
||||
:close-on-click-modal="false"
|
||||
title="订单退款"
|
||||
width="25%"
|
||||
:visible.sync="refDialogRefund">
|
||||
:visible.sync="refDialogRefund"
|
||||
>
|
||||
<div style="margin: 10px 0">
|
||||
退款密码<br/>
|
||||
</div>
|
||||
@ -542,10 +582,10 @@
|
||||
:close-on-click-modal="false"
|
||||
title="订单退款"
|
||||
width="25%"
|
||||
:visible.sync="dialogRefund">
|
||||
:visible.sync="dialogRefund"
|
||||
>
|
||||
<div style="text-align: center;font-weight: bold">
|
||||
<!-- ¥<span style="font-size: 35px">{{ cashierOrder.payAmount }}</span>-->
|
||||
¥<span style="font-size: 35px">{{ cashierOrder.goodsPayAmount + cashierOrder.oilPayAmount }}</span>
|
||||
¥<span style="font-size: 35px">{{ cashierOrder.afterDiscountAmount }}</span>
|
||||
</div>
|
||||
<div class="tk">退款金额</div>
|
||||
<div class="tk">退款单号:{{ cashierOrder.orderNo }}</div>
|
||||
@ -553,26 +593,14 @@
|
||||
<span>退款内容:</span>
|
||||
<br>
|
||||
<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>
|
||||
|
||||
|
||||
<span>油品:</span>
|
||||
<template>
|
||||
<el-checkbox v-if="oilInfo.length > 0" v-model="isOil" @click="calculateRefunds()">
|
||||
|
||||
<span v-if="oilInfo[0].payAmount && oilInfo[0].payAmount!='0.00'"> ¥{{ cashierOrder.oilPayAmount }}</span>
|
||||
<span v-if="oilInfo[0].balanceAmount>0">储值卡:{{ oilInfo[0].balanceAmount }} </span>
|
||||
<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>
|
||||
|
||||
|
||||
<el-checkbox v-model="isOilChecked" :disabled="true">¥{{ cashierOrder.oilPayAmount || 0}}</el-checkbox>
|
||||
<br>
|
||||
<span>优惠券:</span>
|
||||
<el-checkbox v-model="isCouponChecked" :disabled="true">{{ cardCouponUser.couponName || '无' }}</el-checkbox>
|
||||
<br>
|
||||
<div style="margin: 10px 0">
|
||||
退款原因<br/>
|
||||
<el-radio-group v-model="radio1" style="margin: 10px 0">
|
||||
@ -720,26 +748,33 @@ import {
|
||||
cashierOrderSeekZeroAmount,
|
||||
listCashierOrder,
|
||||
orderStatisticsApi
|
||||
} from "@/api/cashier/cashierorder";
|
||||
import {queryStaffs} from "@/api/cashier/staff";
|
||||
import {oilOrderList, oilOrders} from "@/api/cashier/oilorder";
|
||||
import {getOilNameList} from "@/api/cashier/oilnumgun";
|
||||
import {getOrderGoods} from "@/api/cashier/goodsorder";
|
||||
import {exportExcelCashierApi} from "@/api/order/exportExcel";
|
||||
import {refundApi} from "@/api/cashier/refund";
|
||||
import {connectFlag, getLodop} from "@/api/LodopFuncs";
|
||||
import {getOilNumberGun} from "@/api/cashier/oilGuns";
|
||||
import {formatDate} from "@/utils";
|
||||
import ScanPayCodeDialog from "@/views/cashier/components/scanPayCodeDialog.vue";
|
||||
import {printOilOrderReport, rePrintOilOrderReport} from "@/api/print";
|
||||
import {ifRefPassApi} from "@/api/staff/store";
|
||||
import {getDicts} from "../../../api/dict/data";
|
||||
} from '@/api/cashier/cashierorder'
|
||||
import { queryStaffs } from '@/api/cashier/staff'
|
||||
import { oilOrderList, oilOrderInfo } from '@/api/cashier/oilorder'
|
||||
import { getOilNameList } from '@/api/cashier/oilnumgun'
|
||||
import { getOrderGoods } from '@/api/cashier/goodsorder'
|
||||
import { exportExcelCashierApi } from '@/api/order/exportExcel'
|
||||
import { cashierRefund } from '@/api/cashier/refund'
|
||||
import { connectFlag, getLodop } from '@/api/LodopFuncs'
|
||||
import { getOilNumberGun } from '@/api/cashier/oilGuns'
|
||||
import ScanPayCodeDialog from '@/views/cashier/components/scanPayCodeDialog.vue'
|
||||
import { printOilOrderReport, rePrintOilOrderReport } from '@/api/print'
|
||||
import { selectOneCardName } from '@/api/coupon'
|
||||
import { ifRefPassApi } from '@/api/staff/store'
|
||||
import { getDicts } from '../../../api/dict/data'
|
||||
|
||||
export default {
|
||||
name: "order_Cashier",
|
||||
name: 'order_Cashier',
|
||||
components: { ScanPayCodeDialog },
|
||||
data() {
|
||||
return {
|
||||
isGoodsChecked: true, // 商品默认勾选
|
||||
isOilChecked: true, // 油品默认勾选
|
||||
isCouponChecked: true, // 优惠券默认勾选
|
||||
cardCouponUser:{
|
||||
cardName:''
|
||||
}, // 优惠券名称
|
||||
cashierOrder:{}, // 当前退款的订单对象
|
||||
tableData: [{
|
||||
date: '2016-05-03',
|
||||
name: '王小虎',
|
||||
@ -772,9 +807,9 @@ export default {
|
||||
ordersDrawer: false,
|
||||
calculateRefundsV: 0,
|
||||
// 退款备注
|
||||
refundRemark: "",
|
||||
refPass: "",
|
||||
radio1: "油号选错",
|
||||
refundRemark: '',
|
||||
refPass: '',
|
||||
radio1: '油号选错',
|
||||
// 油号列表
|
||||
oilNameList: [],
|
||||
// 油品订单详情列表
|
||||
@ -782,8 +817,6 @@ export default {
|
||||
// 商品订单详情列表
|
||||
goodsInfo: [],
|
||||
oilGunList: [],
|
||||
// 收银员订单详情
|
||||
cashierOrder: {},
|
||||
loading: false,
|
||||
dialogVisible: false,
|
||||
dialogRefund: false,
|
||||
@ -792,8 +825,8 @@ export default {
|
||||
staffList: [],
|
||||
// 日期范围
|
||||
dateRange: [],
|
||||
beginTime: "",
|
||||
endTime: "",
|
||||
beginTime: '',
|
||||
endTime: '',
|
||||
isOilVouchers: false,
|
||||
isGoods: false,
|
||||
isOil: false,
|
||||
@ -807,8 +840,8 @@ export default {
|
||||
queryParams: {
|
||||
page: 1,
|
||||
pageSize: 10,
|
||||
beginTime: "",
|
||||
endTime: "",
|
||||
beginTime: '',
|
||||
endTime: ''
|
||||
},
|
||||
orderStatistics: {
|
||||
numberOfStrokes: '0',
|
||||
@ -816,29 +849,29 @@ export default {
|
||||
theTotalAmountPaid: '0',
|
||||
oilDiscounts: '0',
|
||||
theTotalAmountOfOil: '0',
|
||||
theTotalAmountOfTheItem: '0',
|
||||
theTotalAmountOfTheItem: '0'
|
||||
},
|
||||
// 支付类型列表
|
||||
payList: [],
|
||||
total: 0,
|
||||
seekZeroAmount: 0,
|
||||
getId: ""
|
||||
getId: ''
|
||||
}
|
||||
},
|
||||
created() {
|
||||
let start = new Date();
|
||||
let start = new Date()
|
||||
start.setHours(0)
|
||||
start.setMinutes(0)
|
||||
start.setSeconds(0)
|
||||
start.setMilliseconds(0)
|
||||
this.dateRange = [start, new Date()];
|
||||
this.dateRange = [start, new Date()]
|
||||
this.beginTime = start
|
||||
this.endTime = new Date()
|
||||
this.isSysDate = true
|
||||
this.getList();
|
||||
this.getList()
|
||||
// this.getOrderStatistics();
|
||||
this.getStaffList();
|
||||
this.getOilGunList();
|
||||
this.getStaffList()
|
||||
this.getOilGunList()
|
||||
},
|
||||
methods: {
|
||||
|
||||
@ -849,12 +882,11 @@ export default {
|
||||
dateRange.push(this.endTime.toLocaleDateString())
|
||||
}
|
||||
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')
|
||||
})
|
||||
},
|
||||
// 获取订单统计信息
|
||||
|
||||
getOrderStatistics() {
|
||||
let dateRange = []
|
||||
if (this.beginTime && this.endTime) {
|
||||
@ -867,23 +899,23 @@ export default {
|
||||
},
|
||||
// 获取员工姓名
|
||||
getRealName(list, val) {
|
||||
let name = "";
|
||||
let name = ''
|
||||
list.forEach(item => {
|
||||
if (item.id == val) {
|
||||
name = item.realName
|
||||
}
|
||||
})
|
||||
return name;
|
||||
return name
|
||||
},
|
||||
// 获取员工手机号
|
||||
getMobile(list, val) {
|
||||
let name = "";
|
||||
let name = ''
|
||||
list.forEach(item => {
|
||||
if (item.id == val) {
|
||||
name = item.mobile
|
||||
}
|
||||
})
|
||||
return name;
|
||||
return name
|
||||
},
|
||||
|
||||
async printLocally(data) {
|
||||
@ -1057,6 +1089,13 @@ export default {
|
||||
// consumeAmount:this.consumeAmount,
|
||||
// // 屯油卡付款
|
||||
// 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 => {
|
||||
let o = {
|
||||
oilName: order.name,
|
||||
unit: order.num + "" + order.unit,
|
||||
unit: order.num + '' + order.unit,
|
||||
amount: order.memberPrice.toString()
|
||||
}
|
||||
goodsOrderR.push(o)
|
||||
@ -1159,120 +1198,60 @@ export default {
|
||||
this.refDialogRefund = true;
|
||||
},
|
||||
|
||||
|
||||
// 退款
|
||||
// 退款前置方法 渲染页面 要退的东西
|
||||
async handleRefund(id) {
|
||||
this.dialogRefund = true;
|
||||
await cashierOrder(id).then(response => {
|
||||
this.cashierOrder = response.data
|
||||
this.dialogRefund = true
|
||||
//根据id 查询收银台订单
|
||||
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;
|
||||
}
|
||||
})
|
||||
//退款确定
|
||||
// this.$confirm('是否将该收银台下的订单全部退款, 是否继续?', '提示', {
|
||||
// confirmButtonText: '确定',
|
||||
// cancelButtonText: '取消',
|
||||
// type: 'warning'
|
||||
// }).then(() => {
|
||||
// this.dialogRefund = true;
|
||||
// cashierOrder(id).then( response => {
|
||||
// this.cashierOrder = response.data
|
||||
// if (response.data.status === "refund") {
|
||||
// this.$message({
|
||||
// type: 'info',
|
||||
// message: '该订单已经退款'
|
||||
// });
|
||||
// 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;
|
||||
// 如果有油品则查询油品
|
||||
if (res1.data.oilOrderId) {
|
||||
let resOilOrder = await oilOrderInfo(res1.data.oilOrderId)
|
||||
couponId = resOilOrder.data.couponId
|
||||
|
||||
}
|
||||
// 如果有用到优惠券了 则把优惠券查询出来
|
||||
if (couponId) {
|
||||
let resCoupon = await selectOneCardName({ id: couponId })
|
||||
console.log('优惠券', resCoupon)
|
||||
this.cardCouponUser = resCoupon.data
|
||||
}
|
||||
else {
|
||||
this.cardCouponUser = {
|
||||
couponName: '无'
|
||||
}
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
//确定退款
|
||||
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 ={
|
||||
|
||||
orderNo: this.cashierOrder.orderNo,
|
||||
storeId: this.cashierOrder.storeId,
|
||||
refundRemark: this.radio1 + "-" + this.refundRemark,
|
||||
type: "canRefund",
|
||||
isOilVouchers: this.isOilVouchers,
|
||||
isGoods: this.isGoods,
|
||||
isOil: this.isOil,
|
||||
isOilCard: this.isOilCard, // 是否推掉油卡
|
||||
isOilFuel: this.isOilFuel, //是否推掉储值卡
|
||||
refundAmt: refundAmt
|
||||
cardCouponUserId: this.cardCouponUser.id,
|
||||
}
|
||||
await refundApi(map).then(res => {
|
||||
let res = await cashierRefund(map)
|
||||
|
||||
if (res.code == 200) {
|
||||
this.$message({
|
||||
type: 'info',
|
||||
message: '退款成功'
|
||||
});
|
||||
// this.printLocally()
|
||||
this.reoilOrderReport()
|
||||
|
||||
this.$message.success("退款成功")
|
||||
}else {
|
||||
this.$message.error(res.msg)
|
||||
}
|
||||
|
||||
})
|
||||
|
||||
this.loading = false;
|
||||
|
||||
this.getList();
|
||||
// this.getOrderStatistics();
|
||||
this.getStaffList();
|
||||
// this.oilOrderReport()
|
||||
this.dialogRefund = false
|
||||
this.loading = true
|
||||
this.loading = false
|
||||
this.getList()
|
||||
this.getStaffList()
|
||||
|
||||
},
|
||||
// 获取油枪信息
|
||||
@ -1290,35 +1269,34 @@ export default {
|
||||
},
|
||||
// 获取油枪名称
|
||||
getName1(oilNameList, id) {
|
||||
let name = ""
|
||||
let _this = this;
|
||||
if (oilNameList != null && oilNameList != "") {
|
||||
let name = ''
|
||||
let _this = this
|
||||
if (oilNameList != null && oilNameList != '') {
|
||||
oilNameList.forEach(item => {
|
||||
if (item.id == id) {
|
||||
name = item.gunName;
|
||||
name = item.gunName
|
||||
}
|
||||
})
|
||||
}
|
||||
return name;
|
||||
return name
|
||||
},
|
||||
// 获取油号名称
|
||||
getName(oilNameList, id) {
|
||||
let name = ""
|
||||
let _this = this;
|
||||
if (oilNameList != null && oilNameList != "") {
|
||||
let name = ''
|
||||
let _this = this
|
||||
if (oilNameList != null && oilNameList != '') {
|
||||
oilNameList.forEach(item => {
|
||||
if (item.id == id) {
|
||||
name = item.oilName;
|
||||
_this.oilType = item.oilType;
|
||||
name = item.oilName
|
||||
_this.oilType = item.oilType
|
||||
}
|
||||
})
|
||||
}
|
||||
return name;
|
||||
return name
|
||||
},
|
||||
|
||||
getOrdersInfo2(id) {
|
||||
this.ordersDrawer=true;
|
||||
|
||||
this.ordersDrawer = true
|
||||
|
||||
},
|
||||
// 获取订单详情
|
||||
@ -1327,7 +1305,7 @@ export default {
|
||||
this.cashierOrder = response.data
|
||||
this.getOilList(this.cashierOrder.orderNo)
|
||||
this.getGoodsLists(this.cashierOrder.goodsOrderId)
|
||||
this.dialogVisible = true;
|
||||
this.dialogVisible = true
|
||||
})
|
||||
},
|
||||
async getOilList(orderNo) {
|
||||
@ -1337,25 +1315,22 @@ export default {
|
||||
},
|
||||
async getGoodsLists(id) {
|
||||
await getOrderGoods({ orderId: id }).then(response => {
|
||||
this.goodsInfo = response.data;
|
||||
this.goodsInfo = response.data
|
||||
})
|
||||
},
|
||||
parseTime1(dateTime) {
|
||||
let date = new Date(dateTime);
|
||||
let y = date.getFullYear() + "-";
|
||||
let mon = ((date.getMonth() + 1 < 10) ? ('0' + date.getMonth()) : date.getMonth()) + "-";
|
||||
let d = ((date.getDate() < 10) ? ('0' + date.getDate()) : date.getDate()) + " ";
|
||||
let h = ((date.getHours() < 10) ? ('0' + date.getHours()) : date.getHours()) + ":";
|
||||
let m = ((date.getMinutes() < 10) ? ('0' + date.getMinutes()) : date.getMinutes()) + ":";
|
||||
let s = ((date.getSeconds() < 10) ? ('0' + date.getSeconds()) : date.getSeconds());
|
||||
let date = new Date(dateTime)
|
||||
let y = date.getFullYear() + '-'
|
||||
let mon = ((date.getMonth() + 1 < 10) ? ('0' + date.getMonth()) : date.getMonth()) + '-'
|
||||
let d = ((date.getDate() < 10) ? ('0' + date.getDate()) : date.getDate()) + ' '
|
||||
let h = ((date.getHours() < 10) ? ('0' + date.getHours()) : date.getHours()) + ':'
|
||||
let m = ((date.getMinutes() < 10) ? ('0' + date.getMinutes()) : date.getMinutes()) + ':'
|
||||
let s = ((date.getSeconds() < 10) ? ('0' + date.getSeconds()) : date.getSeconds())
|
||||
// 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) {
|
||||
if (val != undefined) {
|
||||
this.queryParams.page = val
|
||||
}
|
||||
//分页专用
|
||||
pageList(val) {
|
||||
|
||||
let dateRange1 = this.dateRange
|
||||
let dateRange = []
|
||||
@ -1371,17 +1346,42 @@ export default {
|
||||
// }
|
||||
|
||||
listCashierOrder(this.addDateRange(this.queryParams, dateRange)).then(response => {
|
||||
this.orderList = response.data.records;
|
||||
this.total = response.data.total;
|
||||
this.orderList = response.data.records
|
||||
this.total = response.data.total
|
||||
this.queryParams.page = response.data.current
|
||||
this.isSysDate = false
|
||||
})
|
||||
this.getSeekZero(val)
|
||||
this.getSeekZero()
|
||||
this.getOrderStatistics()
|
||||
},
|
||||
getSeekZero(val) {
|
||||
if (val != undefined) {
|
||||
this.queryParams.page = val
|
||||
// 获取列表信息
|
||||
getList() {
|
||||
|
||||
// 以防监听不到 重新赋值属性
|
||||
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 = []
|
||||
if (this.beginTime && this.endTime) {
|
||||
dateRange.push(this.beginTime.toLocaleDateString())
|
||||
|
Loading…
Reference in New Issue
Block a user