This commit is contained in:
zhaohengkun 2024-09-27 11:12:19 +08:00
commit f2a7cd7b1a
48 changed files with 1608 additions and 1341 deletions

View File

@ -11,7 +11,7 @@ VUE_APP_BASE_API = '/dev-api'
VUE_APP_PUBLIC_PATH = '/'
# 后端接口地址
VUE_APP_SERVER_URL = 'http://192.168.31.95:8080/'
VUE_APP_SERVER_URL = 'http://127.0.0.1:8080/'
# http://192.168.0.121:8080/

View File

@ -270,6 +270,22 @@
</div>
</el-form-item>
<el-form-item v-if="ruleForm.type == '5'" label="适用商品" prop="productLimit" style="width: 50%;">
<el-radio v-model="ruleForm.productLimit" label="1">不限</el-radio>
<el-radio v-model="ruleForm.productLimit" label="2">自定义</el-radio>
<el-select multiple v-if="ruleForm.productLimit == 2" v-model="ruleForm.productIdList" placeholder="请选择商品名称(可多选)" style="margin-left: 10px;width:300px">
<el-option
v-for="item in goodsList"
:key="item.id+''"
:label="item.name"
:value="item.id+''"></el-option>
</el-select>
<!-- </div>-->
<!-- </div>-->
</el-form-item>
<!-- 生效日期 effectiveDateStart 字段 -->
<el-form-item label="生效日期" required style="width: 50%;" v-if="ruleForm.timeType=='2'">
<el-date-picker
@ -459,6 +475,7 @@ import {
getqb,
getsk
} from "@/api/EventMarketing/giftBlock";
import {delLJGoods, listLJGoods} from "@/api/convenienceStore/ljgoods";
import imgUpload from "@/components/ImageUpload/index.vue"
import {getToken} from "@/utils/auth";
import imgUpload1 from "@/components/map/imgUpload.vue";
@ -505,68 +522,69 @@ export default {
onelist: [],
twolist: [],
threelist: [],
goodsList: [],
orderShow: false,
weekList: [
{
label: "周一",
value: "1"
value: "周一"
},
{
label: "周二",
value: "2"
value: "周二"
},
{
label: "周三",
value: "3"
value: "周三"
},
{
label: "周四",
value: "4"
value: "周四"
},
{
label: "周五",
value: "5"
value: "周五"
}, {
label: "周六",
value: "6"
value: "周六"
}, {
label: "周天",
value: "7"
value: "周天"
}
],
monthList: [
{
label: "每月1号",
value: "01"
value: "1"
},
{
label: "每月2号",
value: "02"
value: "2"
},
{
label: "每月3号",
value: "03"
value: "3"
},
{
label: "每月4号",
value: "04"
value: "4"
},
{
label: "每月5号",
value: "05"
value: "5"
}, {
label: "每月6号",
value: "06"
value: "6"
}, {
label: "每月7号",
value: "07"
value: "7"
}, {
label: "每月8号",
value: "08"
value: "8"
}, {
label: "每月9号",
value: "09"
value: "9"
}, {
label: "每月10号",
value: "10"
@ -703,6 +721,9 @@ export default {
oilNumberList: [],
oilNameList: [],
ruleForm: {
productIdList:[],
productIds:'',
productLimit:1,
oilLimit: '',
sySend: '',
timeType: '',
@ -746,6 +767,7 @@ export default {
this.getOilList()
this.getlist()
this.gettj()
this.getGoodsList()
},
components: {
@ -753,6 +775,11 @@ export default {
imgUpload,
},
methods: {
getGoodsList(){
listLJGoods({page:1,pageSize:10000,status:'qy',isRecovery:0}).then(response => {
this.goodsList = response.data.records;
});
},
sxCoupon(id) {
getCoupon(id).then(res => {
if (res.code == 200) {
@ -925,6 +952,7 @@ export default {
pageNo: 1,
pageSize: 10
}
this.goodsList = [];
this.getlist();
},
getlist() {
@ -1062,8 +1090,8 @@ export default {
if (this.ruleForm.oilNumber) {
this.ruleForm.oilNumber = this.ruleForm.oilNumber.toString()
}
let productIds = this.ruleForm.productIdList + ''
this.ruleForm.productIds = productIds
if (!this.ruleForm.id) {
addCardCoupon(this.ruleForm).then(res => {
@ -1071,6 +1099,7 @@ export default {
this.$message.success('添加成功');
this.gettj()
this.getlist()
this.centerDialogVisible = false
} else {
this.$message.error('操作失败请稍后再试');
}
@ -1083,6 +1112,7 @@ export default {
this.$message.success('修改成功');
this.gettj()
this.getlist()
this.centerDialogVisible = false
} else {
this.$message.error('操作失败请稍后再试');
}
@ -1092,7 +1122,6 @@ export default {
}
this.centerDialogVisible = false
}
}
}

View File

@ -11,11 +11,6 @@ VUE_APP_BASE_API = '/dev-api'
VUE_APP_PUBLIC_PATH = '/'
# 后端接口地址
VUE_APP_SERVER_URL = 'http://192.168.31.95:8080/'
VUE_APP_SERVER_URL = 'http://192.168.31.178:8080/'
# cp端地址
# VUE_PC_SERVER_URL = 'http://47.95.206.185:85/'

View File

@ -104,5 +104,15 @@ public class FleetInfoController extends BaseController {
public ResponseObject addFleetInfo(@RequestBody FleetInfo fleetInfo) {
return getSuccessResult(fleetInfoService.addFleetInfo(fleetInfo));
}
/**
* 根据车队id查询车队信息
* @param fleetId
* @return
*/
@GetMapping("/getFleetInfoByFleetId")
public ResponseObject getFleetInfoByFleetId(@Param("fleetId")Integer fleetId){
return getSuccessResult(fleetInfoService.queryByFleetId(fleetId));
}
}

View File

@ -196,5 +196,14 @@ public class FleetMemberController extends BaseController {
}
return getSuccessResult(map);
}
/**
* 额度调整小程序
* @return
*/
@PutMapping("editLimit")
public ResponseObject editLimit(@RequestBody FleetMember fleetMember){
return getSuccessResult(fleetMemberService.editLimit(fleetMember));
}
}

View File

@ -75,4 +75,6 @@ public interface FleetInfoService {
* @return
*/
int addFleetInfo(FleetInfo fleetInfo);
FleetInfoUniVo queryByFleetId(Integer fleetId);
}

View File

@ -80,4 +80,11 @@ public interface FleetMemberService {
* @return
*/
int logOffFleetMember(Integer id);
/**
* 额度调整
* @param fleetMember
* @return
*/
int editLimit(FleetMember fleetMember);
}

View File

@ -231,7 +231,8 @@ public class FleetInfoServiceImpl extends ServiceImpl<FleetInfoMapper,FleetInfo>
//获取所在车队的id集合
List<Integer> fleetIds = fleetMembers.stream().map(FleetMember::getFleetId).collect(Collectors.toList());
if (CollUtil.isEmpty(fleetIds)) {
throw new RuntimeException("未绑定车队");
// throw new RuntimeException("未绑定车队");
return null;
}
List<FleetInfo> fleetInfos = baseMapper.selectList(new LambdaQueryWrapper<FleetInfo>()
@ -295,6 +296,29 @@ public class FleetInfoServiceImpl extends ServiceImpl<FleetInfoMapper,FleetInfo>
}
}
@Override
public FleetInfoUniVo queryByFleetId(Integer fleetId) {
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
//查询当前登录人的车队信息
FleetMember fleetMembers = fleetMemberMapper.selectOne(new LambdaQueryWrapper<FleetMember>()
.eq(FleetMember::getFleetId, fleetId)
.eq(FleetMember::getUserId, nowAccountInfo.getId()));
//获取所在车队的id集合
// List<Integer> fleetIds = fleetMembers.stream().map(FleetMember::getFleetId).collect(Collectors.toList());
if (ObjectUtil.isEmpty(fleetMembers)) {
throw new RuntimeException("未绑定该车队");
}
FleetInfo fleetInfo = baseMapper.selectOne(new LambdaQueryWrapper<FleetInfo>()
.eq(FleetInfo::getId, fleetId));
FleetInfoUniVo fleetInfoUniVo = BeanUtil.copyProperties(fleetInfo, FleetInfoUniVo.class);
fleetInfoUniVo.setStoreName(mtStoreMapper.selectById(fleetInfo.getStoreId()).getName());
return fleetInfoUniVo;
}
/**
* 创建用户的基础信息

View File

@ -12,6 +12,7 @@ import com.fuint.business.fleet.entity.FleetMember;
import com.fuint.business.fleet.mapper.FleetMemberMapper;
import com.fuint.business.fleet.service.FleetInfoService;
import com.fuint.business.fleet.service.FleetMemberService;
import com.fuint.business.fleet.vo.FleetInfoUniVo;
import com.fuint.business.fleet.vo.FleetMemberVo;
import com.fuint.business.storeInformation.entity.LJStore;
import com.fuint.business.storeInformation.service.ILJStoreService;
@ -70,7 +71,13 @@ public class FleetMemberServiceImpl extends ServiceImpl<FleetMemberMapper,FleetM
}
@Override
public IPage<FleetMemberVo> queryPageByNameOrMobile(Page page, FleetMemberVo fleetMember) {
// AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
FleetMember fleetMember1 = baseMapper.selectOne(new LambdaQueryWrapper<FleetMember>()
.eq(FleetMember::getFleetId, fleetMember.getFleetId())
.eq(FleetMember::getUserId, nowAccountInfo.getId()));
if (ObjectUtil.isEmpty(fleetMember1)){
throw new RuntimeException("未绑定该车队,无法查看当前车队成员信息");
}
return baseMapper.queryPageByNameOrMobile(page,fleetMember);
}
@ -102,7 +109,11 @@ public class FleetMemberServiceImpl extends ServiceImpl<FleetMemberMapper,FleetM
@Override
public int insert(FleetMember fleetMember) {
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
// FleetMember fleetMember1 = queryByMobile(fleetMember.getMobile());
//判断当前用户是否是车队负责人
FleetInfoUniVo fleetInfoUniVo = fleetInfoService.queryByFleetId(fleetMember.getFleetId());
if (ObjectUtil.isNotEmpty(fleetInfoUniVo) && (fleetInfoUniVo.getUserId() != nowAccountInfo.getId())){
throw new RuntimeException("请由车队负责人进行此操作");
}
//判断用户是否存在选择的车队
FleetMember fleetMember2 = baseMapper.selectOne(new LambdaQueryWrapper<FleetMember>()
.eq(FleetMember::getMobile, fleetMember.getMobile())
@ -115,7 +126,7 @@ public class FleetMemberServiceImpl extends ServiceImpl<FleetMemberMapper,FleetM
// return 0;
// }
// LJUserVo user = userService.selectUserByMobileAndChantStoreId(fleetMember.getMobile());
//判断当前车队负责人是否存在账号
//判断当前车队成员否存在账号
MtUser mtUser = mtUserMapper.selectOne(new LambdaQueryWrapper<MtUser>()
.eq(MtUser::getMobile, fleetMember.getMobile())
.last("limit 1"));
@ -201,6 +212,18 @@ public class FleetMemberServiceImpl extends ServiceImpl<FleetMemberMapper,FleetM
return baseMapper.updateById(fleetMember);
}
/**
* 额度调整
*
* @param fleetMember
* @return
*/
@Override
public int editLimit(FleetMember fleetMember) {
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
return 0;
}
/**
* 创建用户的基础信息
*/

View File

@ -96,6 +96,16 @@ public class IntegralSettings extends BaseEntity {
*/
private Integer chainStoreId;
/**
* 适用规则 0-无限制 1-有限制
*/
private Integer signApplicableRules;
/**
* 签到周期 0-一周 1-两周 2-一个月 只有适用规则为1时有值
*/
private Integer signCycle;
}

View File

@ -350,52 +350,68 @@ public class IntegralSettingsServiceImpl implements IntegralSettingsService {
LambdaQueryWrapper<IntegralSettings> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.eq(IntegralSettings::getStoreId, storeId);
IntegralSettings integralSettings = integralSettingsMapper.selectOne(queryWrapper);
JSONArray jsonArray = JSONArray.parseArray(integralSettings.getPointsObtained());
IntegralSettingsVo integralSettingsVo = new IntegralSettingsVo();
List<IntegralSettingsBo> integralSettingsList = new ArrayList<>();
for (int i = 0; i < jsonArray.size(); i++) {
String day = jsonArray.getJSONObject(i).get("day").toString();
Integer points = Integer.parseInt(jsonArray.getJSONObject(i).get("integral").toString());
IntegralSettingsBo integralSettings1 = new IntegralSettingsBo();
integralSettings1.setIntegralName(day);
integralSettings1.setIntegral(points);
integralSettingsList.add(integralSettings1);
}
integralSettingsVo.setIntegralSettings(integralSettingsList);
if (ObjectUtil.isNotEmpty(integralSettings)) {
JSONArray jsonArray = JSONArray.parseArray(integralSettings.getPointsObtained());
if (ObjectUtil.isNotEmpty(integralSettings.getSignApplicableRules()) && integralSettings.getSignApplicableRules() == 0) {
int length = 30;
for (int i = 0; i < length; i++) {
IntegralSettingsBo integralSettings1 = new IntegralSettingsBo();
if (ObjectUtil.isNotEmpty(jsonArray.getJSONObject(0))) {
Integer points = Integer.parseInt(jsonArray.getJSONObject(0).get("integral").toString());
integralSettings1.setIntegral(points);
}
integralSettings1.setIntegralName("" + i + 1 + "");
integralSettingsList.add(integralSettings1);
}
}else if (ObjectUtil.isNotEmpty(integralSettings.getSignApplicableRules()) && integralSettings.getSignApplicableRules() == 1) {
for (int i = 0; i < jsonArray.size(); i++) {
String day = jsonArray.getJSONObject(i).get("day").toString();
Integer points = Integer.parseInt(jsonArray.getJSONObject(i).get("integral").toString());
IntegralSettingsBo integralSettings1 = new IntegralSettingsBo();
// integralSettings1.setIntegralName(day);
integralSettings1.setIntegralName("" +( i + 1 )+ "");
integralSettings1.setIntegral(points);
integralSettingsList.add(integralSettings1);
}
integralSettingsVo.setIntegralSettings(integralSettingsList);
}
DateTime now = DateUtil.date();
DateTime yesterDay = DateUtil.offsetDay(now, -1);
//查询连续签到天数
IntegralDetail integralDetail = integralDetailMapper.selectOne(new LambdaQueryWrapper<IntegralDetail>()
.eq(IntegralDetail::getUserId, nowAccountInfo.getId())
.eq(IntegralDetail::getStoreId, storeId)
.eq(IntegralDetail::getType, "签到赠送")
.between(IntegralDetail::getCreateTime, DateUtil.beginOfDay(yesterDay), now)
.orderBy(true, false, IntegralDetail::getCreateTime).last("limit 1"));
DateTime now = DateUtil.date();
DateTime yesterDay = DateUtil.offsetDay(now, -1);
//查询连续签到天数
IntegralDetail integralDetail = integralDetailMapper.selectOne(new LambdaQueryWrapper<IntegralDetail>()
.eq(IntegralDetail::getUserId, nowAccountInfo.getId())
.eq(IntegralDetail::getStoreId, storeId)
.eq(IntegralDetail::getType, "签到赠送")
.between(IntegralDetail::getCreateTime, DateUtil.beginOfDay(yesterDay), now)
.orderBy(true, false, IntegralDetail::getCreateTime).last("limit 1"));
// if (CollUtil.isNotEmpty(day)) {
// IntegralDetail integralDetail = day.get(0);
if (ObjectUtil.isNotEmpty(integralDetail)) {
// 正则表达式匹配数字
Pattern pattern = Pattern.compile("\\d+");
Matcher matcher = pattern.matcher(integralDetail.getChangeReason());
StringBuilder numbers = new StringBuilder();
numbers.append(0);
while (matcher.find()) {
numbers.append(matcher.group());
}
if (StrUtil.isEmpty(numbers)) {
integralSettingsVo.setSignInDays("0");
}
String str = numbers.toString();
if (Integer.parseInt(str) >= 10) {
numbers.deleteCharAt(0);
}
integralSettingsVo.setSignInDays(numbers.toString());
}else {
if (ObjectUtil.isNotEmpty(integralDetail)) {
// 正则表达式匹配数字
Pattern pattern = Pattern.compile("\\d+");
Matcher matcher = pattern.matcher(integralDetail.getChangeReason());
StringBuilder numbers = new StringBuilder();
numbers.append(0);
while (matcher.find()) {
numbers.append(matcher.group());
}
if (StrUtil.isEmpty(numbers)) {
integralSettingsVo.setSignInDays("0");
}
String str = numbers.toString();
if (Integer.parseInt(str) >= 10) {
numbers.deleteCharAt(0);
}
integralSettingsVo.setSignInDays(numbers.toString());
} else {
integralSettingsVo.setSignInDays("0");
}
// }
}
return integralSettingsVo;
}

View File

@ -1,7 +1,8 @@
package com.fuint.business.marketingActivity.cardCoupon.controller;
import cn.hutool.core.util.ObjectUtil;
import cn.hutool.core.util.StrUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.api.ApiController;
@ -9,16 +10,23 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.fuint.business.marketingActivity.cardCoupon.entity.CardCoupon;
import com.fuint.business.marketingActivity.cardCoupon.service.CardCouponService;
import com.fuint.business.marketingActivity.cardGiftActive.entity.CardGiftActive;
import com.fuint.business.petrolStationManagement.entity.OilName;
import com.fuint.business.petrolStationManagement.service.OilNameService;
import com.fuint.common.dto.AccountInfo;
import com.fuint.common.util.StringUtils;
import com.fuint.common.util.TokenUtil;
import com.fuint.framework.web.BaseController;
import com.fuint.framework.web.ResponseObject;
import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.stream.Collectors;
/**
* 油站优惠卷表2024(CardCoupon)表控制层
@ -35,6 +43,9 @@ public class CardCouponController extends BaseController {
@Resource
private CardCouponService cardCouponService;
@Autowired
private OilNameService OilNameService;
/**
* 分页查询所有数据
*
@ -42,8 +53,8 @@ public class CardCouponController extends BaseController {
* @return 所有数据
*/
@GetMapping
public ResponseObject selectAll(@RequestParam(value = "pageNo",defaultValue = "1") Integer pageNo,
@RequestParam(value = "pageSize",defaultValue = "10") Integer pageSize, @Param("cardCoupon") CardCoupon cardCoupon) {
public ResponseObject selectAll(@RequestParam(value = "pageNo", defaultValue = "1") Integer pageNo,
@RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize, @Param("cardCoupon") CardCoupon cardCoupon) {
Page page = new Page(pageNo, pageSize);
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
cardCoupon.setStoreId(nowAccountInfo.getStoreId());
@ -59,7 +70,44 @@ public class CardCouponController extends BaseController {
*/
@GetMapping("{id}")
public ResponseObject selectOne(@PathVariable Serializable id) {
return getSuccessResult(this.cardCouponService.getById(id));
CardCoupon cardCoupon = cardCouponService.getById(id);
if (StringUtils.isNotEmpty(cardCoupon.getProductIds())) {
String[] array = cardCoupon.getProductIds().split(",");
// 转换为列表
List<String> list = Arrays.asList(array);
cardCoupon.setProductIdList(list);
}
String oilNumber = cardCoupon.getOilNumber();
List<String> hxList = new ArrayList<>();
//判断是否可以与其他优惠券使用
if (ObjectUtil.isNotEmpty(cardCoupon.getUseWithOther())){
if ("1".equals(cardCoupon.getUseWithOther())){
hxList.add("可以与其他优惠券一起使用");
}else {
hxList.add("不可与其他优惠券一起使用");
}
}
//以逗号隔开
if (StrUtil.isNotEmpty(oilNumber)) {
String[] split = oilNumber.split(",");
List<String> list = Arrays.asList(split);
//转成integer集合
List<Integer> ids = list.stream().map(Integer::parseInt).collect(Collectors.toList());
List<OilName> oilNames = OilNameService.selectOilNameList(ids);
StringBuilder stringBuilder = new StringBuilder();
stringBuilder.append("以下油品油号可用:");
for (int i = 0; i < oilNames.size(); i++) {
if (i < oilNames.size() - 1) {
stringBuilder.append(oilNames.get(i).getOilName()).append("");
} else {
stringBuilder.append(oilNames.get(i).getOilName());
}
}
hxList.add(stringBuilder.toString());
}
cardCoupon.setHxList(hxList);
//获取支付方式
return getSuccessResult(cardCoupon);
}
/**
@ -73,10 +121,10 @@ public class CardCouponController extends BaseController {
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
//判断活动编号是否存在
LambdaQueryWrapper<CardCoupon> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.eq(CardCoupon::getNumber,cardCoupon.getNumber())
.eq(CardCoupon::getStoreId,nowAccountInfo.getStoreId());
queryWrapper.eq(CardCoupon::getNumber, cardCoupon.getNumber())
.eq(CardCoupon::getStoreId, nowAccountInfo.getStoreId());
int count = cardCouponService.count(queryWrapper);
if (count>0){
if (count > 0) {
return getFailureResult("编号已存在");
}
cardCoupon.setStoreId(nowAccountInfo.getStoreId());
@ -95,11 +143,11 @@ public class CardCouponController extends BaseController {
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
//判断活动编号是否存在
LambdaQueryWrapper<CardCoupon> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.eq(CardCoupon::getNumber,cardCoupon.getNumber())
.ne(CardCoupon::getId,cardCoupon.getId())
.eq(CardCoupon::getStoreId,nowAccountInfo.getStoreId());
queryWrapper.eq(CardCoupon::getNumber, cardCoupon.getNumber())
.ne(CardCoupon::getId, cardCoupon.getId())
.eq(CardCoupon::getStoreId, nowAccountInfo.getStoreId());
int count = cardCouponService.count(queryWrapper);
if (count>0){
if (count > 0) {
return getFailureResult("编号已存在");
}
return getSuccessResult(this.cardCouponService.updateById(cardCoupon));
@ -129,6 +177,7 @@ public class CardCouponController extends BaseController {
/**
* 上下架
*
* @param id
* @return
*/
@ -139,17 +188,23 @@ public class CardCouponController extends BaseController {
/**
* 分页查询可领取优惠券uniapp使用
*
* @param pageNo
* @param pageSize
* @param cardCoupon
* @return
*/
@GetMapping("/queryByPageAndStoreId")
public ResponseObject selectAllByPageAndStoreId(@RequestParam(value = "pageNo",defaultValue = "1") Integer pageNo,
@RequestParam(value = "pageSize",defaultValue = "10") Integer pageSize, @Param("cardCoupon") CardCoupon cardCoupon) {
public ResponseObject selectAllByPageAndStoreId(@RequestParam(value = "pageNo", defaultValue = "1") Integer pageNo,
@RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize, @Param("cardCoupon") CardCoupon cardCoupon) {
Page page = new Page(pageNo, pageSize);
return getSuccessResult(this.cardCouponService.selectAllByPageAndStoreId(page, cardCoupon));
}
@GetMapping("getCouponOne")
public ResponseObject getCouponOne(Integer id) {
return getSuccessResult(cardCouponService.getCouponOne(id));
}
}

View File

@ -13,6 +13,7 @@ import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;
import java.io.Serializable;
import java.util.List;
/**
* 油站优惠卷表2024(CardCoupon)表实体类
@ -138,6 +139,10 @@ public class CardCoupon extends Model<CardCoupon> {
//当次获取数量
@TableField(exist = false)
private Integer giftCardTotal;
@TableField(exist = false)
private List<String> productIdList;
@TableField(exist = false)
private List<String> hxList;
}

View File

@ -21,5 +21,13 @@ public interface CardCouponMapper extends BaseMapper<CardCoupon> {
IPage<CardCoupon> pageVo(Page page, @Param("cardCoupon") CardCoupon cardCoupon);
IPage<CardCouponUniVo> selectAllByPageAndStoreId(Page page, @Param("cardCoupon")CardCoupon cardCoupon);
IPage<CardCouponUniVo> selectAllByPageAndIds(Page page,@Param("ids") List<Integer> ids);
/**
* 根据店铺id查询优惠券今日领取数量
* @param cardCouponUniVos
* @return
*/
List<CardCouponUniVo> selectByStoreIdCount(CardCouponUniVo cardCouponUniVos);
}

View File

@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.fuint.business.marketingActivity.cardCoupon.entity.CardCouponUser;
import com.fuint.business.marketingActivity.cardCoupon.vo.CardCouponUniVo;
import com.fuint.business.marketingActivity.cardCoupon.vo.CardCouponUserVo;
import com.fuint.business.marketingActivity.cardCoupon.vo.CardCouponVO;
import org.apache.ibatis.annotations.Mapper;
@ -11,6 +12,7 @@ import org.apache.ibatis.annotations.Param;
import java.util.Date;
import java.util.List;
import java.util.Map;
/**
* 用户优惠卷表2024(CardCouponUser)表数据库访问层
@ -38,5 +40,7 @@ public interface CardCouponUserMapper extends BaseMapper<CardCouponUser> {
* @return
*/
IPage<CardCouponUserVo> queryPage(Page page,@Param("entity") CardCouponUserVo cardCouponUserVo);
List<CardCouponUniVo> selectCouponCount(@Param("storeId") Integer storeId,@Param("userId") Integer userId);
}

View File

@ -31,7 +31,7 @@
resultType="com.fuint.business.marketingActivity.cardCoupon.vo.CardCouponUniVo">
SELECT
cc.*,
mt.NAME AS typeName,
mt.NAME AS storeName,
CASE
cc.type
WHEN 1 THEN
@ -44,7 +44,7 @@
'油品立减券'
WHEN 5 THEN
'单品代金券'
END AS statusName
END AS typeName
FROM
card_coupon cc
LEFT JOIN mt_store mt ON mt.id = cc.store_id
@ -66,5 +66,46 @@
</if>
</where>
</select>
<select id="selectByStoreIdCount"
resultType="com.fuint.business.marketingActivity.cardCoupon.vo.CardCouponUniVo">
select cc.id id, count(cu.id) count
from card_coupon cc
left join card_coupon_user as cu on cc.id = cu.card_coupon_id
<where>
cc.store_id = #{storeId}
<if test="startTime!=null and startTime!=''">
and cu.create_time between #{startTime} and #{endTime}
</if>
</where>
group by cc.id
</select>
<select id="selectAllByPageAndIds"
resultType="com.fuint.business.marketingActivity.cardCoupon.vo.CardCouponUniVo">
SELECT
cc.*,
mt.NAME AS storeName,
CASE
cc.type
WHEN 1 THEN
'代金券'
WHEN 2 THEN
'兑换券'
WHEN 3 THEN
'折扣券'
WHEN 4 THEN
'油品立减券'
WHEN 5 THEN
'单品代金券'
END AS typeName
FROM
card_coupon cc
LEFT JOIN mt_store mt ON mt.id = cc.store_id
<where>
cc.id in
<foreach collection="ids" item="id" open="(" separator="," close=")">
#{id}
</foreach>
</where>
</select>
</mapper>

View File

@ -29,4 +29,12 @@
</if>
</where>
</select>
<select id="selectCouponCount" resultType="com.fuint.business.marketingActivity.cardCoupon.vo.CardCouponUniVo">
SELECT
card_coupon_id id,
count(1) count
FROM card_coupon_user
WHERE store_id = #{storeId} AND mt_user_id = #{userId}
group by card_coupon_id
</select>
</mapper>

View File

@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.fuint.business.marketingActivity.cardCoupon.entity.CardCoupon;
import com.fuint.business.marketingActivity.cardCoupon.vo.CardCouponUniVo;
/**
* 油站优惠卷表2024(CardCoupon)表服务接口
@ -22,5 +23,12 @@ public interface CardCouponService extends IService<CardCoupon> {
int isOnLine(Integer id);
IPage selectAllByPageAndStoreId(Page page, CardCoupon cardCoupon);
/**
* 卡券详情小程序
* @param id
* @return
*/
CardCouponUniVo getCouponOne(Integer id);
}

View File

@ -1,16 +1,23 @@
package com.fuint.business.marketingActivity.cardCoupon.service.impl;
import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.date.DateTime;
import cn.hutool.core.date.DateUtil;
import cn.hutool.core.util.ObjectUtil;
import cn.hutool.core.util.StrUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.fuint.business.marketingActivity.cardCoupon.entity.CardCoupon;
import com.fuint.business.marketingActivity.cardCoupon.mapper.CardCouponMapper;
import com.fuint.business.marketingActivity.cardCoupon.mapper.CardCouponUserMapper;
import com.fuint.business.marketingActivity.cardCoupon.service.CardCouponService;
import com.fuint.business.marketingActivity.cardCoupon.vo.CardCouponUniVo;
import com.fuint.business.marketingActivity.cardCoupon.vo.CardCouponVO;
import com.fuint.business.petrolStationManagement.entity.OilName;
import com.fuint.business.petrolStationManagement.mapper.OilNameMapper;
import com.fuint.business.store.entity.MtStore;
import com.fuint.business.store.mapper.MtStoreMapper;
import com.fuint.common.dto.AccountInfo;
@ -19,7 +26,10 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
/**
* 油站优惠卷表2024(CardCoupon)表服务实现类
@ -32,6 +42,12 @@ public class CardCouponServiceImpl extends ServiceImpl<CardCouponMapper, CardCou
@Autowired
private MtStoreMapper mtStoreMapper;
@Autowired
private CardCouponUserMapper cardCouponUserMapper;
@Autowired
private OilNameMapper oilNameMapper;
@Override
public IPage<CardCoupon> pageVo(Page page, CardCoupon cardCoupon) {
return baseMapper.pageVo( page, cardCoupon);
@ -49,24 +65,87 @@ public class CardCouponServiceImpl extends ServiceImpl<CardCouponMapper, CardCou
@Override
public IPage selectAllByPageAndStoreId(Page page, CardCoupon cardCoupon) {
//获取今天开始与结束时间
DateTime now = DateUtil.date();
DateTime startTime = DateUtil.beginOfDay(now);
DateTime endTime = DateUtil.endOfDay(now);
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
//首先查询该店铺所有的优惠券
cardCoupon.setPutType("2");
cardCoupon.setStatus("1");
IPage<CardCouponUniVo> cardCouponUniVos = baseMapper.selectAllByPageAndStoreId(page, cardCoupon);
List<CardCouponUniVo> cardCouponVos = new ArrayList<>();
//用户拥有的优惠券以及数量
List<CardCouponUniVo> list= cardCouponUserMapper.selectCouponCount(cardCoupon.getStoreId(), nowAccountInfo.getId());
Map<Integer, Integer> map = list.stream().collect(Collectors.toMap(CardCouponUniVo::getId, CardCouponUniVo::getCount));
CardCouponUniVo cardCouponUniVo1 = new CardCouponUniVo();
cardCouponUniVo1.setStoreId(cardCoupon.getStoreId());
cardCouponUniVo1.setStartTime(startTime.toString());
cardCouponUniVo1.setEndTime(endTime.toString());
//根据店铺id查询优惠券今日领取数量
List<CardCouponUniVo> cardCouponUniVos1 = baseMapper.selectByStoreIdCount(cardCouponUniVo1);
Map<Integer, Integer> cardCouponMap = cardCouponUniVos1.stream().collect(Collectors.toMap(CardCouponUniVo::getId, CardCouponUniVo::getCount));
//存放最终可领取的优惠券id集合
List<Integer> ids = new ArrayList<>();
//循环店铺优惠券
for (CardCouponUniVo coupon : cardCouponUniVos.getRecords()) {
//查询该优惠券是否已到达限制数量
if (coupon.getTfGetNum() < coupon.getTfTotal()){
CardCouponUniVo cardCouponUniVo = BeanUtil.copyProperties(coupon, CardCouponUniVo.class);
//计算领取的比例
double scale = (coupon.getTfGetNum() * 1.0 / coupon.getTfTotal()) * 100;
cardCouponUniVo.setScale(scale + "%");
if ((coupon.getTfGetNum() < coupon.getTfTotal())) {
Integer count = 0;
if (ObjectUtil.isNotEmpty(cardCouponMap.get(coupon.getId()))){
count = cardCouponMap.get(coupon.getId());
}
if (count < coupon.getDayGetLimit()) {
Integer getNumLimit = coupon.getGetNumLimit();
Integer userCount = 0;
if (ObjectUtil.isNotEmpty(map.get(coupon.getId()))){
userCount = map.get(coupon.getId());
}
if (userCount < getNumLimit) {
//查询当前用户所拥有的优惠券数量
ids.add(coupon.getId());
}
}
}
}
return cardCouponUniVos;
IPage<CardCouponUniVo> cardCouponUniVoIPage = new Page<>(page.getCurrent(), page.getSize());
if (CollUtil.isNotEmpty(ids)) {
cardCouponUniVoIPage = baseMapper.selectAllByPageAndIds(page, ids);
cardCouponUniVoIPage.getRecords().stream().forEach(coupon -> extracted(coupon));
}
return cardCouponUniVoIPage;
}
/**
* 卡券详情小程序
*
* @param id
* @return
*/
@Override
public CardCouponUniVo getCouponOne(Integer id) {
CardCoupon cardCoupon = baseMapper.selectById(id);
CardCouponUniVo cardCouponUniVo = BeanUtil.copyProperties(cardCoupon, CardCouponUniVo.class);
String oilNumber = cardCouponUniVo.getOilNumber();
//以逗号隔开
if (StrUtil.isNotEmpty(oilNumber)) {
String[] split = oilNumber.split(",");
List<String> list = Arrays.asList(split);
//转成integer集合
List<Integer> ids = list.stream().map(Integer::parseInt).collect(Collectors.toList());
List<OilName> oilNames = oilNameMapper.selectList(new LambdaQueryWrapper<OilName>()
.in(OilName::getId, ids));
}
return null;
}
private static void extracted(CardCouponUniVo coupon) {
//计算领取的比例
double scale = (coupon.getTfGetNum() * 1.0 / coupon.getTfTotal()) * 100;
coupon.setScale(scale + "%");
}
}

View File

@ -1,5 +1,7 @@
package com.fuint.business.marketingActivity.cardCoupon.vo;
import cn.hutool.core.date.DateTime;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fuint.business.marketingActivity.cardCoupon.entity.CardCoupon;
import lombok.Data;
@ -11,4 +13,12 @@ public class CardCouponUniVo extends CardCoupon {
private String scale;
//兑换券类型
private String typeName;
private Integer count;
@JsonIgnore
private String startTime;
@JsonIgnore
private String endTime;
}

View File

@ -32,6 +32,13 @@ public interface OilNameService extends IService<OilName> {
*/
public OilName selectOilNameById(int id);
/**
* 根据ids查询油号信息
* @param ids
* @return
*/
public List<OilName> selectOilNameList(List<Integer> ids);
/**
* 根据油品名称查询油号信息
* @param oilName

View File

@ -2,6 +2,7 @@ package com.fuint.business.petrolStationManagement.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
@ -45,6 +46,19 @@ public class OilNameServiceImpl extends ServiceImpl<OilNameMapper, OilName> impl
return oilName;
}
/**
* 根据ids查询油号信息
*
* @param ids
* @return
*/
@Override
public List<OilName> selectOilNameList(List<Integer> ids) {
List<OilName> oilNames = baseMapper.selectList(new LambdaQueryWrapper<OilName>()
.in(OilName::getId, ids));
return oilNames;
}
@Override
public OilName selectOilNameByOilName(String oilName) {
QueryWrapper queryWrapper = new QueryWrapper<>();

View File

@ -135,6 +135,16 @@ public class LJStoreController extends BaseController {
return getSuccessResult(storeService.selectListDepts(page,storeVo));
}
/**
* 根据店铺id查询连锁店下面所有商铺信息(小程序)
* @param chainStoreId
* @return
*/
@GetMapping("selectByStoreId")
public ResponseObject selectByStoreId(Integer chainStoreId){
return getSuccessResult(storeService.selectByStoreId(chainStoreId));
}
// /**
// * 修改等级规则信息
// * @param map

View File

@ -6,6 +6,7 @@ import com.fuint.business.storeInformation.entity.LJStore;
import com.fuint.business.storeInformation.vo.LjStoreVo;
import io.swagger.models.auth.In;
import org.apache.ibatis.annotations.Param;
import org.springframework.web.bind.annotation.GetMapping;
import java.util.List;
import java.util.Map;
@ -92,4 +93,11 @@ public interface ILJStoreService extends IService<LJStore> {
* @return
*/
IPage<LjStoreVo> selectListDepts(IPage page, LjStoreVo storeVo);
/**
* 根据店铺id查询连锁店下面所有商铺
* @param chainStoreId
* @return
*/
List<LJStore> selectByStoreId(Integer chainStoreId);
}

View File

@ -1,6 +1,7 @@
package com.fuint.business.storeInformation.service.impl;
import cn.hutool.core.util.ObjectUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
@ -376,4 +377,17 @@ public class LJStoreServiceImpl extends ServiceImpl<LJStoreMapper, LJStore> impl
}
return ljStoreVoIPage;
}
/**
* 根据店铺id查询连锁店下面所有商铺
*
* @param chainStoreId
* @return
*/
@Override
public List<LJStore> selectByStoreId(Integer chainStoreId) {
List<LJStore> ljStores = baseMapper.selectList(new LambdaQueryWrapper<LJStore>()
.eq(LJStore::getChainStoreId, chainStoreId));
return ljStores;
}
}

View File

@ -68,6 +68,8 @@ public class PayCenterServiceImpl implements PayCenterService {
**/
@Override
public Object getActivity(Map<String, String> map) {
//实际会收钱的支付方式
List<String> canUsePayWays = Arrays.asList("ALIPAY","WECHAT","UNIONPAY","CASH");
/*1.先把所有用到的值取出来 */
//当前时间从点击结算的这一刻算
Date nowDate = new Date();
@ -103,6 +105,10 @@ public class PayCenterServiceImpl implements PayCenterService {
String payWay = map.get("payWay");
/*2.查询所有可参加的营销活动 */
List<ActivityVO> actList = new ArrayList<>();
if(!canUsePayWays.contains(payWay)){
//所选支付方式不符合活动参与条件
return actList;
}
try {
//2.1 查可参加的分时优惠和限时特价
actList.addAll(this.getFenshiAndTejiaAct(nowDate,userId,gradeId,storeId,labelIdList,oilAmount,oilLiter,oilId,oilPrice,payWay));
@ -351,6 +357,8 @@ public class PayCenterServiceImpl implements PayCenterService {
**/
@Override
public Object getCoupon(Map<String, String> map){
//实际会收钱的支付方式
List<String> canUsePayWays = Arrays.asList("ALIPAY","WECHAT","UNIONPAY","CASH");
/*1.先把所有用到的值取出来 */
//当前时间从点击结算的这一刻算
Date nowDate = new Date();
@ -364,6 +372,12 @@ public class PayCenterServiceImpl implements PayCenterService {
Double oilAmount = Double.valueOf(map.getOrDefault("oilAmount","0"));
//油升数
Double oilLiter = Double.valueOf(map.getOrDefault("oilLiter","0"));
//支付方式
String payWay = map.get("payWay");
if("after_pay".equals(payWay)){
//挂账不可以用优惠券
return new ArrayList<>();
}
//选择的商品
List<GoodsVO> goodsList = new ArrayList<>();
String goodsStr = map.getOrDefault("goods","");
@ -401,6 +415,10 @@ public class PayCenterServiceImpl implements PayCenterService {
List<CouponVO> rtnList = new ArrayList<>();
if(!filteredList.isEmpty()){
for(CardCouponVO rule:filteredList){
if("0".equals(rule.getUseWithOther()) && !canUsePayWays.contains(payWay)){
//不可以与其他优惠同时用且支付方式不是 实际付钱的跳过
break;
}
CouponVO couponVO = new CouponVO();
couponVO.setId(rule.getDataId());
couponVO.setCouponId(rule.getId());

View File

@ -164,11 +164,11 @@ public class CheckUtil {
nowWeek =7;
}
if(timeSlotList.contains(nowWeek)){
//周几是符合的返回不可用
return false;
}else{
//周几是不符合的进而判断时间是否符合
//周几是符合的再判断时间是否符合
return checkDayTimeReverse(nowDate,startTime,endTime);
}else{
//周几是不符合的直接可用
return true;
}
}else{
//活动设置的适用时间类型是每月
@ -337,23 +337,37 @@ public class CheckUtil {
* @return java.lang.Boolean
**/
public Boolean checkGoodsCoupon(CardCouponVO couponVO, List<GoodsVO> goodsList){
if("5".equals(couponVO.getType()) || goodsList.isEmpty()){
if("5".equals(couponVO.getType())){
//单品立减券
if(StringUtils.isNotEmpty(couponVO.getProductIds())){
//限制使用的商品id
List<String> ruleGoodsList = Arrays.asList(couponVO.getProductIds().split(StrUtil.COMMA));
//过滤出符合条件的本订单的商品
List<GoodsVO> filteredList = goodsList.stream().filter(goods->ruleGoodsList.contains(goods.getId())).collect(Collectors.toList());
//计算符合条件的商品订单总金额
double orderAmount =0.0;
if(!filteredList.isEmpty()){
orderAmount = filteredList.stream().mapToDouble(GoodsVO::getAmount).sum();
}
return orderAmount>=couponVO.getReachAmount();
}else{
//未设置可用商品不符合
if(goodsList.isEmpty()){
//没商品不可用
return false;
}
//符合条件的商品
List<GoodsVO> filteredList;
if("1".equals(couponVO.getProductLimit())){
//不限制使用商品
filteredList = goodsList;
}else if("2".equals(couponVO.getProductLimit())){
//自定义商品
if(StringUtils.isNotEmpty(couponVO.getProductIds())) {
List<String> ruleGoodsList = Arrays.asList(couponVO.getProductIds().split(StrUtil.COMMA));
//过滤出符合条件的本订单的商品
filteredList = goodsList.stream().filter(goods -> ruleGoodsList.contains(goods.getId())).collect(Collectors.toList());
}else{
//未设置可用商品不符合
return false;
}
}else{
//超出预设值范围不可用
return false;
}
//计算符合条件的商品订单总金额
double orderAmount =0.0;
if(!filteredList.isEmpty()){
orderAmount = filteredList.stream().mapToDouble(GoodsVO::getAmount).sum();
}
return orderAmount>=couponVO.getReachAmount();
}else{
//其他券或者本订单未选择商品不需要判断商品
return true;
@ -589,8 +603,6 @@ public class CheckUtil {
Double disAmount = 0.0;
DecimalFormat df = new DecimalFormat("#.00");
try {
//1 按加油金额否则 按加油升数
Double thisValue = "1".equals(coupon.getUseType())?oilAmount:oilLiter;
if("1".equals(coupon.getType())){
//代金券-直接拿优惠金额
disAmount = coupon.getReduceAmount();
@ -605,9 +617,12 @@ public class CheckUtil {
}else if("4".equals(coupon.getType())){
//油品立减券每满多少升减多少钱
//计算能除尽多少次就减多少次
int thisInt = (int) (thisValue / coupon.getLjOilNum());
int thisInt = (int) (oilLiter / coupon.getLjOilNum());
//计算优惠金额
disAmount = thisInt * coupon.getLjOilAmount();
}else if("5".equals(coupon.getType())){
//单品立减券,直接拿优惠金额
disAmount = coupon.getReduceAmount();
}
}catch (Exception e){
log.error("优惠券优惠金额计算失败:"+e.getMessage(),e);
@ -710,7 +725,7 @@ public class CheckUtil {
* @return boolean
**/
private static boolean checkDayTimeReverse(Date nowDate,String dayStartTime,String dayEndTime){
String dayStr = DateUtil.date(nowDate).toString();
String dayStr = DateUtil.formatDate(nowDate);
//时间范围区间
Date startTime = DateUtil.parse(dayStr+" "+(StringUtils.isNotEmpty(dayStartTime)?(dayStartTime+":00"):"00:00:00"));
Date endTime = DateUtil.parse(dayStr+" "+(StringUtils.isNotEmpty(dayEndTime)?(dayEndTime+":59"):"23:59:59"));

View File

@ -1,7 +1,8 @@
# \u57FA\u672C\u914D\u7F6E
server.port=8080
env.profile=dev
env.properties.path=D:/my_project/oil-station/fuintBackend/configure/
#env.properties.path=D:/my_project/oil-station/fuintBackend/configure/
env.properties.path=D:/Code/yuzhan/oil-station/fuintBackend/configure/
#env.properties.path=F:/work/oilSystem/fuintBackend/configure/
#env.properties.path=D:/oil/new-oil/oilSystem/fuintBackend/configure/
#env.properties.path=D:/work/oilSystem/fuintBackend/configure/

View File

@ -11,7 +11,7 @@ VUE_APP_BASE_API = '/dev-api'
VUE_APP_PUBLIC_PATH = '/'
# 后端接口地址
VUE_APP_SERVER_URL = 'http://127.0.0.1:8080/'
VUE_APP_SERVER_URL = 'http://192.168.31.178:8080/'
# http://192.168.0.121:8080/

View File

@ -1,28 +1,11 @@
<template>
<div class="app-center">
<div class="tab-box">
<div class="tab_" :class="{active:index== tabindex }" @click="getindex(index)" v-for="(item,index) in tabs"
:key="index">
{{ item.name }}
</div>
</div>
<!-- <div class="app-top">-->
<!-- <el-card>-->
<!-- <el-radio-group v-model="radio1">-->
<!-- <el-radio-button label="收银台订单"></el-radio-button>-->
<!-- <el-radio-button label="油品交易订单"></el-radio-button>-->
<!-- <el-radio-button label="商品交易订单"></el-radio-button>-->
<!-- <el-radio-button label="会员充值订单"></el-radio-button>-->
<!-- &lt;!&ndash; <el-radio-button label="小程序交易订单"></el-radio-button>&ndash;&gt;-->
<!-- <el-radio-button label="挂账订单"></el-radio-button>-->
<!-- &lt;!&ndash; <el-radio-button label="未支付订单"></el-radio-button>&ndash;&gt;-->
<!-- &lt;!&ndash; <el-radio-button label="积分兑换订单"></el-radio-button>&ndash;&gt;-->
<!-- </el-radio-group>-->
<!-- </el-card>-->
<!-- </div>-->
<!-- 收银台订单-->
<order_Cashier v-if="tabindex == 0 "></order_Cashier>
<!-- 油品订单-->
@ -99,7 +82,6 @@ export default {
<style scoped>
.app-center {
width: 100%;
box-sizing: border-box;
padding: 0;
margin: 0;

Binary file not shown.

After

Width:  |  Height:  |  Size: 541 B

View File

@ -5,20 +5,34 @@
<div class="o-top" v-if="userInfo">
<div style="width: 50%">
<div class="d-s">
<img src="./imgs/new_user.png" style="width: 28px;height: 28px;margin-right: 10px">
<img src="./imgs/new_user.png" style="width: 32px;height: 32px;margin-right: 10px">
<div >
<div style="font-weight: bold">{{chooseVipUser.name||'匿名'}}</div>
<div style="font-weight: bold;margin-bottom: 2px">{{chooseVipUser.name||'匿名'}}</div>
<div class="d-s">
<span>{{chooseVipUser.mobile}}</span>
<img src="./imgs/fz.png" @click="copyToClipboard(chooseVipUser.mobile)" style="width: 17px;height: 17px;margin: 0px 10px">
<img src="./imgs/vipicon.png" style="width: 23px;height: 19px;">
<sapn style="margin: 0px 5px">普通会员</sapn>
<el-popover
placement="bottom"
trigger="click">
<div> 储值卡1000.00 </div>
<div> 储值卡1000.00 </div>
<div> 储值卡1000.00 </div>
<div> 储值卡1000.00 </div>
<div> 储值卡1000.00 </div>
<img slot="reference" src="./imgs/kbao.png" style="width: 24px;height: 24px;margin-right: 10px">
</el-popover>
</div>
</div>
</div>
<div class="d-s" >
<div style="font-size: 12px;margin-right: 5px">储值卡{{chooseVipUser.cardBalance}} </div>
<div style="font-size: 12px">囤油卡1000.000</div>
</div>
<!-- <div class="d-s" >-->
<!-- <div style="font-size: 12px;margin-right: 5px">储值卡{{chooseVipUser.cardBalance}} </div>-->
<!-- <div style="font-size: 12px">囤油卡1000.000</div>-->
<!-- </div>-->
</div>
<div class="d-s" style="width: 50%">
@ -31,15 +45,15 @@
<div class="left_input">
<el-autocomplete
v-model="userMobile"
style="width: 95%;margin: 15px "
style="width: 95%; "
:fetch-suggestions="getUser"
placeholder="请输入会员手机号"
>
<template slot-scope="{ item }">
<div class="name" @click="chooseUser(item)">{{ item.name+" "+item.mobile }}</div>
</template>
</el-autocomplete>
<i class="el-icon-search" style="font-size: 18px;margin-right: 10px" ></i>
</div>
<div class="d-s">
<div class="an_bor" @click="addVip()">新增会员</div>
@ -64,13 +78,13 @@
<div class="d-top">
<div class="d-b">
<el-checkbox v-model="checkAll">活动优惠 <i class="el-icon-arrow-down"></i></el-checkbox>
<el-checkbox v-model="showAct">活动优惠 <i class="el-icon-arrow-down"></i></el-checkbox>
<div class="or_num"></div>
</div>
<!-- 下拉列表插入-->
<div v-if="checkAll == true">
<div v-if="showAct == true">
<div v-if="activityList.length>0">
<el-radio-group style="width: 100%" v-model="chooseAct">
<el-radio-group style="width: 100%" v-model="chooseActId" @change="handleChangeAct">
<div class="x-d-b" v-for="(item,index) in activityList">
<el-radio :label="item.id">{{null==item.ruleName?item.actName:item.ruleName}}<div class="or_num">-{{item.disAmount}}</div></el-radio>
</div>
@ -82,15 +96,15 @@
</div>
<div class="d-b">
<el-checkbox v-model="checkAll">优惠券 <i class="el-icon-arrow-down"></i></el-checkbox>
<el-checkbox v-model="showCoupon">优惠券 <i class="el-icon-arrow-down"></i></el-checkbox>
<div class="or_num"></div>
</div>
<!-- 下拉列表插入-->
<div v-if="checkAll == true">
<div v-if="showCoupon == true">
<div v-if="couponList.length>0">
<el-radio-group style="width: 100%" v-model="chooseAct">
<div class="x-d-b" v-for="(item,index) in activityList">
<el-radio :label="item.id">{{null==item.ruleName?item.actName:item.ruleName}}<div class="or_num">-{{item.disAmount}}</div></el-radio>
<el-radio-group style="width: 100%" v-model="chooseCouponId" @change="handleChangeCoupon">
<div class="x-d-b" v-for="(item,index) in couponList">
<el-radio :label="item.id">{{item.name}}<div class="or_num">-{{item.disAmount}}</div></el-radio>
</div>
</el-radio-group>
</div>
@ -100,38 +114,40 @@
</div>
</div>
<div class="three-top">
<div class="addbor">
<div class="">扫码支付</div>
<div class="or_num">0.00</div>
</div>
<div class="addbor">
<div class="">找零</div>
<div class="or_num">0.00</div>
</div>
<div class="addbor">
<div class="">加油员</div>
<div class="or_num">0.00</div>
</div>
</div>
<!-- <div class="three-top">-->
<!-- <div class="addbor">-->
<!-- <div class="">扫码支付</div>-->
<!-- <div class="or_num">0.00</div>-->
<!-- </div>-->
<!-- <div class="addbor">-->
<!-- <div class="">找零</div>-->
<!-- <div class="or_num">0.00</div>-->
<!-- </div>-->
<!-- <div class="addbor">-->
<!-- <div class="">加油员</div>-->
<!-- <div class="or_num">0.00</div>-->
<!-- </div>-->
<!-- </div>-->
<div class="er-box"></div>
<div class="wrap-box">
<div class="f-box" v-for="(item,index) in payList" :class="{'f-acvite' : item.dictValue == payWay }"
@click="setindex(item.dictValue)" :key="item.dictValue"
>{{ item.dictLabel }}
</div>
<div style="width: 31%"></div>
</div>
</div>
<div class="box-bottom">
<div>
<div class="price_">0.00</div>
<div class="price_prefer">优惠合计:0.00</div>
<div class="price_">{{realAmount}}</div>
<div class="price_prefer">优惠合计:{{disTotal}}</div>
</div>
<div class="anniu">立即结算</div>
</div>
</div>
<div class="cont-box">
<div class="box-top">
<div class="cont-tab">
@ -140,7 +156,7 @@
<div class="gang" :class="{ 'active_gang' : tabIndex == index }"></div>
</div>
</div>
<div class="tab-kuang" style="flex-wrap: wrap">
<div class="tab-kuang" style="flex-wrap: wrap;justify-content: space-between ">
<div :class=item.classStyle v-for="(item,index) in dataList" @click="setRefuelingAmount(item)">
<div>{{ item.oilType }}&nbsp;{{ item.oilName }}</div>
<div class="card-title">{{ item.gunName }}</div>
@ -152,15 +168,20 @@
</div>
<div class="c-bottom">
{{ getGoodsItem }}
</div>
<div class="bottom-b-d">
<!-- <div>订单笔数 <span style="color: #FF9655">0</span></div>-->
<div>油品金额 <span style="color: #FF9655">{{ oilGunClearing.amount || 0.00 }}</span></div>
<div style=" position: absolute;bottom: 0px; width: 100%;">
<div class="c-bottom">
{{ getGoodsItem }}
</div>
<div class="bottom-b-d">
<!-- <div>订单笔数 <span style="color: #FF9655">0</span></div>-->
<div>油品金额 <span style="color: #FF9655">{{ oilGunClearing.amount || 0.00 }}</span></div>
</div>
</div>
</div>
<div class="box-bottom">
<div class="anniu-c" @click="oilGunReset()">
重置
</div>
@ -188,6 +209,7 @@
<div class="goods_name">商品</div>
<div class="stock_name">库存</div>
<div class="u-price_name">单价</div>
<div class="u-price_name">会员价</div>
<div class="num_name">数量</div>
<div class="orerate_name">操作</div>
</div>
@ -199,15 +221,20 @@
</div>
<div class="stock_name">{{ item.stock }}</div>
<div class="u-price_name">{{ item.retailPrice }}</div>
<div class="num_name">{{ item.num }}</div>
<div class="u-price_name">{{ item.retailPrice }}</div>
<div class="num_name"> <el-input-number v-model="item.num" size="mini" :min="1" :max="999" label="描述文字"></el-input-number></div>
<div class="orerate_name">
<span style="color: red;cursor: pointer" @click="deleteGoods(item.id)">删除</span>
</div>
</div>
<div class="bottom-b-d">
<div>商品总数 <span style="color: #FF9655">{{ getGoodsListNum }}</span></div>
<div>商品总金额 <span style="color: #FF9655">{{ getGoodsNum }}</span></div>
<div style=" position: absolute;bottom: 0px; width: 100%;">
<div class="bottom-b-d">
<div>商品总数 <span style="color: #FF9655">{{ getGoodsListNum }}</span></div>
<div>商品总金额 <span style="color: #FF9655">{{ getGoodsNum }}</span></div>
</div>
</div>
</div>
<div class="box-bottom">
<div class="anniu-c" @click="goodsReset()">
@ -545,15 +572,23 @@ export default {
//
couponList:[],
// actId_ruleId
chooseAct:"",
//
chooseCoupon:"",
chooseActId:"",
//id
chooseCouponId:"",
//
chooseAct:{},
//
chooseCoupon:{},
//--
payWay: "ALIPAY",
//
orderAmount:0.0,
orderAmount:0.00,
//
oilLiter:0,
oilLiter:0.00,
//
realAmount:0.00,
//
disTotal:0.00,
openConfirm:false,
//
isPay:false,
@ -580,16 +615,10 @@ export default {
state: '',
//
pendingOrdersList: [],
timeout: null,
boxShow: true,
boxShow1: true,
boxShow2: true,
checkList: [],
checkAll: true,
checkAll1: false,
checkAll2: false,
checkAll3: false,
isIndeterminate: true,
//
showAct: true,
//
showCoupon: true,
freeTicket:false,
freeIndex:0,
freeTicketList:[
@ -658,17 +687,45 @@ export default {
flag:1,
jishuqi:0,
continuePolling: true, //
}
},
watch: {
//
chooseActId: {
handler(newVal) {
console.log("选择的活动发生变化", newVal);
//
this.getDisTotal()
},
deep: true,
immediate: true,
},
//
chooseCouponId: {
handler(newVal) {
console.log("选择的优惠券发生变化", newVal);
//
this.getDisTotal()
},
deep: true,
immediate: true,
},
//
orderAmount: {
handler(newVal) {
console.log("订单总金额发生变化", newVal);
//
this.getActivity()
//
this.getCoupon()
//
this.realAmount = (this.orderAmount - this.disTotal).toFixed(2)
},
deep: true,
immediate: true,
},
//
disTotal:{
handler(newVal) {
console.log("优惠总金额发生变化", newVal);
//
this.realAmount = (this.orderAmount - this.disTotal).toFixed(2)
},
deep: true,
immediate: true,
@ -685,6 +742,10 @@ export default {
this.orderAmount = this.getGoodsNum
}
this.refuelingAmount = false
//
this.getActivity()
//
this.getCoupon()
}
},
//
@ -696,6 +757,8 @@ export default {
}else {
this.orderAmount = newVal
}
//
this.getCoupon()
}
},
components: {
@ -745,6 +808,48 @@ export default {
},
methods: {
/**
* 获取优惠总金额
* */
getDisTotal(){
this.disTotal = 0.00
if(""!=this.chooseCouponId){
this.disTotal += this.chooseCoupon.disAmount
}
if(""!=this.chooseActId){
this.disTotal += this.chooseAct.disAmount
}
this.disTotal = (this.disTotal).toFixed(2)
},
/**
* 监听活动选择切换
* */
handleChangeAct(value){
this.chooseAct = this.activityList.filter(item=>item.id === value)[0]
if(""!=this.chooseCouponId){
//
if("0"==this.chooseCoupon.useWithOther){
//
this.chooseCouponId = ""
this.chooseCoupon = {}
}
}
this.getDisTotal()
console.log("选中的活动",this.chooseAct)
},
/**
* 监听优惠券选择切换
* */
handleChangeCoupon(value){
this.chooseCoupon = this.couponList.filter(item=>item.id === value)[0]
if("0"==this.chooseCoupon.useWithOther){
//
this.chooseAct = {}
this.chooseActId = ""
}
this.getDisTotal()
console.log("选中的优惠券",this.chooseCoupon)
},
async collection1() {
let actualPayment = 0
let makeChange = 0
@ -981,6 +1086,7 @@ export default {
* @date 2024年9月19日
*/
getActivity(){
this.chooseActId=''
//
if(this.oilGunClearing!='' && this.oilGunClearing.hasOwnProperty("oilNameId") && this.chooseVipUser.hasOwnProperty("id")){
//
@ -1009,11 +1115,13 @@ export default {
* @date 2024年9月19日
*/
getCoupon(){
this.chooseCouponId=''
//
if(this.chooseVipUser.hasOwnProperty("id") && (this.goodsList.length>0 || (this.oilGunClearing!='' && this.oilGunClearing.hasOwnProperty("oilNameId")))){
//
let dataObj = {
userId: this.chooseVipUser.id
userId: this.chooseVipUser.id,
payWay: this.payWay
}
if(this.oilGunClearing!='' && this.oilGunClearing.hasOwnProperty("oilNameId")){
//
@ -1057,12 +1165,17 @@ export default {
restVipUser(){
this.userInfo = false
this.chooseVipUser = {}
this.getActivity()
this.getCoupon()
},
chooseUser(data){
if (data){
//
this.userInfo = true
this.chooseVipUser = data
//
this.getActivity()
this.getCoupon()
console.log(this.chooseVipUser,598)
}
@ -1293,6 +1406,9 @@ export default {
*/
setindex(value) {
this.payWay = value
//
this.getActivity()
this.getCoupon()
},
setRefuelingAmount(item) {
this.refuelingAmount = true
@ -1448,8 +1564,9 @@ input {
width: 100%;
box-sizing: border-box;
height: 100vh;
padding: 20px 0px;
padding-right: 20px;
box-sizing: border-box;
padding: 20px ;
padding-bottom: 0px;
display: flex;
align-content: center;
@ -1479,14 +1596,14 @@ input {
}
.box-top {
height: 84vh;
height: 86vh;
background: #fff;
margin-bottom: 5px;
position: relative;
}
.box-bottom {
height: 12vh;
height: 10vh;
background: #fff;
z-index: 9;
box-sizing: border-box;
@ -1557,18 +1674,18 @@ input {
}
.x-d-b {
width: 90%;
width: 95%;
display: flex;
align-items: center;
justify-content: space-between;
margin: 15px 0px;
margin-left: 10%;
margin-left: 4%;
}
.d-top {
width: 100%;
box-sizing: border-box;
padding: 0px 40px;
padding: 0 40px 20px 40px;
font-size: 16px;
color: #555555;
border-bottom: #f6f8f9 4px solid;
@ -1622,13 +1739,14 @@ input {
.wrap-box {
height: 190px;
display: flex;
position: absolute;
bottom: 0px;
width: 100%;
flex-wrap: wrap;
display: flex;
box-sizing: border-box;
padding: 20px;
justify-content: space-between ;
}
.f-box {
@ -1641,7 +1759,7 @@ input {
font-weight: 400;
font-size: 16px;
color: #555555;
margin-right: 2%;
margin-bottom: 2%;
border-radius: 10px;
border: 1px solid #409EFF;
@ -1651,7 +1769,7 @@ input {
.f-acvite {
background: #409eff !important;
color: #fff !important;
box-shadow: 0px 3px 6px 1px rgba(255, 255, 255, 0.4), inset 0px 3px 6px 1px rgba(255, 255, 255, 0.5);
//box-shadow: 0px 3px 6px 1px rgba(255, 255, 255, 0.4), inset 0px 3px 6px 1px rgba(255, 255, 255, 0.5);
}
.anniu {
@ -1749,7 +1867,7 @@ input {
}
.card92 {
width: 32%;
width: 31%;
height: 90px;
box-sizing: border-box;
padding: 5px;
@ -1761,13 +1879,13 @@ input {
font-size: 12px;
color: #FF9655;
overflow: hidden;
margin-right: 1%;
margin-bottom: 1%;
margin: 0 auto;
margin-bottom: 2%;
cursor: pointer;
}
.card0 {
width: 32%;
width: 31%;
height: 90px;
box-sizing: border-box;
padding: 5px;
@ -1779,12 +1897,12 @@ input {
font-size: 12px;
color: #FFB519;
overflow: hidden;
margin-right: 1%;
margin-bottom: 1%;
margin: 0 auto;
margin-bottom: 2%;
}
.card98 {
width: 32%;
width: 31%;
height: 90px;
box-sizing: border-box;
padding: 5px;
@ -1795,13 +1913,13 @@ input {
font-size: 12px;
color: #409EFF;
overflow: hidden;
margin-right: 1%;
margin-bottom: 1%;
margin: 0 auto;
margin-bottom: 2%;
cursor: pointer;
}
.card95 {
width: 32%;
width: 31%;
height: 90px;
box-sizing: border-box;
padding: 5px;
@ -1812,8 +1930,8 @@ input {
font-size: 12px;
color: #0DC291;
overflow: hidden;
margin-right: 1%;
margin-bottom: 1%;
margin: 0 auto;
margin-bottom: 2%;
cursor: pointer;
}
@ -1833,15 +1951,14 @@ input {
.c-bottom {
font-size: 14px;
color: #333333;
border-bottom: 2px solid #F4F5F9;
//border-bottom: 2px solid #F4F5F9;
box-sizing: border-box;
padding: 10px 20px;
}
.bottom-b-d {
position: absolute;
bottom: 0px;
width: 100%;
display: flex;
align-content: center;
@ -1850,6 +1967,7 @@ input {
padding: 10px 20px;
font-size: 16px;
color: #777777;
border-top: 2px solid #F4F5F9;
}
.anniu-c {
@ -1908,29 +2026,27 @@ input {
}
.goods_name {
width: 35%;
width: 25%;
}
.stock_name {
width: 15%;
width: 10%;
text-align: center;
}
.u-price_name {
width: 15%;
width: 10%;
text-align: center;
}
.num_name {
width: 15%;
width: 30%;
text-align: center;
}
.orerate_name {
width: 20%;
width: 15%;
text-align: center;
}
@ -2006,21 +2122,23 @@ input {
.left_input {
width: 70%;
overflow: hidden;
box-sizing: border-box;
display: flex;
align-items: center;
justify-content: space-between;
box-sizing: border-box;
padding: 10px 5px;
border-radius: 8px;
color: white;
border: 1px solid #fff;
::v-deep.el-input__inner {
background: transparent !important;
border: white 1px solid;
border: transparent 1px solid;
color: #fff;
.el-input__placeholder{
color: red;
color: #fff !important;
}
}

View File

@ -711,7 +711,7 @@ export default {
color: #FF9655 !important;
}
.app-right{
width: 89% !important;
width: 90% !important;
}
//.bule1{
@ -719,7 +719,7 @@ export default {
// color: #81b0ff !important;
//}
.app-left{
width:180px;
width: 10% !important;
height: 100vh;
background: #ffffff;
box-shadow: 0 4px 4px 4px rgba(0,21,41,.08);

View File

@ -1,8 +1,8 @@
<!--增值交易订单-->
<template>
<div>
<div class="contenr_new">
<!-- 表单查询-->
<el-card class="box-card">
<div class="top_new">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" label-width="100px">
<el-form-item label="" prop="returnType">
<el-select
@ -58,16 +58,16 @@
/>
</el-form-item>
<el-form-item label="">
<!-- <el-date-picker-->
<!-- v-model="dateRange"-->
<!-- style="width: 400px"-->
<!-- size="medium"-->
<!-- value-format="yyyy-MM-dd"-->
<!-- type="datetimerange"-->
<!-- range-separator="至"-->
<!-- start-placeholder="开始日期"-->
<!-- end-placeholder="结束日期"-->
<!-- ></el-date-picker>-->
<!-- <el-date-picker-->
<!-- v-model="dateRange"-->
<!-- style="width: 400px"-->
<!-- size="medium"-->
<!-- value-format="yyyy-MM-dd"-->
<!-- type="datetimerange"-->
<!-- range-separator="至"-->
<!-- start-placeholder="开始日期"-->
<!-- end-placeholder="结束日期"-->
<!-- ></el-date-picker>-->
<el-date-picker
v-model="beginTime"
style="width: 160px"
@ -87,9 +87,9 @@
<el-button icon="el-icon-refresh" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
</el-card>
</div>
<!-- 统计-->
<el-card class="box-card">
<div class="cont_new">
<div slot="header" class="clearfix">
<span>统计</span>
</div>
@ -141,102 +141,75 @@
</div>
</div>
</div>
</el-card>
</div>
<!-- 列表-->
<el-card class="box-card">
<div class="wgang">
<div></div>
<div style="display: flex ">
<el-button type="primary" size="mini" icon="el-icon-plus" @click = "exportExcelCashier()">导出订单</el-button>
</div>
<div class="bottom_new">
<div class="wgang">
<div style="display: flex ">
<el-button type="primary" size="mini" icon="el-icon-plus" @click = "exportExcelCashier()">导出订单</el-button>
</div>
<div class="table-box">
<el-table
:data="hangBillList"
style="width: 100%">
<!-- <el-table-column type="expand">-->
<!-- <template slot-scope="props">-->
<!-- <el-form label-position="left" style="margin-left: 20px" inline class="demo-table-expand">-->
<!-- <el-form-item label="操作人手机号">-->
<!-- <span>{{ props.row.mobile }}</span>-->
<!-- </el-form-item><br/>-->
<!-- <el-form-item label="更新时间">-->
<!-- <span>{{ props.row.updateTime ? props.row.updateTime:"&#45;&#45;" }}</span>-->
<!-- </el-form-item><br/>-->
<!-- <el-form-item label="单据备注">-->
<!-- <span>{{ props.row.remark ? props.row.remark:"&#45;&#45;" }}</span>-->
<!-- </el-form-item><br/>-->
<!-- <el-form-item label="单据金额">-->
<!-- <span>{{ props.row.amount ? props.row.amount:"0" }}</span>-->
<!-- </el-form-item>-->
<!-- <el-form-item label="已还金额">-->
<!-- <span>{{ props.row.repaidAmount ? props.row.repaidAmount:"0" }}</span>-->
<!-- </el-form-item>-->
<!-- <el-form-item label="未还金额">-->
<!-- <span>{{ props.row.outstandAmount ? props.row.outstandAmount:"0" }}</span>-->
<!-- </el-form-item>-->
<!-- </el-form>-->
<!-- </template>-->
<!-- </el-table-column>-->
<el-table-column type="index" width="50" align="center" label="序号"/>
<el-table-column prop="orderNo" align="center" label="单据号" width="220"></el-table-column>
<el-table-column align="center" label="挂账单位">
<el-table-column prop="unitName" align="center" label="单位名称"> </el-table-column>
<el-table-column prop="personCredit" align="center" label="挂账人"> </el-table-column>
<el-table-column prop="contactMobile" align="center" label="联系电话"> </el-table-column>
</el-table-column>
<el-table-column label="记录明细" align="center">
<el-table-column prop="returnType" align="center" label="类型">
<template slot-scope="scope">
<el-tag v-if="scope.row.returnType == 0">挂账</el-tag>
<el-tag v-else type="success">归还</el-tag>
</template>
</el-table-column>
<el-table-column prop="amount" align="center" label="金额"> </el-table-column>
<el-table-column prop="status" align="center" label="状态">
<template slot-scope="scope">
<span v-if="scope.row.status == 0">未归还</span>
<span v-else-if="scope.row.status == 1" type="success">已归还</span>
<span v-else type="success">部分归还</span>
</template>
</el-table-column>
<el-table-column prop="repaidAmount" align="center" label="已归还金额"> </el-table-column>
<el-table-column prop="outstandAmount" align="center" label="未归还金额"> </el-table-column>
</el-table-column>
<el-table-column prop="realName" align="center" label="操作人"> </el-table-column>
<el-table-column prop="createTime" align="center" label="创建时间" width="220">
</div>
<div class="table-box">
<el-table
:data="hangBillList"
style="width: 100%">
<el-table-column type="index" width="50" align="center" label="序号"/>
<el-table-column prop="orderNo" align="center" label="单据号" width="220"></el-table-column>
<el-table-column align="center" label="挂账单位">
<el-table-column prop="unitName" align="center" label="单位名称"> </el-table-column>
<el-table-column prop="personCredit" align="center" label="挂账人"> </el-table-column>
<el-table-column prop="contactMobile" align="center" label="联系电话"> </el-table-column>
</el-table-column>
<el-table-column label="记录明细" align="center">
<el-table-column prop="returnType" align="center" label="类型">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.createTime) }}</span>
<el-tag v-if="scope.row.returnType == 0">挂账</el-tag>
<el-tag v-else type="success">归还</el-tag>
</template>
</el-table-column>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<el-table-column prop="amount" align="center" label="金额"> </el-table-column>
<el-table-column prop="status" align="center" label="状态">
<template slot-scope="scope">
<el-button
v-if="scope.row.status != 0"
size="mini"
type="text"
@click="returnRecord(scope.row.id)"
>归还详情</el-button>
<span v-if="scope.row.status == 0">未归还</span>
<span v-else-if="scope.row.status == 1" type="success">已归还</span>
<span v-else type="success">部分归还</span>
</template>
</el-table-column>
</el-table>
</div>
<div class="pagination-box">
<el-pagination
background
v-show="total>0"
layout="prev, pager, next"
:total="total"
:page.sync="queryParams.page"
:limit.sync="queryParams.pageSize"
@current-change="getList">
</el-pagination>
</div>
<el-table-column prop="repaidAmount" align="center" label="已归还金额"> </el-table-column>
<el-table-column prop="outstandAmount" align="center" label="未归还金额"> </el-table-column>
</el-table-column>
<el-table-column prop="realName" align="center" label="操作人"> </el-table-column>
<el-table-column prop="createTime" align="center" label="创建时间" width="220">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.createTime) }}</span>
</template>
</el-table-column>
</el-card>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button
v-if="scope.row.status != 0"
size="mini"
type="text"
@click="returnRecord(scope.row.id)"
>归还详情</el-button>
</template>
</el-table-column>
</el-table>
</div>
<div class="pagination-box">
<el-pagination
background
v-show="total>0"
layout="prev, pager, next"
:total="total"
:page.sync="queryParams.page"
:limit.sync="queryParams.pageSize"
@current-change="getList">
</el-pagination>
</div>
</div>
<!-- 归还记录信息-->
<el-drawer
@ -540,6 +513,10 @@ import {exportExcelCashierApi, exportExcelHangBillApi} from "@/api/order/exportE
align-items: center;
flex-wrap: wrap;
}
.contenr_new{
box-sizing: border-box;
//padding: 10px;
}
.box{
//box-sizing: border-box;
padding: 5px;
@ -574,15 +551,11 @@ import {exportExcelCashierApi, exportExcelHangBillApi} from "@/api/order/exportE
}
}
.size-bole{
//font-weight: bold;
//width: 53px;
height: 31px;
font-family: YouSheBiaoTiHei;
font-weight: 400;
font-size: 24px;
color: #555555;
//line-height: 0px;
text-align: left;
font-style: normal;
text-transform: none;
@ -625,11 +598,36 @@ import {exportExcelCashierApi, exportExcelHangBillApi} from "@/api/order/exportE
margin-right: 20px;
margin-bottom: 20px;
padding-left: 20px;
width: 211px;
height: 60px;
background: rgba(255,150,85,0.05);
border-radius: 6px 6px 6px 6px;
border: 1px solid #FF9655;
}
.top_new{
display: flex;
justify-content: space-between;
background: #fff;
width: 98%;
margin: 10px auto;
border-radius: 8px;
box-sizing: border-box;
padding: 15px
}
.cont_new{
background: #fff;
width: 98%;
margin: 10px auto;
border-radius: 8px;
box-sizing: border-box;
padding: 15px
}
.bottom_new{
background: #fff;
width: 98%;
margin: 10px auto;
border-radius: 8px;
box-sizing: border-box;
padding: 15px
}
</style>

View File

@ -1,63 +1,66 @@
<!-- 收银台订单-->
<template>
<div>
<div class="cot-box">
<div>
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" label-width="68px">
<el-form-item label="" prop="staffId">
<el-select
v-model="queryParams.staffId"
clearable
placeholder="请选择操作人"
>
<el-option v-for="item in staffList" :key="item.id" :label="item.realName" :value="item.id">
<span style="float: left">{{ item.realName }}</span>
<span style="float: right; color: #8492a6; font-size: 13px">{{ item.mobile }}</span>
</el-option>
</el-select>
</el-form-item>
<el-form-item label="">
<el-input v-model="queryParams.orderNo" clearable placeholder="请输入订单号"></el-input>
</el-form-item>
<el-form-item label="" prop="payType">
<el-select
v-model="queryParams.payType"
clearable
placeholder="请选择支付方式"
>
<el-option v-for="item in payList"
:key="item.id"
:label="item.dictLabel"
:value="item.dictValue">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="">
<el-input v-model="queryParams.payUser" clearable placeholder="请输入付款用户"></el-input>
</el-form-item>
<el-form-item label="">
<div class="top_new" >
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" label-width="0px">
<el-form-item label="" prop="staffId">
<el-select
v-model="queryParams.staffId"
clearable
placeholder="请选择操作人"
>
<el-option v-for="item in staffList" :key="item.id" :label="item.realName" :value="item.id">
<span style="float: left">{{ item.realName }}</span>
<span style="float: right; color: #8492a6; font-size: 13px">{{ item.mobile }}</span>
</el-option>
</el-select>
</el-form-item>
<el-form-item label="">
<el-input v-model="queryParams.orderNo" clearable placeholder="请输入订单号"></el-input>
</el-form-item>
<el-form-item label="" prop="payType">
<el-select
v-model="queryParams.payType"
clearable
placeholder="请选择支付方式"
>
<el-option v-for="item in payList"
:key="item.id"
:label="item.dictLabel"
:value="item.dictValue">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="">
<el-input v-model="queryParams.payUser" clearable placeholder="请输入付款用户"></el-input>
</el-form-item>
<el-form-item label="">
<el-date-picker
v-model="beginTime"
style="width: 140px"
type="date"
placeholder="开始日期">
</el-date-picker>
<el-date-picker
v-model="endTime"
style="width: 140px"
type="date"
placeholder="结束日期">
</el-date-picker>
</el-form-item>
<el-form-item style="float: right">
<el-button type="primary" icon="el-icon-search" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" @click="resetQuery">重置</el-button>
<el-button type="primary" @click="exportExcelCashier()">导出</el-button>
</el-form-item>
</el-form>
<el-date-picker
v-model="beginTime"
style="width: 140px"
type="date"
placeholder="开始日期">
</el-date-picker>
<el-date-picker
v-model="endTime"
style="width: 140px"
type="date"
placeholder="结束日期">
</el-date-picker>
</el-form-item>
<el-form-item >
</el-form-item>
</el-form>
<div style="display: flex; height: 32px;">
<el-button type="primary" icon="el-icon-search" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" @click="resetQuery">重置</el-button>
<el-button type="primary" @click="exportExcelCashier()">导出</el-button>
</div>
</div>
<div class="cot-box">
<div>
<div class="box-gang">
<div class="box2">
@ -109,91 +112,6 @@
<div style="font-weight: bold;font-size: 13px;margin-left: 5px">商品订单/实付总金额</div>
</div>
</div>
<!-- <div class="box">-->
<!-- <div class="size-bole">{{ orderStatistics.numberOfStrokes ? orderStatistics.numberOfStrokes : 0 }}</div>-->
<!-- <div class="size-hui">-->
<!-- <div class="nei">笔数</div>-->
<!-- <div class="icon-img">-->
<!-- <img src="../../../assets/images/cut/组 4666@2x.png" style="width: 20px;height: 20px">-->
<!-- </div>-->
<!-- </div>-->
<!-- </div>-->
<!-- <div class="box1">-->
<!-- <div class="size-bole">{{-->
<!-- orderStatistics.theTotalAmountPaid ? orderStatistics.theTotalAmountPaid : 0-->
<!-- }}-->
<!-- </div>-->
<!-- <div class="size-hui">-->
<!-- <div class="nei">实付总金额</div>-->
<!-- <div class="icon-img">-->
<!-- <img src="../../../assets/images/cut/组 5017@2x.png" style="width: 20px;height: 20px">-->
<!-- </div>-->
<!-- </div>-->
<!-- </div>-->
<!-- <div class="box1">-->
<!-- <div class="size-bole">{{ orderStatistics.oilDiscounts ? orderStatistics.oilDiscounts : 0 }}</div>-->
<!-- <div class="size-hui">-->
<!-- <div class="nei">油品优惠</div>-->
<!-- <div class="icon-img">-->
<!-- <img src="../../../assets/images/cut/组 5017@2x.png" style="width: 20px;height: 20px">-->
<!-- </div>-->
<!-- </div>-->
<!-- </div>-->
<!-- <div class="box1">-->
<!-- <div class="size-bole">{{ seekZeroAmount }}</div>-->
<!-- <div class="size-hui">-->
<!-- <div class="nei">找零总金额</div>-->
<!-- <div class="icon-img">-->
<!-- <img src="../../../assets/images/cut/组 5017@2x.png" style="width: 20px;height: 20px">-->
<!-- </div>-->
<!-- </div>-->
<!-- </div>-->
<!-- <div class="box1">-->
<!-- <div class="size-bole">{{-->
<!-- orderStatistics.theTotalAmountOfOil ? orderStatistics.theTotalAmountOfOil : 0-->
<!-- }}-->
<!-- </div>-->
<!-- <div class="size-hui">-->
<!-- <div class="nei">油品总金额</div>-->
<!-- <div class="icon-img">-->
<!-- <img src="../../../assets/images/cut/组 5017@2x.png" style="width: 20px;height: 20px">-->
<!-- </div>-->
<!-- </div>-->
<!-- </div>-->
<!-- <div class="box">-->
<!-- <div class="size-bole">{{-->
<!-- orderStatistics.numberOfStrokesByOil ? orderStatistics.numberOfStrokesByOil : 0-->
<!-- }}-->
<!-- </div>-->
<!-- <div class="size-hui">-->
<!-- <div class="nei">油品笔数</div>-->
<!-- <div class="icon-img">-->
<!-- <img src="../../../assets/images/cut/组 4666@2x.png" style="width: 20px;height: 20px">-->
<!-- </div>-->
<!-- </div>-->
<!-- </div>-->
<!-- <div class="box">-->
<!-- <div class="size-bole">-->
<!-- {{ orderStatistics.numberOfStrokesByGoods ? orderStatistics.numberOfStrokesByGoods : 0 }}-->
<!-- </div>-->
<!-- <div class="size-hui">-->
<!-- <div class="nei">商品笔数</div>-->
<!-- <div class="icon-img">-->
<!-- <img src="../../../assets/images/cut/组 4666@2x.png" style="width: 20px;height: 20px">-->
<!-- </div>-->
<!-- </div>-->
<!-- </div>-->
<!-- <div class="box1">-->
<!-- <div class="size-bole">-->
<!-- {{ orderStatistics.theTotalAmountOfTheItem ? orderStatistics.theTotalAmountOfTheItem : 0 }}-->
<!-- </div>-->
<!-- <div class="size-hui">-->
<!-- <div class="nei">商品总金额</div>-->
<!-- <div class="icon-img">-->
<!-- <img src="../../../assets/images/cut/组 5017@2x.png" style="width: 20px;height: 20px">-->
<!-- </div>-->
<!-- </div>-->
<!-- </div>-->
</div>
</div>
@ -201,9 +119,10 @@
<div class="table-box">
<el-table
:data="orderList"
size="mini"
style="width: 100%">
<el-table-column type="index" width="50" align="center" label="序号"/>
<el-table-column prop="orderNo" align="center" label="订单号" width="220"></el-table-column>
<el-table-column prop="orderNo" align="center" label="订单号" ></el-table-column>
<el-table-column prop="amount" align="center" label="订单金额(元)"></el-table-column>
<el-table-column prop="afterDiscountAmount" align="center" label="优惠金额(元)"></el-table-column>
<el-table-column prop="afterDiscountAmount" align="center" label="应收金额(元)"></el-table-column>
@ -235,7 +154,7 @@
</el-table-column>
</el-table-column>
<el-table-column prop="payUser" align="center" label="付款用户" width="110"></el-table-column>
<el-table-column prop="payUser" align="center" label="付款用户" ></el-table-column>
<el-table-column prop="status" align="center" label="支付方式">
<template slot-scope="scope">
<el-tag v-if="scope.row.status === 'unpaid'">未支付</el-tag>
@ -252,19 +171,19 @@
<el-tag type="danger" v-else>支付失败</el-tag>
</template>
</el-table-column>
<el-table-column prop="payUser" align="center" label="关联员工" width="110"></el-table-column>
<el-table-column prop="payUser" align="center" label="关联员工" ></el-table-column>
<el-table-column label="操作人" align="center" prop="staffId">
<template slot-scope="scope">
<span>{{ getRealName(staffList, scope.row.staffId) || '--' }}</span>
</template>
</el-table-column>
<el-table-column label="订单完成时间" align="center" width="160" prop="payTime">
<el-table-column label="订单完成时间" align="center" prop="payTime">
<template slot-scope="scope">
<span>{{ scope.row.payTime ? parseTime(scope.row.payTime) : "--" }}</span>
</template>
</el-table-column>
<el-table-column label="操作" align="center" width="180" class-name="small-padding fixed-width">
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button style="color: #fe8c4a" size="mini"
@click="getOrdersInfo(scope.row.id)"
@ -290,9 +209,8 @@
</div>
<div class="pagination-box">
<el-pagination
background
v-show="total>0"
layout="prev, pager, next"
layout="prev, pager, next, jumper"
:total="total"
:page.sync="queryParams.page"
:limit.sync="queryParams.pageSize"
@ -1598,7 +1516,7 @@ export default {
}
.el-form--inline .el-form-item {
margin-right: 44px;
}
.size-hui {
@ -1651,8 +1569,7 @@ export default {
.table-box {
width: 100%;
height: 60vh;
overflow: auto;
}
.pagination-box {
@ -1660,7 +1577,7 @@ export default {
margin: 10px auto;
display: flex;
align-items: center;
justify-content: center;
justify-content: flex-end;
}
.top-app-sou {
@ -1679,5 +1596,17 @@ export default {
box-sizing: border-box;
padding: 20px;
margin: 0 auto;
min-height: 82vh;
}
.top_new{
display: flex;
justify-content: space-between;
height: 65px;
background: #fff;
width: 98%;
margin: 10px auto;
border-radius: 8px;
box-sizing: border-box;
padding: 15px
}
</style>

View File

@ -1,75 +1,74 @@
<!--商品交易列表-->
<template>
<div>
<div class="top_new">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch">
<el-form-item label="" prop="staffId">
<el-select
v-model="queryParams.staffId"
clearable
placeholder="请选择关联员工"
>
<el-option v-for="item in staffList" :key="item.id" :label="item.realName" :value="item.id">
<span style="float: left">{{ item.realName }}</span>
<span style="float: right; color: #8492a6; font-size: 13px">{{ item.mobile }}</span>
</el-option>
</el-select>
</el-form-item>
<el-form-item label="" prop="orderNo">
<el-input
v-model="queryParams.orderNo"
placeholder="请输入订单号"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="" prop="payType">
<el-select
v-model="queryParams.payType"
placeholder="请选择订单类型"
clearable
style="width: 240px"
>
<el-option
v-for="item in payList"
:key="item.id"
:label="item.dictLabel"
:value="item.dictValue"
/>
</el-select>
</el-form-item>
<el-form-item label="" prop="payUser">
<el-input
v-model="queryParams.payUser"
placeholder="请输入付款用户"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="">
<el-date-picker
v-model="beginTime"
style="width: 160px"
type="date"
placeholder="交易开始日期">
</el-date-picker>
<el-date-picker
v-model="endTime"
style="width: 160px"
type="date"
placeholder="交易结束日期">
</el-date-picker>
</el-form-item>
<el-form-item >
<el-button type="primary" icon="el-icon-search" @click="handleQuery">查询</el-button>
<el-button icon="el-icon-refresh" @click="resetQuery">重置</el-button>
<el-button type="primary" @click="exportExcelGoodsOrder()">导出</el-button>
</el-form-item>
</el-form>
</div>
<div class="cot-box">
<div>
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch"
label-width="85px">
<el-form-item label="" prop="staffId">
<el-select
v-model="queryParams.staffId"
clearable
placeholder="请选择关联员工"
>
<el-option v-for="item in staffList" :key="item.id" :label="item.realName" :value="item.id">
<span style="float: left">{{ item.realName }}</span>
<span style="float: right; color: #8492a6; font-size: 13px">{{ item.mobile }}</span>
</el-option>
</el-select>
</el-form-item>
<el-form-item label="" prop="orderNo">
<el-input
v-model="queryParams.orderNo"
placeholder="请输入订单号"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="" prop="payType">
<el-select
v-model="queryParams.payType"
placeholder="请选择订单类型"
clearable
style="width: 240px"
>
<el-option
v-for="item in payList"
:key="item.id"
:label="item.dictLabel"
:value="item.dictValue"
/>
</el-select>
</el-form-item>
<el-form-item label="" prop="payUser">
<el-input
v-model="queryParams.payUser"
placeholder="请输入付款用户"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="">
<el-date-picker
v-model="beginTime"
style="width: 160px"
type="date"
placeholder="交易开始日期">
</el-date-picker>
<el-date-picker
v-model="endTime"
style="width: 160px"
type="date"
placeholder="交易结束日期">
</el-date-picker>
</el-form-item>
<el-form-item style="float: right">
<el-button type="primary" icon="el-icon-search" @click="handleQuery">查询</el-button>
<el-button icon="el-icon-refresh" @click="resetQuery">重置</el-button>
<el-button type="primary" @click="exportExcelGoodsOrder()">导出</el-button>
</el-form-item>
</el-form>
</div>
<div>
<div class="box-gang">
<div class="box2">
@ -129,98 +128,16 @@
<div style="font-weight: bold;font-size: 13px;margin-left: 5px">现金</div>
</div>
</div>
<!-- <div class="box">-->
<!-- <div class="size-bole">{{ orderStatistics.numberOfProducts }}</div>-->
<!-- <div class="size-hui">-->
<!-- <div class="nei">商品笔数</div>-->
<!-- <div class="icon-img">-->
<!-- <img src="../../../assets/images/cut/组 4666@2x.png" style="width: 20px;height: 20px">-->
<!-- </div>-->
<!-- </div>-->
<!-- </div>-->
<!-- <div class="box">-->
<!-- <div class="size-bole">{{ orderStatistics.theTotalNumberOfUnits || 0 }}</div>-->
<!-- <div class="size-hui">-->
<!-- <div class="nei">商品总数量</div>-->
<!-- <div class="icon-img">-->
<!-- <img src="../../../assets/images/cut/组 4666@2x.png" style="width: 20px;height: 20px">-->
<!-- </div>-->
<!-- </div>-->
<!-- </div>-->
<!-- <div class="box">-->
<!-- <div class="size-bole">{{ orderStatistics.theTotalAmount || 0 }}</div>-->
<!-- <div class="size-hui">-->
<!-- <div class="nei">总金额</div>-->
<!-- <div class="icon-img">-->
<!-- <img src="../../../assets/images/cut/组 4666@2x.png" style="width: 20px;height: 20px">-->
<!-- </div>-->
<!-- </div>-->
<!-- </div>-->
<!-- <div class="box">-->
<!-- <div class="size-bole">{{ orderStatistics.discountAmount || 0 }}</div>-->
<!-- <div class="size-hui">-->
<!-- <div class="nei">优惠金额</div>-->
<!-- <div class="icon-img">-->
<!-- <img src="../../../assets/images/cut/组 4666@2x.png" style="width: 20px;height: 20px">-->
<!-- </div>-->
<!-- </div>-->
<!-- </div>-->
<!-- <div class="box1">-->
<!-- <div class="size-bole">{{ orderStatistics.wechat }}</div>-->
<!-- <div class="size-hui">-->
<!-- <div class="nei">微信</div>-->
<!-- <div class="icon-img">-->
<!-- <img src="../../../assets/images/cut/组 5017@2x.png" style="width: 20px;height: 20px">-->
<!-- </div>-->
<!-- </div>-->
<!-- </div>-->
<!-- <div class="box1">-->
<!-- <div class="size-bole">{{ orderStatistics.alipay }}</div>-->
<!-- <div class="size-hui">-->
<!-- <div class="nei">支付宝</div>-->
<!-- <div class="icon-img">-->
<!-- <img src="../../../assets/images/cut/组 5017@2x.png" style="width: 20px;height: 20px">-->
<!-- </div>-->
<!-- </div>-->
<!-- </div>-->
<!-- <div class="box1">-->
<!-- <div class="size-bole">{{ orderStatistics.cash }}</div>-->
<!-- <div class="size-hui">-->
<!-- <div class="nei">现金</div>-->
<!-- <div class="icon-img">-->
<!-- <img src="../../../assets/images/cut/组 5017@2x.png" style="width: 20px;height: 20px">-->
<!-- </div>-->
<!-- </div>-->
<!-- </div>-->
</div>
</div>
<div>
<!-- <div class="wgang">-->
<!-- <div></div>-->
<!-- <div style="display: flex ">-->
<!-- <el-button type="primary" size="mini" icon="el-icon-plus" @click="exportExcelGoodsOrder()">导出订单-->
<!-- </el-button>-->
<!-- </div>-->
<!-- </div>-->
<div class="table-box">
<el-table
:data="list"
style="width: 100%">
<!-- <el-table-column type="expand">-->
<!-- <template slot-scope="props">-->
<!-- <el-form label-position="left" class="demo-table-expand" style="margin-left: 20px">-->
<!-- <el-form-item label="收银员">-->
<!-- <span>{{ queryStaf(staffList,props.row.staffId) }}</span>-->
<!-- </el-form-item>-->
<!-- <el-form-item label="来源终端">-->
<!-- <span>{{ getVal(terminalList,props.row.terminal) }}</span>-->
<!-- </el-form-item>-->
<!-- </el-form>-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- <el-table-column label="订单ID" prop="id" width="80"/>-->
<el-table-column type="index" width="50" align="center" label="序号"/>
<el-table-column label="订单号" align="center" prop="orderNo" width="220"/>
<el-table-column label="订单类型" align="center" prop="terminal"/>
@ -905,10 +822,6 @@ export default {
border: 1px solid #fe8c4a;
}
.el-form--inline .el-form-item {
margin-right: 44px;
}
.size-hui {
display: flex;
align-items: center;
@ -959,6 +872,7 @@ export default {
.table-box {
width: 100%;
min-height: 80px;
}
.pagination-box {
@ -1011,4 +925,18 @@ export default {
padding: 20px;
margin: 0 auto;
}
.el-form--inline .el-form-item {
margin-right: 30px;
}
.top_new{
display: flex;
justify-content: space-between;
background: #fff;
width: 98%;
margin: 10px auto;
border-radius: 8px;
box-sizing: border-box;
padding: 15px
}
</style>

View File

@ -9,138 +9,6 @@
</el-alert>
<points-mall></points-mall>
<!-- <div class="top-dis">-->
<!-- <div class="top-app-sou">-->
<!-- <el-form :label-position="labelPosition" label-width="40px" :model="formLabelAlign">-->
<!-- <el-form-item label="名称">-->
<!-- <el-input v-model="formLabelAlign.name" placeholder="请输入要搜索的内容"></el-input>-->
<!-- </el-form-item>-->
<!-- </el-form>-->
<!-- </div>-->
<!-- <div style="margin-left: 10px">-->
<!-- <el-button type="primary" icon="el-icon-search">查询</el-button>-->
<!-- </div>-->
<!-- </div>-->
<!--&lt;!&ndash; 列表&ndash;&gt;-->
<!-- <div class="bottom-dis">-->
<!-- <div class="wgang">-->
<!-- <el-tabs v-model="activeName" @tab-click="handleClick">-->
<!-- <el-tab-pane label="全部订单" name="first"></el-tab-pane>-->
<!-- <el-tab-pane name="first1">-->
<!-- <div slot="label" class="hgang"> 待处理/待发货 <span class="hongdian">1</span> </div>-->
<!-- </el-tab-pane>-->
<!-- <el-tab-pane name="first2">-->
<!-- <div slot="label" class="hgang"> 已完成/已发货 <span class="hongdian">1</span> </div>-->
<!-- </el-tab-pane>-->
<!-- <el-tab-pane name="first3">-->
<!-- <div slot="label" class="hgang"> 已拒绝/已退款 <span class="hongdian">1</span> </div>-->
<!-- </el-tab-pane>-->
<!-- <el-tab-pane name="first4">-->
<!-- <div slot="label" class="hgang"> 未付款订单 <span class="hongdian">1</span> </div>-->
<!-- </el-tab-pane>-->
<!-- </el-tabs>-->
<!-- </div>-->
<!-- <div class="table-box">-->
<!-- <el-table-->
<!-- :data="tableData"-->
<!-- style="width: 100%">-->
<!-- <el-table-column type="expand">-->
<!-- <template slot-scope="props">-->
<!-- <el-form label-position="left" inline class="demo-table-expand">-->
<!-- <el-form-item label="名称">-->
<!-- <span>{{ props.row.name }}</span>-->
<!-- </el-form-item>-->
<!-- </el-form>-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- <el-table-column-->
<!-- prop="date"-->
<!-- label="用户信息"-->
<!-- width="150">-->
<!-- </el-table-column>-->
<!-- <el-table-column label="余额">-->
<!-- <el-table-column-->
<!-- prop="name"-->
<!-- label="电子储值卡"-->
<!-- width="120">-->
<!-- </el-table-column>-->
<!-- <el-table-column-->
<!-- prop="name"-->
<!-- label="升值卡"-->
<!-- width="120">-->
<!-- </el-table-column>-->
<!-- </el-table-column>-->
<!-- <el-table-column label="会员等级">-->
<!-- <el-table-column-->
<!-- prop="province"-->
<!-- label="汽油"-->
<!-- width="120">-->
<!-- </el-table-column>-->
<!-- <el-table-column-->
<!-- prop="city"-->
<!-- label="柴油"-->
<!-- width="120">-->
<!-- </el-table-column>-->
<!-- <el-table-column-->
<!-- prop="city"-->
<!-- label="天然气"-->
<!-- width="120">-->
<!-- </el-table-column>-->
<!-- </el-table-column>-->
<!-- <el-table-column label="统计">-->
<!-- <el-table-column-->
<!-- prop="province"-->
<!-- label="加油金"-->
<!-- width="120">-->
<!-- </el-table-column>-->
<!-- <el-table-column-->
<!-- prop="city"-->
<!-- label="积分"-->
<!-- width="120">-->
<!-- </el-table-column>-->
<!-- <el-table-column-->
<!-- prop="city"-->
<!-- label="消费次数"-->
<!-- width="120">-->
<!-- </el-table-column>-->
<!-- </el-table-column>-->
<!-- <el-table-column-->
<!-- prop="zip"-->
<!-- label="实体卡号"-->
<!-- width="220">-->
<!-- </el-table-column>-->
<!-- <el-table-column-->
<!-- prop="zip"-->
<!-- label="状态"-->
<!-- width="120">-->
<!-- </el-table-column>-->
<!-- <el-table-column label="操作" align="center" class-name="small-padding fixed-width">-->
<!-- <template slot-scope="scope">-->
<!-- <el-button-->
<!-- size="mini"-->
<!-- type="text"-->
<!-- icon="el-icon-edit"-->
<!-- >更多操作</el-button>-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- </el-table>-->
<!-- </div>-->
<!-- <div class="pagination-box">-->
<!-- <el-pagination-->
<!-- background-->
<!-- layout="prev, pager, next"-->
<!-- :total="1000">-->
<!-- </el-pagination>-->
<!-- </div>-->
<!-- </div>-->
</el-tab-pane>
<el-tab-pane label="积分收银台订单">
<el-alert
@ -150,115 +18,6 @@
<points-cashier></points-cashier>
<!-- <div class="bottom-dis">-->
<!-- <div slot="header" class="clearfix">-->
<!-- <span>统计</span>-->
<!-- </div>-->
<!-- <div class="box-gang">-->
<!-- <div class="box" v-for="(item,index) in 7" :key="index">-->
<!-- <div class="size-hui">订单总数</div>-->
<!-- <div class="size-bole">55</div>-->
<!-- </div>-->
<!-- </div>-->
<!-- </div>-->
<!-- <div class="table-box">-->
<!-- <el-table-->
<!-- :data="tableData"-->
<!-- style="width: 100%">-->
<!-- <el-table-column type="expand">-->
<!-- <template slot-scope="props">-->
<!-- <el-form label-position="left" inline class="demo-table-expand">-->
<!-- <el-form-item label="名称">-->
<!-- <span>{{ props.row.name }}</span>-->
<!-- </el-form-item>-->
<!-- </el-form>-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- <el-table-column-->
<!-- prop="date"-->
<!-- label="用户信息"-->
<!-- width="150">-->
<!-- </el-table-column>-->
<!-- <el-table-column label="余额">-->
<!-- <el-table-column-->
<!-- prop="name"-->
<!-- label="电子储值卡"-->
<!-- width="120">-->
<!-- </el-table-column>-->
<!-- <el-table-column-->
<!-- prop="name"-->
<!-- label="升值卡"-->
<!-- width="120">-->
<!-- </el-table-column>-->
<!-- -->
<!-- </el-table-column>-->
<!-- <el-table-column label="会员等级">-->
<!-- <el-table-column-->
<!-- prop="province"-->
<!-- label="汽油"-->
<!-- width="120">-->
<!-- </el-table-column>-->
<!-- <el-table-column-->
<!-- prop="city"-->
<!-- label="柴油"-->
<!-- width="120">-->
<!-- </el-table-column>-->
<!-- <el-table-column-->
<!-- prop="city"-->
<!-- label="天然气"-->
<!-- width="120">-->
<!-- </el-table-column>-->
<!-- </el-table-column>-->
<!-- <el-table-column label="统计">-->
<!-- <el-table-column-->
<!-- prop="province"-->
<!-- label="加油金"-->
<!-- width="120">-->
<!-- </el-table-column>-->
<!-- <el-table-column-->
<!-- prop="city"-->
<!-- label="积分"-->
<!-- width="120">-->
<!-- </el-table-column>-->
<!-- <el-table-column-->
<!-- prop="city"-->
<!-- label="消费次数"-->
<!-- width="120">-->
<!-- </el-table-column>-->
<!-- </el-table-column>-->
<!-- -->
<!-- <el-table-column-->
<!-- prop="zip"-->
<!-- label="实体卡号"-->
<!-- width="220">-->
<!-- </el-table-column>-->
<!-- -->
<!-- <el-table-column-->
<!-- prop="zip"-->
<!-- label="状态"-->
<!-- width="120">-->
<!-- </el-table-column>-->
<!-- -->
<!-- <el-table-column label="操作" align="center" class-name="small-padding fixed-width">-->
<!-- <template slot-scope="scope">-->
<!-- <el-button-->
<!-- size="mini"-->
<!-- type="text"-->
<!-- icon="el-icon-edit"-->
<!-- >更多操作</el-button>-->
<!-- -->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- -->
<!-- </el-table>-->
<!-- </div>-->
<!-- <div class="pagination-box">-->
<!-- <el-pagination-->
<!-- background-->
<!-- layout="prev, pager, next"-->
<!-- :total="1000">-->
<!-- </el-pagination>-->
<!-- </div>-->
</el-tab-pane>
</el-tabs>

View File

@ -2,109 +2,109 @@
<template>
<div>
<div class="top_new">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" label-width="68px">
<el-form-item label="" prop="staffId">
<el-select
v-model="queryParams.staffId"
clearable
placeholder="请选择操作人">
<el-option v-for="item in staffList" :key="item.id" :label="item.realName" :value="item.id">
<span style="float: left">{{ item.realName }}</span>
<span style="float: right; color: #8492a6; font-size: 13px">{{ item.mobile }}</span>
</el-option>
</el-select>
</el-form-item>
<el-form-item label="">
<el-input v-model="queryParams.orderNo" clearable placeholder="请输入订单号"></el-input>
</el-form-item>
<el-form-item label="" prop="terminal">
<el-select
v-model="queryParams.terminal"
clearable
placeholder="请选择订单类型"
>
<el-option v-for="item in terminalList"
:key="item.id"
:label="item.dictLabel"
:value="item.dictValue">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="" prop="oilGunNum">
<el-select
v-model="queryParams.oilGunNum"
filterable
clearable
placeholder="请选择油品油号"
>
<el-option v-for="item in oilGunList"
:key="item.id"
:label="item.gunName"
:value="item.id">
<span style="float: left">{{ item.oilName }}</span>
<span style="float: right; color: #8492a6; font-size: 13px">{{ item.gunName }}</span>
</el-option>
</el-select>
</el-form-item>
<el-form-item label="" prop="oilGunNum">
<el-select
v-model="queryParams.oilGunNum"
filterable
clearable
placeholder="请选择油枪"
>
<el-option v-for="item in oilGunList"
:key="item.id"
:label="item.gunName"
:value="item.id">
<span style="float: left">{{ item.oilName }}</span>
<span style="float: right; color: #8492a6; font-size: 13px">{{ item.gunName }}</span>
</el-option>
</el-select>
</el-form-item>
<el-form-item label="" prop="payType">
<el-select
v-model="queryParams.payType"
clearable
placeholder="请选择支付方式"
>
<el-option v-for="item in payList"
:key="item.id"
:label="item.dictLabel"
:value="item.dictValue">
</el-option>
<el-option label="电子囤油卡" value="oilCard"/>
<el-option label="电子电子储值卡" value="balance"/>
</el-select>
</el-form-item>
<el-form-item label="">
<el-input v-model="queryParams.payUser" clearable placeholder="请输入付款用户"></el-input>
</el-form-item>
<el-form-item label="">
<el-date-picker
v-model="beginTime"
style="width: 140px"
type="date"
placeholder="开始日期">
</el-date-picker>
<el-date-picker
v-model="endTime"
style="width: 140px"
type="date"
placeholder="结束日期">
</el-date-picker>
</el-form-item>
<el-form-item style="float: right;">
<el-button type="primary" icon="el-icon-search" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" @click="resetQuery">重置</el-button>
<el-button type="primary" @click="exportExcelOilOrder()">导出</el-button>
</el-form-item>
</el-form>
</div>
<div class="cot-box">
<div>
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" label-width="68px">
<el-form-item label="" prop="staffId">
<el-select
v-model="queryParams.staffId"
clearable
placeholder="请选择操作人"
>
<el-option v-for="item in staffList" :key="item.id" :label="item.realName" :value="item.id">
<span style="float: left">{{ item.realName }}</span>
<span style="float: right; color: #8492a6; font-size: 13px">{{ item.mobile }}</span>
</el-option>
</el-select>
</el-form-item>
<el-form-item label="">
<el-input v-model="queryParams.orderNo" clearable placeholder="请输入订单号"></el-input>
</el-form-item>
<el-form-item label="" prop="terminal">
<el-select
v-model="queryParams.terminal"
clearable
placeholder="请选择订单类型"
>
<el-option v-for="item in terminalList"
:key="item.id"
:label="item.dictLabel"
:value="item.dictValue">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="" prop="oilGunNum">
<el-select
v-model="queryParams.oilGunNum"
filterable
clearable
placeholder="请选择油品油号"
>
<el-option v-for="item in oilGunList"
:key="item.id"
:label="item.gunName"
:value="item.id">
<span style="float: left">{{ item.oilName }}</span>
<span style="float: right; color: #8492a6; font-size: 13px">{{ item.gunName }}</span>
</el-option>
</el-select>
</el-form-item>
<el-form-item label="" prop="oilGunNum">
<el-select
v-model="queryParams.oilGunNum"
filterable
clearable
placeholder="请选择油枪"
>
<el-option v-for="item in oilGunList"
:key="item.id"
:label="item.gunName"
:value="item.id">
<span style="float: left">{{ item.oilName }}</span>
<span style="float: right; color: #8492a6; font-size: 13px">{{ item.gunName }}</span>
</el-option>
</el-select>
</el-form-item>
<el-form-item label="" prop="payType">
<el-select
v-model="queryParams.payType"
clearable
placeholder="请选择支付方式"
>
<el-option v-for="item in payList"
:key="item.id"
:label="item.dictLabel"
:value="item.dictValue">
</el-option>
<el-option label="电子囤油卡" value="oilCard"/>
<el-option label="电子电子储值卡" value="balance"/>
</el-select>
</el-form-item>
<el-form-item label="">
<el-input v-model="queryParams.payUser" clearable placeholder="请输入付款用户"></el-input>
</el-form-item>
<el-form-item label="">
<el-date-picker
v-model="beginTime"
style="width: 140px"
type="date"
placeholder="开始日期">
</el-date-picker>
<el-date-picker
v-model="endTime"
style="width: 140px"
type="date"
placeholder="结束日期">
</el-date-picker>
</el-form-item>
<el-form-item style="float: right;">
<el-button type="primary" icon="el-icon-search" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" @click="resetQuery">重置</el-button>
<el-button type="primary" @click="exportExcelOilOrder()">导出</el-button>
</el-form-item>
</el-form>
</div>
<div>
<div class="box-gang">
<div class="box2">
@ -175,88 +175,15 @@
</div>
</div>
<!-- <div class="box">-->
<!-- <div class="size-bole">{{ orderStatistics.numberOfOilPens }}</div>-->
<!-- <div class="size-hui">-->
<!-- <div class="nei">油品笔数</div>-->
<!-- <div class="icon-img">-->
<!-- <img src="../../../assets/images/cut/组 4666@2x.png" style="width: 20px;height: 20px">-->
<!-- </div>-->
<!-- </div>-->
<!-- </div>-->
<!-- <div class="box">-->
<!-- <div class="size-bole">{{ orderStatistics.theTotalAmountOfOil || 0 }}</div>-->
<!-- <div class="size-hui">-->
<!-- <div class="nei">油品总金额</div>-->
<!-- <div class="icon-img">-->
<!-- <img src="../../../assets/images/cut/组 4666@2x.png" style="width: 20px;height: 20px">-->
<!-- </div>-->
<!-- </div>-->
<!-- </div>-->
<!-- <div class="box">-->
<!-- <div class="size-bole">{{ orderStatistics.theTotalAmountOfTheOffer || 0 }}</div>-->
<!-- <div class="size-hui">-->
<!-- <div class="nei">优惠总额</div>-->
<!-- <div class="icon-img">-->
<!-- <img src="../../../assets/images/cut/组 4666@2x.png" style="width: 20px;height: 20px">-->
<!-- </div>-->
<!-- </div>-->
<!-- </div>-->
<!-- <div class="box">-->
<!-- <div class="size-bole">{{ orderStatistics.numberOfTransactions || 0 }}</div>-->
<!-- <div class="size-hui">-->
<!-- <div class="nei">交易数量</div>-->
<!-- <div class="icon-img">-->
<!-- <img src="../../../assets/images/cut/组 4666@2x.png" style="width: 20px;height: 20px">-->
<!-- </div>-->
<!-- </div>-->
<!-- </div>-->
<!-- <div class="box1">-->
<!-- <div class="size-bole">{{ orderStatistics.totalAmountReceived || 0 }}</div>-->
<!-- <div class="size-hui">-->
<!-- <div class="nei">实收总额</div>-->
<!-- <div class="icon-img">-->
<!-- <img src="../../../assets/images/cut/组 5017@2x.png" style="width: 20px;height: 20px">-->
<!-- </div>-->
<!-- </div>-->
<!-- </div>-->
<!-- <div class="box1">-->
<!-- <div class="size-bole">{{ orderStatistics.wechat }}</div>-->
<!-- <div class="size-hui">-->
<!-- <div class="nei">微信</div>-->
<!-- <div class="icon-img">-->
<!-- <img src="../../../assets/images/cut/组 5017@2x.png" style="width: 20px;height: 20px">-->
<!-- </div>-->
<!-- </div>-->
<!-- </div>-->
<!-- <div class="box1">-->
<!-- <div class="size-bole">{{ orderStatistics.alipay }}</div>-->
<!-- <div class="size-hui">-->
<!-- <div class="nei">支付宝</div>-->
<!-- <div class="icon-img">-->
<!-- <img src="../../../assets/images/cut/组 5017@2x.png" style="width: 20px;height: 20px">-->
<!-- </div>-->
<!-- </div>-->
<!-- </div>-->
<!-- <div class="box1">-->
<!-- <div class="size-bole">{{ orderStatistics.cash }}</div>-->
<!-- <div class="size-hui">-->
<!-- <div class="nei">现金</div>-->
<!-- <div class="icon-img">-->
<!-- <img src="../../../assets/images/cut/组 5017@2x.png" style="width: 20px;height: 20px">-->
<!-- </div>-->
<!-- </div>-->
<!-- </div>-->
</div>
</div>
<div>
<div style="height: 60vh;overflow: auto">
<div class="new_bottom">
<div>
<el-table
v-loading="loading"
border
:data="oilOrderList"
style="width: 100%">
<el-table-column type="index" width="50" align="center" label="序号"/>
<el-table-column prop="orderNo" align="center" label="订单号" width="220"></el-table-column>
<el-table-column prop="terminal" label="订单类型" align="center" width="80">
@ -264,12 +191,12 @@
<span>{{ getVal(terminalList, props.row.terminal) }}</span>
</template>
</el-table-column>
<el-table-column prop="oilGunNum" label="油品/油号" align="center" width="90">
<el-table-column prop="oilGunNum" label="油品/油号" align="center" >
<template slot-scope="props">
<span>{{ getName(oilNameList, props.row.oils) }}</span>
</template>
</el-table-column>
<el-table-column prop="oilGunNum" label="油枪" align="center" width="90">
<el-table-column prop="oilGunNum" label="油枪" align="center" >
<template slot-scope="props">
<span>{{ getName1(oilGunList, props.row.oilGunNum) }}</span>
</template>
@ -278,9 +205,9 @@
<el-table-column prop="discountAmount" label="优惠金额(元)" align="center"></el-table-column>
<el-table-column prop="payAmount" label="实付金额(元)" align="center"></el-table-column>
<el-table-column prop="balanceAmount" label="储值卡付款金额(元)" align="center" width="115"/>
<el-table-column prop="oilCardAmount" label="囤油卡付款金额(元)" align="center" width="115"/>
<el-table-column prop="payUser" label="付款用户" align="center" width="110"></el-table-column>
<el-table-column prop="balanceAmount" label="储值卡付款金额(元)" align="center" />
<el-table-column prop="oilCardAmount" label="囤油卡付款金额(元)" align="center" />
<el-table-column prop="payUser" label="付款用户" align="center" ></el-table-column>
<el-table-column prop="payType" label="支付方式" align="center">
<template slot-scope="scope">
<span>{{ getType(payList, scope.row.payType) }}</span>
@ -289,7 +216,7 @@
<span v-if="scope.row.payType=='credit'">挂账</span>
</template>
</el-table-column>
<el-table-column prop="orderStatus" label="订单状态" align="center" width="120">
<el-table-column prop="orderStatus" label="订单状态" align="center" >
<template slot-scope="scope">
<el-tag v-if="scope.row.orderStatus === 'unpaid'">未支付</el-tag>
<el-tag type="success" v-else-if="scope.row.orderStatus === 'paid'">已支付</el-tag>
@ -305,13 +232,13 @@
</el-table-column>
<el-table-column prop="orderType" label="关联员工" align="center"></el-table-column>
<el-table-column prop="orderType" label="操作人" align="center"></el-table-column>
<el-table-column label="订单完成时间" align="center" width="160" prop="payTime">
<el-table-column label="订单完成时间" align="center" prop="payTime">
<template slot-scope="scope">
<span>{{ scope.row.payTime ? parseTime(scope.row.payTime) : "--" }}</span>
</template>
</el-table-column>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="120">
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" >
<template slot-scope="scope">
<el-button style="color: #fe8c4a" @click="patchwork(scope.row)" type="text">补打
</el-button>
@ -326,9 +253,8 @@
</div>
<div class="pagination-box">
<el-pagination
background
v-show="total>0"
layout="prev, pager, next"
layout="prev, pager, next, jumper"
:total="total"
:page.sync="queryParams.page"
:limit.sync="queryParams.pageSize"
@ -360,7 +286,6 @@
<!-- 订单退款-->
<el-dialog
:close-on-click-modal="false"
title="订单退款"
width="25%"
:visible.sync="dialogRefund">
@ -1068,7 +993,7 @@ export default {
margin: 10px auto;
display: flex;
align-items: center;
justify-content: center;
justify-content: flex-end;
}
.top-app-sou {
@ -1113,4 +1038,19 @@ export default {
padding: 20px;
margin: 0 auto;
}
.top_new{
display: flex;
justify-content: space-between;
height: 120px;
background: #fff;
width: 98%;
margin: 10px auto;
border-radius: 8px;
box-sizing: border-box;
padding: 15px;
margin-bottom: 10px;
}
.new_bottom{
min-height: 80vh;
}
</style>

View File

@ -638,6 +638,7 @@ import {connectFlag, getLodop} from "@/api/LodopFuncs";
}
.table-box{
width: 100%;
min-height: 80vh;
}
.pagination-box{
width: 100%;
@ -645,6 +646,7 @@ import {connectFlag, getLodop} from "@/api/LodopFuncs";
display: flex;
align-items: center;
justify-content: center;
}
.top-app-sou{
width: 20%;

View File

@ -1,72 +1,76 @@
<!--会员充值订单-->
<template>
<div>
<div class="top_new">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" >
<el-form-item label="" prop="staffId">
<el-select
v-model="queryParams.mtStaffId"
clearable
placeholder="请选择关联员工"
>
<el-option v-for="item in staffList" :key="item.id" :label="item.realName" :value="item.id">
<span style="float: left">{{ item.realName }}</span>
<span style="float: right; color: #8492a6; font-size: 13px">{{ item.mobile }}</span>
</el-option>
</el-select>
</el-form-item>
<el-form-item label="" prop="paymentType">
<el-select
v-model="queryParams.paymentType"
clearable
placeholder="请选择订单类型"
>
<el-option v-for="item in payList"
:key="item.id"
:label="item.dictLabel"
:value="item.dictValue">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="" prop="paymentType">
<el-select
v-model="queryParams.paymentType"
clearable
placeholder="请选择支付方式"
>
<el-option v-for="item in payList"
:key="item.id"
:label="item.dictLabel"
:value="item.dictValue">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="">
<el-input v-model="queryParams.mobile" placeholder="请输入会员手机号"></el-input>
</el-form-item>
<el-form-item label="">
<el-date-picker
v-model="beginTime"
style="width: 160px"
type="date"
placeholder="交易开始日期">
</el-date-picker>
<el-date-picker
v-model="endTime"
style="width: 160px"
type="date"
placeholder="交易结束日期">
</el-date-picker>
</el-form-item>
<el-form-item >
<el-button type="primary" icon="el-icon-search" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" @click="resetQuery">重置</el-button>
<el-button type="primary" @click="exportExcelVip()">导出</el-button>
</el-form-item>
</el-form>
</div>
<div class="cot-box">
<!-- 条件查询-->
<div>
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" label-width="68px">
<el-form-item label="" prop="staffId">
<el-select
v-model="queryParams.mtStaffId"
clearable
placeholder="请选择关联员工"
>
<el-option v-for="item in staffList" :key="item.id" :label="item.realName" :value="item.id">
<span style="float: left">{{ item.realName }}</span>
<span style="float: right; color: #8492a6; font-size: 13px">{{ item.mobile }}</span>
</el-option>
</el-select>
</el-form-item>
<el-form-item label="" prop="paymentType">
<el-select
v-model="queryParams.paymentType"
clearable
placeholder="请选择订单类型"
>
<el-option v-for="item in payList"
:key="item.id"
:label="item.dictLabel"
:value="item.dictValue">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="" prop="paymentType">
<el-select
v-model="queryParams.paymentType"
clearable
placeholder="请选择支付方式"
>
<el-option v-for="item in payList"
:key="item.id"
:label="item.dictLabel"
:value="item.dictValue">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="">
<el-input v-model="queryParams.mobile" placeholder="请输入会员手机号"></el-input>
</el-form-item>
<el-form-item label="">
<el-date-picker
v-model="beginTime"
style="width: 160px"
type="date"
placeholder="交易开始日期">
</el-date-picker>
<el-date-picker
v-model="endTime"
style="width: 160px"
type="date"
placeholder="交易结束日期">
</el-date-picker>
</el-form-item>
<el-form-item style="float: right">
<el-button type="primary" icon="el-icon-search" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" @click="resetQuery">重置</el-button>
<el-button type="primary" @click="exportExcelVip()">导出</el-button>
</el-form-item>
</el-form>
</div>
<!-- 统计-->
<div>
@ -668,7 +672,6 @@ export default {
<style scoped>
.app-top {
width: 100%;
height: 60px;
box-sizing: border-box;
padding: 10px;
@ -703,9 +706,6 @@ export default {
border: 1px solid #fe8c4a;
}
.el-form--inline .el-form-item {
margin-right: 44px;
}
.size-hui {
display: flex;
@ -723,37 +723,7 @@ export default {
}
}
.size-bole {
height: 31px;
font-family: YouSheBiaoTiHei;
font-weight: 400;
font-size: 24px;
color: #555555;
text-align: left;
font-style: normal;
text-transform: none;
}
.icon-img {
width: 20px;
height: 20px;
margin-right: 5px;
img {
float: right;
width: 20px;
height: 20px;
}
}
.wgang {
width: 100%;
display: flex;
align-items: center;
justify-content: space-between;
margin-bottom: 20px;
}
.table-box {
width: 100%;
@ -767,15 +737,14 @@ export default {
justify-content: center;
}
.top-app-sou {
width: 20%;
}
.tk {
text-align: center;
color: grey;
margin: 10px 0;
}
.el-form--inline .el-form-item {
margin-right: 4px !important;
}
.box1 {
padding: 5px;
@ -809,4 +778,14 @@ export default {
padding: 20px;
margin: 0 auto;
}
.top_new{
display: flex;
justify-content: space-between;
background: #fff;
width: 98%;
margin: 10px auto;
border-radius: 8px;
box-sizing: border-box;
padding: 15px
}
</style>

View File

@ -1,16 +0,0 @@
{ // launch.json configurations app-plus/h5/mp-weixin/mp-baidu/mp-alipay/mp-qq/mp-toutiao/mp-360/
// launchtypelocalremote, localremote
"version": "0.0",
"configurations": [{
"default" :
{
"launchtype" : "local"
},
"mp-weixin" :
{
"launchtype" : "local"
},
"type" : "uniCloud"
}
]
}

View File

@ -20,7 +20,7 @@
<view class="card_1" @click="goDetails('oilCard')">
<view class="top_card">
<view class="">囤油卡</view>
<view style="display: flex;" @click="goCode()">
<view style="display: flex;" @click="goCode()">
<view style="margin-right: 5px;">汽油92# 7.28/L</view>
<image src="../../static/new/rwm.png" style="width: 25px; height: 25px; "></image>
</view>
@ -52,6 +52,21 @@
NO.xxxxxxxxxxxxxxxxxx
</view> -->
</view>
<view class="card_" @click="goDetails('fleet')" v-if="fleetInfo">
<view class="top_card">
<view class="">车队名称</view>
<view class="" @click="goCode()">
<image src="../../static/new/rwm.png" style="width: 25px; height: 25px; "></image>
</view>
</view>
<view class="card-b">
当前余额
</view>
<view class="card-num">
¥{{cardBalance.cardBalance || 0}}
</view>
</view>
</view>
</template>
@ -71,7 +86,8 @@
cardsList: [],
cardsIndex: 0,
title: '',
giftInfo:{},
giftInfo: {},
fleetInfo:{}
}
},
@ -82,8 +98,26 @@
this.query.chainStoreId = uni.getStorageSync('chainStoreId');
// this.getCardFuleRecords();
this.getUserBalance()
this.getFleetInfo()
},
methods: {
getFleetInfo(){
request({
url: '/fleetInfo/getFleetInfoByStoreId',
method: 'get',
params:{storeId:uni.getStorageSync('storeId')}
}).then(res => {
if (res.code == 200) {
this.fleetInfo = res.data
console.log(this.fleetInfo, '111');
}else{
this.fleetInfo = {}
}
})
},
goFleetDetails(){
},
goCode() {
uni.navigateTo({
url: '/pagesHome/QRcode/QRcode'
@ -96,7 +130,7 @@
},
goDetails(val) {
uni.navigateTo({
url: '/pagesHome/cardDetails/index?type='+val
url: '/pagesHome/cardDetails/index?type=' + val
})
},
s_() {
@ -129,7 +163,7 @@
}).then(res => {
if (res.code == 200) {
this.cardsList = res.data.records
console.log(this.cardsList,'131');
console.log(this.cardsList, '131');
}
})
},
@ -350,4 +384,4 @@
text-align: right;
}
</style>
</style>

View File

@ -2,47 +2,42 @@
<view class="centenr">
<view class="Candywrapper">
<view class="bai-bs">
<view class="">
<image src="../../static/logo.png" style="width: 60px; height: 60px; "></image>
<view class="">
<image :src="couponInfo.backgroundImage" v-if="couponInfo.backgroundImage" style="width: 60px; height: 60px; "></image>
<image src="../../static/logo.png" v-else style="width: 60px; height: 60px; "></image>
</view>
<view class="rr-box">
<view class="title_">50元优惠券</view>
<view style="font-size: 12px;color: #666666;">最低消费500元</view>
<view class="title_">{{couponInfo.name}}</view>
<view style="font-size: 12px;color: #666666;">{{couponInfo.useCondition}}</view>
<view style="width: 100%;display: flex;justify-content: space-between; ">
<view class="red-size">兑换券</view>
<view class="red-size">剩余3张</view>
<view class="red-size" v-if="couponInfo.type==1">代金券</view>
<view class="red-size" v-if="couponInfo.type==2">兑换券</view>
<view class="red-size" v-if="couponInfo.type==3">折扣券</view>
<view class="red-size" v-if="couponInfo.type==4">油品立减券</view>
<view class="red-size" v-if="couponInfo.type==5">单品代金券</view>
<view class="red-size">剩余{{ couponInfo.tfGetNum ? (couponInfo.tfTotal - couponInfo.tfGetNum) : couponInfo.tfTotal}}</view>
</view>
</view>
</view>
<view class="bai-bs">
<view class="title_">兑换数量</view>
<u-number-box v-model="value" @change="valChange"></u-number-box>
</view>
<view class="bai-box">
<view class="title_">兑换内容</view>
<view class="si_">本兑换券为一次性使用券持有人凭此券可在指定兑换
点免费兑换一瓶可口可乐经典口味瓶装饮料规格为
300毫升此券仅限兑换同等价值商品不找零
兑换现金不可与其他优惠活动同时使用</view>
</view>
<view class="bai-box">
<view class="title_">使用须知</view>
<view class="si_">有效期领取后3天内有效</view>
</view>
<view class="bai-box">
<view class="title_">兑换方式</view>
<view class="si_">门店自提</view>
<view class="si_">有效期领取后{{couponInfo.validityDay || 0}}天内有效</view>
<view class="si_">领取说明</view>
<view class="si_">1每人限领{{couponInfo.getNumLimit || 0}}</view>
<view class="si_">2每日限领{{couponInfo.dayGetLimit || 0}}</view>
<view class="si_">核销说明</view>
<view class="si_">核销说明</view>
</view>
<view class="bai-box">
<view style="width: 100%; display: flex;align-items: center;justify-content: space-between; ">
<view class="title_">适用门店</view>
<view class="d-s" style="font-size: 14px;color: #FF2828;">
<view class="d-s" style="font-size: 14px;color: #FF2828;" @click="goGoGo()">
<image src="../../static/icon/reddh.png" style="width: 18px; height: 18px; "></image>
导航
</view>
</view>
<view class="si">中建锦绣广场二期站</view>
<view class="si">山东省济南市槐荫区 | 3.0km</view>
<view class="si">{{store.name}}</view>
<view class="si">{{store.address}} | {{distance}}km</view>
</view>
@ -55,13 +50,112 @@
</template>
<script>
import request from '../../utils/request';
export default {
data() {
return {
value: 0
value: 0,
certificateId: '',
couponInfo: {},
AppToken: uni.getStorageSync("App-Token"),
//
longitude: "",
//
latitude: "",
//
lon: "",
//
lat: "",
//
store: {
name: "测试油站",
description: "济南分店",
address: "济南槐荫区"
},
distance: 0,
}
},
onLoad(e) {
this.certificateId = e.certificateId
this.getInfo()
this.getAddress(uni.getStorageSync("storeId"))
},
methods: {
goGoGo() {
let lat = Number(this.lat)
let lon = Number(this.lon)
uni.openLocation({
latitude: lat,
longitude: lon,
name: this.store.name,
address: this.store.address,
success: function() {
console.log('success');
},
complete: function(res) {
console.log(res);
}
});
},
//
getAddress(storeId) {
let _this = this;
uni.getLocation({
// 使wgs84 使gcj02
type: 'gcj02', // 使
success: function(res) {
if (_this.longitude == "" && _this.latitude == "") {
_this.longitude = res.longitude;
_this.latitude = res.latitude
}
console.log('经度: ' + _this.longitude);
console.log('纬度: ' + _this.latitude);
request({
url: 'business/storeInformation/store/recentlyStore',
method: 'post',
data: {
"lon": _this.longitude,
"lat": _this.latitude,
"storeId": storeId,
"isLogin": _this.AppToken ? "0" : "1", // 0
},
}).then((response) => {
if (response.data.store) {
_this.distance = (Math.ceil(response.data.distance))
.toFixed(1)
_this.store = response.data.store
_this.lon = _this.store.longitude
_this.lat = _this.store.latitude
console.log(_this.store, 129);
} else {
uni.showToast({
title: "当前店铺已关闭!!!",
icon: "none"
})
}
}).catch(err => {})
},
fail: function(err) {
console.log('获取位置信息失败: ' + err.errMsg);
}
});
},
getInfo() {
request({
url: '/cardCoupon/' + this.certificateId,
method: 'get',
}).then(res => {
console.log(res, 74);
if (res.code == 200) {
this.couponInfo = res.data
}
})
},
valChange(e) {
console.log('当前值为: ' + e.value)
}
@ -155,4 +249,4 @@
display: flex;
align-items: center;
}
</style>
</style>

View File

@ -2,21 +2,22 @@
<view class="centenr">
<view class="Candywrapper">
<view class="f-box" v-for="(item,index) in list" :key="index" @click="goDetails()">
<view class="f-top">中建锦绣二期站可用</view>
<view class="f-box" v-for="(item,index) in list" :key="index" @click="goDetails(item.id)">
<view class="f-top">{{item.storeName}}可用</view>
<view class="f-bs">
<image src="../../static/logo.png" style="width: 60px; height: 60px; "></image>
<image :src="item.backgroundImage" v-if="item.backgroundImage" style="width: 60px; height: 60px; "></image>
<image src="../../static/logo.png" v-else style="width: 60px; height: 60px; "></image>
<view class="r-box">
<view class="">
<view class="m_">50元优惠</view>
<view class="p_">最低消费100元</view>
<view class="q_">代金券</view>
<view class="m_">{{item.name}}</view>
<view class="p_">{{item.useCondition}}</view>
<view class="q_">{{item.typeName}}</view>
</view>
<view class="">
<view class="an_">领取</view>
<u-line-progress :percentage="50" :showText="false" height="6"
activeColor="#FA6400"></u-line-progress>
<view class="hui_">券已领70%</view>
<view class="hui_">券已领{{item.scale}}</view>
</view>
</view>
@ -35,7 +36,6 @@
total: 0,
queryParams: {
storeId: '',
useStatus: 0,
pageNo: 1,
pageSize: 30
}
@ -59,7 +59,7 @@
methods: {
getList() {
request({
url: 'business/marketingActivity/cardFavorable/appletList',
url: '/cardCoupon/queryByPageAndStoreId',
method: 'get',
params: this.queryParams
}).then(res => {
@ -75,9 +75,9 @@
url: '/pagesMy/integral/integral'
})
},
goDetails() {
goDetails(id) {
uni.navigateTo({
url: '/pagesHome/certificate/details'
url: '/pagesHome/certificate/details?certificateId='+id
})
}
}

View File

@ -1,51 +1,83 @@
<template>
<view class="centenr">
<!-- 储值卡 -->
<view class="vip-top" v-if="type=='balance'">
<view class="t-right">储值卡 <u-icon name="arrow-down-fill" color="#fff" size="12"></u-icon> </view>
<view class="t-title">当前余额</view>
<view class="t-num">{{cardBalance.cardBalance || 0}}</view>
</view>
<!-- 囤油卡 -->
<view class="vip-top" v-if="type=='oilCard'">
<view class="t-right">囤油卡 <u-icon name="arrow-down-fill" color="#fff" size="12"></u-icon> </view>
<view class="t-title">剩余油量L</view>
<view class="t-num">{{cardBalance.cardBalance || 0}}</view>
</view>
<view class="vip-title">
<view class="">{{storeName || "--"}}</view>
<!-- <image src="../../static/new/qh.png" style="width: 18px; height: 18px;" @click="show = true"></image> -->
</view>
<view class="input-box">
<view class="i-title">充值金额</view>
<view class="n_input">
<input type="text" v-model="rechargeOrder.balance" :disabled="isEdit">
<view class="r-title">
{{staff.realName || "--"}}
<!-- 储值卡 -->
<view v-if="type=='balance'">
<view class="input-box">
<view class="i-title">充值金额</view>
<view class="n_input">
<input type="text" v-model="rechargeOrder.balance" :disabled="isEdit">
<view class="r-title">
{{staff.realName || "--"}}
</view>
</view>
</view>
<view class="wrap_box">
<view class="w_box" v-for="(item,index) in rechargeList" :key="index" @click="setIndex(index,item)"
:class="{ 'acvit' :windex == index}">
<view class="">{{item.rechargeBalance}}</view>
<view class="">{{item.giftBalance}}</view>
</view>
<view class="w_box" @click="setIndex(rechargeList.length)"
:class="{ 'acvit' :windex == rechargeList.length}">
<view class="" style="line-height: 40px;">自定义金额</view>
</view>
</view>
<view class="input-box">
<view class="i-title">赠送金额</view>
<view class="n_input">
<input type="text" v-model="rechargeOrder.giftBalance" disabled>
</view>
</view>
<view class="input-box">
<view class="i-title">充值备注</view>
<view class="b_input">
<input type="text" v-model="rechargeOrder.remark">
</view>
</view>
</view>
<view class="wrap_box">
<view class="w_box" v-for="(item,index) in rechargeList" :key="index" @click="setIndex(index,item)"
:class="{ 'acvit' :windex == index}">
<view class="">{{item.rechargeBalance}}</view>
<view class="">{{item.giftBalance}}</view>
<!-- 囤油卡 -->
<view v-if="type=='oilCard'">
<view class="input-box">
<view class="i-title">充值金额</view>
<view class="n_input">
<input type="text" v-model="rechargeOrder.balance" :disabled="isEdit">
<view class="r-title">
{{staff.realName || "--"}}
</view>
</view>
</view>
<view class="w_box" @click="setIndex(rechargeList.length)"
:class="{ 'acvit' :windex == rechargeList.length}">
<view class="" style="line-height: 40px;">自定义金额</view>
</view>
</view>
<view class="input-box">
<view class="i-title">赠送金额</view>
<view class="n_input">
<input type="text" v-model="rechargeOrder.giftBalance" disabled>
</view>
</view>
<view class="input-box">
<view class="i-title">充值备注</view>
<view class="b_input">
<input type="text" v-model="rechargeOrder.remark">
<view class="wrap_box">
<view class="w_box1" v-for="(item,index) in oilRechargeList" :key="index" @click="setIndex(index,item)"
:class="{ 'acvit' :windex == index}">
<view class="">充值{{item.rechargeBalance}}囤油{{item.incomeLitres}}</view>
<view class="">锁定单价{{item.lockPrice}}/L</view>
</view>
</view>
<view class="input-box">
<view class="i-title">充值备注</view>
<view class="b_input">
<input type="text" v-model="rechargeOrder.remark">
</view>
</view>
</view>
<view class="title-box">
<view class="i-title">充值有礼</view>
<view class="i-text" v-for="(item,index) in describe" :key="index">{{item.discountActiveDescribe}}</view>
@ -84,13 +116,15 @@
export default {
data() {
return {
type: 'balance',
type: 'oilCard',
show: false,
windex: 0,
storeId: uni.getStorageSync("storeId"),
storeName: "",
//
rechargeList: [],
//
oilRechargeList: [],
//
staffList: [],
staff: {},
@ -120,16 +154,17 @@
},
onShow() {
this.getList()
this.getList1()
this.getUserBalance()
this.getDescribe()
},
methods: {
//
goRecharge() {
if (this.type=='oilCard'){
if (this.type == 'oilCard') {
uni.showToast({
icon:'error',
title:"暂未开发!"
icon: 'error',
title: "暂未开发!"
})
return;
}
@ -254,6 +289,20 @@
this.staff = res.data.staff
})
},
//
getList1() {
request({
url: "business/marketingActivity/cardFuelDiesel/selectAllApplet",
method: 'get',
params: {
storeId: this.storeId,
activeStatus: 1
},
}).then((res) => {
this.oilRechargeList = res.data.records
console.log(res, 271);
})
},
getUserBalance() {
request({
url: '/business/userManager/user/getUserBalanceApplet',
@ -270,19 +319,24 @@
},
setIndex(index, data) {
this.windex = index
if (index != this.rechargeList.length) {
this.rechargeOrder.balance = data.rechargeBalance
this.rechargeOrder.payAmount = data.rechargeBalance
this.rechargeOrder.bidBalance = data.bidBalance
this.rechargeOrder.rechargeBalance = data.rechargeBalance
this.rechargeOrder.giftBalance = data.giftBalance
this.rechargeOrder.id = data.id
} else {
this.rechargeOrder.balance = 0
this.rechargeOrder.payAmount = 0
this.rechargeOrder.bidBalance = 0
this.rechargeOrder.rechargeBalance = 0
this.rechargeOrder.giftBalance = 0
if (this.type == 'balance') {
if (index != this.rechargeList.length) {
this.rechargeOrder.balance = data.rechargeBalance
this.rechargeOrder.payAmount = data.rechargeBalance
this.rechargeOrder.bidBalance = data.bidBalance
this.rechargeOrder.rechargeBalance = data.rechargeBalance
this.rechargeOrder.giftBalance = data.giftBalance
this.rechargeOrder.id = data.id
} else {
this.rechargeOrder.balance = 0
this.rechargeOrder.payAmount = 0
this.rechargeOrder.bidBalance = 0
this.rechargeOrder.rechargeBalance = 0
this.rechargeOrder.giftBalance = 0
}
}
if (this.type == 'oilCard') {
}
}
}
@ -404,6 +458,19 @@
margin-right: 1%;
}
.w_box1 {
width: 48%;
border: 1px solid #EEEEEE;
border-radius: 4px;
text-align: center;
color: #333333;
box-sizing: border-box;
padding: 5px;
font-size: 14px;
margin-bottom: 15px;
margin-right: 1%;
}
.anniu_ {
width: 80%;
height: 35px;

View File

@ -22,7 +22,8 @@
<view class="si_"> 1每人限领10张 2每日</view>
<view class="si_">核销说明</view>
<view class="si_" style="display: flex;align-items: center;">
<view style="width: 6px;height: 6px;background: #FF9655;margin-right: 5px;border-radius: 50%;"></view>
<view style="width: 6px;height: 6px;background: #FF9655;margin-right: 5px;border-radius: 50%;">
</view>
以下模块可用一键加油扫码买单
</view>
</view>
@ -38,11 +39,7 @@
<view class="si">山东省济南市槐荫区 | 3.0km</view>
</view>
</view>
<view class="bottom-box">
<view class="or-num">免费</view>
<view class="anniu">立即领取</view>
<view class="but-sub">保存</view>
</view>
</view>
</template>
@ -148,4 +145,18 @@
display: flex;
align-items: center;
}
.but-sub {
width: 305px;
height: 40px;
line-height: 40px;
margin: 0 auto;
background-color: #FF9655;
color: white;
border-radius: 50px;
text-align: center;
position: absolute;
bottom: 40px;
left: 11%;
}
</style>

View File

@ -10,13 +10,14 @@
<view class="box-hang">
<view class=""><span style="color: red;">*</span>开户门店</view>
<view class="dis">
<input v-model="value" style="text-align: right;"></input>
<text>{{storeName || '暂未选择'}}</text>
<u-icon name="arrow-right" size="14"></u-icon>
</view>
</view>
<view class="box-hang">
<view class="box-hang" @click="show = !show">
<view class=""><span style="color: red;">*</span>开户类型</view>
<view class="dis">
<input v-model="value" style="text-align: right;"></input>
<text>{{fleetInfo.cardType}}</text>
</view>
</view>
<view class="box-hang" style="margin-top: 10px;">
@ -32,7 +33,7 @@
<image style="width: 24px;height: 24px;margin-left: 5px;" src="@/static/my/fleetRemove.png"></image>
</view>
</view>
<view class="box-end" @click="show = !show">
<view class="box-end">
<image style="width: 15px;height: 15px;margin-right: 5px;margin-top: 6px;"
src="@/static/my/fleetAdd.png"></image>
<text>添加管理员</text>
@ -59,14 +60,20 @@
value: "xxxxxx",
value1: true,
show: false,
columns: [],
columns: [
['储值卡', '囤油卡']
],
//
staffList: [],
fleetInfo:{},
fleetInfo: {
cardType: '储值卡'
},
storeName: '',
storeList: []
}
},
onShow() {
this.getStaffList(uni.getStorageSync("storeId"))
this.getStoreList()
},
onPullDownRefresh() {
//
@ -84,16 +91,23 @@
},
methods: {
//
getStaffList(storeId) {
this.columns = []
let _this = this;
getStoreList() {
request({
url: "business/member/staff/queryList1/" + storeId,
url: '/business/storeInformation/store/selectByStoreId',
method: 'get',
}).then((res) => {
_this.staffList = res.data
_this.columns.push(_this.staffList)
params: {
chainStoreId: uni.getStorageSync("chainStoreId"),
}
}).then(res => {
if (res.code == 200) {
this.storeList = res.data
this.storeList.forEach(item => {
if (item.id == uni.getStorageSync("storeId")){
this.storeName = item.name
}
})
}
console.log(res, '105');
})
},
cancel() {

View File

@ -12,7 +12,7 @@
<view class="wrap-box">
<view class="w_box" v-for="(item,index) in 30" :key="index" @click="setIndex(index)"
:class="{'acv_w' : wIndex == index }">
<view class="">6</view>
<view class="">{{item+1}}</view>
<image src="@/static/imgs/jinbi.png" style="width: 25px; height: 25px; "></image>
<view class="">5积分</view>
</view>
@ -37,8 +37,8 @@
<view class="_bbox">
<!-- <view class="b_title">获取您的位置信息</view> -->
<view class="">
1.签到时间
{{signInRule}}
<!-- 1.签到时间
全天可签到不限制具体时间段
2.签到方式
用户通过小程序的签到入口进行点击签到
@ -48,7 +48,7 @@
激励机制
4补签与断签
不允许用户进行补签以恢复连续签到天数
断签后用户需重新开始计算连续签到天数
断签后用户需重新开始计算连续签到天数 -->
</view>
</view>
@ -64,7 +64,9 @@
return {
wIndex: 0,
show: false,
equityShow: false
equityShow: false,
list: [],
signInRule: ''
}
},
onLoad() {
@ -72,27 +74,39 @@
},
onPullDownRefresh() {
//
this.resetting() //
this.getList() //
uni.stopPullDownRefresh()
},
onReachBottom() {
//
if (this.pageNo >= this.totalPage) {
uni.showToast({
title: '没有下一页数据',
icon: 'none'
})
} else {
this.pageNo++
this.getList()
}
},
onShow() {
this.getList()
this.getSignIn()
},
components: {
},
methods: {
getSignIn() {
request({
url: '/business/integral/integralSettings/getIntegralSignInRules',
method: 'get',
params: {
storeId: uni.getStorageSync("storeId")
}
}).then((res) => {
console.log(res, 104);
if (res.code == 200) {
this.signInRule = res.data
}
})
},
equityclose() {
this.equityShow = false
},
@ -100,35 +114,19 @@
this.wIndex = index
this.show = true
},
//
resetting() {
this.pageNo = 1
this.pageSize = 10
this.totalPage = ''
this.List = []
},
//
async getList() {
// uni.showLoading({
// title: ''
// });
let res = await request({
url: '网络请求',
getList() {
request({
url: '/business/integral/integralSettings/getIntegral',
method: 'get',
data: {
pageNo: this.pageNo,
pageSize: this.pageSize,
params: {
storeId: uni.getStorageSync("storeId")
}
}).then((res) => {
console.log(res, 107);
if (res.code == 200) {
this.list = res.data
}
})
if (res.code == 200) {
uni.hideLoading(); //
if (this.pageNo != 1) {
this.List = this.ruleList.concat(res.result.records)
} else {
this.List = res.result.records
}
this.totalPage = res.result.pages
}
},
goback() {
uni.navigateBack()