This commit is contained in:
cun-nan 2024-03-06 11:28:57 +08:00
parent f9be9ea02d
commit cddb9231a5
4 changed files with 39 additions and 19 deletions

View File

@ -9,6 +9,14 @@ export function listExchange(query) {
})
}
// 查询兑换券列表
export function exchangeInfo(id) {
return request({
url: 'business/marketingActivity/cardExchange/'+id,
method: 'get',
})
}
// 查询兑换券详细
export function getExchange(id) {
return request({

View File

@ -17,12 +17,12 @@
<el-option label="下线" value="1"></el-option>
</el-select>
</el-form-item>
<el-form-item label="" prop="status">
<el-select clearable v-model="queryParams.status" placeholder="兑换券状态">
<el-option label="启用" value="0"></el-option>
<el-option label="禁用" value="1"></el-option>
</el-select>
</el-form-item>
<!-- <el-form-item label="" prop="status">-->
<!-- <el-select clearable v-model="queryParams.status" placeholder="兑换券状态">-->
<!-- <el-option label="启用" value="0"></el-option>-->
<!-- <el-option label="禁用" value="1"></el-option>-->
<!-- </el-select>-->
<!-- </el-form-item>-->
<el-form-item label="" prop="type">
<el-select clearable v-model="queryParams.type" placeholder="兑换券类型">
<el-option label="商品兑换券" value="0"></el-option>
@ -83,12 +83,12 @@
</template>
</el-table-column>
<el-table-column label="使用说明" align="center" prop="useInstructions"/>
<el-table-column label="二维码链接" align="center" prop="qrCodeLink">
<template slot-scope="scope">
<i class="el-icon-picture" style="size: 20px;cursor: pointer" @click="qrcodelook(scope.row.qrCodeLink)"></i>
<!-- <span>{{ scope.row.qrCodeLink }}</span>-->
</template>
</el-table-column>
<!-- <el-table-column label="二维码链接" align="center" prop="qrCodeLink">-->
<!-- <template slot-scope="scope">-->
<!-- <i class="el-icon-picture" style="size: 20px;cursor: pointer" @click="qrcodelook(scope.row.qrCodeLink)"></i>-->
<!-- &lt;!&ndash; <span>{{ scope.row.qrCodeLink }}</span>&ndash;&gt;-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- <el-table-column label="参与次数" align="center" prop="count"/>-->
<el-table-column label="创建时间" align="center" prop="createTime" width="180">
<template slot-scope="scope">
@ -225,7 +225,7 @@ import {
delExchange,
addExchange,
updateExchange,
getqueryGoods
getqueryGoods, exchangeInfo
} from '@/api/EventMarketing/cardExchange'
export default {
@ -395,7 +395,10 @@ export default {
/** 修改按钮操作 */
handleUpdate(row) {
this.reset()
this.form = row
exchangeInfo(row.id).then(res => {
this.form = res.data
})
// this.form = row
this.open = true
this.title = '修改兑换券'
},
@ -427,6 +430,7 @@ export default {
updateExchange(data).then(res => {
if (res.code == 200) {
this.$message.success('下线成功')
this.getList()
}
})
},

View File

@ -823,7 +823,7 @@ public class OilOrderServiceImpl extends ServiceImpl<OilOrderMapper, OilOrder> i
cashierOrder.setPayType(map.get("payType"));
cashierOrderService.insertCashierOrder(cashierOrder);
this.insertAllOrderInfo(orderNo, storeId, oilAmount, oilAmount, map.get("payType"), userId, "PC", "1", status);
staffCommissionService.countStaffCommission(Integer.valueOf(map.get("staffId")),storeId,oilAmount,oilAmount,"1",orderNo);
if (ObjectUtil.isNotEmpty(map.get("staffId"))) staffCommissionService.countStaffCommission(Integer.valueOf(map.get("staffId")),storeId,oilAmount,oilAmount,"1",orderNo);
res.put("success","success");
}
}
@ -889,7 +889,7 @@ public class OilOrderServiceImpl extends ServiceImpl<OilOrderMapper, OilOrder> i
cashierOrderService.insertCashierOrder(cashierOrder);
this.updateGrowthValue1(oilAmount,oilAmount,userId, Integer.valueOf(oilOrder.getOils()),0.0,storeId,orderNo);
this.insertAllOrderInfo(orderNo,accountInfo.getStoreId(),oilAmount,oilAmount,map.get("payType"),userId,"PC","1","paid");
staffCommissionService.countStaffCommission(Integer.valueOf(map.get("staffId")),storeId,oilAmount,oilAmount,"1",orderNo);
if (ObjectUtil.isNotEmpty(map.get("staffId"))) staffCommissionService.countStaffCommission(Integer.valueOf(map.get("staffId")),storeId,oilAmount,oilAmount,"1",orderNo);
// this.insertCardBalance(oilAmount,userId,storeId);
res.put("success","success");
}else {
@ -1205,7 +1205,7 @@ public class OilOrderServiceImpl extends ServiceImpl<OilOrderMapper, OilOrder> i
this.insertCardOrder(oilOrder.getUserId(),oilOrder.getStoreId(),orderNo,oilOrder.getOrderAmount(),"paid", Double.valueOf(balanceAmount),payAmount);
this.insertAllOrderInfo(orderNo,oilOrder.getStoreId(),oilOrder.getOrderAmount(),payAmount,oilOrder.getPayType(),oilOrder.getUserId(),"applet","1","paid");
this.insertCardBalance(Double.valueOf(balanceAmount),userId,oilOrder.getStoreId(),orderNo);
staffCommissionService.countStaffCommission(oilOrder.getStaffId(),oilOrder.getStoreId(),oilOrder.getOrderAmount(),oilOrder.getOrderAmount(),"1",orderNo);
if (ObjectUtil.isNotEmpty(oilOrder.getStaffId())) staffCommissionService.countStaffCommission(oilOrder.getStaffId(),oilOrder.getStoreId(),oilOrder.getOrderAmount(),oilOrder.getOrderAmount(),"1",orderNo);
oilOrder.setPayAmount(payAmount);
oilOrder.setDiscountAmount(Double.valueOf(discountAmount));
oilOrder.setPayTime(new Date());
@ -1294,7 +1294,7 @@ public class OilOrderServiceImpl extends ServiceImpl<OilOrderMapper, OilOrder> i
this.addOilTracks(oilOrder,oilOrder.getStoreId());
this.updateCardAndActiveById(oilOrder.getStoreId(),oilOrder.getUserId(),oilOrder.getActiveId(),oilOrder.getCouponId(),oilOrder.getActiveType(),oilOrder.getOrderAmount(), Integer.valueOf(oilOrder.getOils()));
this.insertCardBalance(oilOrder.getOrderAmount()-oilOrder.getDiscountAmount()-oilOrder.getPayAmount(),userId,oilOrder.getStoreId(),orderNo);
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);
}
row = baseMapper.updateById(oilOrder);
}

