Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
66edef025b
@ -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
|
||||
})
|
||||
|
@ -1018,23 +1018,25 @@ export default {
|
||||
// 是否开启等级功能
|
||||
getISEnableLevel(){
|
||||
getChainStoreConfig().then(response => {
|
||||
this.isEnableLevel = response.data.isEnableLevel;
|
||||
this.clear = response.data.isMonthClear;
|
||||
if (response.data.gasGrowthValue){
|
||||
this.gasGrowthValue = response.data.gasGrowthValue;
|
||||
}
|
||||
if (response.data.dieselGrowthValue) {
|
||||
this.dieselGrowthValue = response.data.dieselGrowthValue;
|
||||
}
|
||||
if (response.data.naturalGrowthValue) {
|
||||
this.naturalGrowthValue = response.data.naturalGrowthValue;
|
||||
}
|
||||
if (response.data.isEnableLevel=="no"){
|
||||
this.level1 = true;
|
||||
this.level2 = false;
|
||||
}else {
|
||||
this.level1 = false;
|
||||
this.level2 = true;
|
||||
if (response.data) {
|
||||
this.isEnableLevel = response.data.isEnableLevel;
|
||||
this.clear = response.data.isMonthClear;
|
||||
if (response.data.gasGrowthValue) {
|
||||
this.gasGrowthValue = response.data.gasGrowthValue;
|
||||
}
|
||||
if (response.data.dieselGrowthValue) {
|
||||
this.dieselGrowthValue = response.data.dieselGrowthValue;
|
||||
}
|
||||
if (response.data.naturalGrowthValue) {
|
||||
this.naturalGrowthValue = response.data.naturalGrowthValue;
|
||||
}
|
||||
if (response.data.isEnableLevel == "no") {
|
||||
this.level1 = true;
|
||||
this.level2 = false;
|
||||
} else {
|
||||
this.level1 = false;
|
||||
this.level2 = true;
|
||||
}
|
||||
}
|
||||
})
|
||||
// getSysConfig('is_enable_level').then(response => {
|
||||
@ -1116,7 +1118,7 @@ export default {
|
||||
// 查询连锁店配置信息
|
||||
getClearConfig(){
|
||||
getChainStoreConfig().then(response => {
|
||||
this.clear = response.data.levelClearRule;
|
||||
if (response.data) this.clear = response.data.levelClearRule;
|
||||
})
|
||||
},
|
||||
// 修改清算规则
|
||||
|
@ -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)
|
||||
|
@ -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 => {
|
||||
|
@ -277,8 +277,6 @@ public class CardFuelRecordServiceImpl implements CardFuelRecordService {
|
||||
@Autowired
|
||||
private RedisLock redisLock;
|
||||
|
||||
/*@Autowired
|
||||
private StaffCommissionService staffCommissionService;*/
|
||||
|
||||
private static String beforeLitres = new String("0");
|
||||
/**
|
||||
|
@ -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());
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
|
@ -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);
|
||||
|
||||
/**
|
||||
|
@ -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) {
|
||||
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
||||
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;
|
||||
}
|
||||
|
@ -48,17 +48,19 @@ public class MtUserGradeChildServiceImpl extends ServiceImpl<MtUserGradeChildMap
|
||||
LJUserVo userVo = userService.queryUserById(userId, storeId);
|
||||
LJStore store = storeService.selectStoreByStoreId(storeId);
|
||||
ChainStoreConfig chainStoreConfig = chainStoreConfigService.selectChainStoreById(store.getChainStoreId());
|
||||
String isEnableLevel = chainStoreConfig.getIsEnableLevel();
|
||||
if (isEnableLevel.equals("yes")){
|
||||
if (ObjectUtil.isNotEmpty(userVo.getGradeId())){
|
||||
LJUserGrade ljUserGrade = ljUserGradeService.selectUserGradeById(userVo.getGradeId());
|
||||
if (!ljUserGrade.getIfRechargeCoupon().equals("1")){
|
||||
return new ArrayList<MtUserGradeChild>();
|
||||
if (ObjectUtil.isNotEmpty(chainStoreConfig)) {
|
||||
String isEnableLevel = chainStoreConfig.getIsEnableLevel();
|
||||
if (isEnableLevel.equals("yes")) {
|
||||
if (ObjectUtil.isNotEmpty(userVo.getGradeId())) {
|
||||
LJUserGrade ljUserGrade = ljUserGradeService.selectUserGradeById(userVo.getGradeId());
|
||||
if (!ljUserGrade.getIfRechargeCoupon().equals("1")) {
|
||||
return new ArrayList<MtUserGradeChild>();
|
||||
}
|
||||
} else {
|
||||
QueryWrapper queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.eq("user_grade_id", userVo.getGradeId());
|
||||
return baseMapper.selectList(queryWrapper);
|
||||
}
|
||||
}else{
|
||||
QueryWrapper queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.eq("user_grade_id",userVo.getGradeId());
|
||||
return baseMapper.selectList(queryWrapper);
|
||||
}
|
||||
}
|
||||
return new ArrayList<MtUserGradeChild>();
|
||||
|
@ -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,20 +303,24 @@ 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);
|
||||
staff.setStaffCode("https://www.tuofeng.cc/oilRefuel?storeId="+storeId+"&staffId="+staff.getId());
|
||||
ljStaffMapper.updateById(staff);
|
||||
if (ObjectUtil.isNotEmpty(staff)) {
|
||||
staff.setStaffCode("https://www.tuofeng.cc/oilRefuel?storeId="+storeId+"&staffId="+staff.getId());
|
||||
ljStaffMapper.updateById(staff);
|
||||
|
||||
// LJStaff staff1 = ljStaffMapper.selectById(staff.getId());
|
||||
if (ObjectUtil.isNotEmpty(staff.getId())){
|
||||
editTAccount.setStaffId(staff.getId());
|
||||
updateAccount(editTAccount);
|
||||
if (ObjectUtil.isNotEmpty(staff.getId())){
|
||||
editTAccount.setStaffId(staff.getId());
|
||||
updateAccount(editTAccount);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -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/',
|
||||
|
||||
|
||||
|
||||
@ -32,4 +32,4 @@ module.exports = {
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
@ -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">
|
||||
@ -239,7 +238,7 @@
|
||||
// await this.getOilType();
|
||||
}
|
||||
await this.getTheJudgmentIsTheSame();
|
||||
}else{
|
||||
} else {
|
||||
await this.getUserAuthority();
|
||||
// await this.getOilType();
|
||||
await this.getTheJudgmentIsTheSame();
|
||||
@ -278,7 +277,7 @@
|
||||
method: 'get',
|
||||
}).then(res => {
|
||||
_this.list1 = res.data
|
||||
if (res.data.length>0){
|
||||
if (res.data.length > 0) {
|
||||
for (let i = 0; i < res.data.length; i++) {
|
||||
if (res.data[i].bannerUrl.includes("http")) {
|
||||
_this.list1[i].bannerUrl = res.data[i].bannerUrl
|
||||
@ -367,21 +366,21 @@
|
||||
uni.getSetting({
|
||||
async success(res) {
|
||||
if (!res.authSetting['scope.userLocation']) {
|
||||
// uni.authorize({
|
||||
// scope: 'scope.userLocation',
|
||||
// success() {
|
||||
// // 用户同意获取位置信息
|
||||
// // _this.isExistStoreId()
|
||||
// },
|
||||
// fail() {
|
||||
// // 用户拒绝
|
||||
// }
|
||||
// })
|
||||
await _this.getAddress(uni.getStorageSync("storeId"));
|
||||
// uni.authorize({
|
||||
// scope: 'scope.userLocation',
|
||||
// success() {
|
||||
// // 用户同意获取位置信息
|
||||
// // _this.isExistStoreId()
|
||||
// },
|
||||
// fail() {
|
||||
// // 用户拒绝
|
||||
// }
|
||||
// })
|
||||
await _this.getAddress(uni.getStorageSync("storeId"));
|
||||
} else {
|
||||
// 用户同意获取位置信息
|
||||
// _this.isExistStoreId()
|
||||
await _this.getAddress(uni.getStorageSync("storeId"));
|
||||
// 用户同意获取位置信息
|
||||
// _this.isExistStoreId()
|
||||
await _this.getAddress(uni.getStorageSync("storeId"));
|
||||
}
|
||||
},
|
||||
fail(err) {
|
||||
@ -391,7 +390,7 @@
|
||||
},
|
||||
// 判断token是否与当前连锁店id相同
|
||||
async getTheJudgmentIsTheSame() {
|
||||
console.log(this.AppToken,547);
|
||||
console.log(this.AppToken, 547);
|
||||
// 判断是否登录
|
||||
if (!this.AppToken) {
|
||||
return;
|
||||
@ -410,7 +409,7 @@
|
||||
|
||||
|
||||
// 判断当前登录的code是否相同
|
||||
if (uni.getStorageSync("appltType")== "WECHAT") {
|
||||
if (uni.getStorageSync("appltType") == "WECHAT") {
|
||||
wx.login({
|
||||
success(res) {
|
||||
if (res.code) {
|
||||
@ -433,7 +432,7 @@
|
||||
})
|
||||
}
|
||||
|
||||
if (uni.getStorageSync("appltType")== "ALIPAY") {
|
||||
if (uni.getStorageSync("appltType") == "ALIPAY") {
|
||||
my.getAuthCode({
|
||||
scopes: 'auth_base',
|
||||
success: res => {
|
||||
@ -447,7 +446,7 @@
|
||||
storeId: uni.getStorageSync("storeId"),
|
||||
},
|
||||
}).then((resp) => {
|
||||
console.log(resp,85412);
|
||||
console.log(resp, 85412);
|
||||
if (!resp.data) {
|
||||
uni.removeStorageSync("App-Token");
|
||||
}
|
||||
@ -518,11 +517,11 @@
|
||||
|
||||
},
|
||||
}).then((response) => {
|
||||
console.log(response,"2154");
|
||||
console.log(response, "2154");
|
||||
// uni.showToast({
|
||||
// title:"121984:"+storeId
|
||||
// })
|
||||
if (response.data.store){
|
||||
if (response.data.store) {
|
||||
_this.distance = (Math.ceil(response.data.distance))
|
||||
.toFixed(1)
|
||||
_this.store = response.data.store
|
||||
@ -546,14 +545,14 @@
|
||||
}
|
||||
|
||||
_this.lon = _this.store.longitude,
|
||||
_this.lat = _this.store.latitude,
|
||||
_this.lat = _this.store.latitude,
|
||||
|
||||
_this.getIndexBanner()
|
||||
_this.getIndexBanner()
|
||||
_this.getOilType();
|
||||
}else{
|
||||
} else {
|
||||
uni.showToast({
|
||||
title:"当前店铺已关闭!!!",
|
||||
icon:"none"
|
||||
title: "当前店铺已关闭!!!",
|
||||
icon: "none"
|
||||
})
|
||||
}
|
||||
|
||||
@ -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)
|
||||
|
||||
}
|
||||
})
|
||||
},
|
||||
@ -675,8 +675,8 @@
|
||||
uni.openLocation({
|
||||
latitude: lat,
|
||||
longitude: lon,
|
||||
name:this.store.name,
|
||||
address:this.store.address,
|
||||
name: this.store.name,
|
||||
address: this.store.address,
|
||||
|
||||
success: function() {
|
||||
console.log('success');
|
||||
@ -967,4 +967,4 @@
|
||||
color: white;
|
||||
margin: 0 auto;
|
||||
}
|
||||
</style>
|
||||
</style>
|
@ -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>
|
||||
|
@ -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: "囤油卡为必填项",
|
||||
@ -283,7 +314,7 @@
|
||||
},
|
||||
}).then(res => {
|
||||
if (res.code == 200) {
|
||||
console.log(res,_this.appltType)
|
||||
console.log(res, _this.appltType)
|
||||
if (_this.appltType == "WECHAT") {
|
||||
let payProvider = "wxpay"
|
||||
_this.orderInfo = JSON.parse(res.data.reservedPayInfo);
|
||||
@ -319,7 +350,7 @@
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
if (_this.appltType == "ALIPAY") {
|
||||
my.tradePay({
|
||||
tradeNO: res.data.reservedTransactionId
|
||||
@ -348,19 +379,13 @@
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
})
|
||||
},
|
||||
//储值卡充值
|
||||
addValueCarRecords() {
|
||||
if (this.staffId == '') {
|
||||
uni.showToast({
|
||||
title: "员工为必填项",
|
||||
icon: "error"
|
||||
})
|
||||
return
|
||||
}
|
||||
|
||||
if (this.carValueId == '') {
|
||||
uni.showToast({
|
||||
title: "储值卡为必填项",
|
||||
@ -369,7 +394,7 @@
|
||||
return
|
||||
}
|
||||
let _this = this
|
||||
|
||||
|
||||
request({
|
||||
url: 'business/marketingActivity/cardValueRecord',
|
||||
method: 'post',
|
||||
@ -380,11 +405,14 @@
|
||||
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) {
|
||||
|
||||
|
||||
if (_this.appltType == "WECHAT") {
|
||||
let payProvider = "wxpay"
|
||||
_this.orderInfo = JSON.parse(res.data.reservedPayInfo);
|
||||
@ -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>
|
Loading…
Reference in New Issue
Block a user