Merge remote-tracking branch 'origin/master'

This commit is contained in:
@QQNZX 2024-03-05 10:08:59 +08:00
commit b2d6d24a5a
16 changed files with 121 additions and 60 deletions

View File

@ -286,7 +286,8 @@
<el-col :span="24"> <el-col :span="24">
<el-form-item label="提成金额" prop="royaltyRate"> <el-form-item label="提成金额" prop="royaltyRate">
<el-input v-model="form.royaltyRate" placeholder="请输入提成"> <el-input v-model="form.royaltyRate" placeholder="请输入提成">
<el-select v-model="select" maxlength="10" oninput="value=value.replace(/^\D*(\d*(?:\.\d{0,2})?).*$/g, '$1')" style="width: 70px" slot="append" placeholder="请选择"> <el-select v-model="select" maxlength="10"
oninput="value=value.replace(/^\D*(\d*(?:\.\d{0,2})?).*$/g, '$1')" style="width: 70px" slot="append" placeholder="请选择">
<el-option label="元" value="元"></el-option> <el-option label="元" value="元"></el-option>
<el-option label="%" value="%"></el-option> <el-option label="%" value="%"></el-option>
</el-select> </el-select>
@ -730,9 +731,9 @@ export default {
submitForm: function() { submitForm: function() {
this.$refs["form"].validate(valid => { this.$refs["form"].validate(valid => {
if (valid) { if (valid) {
if (/^\d+$/.test(this.form.royaltyRate)){ // if (/^\d+$/.test(this.form.royaltyRate)){
this.form.royaltyRate = this.form.royaltyRate + this.select this.form.royaltyRate = this.form.royaltyRate + this.select
} // }
this.form.staffRoleGroup = this.staffRoleGroup.toString() this.form.staffRoleGroup = this.staffRoleGroup.toString()
if (this.form.id) { if (this.form.id) {
updateCommission(this.form).then(response => { updateCommission(this.form).then(response => {

View File

@ -1018,9 +1018,10 @@ export default {
// //
getISEnableLevel(){ getISEnableLevel(){
getChainStoreConfig().then(response => { getChainStoreConfig().then(response => {
if (response.data) {
this.isEnableLevel = response.data.isEnableLevel; this.isEnableLevel = response.data.isEnableLevel;
this.clear = response.data.isMonthClear; this.clear = response.data.isMonthClear;
if (response.data.gasGrowthValue){ if (response.data.gasGrowthValue) {
this.gasGrowthValue = response.data.gasGrowthValue; this.gasGrowthValue = response.data.gasGrowthValue;
} }
if (response.data.dieselGrowthValue) { if (response.data.dieselGrowthValue) {
@ -1029,13 +1030,14 @@ export default {
if (response.data.naturalGrowthValue) { if (response.data.naturalGrowthValue) {
this.naturalGrowthValue = response.data.naturalGrowthValue; this.naturalGrowthValue = response.data.naturalGrowthValue;
} }
if (response.data.isEnableLevel=="no"){ if (response.data.isEnableLevel == "no") {
this.level1 = true; this.level1 = true;
this.level2 = false; this.level2 = false;
}else { } else {
this.level1 = false; this.level1 = false;
this.level2 = true; this.level2 = true;
} }
}
}) })
// getSysConfig('is_enable_level').then(response => { // getSysConfig('is_enable_level').then(response => {
// this.isEnableLevel = response.data // this.isEnableLevel = response.data
@ -1116,7 +1118,7 @@ export default {
// //
getClearConfig(){ getClearConfig(){
getChainStoreConfig().then(response => { getChainStoreConfig().then(response => {
this.clear = response.data.levelClearRule; if (response.data) this.clear = response.data.levelClearRule;
}) })
}, },
// //

View File

@ -489,6 +489,7 @@
this.$refs["form"].validate(valid => { this.$refs["form"].validate(valid => {
if (valid) { if (valid) {
if (!this.form.id) { if (!this.form.id) {
this.form.storeId = this.id;
this.form.posPrem = JSON.stringify(this.form.posPrem); this.form.posPrem = JSON.stringify(this.form.posPrem);
this.form.appletPrem = JSON.stringify(this.form.appletPrem); this.form.appletPrem = JSON.stringify(this.form.appletPrem);
addStaff(this.form).then(response => { addStaff(this.form).then(response => {

View File

@ -1,5 +1,6 @@
package com.fuint.business.marketingActivity.activeExchange.service.impl; package com.fuint.business.marketingActivity.activeExchange.service.impl;
import cn.hutool.core.util.ObjectUtil;
import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
@ -512,7 +513,8 @@ public class ActiveExchangeServiceImpl implements ActiveExchangeService {
} }
//折扣+优惠券 //折扣+优惠券
for (ActiveDiscountPayVO activeDiscountPayVO : activeDiscountVOList) { for (ActiveDiscountPayVO activeDiscountPayVO : activeDiscountVOList) {
if (!activeDiscountPayVO.getParticipationCondition().equals("1")){ if (ObjectUtil.isNotEmpty(activeDiscountPayVO.getParticipationCondition())
&& !activeDiscountPayVO.getParticipationCondition().equals("1")){
for (CardFavorableRecordVO cardFavorableRecordVO : canUserCardFavorableList) { for (CardFavorableRecordVO cardFavorableRecordVO : canUserCardFavorableList) {
if(StringUtils.isNotEmpty(cardFavorableRecordVO.getExclusiveFunction()) && cardFavorableRecordVO.getExclusiveFunction().equals("2") if(StringUtils.isNotEmpty(cardFavorableRecordVO.getExclusiveFunction()) && cardFavorableRecordVO.getExclusiveFunction().equals("2")
&& StringUtils.isNotEmpty(cardFavorableRecordVO.getExclusiveFunction()) && !cardFavorableRecordVO.getExclusiveFunction().equals("0")){ && StringUtils.isNotEmpty(cardFavorableRecordVO.getExclusiveFunction()) && !cardFavorableRecordVO.getExclusiveFunction().equals("0")){
@ -553,7 +555,8 @@ public class ActiveExchangeServiceImpl implements ActiveExchangeService {
} }
//满减+优惠券 //满减+优惠券
for (ActiveDiscountPayVO activeDiscountPayVO : activeFuletVOList) { for (ActiveDiscountPayVO activeDiscountPayVO : activeFuletVOList) {
if (!activeDiscountPayVO.getParticipationCondition().equals("1")){ if (ObjectUtils.isNotEmpty(activeDiscountPayVO.getParticipationCondition())
&& !activeDiscountPayVO.getParticipationCondition().equals("1")){
for (CardFavorableRecordVO cardFavorableRecordVO : canUserCardFavorableList) { for (CardFavorableRecordVO cardFavorableRecordVO : canUserCardFavorableList) {
if(StringUtils.isNotEmpty(cardFavorableRecordVO.getExclusiveFunction()) && ObjectUtils.isNotEmpty(cardFavorableRecordVO) && cardFavorableRecordVO.getType().equals("2") && !cardFavorableRecordVO.getExclusiveFunction().equals("0")){ if(StringUtils.isNotEmpty(cardFavorableRecordVO.getExclusiveFunction()) && ObjectUtils.isNotEmpty(cardFavorableRecordVO) && cardFavorableRecordVO.getType().equals("2") && !cardFavorableRecordVO.getExclusiveFunction().equals("0")){
ActiveDiscountPayVO activeDiscountPayVO1 = new ActiveDiscountPayVO(); ActiveDiscountPayVO activeDiscountPayVO1 = new ActiveDiscountPayVO();

View File

@ -1,6 +1,9 @@
package com.fuint.business.marketingActivity.activeOneCoupon.entity; package com.fuint.business.marketingActivity.activeOneCoupon.entity;
import java.util.Date; import java.util.Date;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.extension.activerecord.Model; import com.baomidou.mybatisplus.extension.activerecord.Model;
import lombok.Data; import lombok.Data;
@ -16,6 +19,7 @@ import java.io.Serializable;
@Data @Data
public class ActiveOneCoupon extends Model<ActiveOneCoupon> { public class ActiveOneCoupon extends Model<ActiveOneCoupon> {
//主键id //主键id
@TableId(type = IdType.AUTO)
private Integer id; private Integer id;
private Integer storeId; private Integer storeId;
private String activeName; private String activeName;

View File

@ -28,6 +28,7 @@ import com.fuint.common.dto.AccountInfo;
import com.fuint.common.util.TokenUtil; import com.fuint.common.util.TokenUtil;
import com.fuint.repository.mapper.MtUserGradeMapper; import com.fuint.repository.mapper.MtUserGradeMapper;
import com.fuint.repository.model.MtUserGrade; import com.fuint.repository.model.MtUserGrade;
import com.fuint.repository.model.MtUserGradeVO;
import org.apache.commons.lang3.ObjectUtils; import org.apache.commons.lang3.ObjectUtils;
import org.springframework.beans.BeanUtils; import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
@ -73,11 +74,11 @@ public class ActiveOneCouponServiceImpl extends ServiceImpl<ActiveOneCouponMappe
String gradeIdStr = ""; String gradeIdStr = "";
String gradeIdName = ""; String gradeIdName = "";
Integer[] gradeIds = activeOneCouponDTO.getGradeIds(); Integer[] gradeIds = activeOneCouponDTO.getGradeIds();
/* for (Integer gradeId : gradeIds) { for (Integer gradeId : gradeIds) {
gradeIdStr+=gradeId + ","; gradeIdStr+=gradeId + ",";
MtUserGrade mtUserGrade = mtUserGradeMapper.selectById(gradeId); MtUserGradeVO mtUserGrade = mtUserGradeMapper.selectByGradeId(gradeId);
gradeIdName += mtUserGrade.getName() + ","; gradeIdName += mtUserGrade.getName() + ",";
}*/ }
activeOneCoupon.setGradeId(gradeIdStr); activeOneCoupon.setGradeId(gradeIdStr);
activeOneCoupon.setGradeName(gradeIdName); activeOneCoupon.setGradeName(gradeIdName);
activeOneCoupon.setStoreId(nowAccountInfo.getStoreId()); activeOneCoupon.setStoreId(nowAccountInfo.getStoreId());
@ -129,7 +130,7 @@ public class ActiveOneCouponServiceImpl extends ServiceImpl<ActiveOneCouponMappe
String[] gradeId = gradeIds.split(","); String[] gradeId = gradeIds.split(",");
for (String s : gradeId) { for (String s : gradeId) {
LJUserVos ljUserVos = new LJUserVos(); LJUserVos ljUserVos = new LJUserVos();
MtUserGrade mtUserGrade = mtUserGradeMapper.selectById(s); MtUserGradeVO mtUserGrade = mtUserGradeMapper.selectByGradeId(Integer.parseInt(s));
ljUserVos.setGradeName(mtUserGrade.getName()); ljUserVos.setGradeName(mtUserGrade.getName());
LJUserVo ljUserVo = new LJUserVo(); LJUserVo ljUserVo = new LJUserVo();
ljUserVo.setGradeId(Integer.parseInt(s)); ljUserVo.setGradeId(Integer.parseInt(s));

View File

@ -117,7 +117,7 @@ public class LJStaffController extends BaseController {
@PostMapping("/mobile") @PostMapping("/mobile")
public ResponseObject staffByMobile(@Validated @RequestBody Map<String ,String > map){ public ResponseObject staffByMobile(@Validated @RequestBody Map<String ,String > map){
String mobile = map.get("mobile"); String mobile = map.get("mobile");
LJStaff staff = mtStaffService.selectStaffByMobile(mobile); LJStaff staff = mtStaffService.selectStaffByMobile(mobile,null);
return getSuccessResult(staff); return getSuccessResult(staff);
} }

View File

@ -54,7 +54,7 @@ public interface ILJStaffService extends IService<LJStaff> {
* @param mobile * @param mobile
* @return * @return
*/ */
public LJStaff selectStaffByMobile(String mobile); public LJStaff selectStaffByMobile(String mobile,Integer storeId);
public LJStaff selectStaffByMobile2(String mobile); public LJStaff selectStaffByMobile2(String mobile);
/** /**

View File

@ -19,6 +19,8 @@ import com.fuint.common.util.TokenUtil;
import com.fuint.framework.web.ResponseObject; import com.fuint.framework.web.ResponseObject;
import com.fuint.module.backendApi.controller.BackendFileController; import com.fuint.module.backendApi.controller.BackendFileController;
import com.fuint.repository.model.TAccount; import com.fuint.repository.model.TAccount;
import com.fuint.system.role.entity.TDuty;
import com.fuint.system.role.service.DutyService;
import com.fuint.utils.Digests; import com.fuint.utils.Digests;
import com.fuint.utils.Encodes; import com.fuint.utils.Encodes;
import jdk.nashorn.internal.parser.Token; import jdk.nashorn.internal.parser.Token;
@ -28,6 +30,7 @@ import org.springframework.mock.web.MockMultipartFile;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.web.multipart.MultipartFile; import org.springframework.web.multipart.MultipartFile;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import java.io.*; import java.io.*;
import java.text.SimpleDateFormat; import java.text.SimpleDateFormat;
@ -45,6 +48,8 @@ public class LJStaffServiceImpl extends ServiceImpl<LJStaffMapper, LJStaff> impl
private AccountService accountService; private AccountService accountService;
@Autowired @Autowired
private QrCodeUtils qrCodeUtils; private QrCodeUtils qrCodeUtils;
@Resource
private DutyService tDutyService;
/** /**
* 根据条件分页查询员工信息 * 根据条件分页查询员工信息
@ -126,11 +131,14 @@ public class LJStaffServiceImpl extends ServiceImpl<LJStaffMapper, LJStaff> impl
* @return * @return
*/ */
@Override @Override
public LJStaff selectStaffByMobile(String mobile) { public LJStaff selectStaffByMobile(String mobile,Integer storeId) {
if (ObjectUtil.isEmpty(storeId)){
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo(); AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
storeId = nowAccountInfo.getStoreId();
}
QueryWrapper queryWrapper = new QueryWrapper(); QueryWrapper queryWrapper = new QueryWrapper();
queryWrapper.eq("mobile",mobile); queryWrapper.eq("mobile",mobile);
queryWrapper.eq("store_id",nowAccountInfo.getStoreId()); queryWrapper.eq("store_id",storeId);
queryWrapper.eq("if_delete","0"); queryWrapper.eq("if_delete","0");
LJStaff staff = baseMapper.selectOne(queryWrapper); LJStaff staff = baseMapper.selectOne(queryWrapper);
return staff; return staff;
@ -176,19 +184,19 @@ public class LJStaffServiceImpl extends ServiceImpl<LJStaffMapper, LJStaff> impl
*/ */
@Override @Override
public int insertStaff(LJStaff staff) { public int insertStaff(LJStaff staff) {
LJStaff staff2 = this.selectStaffByMobile(staff.getMobile());
if (ObjectUtil.isNotEmpty(staff2)) return 0;
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo(); AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
Integer storeId = nowAccountInfo.getStoreId(); Integer storeId = nowAccountInfo.getStoreId();
if (ObjectUtil.isNotEmpty(staff.getStoreId())) { if (ObjectUtil.isNotEmpty(staff.getStoreId())) {
storeId = staff.getStoreId(); storeId = staff.getStoreId();
} }
LJStaff staff2 = this.selectStaffByMobile(staff.getMobile(),storeId);
if (ObjectUtil.isNotEmpty(staff2)) return 0;
staff.setStoreId(storeId); staff.setStoreId(storeId);
if (StringUtils.isNotEmpty(staff.getRefundPassword())){ if (StringUtils.isNotEmpty(staff.getRefundPassword())){
this.entryptPassword(staff); this.entryptPassword(staff);
} }
int row = baseMapper.insert(staff); int row = baseMapper.insert(staff);
LJStaff staff1 = this.selectStaffByMobile(staff.getMobile()); LJStaff staff1 = this.selectStaffByMobile(staff.getMobile(),storeId);
if (ObjectUtil.isNotEmpty(staff1)){ if (ObjectUtil.isNotEmpty(staff1)){
// 添加员工码 // 添加员工码
staff1.setStaffCode("https://www.tuofeng.cc/oilRefuel?storeId="+storeId+"&staffId="+staff1.getId()); staff1.setStaffCode("https://www.tuofeng.cc/oilRefuel?storeId="+storeId+"&staffId="+staff1.getId());
@ -221,15 +229,16 @@ public class LJStaffServiceImpl extends ServiceImpl<LJStaffMapper, LJStaff> impl
}else { }else {
account.setPassword("123456"); account.setPassword("123456");
} }
TDuty tDuty = new TDuty();
accountService.createAccountInfo(account,null); tDuty.setDutyId(Integer.valueOf(staff1.getRoleId()));
accountService.createAccountInfo(account,tDutyService.getDutyList(tDuty));
return row; return row;
} }
@Override @Override
public int addStaff(LJStaff staff,TAccount tAccount) { public int addStaff(LJStaff staff,TAccount tAccount) {
int row = baseMapper.insert(staff); int row = baseMapper.insert(staff);
LJStaff staff1 = this.selectStaffByMobile(staff.getMobile()); LJStaff staff1 = this.selectStaffByMobile(staff.getMobile(),null);
if (ObjectUtil.isNotEmpty(staff1)){ if (ObjectUtil.isNotEmpty(staff1)){
tAccount.setStaffId(staff1.getId()); tAccount.setStaffId(staff1.getId());
accountService.updateAccount(tAccount); accountService.updateAccount(tAccount);
@ -245,8 +254,8 @@ public class LJStaffServiceImpl extends ServiceImpl<LJStaffMapper, LJStaff> impl
@Override @Override
public int updateStaff(LJStaff staff) { public int updateStaff(LJStaff staff) {
int row = 0; int row = 0;
LJStaff staff1 = this.selectStaffByMobile(staff.getMobile()); LJStaff staff1 = this.selectStaffByMobile(staff.getMobile(),staff.getStoreId());
if (ObjectUtil.isNotEmpty(staff1) && staff1.getId() != staff.getId()){ if (ObjectUtil.isNotEmpty(staff1) && !staff1.getId().equals(staff.getId())){
row = 0; row = 0;
return row; return row;
} }

View File

@ -48,19 +48,21 @@ public class MtUserGradeChildServiceImpl extends ServiceImpl<MtUserGradeChildMap
LJUserVo userVo = userService.queryUserById(userId, storeId); LJUserVo userVo = userService.queryUserById(userId, storeId);
LJStore store = storeService.selectStoreByStoreId(storeId); LJStore store = storeService.selectStoreByStoreId(storeId);
ChainStoreConfig chainStoreConfig = chainStoreConfigService.selectChainStoreById(store.getChainStoreId()); ChainStoreConfig chainStoreConfig = chainStoreConfigService.selectChainStoreById(store.getChainStoreId());
if (ObjectUtil.isNotEmpty(chainStoreConfig)) {
String isEnableLevel = chainStoreConfig.getIsEnableLevel(); String isEnableLevel = chainStoreConfig.getIsEnableLevel();
if (isEnableLevel.equals("yes")){ if (isEnableLevel.equals("yes")) {
if (ObjectUtil.isNotEmpty(userVo.getGradeId())){ if (ObjectUtil.isNotEmpty(userVo.getGradeId())) {
LJUserGrade ljUserGrade = ljUserGradeService.selectUserGradeById(userVo.getGradeId()); LJUserGrade ljUserGrade = ljUserGradeService.selectUserGradeById(userVo.getGradeId());
if (!ljUserGrade.getIfRechargeCoupon().equals("1")){ if (!ljUserGrade.getIfRechargeCoupon().equals("1")) {
return new ArrayList<MtUserGradeChild>(); return new ArrayList<MtUserGradeChild>();
} }
}else{ } else {
QueryWrapper queryWrapper = new QueryWrapper<>(); QueryWrapper queryWrapper = new QueryWrapper<>();
queryWrapper.eq("user_grade_id",userVo.getGradeId()); queryWrapper.eq("user_grade_id", userVo.getGradeId());
return baseMapper.selectList(queryWrapper); return baseMapper.selectList(queryWrapper);
} }
} }
}
return new ArrayList<MtUserGradeChild>(); return new ArrayList<MtUserGradeChild>();
} }

View File

@ -285,6 +285,9 @@ public class DutyServiceImpl extends ServiceImpl<TDutyMapper, TDuty> implements
if (ObjectUtil.isNotEmpty(tDuty) && ObjectUtil.isNotEmpty(tDuty.getPermissionType())) { if (ObjectUtil.isNotEmpty(tDuty) && ObjectUtil.isNotEmpty(tDuty.getPermissionType())) {
lambdaQueryWrapper.like(TDuty::getPermissionType,tDuty.getPermissionType()); lambdaQueryWrapper.like(TDuty::getPermissionType,tDuty.getPermissionType());
} }
if (ObjectUtil.isNotEmpty(tDuty) && ObjectUtil.isNotEmpty(tDuty.getDutyId())) {
lambdaQueryWrapper.eq(TDuty::getDutyId,tDuty.getDutyId());
}
return baseMapper.selectList(lambdaQueryWrapper); return baseMapper.selectList(lambdaQueryWrapper);
} }

View File

@ -2,6 +2,7 @@ package com.fuint.repository.mapper;
import com.fuint.repository.model.MtUserGrade; import com.fuint.repository.model.MtUserGrade;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.fuint.repository.model.MtUserGradeVO;
/** /**
* Mapper 接口 * Mapper 接口
@ -10,5 +11,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
* CopyRight https://www.fuint.cn * CopyRight https://www.fuint.cn
*/ */
public interface MtUserGradeMapper extends BaseMapper<MtUserGrade> { public interface MtUserGradeMapper extends BaseMapper<MtUserGrade> {
MtUserGradeVO selectByGradeId(Integer gradeId);
// empty // empty
} }

View File

@ -38,9 +38,9 @@ public class MtUserGrade implements Serializable {
@ApiModelProperty("等级名称") @ApiModelProperty("等级名称")
private String name; private String name;
// @ApiModelProperty("升级会员等级条件描述") /*// @ApiModelProperty("升级会员等级条件描述")
// private String catchCondition; // private String catchCondition;
*/
@ApiModelProperty("升级会员等级条件init:默认获取;pay:付费升级frequency:消费次数amount:累积消费金额升级") @ApiModelProperty("升级会员等级条件init:默认获取;pay:付费升级frequency:消费次数amount:累积消费金额升级")
@TableField(exist = false) @TableField(exist = false)
private String catchType; private String catchType;

View File

@ -0,0 +1,18 @@
package com.fuint.repository.model;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@Data
public class MtUserGradeVO {
@TableId(value = "ID", type = IdType.AUTO)
private Integer id;
@ApiModelProperty("等级")
private Integer grade;
@ApiModelProperty("等级名称")
private String name;
}

View File

@ -2,4 +2,7 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.fuint.repository.mapper.MtUserGradeMapper"> <mapper namespace="com.fuint.repository.mapper.MtUserGradeMapper">
<select id="selectByGradeId" resultType="com.fuint.repository.model.MtUserGradeVO">
select id,grade,name from mt_user_grade where grade_id = #{gradeId}
</select>
</mapper> </mapper>

View File

@ -90,7 +90,7 @@
</div> </div>
<div>-{{ fullReduction.toFixed(2) }}</div> <div>-{{ fullReduction.toFixed(2) }}</div>
</div> </div>
<div class="center-left-hj" v-show="isMember"> <div class="center-left-hj" v-show="isMember && gradeDiscount.length>0">
<div> <div>
<el-popover <el-popover
placement="bottom-start" placement="bottom-start"
@ -188,7 +188,7 @@
</div> </div>
<div class="th-box"> <div class="th-box">
<div @click="getStaffList">加油员</div> <div @click="getStaffList">加油员</div>
<div style="cursor: pointer;color: crimson" @click="getStaffList" >{{ staff.realName }}</div> <div style="cursor: pointer;color: crimson" @click="getStaffList" >{{ staff ? staff.realName : "--" }}</div>
</div> </div>
</div> </div>
</div> </div>
@ -345,13 +345,16 @@
:visible.sync="dialogVisible" :visible.sync="dialogVisible"
width="30%" width="30%"
:close-on-click-modal="false"> :close-on-click-modal="false">
<div class="wrap-wrap"> <div class="wrap-wrap" v-if="staffList.length>0">
<div class="of-box" v-for="(item,index) in staffList" :key="index" <div class="of-box" v-for="(item,index) in staffList" :key="index"
@click="chooseStaff(item)" @click="chooseStaff(item)"
:style="{'background-color': item.color}"> :style="{'background-color': item.color}">
<div class="of-title">{{ item.realName }}</div> <div class="of-title">{{ item.realName }}</div>
<div style="text-align: center;font-size: 17px">{{ item.mobile }}</div> <div style="text-align: center;font-size: 17px">{{ item.mobile }}</div>
</div> </div>
</div>
<div class="wrap-wrap" v-else>
<span>暂未配置加油员</span>
</div> </div>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
<el-button @click="dialogVisible = false"> </el-button> <el-button @click="dialogVisible = false"> </el-button>
@ -1626,7 +1629,7 @@
this.getOilName(); this.getOilName();
this.getGoods(); this.getGoods();
// this.getStaffList(); // this.getStaffList();
this.getStaff(); // this.getStaff();
this.getList(); this.getList();
this.getCouponList(); this.getCouponList();
// this.getUnitList(); // this.getUnitList();
@ -1760,7 +1763,8 @@
}, },
// //
async userRecharge() { async userRecharge() {
if (this.isSure){ // if (this.isSure){
if (this.member){
this.$message.error("请先选择会员") this.$message.error("请先选择会员")
return; return;
} }
@ -2557,7 +2561,9 @@
this.map.consumeAmount = 0.0; this.map.consumeAmount = 0.0;
this.map.refuelMoney = JSON.stringify(this.refuelMoney) this.map.refuelMoney = JSON.stringify(this.refuelMoney)
this.map.couponId = this.useCouponIds this.map.couponId = this.useCouponIds
if (this.staff){
this.map.staffId = this.staff.id this.map.staffId = this.staff.id
}
this.map.cardFavorableId = this.cardFavorableId this.map.cardFavorableId = this.cardFavorableId
this.map.recordId = this.recordId this.map.recordId = this.recordId
this.map.userId = this.member.id this.map.userId = this.member.id
@ -2855,6 +2861,7 @@
resetMember(){ resetMember(){
this.member = {}; this.member = {};
this.isMember = false; this.isMember = false;
this.isSure = false;
this.map.payUser == ""; this.map.payUser == "";
this.balance = 0; this.balance = 0;
this.oilDiscount = 0; this.oilDiscount = 0;
@ -3569,7 +3576,7 @@
this.dialogVisiblej = true this.dialogVisiblej = true
this.getStaff() // this.getStaff()
}, },
// //
resetting(){ resetting(){
@ -3826,6 +3833,7 @@
this.amount = 0 this.amount = 0
this.dialogVisibleamount = true; this.dialogVisibleamount = true;
let result = false let result = false
this.isExistOilOrder = false;
// //
this.oilOrder.forEach(item => { this.oilOrder.forEach(item => {
if (item.id==data.id){ if (item.id==data.id){
@ -3887,7 +3895,9 @@
this.updateRefuelMoney(); this.updateRefuelMoney();
this.map.refuelMoney = JSON.stringify(this.refuelMoney) this.map.refuelMoney = JSON.stringify(this.refuelMoney)
this.map.couponId = this.useCouponIds this.map.couponId = this.useCouponIds
if (this.staff) {
this.map.staffId = this.staff.id this.map.staffId = this.staff.id
}
this.map.cardFavorableId = this.cardFavorableId this.map.cardFavorableId = this.cardFavorableId
this.map.recordId = this.recordId this.map.recordId = this.recordId
this.map.userId = this.member.id this.map.userId = this.member.id
@ -3984,6 +3994,7 @@
_this.oilTotal = 0; _this.oilTotal = 0;
_this.goodsTotal = 0; _this.goodsTotal = 0;
_this.isMember = false; _this.isMember = false;
_this.isSure = false;
_this.oilOrder = [] _this.oilOrder = []
_this.goodsOrder = [] _this.goodsOrder = []
_this.amount = 0 _this.amount = 0