Merge remote-tracking branch 'origin/master'

# Conflicts:
#	gasStation-uni/pages/index/index.vue
This commit is contained in:
@QQNZX 2024-01-29 14:50:40 +08:00
commit b5c6f8382f
48 changed files with 598 additions and 200 deletions

View File

@ -147,9 +147,9 @@
<el-radio label="2">禁用</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="卡描述" >
<!-- <el-form-item label="卡描述" >
<el-input type="textarea" v-model="ruleForm.remark"></el-input>
</el-form-item>
</el-form-item>-->
</el-form>
<span slot="footer" class="dialog-footer">
<el-button @click="centerDialogVisible = false"> </el-button>

View File

@ -160,8 +160,8 @@ export default {
loginForm: {
tel:null,
telcode:null,
username: "oil_admin",
password: "123456",
username: "",
password: "",
rememberMe: false,
captchaCode: "",
uuid: ""
@ -282,9 +282,9 @@ export default {
app.$router.push({ path: this.redirect || "/" }).catch(()=>{});
}).catch(() => {
app.loading = false;
if (app.captchaOnOff) {
app.getCode();
}
// if (app.captchaOnOff) {
// app.getCode();
// }
});
}
});

View File

@ -196,6 +196,8 @@
<el-descriptions :column="1" direction="vertical">
<el-descriptions-item label="油品详情">
<el-table
v-loading="loading"
:data="oilInfo"
style="width: 100%">
<el-table-column label="油品金额" prop="orderAmount">
@ -246,7 +248,6 @@
<!-- 订单退款-->
<el-dialog
:close-on-click-modal="false"
title="订单退款"
width="25%"
:visible.sync="dialogRefund">
@ -301,6 +302,7 @@ import {refundApi} from "@/api/order/refund";
goodsInfo:[],
//
cashierOrder:{},
loading:false,
dialogVisible:false,
dialogRefund:false,
//
@ -402,8 +404,9 @@ import {refundApi} from "@/api/order/refund";
});
},
refundConfirmed() {
async refundConfirmed() {
this.dialogRefund = false;
this.loading = true;
console.log("cashierOrder",this.cashierOrder)
let map={
orderNo: this.cashierOrder.orderNo,
@ -411,19 +414,18 @@ import {refundApi} from "@/api/order/refund";
refundRemark:this.radio1 +"-"+ this.refundRemark,
type: "canRefund"
}
refundApi(map).then(res=>{
// if() {
//
// }
await refundApi(map).then(res=>{
this.$message({
type: 'info',
message: '退款成功'
});
this.getList();
this.getOrderStatistics();
this.getStaffList();
})
this.loading = false;
this.getList();
this.getOrderStatistics();
this.getStaffList();
},
//
getName(oilNameList,id){

View File

@ -245,7 +245,8 @@ export default {
//
dateRange: [],
//
loading: true,
loading: false,
loadingRes: true,
//
title: "",
//
@ -356,8 +357,9 @@ export default {
},
// 退
refundConfirmed() {
async refundConfirmed() {
this.dialogRefund = false;
this.loadingRes = true;
console.log("cashierOrder",this.goods)
let map={
orderNo: this.goods.orderNo,
@ -365,17 +367,17 @@ export default {
refundRemark:this.radio1 +"-"+ this.refundRemark,
type: "canRefund"
}
refundApi(map).then(res=>{
if (res.code === 200){
await refundApi(map).then(res=>{
if (res.code === 200) {
this.$message({
type: 'info',
message: '退款成功'
});
this.created()
}
})
this.loadingRes = false;
this.created()
},
// id
queryStaf(list,id){

View File

@ -306,6 +306,7 @@
import {getUser, queryUsers} from "@/api/order/user";
import {exportExcelOilOrderApi} from "@/api/order/exportExcel";
import {getOilNumberGun} from "@/api/oilConfig/oilGuns";
import {getOrderInfoApi, refundApi} from "@/api/order/refund";
export default {
name: "order_Oil",

View File

@ -217,6 +217,7 @@ import { exportExcelCashierApi } from "@/api/order/exportExcel";
import {listOilOrder,oilOrderInfo} from "@/api/order/oilorder";
import {getOilNumberGun} from "@/api/oilConfig/oilGuns";
import {getOilNameList} from "@/api/order/oilnumgun";
import {refundApi} from "@/api/order/refund";
export default {
name: "order_Cashier",
@ -399,7 +400,7 @@ import {getOilNameList} from "@/api/order/oilnumgun";
},
refundConfirmed() {
async refundConfirmed() {
this.loading = true;
this.dialogRefund = false;
@ -410,18 +411,20 @@ import {getOilNameList} from "@/api/order/oilnumgun";
refundRemark:this.radio1 +"-"+ this.refundRemark,
type: "canRefund"
}
refundApi(map).then(res=>{
this.loading = false;
await refundApi(map).then(res=>{
this.$message({
type: 'info',
message: '退款成功'
});
this.getList();
this.getOrderStatistics();
this.getStaffList();
})
this.loading = false;
this.getList();
this.getOrderStatistics();
this.getStaffList();
},
//

View File

@ -277,6 +277,14 @@
>
</el-option>
</el-select>
<br/>
<el-tooltip
class="item"
effect="dark"
placement="bottom">
<div slot="content">可设置当前员工是否有油品/商品入库盘点审核废止等权限</div>
<span>可设置当前员工是否有...</span>
</el-tooltip>
</el-form-item>
</el-col>
</el-row>

View File

@ -63,7 +63,7 @@ export const constantRoutes = [
children: [
{
path: 'index',
component: () => import('@/views/index'),
component: () => import('@/views/Service/index.vue'),
name: 'Index',
meta: { title: '系统首页', icon: 'dashboard', affix: true }
}

View File

@ -141,7 +141,7 @@
</el-row>
<el-row>
<el-col :span="8">
<el-form-item label="角色组" prop="role">
<el-form-item label="角色组" prop="roleId">
<el-select v-model="form.roleId" placeholder="请选择角色" style="width: 270px">
<el-option label="油站站长" :value="12+''" ></el-option>
<el-option label="加油员" :value="15+''" ></el-option>
@ -320,7 +320,7 @@
{ required: true, message: "手机号不能为空", trigger: "blur" },
{ min: 11, max: 20, message: '手机号长度必须11', trigger: 'blur' }
],
role: [
roleId: [
{ required: true, message: "请选择员工角色", trigger: "blur" }
],
isRefuel: [

View File

@ -93,41 +93,41 @@
</el-input>
</el-form-item>
<el-form-item prop="captchaCode" v-if="captchaOnOff">
<div style="display: flex;align-items: center">
<!-- <el-form-item prop="captchaCode" v-if="captchaOnOff">-->
<!-- <div style="display: flex;align-items: center">-->
<div>
<el-input
v-model="loginForm.telcode"
auto-complete="off"
placeholder="请输入验证码"
style="width: 90%"
clearable
@keyup.enter.native="handleLogin"
>
<svg-icon slot="prefix" icon-class="validCode" class="el-input__icon input-icon" />
</el-input>
</div>
<div>
<span class="anniulan" v-show="show" @click="getCodet" >获取验证码</span>
<span style="cursor: pointer;color: #00aaff " v-show="!show" class="count">{{count}}s后重新获取</span>
</div>
<!-- <div>-->
<!-- <el-input-->
<!-- v-model="loginForm.telcode"-->
<!-- auto-complete="off"-->
<!-- placeholder="请输入验证码"-->
<!-- style="width: 90%"-->
<!-- clearable-->
<!-- @keyup.enter.native="handleLogin"-->
<!-- >-->
<!-- <svg-icon slot="prefix" icon-class="validCode" class="el-input__icon input-icon" />-->
<!-- </el-input>-->
<!-- </div>-->
<!-- <div>-->
<!-- <span class="anniulan" v-show="show" @click="getCodet" >获取验证码</span>-->
<!-- <span style="cursor: pointer;color: #00aaff " v-show="!show" class="count">{{count}}s后重新获取</span>-->
<!-- </div>-->
</div>
</el-form-item>
<!-- </div>-->
<!-- </el-form-item>-->
<el-checkbox v-model="loginForm.rememberMe" style="margin:0px 0px 25px 0px;">记住密码</el-checkbox>
<el-form-item style="width:100%;">
<el-button
:loading="loading"
size="medium"
type="primary"
style="width:100%;line-height: 24px;font-size: 16px;"
@click.native.prevent="posttelcode()"
>
<span v-if="!loading">立即登录</span>
<span v-else> 中...</span>
</el-button>
</el-form-item>
<!-- <el-form-item style="width:100%;">-->
<!-- <el-button-->
<!-- :loading="loading"-->
<!-- size="medium"-->
<!-- type="primary"-->
<!-- style="width:100%;line-height: 24px;font-size: 16px;"-->
<!-- @click.native.prevent="posttelcode()"-->
<!-- >-->
<!-- <span v-if="!loading">立即登录</span>-->
<!-- <span v-else> 中...</span>-->
<!-- </el-button>-->
<!-- </el-form-item>-->
</el-form>
</div>
</div>
@ -160,8 +160,8 @@ export default {
loginForm: {
tel:null,
telcode:null,
username: "admin_pt01",
password: "123456",
username: "",
password: "",
rememberMe: false,
captchaCode: "",
uuid: ""
@ -199,35 +199,35 @@ export default {
getCodet() {
if(!this.loginForm.tel){
this.$message.error("手机号不能为空")
return
}
const TIME_COUNT = 60;
if (!this.timer) {
this.count = TIME_COUNT;
this.show = false;
this.timer = setInterval(() => {
if (this.count > 0 && this.count <= TIME_COUNT) {
this.count--;
} else {
this.show = true;
clearInterval(this.timer);
this.timer = null;
}
}, 1000)
}
let data = {
mobile:this.loginForm.tel
}
gettelcode(data).then(res =>{
if(res.code == 200){
this.$message.success("操作成功")
}else{
this.$message.error("操作失败请稍后再试")
}
})
// if(!this.loginForm.tel){
// this.$message.error("")
// return
// }
//
// const TIME_COUNT = 60;
// if (!this.timer) {
// this.count = TIME_COUNT;
// this.show = false;
// this.timer = setInterval(() => {
// if (this.count > 0 && this.count <= TIME_COUNT) {
// this.count--;
// } else {
// this.show = true;
// clearInterval(this.timer);
// this.timer = null;
// }
// }, 1000)
// }
// let data = {
// mobile:this.loginForm.tel
// }
// gettelcode(data).then(res =>{
// if(res.code == 200){
// this.$message.success("")
// }else{
// this.$message.error("")
// }
// })
},
getCodeimg() {
const app = this

View File

@ -49,8 +49,8 @@ public class Const {
public static String NOTIFY_PUBLIC_KEYS="MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCbBAl3xSB7YeUnze4yYZmnTeT7OtXZr0sP10TsDVRH2SY/VEjgS9KPmHMmVeKZT3+6xKsUvulgVyie46GGtZPrnoh+glF1gzsYAXJ7dvR/R5nYO5VvfwK/ChPFTiKhbTtO4OKtchgBZuqCbsemG+gFIiVJo37dY0Kg0zISmFHdOQIDAQAB";
//异步通知(回调地址)
public static String notify_url = "https://www.tuofeng.cc/oilAdmin/api/fyPay/notify";
// public static String notify_url = "https://8q4f124343.yicp.fun/api/fyPay/notify";
// public static String notify_url = "https://www.tuofeng.cc/oilAdmin/api/fyPay/notify";
public static String notify_url = "https://8q4f124343.yicp.fun/api/fyPay/notify";
//下单
public static String fuiou_21_url = "https://fundwx.fuiou.com/preCreate";

View File

@ -42,10 +42,14 @@ public class OilConfigServiceImpl extends ServiceImpl<OilConfigMapper, OilConfig
List<Double> distanceList = new ArrayList<>();
for (int i = 0; i < list.size(); i++) {
MerchantConfig merchantConfig = merchantConfigService.selectMerchById(list.get(i).getMerchConfigId());
amountAll += merchantConfig.getAmount();
proList.add(list.get(i).getProportion()/100.0);
radioList.add(merchantConfig.getAmount()/amountAll);
distanceList.add(proList.get(i) - radioList.get(i));
if (ObjectUtil.isNotEmpty(merchantConfig)){
amountAll += merchantConfig.getAmount();
proList.add(list.get(i).getProportion()/100.0);
radioList.add(merchantConfig.getAmount()/amountAll);
distanceList.add(proList.get(i) - radioList.get(i));
}
}
int index = 0;
Double max = Collections.max(distanceList);

View File

@ -110,6 +110,10 @@ public class LJGoods extends BaseEntity implements Serializable {
*/
@ApiModelProperty("是否在回收站0不在回收站1在回收站")
private String isRecovery;
/**
* 是否删除0未删除1已删除
*/
private String ifDelete;
}

View File

@ -49,6 +49,10 @@ public class StockStatistic extends BaseEntity implements Serializable {
*/
@ApiModelProperty("成本金额")
private Double costAmount;
/**
* 是否删除0未删除1已删除
*/
private String ifDelete;
}

View File

@ -8,7 +8,7 @@
<select id="selectLJGoodsList" resultType="com.fuint.business.convenienceSore.entity.LJGoods">
<include refid="selectLJGoods"></include>
<where>
store_id = #{goods.storeId} and is_recovery = #{goods.isRecovery}
store_id = #{goods.storeId} and is_recovery = #{goods.isRecovery} and if_delete = '0'
<if test="goods.cvsGoodId != null and goods.cvsGoodId != ''">
and cvs_good_id = #{goods.cvsGoodId}
</if>
@ -44,7 +44,7 @@
<update id="subtractGoodesStockByLock">
update mt_goods set
stock = stock - #{stock}
where id = #{id}
where id = #{id} and if_delete = '0'
</update>

View File

@ -11,7 +11,7 @@
<select id="selectStockList" resultType="com.fuint.business.convenienceSore.vo.StockStatisticVo">
<include refid="selectStock"></include>
<where>
st.store_id = #{stock.storeId}
st.store_id = #{stock.storeId} and if_delete = '0'
<if test="stock.cvsGoodId != null and stock.cvsGoodId != ''">
and st.cvs_good_id = #{stock.cvsGoodId}
</if>
@ -39,14 +39,14 @@
parameterType="java.lang.Integer">
<include refid="selectStock"></include>
<where>
st.id = #{id}
st.id = #{id} and if_delete = '0'
</where>
</select>
<select id="selectStocks" resultType="com.fuint.business.convenienceSore.vo.StockStatisticVo"
parameterType="java.lang.Integer">
<include refid="selectStock"></include>
<where>
st.store_id = #{stock.storeId}
st.store_id = #{stock.storeId} and if_delete = '0'
<if test="stock.cvsGoodId != null and stock.cvsGoodId != ''">
and st.cvs_good_id = #{stock.cvsGoodId}
</if>

View File

@ -66,6 +66,7 @@ public class LJGoodsServiceImpl extends ServiceImpl<LJGoodsMapper, LJGoods> impl
QueryWrapper queryWrapper = new QueryWrapper<>();
queryWrapper.eq("is_recovery",0);
queryWrapper.eq("store_id",storeId);
queryWrapper.eq("if_delete","0");
List list = baseMapper.selectList(queryWrapper);
return list;
}
@ -77,7 +78,10 @@ public class LJGoodsServiceImpl extends ServiceImpl<LJGoodsMapper, LJGoods> impl
*/
@Override
public LJGoods selectLJGoodsById(int id) {
return baseMapper.selectById(id);
QueryWrapper queryWrapper = new QueryWrapper<>();
queryWrapper.eq("id",id);
queryWrapper.eq("if_delete","0");
return baseMapper.selectOne(queryWrapper);
}
/**
@ -92,6 +96,7 @@ public class LJGoodsServiceImpl extends ServiceImpl<LJGoodsMapper, LJGoods> impl
QueryWrapper queryWrapper = new QueryWrapper<>();
queryWrapper.eq("goods_no",goodsNo);
queryWrapper.eq("store_id",storeId);
queryWrapper.eq("if_delete","0");
LJGoods ljGoods = baseMapper.selectOne(queryWrapper);
return ljGoods;
}
@ -142,8 +147,12 @@ public class LJGoodsServiceImpl extends ServiceImpl<LJGoodsMapper, LJGoods> impl
*/
@Override
public void deleteLJGoodsById(Integer id) {
baseMapper.deleteById(id);
stockService.deleteStock(id);
LJGoods ljGoods = baseMapper.selectById(id);
if (ObjectUtil.isNotEmpty(ljGoods)){
ljGoods.setIfDelete("1");
baseMapper.updateById(ljGoods);
stockService.deleteStock(id);
}
}
/**
@ -153,6 +162,7 @@ public class LJGoodsServiceImpl extends ServiceImpl<LJGoodsMapper, LJGoods> impl
*/
@Override
public int insertLJGoods(LJGoods goods) {
goods.setIfDelete("0");
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
Integer storeId = nowAccountInfo.getStoreId();
goods.setStoreId(storeId);
@ -165,6 +175,7 @@ public class LJGoodsServiceImpl extends ServiceImpl<LJGoodsMapper, LJGoods> impl
stock.setSupplierId(goods.getSupplierId());
Double costAmount = goods.getBuyingPrice()*goods.getStock();
stock.setCostAmount(costAmount);
stock.setIfDelete("0");
stockService.insertStock(stock);
// 查询插入的库存统计信息
StockStatistic stockStatistic = stockService.selectStockByGoodsId(goods.getId());
@ -267,7 +278,7 @@ public class LJGoodsServiceImpl extends ServiceImpl<LJGoodsMapper, LJGoods> impl
RedisLock redisLock;
/**
* 减少商品库存
* @param goods
* @param id
* @return
*/
@Override

View File

@ -1,5 +1,6 @@
package com.fuint.business.convenienceSore.service.impl;
import cn.hutool.core.util.ObjectUtil;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
@ -66,6 +67,7 @@ public class StockStatisticServiceImpl extends ServiceImpl<StockStatisticMapper,
public StockStatistic selectStockByGoodsId(int goodsId) {
QueryWrapper queryWrapper = new QueryWrapper<>();
queryWrapper.eq("goods_id",goodsId);
queryWrapper.eq("if_delete","0");
StockStatistic stockStatistic = baseMapper.selectOne(queryWrapper);
return stockStatistic;
}
@ -77,6 +79,7 @@ public class StockStatisticServiceImpl extends ServiceImpl<StockStatisticMapper,
*/
@Override
public int insertStock(StockStatistic stock) {
stock.setIfDelete("0");
int row = baseMapper.insert(stock);
return row;
}
@ -90,7 +93,11 @@ public class StockStatisticServiceImpl extends ServiceImpl<StockStatisticMapper,
public void deleteStock(Integer goodsId) {
QueryWrapper queryWrapper = new QueryWrapper<>();
queryWrapper.eq("goods_id",goodsId);
baseMapper.delete(queryWrapper);
StockStatistic stockStatistic = baseMapper.selectOne(queryWrapper);
if (ObjectUtil.isNotEmpty(stockStatistic)){
stockStatistic.setIfDelete("1");
baseMapper.updateById(stockStatistic);
}
}
@Override

View File

@ -20,6 +20,7 @@ import com.fuint.business.userManager.entity.LJUserGrade;
import com.fuint.business.userManager.service.LJUserGradeService;
import com.fuint.common.util.TokenUtil;
import org.apache.commons.lang3.ObjectUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@ -263,8 +264,12 @@ public class ActiveConsumptionServiceImpl extends ServiceImpl<ActiveConsumptionM
activeConsumptionAppletVO.setOilName(oilNameList);
activeConsumptionAppletVO.setPoints(s.getPoints());
activeConsumptionAppletVO.setAdaptUserType(adaptUserType);
String goodss = "";
if (ObjectUtils.isNotEmpty(goods)){
goodss = " 赠送物品:"+goods;
}
activeConsumptionAppletVO.setActiveDescribe(s.getName() + ""+"本活动消费需满"+
s.getParticipationConditionMoney()+"元,赠送券:"+card+" 赠送物品:"+goods+"");
s.getParticipationConditionMoney()+"元,赠送券:"+card+goodss+"");
return activeConsumptionAppletVO;
}).collect(Collectors.toList());
return appletVOList;

View File

@ -836,9 +836,9 @@ public class ActiveExchangeServiceImpl implements ActiveExchangeService {
//消费有礼
List<ActiveConsumptionVO> activeConsumptionVOS = oilOrderMapper.selectActiveConsumption(paymentActiveDTO.getStoreId(), paymentActiveDTO.getAmount());
//连锁店信息
if (paymentActiveDTO.getUserId()==null){
paymentActiveDTO.setUserId(TokenUtil.getNowAccountInfo().getId());
}
// if (paymentActiveDTO.getUserId()==null){
// paymentActiveDTO.setUserId(TokenUtil.getNowAccountInfo().getId());
// }
LJUser ljUserVo = userService.queryUserByUserId(paymentActiveDTO.getUserId());
Integer storeId1 = paymentActiveDTO.getStoreId();
Integer chainStoreId = iljStoreService.selectStoreByStoreId(storeId1).getChainStoreId();

View File

@ -108,6 +108,22 @@ public class CardFavorableRecordController extends BaseController {
return getSuccessResult(this.cardFavorableRecordService.issueCardFavorable(cardFavorableAdnUserDTO));
}
/**
* 查询一键发券接口
*
* @param pageNo
* @param pageSize
* @param cardFavorableRecord
* @return
*/
@GetMapping("getCardFavorableLists")
public ResponseObject getCardFavorableLists(@RequestParam(value = "pageNo",defaultValue = "1") Integer pageNo,
@RequestParam(value = "pageSize",defaultValue = "10") Integer pageSize,
@Param("cardFavorableRecord") CardFavorableRecord cardFavorableRecord) {
Page page = new Page(pageNo, pageSize);
return getSuccessResult(this.cardFavorableRecordService.getCardFavorableLists(page,cardFavorableRecord));
}
/**
* 小程序端判断是否领取优惠券
* @return 新增结果

View File

@ -9,5 +9,10 @@ import java.util.List;
public class CardFavorableAdnUserDTO extends CardFavorable {
//会员列表
private List<Integer> userIds;
//优惠券ids
private List<Integer> cardFavorableIds;
//等级ID
private List<Integer> gradeIds;
//天数
private Integer days;
}

View File

@ -29,6 +29,7 @@ public interface CardFavorableRecordMapper extends BaseMapper<CardFavorableRecor
IPage<CardFavorableRecordVO> getCardFavorableList(@Param("page")Page page,@Param("cardFavorableRecord") CardFavorableRecord cardFavorableRecord);
IPage<CardFavorableRecordVO> getCardFavorableLists(@Param("page")Page page,@Param("cardFavorableRecord") CardFavorableRecord cardFavorableRecord);
/**
* 查询优惠券接口(小程序)

View File

@ -55,6 +55,33 @@
order by cfr.create_time DESC
</select>
<select id="getCardFavorableLists"
resultType="com.fuint.business.marketingActivity.cardFavorable.vo.CardFavorableRecordVO">
select
cfr.name name,
cfr.mobile mobile,
cfr.status status,
cf.name cardFavorableName,
cf.discount_type discountType
FROM
card_favorable_record cfr
left join card_favorable cf ON cfr.card_favorable_id = cf.id
left join mt_store ms on ms.id = cfr.store_id
<where>
cfr.exchange_from = "店铺一键送券!"
<if test="cardFavorableRecord.storeId != null">
and cf.store_id = #{cardFavorableRecord.storeId}
</if>
<if test="cardFavorableRecord.mtUserId != null">
and cfr.mt_user_id = #{cardFavorableRecord.mtUserId}
</if>
<if test="cardFavorableRecord.status != null and cardFavorableRecord.status != ''">
and cfr.status = #{cardFavorableRecord.status}
</if>
</where>
order by cfr.create_time DESC
</select>
<select id="selectAllByCondition" resultType="com.fuint.business.marketingActivity.cardFavorable.vo.CouponVO">
SELECT
card_favorables.couponType,

View File

@ -31,6 +31,7 @@ public interface CardFavorableRecordService extends IService<CardFavorableRecord
IPage<CardFavorableRecordVO> getCardFavorableList(Page page, CardFavorableRecord cardFavorableRecord);
IPage<CardFavorableRecordVO> getCardFavorableLists(Page page, CardFavorableRecord cardFavorableRecord);
/**
* 统计优惠券数量

View File

@ -39,6 +39,7 @@ import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDate;
import java.time.ZoneId;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.Map;
@ -125,6 +126,14 @@ public class CardFavorableRecordServiceImpl extends ServiceImpl<CardFavorableRec
return cardFavorableList;
}
@Override
public IPage<CardFavorableRecordVO> getCardFavorableLists(Page page, CardFavorableRecord cardFavorableRecord) {
Integer storeId = TokenUtil.getNowAccountInfo().getStoreId();
cardFavorableRecord.setStoreId(storeId);
IPage<CardFavorableRecordVO> cardFavorableList = cardFavorableRecordMapper.getCardFavorableLists(page, cardFavorableRecord);
return cardFavorableList;
}
/**
* 统计优惠券使用数量
* @param cardFavorableRecord
@ -267,12 +276,12 @@ public class CardFavorableRecordServiceImpl extends ServiceImpl<CardFavorableRec
public boolean updateCardAndActiveById(PaymentActiveVO paymentActiveVO) {
//优惠券
boolean flag = false;
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
Integer userId = null;
if (paymentActiveVO.getUserId()!=null){
userId = paymentActiveVO.getUserId();
}else {
userId = nowAccountInfo.getId();
// AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
// userId = nowAccountInfo.getId();
}
if (ObjectUtils.isNotEmpty(paymentActiveVO.getCardFavorableId())){
flag = cardFavorableRecordMapper.updateCardAndActiveById(paymentActiveVO.getCardFavorableId(),userId,paymentActiveVO.getStoreId());
@ -310,18 +319,29 @@ public class CardFavorableRecordServiceImpl extends ServiceImpl<CardFavorableRec
*/
@Override
public boolean issueCardFavorable(CardFavorableAdnUserDTO cardFavorableAdnUserDTO) {
//查询用户列表
ArrayList<LJUserVo> ljUserVosList = new ArrayList<>();
List<Integer> gradeIds = cardFavorableAdnUserDTO.getGradeIds();
for (Integer gradeId : gradeIds) {
LJUserVo ljUserVo = new LJUserVo();
ljUserVo.setGradeId(gradeId);
ljUserVo.setDays(cardFavorableAdnUserDTO.getDays());
List<LJUserVo> userLists = userService.getUserLists(ljUserVo);
ljUserVosList.addAll(userLists);
}
boolean flag = false;
//油站信息
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
//会员ids
List<Integer> userIds = cardFavorableAdnUserDTO.getUserIds();
//List<Integer> userIds = cardFavorableAdnUserDTO.getUserIds();
//优惠券ids
List<Integer> cardIds = cardFavorableAdnUserDTO.getCardFavorableIds();
for (Integer cardId : cardIds) {
CardFavorableRecord cardFavorableRecord = new CardFavorableRecord();
if (CollectionUtils.isNotEmpty(userIds)){
for (Integer userId : userIds) {
LJUser userInfo = userService.queryUserByUserId(userId);
if (CollectionUtils.isNotEmpty(ljUserVosList)){
for (LJUserVo ljUserVo : ljUserVosList) {
LJUser userInfo = userService.queryUserByUserId(ljUserVo.getId());
cardFavorableRecord.setCardFavorableId(cardId);
cardFavorableRecord.setStoreId(nowAccountInfo.getStoreId());
cardFavorableRecord.setChainStorId(nowAccountInfo.getChainStoreId());

View File

@ -44,4 +44,6 @@ public class CardFavorableRecordVO extends CardFavorableRecord {
private String discountType;
//满足金额
private double satisfiedAmount;
//优惠券描述信息
}

View File

@ -14,6 +14,7 @@ import com.fuint.business.store.entity.MtStore;
import com.fuint.business.store.service.StoreService;
import com.fuint.business.userManager.entity.UserBalance;
import com.fuint.business.userManager.mapper.LJUserMapper;
import com.fuint.business.userManager.service.LJUserService;
import com.fuint.business.userManager.service.UserBalanceService;
import com.fuint.business.userManager.vo.LJUserVo;
import com.fuint.common.util.TokenUtil;
@ -48,7 +49,7 @@ public class CardGiftServiceImpl extends ServiceImpl<CardGiftMapper, CardGift> i
@Resource
private UserBalanceService userBalanceService;
@Resource
private LJUserMapper ljUserMapper;
private LJUserService ljUserService;
/**
* 新增数据
@ -163,6 +164,7 @@ public class CardGiftServiceImpl extends ServiceImpl<CardGiftMapper, CardGift> i
public CardGift exchange(CardGift cardGift) {
//登录用户id
Integer userId = TokenUtil.getNowAccountInfo().getId();
LJUserVo ljUserVo = ljUserService.selectUserById(userId, TokenUtil.getNowAccountInfo().getStoreId());
LambdaQueryWrapper<CardGift> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.eq(CardGift::getNumber,cardGift.getNumber());
queryWrapper.eq(CardGift::getStatus,"1");
@ -172,6 +174,9 @@ public class CardGiftServiceImpl extends ServiceImpl<CardGiftMapper, CardGift> i
if (ObjectUtils.isNotEmpty(one) && ObjectUtils.isNotEmpty(cardGift.getCardPassword()) && cardGift.getCardPassword().equals(one.getCardPassword())){
one.setActivateStatus("1");
one.setUserId(userId);
String name = ljUserVo.getName();
String mobile = ljUserVo.getMobile();
one.setRemark("姓名:"+name+",手机号:"+mobile);
updateById(one);
//更新用户余额
Double cardAmount = one.getCardAmount();

View File

@ -816,9 +816,10 @@ public class CardValueRecordServiceImpl extends ServiceImpl<CardValueRecordMappe
//用户余额变化记录
cardBalanceChange.setUserId(cardValueOrders.getMtUserId());
cardBalanceChange.setStoreId(cardValueOrders.getStoreId());
cardBalanceChange.setChainStoreId(cardValueOrders.getChainStoreId());
cardBalanceChange.setChangeType("1");
cardBalanceChange.setFromType("储值卡充值");
cardBalanceChange.setBalance(cardValueOrders.getBidBalance());
cardBalanceChange.setFromType("储值卡充值"+cardValueOrders.getAmount()+"元!");
cardBalanceChange.setBalance(cardValueOrders.getAmount());
cardBalanceChange.setAfterTheChange(afterBalance);
cardBalanceChange.setOrderNo(cardValueOrders.getOrderNo());
cardBalanceChangeService.save(cardBalanceChange);

View File

@ -5,7 +5,6 @@
<select id="getCardRecordList" resultType="com.fuint.business.order.vo.CardBalanceChangeVo">
select
ms.name storeName,
cbc.change_type changeType,
cbc.from_type fromType,
cbc.after_the_change afterTheChange,
@ -36,6 +35,6 @@
and date_format(cbc.create_time,'%y%m%d') &lt;= date_format(#{cardBalanceChange.params.endTime},'%y%m%d')
</if>
</where>
order by cbc.id DESC
order by cbc.id DESC
</select>
</mapper>
</mapper>

View File

@ -213,6 +213,11 @@ public class OilOrderServiceImpl extends ServiceImpl<OilOrderMapper, OilOrder> i
Double goodsActualPay = Double.valueOf(map.get("goodsActualPay"));
// 找零金额
Double seekZero = Double.valueOf(map.get("seekZero"));
// 找零金额
Integer cardFavorableId = null;
if (StringUtils.isNotEmpty(map.get("cardFavorableId"))){
cardFavorableId = Integer.valueOf(map.get("cardFavorableId"));
}
// 付款用户
String payUser = null;
if (map.get("payUser") != null && !map.get("payUser").equals("")){
@ -347,6 +352,7 @@ public class OilOrderServiceImpl extends ServiceImpl<OilOrderMapper, OilOrder> i
if (payType.equals("CASH")){
staffCommissionService.countStaffCommission(staffId,storeId,oilAmount,oilActualPay,oilLiters,"1",orderNo);
}
order.setCouponId(cardFavorableId);
}else {
order.setOrderType("子订单");
order.setOrderAmount(amount);
@ -372,9 +378,12 @@ public class OilOrderServiceImpl extends ServiceImpl<OilOrderMapper, OilOrder> i
order.setInvoicing("未开票");
order.setOrderStatus(payStatus);
order.setTankId(Integer.valueOf(jsonObjects.get(0).get("tankId").toString()));
order.setActiveId(Integer.valueOf(jsonObjects.get(i).get("activeId").toString()));
order.setCouponId(Integer.valueOf(jsonObjects.get(i).get("cardFavorableId").toString()));
order.setActiveType(jsonObjects.get(i).get("type").toString());
if (ObjectUtil.isNotEmpty(jsonObjects.get(i).get("activeId"))){
order.setActiveId(Integer.valueOf(jsonObjects.get(i).get("activeId").toString()));
}
if (ObjectUtil.isNotEmpty(jsonObjects.get(i).get("type"))){
order.setActiveType(jsonObjects.get(i).get("type").toString());
}
if (payType.equals("CASH")){
order.setPayTime(new Date());
this.addOilTrack(jsonObjects.get(i),storeId);
@ -471,7 +480,7 @@ public class OilOrderServiceImpl extends ServiceImpl<OilOrderMapper, OilOrder> i
// 调用消费有礼接口
public void updateCardAndActiveById(Integer storeId,Integer userId,Integer activeId,Integer cardFavorableId,String type,Double orderAmount,Integer oilId){
if (userId!=null){
LJUserVo userVo = userService.selectUserById(userId, storeId);
LJUserVo userVo = userService.queryUserById(userId, storeId);
PaymentActiveVO paymentActiveVO = new PaymentActiveVO();
paymentActiveVO.setUserId(userId);
paymentActiveVO.setMtUserLevel(userVo.getGradeId());
@ -987,6 +996,8 @@ public class OilOrderServiceImpl extends ServiceImpl<OilOrderMapper, OilOrder> i
String activeId = map.get("activeId");
// 优惠券id
String cardFavorableId = map.get("cardFavorableId");
// 活动类型
String type = map.get("type");
Integer tankId = Integer.valueOf(map.get("tankId"));
Map<String, Object> applet = new HashMap<>();
@ -1123,6 +1134,7 @@ public class OilOrderServiceImpl extends ServiceImpl<OilOrderMapper, OilOrder> i
oilOrder.setPayAmount(payAmount);
oilOrder.setActiveId(Integer.valueOf(activeId));
oilOrder.setCouponId(Integer.valueOf(cardFavorableId));
oilOrder.setActiveType(type);
this.updateOilOrder(oilOrder);
return applet;

View File

@ -71,6 +71,9 @@ public class OilTankServiceImpl implements OilTankService {
@Override
public List<OilTank> selectList2(OilTank oilTank) {
AccountInfo accountInfo = TokenUtil.getNowAccountInfo();
oilTank.setStoreId(accountInfo.getStoreId());
// 计算均进价
return oilTankDao.selectList(oilTank);
}

View File

@ -20,6 +20,7 @@ public interface LJUserMapper extends BaseMapper<LJUser> {
*/
public IPage<LJUserVo> selectUserList(Page page, @Param("user") LJUserVo user);
public IPage<LJUserVo> getUserList(Page page, @Param("user") LJUserVo user);
public List<LJUserVo> getUserLists(@Param("user") LJUserVo user);
/**
* 根据店铺id查询所有会员信息

View File

@ -31,7 +31,62 @@
LEFT JOIN mt_user_balance mub ON mu.id = mub.mt_user_id
left join oil_order oo on mu.id = oo.user_id
<where>
oo.create_time &lt;= DATE_SUB(NOW(), INTERVAL 14 DAY)
oo.create_time &lt;= DATE_SUB(NOW(), INTERVAL #{days} DAY)
<if test="user.chainStoreId != null and user.chainStoreId != ''">
and mub.chain_store_id = #{user.chainStoreId}
</if>
<if test="user.storeId != null and user.storeId != ''">
and mub.store_id = #{user.storeId}
</if>
<if test="user.mobile != null and user.mobile != ''">
and mu.mobile like concat('%', #{user.mobile}, '%')
</if>
<if test="user.userNo != null and user.userNo != ''">
and mu.user_no like concat('%', #{user.userNo}, '%')
</if>
<if test="user.name != null and user.name != ''">
and mu.name like concat('%', #{user.name}, '%')
</if>
<if test="user.gradeId != null and user.gradeId != ''">
and mub.grade_id = #{user.gradeId}
</if>
<if test="user.official != null and user.official != ''">
and mu.official = #{user.official}
</if>
<if test="user.cardBalance != null and user.cardBalance != '' and user.cardBalance == 2">
and mub.card_balance = 0
</if>
<if test="user.cardBalance != null and user.cardBalance != '' and user.cardBalance == 1">
and mub.card_balance != 0
</if>
<if test="user.params.beginTime != null and user.params.beginTime != ''"><!-- 开始时间检索 -->
and date_format(mu.create_time,'%y%m%d') &gt;= date_format(#{user.params.beginTime},'%y%m%d')
</if>
<if test="user.params.endTime != null and user.params.endTime != ''"><!-- 结束时间检索 -->
and date_format(mu.create_time,'%y%m%d') &lt;= date_format(#{user.params.endTime},'%y%m%d')
</if>
</where>
GROUP BY mu.id
ORDER BY oo.create_time desc
</select>
<select id="getUserLists" resultType="com.fuint.business.userManager.vo.LJUserVo">
SELECT
mu.*,
mub.grade_id,
mub.card_balance,
mub.points,
mub.consume_num,
mub.growth_value,
mub.refuel_money,
mub.second_card,
mub.fixing_level
FROM
mt_user mu
LEFT JOIN mt_user_balance mub ON mu.id = mub.mt_user_id
left join oil_order oo on mu.id = oo.user_id
<where>
oo.create_time &lt;= DATE_SUB(NOW(), INTERVAL ${user.days} DAY)
<if test="user.chainStoreId != null and user.chainStoreId != ''">
and mub.chain_store_id = #{user.chainStoreId}
</if>

View File

@ -19,6 +19,7 @@ public interface LJUserService extends IService<LJUser> {
*/
public IPage<LJUserVo> selectUserList(Page page, LJUserVo user);
public IPage<LJUserVo> getUserList(Page page, LJUserVo user);
public List<LJUserVo> getUserLists(LJUserVo user);
Integer userNum(Integer storeId);
@ -53,6 +54,13 @@ public interface LJUserService extends IService<LJUser> {
*/
public LJUserVo selectUserById(int id,Integer storeId);
/**
* 根据id查询会员信息
* @param id
* @return
*/
public LJUserVo queryUserById(int id,Integer storeId);
/**
* 根据storeId获取连锁店id 根据连锁店id查询用户信息
* @param storeId

View File

@ -66,6 +66,21 @@ public class LJUserServiceImpl extends ServiceImpl<LJUserMapper, LJUser> impleme
return ljUserIPage;
}
/**
* 根据条件分页查询会员信息
* @param page
* @param user
* @return
*/
@Override
public List<LJUserVo> getUserLists(LJUserVo user) {
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
LJStore store = storeService.selectStoreByStoreId(nowAccountInfo.getStoreId());
user.setChainStoreId(store.getChainStoreId());
List<LJUserVo> userLists = baseMapper.getUserLists(user);
return userLists;
}
@Override
public Integer userNum(Integer storeId) {
// 构建查询条件
@ -149,6 +164,12 @@ public class LJUserServiceImpl extends ServiceImpl<LJUserMapper, LJUser> impleme
return baseMapper.queryUserByChainStoreId(id,store.getChainStoreId());
}
@Override
public LJUserVo queryUserById(int id, Integer storeId) {
LJStore store = storeService.selectStoreByStoreId(storeId);
return baseMapper.queryUserByChainStoreId(id,store.getChainStoreId());
}
@Autowired
@Lazy
private CardValudChildrensService cardValudChildrensService;

View File

@ -113,4 +113,5 @@ public class LJUserVo extends BaseEntity {
* 连锁店id
*/
private Integer chainStoreId;
private Integer days;
}

View File

@ -128,4 +128,46 @@ public class AlipayController extends BaseController {
return getSuccessResult("登录成功",response);
}
// 验证当前登录用户是否相同
@PostMapping("/getUserid2")
public ResponseObject getUserId2(@RequestBody Map<String,String> map,HttpServletRequest request) throws Exception {
String authCode = map.get("authCode");
String storeId = map.get("storeId");
// 根据storeId查找对应的连锁店id
LJStore ljStore = iljStoreService.selectStoreByIdUni(Integer.parseInt(storeId));
// 获取支付宝userid
AlipaySystemOauthTokenResponse alipayProfile = alipayService.getAlipayProfile(authCode);
if (ObjectUtil.isEmpty(alipayProfile)) {
return getSuccessResult("false");
}
if (ObjectUtil.isEmpty(alipayProfile.getUserId())) return getSuccessResult("false");
String userId = alipayProfile.getUserId();
// 根据手机号查询用户信息
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
if (ObjectUtil.isEmpty(nowAccountInfo)) return getSuccessResult(true);
LJUser ljUser = userService.queryUserByUserId(nowAccountInfo.getId());
if (ObjectUtil.isNotEmpty(ljUser) && ObjectUtil.isNotEmpty(ljUser.getUserId())){
if (ljUser.getUserId().equals(userId)) {
return getSuccessResult("true");
}
}else {
return getSuccessResult("false");
}
return getSuccessResult("false");
}
}

View File

@ -143,7 +143,7 @@
储值卡
<span>账户余额{{ balance }}</span>
</div>
<div>-{{ consumeAmount }}</div>
<div>-{{ consumeAmount.toFixed(2) }}</div>
</div>
<div class="center-left-hj" v-show="isMember && couponDiscount.length>0">
<div>
@ -783,7 +783,7 @@
</div>
<div class="input-box" v-if="isMember">
<div>储值卡或囤油卡付款</div>
<div>{{ consumeAmount }}</div>
<div>{{ consumeAmount.toFixed(2) }}</div>
</div>
<div class="input-box">
<div>实付款</div>
@ -1134,6 +1134,15 @@
},
},
},
watch: {
dialogVisiblej(newValue) {
if (!newValue) {
this.handClose()
this.resetting1()
}
}
},
methods:{
async printLocally() {
//
@ -1840,7 +1849,6 @@
getPaymentActive(_this.paymentActive).then(res => {
item.activeId = res.data.activeId
item.cardFavorableId = res.data.cardFavorableId
item.type = res.data.type
let discount = {type:"",discount:0,oilName:item.oilName,gunName:item.gunName}
let oilData = {oilName:item.oilName,oilPreferential: {}}
@ -2529,6 +2537,7 @@
this.map.refuelMoney = JSON.stringify(this.refuelMoney)
this.map.couponId = this.useCouponIds
this.map.staffId = this.staff.id
this.map.cardFavorableId = this.cardFavorableId
let _this = this;
if (this.payType=="APPLET_CODE"){
@ -2541,8 +2550,8 @@
this.loading = true;
setTimeout(function (){
_this.loading = false;
_this.isPay = true;
_this.isPaySuccess = true;
_this.isPay = true;
_this.printLocally()
_this.resetting1();
},3000)
@ -2550,8 +2559,8 @@
this.loading = true;
setTimeout(function (){
_this.loading = false;
_this.isPay = true;
_this.isPaySuccess = false;
_this.isPay = true;
_this.resetting1();
this.$modal.msgError(resp.data.error)
},3000)
@ -2565,7 +2574,6 @@
await addLJGoods(_this.map).then( response => {
_this.orderNo = response.data.orderNo;
if (response.data.oilOrder!=null){
console.log(123,response.data.oilOrder)
if (response.data.oilOrder.orderStatus == "paid"){
_this.isPaySuccess = true;
isPaySuccess = true
@ -2710,7 +2718,6 @@
cashierOrderByOrderNo({orderNo:_this.orderNo}).then( response => {
if (response.data){
if (response.data.status == "paid"){
this.$modal.msgError(418)
_this.isPay = true;
_this.isPaySuccess = true;
_this.isQuery = false;
@ -2742,18 +2749,18 @@
}
if (response.data.status == "unpaid"){
_this.isQuery = true;
_this.dialogVisiblejLoading = true
}
}
_this.resetting1();
// _this.resetting1();
})
},500)
},1000)
// 15
if (_this.isQuery){
setTimeout(function () {
_this.dialogVisiblejLoading = true
},15000)
}
// if (_this.isQuery){
// setTimeout(function () {
// },10000)
// }
let timer2 = setInterval(function () {
if (!_this.isQuery || !_this.dialogVisiblej) {
@ -2764,7 +2771,7 @@
clearTimeout(timer3);
}
}, 500)
}, 1000)
var timer3 = setTimeout(function () {
clearInterval(timer2);

View File

@ -555,7 +555,7 @@ import {getOilNumberGun} from "@/api/cashier/oilGuns";
});
},
refundConfirmed() {
async refundConfirmed() {
this.dialogRefund = false;
this.loading = true;
console.log("cashierOrder",this.cashierOrder)
@ -565,18 +565,19 @@ import {getOilNumberGun} from "@/api/cashier/oilGuns";
refundRemark:this.radio1 +"-"+ this.refundRemark,
type: "canRefund"
}
refundApi(map).then(res=>{
await refundApi(map).then(res=>{
this.$message({
type: 'info',
message: '退款成功'
});
this.loading = false;
this.getList();
this.getOrderStatistics();
this.getStaffList();
})
this.loading = false;
this.getList();
this.getOrderStatistics();
this.getStaffList();
},
//
getOilGunList(){

View File

@ -110,7 +110,6 @@
</div>
<div class="table-box">
<el-table
v-loading="loadingRes"
:data="list"
style="width: 100%">
<el-table-column type="expand">
@ -493,7 +492,7 @@ export default {
},
// 退
refundConfirmed() {
async refundConfirmed() {
this.dialogRefund = false;
this.loadingRes = true;
console.log("cashierOrder",this.goods)
@ -503,19 +502,17 @@ export default {
refundRemark:this.radio1 +"-"+ this.refundRemark,
type: "canRefund"
}
refundApi(map).then(res=>{
await refundApi(map).then(res=>{
if (res.code === 200){
this.$message({
type: 'info',
message: '退款成功'
});
this.loadingRes = false;
this.created()
}
})
this.loadingRes = false;
this.created()
},
// id
queryStaf(list,id){

View File

@ -543,7 +543,7 @@
},
refundConfirmed() {
async refundConfirmed() {
this.dialogRefund = false;
this.loading = true;
console.log("cashierOrder",this.cashierOrder)
@ -553,15 +553,16 @@
refundRemark:this.radio1 +"-"+ this.refundRemark,
type: "canRefund"
}
refundApi(map).then(res=>{
await refundApi(map).then(res=>{
this.$message({
type: 'info',
message: '退款成功'
});
this.loading = false
this.created()
})
this.loading = false
// this.created()
this.getList();
},
// id
queryStaf(list,id){

View File

@ -496,7 +496,7 @@ import {getLodop} from "@/api/LodopFuncs";
},
refundConfirmed() {
async refundConfirmed() {
this.loading = true;
this.dialogRefund = false;
@ -507,18 +507,20 @@ import {getLodop} from "@/api/LodopFuncs";
refundRemark:this.radio1 +"-"+ this.refundRemark,
type: "canRefund"
}
refundApi(map).then(res=>{
this.loading = false;
await refundApi(map).then(res=>{
this.$message({
type: 'info',
message: '退款成功'
});
this.getList();
this.getOrderStatistics();
this.getStaffList();
})
this.loading = false;
this.getList();
this.getOrderStatistics();
this.getStaffList();
},
//

View File

@ -135,6 +135,7 @@
</el-table-column>
<el-table-column prop="name" label="会员名称"> </el-table-column>
<el-table-column prop="bidBalance" label="储值卡面值"> </el-table-column>
<el-table-column prop="amount" label="自定义充值金额"> </el-table-column>
<el-table-column prop="rechargeBalance" label="储值卡实售金额"> </el-table-column>
<el-table-column prop="giftBalance" label="储值卡赠送金额"></el-table-column>
<el-table-column prop="paymentType" label="支付方式">
@ -221,6 +222,36 @@
<el-button type="primary" @click="refundConfirmed()"> </el-button>
</span>
</el-dialog>
<!-- 支付成功后小票打印内容-->
<div id="reportSuccess" ref="report" class="box-center" v-show="false">
<div class="box-title">订单统计</div>
<div class="box-ge">
<div class="input-box">
<div>充值金额</div>
<div>{{ oilOrder.amount ? oilOrder.amount : oilOrder.rechargeBalance }}</div>
</div>
<div class="input-box">
<div>支付方式</div>
<div v-if="oilOrder.paymentType == 'CASH'">现金</div>
<div v-else-if="oilOrder.paymentType == 'WECHAT'">微信</div>
<div v-else-if="oilOrder.paymentType == 'ALIPAY'">支付宝</div>
<div v-else-if="oilOrder.paymentType == 'UNIONPAY'">银联二维码</div>
</div>
<div class="input-box">
<div>赠送金额</div>
<div>{{ oilOrder.giftBalance }}</div>
</div>
<div class="input-box">
<div>到账金额</div>
<div>{{ oilOrder.amount ? oilOrder.giftBalance + oilOrder.amount : oilOrder.giftBalance + oilOrder.rechargeBalance }}</div>
</div>
<div class="input-box">
<div>实付款</div>
<div>{{ oilOrder.amount ? oilOrder.amount : oilOrder.rechargeBalance }}</div>
</div>
</div>
</div>
</div>
</template>
@ -230,6 +261,7 @@ import {getDicts} from "@/api/dict/data";
import {queryStaffs} from "@/api/cashier/staff";
import {refundApi} from "@/api/cashier/refund";
import {exportExcelVipApi} from "@/api/order/exportExcel";
import {getLodop} from "@/api/LodopFuncs";
export default {
name: "order_Cashier",
@ -291,12 +323,96 @@ export default {
},
async printLocally() {
//
let LODOP = getLodop(); //
LODOP.PRINT_INIT();
var bodyStyle = `<style>
.input-box{
width: 100%;
display: flex;
align-items: center;
justify-content: space-between;
font-size: 14px;
margin: 5px 0px;
}
.box-ge{
border-bottom: 1px solid #000000 ;
box-sizing: border-box;
padding: 10px;
}
.box-title{
font-size: 18px;
text-align: center;
align-items: center;
margin-top: 15px;
}
.input-hui{
width: 100%;
display: flex;
align-items: center;
justify-content: space-between;
font-size: 14px;
margin: 15px 0px;
background: #b2b2b2;
box-sizing: border-box;
padding: 5px 0px;
}
.input-hui-frou{
width: 100%;
display: flex;
align-items: center;
justify-content: space-between;
font-size: 14px;
margin: 15px 0px;
background: #b2b2b2;
box-sizing: border-box;
padding: 5px 0px;
div{
width: 25%;
text-align: left;
}
}
.input-box-frou{
width: 100%;
display: flex;
align-items: center;
justify-content: space-between;
font-size: 14px;
margin: 5px 0px;
div{
width: 25%;
text-align: left;
}
}
.box-center{
height: 500px;
}
</style>
`
var fromHtml = bodyStyle+this.$refs.report.innerHTML
LODOP.ADD_PRINT_HTM(0, 0, "100%", "100%", fromHtml);
LODOP.SET_PRINT_MODE("FULL_WIDTH_FOR_OVERFLOW",true);
// LODOP.ADD_PRINT_BARCODE(10,40,100,100,'QRCode','123456789');
// let preview = LODOP.PREVIEW();
// console.log("preview",preview);
LODOP.PRINT();
},
//
patchwork(data){
const orderNo = data.name
this.$modal.confirm('确定您要补打当前订单吗?当前会员[' + orderNo + '],请确保云打印机正在运行中').then(function() {
// return delUser(row.id);
}).then(() => {
}).then(async () => {
await cardValueRecordInfo(data.id).then( response => {
this.oilOrder = response.data
})
this.printLocally()
this.$modal.msgSuccess("打印指令已发送打印机,请查看打印结果");
}).catch(() => {});
},

View File

@ -158,8 +158,8 @@ export default {
loginForm: {
tel:null,
telcode:null,
username: "fuint",
password: "123456",
username: "",
password: "",
rememberMe: false,
captchaCode: "",
uuid: ""
@ -301,7 +301,7 @@ export default {
}).catch(() => {
app.loading = false;
if (app.captchaOnOff) {
app.getCode();
// app.getCode();
}
});
}

View File

@ -507,27 +507,29 @@
}
})
// code
wx.login({
success(res) {
if (res.code) {
//
request({
url: 'clientApi/sign/mpWxLogin2',
method: "POST",
data: {
code: res.code
}
}).then(res => {
if (!res.data) {
uni.removeStorageSync("App-Token");
}
})
} else {
console.log('登录失败!' + res.errMsg)
if (uni.getStorageSync("appltType")== "WECHAT") {
// code
wx.login({
success(res) {
if (res.code) {
//
request({
url: 'clientApi/sign/mpWxLogin2',
method: "POST",
data: {
code: res.code
}
}).then(res => {
if (!res.data) {
uni.removeStorageSync("App-Token");
}
})
} else {
console.log('登录失败!' + res.errMsg)
}
}
}
})
})
}
},
// 退
backspace() {

View File

@ -33,7 +33,7 @@
</view>
<view class="dis-box">
<view class="dian" style="background: #FA5E03;"></view>
<view class="h_size">获得折扣赠送{{item.points}}积分</view>
<view class="h_size">获得奖励赠送{{item.points}}积分</view>
</view>
</view>
</view>

View File

@ -310,6 +310,7 @@
isUseChildCard:this.isUseChildCard,
activeId:this.preferentialData.activeId,
cardFavorableId:this.preferentialData.cardFavorableId,
type:this.preferentialData.type,
};
let _this = this;
request({