Merge remote-tracking branch 'origin/main'
This commit is contained in:
commit
b5063a59fd
@ -1,7 +1,9 @@
|
||||
<template>
|
||||
<div class="app-conr">
|
||||
<div class="tab-box">
|
||||
<div class="f-box" v-for="(item,index) in tablist" :key="index" @click="activeindex=index" :class="{ 'active' :activeindex==index}">{{item.name}}</div>
|
||||
<div class="f-box" v-for="(item,index) in tablist" :key="index" @click="activeindex=index"
|
||||
:class="{ 'active' :activeindex==index}">{{ item.name }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="cor">
|
||||
<div class="bai-box" v-if="activeindex == 0">
|
||||
@ -27,12 +29,12 @@
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="15">
|
||||
<el-form-item label="适用规则" prop="">
|
||||
<el-radio-group v-model="dataForm.u">
|
||||
<el-radio-group v-model="dataForm.signApplicableRules" @input="applicableRules()">
|
||||
<el-radio :label='0'>不限制</el-radio>
|
||||
<el-radio :label='1'>按签到周期</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-select v-model="value" placeholder="请选择">
|
||||
<el-select v-model="value" placeholder="请选择" @change="cycle()">
|
||||
<el-option
|
||||
v-for="item in options"
|
||||
:key="item.value"
|
||||
@ -44,7 +46,8 @@
|
||||
</el-row>
|
||||
<div style="width: 100%; ">
|
||||
|
||||
<el-form-item style="width: 24%" v-for="(item,index) in dataForm.pointsObtained" :key="index" :prop="'pointsObtained' + index" :label="item.day">
|
||||
<el-form-item style="width: 24%" v-for="(item,index) in dataForm.pointsObtained" :key="index"
|
||||
:prop="'pointsObtained' + index" :label="item.day">
|
||||
<el-input v-model.number="item.integral" placeholder="???">
|
||||
<template slot="append">积分</template>
|
||||
</el-input>
|
||||
@ -188,6 +191,10 @@ export default {
|
||||
signInFunction: 0,
|
||||
// 签到规则
|
||||
signInRules: '',
|
||||
//适用规则
|
||||
signApplicableRules: 0,
|
||||
// 签到周期
|
||||
signInCycle: 0,
|
||||
// 签到获得
|
||||
pointsObtained: [
|
||||
{
|
||||
@ -229,20 +236,14 @@ export default {
|
||||
|
||||
},
|
||||
options: [{
|
||||
value: '选项1',
|
||||
label: '黄金糕'
|
||||
value: 0,
|
||||
label: '一周'
|
||||
}, {
|
||||
value: '选项2',
|
||||
label: '双皮奶'
|
||||
value: 1,
|
||||
label: '两周'
|
||||
}, {
|
||||
value: '选项3',
|
||||
label: '蚵仔煎'
|
||||
}, {
|
||||
value: '选项4',
|
||||
label: '龙须面'
|
||||
}, {
|
||||
value: '选项5',
|
||||
label: '北京烤鸭'
|
||||
value: 2,
|
||||
label: '一个月'
|
||||
}],
|
||||
value: ''
|
||||
|
||||
@ -257,6 +258,59 @@ export default {
|
||||
console.log("vale", value)
|
||||
this.dataForm.pointsRules = value
|
||||
},
|
||||
applicableRules() {
|
||||
if (this.dataForm.signApplicableRules == 0) {
|
||||
this.value = '',
|
||||
this.dataForm.pointsObtained = [
|
||||
{
|
||||
day: '每天获得',
|
||||
integral: 0,
|
||||
}]
|
||||
} else if (this.dataForm.signApplicableRules == 1) {
|
||||
this.value = 0
|
||||
this.getRules(7)
|
||||
// this.dataForm.pointsObtained=[
|
||||
// {
|
||||
// day:'第1天获得',
|
||||
// integral:0,
|
||||
// },
|
||||
// {
|
||||
// day:'第2天获得',
|
||||
// integral:0,
|
||||
// },
|
||||
// {
|
||||
// day:'第3天获得',
|
||||
// integral:0,
|
||||
// },
|
||||
// {
|
||||
// day:'第4天获得',
|
||||
// integral:0,
|
||||
// },
|
||||
// {
|
||||
// day:'第5天获得',
|
||||
// }
|
||||
// ]
|
||||
}
|
||||
},
|
||||
cycle() {
|
||||
if (this.value == 0) {
|
||||
this.getRules(7)
|
||||
} else if (this.value == 1) {
|
||||
this.getRules(14)
|
||||
} else if (this.value == 2) {
|
||||
this.getRules(30)
|
||||
}
|
||||
},
|
||||
getRules(length){
|
||||
this.dataForm.pointsObtained = []
|
||||
for (let i = 0; i < length; i++) {
|
||||
let obj = {
|
||||
day: '第' + (i + 1) + '天获得',
|
||||
integral: 0,
|
||||
}
|
||||
this.dataForm.pointsObtained.push(obj)
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
getData() {
|
||||
@ -264,10 +318,18 @@ export default {
|
||||
file.pointsObtained = JSON.stringify(file.pointsObtained);
|
||||
file.refuelConsumptionAmount = JSON.stringify(file.refuelConsumptionAmount);
|
||||
|
||||
|
||||
getSettingsApi(this.dataForm).then(res => {
|
||||
this.dataForm = res.data
|
||||
this.dataForm.pointsObtained = JSON.parse(this.dataForm.pointsObtained)
|
||||
this.dataForm.refuelConsumptionAmount = JSON.parse(res.data.refuelConsumptionAmount)
|
||||
if (this.dataForm.signCycle == 3) {
|
||||
this.value = ''
|
||||
}else {
|
||||
this.value = this.dataForm.signCycle
|
||||
}
|
||||
console.log("value", this.value)
|
||||
console.log("this.dataForm", this.dataForm)
|
||||
})
|
||||
},
|
||||
submit() {
|
||||
@ -275,32 +337,41 @@ export default {
|
||||
// console.log()
|
||||
file.pointsObtained = JSON.stringify(file.pointsObtained);
|
||||
file.refuelConsumptionAmount = JSON.stringify(file.refuelConsumptionAmount);
|
||||
file.signCycle = this.value
|
||||
this.dataForm = {}
|
||||
updateSettingsApi(file).then(res=>{
|
||||
this.$modal.msgSuccess("添加成功");
|
||||
this.dataForm = {}
|
||||
res.data.pointsObtained = JSON.parse(res.data.pointsObtained)
|
||||
res.data.refuelConsumptionAmount = JSON.parse(res.data.refuelConsumptionAmount)
|
||||
this.dataForm = res.data
|
||||
}).catch(res=>{
|
||||
this.$modal.msgSuccess("添加失败");
|
||||
|
||||
})
|
||||
// this.getData()
|
||||
if (this.value === '') {
|
||||
file.signCycle = 3
|
||||
}
|
||||
console.log("file", file)
|
||||
// updateSettingsApi(file).then(res => {
|
||||
// this.$modal.msgSuccess("添加成功");
|
||||
// this.dataForm = {}
|
||||
// res.data.pointsObtained = JSON.parse(res.data.pointsObtained)
|
||||
// res.data.refuelConsumptionAmount = JSON.parse(res.data.refuelConsumptionAmount)
|
||||
// this.dataForm = res.data
|
||||
// }).catch(res => {
|
||||
// this.$modal.msgSuccess("添加失败");
|
||||
//
|
||||
// })
|
||||
this.getData()
|
||||
|
||||
},
|
||||
cancel() {},
|
||||
cancel() {
|
||||
},
|
||||
handleClick(tab, event) {
|
||||
console.log(tab, event);
|
||||
}
|
||||
},
|
||||
}
|
||||
,
|
||||
|
||||
valiNumberPass(rule, value, callback, fieldName) {
|
||||
valiNumberPass(rule, value, callback, fieldName)
|
||||
{
|
||||
this.$nextTick(() => {
|
||||
// 在这里进行自定义验证逻辑,value 应该在这时候被正确设置
|
||||
console.log(`Validating ${fieldName}:`, value);
|
||||
});
|
||||
},
|
||||
}
|
||||
,
|
||||
|
||||
|
||||
}
|
||||
@ -313,12 +384,14 @@ export default {
|
||||
height: 100%;
|
||||
background: #f6f8f9;
|
||||
}
|
||||
|
||||
.conten-bottom {
|
||||
box-sizing: border-box;
|
||||
padding: 20px 20px;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.cardbox {
|
||||
margin-right: 20px;
|
||||
margin-bottom: 20px;
|
||||
@ -363,12 +436,14 @@ export default {
|
||||
.tabder-box {
|
||||
width: 85%;
|
||||
}
|
||||
|
||||
.cor {
|
||||
box-sizing: border-box;
|
||||
padding: 15px;
|
||||
background: #f9f9f9;
|
||||
|
||||
}
|
||||
|
||||
.bai-box {
|
||||
border-radius: 10px;
|
||||
background: #fff;
|
||||
@ -376,6 +451,7 @@ export default {
|
||||
padding: 10px;
|
||||
height: 85vh;
|
||||
}
|
||||
|
||||
.qizhi {
|
||||
width: 100%;
|
||||
border-radius: 8px;
|
||||
@ -387,6 +463,7 @@ export default {
|
||||
display: flex;
|
||||
margin-bottom: 30px;
|
||||
}
|
||||
|
||||
.left-icon {
|
||||
width: 45px;
|
||||
height: 45px;
|
||||
@ -400,6 +477,7 @@ export default {
|
||||
font-weight: bold;
|
||||
margin-right: 25px;
|
||||
}
|
||||
|
||||
.bigsize {
|
||||
font-size: 24px;
|
||||
margin-bottom: 15px;
|
||||
|
@ -133,7 +133,7 @@
|
||||
<!--查询指定行数据-->
|
||||
<select id="getSettings" resultMap="IntegralSettingsMap">
|
||||
select
|
||||
id, refuel_points_rules, refuel_points_function, refuel_scene_type, refuel_amount_type, refuel_value_participation, refuel_scene_rules, refuel_consumption_amount, refuel_points, refuel_fuel_amount, refuel_fuel_volume, recharge_give, invite_give, invite_give_rules, sign_in_function, sign_in_rules, points_obtained, points_rules, store_id, create_by, update_by
|
||||
id, refuel_points_rules, refuel_points_function, refuel_scene_type, refuel_amount_type, refuel_value_participation, refuel_scene_rules, refuel_consumption_amount, refuel_points, refuel_fuel_amount, refuel_fuel_volume, recharge_give, invite_give, invite_give_rules, sign_in_function, sign_in_rules, points_obtained, points_rules, store_id, create_by, update_by, sign_applicable_rules, sign_cycle
|
||||
from integral_settings
|
||||
<where>
|
||||
store_id = #{integralSettings.storeId}
|
||||
|
@ -324,4 +324,15 @@ public class AllOrderInfoController extends BaseController {
|
||||
IPage<AllOrderInfoUniVo> iPageList = this.allOrderInfoService.queryByPageUni(page, allOrderInfo);
|
||||
return getSuccessResult(iPageList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据订单号查询(小程序)
|
||||
*
|
||||
* @param orderNo
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("queryByOrderNo")
|
||||
public ResponseObject queryByOrderNo(String orderNo){
|
||||
return getSuccessResult(allOrderInfoService.queryByOrderNo(orderNo));
|
||||
}
|
||||
}
|
||||
|
@ -164,4 +164,10 @@ public interface AllOrderInfoService {
|
||||
// 根据订单id 查询订单 并且有且只有一个关联油品订单
|
||||
AllOrderActivityVo getOneByOrderId(Integer orderId);
|
||||
|
||||
/**
|
||||
* 根据订单号查询(小程序)
|
||||
* @param orderNo
|
||||
* @return
|
||||
*/
|
||||
AllOrderInfoUniVo queryByOrderNo(String orderNo);
|
||||
}
|
||||
|
@ -1,9 +1,11 @@
|
||||
package com.fuint.business.order.service.impl;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import cn.hutool.core.date.DateTime;
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
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.extension.plugins.pagination.Page;
|
||||
@ -85,6 +87,7 @@ public class AllOrderInfoServiceImpl extends ServiceImpl<AllOrderInfoMapper, All
|
||||
@Resource
|
||||
AllOrderInfoMapper allOrderInfoMapper;
|
||||
|
||||
|
||||
@Override
|
||||
public IPage<AllOrderInfoVo> getPageList(Page page, AllOrderInfo allOrderInfo) {
|
||||
IPage<AllOrderInfoVo> pageList = allOrderInfoMapper.getPageList(page, allOrderInfo);
|
||||
@ -1682,6 +1685,27 @@ public class AllOrderInfoServiceImpl extends ServiceImpl<AllOrderInfoMapper, All
|
||||
return allOrderInfoVo;
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据订单号查询(小程序)
|
||||
*
|
||||
* @param orderNo
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public AllOrderInfoUniVo queryByOrderNo(String orderNo) {
|
||||
AllOrderInfo allOrderInfo = allOrderInfoMapper.selectOne(new LambdaQueryWrapper<AllOrderInfo>()
|
||||
.eq(AllOrderInfo::getOrderNo, orderNo));
|
||||
if (ObjectUtil.isNotEmpty(allOrderInfo)) {
|
||||
AllOrderInfoUniVo allOrderInfoUniVo = new AllOrderInfoUniVo();
|
||||
BeanUtil.copyProperties(allOrderInfo, allOrderInfoUniVo);
|
||||
MtStore mtStore = mtStoreMapper.selectOne(new LambdaQueryWrapper<MtStore>()
|
||||
.eq(MtStore::getId, allOrderInfo.getStoreId()));
|
||||
allOrderInfoUniVo.setStoreName(mtStore.getName());
|
||||
return allOrderInfoUniVo;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
private long dayCount(String beginTimeStr, String endTimeStr) {
|
||||
// 将字符串表示的时间转换成 LocalDate 对象
|
||||
|
Loading…
Reference in New Issue
Block a user