bug
This commit is contained in:
parent
84091da9d5
commit
c1bb1af124
@ -139,6 +139,7 @@ export default {
|
||||
this.geoCoder.getAddress(lnglat, (status, result) => {
|
||||
if (status === "complete" && result.regeocode) {
|
||||
this.form.address = result.regeocode.formattedAddress;
|
||||
this.pasVal()
|
||||
}
|
||||
});
|
||||
},
|
||||
|
@ -383,29 +383,46 @@
|
||||
</el-tag> -->
|
||||
</div>
|
||||
<!-- <div style="text-align: center;margin-bottom: 10px">赠送金额</div> -->
|
||||
<div>
|
||||
<el-input v-model="authCode"
|
||||
v-focus ref="getFocus"
|
||||
autofocus="autofocus"
|
||||
@keydown.enter.native="collection"
|
||||
placeholder="扫描或输入付款码、支持微信、支付宝、云闪付">
|
||||
<i
|
||||
slot="suffix">
|
||||
<svg t="1697791915471" class="icon" viewBox="0 0 1024 1024" version="1.1"
|
||||
xmlns="http://www.w3.org/2000/svg" p-id="1479" width="32" height="32">
|
||||
<path
|
||||
d="M149.333333 170.858667A21.546667 21.546667 0 0 1 170.858667 149.333333H384V106.666667H170.858667A64.213333 64.213333 0 0 0 106.666667 170.858667V384h42.666666V170.858667zM170.858667 874.666667A21.546667 21.546667 0 0 1 149.333333 853.141333V640H106.666667v213.141333A64.213333 64.213333 0 0 0 170.858667 917.333333H384v-42.666666H170.858667zM853.12 149.333333A21.546667 21.546667 0 0 1 874.666667 170.858667V384h42.666666V170.858667A64.213333 64.213333 0 0 0 853.141333 106.666667H640v42.666666h213.141333zM874.666667 853.141333A21.546667 21.546667 0 0 1 853.141333 874.666667H640v42.666666h213.141333A64.213333 64.213333 0 0 0 917.333333 853.141333V640h-42.666666v213.141333zM106.666667 490.666667h810.666666v42.666666H106.666667v-42.666666z"
|
||||
fill="#3D3D3D" p-id="1480"></path>
|
||||
</svg>
|
||||
</i>
|
||||
</el-input>
|
||||
<div v-if="cardValueForm.paymentType != 'CASH'">
|
||||
<div>
|
||||
<el-input v-model="authCode"
|
||||
v-focus ref="getFocus"
|
||||
autofocus="autofocus"
|
||||
@keydown.enter.native="collection"
|
||||
placeholder="扫描或输入付款码、支持微信、支付宝、云闪付">
|
||||
<i
|
||||
slot="suffix">
|
||||
<svg t="1697791915471" class="icon" viewBox="0 0 1024 1024" version="1.1"
|
||||
xmlns="http://www.w3.org/2000/svg" p-id="1479" width="32" height="32">
|
||||
<path
|
||||
d="M149.333333 170.858667A21.546667 21.546667 0 0 1 170.858667 149.333333H384V106.666667H170.858667A64.213333 64.213333 0 0 0 106.666667 170.858667V384h42.666666V170.858667zM170.858667 874.666667A21.546667 21.546667 0 0 1 149.333333 853.141333V640H106.666667v213.141333A64.213333 64.213333 0 0 0 170.858667 917.333333H384v-42.666666H170.858667zM853.12 149.333333A21.546667 21.546667 0 0 1 874.666667 170.858667V384h42.666666V170.858667A64.213333 64.213333 0 0 0 853.141333 106.666667H640v42.666666h213.141333zM874.666667 853.141333A21.546667 21.546667 0 0 1 853.141333 874.666667H640v42.666666h213.141333A64.213333 64.213333 0 0 0 917.333333 853.141333V640h-42.666666v213.141333zM106.666667 490.666667h810.666666v42.666666H106.666667v-42.666666z"
|
||||
fill="#3D3D3D" p-id="1480"></path>
|
||||
</svg>
|
||||
</i>
|
||||
</el-input>
|
||||
</div>
|
||||
<div class="demo-image">
|
||||
<div class="block" style="text-align: center">
|
||||
<el-image
|
||||
style="width: 200px; height: 200px"
|
||||
fit="cover"
|
||||
src="https://oil.wudb.cn/static/img/scan-demo.fcb8b1ab.png"></el-image>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="demo-image">
|
||||
<div class="block" style="text-align: center">
|
||||
<el-image
|
||||
style="width: 200px; height: 200px"
|
||||
fit="cover"
|
||||
src="https://oil.wudb.cn/static/img/scan-demo.fcb8b1ab.png"></el-image>
|
||||
<div v-else>
|
||||
<div>
|
||||
<el-input v-model="authCode"
|
||||
v-focus ref="getFocus"
|
||||
autofocus
|
||||
@input="changeSeekZero"
|
||||
@keydown.enter.native="collection"
|
||||
placeholder="请输入收款金额">
|
||||
</el-input>
|
||||
</div>
|
||||
<div style="text-align: right;margin: 10px 0">
|
||||
<span>应找零</span>
|
||||
<span style="color: red;font-size: 18px"> ¥{{ seekZero }}</span>
|
||||
</div>
|
||||
</div>
|
||||
<el-divider></el-divider>
|
||||
@ -876,6 +893,7 @@ export default {
|
||||
childComponentKey:1,
|
||||
|
||||
authCode: '', // 支付码
|
||||
seekZero:0,
|
||||
|
||||
timer: null,
|
||||
|
||||
@ -1005,6 +1023,10 @@ export default {
|
||||
this.getAllAmount()
|
||||
},
|
||||
methods: {
|
||||
// 计算找零金额
|
||||
changeSeekZero(){
|
||||
this.seekZero = (this.authCode - this.cardValueForm.amount).toFixed(2)
|
||||
},
|
||||
handleQuery(){
|
||||
this.subCardList.page = 1;
|
||||
this.getOrderList()
|
||||
@ -1459,6 +1481,17 @@ export default {
|
||||
|
||||
// 最终支付
|
||||
async collection() {
|
||||
if (this.cardValueForm.paymentType=="CASH"){
|
||||
if (this.authCode<this.cardValueForm.amount || this.seekZero<0){
|
||||
this.$modal.msgError("请输入正确的金额");
|
||||
return;
|
||||
}
|
||||
if (!this.authCode){
|
||||
this.$modal.msgError("请输入正确的金额");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
let userForm = this.form
|
||||
|
||||
if (this.flag === 1) {
|
||||
|
@ -21,11 +21,12 @@
|
||||
<el-table-column label="实付金额" align="center" prop="payAmount"/>
|
||||
<el-table-column label="付款类型" align="center" prop="payType">
|
||||
<template slot-scope="scope">
|
||||
<!-- <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>{{ scope.row.payType }}</span>-->
|
||||
<dict-tag :options="dict.type.payment_type" :value="scope.row.payType"/>
|
||||
<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-if="scope.row.payType == 'UNIONPAY'">银联二维码</span>
|
||||
<span v-else>小程序码</span>
|
||||
<!-- <dict-tag :options="dict.type.payment_type" :value="scope.row.payType"/>-->
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="订单号" align="center" prop="orderNo" width="220px"/>
|
||||
|
@ -123,10 +123,10 @@
|
||||
@sort-change="handleSortChange">
|
||||
<el-table-column label="ID" prop="id" align="center" width="60"/>
|
||||
<el-table-column label="方案名称" prop="name" align="center"/>
|
||||
<el-table-column label="员工角色" prop="staffRoleGroup" align="center">
|
||||
<template slot-scope="scope">
|
||||
<span>{{scope.row.staffRoleGroup ? getStaffDuty(roleList,scope.row.staffRoleGroup) : "--"}}</span>
|
||||
</template>
|
||||
<el-table-column label="员工角色" prop="dutyName" align="center">
|
||||
<!-- <template slot-scope="scope">-->
|
||||
<!-- <span>{{scope.row.staffRoleGroup ? getStaffDuty(roleList,scope.row.staffRoleGroup) : "--"}}</span>-->
|
||||
<!-- </template>-->
|
||||
</el-table-column>
|
||||
<el-table-column label="提成来源" prop="commissionSource" align="center" />
|
||||
<el-table-column label="满足条件" prop="meetCondition" align="center" width="260">
|
||||
|
@ -89,6 +89,10 @@ public class FyPayServiceImpl implements FyPayService {
|
||||
Map<String, String> resMap = Utils.xmlStr2Map(rspXml);
|
||||
|
||||
String str = resMap.get("sign");
|
||||
String resultCode = resMap.get("result_code");
|
||||
if (!resultCode.equals("000000")){
|
||||
throw new RuntimeException(resMap.get("result_msg"));
|
||||
}
|
||||
if (Utils.verifySign(resMap, str)){
|
||||
ThreadUtil.execAsync(() -> {
|
||||
Timer timer = new Timer();
|
||||
@ -108,6 +112,8 @@ public class FyPayServiceImpl implements FyPayService {
|
||||
}, 0, 500);
|
||||
Thread.currentThread().interrupt();
|
||||
});
|
||||
}else {
|
||||
throw new Exception("验签失败,请联系管理员!");
|
||||
}
|
||||
return resMap;
|
||||
}
|
||||
|
@ -12,9 +12,11 @@ import com.fuint.business.commission.service.CommissionRecordService;
|
||||
import com.fuint.business.commission.service.StaffCommissionService;
|
||||
import com.fuint.business.commission.vo.StaffCommissionVo;
|
||||
import com.fuint.business.member.entity.LJStaff;
|
||||
import com.fuint.business.member.service.ILJDutyService;
|
||||
import com.fuint.business.member.service.ILJStaffService;
|
||||
import com.fuint.common.dto.AccountInfo;
|
||||
import com.fuint.common.util.TokenUtil;
|
||||
import com.fuint.system.role.entity.TDuty;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@ -22,22 +24,35 @@ import java.text.SimpleDateFormat;
|
||||
import java.time.LocalDate;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* 员工提成方案信息 业务层
|
||||
*/
|
||||
@Service
|
||||
public class StaffCommissionServiceImpl extends ServiceImpl<StaffCommissionMapper, StaffCommission> implements StaffCommissionService {
|
||||
@Autowired
|
||||
private ILJDutyService dutyService;
|
||||
|
||||
@Override
|
||||
public IPage<StaffCommissionVo> selectCommissionList(Page page, StaffCommission commission) {
|
||||
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
||||
Integer storeId = nowAccountInfo.getStoreId();
|
||||
commission.setStoreId(storeId);
|
||||
IPage<StaffCommissionVo> staffCommissionIPage = baseMapper.selectCommissionList(page, commission);
|
||||
for (StaffCommissionVo record : staffCommissionIPage.getRecords()) {
|
||||
List<TDuty> tDuties = dutyService.selectDutyList();
|
||||
String[] staffRoleGroup = record.getStaffRoleGroup().split(",");
|
||||
String str = "";
|
||||
for (String staffRole : staffRoleGroup) {
|
||||
for (TDuty tDuty : tDuties) {
|
||||
if (staffRole.equals(tDuty.getDutyId().toString())){
|
||||
str += tDuty.getDutyName()+",";
|
||||
}
|
||||
}
|
||||
}
|
||||
record.setDutyName(str);
|
||||
}
|
||||
return staffCommissionIPage;
|
||||
}
|
||||
|
||||
|
@ -211,7 +211,9 @@ public class LJStaffServiceImpl extends ServiceImpl<LJStaffMapper, LJStaff> impl
|
||||
if (StringUtils.isNotEmpty(staff.getPassword())){
|
||||
TAccount tAccount = accountService.selectAccountByStaffId(staff.getId());
|
||||
tAccount.setPassword(staff.getPassword());
|
||||
tAccount.setAccountName(staff.getMobile());
|
||||
if (tAccount.getAccountName().matches("\\d+")){
|
||||
tAccount.setAccountName(staff.getMobile());
|
||||
}
|
||||
accountService.entryptPassword(tAccount);
|
||||
try {
|
||||
accountService.editAccount(tAccount,null);
|
||||
|
@ -25,7 +25,7 @@
|
||||
and pay_type = #{order.payType}
|
||||
</if>
|
||||
<if test="order.orderStatus != null and order.orderStatus != ''">
|
||||
and order_status != #{order.orderStatus}
|
||||
and order_status = #{order.orderStatus}
|
||||
</if>
|
||||
<if test="order.orderNo != null and order.orderNo != ''">
|
||||
and order_no like concat('%', #{order.orderNo}, '%')
|
||||
|
@ -383,7 +383,11 @@ public class OilOrderServiceImpl extends ServiceImpl<OilOrderMapper, OilOrder> i
|
||||
cashierOrder.setAmount(oilAmount+goodsAmount);
|
||||
cashierOrder.setStatus(payStatus);
|
||||
if (payType.equals("CASH")){
|
||||
cashierOrder.setPayAmount(Double.valueOf(map.get("authCode")));
|
||||
if (StringUtils.isNotEmpty(map.get("authCode"))){
|
||||
cashierOrder.setPayAmount(Double.valueOf(map.get("authCode")));
|
||||
}else {
|
||||
cashierOrder.setPayAmount(0.0);
|
||||
}
|
||||
cashierOrder.setPayTime(new Date());
|
||||
this.insertAllOrderInfo(orderNo,storeId,oilAmount+goodsAmount,Double.valueOf(map.get("allAmount")),payType,userId,"PC","6","paid");
|
||||
}else {
|
||||
@ -428,6 +432,7 @@ public class OilOrderServiceImpl extends ServiceImpl<OilOrderMapper, OilOrder> i
|
||||
fyPayService.pay(map1);
|
||||
} catch (Exception e){
|
||||
e.printStackTrace();
|
||||
// throw new RuntimeException("支付失败");
|
||||
}
|
||||
}
|
||||
|
||||
@ -435,6 +440,9 @@ public class OilOrderServiceImpl extends ServiceImpl<OilOrderMapper, OilOrder> i
|
||||
LJOrder goodsOrder1 = orderService.selectGoodsOrder(orderNo);
|
||||
if (!ObjectUtil.isEmpty(oilOrder2)){
|
||||
orders.put("oilOrder",oilOrder2);
|
||||
if (oilOrder2.getOrderStatus().equals("paid")){
|
||||
cashierOrder.setPayTime(new Date());
|
||||
}
|
||||
cashierOrder.setOilOrderId(oilOrder2.getId());
|
||||
}
|
||||
if (!ObjectUtil.isEmpty(goodsOrder1)){
|
||||
|
@ -179,7 +179,7 @@
|
||||
<div class="center-left-th">
|
||||
<div class="th-box">
|
||||
<div>扫码支付</div>
|
||||
<div class="bule">{{ +oilActualPay + (+goodsActualPay) }}</div>
|
||||
<div class="bule">{{ ((+oilActualPay) + (+goodsActualPay)).toFixed(2) }}</div>
|
||||
</div>
|
||||
<div class="th-box">
|
||||
<div>找零</div>
|
||||
@ -207,7 +207,7 @@
|
||||
</div>
|
||||
<div class="center-left-bottom">
|
||||
<div>
|
||||
<div class="bottom-price">¥{{ +oilActualPay + (+goodsActualPay) }}</div>
|
||||
<div class="bottom-price">¥{{ ((+oilActualPay) + (+goodsActualPay)).toFixed(2) }}</div>
|
||||
<div class="price-red">优惠合计:{{ oilDiscount + goodsDiscount + fullReduction + couponAmount }}元/{{consumeRefuelMoney}}L</div>
|
||||
</div>
|
||||
<el-button class="center-left-lv" :disabled="(oilAmount + goodsAmount)==0" @click="settlement">立即结算</el-button>
|
||||
@ -452,7 +452,7 @@
|
||||
<div>
|
||||
<el-input v-model="authCode"
|
||||
v-focus
|
||||
autofocus
|
||||
:autofocus="autofocus"
|
||||
@keydown.enter.native="collection"
|
||||
placeholder="扫描或输入付款码、支持微信、支付宝、云闪付">
|
||||
<i
|
||||
@ -473,7 +473,7 @@
|
||||
<div>
|
||||
<el-input v-model="authCode"
|
||||
v-focus ref="getFocus"
|
||||
autofocus
|
||||
:autofocus="autofocus"
|
||||
@input="changeSeekZero"
|
||||
@keydown.enter.native="collection"
|
||||
placeholder="请输入收款金额">
|
||||
@ -765,6 +765,14 @@
|
||||
<div v-if="isMember == false">{{ item.retailPrice }}</div>
|
||||
<div v-else>{{ item.memberPrice }}</div>
|
||||
</div>
|
||||
<div class="input-box">
|
||||
<div>支付方式</div>
|
||||
<div v-if="payType == 'CASH'">现金</div>
|
||||
<div v-else-if="payType == 'WECHAT'">微信</div>
|
||||
<div v-else-if="payType == 'ALIPAY'">支付宝</div>
|
||||
<div v-else-if="payType == 'UNIONPAY'">银联二维码</div>
|
||||
<div v-else>小程序码</div>
|
||||
</div>
|
||||
<div class="input-box">
|
||||
<div>合计</div>
|
||||
<div>¥{{ oilAmount+(+goodsAmount) }}</div>
|
||||
@ -773,6 +781,10 @@
|
||||
<div>优惠合计</div>
|
||||
<div>¥{{ oilDiscount + goodsDiscount + fullReduction + couponAmount }}</div>
|
||||
</div>
|
||||
<div class="input-box">
|
||||
<div>储值卡或囤油卡付款</div>
|
||||
<div>¥{{ oilAmount+(+goodsAmount) - (oilDiscount + goodsDiscount + fullReduction + couponAmount) }}</div>
|
||||
</div>
|
||||
<div class="input-box">
|
||||
<div>实付款</div>
|
||||
<div>¥{{ (+oilActualPay)+(+goodsActualPay) }}</div>
|
||||
@ -809,6 +821,8 @@
|
||||
name: "homeindex",
|
||||
data(){
|
||||
return{
|
||||
gunIndex:[],
|
||||
autofocus:false,
|
||||
baseUrl:process.env.VUE_APP_BASE_API,
|
||||
// 满减全选
|
||||
checkAll1: false,
|
||||
@ -1198,6 +1212,7 @@
|
||||
|
||||
},
|
||||
clear(){
|
||||
this.autofocus = false
|
||||
this.dialogVisiblej = false
|
||||
this.seekZero = 0
|
||||
},
|
||||
@ -1786,6 +1801,7 @@
|
||||
// }
|
||||
if (this.balance>0){
|
||||
this.checkAll4 = true
|
||||
this.countAmountFull()
|
||||
}
|
||||
await this.getGrade(this.member.id,this.member.gradeId)
|
||||
if (!this.isFixingLevel){
|
||||
@ -1794,6 +1810,7 @@
|
||||
},
|
||||
getOilCoupon(){
|
||||
let type = 0;
|
||||
// if (this.consumeAmount==0){
|
||||
if (this.consumeAmount==0){
|
||||
type = 1;
|
||||
}else {
|
||||
@ -2197,6 +2214,7 @@
|
||||
},
|
||||
// 立即结算
|
||||
settlement(){
|
||||
this.autofocus = true
|
||||
if (this.payType=="APPLET_CODE") {
|
||||
if (this.goodsOrder.length > 0) {
|
||||
this.$modal.msgError("非油商品不可使用小程序码支付")
|
||||
@ -2284,6 +2302,7 @@
|
||||
// }
|
||||
if (this.balance>0){
|
||||
this.checkAll4 = true
|
||||
this.countAmountFull()
|
||||
}
|
||||
await this.getGrade(this.member.id,this.member.gradeId)
|
||||
if (!this.isFixingLevel){
|
||||
@ -2429,6 +2448,7 @@
|
||||
},
|
||||
// 加油金额
|
||||
refuel(data){
|
||||
// this.gunIndex.push(data.id)
|
||||
this.select = "元";
|
||||
this.rise = [
|
||||
{value:"¥100"},
|
||||
@ -2464,7 +2484,11 @@
|
||||
// 确定收款
|
||||
async collection(){
|
||||
if (this.payType=="CASH"){
|
||||
if (this.authCode==undefined || this.authCode=="" || this.seekZero<0){
|
||||
if (this.authCode<((+this.oilActualPay) + (+this.goodsActualPay)) || this.seekZero<0){
|
||||
this.$modal.msgError("请输入正确的金额");
|
||||
return;
|
||||
}
|
||||
if (!this.authCode && ((+this.oilActualPay) + (+this.goodsActualPay))>0){
|
||||
this.$modal.msgError("请输入正确的金额");
|
||||
return;
|
||||
}
|
||||
@ -2533,6 +2557,7 @@
|
||||
isPaySuccess = true
|
||||
_this.isPay = true;
|
||||
_this.seekZero = 0
|
||||
_this.loading = false;
|
||||
_this.amount = 0
|
||||
for (let i =0;i<_this.oilPreferentialData.length;i++){
|
||||
_this.oilPreferentialData[i].oilPreferential.storeId = response.data.oilOrder.storeId
|
||||
@ -2552,6 +2577,7 @@
|
||||
_this.isPay = true;
|
||||
_this.seekZero = 0
|
||||
_this.amount = 0
|
||||
_this.loading = false;
|
||||
_this.printLocally()
|
||||
_this.resetting1()
|
||||
return;
|
||||
@ -2560,6 +2586,7 @@
|
||||
if (response.data.error==1){
|
||||
this.$modal.msgError("商品库存不足,请重新选择商品")
|
||||
this.loading = false;
|
||||
this.autofocus = false
|
||||
this.dialogVisiblej = false;
|
||||
return;
|
||||
}
|
||||
@ -2733,6 +2760,7 @@
|
||||
}, 1000);
|
||||
},
|
||||
handClose(){
|
||||
this.loading = false
|
||||
this.dialogVisiblejLoading = false
|
||||
// this.resetting1()
|
||||
this.authCode = "";
|
||||
@ -2781,6 +2809,7 @@
|
||||
this.isPaySuccess = false;
|
||||
this.isPay = false;
|
||||
|
||||
this.autofocus = false
|
||||
this.dialogVisiblej = false
|
||||
},
|
||||
// 支付方式
|
||||
@ -3024,6 +3053,17 @@
|
||||
padding: 10px;
|
||||
color: #3e4f60;
|
||||
}
|
||||
.of-box2{
|
||||
width: 31%;
|
||||
margin-right: 10px;
|
||||
margin-bottom: 10px;
|
||||
border-radius: 8px;
|
||||
box-sizing: border-box;
|
||||
background-color: #2773fc;
|
||||
height: 110px;
|
||||
padding: 10px;
|
||||
color: #3e4f60;
|
||||
}
|
||||
.of-title{
|
||||
font-weight: bold;
|
||||
font-size: 22px;
|
||||
|
@ -244,7 +244,7 @@ export default {
|
||||
// 日期范围
|
||||
dateRange: [],
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
loading: false,
|
||||
loadingRes: true,
|
||||
// 标题
|
||||
title: "",
|
||||
@ -428,27 +428,12 @@ export default {
|
||||
if (val!=undefined){
|
||||
this.queryParams.page = val
|
||||
}
|
||||
this.loading = true;
|
||||
this.loadingRes = true;
|
||||
listOrder(this.addDateRange(this.queryParams, this.dateRange)).then( response => {
|
||||
this.list = response.data.records;
|
||||
this.total = response.data.total;
|
||||
this.loading = false;
|
||||
this.loadingRes = false;
|
||||
})
|
||||
// const app = this;
|
||||
// app.loading = true;
|
||||
// app.queryParams.storeIds = app.storeIds ? app.storeIds.join(",") : '';
|
||||
// getOrderList(app.queryParams).then( response => {
|
||||
// this.list = response.data.paginationResponse.content;
|
||||
// this.total = response.data.paginationResponse.totalElements;
|
||||
// this.typeList = response.data.typeList;
|
||||
// this.statusList = response.data.statusList;
|
||||
// this.payStatusList = response.data.payStatusList;
|
||||
// this.orderModeList = response.data.orderModeList;
|
||||
// this.payTypeList = response.data.payTypeList;
|
||||
// this.storeList = response.data.storeList;
|
||||
// this.loading = false;
|
||||
// }
|
||||
// );
|
||||
},
|
||||
// 搜索按钮操作
|
||||
handleQuery() {
|
||||
|
@ -173,7 +173,7 @@
|
||||
<el-table-column prop="orderStatus" label="支付状态">
|
||||
<template slot-scope="scope">
|
||||
<el-tag v-if="scope.row.orderStatus == 'unpaid'">未支付</el-tag>
|
||||
<el-tag type="info" v-else>支付失败</el-tag>
|
||||
<!-- <el-tag type="info" v-else>支付失败</el-tag>-->
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
@ -216,14 +216,14 @@
|
||||
import {exportExcelOilOrderApi} from "@/api/order/exportExcel";
|
||||
|
||||
export default {
|
||||
name: "order_Cashier",
|
||||
name: "order_Unpaid",
|
||||
data(){
|
||||
return{
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
page: 1,
|
||||
pageSize: 10,
|
||||
orderStatus:"paid",
|
||||
orderStatus:"unpaid",
|
||||
},
|
||||
// 总条数
|
||||
total:0,
|
||||
|
@ -385,32 +385,50 @@
|
||||
</el-tag> -->
|
||||
</div>
|
||||
<!-- <div style="text-align: center;margin-bottom: 10px">赠送金额</div> -->
|
||||
<div>
|
||||
<el-input v-model="authCode"
|
||||
v-focus ref="getFocus"
|
||||
autofocus
|
||||
@keydown.enter.native="collection"
|
||||
<div v-if="cardValueForm.paymentType != 'CASH'">
|
||||
<div>
|
||||
<el-input v-model="authCode"
|
||||
v-focus ref="getFocus"
|
||||
autofocus
|
||||
@keydown.enter.native="collection"
|
||||
|
||||
placeholder="扫描或输入付款码、支持微信、支付宝、云闪付">
|
||||
<i
|
||||
slot="suffix">
|
||||
<svg t="1697791915471" class="icon" viewBox="0 0 1024 1024" version="1.1"
|
||||
xmlns="http://www.w3.org/2000/svg" p-id="1479" width="32" height="32">
|
||||
<path
|
||||
d="M149.333333 170.858667A21.546667 21.546667 0 0 1 170.858667 149.333333H384V106.666667H170.858667A64.213333 64.213333 0 0 0 106.666667 170.858667V384h42.666666V170.858667zM170.858667 874.666667A21.546667 21.546667 0 0 1 149.333333 853.141333V640H106.666667v213.141333A64.213333 64.213333 0 0 0 170.858667 917.333333H384v-42.666666H170.858667zM853.12 149.333333A21.546667 21.546667 0 0 1 874.666667 170.858667V384h42.666666V170.858667A64.213333 64.213333 0 0 0 853.141333 106.666667H640v42.666666h213.141333zM874.666667 853.141333A21.546667 21.546667 0 0 1 853.141333 874.666667H640v42.666666h213.141333A64.213333 64.213333 0 0 0 917.333333 853.141333V640h-42.666666v213.141333zM106.666667 490.666667h810.666666v42.666666H106.666667v-42.666666z"
|
||||
fill="#3D3D3D" p-id="1480"></path>
|
||||
</svg>
|
||||
</i>
|
||||
</el-input>
|
||||
</div>
|
||||
<div class="demo-image">
|
||||
<div class="block" style="text-align: center">
|
||||
<el-image
|
||||
style="width: 200px; height: 200px"
|
||||
fit="cover"
|
||||
src="https://oil.wudb.cn/static/img/scan-demo.fcb8b1ab.png"></el-image>
|
||||
placeholder="扫描或输入付款码、支持微信、支付宝、云闪付">
|
||||
<i
|
||||
slot="suffix">
|
||||
<svg t="1697791915471" class="icon" viewBox="0 0 1024 1024" version="1.1"
|
||||
xmlns="http://www.w3.org/2000/svg" p-id="1479" width="32" height="32">
|
||||
<path
|
||||
d="M149.333333 170.858667A21.546667 21.546667 0 0 1 170.858667 149.333333H384V106.666667H170.858667A64.213333 64.213333 0 0 0 106.666667 170.858667V384h42.666666V170.858667zM170.858667 874.666667A21.546667 21.546667 0 0 1 149.333333 853.141333V640H106.666667v213.141333A64.213333 64.213333 0 0 0 170.858667 917.333333H384v-42.666666H170.858667zM853.12 149.333333A21.546667 21.546667 0 0 1 874.666667 170.858667V384h42.666666V170.858667A64.213333 64.213333 0 0 0 853.141333 106.666667H640v42.666666h213.141333zM874.666667 853.141333A21.546667 21.546667 0 0 1 853.141333 874.666667H640v42.666666h213.141333A64.213333 64.213333 0 0 0 917.333333 853.141333V640h-42.666666v213.141333zM106.666667 490.666667h810.666666v42.666666H106.666667v-42.666666z"
|
||||
fill="#3D3D3D" p-id="1480"></path>
|
||||
</svg>
|
||||
</i>
|
||||
</el-input>
|
||||
</div>
|
||||
<div class="demo-image">
|
||||
<div class="block" style="text-align: center">
|
||||
<el-image
|
||||
style="width: 200px; height: 200px"
|
||||
fit="cover"
|
||||
src="https://oil.wudb.cn/static/img/scan-demo.fcb8b1ab.png"></el-image>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div v-else>
|
||||
<div>
|
||||
<el-input v-model="authCode"
|
||||
v-focus ref="getFocus"
|
||||
autofocus
|
||||
@input="changeSeekZero"
|
||||
@keydown.enter.native="collection"
|
||||
placeholder="请输入收款金额">
|
||||
</el-input>
|
||||
</div>
|
||||
<div style="text-align: right;margin: 10px 0">
|
||||
<span>应找零</span>
|
||||
<span style="color: red;font-size: 18px"> ¥{{ seekZero }}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<el-divider></el-divider>
|
||||
<div style="display: flex;justify-content: space-around">
|
||||
<el-button @click="cancelCollection">取消收款</el-button>
|
||||
@ -873,6 +891,7 @@ export default {
|
||||
childComponentKey:1,
|
||||
|
||||
authCode: '', // 支付码
|
||||
seekZero:0,
|
||||
|
||||
timer: null,
|
||||
|
||||
@ -1003,6 +1022,10 @@ export default {
|
||||
this.getAllAmount()
|
||||
},
|
||||
methods: {
|
||||
// 计算找零金额
|
||||
changeSeekZero(){
|
||||
this.seekZero = (this.authCode - this.cardValueForm.amount).toFixed(2)
|
||||
},
|
||||
getName(list,type){
|
||||
let name = ""
|
||||
list.forEach(item => {
|
||||
@ -1466,7 +1489,16 @@ export default {
|
||||
},
|
||||
|
||||
async collection() {
|
||||
|
||||
if (this.cardValueForm.paymentType=="CASH"){
|
||||
if (this.authCode<this.cardValueForm.amount || this.seekZero<0){
|
||||
this.$modal.msgError("请输入正确的金额");
|
||||
return;
|
||||
}
|
||||
if (!this.authCode){
|
||||
this.$modal.msgError("请输入正确的金额");
|
||||
return;
|
||||
}
|
||||
}
|
||||
let userForm = this.form
|
||||
|
||||
if (this.flag === 1) {
|
||||
|
@ -21,11 +21,12 @@
|
||||
<el-table-column label="实付金额" align="center" prop="payAmount"/>
|
||||
<el-table-column label="付款类型" align="center" prop="payType">
|
||||
<template slot-scope="scope">
|
||||
<!-- <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>{{ scope.row.payType }}</span>-->
|
||||
<span>{{getName(payTypeList,scope.row.payType)}}</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 == 'ALIPAY'">支付宝</span>
|
||||
<span v-else-if="scope.row.payType == 'UNIONPAY'">银联二维码</span>
|
||||
<span v-else>小程序码</span>
|
||||
<!-- <span>{{getName(payTypeList,scope.row.payType)}}</span>-->
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="订单号" align="center" prop="orderNo" width="220px"/>
|
||||
|
@ -485,7 +485,7 @@
|
||||
this.isStoreValueCard = true;
|
||||
if (val == 0) {
|
||||
// 没有使用囤油卡
|
||||
if (this.user.cardBalance >= (this.oilOrder.orderAmount - this.fullRedece - this.couponRedece - this.gradeRedece).toFixed(2)){
|
||||
if (this.user.cardBalance >= (this.oilOrder.orderAmount - this.fullRedece - this.couponRedece - this.gradeRedece)){
|
||||
this.balanceRedece = (this.oilOrder.orderAmount - this.fullRedece - this.couponRedece - this.gradeRedece).toFixed(2)
|
||||
} else {
|
||||
this.balanceRedece = this.user.cardBalance
|
||||
|
Loading…
Reference in New Issue
Block a user