bug修改
This commit is contained in:
parent
31a8ed0e21
commit
261d559f1a
@ -10,7 +10,7 @@
|
||||
</el-form-item>
|
||||
<el-form-item label="活动时间" prop="activityTimeType">
|
||||
<div class="d-s">
|
||||
<div class="icon-type" v-for="(item,index) in activityTimeTypeList" :key="index"
|
||||
<div class="icon-type" v-for="(item,index) in activityTimeTypeList" :key="item.id"
|
||||
:class="{ 'acvtive' : index === tindex1 }" @click="Typeindex1(index)">
|
||||
<img src="@/assets/images/wx.png" style="width: 20px;height: 20px" v-if="index != tindex1">
|
||||
<img src="@/assets/images/xz.png" style="width: 20px;height: 20px" v-if="index == tindex1">
|
||||
@ -42,7 +42,7 @@
|
||||
{{ item }}
|
||||
<el-checkbox-group v-model="weekDay" v-if="item=='每周'" style="margin-left: 20px"
|
||||
:disabled="tindex3!=0">
|
||||
<el-checkbox v-for="(item,index) in weekList" :key="index" :label="item"></el-checkbox>
|
||||
<el-checkbox v-for="(item,index) in weekList" :key="item.id" :label="item"></el-checkbox>
|
||||
</el-checkbox-group>
|
||||
<el-select v-model="monthDay" placeholder="请选择每月固定日期" multiple v-if="item=='每月'"
|
||||
:disabled="tindex3!=1"
|
||||
@ -80,7 +80,7 @@
|
||||
v-for="(item,index) in userGradeList"
|
||||
:label="item.name"
|
||||
:value="item.id.toString()"
|
||||
:key="index"></el-option>
|
||||
:key="item.id"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="会员标签" prop="userLabelIds">
|
||||
@ -142,7 +142,7 @@
|
||||
@click="addPoints(pointOrderType)">
|
||||
</div>
|
||||
|
||||
<div v-for="(item,index) in pointList" :key="index" style="display:flex;align-items: center;font-size: 14px;margin: 15px 0;margin-left: 11%">
|
||||
<div v-for="(item,index) in pointList" :key="item.id" style="display:flex;align-items: center;font-size: 14px;margin: 15px 0;margin-left: 11%">
|
||||
<span>消费满</span>
|
||||
<el-input placeholder="请输入" style="width: 39%;margin: 0 10px" v-model="item.consumeAmount">
|
||||
<template slot="append" v-if="pointOrderType==2">L</template>
|
||||
@ -170,7 +170,7 @@
|
||||
@click="addGrowthValues(growthValueOrderType)">
|
||||
</div>
|
||||
|
||||
<div v-for="(item,index) in growthValueList" :key="index" style="display:flex;align-items: center;font-size: 14px;margin: 15px 0;margin-left: 11%">
|
||||
<div v-for="(item,index) in growthValueList" :key="item.id" style="display:flex;align-items: center;font-size: 14px;margin: 15px 0;margin-left: 11%">
|
||||
<span>消费满</span>
|
||||
<el-input placeholder="请输入" style="width: 39%;margin: 0 10px" v-model="item.consumeAmount">
|
||||
<template slot="append" v-if="growthValueOrderType==2">L</template>
|
||||
@ -199,7 +199,7 @@
|
||||
@click="addCoupons(couponOrderType)">
|
||||
</div>
|
||||
|
||||
<div v-for="(item,index) in couponList" :key="index" style="font-size: 14px;margin: 15px 0;margin-left: 11%;display:flex;align-items: center;">
|
||||
<div v-for="(item,index) in couponList" :key="item.id" style="font-size: 14px;margin: 15px 0;margin-left: 11%;display:flex;align-items: center;">
|
||||
<span>消费满</span>
|
||||
<el-input placeholder="请输入" style="width: 30%;margin: 0 10px" v-model="item.consumeAmount">
|
||||
<template slot="append" v-if="couponOrderType==2">L</template>
|
||||
@ -470,6 +470,7 @@ export default {
|
||||
})
|
||||
},
|
||||
getInfo() {
|
||||
console.log("从修改页面带过来的id",this.activeId)
|
||||
getInfoActivity(this.activeId).then(res => {
|
||||
if (res.data) {
|
||||
this.ruleForm = res.data
|
||||
@ -505,15 +506,16 @@ export default {
|
||||
this.weekDay = []
|
||||
this.monthDay = []
|
||||
}
|
||||
if (res.data.pointList) {
|
||||
if (res.data.pointList && res.data.pointList.length > 0) {
|
||||
console.log("当前消费有礼活动的子表 集合", res.data.pointList)
|
||||
this.pointList = res.data.pointList
|
||||
this.pointOrderType = res.data.pointList[0].orderType
|
||||
}
|
||||
if (res.data.growthValueList) {
|
||||
if (res.data.growthValueList && res.data.growthValueList.length > 0) {
|
||||
this.growthValueList = res.data.growthValueList
|
||||
this.growthValueOrderType = res.data.growthValueList[0].orderType
|
||||
}
|
||||
if (res.data.couponList) {
|
||||
if (res.data.couponList && res.data.couponList.length > 0) {
|
||||
this.couponList = res.data.couponList
|
||||
this.couponOrderType = res.data.couponList[0].orderType
|
||||
}
|
||||
|
@ -548,6 +548,8 @@ export default {
|
||||
created() {
|
||||
this.getList();
|
||||
this.tableData1list();
|
||||
//机构下拉
|
||||
this.selectChildByDeptIdApi();
|
||||
},
|
||||
methods: {
|
||||
submitEnable(val){
|
||||
@ -677,10 +679,14 @@ export default {
|
||||
this.formRule.deptId = this.deptId
|
||||
},
|
||||
addMerchantShow() {
|
||||
console.log("点击新增商户",this.deptListSelect)
|
||||
console.log("id",this.deptId)
|
||||
|
||||
this.addMerchantTitile = '新增商户信息'
|
||||
this.addMerchants = true
|
||||
this.form = {}
|
||||
this.form.deptId = this.deptId
|
||||
this.form.deptId = this.deptListSelect[0].deptId
|
||||
this.getDeptList(this.form.deptId)
|
||||
},
|
||||
chooseDept(deptId){
|
||||
this.form.merchantName = ""
|
||||
|
@ -10,6 +10,7 @@ import com.alibaba.excel.EasyExcel;
|
||||
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.core.toolkit.Wrappers;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.fuint.api.fuyou.entity.MerchantConfig;
|
||||
@ -20,15 +21,21 @@ import com.fuint.business.convenienceSore.dto.LJGoodsDto;
|
||||
import com.fuint.business.convenienceSore.mapper.LJGoodsMapper;
|
||||
import com.fuint.business.convenienceSore.service.LJGoodsService;
|
||||
import com.fuint.business.convenienceSore.service.StockTrackService;
|
||||
import com.fuint.business.fleet.mapper.FleetInfoMapper;
|
||||
import com.fuint.business.fleet.mapper.FleetLinesChangeMapper;
|
||||
import com.fuint.business.fleet.mapper.FleetMemberMapper;
|
||||
import com.fuint.business.largeSscreen.vo.OrderGoodsVO;
|
||||
import com.fuint.business.marketingActivity.cardCoupon.entity.CardCouponUser;
|
||||
import com.fuint.business.marketingActivity.cardCoupon.mapper.CardCouponUserMapper;
|
||||
import com.fuint.business.marketingActivity.cardFavorable.service.CardFavorableRecordService;
|
||||
import com.fuint.business.marketingActivity.cardFule.entity.CardFuelRecord;
|
||||
import com.fuint.business.marketingActivity.cardFule.mapper.CardFuelRecordMapper;
|
||||
import com.fuint.business.marketingActivity.cardValueOrders.entity.CardValueOrders;
|
||||
import com.fuint.business.order.dto.AllOrderInfoDto;
|
||||
import com.fuint.business.order.dto.AllOrderInfoRes;
|
||||
import com.fuint.business.order.entity.*;
|
||||
import com.fuint.business.order.mapper.AllOrderInfoMapper;
|
||||
import com.fuint.business.order.mapper.CardBalanceChangeMapper;
|
||||
import com.fuint.business.order.mapper.OilOrderMapper;
|
||||
import com.fuint.business.order.mapper.OrderGoodsMapper;
|
||||
import com.fuint.business.order.service.*;
|
||||
@ -46,6 +53,10 @@ import com.fuint.business.petrolStationManagement.service.OilTrackingService;
|
||||
import com.fuint.business.store.entity.MtStore;
|
||||
import com.fuint.business.store.mapper.MtStoreMapper;
|
||||
import com.fuint.business.store.service.StoreService;
|
||||
import com.fuint.business.userManager.entity.MtUserFuel;
|
||||
import com.fuint.business.userManager.entity.UserBalance;
|
||||
import com.fuint.business.userManager.mapper.MtUserFuelMapper;
|
||||
import com.fuint.business.userManager.mapper.UserBalanceMapper;
|
||||
import com.fuint.business.userManager.service.UserBalanceService;
|
||||
import com.fuint.common.dto.AccountInfo;
|
||||
import com.fuint.common.service.MemberService;
|
||||
@ -92,9 +103,29 @@ public class AllOrderInfoServiceImpl extends ServiceImpl<AllOrderInfoMapper, All
|
||||
private ISysDeptService deptService;
|
||||
|
||||
@Resource
|
||||
AllOrderInfoMapper allOrderInfoMapper;
|
||||
private AllOrderInfoMapper allOrderInfoMapper;
|
||||
@Autowired
|
||||
OilNumberMapper oilNumberMapper;
|
||||
private OilNumberMapper oilNumberMapper;
|
||||
|
||||
//囤油卡相关 mapper
|
||||
@Autowired
|
||||
private MtUserFuelMapper mtUserFuelMapper;
|
||||
@Autowired
|
||||
private CardFuelRecordMapper cardFuelRecordMapper;
|
||||
//车队卡相关 mapper
|
||||
@Autowired
|
||||
private FleetMemberMapper fleetMemberMapper;
|
||||
@Autowired
|
||||
private FleetLinesChangeMapper fleetLinesChangeMapper;
|
||||
@Autowired
|
||||
private FleetInfoMapper fleetInfoMapper;
|
||||
|
||||
|
||||
//储值卡相关mapper
|
||||
@Autowired
|
||||
private UserBalanceMapper userBalanceMapper;
|
||||
@Autowired
|
||||
private CardBalanceChangeMapper cardBalanceChangeMapper;
|
||||
|
||||
|
||||
@Override
|
||||
@ -554,9 +585,19 @@ public class AllOrderInfoServiceImpl extends ServiceImpl<AllOrderInfoMapper, All
|
||||
String orderNo = map.get("orderNo");
|
||||
|
||||
|
||||
// 1.根据 orderNo 查询 总订单表 收银台表 进行退款
|
||||
// 1.根据 orderNo 查询 总订单表 收银台表 会员表 油品订单表
|
||||
AllOrderInfo allOrder = selectAllOrderInfoByOrderNo(orderNo);
|
||||
CashierOrder cashierOrder = cashierOrderService.selectCashierOrder(orderNo);
|
||||
QueryWrapper<UserBalance> q1 = Wrappers.query();
|
||||
q1.eq("mt_user_id", allOrder.getUserId())
|
||||
.eq("store_id", allOrder.getStoreId());
|
||||
UserBalance userBalance = userBalanceMapper.selectOne(q1);
|
||||
|
||||
// 如果订单有油品
|
||||
OilOrder oilOrder = null;
|
||||
if (ObjectUtil.isNotEmpty(cashierOrder.getOilOrderId())) {
|
||||
oilOrder = oilOrderMapper.selectById(cashierOrder.getOilOrderId());
|
||||
}
|
||||
// 3.如果支付类型 是 支付宝 微信 银联 则调用第三方支付接口 进行退款
|
||||
if (allOrder.getPayType().equals("WECHAT") || allOrder.getPayType().equals("UNIONPAY") || allOrder.getPayType().equals("ALIPAY")) {
|
||||
|
||||
@ -569,13 +610,12 @@ public class AllOrderInfoServiceImpl extends ServiceImpl<AllOrderInfoMapper, All
|
||||
|
||||
Map<String, String> refund = fyPayService.refund(map);
|
||||
}
|
||||
|
||||
// 修改 总订单 收银台订单 退款状态 退款金额 退款人
|
||||
allOrder.setRefMoney(allOrder.getGoodsMoney());
|
||||
allOrder.setRefBy(String.valueOf(now.getId()));
|
||||
allOrder.setStatus("refund");
|
||||
allOrder.setRefOrderNo(map.get("refundOrderNo"));
|
||||
baseMapper.updateById(allOrder);
|
||||
CashierOrder cashierOrder = cashierOrderService.selectCashierOrder(orderNo);
|
||||
cashierOrder.setStatus("refund");
|
||||
cashierOrderService.updateById(cashierOrder);
|
||||
|
||||
@ -589,6 +629,12 @@ public class AllOrderInfoServiceImpl extends ServiceImpl<AllOrderInfoMapper, All
|
||||
|
||||
// 4.如果是 囤油卡 车队卡 储值卡 则按照 减少记录 还原
|
||||
if (orderNo.equals("fule_card")) {
|
||||
QueryWrapper<MtUserFuel> q2 = Wrappers.query();
|
||||
q2.eq("mt_user_id", userBalance.getMtUserId())
|
||||
.eq("oil_name", oilOrder.getOils())
|
||||
.eq("store_id", userBalance.getStoreId());
|
||||
MtUserFuel mtUserFuel = mtUserFuelMapper.selectOne(q2);
|
||||
|
||||
|
||||
}
|
||||
if (orderNo.equals("car_card_value")) {
|
||||
@ -604,7 +650,7 @@ public class AllOrderInfoServiceImpl extends ServiceImpl<AllOrderInfoMapper, All
|
||||
}
|
||||
// 6. 如果是现金无需任何特殊操作
|
||||
|
||||
return 1;
|
||||
return true;
|
||||
}
|
||||
|
||||
private static String formatBigDecimal(BigDecimal value) {
|
||||
|
@ -385,7 +385,7 @@ public class LJUserServiceImpl extends ServiceImpl<LJUserMapper, LJUser> impleme
|
||||
//在查询囤油卡信息
|
||||
List<MtUserFuel> userFuels = mtUserFuelMapper.selectUserFuelAndOilName(it);
|
||||
it.setUserFuels(userFuels);
|
||||
//判断当前用户是否存在车队
|
||||
//判断当前用户是否存在车队 一个用户只能有一个车队卡
|
||||
List<FleetInfoUniVo> fleetInfoUniVos = fleetInfoService.queryByStoreId(nowAccountInfo.getStoreId(),it.getId());
|
||||
if (CollUtil.isNotEmpty(fleetInfoUniVos)) {
|
||||
it.setFleetInfoUniVos(fleetInfoUniVos);
|
||||
|
Loading…
Reference in New Issue
Block a user