View File

@ -25,7 +25,7 @@
</view>
<view class="dis-fx">
<view class="hui-size">加油员工</view>
<view class="">{{oilOrder.realName}}</view>
<view class="">{{oilOrder.realName || "--"}}</view>
</view>
<view class="dis-fx">
<view class="hui-size">油号油枪</view>
@ -69,6 +69,14 @@
<view class="hui-size">优惠券优惠</view>
<view class="">{{cardFavorable.discountAmount || oilOrder.discountAmount}}</view>
</view>
<view class="dis-fx" v-if="AppToken && oilOrder.cardFavorableId && oilOrder.discountAmount>0 && (oilOrder.discountAmount - cardFavorable.discountAmount)>0">
<view class="hui-size">会员等级优惠</view>
<view class="">{{cardFavorable.discountAmount ? (oilOrder.discountAmount - cardFavorable.discountAmount) : oilOrder.discountAmount}}</view>
</view>
<view class="dis-fx" v-if="AppToken && oilOrder.cardFavorableId && oilOrder.activeId && (oilOrder.discountAmount - fullOrDiscount.deductionAmount)>0">
<view class="hui-size">会员等级优惠</view>
<view class="">{{fullOrDiscount.deductionAmount ? (oilOrder.discountAmount - fullOrDiscount.deductionAmount) : oilOrder.discountAmount}}</view>
</view>
<view class="dis-fx" v-if="AppToken && oilOrder.discountAmount>0">
<view class="hui-size">优惠合计金额</view>