Merge remote-tracking branch 'origin/master'

This commit is contained in:
齐天大圣 2024-03-05 09:20:17 +08:00
commit 66edef025b
16 changed files with 184 additions and 121 deletions

View File

@ -8,9 +8,10 @@ export function issueCardFavorable(data) {
data:data
})
}
export function getCardFavorableLists(status) {
return request({
url: 'business/marketingActivity/cardFavorableRecord/getCardFavorableLists',
url: 'business/marketingActivity/oneActiveOneCoupon',
method: 'get',
params: status
})

View File

@ -1018,6 +1018,7 @@ export default {
//
getISEnableLevel(){
getChainStoreConfig().then(response => {
if (response.data) {
this.isEnableLevel = response.data.isEnableLevel;
this.clear = response.data.isMonthClear;
if (response.data.gasGrowthValue) {
@ -1036,6 +1037,7 @@ export default {
this.level1 = false;
this.level2 = true;
}
}
})
// getSysConfig('is_enable_level').then(response => {
// this.isEnableLevel = response.data
@ -1116,7 +1118,7 @@ export default {
//
getClearConfig(){
getChainStoreConfig().then(response => {
this.clear = response.data.levelClearRule;
if (response.data) this.clear = response.data.levelClearRule;
})
},
//

View File

@ -857,6 +857,8 @@ export default {
},
//
submitForms(formName) {
console.log("timeFrame ",this.timeFrame)
console.log("this.ruleForm ",this.ruleForm)
this.$refs[formName].validate((valid) => {
if (valid) {
console.log("timeFrame",this.timeFrame)
@ -923,6 +925,7 @@ export default {
this.cleanRuleForm()
this.activeName = 'info'
this.pdinfo = 1
this.timeFrame = []
this.addNode(data.id,data.label)
// console.log(this.pdinfo)

View File

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

View File

@ -277,8 +277,6 @@ public class CardFuelRecordServiceImpl implements CardFuelRecordService {
@Autowired
private RedisLock redisLock;
/*@Autowired
private StaffCommissionService staffCommissionService;*/
private static String beforeLitres = new String("0");
/**

View File

@ -434,7 +434,7 @@ public class CardValueRecordServiceImpl extends ServiceImpl<CardValueRecordMappe
private static AllOrderInfo getAllOrderInfo(CardValueRecordDTO cardValueRecordDTO) {
AllOrderInfo allOrderInfo = new AllOrderInfo();
allOrderInfo.setOrderNo(cardValueRecordDTO.getPaymentNo());
allOrderInfo.setType("2");
allOrderInfo.setType("3");
allOrderInfo.setStoreId(cardValueRecordDTO.getStoreId());
allOrderInfo.setGoodsMoney(cardValueRecordDTO.getGiftBalance());
allOrderInfo.setPayMoney(cardValueRecordDTO.getRealyPayBills());

View File

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

View File

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

View File

@ -48,6 +48,7 @@ public class MtUserGradeChildServiceImpl extends ServiceImpl<MtUserGradeChildMap
LJUserVo userVo = userService.queryUserById(userId, storeId);
LJStore store = storeService.selectStoreByStoreId(storeId);
ChainStoreConfig chainStoreConfig = chainStoreConfigService.selectChainStoreById(store.getChainStoreId());
if (ObjectUtil.isNotEmpty(chainStoreConfig)) {
String isEnableLevel = chainStoreConfig.getIsEnableLevel();
if (isEnableLevel.equals("yes")) {
if (ObjectUtil.isNotEmpty(userVo.getGradeId())) {
@ -61,6 +62,7 @@ public class MtUserGradeChildServiceImpl extends ServiceImpl<MtUserGradeChildMap
return baseMapper.selectList(queryWrapper);
}
}
}
return new ArrayList<MtUserGradeChild>();
}

View File

@ -288,6 +288,9 @@ public class AccountServiceImpl extends ServiceImpl<TAccountMapper, TAccount> im
staff.setRoleId(roleId);
staff.setMobile(param.get("mobile").toString());
// if ("3".equals(deptType)) {
//
// }
// 查询手机号是否存在
LambdaQueryWrapper<LJStaff> lambdaQueryWrapper = Wrappers.lambdaQuery();
// 查询手机号是否存在
@ -300,11 +303,13 @@ public class AccountServiceImpl extends ServiceImpl<TAccountMapper, TAccount> im
}
ljStaffMapper.insert(staff);
// 添加员工码信息
QueryWrapper queryWrapper = new QueryWrapper<>();
queryWrapper.eq("mobile",param.get("mobile").toString());
queryWrapper.eq("store_id",mtStore.getId());
queryWrapper.eq("if_delete","0");
staff = ljStaffMapper.selectOne(queryWrapper);
if (ObjectUtil.isNotEmpty(staff)) {
staff.setStaffCode("https://www.tuofeng.cc/oilRefuel?storeId="+storeId+"&staffId="+staff.getId());
ljStaffMapper.updateById(staff);
@ -313,6 +318,8 @@ public class AccountServiceImpl extends ServiceImpl<TAccountMapper, TAccount> im
editTAccount.setStaffId(staff.getId());
updateAccount(editTAccount);
}
}
return true;
}

View File

@ -285,6 +285,9 @@ public class DutyServiceImpl extends ServiceImpl<TDutyMapper, TDuty> implements
if (ObjectUtil.isNotEmpty(tDuty) && ObjectUtil.isNotEmpty(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);
}

View File

@ -3,9 +3,9 @@ module.exports = {
// baseUrl: 'https://vue.ruoyi.vip/prod-api',
// baseUrl: 'http://192.168.0.196:8081/',
// baseUrl: 'http://192.168.1.4:8080/',
// baseUrl: 'http://www.nuoyunr.com/lananRsc/',
baseUrl: 'http://192.168.0.121:8080/',
baseUrl: 'http://192.168.0.196:8081/',

View File

@ -61,20 +61,18 @@
<!-- centenr -->
<view class="conttainer-cetr">
<view class="conttainer-title">今日会员价</view>
<view class="conttainer-box">
<view class="c-box-box1" @click="show = true">
<view class="">{{oilInfo.oilName}}</view>
<view class="">
<u-icon name="arrow-down-fill"></u-icon>
</view>
<view class="conttainer-box" v-for="(item,index) in oilTypeList" :key="index">
<view class="c-box-box1">
<view class="">{{item.oilName||''}}</view>
</view>
<view class="c-box-box2">
<view class="xred">会员价</view>
<view class="dred"> <text class="xred"></text> {{oilInfo.oilPrice}}</view>
<view class="dred"> <text class="xred"></text> {{item.oilPrice||0}}</view>
</view>
<view class="c-box-box3">
<view class="xblck">国标价</view>
<view class="dblck"> <text class="xblck"></text> {{oilInfo.gbPrice}}</view>
<view class="dblck"> <text class="xblck"></text> {{item.gbPrice||0}}</view>
</view>
</view>
@ -87,7 +85,8 @@
<view class="station-title" style="display: flex;justify-content: space-between;">
{{store.name}}{{store.description ? "("+store.description+")" : ""}}
<view class="" @click="goChooseAddress" style="width: 22%;font-size: 14px;font-weight: 400;">
<view>切换位置 <uni-icons type="right" color="#304fff" size="16"></uni-icons> </view>
<view style="font-size: 12px;">切换位置 <uni-icons type="right" color="#304fff"
size="14"></uni-icons> </view>
</view>
</view><!--顺通石化加油站(工业南路站)-->
<view style="display: flex;">
@ -114,7 +113,7 @@
<view style="height: 88px; width: 100%;"></view>
</view>
<!-- 加油站卡片结束-->
<!-- <u-picker :show="show" :columns="columns" @confirm="confirm" @cancel="cancel"></u-picker> -->
<u-picker :columns="columns" @confirm="confirm" :show="show" @cancel="show = false"
keyName="label"></u-picker>
<u-overlay :show="shows == true">
@ -594,6 +593,7 @@
this.oilInfo.gbPrice = this.oilTypeList[0].gbPrice
}
let oilData = []
console.log(this.oilTypeList);
this.oilTypeList.forEach(res => {
let data = {
id: res.numberId,
@ -605,7 +605,7 @@
})
this.columns = [oilData]
console.log("aaa", this.columns)
}
})
},

View File

@ -10,7 +10,7 @@
<!-- 储值卡 -->
<view class="xyihang">
<view class="title-hei">储值卡</view>
<view class="title-hei">电子储值卡</view>
</view>
<view class="card-cz">
<view class="card-top">
@ -33,7 +33,7 @@
</view>
<!-- 囤油卡 -->
<view class="xyihang">
<view class="title-hei">囤油卡</view>
<view class="title-hei">电子囤油卡</view>
<view class="d_dis">
<view class="" @click="s_()">
<text>上一张</text>
@ -55,7 +55,7 @@
<view style="width: 100%;display: flex;align-items: center;justify-content: space-between; ">
<view class="bai-box">
<view class="title-card">囤油卡</view>
<view class="title-card">电子囤油卡</view>
<view class="">{{cardsList[cardsIndex].type || '暂无囤油'}}:{{cardsList[cardsIndex].oilName || '0'}}
</view>
<view>剩余油量{{cardsList[cardsIndex].refuelMoney || '0'}}L</view>

View File

@ -3,20 +3,35 @@
<view class="container">
<view class="my-header">
<view class="my-icons" @click="goback"> <uni-icons type="left" size="16"></uni-icons> </view>
<view class="my-text">油卡充值</view>
<view class="my-text" v-if="actinput == 0">电子储值卡</view>
<view class="my-text" v-if="actinput == 1">电子囤油卡</view>
<view class="my-text" v-if="actinput == 2">电子礼品卡</view>
<view class="my-icons"></view>
</view>
<!-- 顶部区域 -->
<view class="tap-box">
<!-- <view class="tap-box">
<view class="box-tap" :class="{ 'act' :actinput == index }" v-for="(item,index) in taplist" :key="index"
@click="getindex(index)">
<view class="title">{{item.title}}</view>
<view class="gang" :class="{ 'actgang' : actinput == index }"></view>
</view>
</view>
</view> -->
<!-- 储值充值 -->
<view class="boxback" v-if="actinput == 0">
<view class="box-cz">
<view class="box_s" v-for="(item,index) in actList" :key="index">
{{item.discountActiveDescribe || ''}}
</view>
<view style="display: flex; align-items: center; justify-content: space-around;">
<view class="" @click="types = 0"> <u-button type="primary" text="自定义金额"></u-button></view>
<view class="" @click="types = 1"> <u-button type="primary" :plain="true" text="金额选项"></u-button>
</view>
</view>
<view class="inputbox" v-if="types == 0">
<view class="cadname" style="width: 38%;">自定义金额</view>
<input type="text" v-model="rechargeBalance" placeholder="请输入自定义金额" />
</view>
<view class="box-cz" v-if="types == 1">
<view class="box-jg" :class="{ 'actbox' : actindex == index }" v-for="(item,index) in cardValueList"
:key="index"
@click="xzindex(index,item.rechargeBalance,item.fringeBenefit,item.giftBalance,item.points,item.growthValue,item.count,item.id)">
@ -168,6 +183,7 @@
export default {
data() {
return {
types: 0,
query: {
storeId: ''
},
@ -202,6 +218,7 @@
shuomingList: [],
shuomingFList: [],
columns: [],
actList: [],
taplist: [{
title: '储值充值'
},
@ -242,8 +259,22 @@
},
onShow() {
this.getStaffList()
this.activen()
},
methods: {
activen() {
request({
url: '/business/marketingActivity/cardValue/appletList?storeId=24',
method: 'get',
}).then(res => {
if (res.code == 200) {
console.log(res);
this.actList = res.data
}
})
},
open() {
console.log();
},
@ -252,13 +283,13 @@
},
//
addFuleCarRecords() {
if (this.staffId == '') {
uni.showToast({
title: "员工为必填项",
icon: Error
})
return
}
// if (this.staffId == '') {
// uni.showToast({
// title: "",
// icon: Error
// })
// return
// }
if (this.carValueId == '') {
uni.showToast({
title: "囤油卡为必填项",
@ -354,13 +385,7 @@
},
//
addValueCarRecords() {
if (this.staffId == '') {
uni.showToast({
title: "员工为必填项",
icon: "error"
})
return
}
if (this.carValueId == '') {
uni.showToast({
title: "储值卡为必填项",
@ -380,7 +405,10 @@
storeId: this.storeId,
chainStoreId: this.chainStoreId,
cardFavorableId: this.cardFavorableId,
cardRecordId: this.cardRecordId
cardRecordId: this.cardRecordId,
rechargeBalance: this.rechargeBalance,
types: this.types
},
}).then(res => {
if (res.code === 200) {
@ -774,6 +802,7 @@
background: #ffffff;
box-sizing: border-box;
padding-bottom: 1px;
padding-top: 1px;
}
.box-gang {
@ -805,4 +834,12 @@
background: white;
overflow: scroll;
}
.box_s {
width: 90%;
display: flex;
margin: 10px auto;
font-size: 14px;
color: #f40000;
}
</style>