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

View File

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

View File

@ -241,11 +241,12 @@
</el-radio-group>
</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: 45%">
<el-date-picker
v-model="ruleForm.startTime"
value-format="yyyy-MM-dd HH:mm:ss"
type="datetime"
placeholder="开始日期">
</el-date-picker>
@ -257,6 +258,7 @@
<div style="width: 45%">
<el-date-picker
v-model="ruleForm.endTime"
value-format="yyyy-MM-dd HH:mm:ss"
type="datetime"
placeholder="结束日期">
</el-date-picker>
@ -466,6 +468,8 @@
}
this.ruleForm.type = this.queryParams.type
this.ruleForm.status = '1'
// this.ruleForm.startTime = this.ruleForm.startTime.toLocaleDateString()
// this.ruleForm.endTime = this.ruleForm.endTime.toLocaleDateString()
if( this.ruleForm.id ){
console.log("修改")
eitList(this.ruleForm).then(res=>{

View File

@ -187,7 +187,7 @@ public class FyPayServiceImpl implements FyPayService {
// 油品订单
oilOrder.setOrderStatus("paid");
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);
// 修改油罐容量
List<JSONObject> jsonObjects = JSONArray.parseArray(map1.get("oilOrder"), JSONObject.class);
@ -260,7 +260,7 @@ public class FyPayServiceImpl implements FyPayService {
order.setPayTime(date);
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);

View File

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

View File

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

View File

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

View File

@ -93,7 +93,7 @@ public interface OilOrderService extends IService<OilOrder> {
* @param orderAmount 订单金额
* @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")){
order.setPayTime(new Date());
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")){
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)){
LJUserVo userVo = userService.queryUserById(userId, storeId);
PaymentActiveVO paymentActiveVO = new PaymentActiveVO();
@ -563,7 +563,8 @@ public class OilOrderServiceImpl extends ServiceImpl<OilOrderMapper, OilOrder> i
paymentActiveVO.setActiveId(activeId);
paymentActiveVO.setCardFavorableId(cardFavorableId);
paymentActiveVO.setType(type);
paymentActiveVO.setOrderAmount(BigDecimal.valueOf(orderAmount));
paymentActiveVO.setOrderAmount(orderAmount);
paymentActiveVO.setPayAmount(BigDecimal.valueOf(payAmount));
paymentActiveVO.setOilId(oilId);
cardFavorableRecordService.updateCardAndActiveById(paymentActiveVO);
}
@ -1231,7 +1232,7 @@ public class OilOrderServiceImpl extends ServiceImpl<OilOrderMapper, OilOrder> i
this.updateOilOrder(oilOrder);
if (oilOrder.getOrderStatus().equals("paid")) {
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;
@ -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.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);
if (ObjectUtil.isNotEmpty(oilOrder.getStaffId())) staffCommissionService.countStaffCommission(oilOrder.getStaffId(),oilOrder.getStoreId(),oilOrder.getOrderAmount(),oilOrder.getPayAmount(),"1",orderNo);
}

View File

@ -61,7 +61,7 @@
<!-- centenr -->
<view class="conttainer-cetr">
<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="">{{item.oilName||''}}</view>
@ -74,7 +74,25 @@
<view class="xblck">国标价</view>
<view class="dblck"> <text class="xblck"></text> {{item.gbPrice||0}}</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>
<!-- centenr结束 -->
@ -144,7 +162,7 @@
chainStoreId: '',
indicatorDots: true,
autoplay: true,
interval: 2000,
interval: 3500,
duration: 500,
joinmsg: '',
msg: "1",