This commit is contained in:
cun-nan 2024-01-26 13:33:09 +08:00
parent 84091da9d5
commit c1bb1af124
15 changed files with 218 additions and 94 deletions

View File

@ -139,6 +139,7 @@ export default {
this.geoCoder.getAddress(lnglat, (status, result) => { this.geoCoder.getAddress(lnglat, (status, result) => {
if (status === "complete" && result.regeocode) { if (status === "complete" && result.regeocode) {
this.form.address = result.regeocode.formattedAddress; this.form.address = result.regeocode.formattedAddress;
this.pasVal()
} }
}); });
}, },

View File

@ -383,29 +383,46 @@
</el-tag> --> </el-tag> -->
</div> </div>
<!-- <div style="text-align: center;margin-bottom: 10px">赠送金额</div> --> <!-- <div style="text-align: center;margin-bottom: 10px">赠送金额</div> -->
<div> <div v-if="cardValueForm.paymentType != 'CASH'">
<el-input v-model="authCode" <div>
v-focus ref="getFocus" <el-input v-model="authCode"
autofocus="autofocus" v-focus ref="getFocus"
@keydown.enter.native="collection" autofocus="autofocus"
placeholder="扫描或输入付款码、支持微信、支付宝、云闪付"> @keydown.enter.native="collection"
<i placeholder="扫描或输入付款码、支持微信、支付宝、云闪付">
slot="suffix"> <i
<svg t="1697791915471" class="icon" viewBox="0 0 1024 1024" version="1.1" slot="suffix">
xmlns="http://www.w3.org/2000/svg" p-id="1479" width="32" height="32"> <svg t="1697791915471" class="icon" viewBox="0 0 1024 1024" version="1.1"
<path xmlns="http://www.w3.org/2000/svg" p-id="1479" width="32" height="32">
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" <path
fill="#3D3D3D" p-id="1480"></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"
</svg> fill="#3D3D3D" p-id="1480"></path>
</i> </svg>
</el-input> </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>
<div class="demo-image"> <div v-else>
<div class="block" style="text-align: center"> <div>
<el-image <el-input v-model="authCode"
style="width: 200px; height: 200px" v-focus ref="getFocus"
fit="cover" autofocus
src="https://oil.wudb.cn/static/img/scan-demo.fcb8b1ab.png"></el-image> @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>
</div> </div>
<el-divider></el-divider> <el-divider></el-divider>
@ -876,6 +893,7 @@ export default {
childComponentKey:1, childComponentKey:1,
authCode: '', // authCode: '', //
seekZero:0,
timer: null, timer: null,
@ -1005,6 +1023,10 @@ export default {
this.getAllAmount() this.getAllAmount()
}, },
methods: { methods: {
//
changeSeekZero(){
this.seekZero = (this.authCode - this.cardValueForm.amount).toFixed(2)
},
handleQuery(){ handleQuery(){
this.subCardList.page = 1; this.subCardList.page = 1;
this.getOrderList() this.getOrderList()
@ -1459,6 +1481,17 @@ export default {
// //
async collection() { 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 let userForm = this.form
if (this.flag === 1) { if (this.flag === 1) {

View File

@ -21,11 +21,12 @@
<el-table-column label="实付金额" align="center" prop="payAmount"/> <el-table-column label="实付金额" align="center" prop="payAmount"/>
<el-table-column label="付款类型" align="center" prop="payType"> <el-table-column label="付款类型" align="center" prop="payType">
<template slot-scope="scope"> <template slot-scope="scope">
<!-- <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>{{ scope.row.payType }}</span>--> <span v-else-if="scope.row.payType == 'UNIONPAY'">银联二维码</span>
<dict-tag :options="dict.type.payment_type" :value="scope.row.payType"/> <span v-else>小程序码</span>
<!-- <dict-tag :options="dict.type.payment_type" :value="scope.row.payType"/>-->
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="订单号" align="center" prop="orderNo" width="220px"/> <el-table-column label="订单号" align="center" prop="orderNo" width="220px"/>

View File

@ -123,10 +123,10 @@
@sort-change="handleSortChange"> @sort-change="handleSortChange">
<el-table-column label="ID" prop="id" align="center" width="60"/> <el-table-column label="ID" prop="id" align="center" width="60"/>
<el-table-column label="方案名称" prop="name" align="center"/> <el-table-column label="方案名称" prop="name" align="center"/>
<el-table-column label="员工角色" prop="staffRoleGroup" align="center"> <el-table-column label="员工角色" prop="dutyName" align="center">
<template slot-scope="scope"> <!-- <template slot-scope="scope">-->
<span>{{scope.row.staffRoleGroup ? getStaffDuty(roleList,scope.row.staffRoleGroup) : "--"}}</span> <!-- <span>{{scope.row.staffRoleGroup ? getStaffDuty(roleList,scope.row.staffRoleGroup) : "&#45;&#45;"}}</span>-->
</template> <!-- </template>-->
</el-table-column> </el-table-column>
<el-table-column label="提成来源" prop="commissionSource" align="center" /> <el-table-column label="提成来源" prop="commissionSource" align="center" />
<el-table-column label="满足条件" prop="meetCondition" align="center" width="260"> <el-table-column label="满足条件" prop="meetCondition" align="center" width="260">

View File

@ -89,6 +89,10 @@ public class FyPayServiceImpl implements FyPayService {
Map<String, String> resMap = Utils.xmlStr2Map(rspXml); Map<String, String> resMap = Utils.xmlStr2Map(rspXml);
String str = resMap.get("sign"); 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)){ if (Utils.verifySign(resMap, str)){
ThreadUtil.execAsync(() -> { ThreadUtil.execAsync(() -> {
Timer timer = new Timer(); Timer timer = new Timer();
@ -108,6 +112,8 @@ public class FyPayServiceImpl implements FyPayService {
}, 0, 500); }, 0, 500);
Thread.currentThread().interrupt(); Thread.currentThread().interrupt();
}); });
}else {
throw new Exception("验签失败,请联系管理员!");
} }
return resMap; return resMap;
} }

View File

@ -12,9 +12,11 @@ import com.fuint.business.commission.service.CommissionRecordService;
import com.fuint.business.commission.service.StaffCommissionService; import com.fuint.business.commission.service.StaffCommissionService;
import com.fuint.business.commission.vo.StaffCommissionVo; import com.fuint.business.commission.vo.StaffCommissionVo;
import com.fuint.business.member.entity.LJStaff; import com.fuint.business.member.entity.LJStaff;
import com.fuint.business.member.service.ILJDutyService;
import com.fuint.business.member.service.ILJStaffService; import com.fuint.business.member.service.ILJStaffService;
import com.fuint.common.dto.AccountInfo; import com.fuint.common.dto.AccountInfo;
import com.fuint.common.util.TokenUtil; import com.fuint.common.util.TokenUtil;
import com.fuint.system.role.entity.TDuty;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
@ -22,22 +24,35 @@ import java.text.SimpleDateFormat;
import java.time.LocalDate; import java.time.LocalDate;
import java.time.LocalDateTime; import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter; import java.time.format.DateTimeFormatter;
import java.util.Date; import java.util.*;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/** /**
* 员工提成方案信息 业务层 * 员工提成方案信息 业务层
*/ */
@Service @Service
public class StaffCommissionServiceImpl extends ServiceImpl<StaffCommissionMapper, StaffCommission> implements StaffCommissionService { public class StaffCommissionServiceImpl extends ServiceImpl<StaffCommissionMapper, StaffCommission> implements StaffCommissionService {
@Autowired
private ILJDutyService dutyService;
@Override @Override
public IPage<StaffCommissionVo> selectCommissionList(Page page, StaffCommission commission) { public IPage<StaffCommissionVo> selectCommissionList(Page page, StaffCommission commission) {
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo(); AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
Integer storeId = nowAccountInfo.getStoreId(); Integer storeId = nowAccountInfo.getStoreId();
commission.setStoreId(storeId); commission.setStoreId(storeId);
IPage<StaffCommissionVo> staffCommissionIPage = baseMapper.selectCommissionList(page, commission); 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; return staffCommissionIPage;
} }

View File

@ -211,7 +211,9 @@ public class LJStaffServiceImpl extends ServiceImpl<LJStaffMapper, LJStaff> impl
if (StringUtils.isNotEmpty(staff.getPassword())){ if (StringUtils.isNotEmpty(staff.getPassword())){
TAccount tAccount = accountService.selectAccountByStaffId(staff.getId()); TAccount tAccount = accountService.selectAccountByStaffId(staff.getId());
tAccount.setPassword(staff.getPassword()); tAccount.setPassword(staff.getPassword());
tAccount.setAccountName(staff.getMobile()); if (tAccount.getAccountName().matches("\\d+")){
tAccount.setAccountName(staff.getMobile());
}
accountService.entryptPassword(tAccount); accountService.entryptPassword(tAccount);
try { try {
accountService.editAccount(tAccount,null); accountService.editAccount(tAccount,null);

View File

@ -25,7 +25,7 @@
and pay_type = #{order.payType} and pay_type = #{order.payType}
</if> </if>
<if test="order.orderStatus != null and order.orderStatus != ''"> <if test="order.orderStatus != null and order.orderStatus != ''">
and order_status != #{order.orderStatus} and order_status = #{order.orderStatus}
</if> </if>
<if test="order.orderNo != null and order.orderNo != ''"> <if test="order.orderNo != null and order.orderNo != ''">
and order_no like concat('%', #{order.orderNo}, '%') and order_no like concat('%', #{order.orderNo}, '%')

View File

@ -383,7 +383,11 @@ public class OilOrderServiceImpl extends ServiceImpl<OilOrderMapper, OilOrder> i
cashierOrder.setAmount(oilAmount+goodsAmount); cashierOrder.setAmount(oilAmount+goodsAmount);
cashierOrder.setStatus(payStatus); cashierOrder.setStatus(payStatus);
if (payType.equals("CASH")){ 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()); cashierOrder.setPayTime(new Date());
this.insertAllOrderInfo(orderNo,storeId,oilAmount+goodsAmount,Double.valueOf(map.get("allAmount")),payType,userId,"PC","6","paid"); this.insertAllOrderInfo(orderNo,storeId,oilAmount+goodsAmount,Double.valueOf(map.get("allAmount")),payType,userId,"PC","6","paid");
}else { }else {
@ -428,6 +432,7 @@ public class OilOrderServiceImpl extends ServiceImpl<OilOrderMapper, OilOrder> i
fyPayService.pay(map1); fyPayService.pay(map1);
} catch (Exception e){ } catch (Exception e){
e.printStackTrace(); e.printStackTrace();
// throw new RuntimeException("支付失败");
} }
} }
@ -435,6 +440,9 @@ public class OilOrderServiceImpl extends ServiceImpl<OilOrderMapper, OilOrder> i
LJOrder goodsOrder1 = orderService.selectGoodsOrder(orderNo); LJOrder goodsOrder1 = orderService.selectGoodsOrder(orderNo);
if (!ObjectUtil.isEmpty(oilOrder2)){ if (!ObjectUtil.isEmpty(oilOrder2)){
orders.put("oilOrder",oilOrder2); orders.put("oilOrder",oilOrder2);
if (oilOrder2.getOrderStatus().equals("paid")){
cashierOrder.setPayTime(new Date());
}
cashierOrder.setOilOrderId(oilOrder2.getId()); cashierOrder.setOilOrderId(oilOrder2.getId());
} }
if (!ObjectUtil.isEmpty(goodsOrder1)){ if (!ObjectUtil.isEmpty(goodsOrder1)){

View File

@ -179,7 +179,7 @@
<div class="center-left-th"> <div class="center-left-th">
<div class="th-box"> <div class="th-box">
<div>扫码支付</div> <div>扫码支付</div>
<div class="bule">{{ +oilActualPay + (+goodsActualPay) }}</div> <div class="bule">{{ ((+oilActualPay) + (+goodsActualPay)).toFixed(2) }}</div>
</div> </div>
<div class="th-box"> <div class="th-box">
<div>找零</div> <div>找零</div>
@ -207,7 +207,7 @@
</div> </div>
<div class="center-left-bottom"> <div class="center-left-bottom">
<div> <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 class="price-red">优惠合计{{ oilDiscount + goodsDiscount + fullReduction + couponAmount }}/{{consumeRefuelMoney}}L</div>
</div> </div>
<el-button class="center-left-lv" :disabled="(oilAmount + goodsAmount)==0" @click="settlement">立即结算</el-button> <el-button class="center-left-lv" :disabled="(oilAmount + goodsAmount)==0" @click="settlement">立即结算</el-button>
@ -452,7 +452,7 @@
<div> <div>
<el-input v-model="authCode" <el-input v-model="authCode"
v-focus v-focus
autofocus :autofocus="autofocus"
@keydown.enter.native="collection" @keydown.enter.native="collection"
placeholder="扫描或输入付款码、支持微信、支付宝、云闪付"> placeholder="扫描或输入付款码、支持微信、支付宝、云闪付">
<i <i
@ -473,7 +473,7 @@
<div> <div>
<el-input v-model="authCode" <el-input v-model="authCode"
v-focus ref="getFocus" v-focus ref="getFocus"
autofocus :autofocus="autofocus"
@input="changeSeekZero" @input="changeSeekZero"
@keydown.enter.native="collection" @keydown.enter.native="collection"
placeholder="请输入收款金额"> placeholder="请输入收款金额">
@ -765,6 +765,14 @@
<div v-if="isMember == false">{{ item.retailPrice }}</div> <div v-if="isMember == false">{{ item.retailPrice }}</div>
<div v-else>{{ item.memberPrice }}</div> <div v-else>{{ item.memberPrice }}</div>
</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 class="input-box">
<div>合计</div> <div>合计</div>
<div>{{ oilAmount+(+goodsAmount) }}</div> <div>{{ oilAmount+(+goodsAmount) }}</div>
@ -773,6 +781,10 @@
<div>优惠合计</div> <div>优惠合计</div>
<div>{{ oilDiscount + goodsDiscount + fullReduction + couponAmount }}</div> <div>{{ oilDiscount + goodsDiscount + fullReduction + couponAmount }}</div>
</div> </div>
<div class="input-box">
<div>储值卡或囤油卡付款</div>
<div>{{ oilAmount+(+goodsAmount) - (oilDiscount + goodsDiscount + fullReduction + couponAmount) }}</div>
</div>
<div class="input-box"> <div class="input-box">
<div>实付款</div> <div>实付款</div>
<div>{{ (+oilActualPay)+(+goodsActualPay) }}</div> <div>{{ (+oilActualPay)+(+goodsActualPay) }}</div>
@ -809,6 +821,8 @@
name: "homeindex", name: "homeindex",
data(){ data(){
return{ return{
gunIndex:[],
autofocus:false,
baseUrl:process.env.VUE_APP_BASE_API, baseUrl:process.env.VUE_APP_BASE_API,
// //
checkAll1: false, checkAll1: false,
@ -1198,6 +1212,7 @@
}, },
clear(){ clear(){
this.autofocus = false
this.dialogVisiblej = false this.dialogVisiblej = false
this.seekZero = 0 this.seekZero = 0
}, },
@ -1786,6 +1801,7 @@
// } // }
if (this.balance>0){ if (this.balance>0){
this.checkAll4 = true this.checkAll4 = true
this.countAmountFull()
} }
await this.getGrade(this.member.id,this.member.gradeId) await this.getGrade(this.member.id,this.member.gradeId)
if (!this.isFixingLevel){ if (!this.isFixingLevel){
@ -1794,6 +1810,7 @@
}, },
getOilCoupon(){ getOilCoupon(){
let type = 0; let type = 0;
// if (this.consumeAmount==0){
if (this.consumeAmount==0){ if (this.consumeAmount==0){
type = 1; type = 1;
}else { }else {
@ -2197,6 +2214,7 @@
}, },
// //
settlement(){ settlement(){
this.autofocus = true
if (this.payType=="APPLET_CODE") { if (this.payType=="APPLET_CODE") {
if (this.goodsOrder.length > 0) { if (this.goodsOrder.length > 0) {
this.$modal.msgError("非油商品不可使用小程序码支付") this.$modal.msgError("非油商品不可使用小程序码支付")
@ -2284,6 +2302,7 @@
// } // }
if (this.balance>0){ if (this.balance>0){
this.checkAll4 = true this.checkAll4 = true
this.countAmountFull()
} }
await this.getGrade(this.member.id,this.member.gradeId) await this.getGrade(this.member.id,this.member.gradeId)
if (!this.isFixingLevel){ if (!this.isFixingLevel){
@ -2429,6 +2448,7 @@
}, },
// //
refuel(data){ refuel(data){
// this.gunIndex.push(data.id)
this.select = "元"; this.select = "元";
this.rise = [ this.rise = [
{value:"¥100"}, {value:"¥100"},
@ -2464,7 +2484,11 @@
// //
async collection(){ async collection(){
if (this.payType=="CASH"){ 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("请输入正确的金额"); this.$modal.msgError("请输入正确的金额");
return; return;
} }
@ -2533,6 +2557,7 @@
isPaySuccess = true isPaySuccess = true
_this.isPay = true; _this.isPay = true;
_this.seekZero = 0 _this.seekZero = 0
_this.loading = false;
_this.amount = 0 _this.amount = 0
for (let i =0;i<_this.oilPreferentialData.length;i++){ for (let i =0;i<_this.oilPreferentialData.length;i++){
_this.oilPreferentialData[i].oilPreferential.storeId = response.data.oilOrder.storeId _this.oilPreferentialData[i].oilPreferential.storeId = response.data.oilOrder.storeId
@ -2552,6 +2577,7 @@
_this.isPay = true; _this.isPay = true;
_this.seekZero = 0 _this.seekZero = 0
_this.amount = 0 _this.amount = 0
_this.loading = false;
_this.printLocally() _this.printLocally()
_this.resetting1() _this.resetting1()
return; return;
@ -2560,6 +2586,7 @@
if (response.data.error==1){ if (response.data.error==1){
this.$modal.msgError("商品库存不足,请重新选择商品") this.$modal.msgError("商品库存不足,请重新选择商品")
this.loading = false; this.loading = false;
this.autofocus = false
this.dialogVisiblej = false; this.dialogVisiblej = false;
return; return;
} }
@ -2733,6 +2760,7 @@
}, 1000); }, 1000);
}, },
handClose(){ handClose(){
this.loading = false
this.dialogVisiblejLoading = false this.dialogVisiblejLoading = false
// this.resetting1() // this.resetting1()
this.authCode = ""; this.authCode = "";
@ -2781,6 +2809,7 @@
this.isPaySuccess = false; this.isPaySuccess = false;
this.isPay = false; this.isPay = false;
this.autofocus = false
this.dialogVisiblej = false this.dialogVisiblej = false
}, },
// //
@ -3024,6 +3053,17 @@
padding: 10px; padding: 10px;
color: #3e4f60; 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{ .of-title{
font-weight: bold; font-weight: bold;
font-size: 22px; font-size: 22px;

View File

@ -244,7 +244,7 @@ export default {
// //
dateRange: [], dateRange: [],
// //
loading: true, loading: false,
loadingRes: true, loadingRes: true,
// //
title: "", title: "",
@ -428,27 +428,12 @@ export default {
if (val!=undefined){ if (val!=undefined){
this.queryParams.page = val this.queryParams.page = val
} }
this.loading = true; this.loadingRes = true;
listOrder(this.addDateRange(this.queryParams, this.dateRange)).then( response => { listOrder(this.addDateRange(this.queryParams, this.dateRange)).then( response => {
this.list = response.data.records; this.list = response.data.records;
this.total = response.data.total; 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() { handleQuery() {

View File

@ -173,7 +173,7 @@
<el-table-column prop="orderStatus" label="支付状态"> <el-table-column prop="orderStatus" label="支付状态">
<template slot-scope="scope"> <template slot-scope="scope">
<el-tag v-if="scope.row.orderStatus == 'unpaid'">未支付</el-tag> <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> </template>
</el-table-column> </el-table-column>
@ -216,14 +216,14 @@
import {exportExcelOilOrderApi} from "@/api/order/exportExcel"; import {exportExcelOilOrderApi} from "@/api/order/exportExcel";
export default { export default {
name: "order_Cashier", name: "order_Unpaid",
data(){ data(){
return{ return{
// //
queryParams: { queryParams: {
page: 1, page: 1,
pageSize: 10, pageSize: 10,
orderStatus:"paid", orderStatus:"unpaid",
}, },
// //
total:0, total:0,

View File

@ -385,32 +385,50 @@
</el-tag> --> </el-tag> -->
</div> </div>
<!-- <div style="text-align: center;margin-bottom: 10px">赠送金额</div> --> <!-- <div style="text-align: center;margin-bottom: 10px">赠送金额</div> -->
<div> <div v-if="cardValueForm.paymentType != 'CASH'">
<el-input v-model="authCode" <div>
v-focus ref="getFocus" <el-input v-model="authCode"
autofocus v-focus ref="getFocus"
@keydown.enter.native="collection" autofocus
@keydown.enter.native="collection"
placeholder="扫描或输入付款码、支持微信、支付宝、云闪付"> placeholder="扫描或输入付款码、支持微信、支付宝、云闪付">
<i <i
slot="suffix"> slot="suffix">
<svg t="1697791915471" class="icon" viewBox="0 0 1024 1024" version="1.1" <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"> xmlns="http://www.w3.org/2000/svg" p-id="1479" width="32" height="32">
<path <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" 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> fill="#3D3D3D" p-id="1480"></path>
</svg> </svg>
</i> </i>
</el-input> </el-input>
</div> </div>
<div class="demo-image"> <div class="demo-image">
<div class="block" style="text-align: center"> <div class="block" style="text-align: center">
<el-image <el-image
style="width: 200px; height: 200px" style="width: 200px; height: 200px"
fit="cover" fit="cover"
src="https://oil.wudb.cn/static/img/scan-demo.fcb8b1ab.png"></el-image> src="https://oil.wudb.cn/static/img/scan-demo.fcb8b1ab.png"></el-image>
</div>
</div> </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> <el-divider></el-divider>
<div style="display: flex;justify-content: space-around"> <div style="display: flex;justify-content: space-around">
<el-button @click="cancelCollection">取消收款</el-button> <el-button @click="cancelCollection">取消收款</el-button>
@ -873,6 +891,7 @@ export default {
childComponentKey:1, childComponentKey:1,
authCode: '', // authCode: '', //
seekZero:0,
timer: null, timer: null,
@ -1003,6 +1022,10 @@ export default {
this.getAllAmount() this.getAllAmount()
}, },
methods: { methods: {
//
changeSeekZero(){
this.seekZero = (this.authCode - this.cardValueForm.amount).toFixed(2)
},
getName(list,type){ getName(list,type){
let name = "" let name = ""
list.forEach(item => { list.forEach(item => {
@ -1466,7 +1489,16 @@ export default {
}, },
async collection() { 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 let userForm = this.form
if (this.flag === 1) { if (this.flag === 1) {

View File

@ -21,11 +21,12 @@
<el-table-column label="实付金额" align="center" prop="payAmount"/> <el-table-column label="实付金额" align="center" prop="payAmount"/>
<el-table-column label="付款类型" align="center" prop="payType"> <el-table-column label="付款类型" align="center" prop="payType">
<template slot-scope="scope"> <template slot-scope="scope">
<!-- <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>{{ scope.row.payType }}</span>--> <span v-else-if="scope.row.payType == 'UNIONPAY'">银联二维码</span>
<span>{{getName(payTypeList,scope.row.payType)}}</span> <span v-else>小程序码</span>
<!-- <span>{{getName(payTypeList,scope.row.payType)}}</span>-->
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="订单号" align="center" prop="orderNo" width="220px"/> <el-table-column label="订单号" align="center" prop="orderNo" width="220px"/>

View File

@ -485,7 +485,7 @@
this.isStoreValueCard = true; this.isStoreValueCard = true;
if (val == 0) { 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) this.balanceRedece = (this.oilOrder.orderAmount - this.fullRedece - this.couponRedece - this.gradeRedece).toFixed(2)
} else { } else {
this.balanceRedece = this.user.cardBalance this.balanceRedece = this.user.cardBalance