Merge remote-tracking branch 'origin/master'

This commit is contained in:
齐天大圣 2024-03-07 10:44:40 +08:00
commit 6870bfc061
10 changed files with 62 additions and 26 deletions

View File

@ -217,7 +217,7 @@
<div class="box-bt"> <div >赠送卡券</div> <el-button type="primary" icon="el-icon-plus" @click="getlistFavorable()" >新增</el-button> </div> <div class="box-bt"> <div >赠送卡券</div> <el-button type="primary" icon="el-icon-plus" @click="getlistFavorable()" >新增</el-button> </div>
<div style="margin: 10px 0px"> <div style="margin: 10px 0px">
<el-table <el-table
:data="form.tableDatas" :data="tableData1"
border border
style="width: 100%"> style="width: 100%">
<el-table-column <el-table-column
@ -660,6 +660,7 @@ export default {
tableDatadh:[],// tableDatadh:[],//
tableDatasw:[],// tableDatasw:[],//
tableDatas:[],// tableDatas:[],//
tableData1:[],//
// //
youhuiquan:{ youhuiquan:{
name:'', name:'',
@ -979,7 +980,8 @@ export default {
giftCardTotal: 1// giftCardTotal: 1//
} }
this.form.tableDatas.push(data) // this.form.tableDatas.push(data)
this.tableData1.push(data)
this.$message.success("新增成功") this.$message.success("新增成功")
@ -1110,16 +1112,17 @@ export default {
/** 修改按钮操作 */ /** 修改按钮操作 */
handleUpdate(row) { handleUpdate(row) {
this.reset(); this.reset();
this.tableData1 = []
const id = row.id || this.ids const id = row.id || this.ids
getActiveConsumption(id).then(response => { getActiveConsumption(id).then(response => {
this.form = response.data; this.form = response.data;
if(response.data.activeConsumptionChildList&&response.data.activeConsumptionChildList.length >1){ if(response.data.activeConsumptionChildList&&response.data.activeConsumptionChildList.length >1){
this.form.tableDatas = response.data.activeConsumptionChildList.filter(item => item.activeGift == '1') this.form.tableDatas = response.data.activeConsumptionChildList.filter(item => item.activeGift == '1')
this.tableData1 = response.data.activeConsumptionChildList.filter(item => item.activeGift == '1')
this.tableDatas = response.data.activeConsumptionChildList.filter(item => item.activeGift == '2') this.tableDatas = response.data.activeConsumptionChildList.filter(item => item.activeGift == '2')
this.form.shiwudata = response.data.activeConsumptionChildList.filter(item => item.activeGift == '4') this.form.shiwudata = response.data.activeConsumptionChildList.filter(item => item.activeGift == '4')
} }
this.open = true; this.open = true;
this.title = "修改消费有礼活动"; this.title = "修改消费有礼活动";
}); });
@ -1173,10 +1176,14 @@ export default {
}, },
/** 提交按钮 */ /** 提交按钮 */
submitForm() { submitForm() {
if (!this.form.tableDatas || this.form.tableDatas.length==0){ // if (!this.form.tableDatas || this.form.tableDatas.length==0){
this.form.tableDatas = [] // this.form.tableDatas = []
} // }
this.form.activeConsumptionChildList = this.form.tableDatas.concat(this.tableDatas, this.form.shiwudata); // if (this.tableDatas && this.tableDatas.length>0 || this.form.shiwudata && this.form.shiwudata.length>0 )
// this.form.activeConsumptionChildList = this.form.tableDatas.concat(this.tableDatas, this.form.shiwudata);
// if (this.tableDatas && this.tableDatas.length>0 || this.form.shiwudata && this.form.shiwudata.length>0 )
this.form.activeConsumptionChildList = this.tableData1.concat(this.tableDatas);
console.log(this.form.activeConsumptionChildList) console.log(this.form.activeConsumptionChildList)
this.$refs["form"].validate(valid => { this.$refs["form"].validate(valid => {

View File

@ -234,7 +234,7 @@ import {
delExchange, delExchange,
addExchange, addExchange,
updateExchange, updateExchange,
getqueryGoods getqueryGoods, exchangeInfo
} from '@/api/EventMarketing/cardExchange' } from '@/api/EventMarketing/cardExchange'
export default { export default {
@ -404,7 +404,7 @@ export default {
/** 修改按钮操作 */ /** 修改按钮操作 */
handleUpdate(row) { handleUpdate(row) {
this.reset() this.reset()
getExchange(row.id).then(res => { exchangeInfo(row.id).then(res => {
this.form = res.data this.form = res.data
}) })
// this.form = row // this.form = row

View File

@ -241,11 +241,12 @@
</el-radio-group> </el-radio-group>
</el-form-item> </el-form-item>
<el-form-item label="时间范围" v-if="ruleForm.activeTime == 2" :label-width="formLabelWidth" prop="startTime"> <el-form-item label="时间范围" v-if="ruleForm.activeTime == 2" prop="startTime">
<div style="width: 100%;display: flex;align-items: center "> <div style="width: 100%;display: flex;align-items: center ">
<div style="width: 45%"> <div style="width: 45%">
<el-date-picker <el-date-picker
v-model="ruleForm.startTime" v-model="ruleForm.startTime"
value-format="yyyy-MM-dd HH:mm:ss"
type="datetime" type="datetime"
placeholder="开始日期"> placeholder="开始日期">
</el-date-picker> </el-date-picker>
@ -257,6 +258,7 @@
<div style="width: 45%"> <div style="width: 45%">
<el-date-picker <el-date-picker
v-model="ruleForm.endTime" v-model="ruleForm.endTime"
value-format="yyyy-MM-dd HH:mm:ss"
type="datetime" type="datetime"
placeholder="结束日期"> placeholder="结束日期">
</el-date-picker> </el-date-picker>
@ -466,6 +468,8 @@
} }
this.ruleForm.type = this.queryParams.type this.ruleForm.type = this.queryParams.type
this.ruleForm.status = '1' this.ruleForm.status = '1'
// this.ruleForm.startTime = this.ruleForm.startTime.toLocaleDateString()
// this.ruleForm.endTime = this.ruleForm.endTime.toLocaleDateString()
if( this.ruleForm.id ){ if( this.ruleForm.id ){
console.log("修改") console.log("修改")
eitList(this.ruleForm).then(res=>{ eitList(this.ruleForm).then(res=>{

View File

@ -187,7 +187,7 @@ public class FyPayServiceImpl implements FyPayService {
// 油品订单 // 油品订单
oilOrder.setOrderStatus("paid"); oilOrder.setOrderStatus("paid");
oilOrder.setPayTime(date); oilOrder.setPayTime(date);
oilOrderService.updateCardAndActiveById(oilOrder.getStoreId(),oilOrder.getUserId(),oilOrder.getActiveId(),oilOrder.getCouponId(),oilOrder.getActiveType(),oilOrder.getOrderAmount(), Integer.valueOf(oilOrder.getOils())); oilOrderService.updateCardAndActiveById(oilOrder.getStoreId(),oilOrder.getUserId(),oilOrder.getActiveId(),oilOrder.getCouponId(),oilOrder.getActiveType(),oilOrder.getOrderAmount(),oilOrder.getPayAmount(), Integer.valueOf(oilOrder.getOils()));
staffCommissionService.countStaffCommission(oilOrder.getStaffId(),oilOrder.getStoreId(),oilOrder.getOrderAmount(),oilOrder.getPayAmount(),"1",orderNo); staffCommissionService.countStaffCommission(oilOrder.getStaffId(),oilOrder.getStoreId(),oilOrder.getOrderAmount(),oilOrder.getPayAmount(),"1",orderNo);
// 修改油罐容量 // 修改油罐容量
List<JSONObject> jsonObjects = JSONArray.parseArray(map1.get("oilOrder"), JSONObject.class); List<JSONObject> jsonObjects = JSONArray.parseArray(map1.get("oilOrder"), JSONObject.class);
@ -260,7 +260,7 @@ public class FyPayServiceImpl implements FyPayService {
order.setPayTime(date); order.setPayTime(date);
oilOrderService.updateOilOrder(order); oilOrderService.updateOilOrder(order);
oilOrderService.updateCardAndActiveById(order.getStoreId(),order.getUserId(),order.getActiveId(),order.getCouponId(),order.getActiveType(),order.getOrderAmount(), Integer.valueOf(order.getOils())); oilOrderService.updateCardAndActiveById(order.getStoreId(),order.getUserId(),order.getActiveId(),order.getCouponId(),order.getActiveType(),order.getOrderAmount(),order.getPayAmount(), Integer.valueOf(order.getOils()));
// 修改油罐容量 // 修改油罐容量
List<JSONObject> jsonObjects = JSONArray.parseArray(map1.get("oilOrder"), JSONObject.class); List<JSONObject> jsonObjects = JSONArray.parseArray(map1.get("oilOrder"), JSONObject.class);

View File

@ -125,6 +125,7 @@ public class ActiveConsumptionServiceImpl extends ServiceImpl<ActiveConsumptionM
activeConsumption.setGasolineUserLevel(arrayToString(activeConsumptionDTO.getGasolineUserLevel())); activeConsumption.setGasolineUserLevel(arrayToString(activeConsumptionDTO.getGasolineUserLevel()));
//天然气会员等级 //天然气会员等级
activeConsumption.setNaturalUserLevel(arrayToString(activeConsumptionDTO.getNaturalUserLevel())); activeConsumption.setNaturalUserLevel(arrayToString(activeConsumptionDTO.getNaturalUserLevel()));
activeConsumption.setMoneyType(activeConsumptionDTO.getMoneyType());
save = save(activeConsumption); save = save(activeConsumption);
} }
//新增兑换物品 //新增兑换物品
@ -224,7 +225,7 @@ public class ActiveConsumptionServiceImpl extends ServiceImpl<ActiveConsumptionM
activeConsumptionVO.setDuihuanTotaled(duihuanTed); activeConsumptionVO.setDuihuanTotaled(duihuanTed);
TAccount accountInfoById = accountService.getAccountInfoById(Integer.parseInt(s.getCreateBy())); TAccount accountInfoById = accountService.getAccountInfoById(Integer.parseInt(s.getCreateBy()));
if (ObjectUtil.isNotEmpty(accountInfoById)) activeConsumption.setCreateBy(accountInfoById.getRealName()); if (ObjectUtil.isNotEmpty(accountInfoById)) activeConsumptionVO.setCreateBy(accountInfoById.getRealName());
return activeConsumptionVO; return activeConsumptionVO;
}).collect(Collectors.toList()); }).collect(Collectors.toList());
activeConsumptionVOSIPage.setRecords(activeConsumptionVOList); activeConsumptionVOSIPage.setRecords(activeConsumptionVOList);
@ -313,6 +314,7 @@ public class ActiveConsumptionServiceImpl extends ServiceImpl<ActiveConsumptionM
String participationConditionMoney = activeConsumptionDTO.getParticipationConditionMoney(); String participationConditionMoney = activeConsumptionDTO.getParticipationConditionMoney();
double participationConditionMoneys = Double.parseDouble(participationConditionMoney); double participationConditionMoneys = Double.parseDouble(participationConditionMoney);
BeanUtils.copyProperties(activeConsumptionDTO,activeConsumption); BeanUtils.copyProperties(activeConsumptionDTO,activeConsumption);
activeConsumption.setMoneyType(activeConsumptionDTO.getMoneyType());
activeConsumption.setParticipationConditionMoney(participationConditionMoneys); activeConsumption.setParticipationConditionMoney(participationConditionMoneys);
activeConsumption.setAdaptOil(arrayToString(activeConsumptionDTO.getAdaptOil())); activeConsumption.setAdaptOil(arrayToString(activeConsumptionDTO.getAdaptOil()));
activeConsumption.setActiveGift(arrayToString(activeConsumptionDTO.getActiveGift())); activeConsumption.setActiveGift(arrayToString(activeConsumptionDTO.getActiveGift()));
@ -335,10 +337,11 @@ public class ActiveConsumptionServiceImpl extends ServiceImpl<ActiveConsumptionM
List<ActiveConsumptionChild> activeConsumptionChildList1 = activeConsumptionDTO.getActiveConsumptionChildList(); List<ActiveConsumptionChild> activeConsumptionChildList1 = activeConsumptionDTO.getActiveConsumptionChildList();
if (CollectionUtils.isNotEmpty(activeConsumptionChildList1)){ if (CollectionUtils.isNotEmpty(activeConsumptionChildList1)){
activeConsumptionChildList1.stream().map(s ->{ activeConsumptionChildList1.stream().map(s ->{
s.setActiveConsumptionId(activeConsumption.getId()); if (ObjectUtil.isNotEmpty(s)) s.setActiveConsumptionId(activeConsumption.getId());
return s; return s;
}).collect(Collectors.toList()); }).collect(Collectors.toList());
update = activeConsumptionChildService.saveBatch(activeConsumptionChildList1); if (ObjectUtil.isNotEmpty(activeConsumptionChildList1))
update = activeConsumptionChildService.saveBatch(activeConsumptionChildList1);
} }
return update; return update;
} }

View File

@ -28,7 +28,9 @@ public class PaymentActiveVO implements Serializable {
//等级会员优惠金额 //等级会员优惠金额
private BigDecimal memberFavorableAmount; private BigDecimal memberFavorableAmount;
//订单金额 //订单金额
private BigDecimal orderAmount; private Double orderAmount;
//实付金额
private BigDecimal payAmount;
//可用油品Id //可用油品Id
private Integer oilId; private Integer oilId;
//会员等级 //会员等级

View File

@ -322,7 +322,8 @@ public class CardFavorableRecordServiceImpl extends ServiceImpl<CardFavorableRec
} }
PaymentActiveDTO paymentActiveDTO = new PaymentActiveDTO(); PaymentActiveDTO paymentActiveDTO = new PaymentActiveDTO();
paymentActiveDTO.setUserId(userId); paymentActiveDTO.setUserId(userId);
paymentActiveDTO.setAmount(paymentActiveVO.getOrderAmount()); paymentActiveDTO.setAmount(paymentActiveVO.getPayAmount());
paymentActiveDTO.setOrderAmount(paymentActiveVO.getOrderAmount());
paymentActiveDTO.setStoreId(paymentActiveVO.getStoreId()); paymentActiveDTO.setStoreId(paymentActiveVO.getStoreId());
paymentActiveDTO.setOilId(paymentActiveVO.getOilId()); paymentActiveDTO.setOilId(paymentActiveVO.getOilId());
paymentActiveDTO.setMtUserLevel(paymentActiveVO.getMtUserLevel()); paymentActiveDTO.setMtUserLevel(paymentActiveVO.getMtUserLevel());

View File

@ -93,7 +93,7 @@ public interface OilOrderService extends IService<OilOrder> {
* @param orderAmount 订单金额 * @param orderAmount 订单金额
* @param oilId 油品id * @param oilId 油品id
*/ */
void updateCardAndActiveById(Integer storeId,Integer userId,Integer activeId,Integer cardFavorableId,String type,Double orderAmount,Integer oilId); void updateCardAndActiveById(Integer storeId,Integer userId,Integer activeId,Integer cardFavorableId,String type,Double orderAmount,Double payAmount,Integer oilId);
/** /**
* 扫描小程序中二维码所处理的逻辑 * 扫描小程序中二维码所处理的逻辑

View File

@ -456,7 +456,7 @@ public class OilOrderServiceImpl extends ServiceImpl<OilOrderMapper, OilOrder> i
if (payType.equals("CASH") || payType.equals("credit")){ if (payType.equals("CASH") || payType.equals("credit")){
order.setPayTime(new Date()); order.setPayTime(new Date());
this.addOilTrack(jsonObjects.get(i),storeId); this.addOilTrack(jsonObjects.get(i),storeId);
this.updateCardAndActiveById(storeId,userId,order.getActiveId(),order.getCouponId(),order.getActiveType(),order.getOrderAmount(), Integer.valueOf(order.getOils())); this.updateCardAndActiveById(storeId,userId,order.getActiveId(),order.getCouponId(),order.getActiveType(),order.getOrderAmount(),order.getPayAmount(), Integer.valueOf(order.getOils()));
} }
if (map.get("allAmount").equals("0")){ if (map.get("allAmount").equals("0")){
order.setPayTime(new Date()); order.setPayTime(new Date());
@ -553,7 +553,7 @@ public class OilOrderServiceImpl extends ServiceImpl<OilOrderMapper, OilOrder> i
} }
// 调用消费有礼接口 // 调用消费有礼接口
public void updateCardAndActiveById(Integer storeId,Integer userId,Integer activeId,Integer cardFavorableId,String type,Double orderAmount,Integer oilId){ public void updateCardAndActiveById(Integer storeId,Integer userId,Integer activeId,Integer cardFavorableId,String type,Double orderAmount,Double payAmount,Integer oilId){
if (ObjectUtil.isNotEmpty(userId)){ if (ObjectUtil.isNotEmpty(userId)){
LJUserVo userVo = userService.queryUserById(userId, storeId); LJUserVo userVo = userService.queryUserById(userId, storeId);
PaymentActiveVO paymentActiveVO = new PaymentActiveVO(); PaymentActiveVO paymentActiveVO = new PaymentActiveVO();
@ -563,7 +563,8 @@ public class OilOrderServiceImpl extends ServiceImpl<OilOrderMapper, OilOrder> i
paymentActiveVO.setActiveId(activeId); paymentActiveVO.setActiveId(activeId);
paymentActiveVO.setCardFavorableId(cardFavorableId); paymentActiveVO.setCardFavorableId(cardFavorableId);
paymentActiveVO.setType(type); paymentActiveVO.setType(type);
paymentActiveVO.setOrderAmount(BigDecimal.valueOf(orderAmount)); paymentActiveVO.setOrderAmount(orderAmount);
paymentActiveVO.setPayAmount(BigDecimal.valueOf(payAmount));
paymentActiveVO.setOilId(oilId); paymentActiveVO.setOilId(oilId);
cardFavorableRecordService.updateCardAndActiveById(paymentActiveVO); cardFavorableRecordService.updateCardAndActiveById(paymentActiveVO);
} }
@ -1231,7 +1232,7 @@ public class OilOrderServiceImpl extends ServiceImpl<OilOrderMapper, OilOrder> i
this.updateOilOrder(oilOrder); this.updateOilOrder(oilOrder);
if (oilOrder.getOrderStatus().equals("paid")) { if (oilOrder.getOrderStatus().equals("paid")) {
if (ObjectUtil.isNotEmpty(oilOrder.getUserId())) integralSettingsService.refuelPoints(oilOrder); if (ObjectUtil.isNotEmpty(oilOrder.getUserId())) integralSettingsService.refuelPoints(oilOrder);
this.updateCardAndActiveById(oilOrder.getStoreId(), oilOrder.getUserId(), oilOrder.getActiveId(), oilOrder.getCouponId(), oilOrder.getActiveType(), oilOrder.getOrderAmount(), Integer.valueOf(oilOrder.getOils())); this.updateCardAndActiveById(oilOrder.getStoreId(), oilOrder.getUserId(), oilOrder.getActiveId(), oilOrder.getCouponId(), oilOrder.getActiveType(), oilOrder.getOrderAmount(),oilOrder.getPayAmount(), Integer.valueOf(oilOrder.getOils()));
} }
return applet; return applet;
@ -1292,7 +1293,7 @@ public class OilOrderServiceImpl extends ServiceImpl<OilOrderMapper, OilOrder> i
} }
this.updateGrowthValue(oilOrder.getOrderAmount(),oilOrder.getPayAmount(),userId, Integer.valueOf(oilOrder.getOils()),null,oilOrder.getStoreId(),orderNo); this.updateGrowthValue(oilOrder.getOrderAmount(),oilOrder.getPayAmount(),userId, Integer.valueOf(oilOrder.getOils()),null,oilOrder.getStoreId(),orderNo);
this.addOilTracks(oilOrder,oilOrder.getStoreId()); this.addOilTracks(oilOrder,oilOrder.getStoreId());
this.updateCardAndActiveById(oilOrder.getStoreId(),oilOrder.getUserId(),oilOrder.getActiveId(),oilOrder.getCouponId(),oilOrder.getActiveType(),oilOrder.getOrderAmount(), Integer.valueOf(oilOrder.getOils())); this.updateCardAndActiveById(oilOrder.getStoreId(),oilOrder.getUserId(),oilOrder.getActiveId(),oilOrder.getCouponId(),oilOrder.getActiveType(),oilOrder.getOrderAmount(),oilOrder.getPayAmount(), Integer.valueOf(oilOrder.getOils()));
this.insertCardBalance(oilOrder.getOrderAmount()-oilOrder.getDiscountAmount()-oilOrder.getPayAmount(),userId,oilOrder.getStoreId(),orderNo); this.insertCardBalance(oilOrder.getOrderAmount()-oilOrder.getDiscountAmount()-oilOrder.getPayAmount(),userId,oilOrder.getStoreId(),orderNo);
if (ObjectUtil.isNotEmpty(oilOrder.getStaffId())) staffCommissionService.countStaffCommission(oilOrder.getStaffId(),oilOrder.getStoreId(),oilOrder.getOrderAmount(),oilOrder.getPayAmount(),"1",orderNo); if (ObjectUtil.isNotEmpty(oilOrder.getStaffId())) staffCommissionService.countStaffCommission(oilOrder.getStaffId(),oilOrder.getStoreId(),oilOrder.getOrderAmount(),oilOrder.getPayAmount(),"1",orderNo);
} }

View File

@ -61,7 +61,7 @@
<!-- centenr --> <!-- centenr -->
<view class="conttainer-cetr"> <view class="conttainer-cetr">
<view class="conttainer-title">今日会员价</view> <view class="conttainer-title">今日会员价</view>
<view class="conttainer-box" v-for="(item,index) in oilTypeList" :key="index"> <!-- <view class="conttainer-box" v-for="(item,index) in oilTypeList" :key="index">
<view class="c-box-box1"> <view class="c-box-box1">
<view class="">{{item.oilName||''}}</view> <view class="">{{item.oilName||''}}</view>
@ -74,7 +74,25 @@
<view class="xblck">国标价</view> <view class="xblck">国标价</view>
<view class="dblck"> <text class="xblck"></text> {{item.gbPrice||0}}</view> <view class="dblck"> <text class="xblck"></text> {{item.gbPrice||0}}</view>
</view> </view>
</view> </view> -->
<swiper class="swiper" style="width: 100%;height: 70px;" circular
:autoplay="autoplay" :interval="interval" :vertical="true" :duration="duration">
<swiper-item class="conttainer-box" v-for="(item,index) in oilTypeList" :key="index">
<view class="c-box-box1">
<view class="">{{item.oilName||''}}</view>
</view>
<view class="c-box-box2">
<view class="xred">会员价</view>
<view class="dred"> <text class="xred"></text> {{item.oilPrice||0}}</view>
</view>
<view class="c-box-box3">
<view class="xblck">国标价</view>
<view class="dblck"> <text class="xblck"></text> {{item.gbPrice||0}}</view>
</view>
</swiper-item>
</swiper>
</view> </view>
<!-- centenr结束 --> <!-- centenr结束 -->
@ -144,7 +162,7 @@
chainStoreId: '', chainStoreId: '',
indicatorDots: true, indicatorDots: true,
autoplay: true, autoplay: true,
interval: 2000, interval: 3500,
duration: 500, duration: 500,
joinmsg: '', joinmsg: '',
msg: "1", msg: "1",