bug
This commit is contained in:
parent
0cf119bfab
commit
e9dd0600c2
@ -145,9 +145,13 @@
|
||||
<el-select v-model="form.roleId" placeholder="请选择角色">
|
||||
<el-option
|
||||
v-for="item in roleList"
|
||||
:key="item.dutyId"
|
||||
:key="item.dutyId+''"
|
||||
:label="item.dutyName"
|
||||
:value="item.dutyId"
|
||||
:value="item.dutyId+''"
|
||||
></el-option>
|
||||
<el-option
|
||||
label="油站站长"
|
||||
:value="12+''"
|
||||
></el-option>
|
||||
|
||||
</el-select>
|
||||
@ -602,6 +606,7 @@ export default {
|
||||
submitForm: function() {
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
this.form.auditPrem = this.form.auditPrem.toString();
|
||||
if (!this.form.id) {
|
||||
queryStaff({mobile:this.form.mobile}).then( response => {
|
||||
if(response.data!=null){
|
||||
@ -610,31 +615,25 @@ export default {
|
||||
this.form.posPrem = JSON.stringify(this.form.posPrem);
|
||||
this.form.appletPrem = JSON.stringify(this.form.appletPrem);
|
||||
addStaff(this.form).then(response => {
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
if (response.data==1){
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
}
|
||||
});
|
||||
}
|
||||
})
|
||||
} else {
|
||||
// queryStaff({mobile:this.form.mobile}).then( response => {
|
||||
// if (response.data != null) {
|
||||
// this.$modal.msgError("手机号已存在");
|
||||
// } else {
|
||||
// this.form.posPrem = JSON.stringify(this.form.posPrem);
|
||||
// this.form.appletPrem = JSON.stringify(this.form.appletPrem);
|
||||
updateStaff(this.form).then(response => {
|
||||
if (response.data==1){
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
}else {
|
||||
this.$modal.msgError("手机号已存在");
|
||||
}
|
||||
updateStaff(this.form).then(response => {
|
||||
if (response.data==1){
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
}else {
|
||||
this.$modal.msgError("手机号已存在");
|
||||
}
|
||||
|
||||
});
|
||||
// }
|
||||
// })
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
|
@ -23,21 +23,21 @@
|
||||
@sort-change="handleSortChange">
|
||||
<el-table-column label="ID" prop="id" align="center" width="60"/>
|
||||
<el-table-column label="方案名称" prop="name" align="center"/>
|
||||
<el-table-column label="员工角色" prop="staffRoleGroup" align="center">
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.staff_role" :value="scope.row.staffRoleGroup"/>
|
||||
</template>
|
||||
<el-table-column label="员工角色" prop="dutyName" align="center">
|
||||
<!-- <template slot-scope="scope">-->
|
||||
<!-- <dict-tag :options="dict.type.staff_role" :value="scope.row.staffRoleGroup"/>-->
|
||||
<!-- </template>-->
|
||||
</el-table-column>
|
||||
<el-table-column label="提成来源" prop="commissionSource" align="center" />
|
||||
<el-table-column label="满足条件" prop="meetCondition" align="center">
|
||||
<el-table-column label="满足条件" prop="meetCondition" align="center" width="260">
|
||||
<template slot-scope="scope">
|
||||
<span v-if="form.type == 'orderAmount'">
|
||||
<span v-if="scope.row.type == 'orderAmount'">
|
||||
订单金额消费满{{scope.row.meetCondition}}元
|
||||
</span>
|
||||
<span v-if="form.type == 'payAmount'">
|
||||
<span v-if="scope.row.type == 'payAmount'">
|
||||
实际金额消费满{{scope.row.meetCondition}}元
|
||||
</span>
|
||||
<span v-if="form.type == 'refuleNum'">
|
||||
<span v-if="scope.row.type == 'refuleNum'">
|
||||
加油数量消费满{{scope.row.meetCondition}}单位(升/立方)
|
||||
</span>
|
||||
</template>
|
||||
@ -121,12 +121,18 @@
|
||||
<el-col :span="24">
|
||||
<el-form-item label="角色组" prop="staffRoleGroup">
|
||||
<el-select v-model="form.staffRoleGroup" placeholder="请选择所属角色">
|
||||
<!-- <el-option-->
|
||||
<!-- v-for="dict in dict.type.staff_role"-->
|
||||
<!-- :key="dict.value"-->
|
||||
<!-- :label="dict.label"-->
|
||||
<!-- :value="dict.value"-->
|
||||
<!-- />-->
|
||||
<el-option
|
||||
v-for="dict in dict.type.staff_role"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
v-for="item in roleList"
|
||||
:key="item.dutyId+''"
|
||||
:label="item.dutyName"
|
||||
:value="item.dutyId+''"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
@ -134,9 +140,12 @@
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="提成类型" prop="type">
|
||||
<el-radio-group v-model="form.type">
|
||||
<el-radio-group v-model="form.type" v-if="form.commissionSource=='油品'">
|
||||
<el-radio v-for="dict in dict.type.comissionType" :label="dict.value">{{ dict.label }}</el-radio>
|
||||
</el-radio-group>
|
||||
<el-radio-group v-model="form.type" v-else>
|
||||
<el-radio v-for="dict in dict.type.comissionType" :label="dict.value" v-if="dict.value!='refuleNum'">{{ dict.label }}</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
@ -216,6 +225,7 @@ import {
|
||||
queryCommission,
|
||||
updateCommission
|
||||
} from "@/api/staffCommission/staffcommission";
|
||||
import {listDuty} from "@/api/staff/duty";
|
||||
|
||||
export default {
|
||||
dicts: ['source','role','zhzt','comissionType','staff_role'],
|
||||
@ -252,6 +262,7 @@ export default {
|
||||
},
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
roleList:[],
|
||||
// 表单校验
|
||||
rules: {
|
||||
name: [
|
||||
@ -283,8 +294,15 @@ export default {
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
this.getDuty();
|
||||
},
|
||||
methods:{
|
||||
// 查询角色列表
|
||||
getDuty(){
|
||||
listDuty().then(response => {
|
||||
this.roleList = response.data
|
||||
})
|
||||
},
|
||||
// 点击标签页
|
||||
handleClick(tab, event) {
|
||||
if (this.activeName == 'oil'){
|
||||
@ -378,70 +396,63 @@ export default {
|
||||
submitForm: function() {
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
// let date = new Date();
|
||||
// let year = date.getFullYear()
|
||||
// let month = date.getMonth()+1
|
||||
// let day = date.getDate()
|
||||
// let hour = date.getHours()
|
||||
// let minutes = date.getMinutes()
|
||||
// let second = date.getSeconds()
|
||||
// let now = year+"-"+this.add0(month)+"-"+this.add0(day)+" "+hour+":"+minutes+":"+second
|
||||
// if(this.form.takeEffect[0] < now && this.form.takeEffect[1] > now){
|
||||
// this.form.status = 'qy'
|
||||
// }else {
|
||||
// this.form.status = 'jy'
|
||||
// }
|
||||
// // this.form.commissionSource = this.commissionSource.toString()
|
||||
// this.form.takeEffect = JSON.stringify(this.form.takeEffect)
|
||||
if (this.form.id) {
|
||||
if (this.changeCom){
|
||||
queryCommission(this.form).then(response => {
|
||||
if (response.data != null) {
|
||||
if (this.changeCom) {
|
||||
this.$modal.msgError("同一个角色组只能对应一个" + this.form.commissionSource + "提成方案")
|
||||
}else {
|
||||
this.$modal.msgError("当前时间段已存在相同油品、相同角色组的方案")
|
||||
}
|
||||
} else {
|
||||
this.form.royaltyRate = this.form.royaltyRate + this.select
|
||||
updateCommission(this.form).then(response => {
|
||||
this.$modal.msgSuccess("提成方案更新成功");
|
||||
this.open = false;
|
||||
this.changeCom = false;
|
||||
this.getList();
|
||||
});
|
||||
}
|
||||
})
|
||||
}else {
|
||||
// if (this.changeCom){
|
||||
// queryCommission(this.form).then(response => {
|
||||
// if (response.data != null) {
|
||||
// if (this.changeCom) {
|
||||
// this.$modal.msgError("同一个角色组只能对应一个" + this.form.commissionSource + "提成方案")
|
||||
// }else {
|
||||
// this.$modal.msgError("当前时间段已存在相同油品、相同角色组的方案")
|
||||
// }
|
||||
// } else {
|
||||
// this.form.royaltyRate = this.form.royaltyRate + this.select
|
||||
// updateCommission(this.form).then(response => {
|
||||
// this.$modal.msgSuccess("提成方案更新成功");
|
||||
// this.open = false;
|
||||
// this.changeCom = false;
|
||||
// this.getList();
|
||||
// });
|
||||
// }
|
||||
// })
|
||||
// }else {
|
||||
this.form.royaltyRate = this.form.royaltyRate + this.select
|
||||
updateCommission(this.form).then(response => {
|
||||
this.$modal.msgSuccess("提成方案更新成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
}
|
||||
} else {
|
||||
queryCommission(this.form).then(response => {
|
||||
if (response.data != null){
|
||||
if (response.data.status == 'qy'){
|
||||
this.$modal.msgError("同一个角色组只能对应一个"+this.form.commissionSource+"提成方案")
|
||||
if (response.data==1){
|
||||
this.$modal.msgSuccess("提成方案更新成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
}else {
|
||||
this.form.royaltyRate = this.form.royaltyRate + this.select
|
||||
addCommission(this.form).then(response => {
|
||||
this.$modal.msgError("同一个角色组只能对应一个" + this.form.commissionSource + "提成方案")
|
||||
}
|
||||
});
|
||||
// }
|
||||
} else {
|
||||
// queryCommission(this.form).then(response => {
|
||||
// if (response.data != null){
|
||||
// if (response.data.status == 'qy'){
|
||||
// this.$modal.msgError("同一个角色组只能对应一个"+this.form.commissionSource+"提成方案")
|
||||
// }else {
|
||||
// this.form.royaltyRate = this.form.royaltyRate + this.select
|
||||
// addCommission(this.form).then(response => {
|
||||
// this.$modal.msgSuccess("提成方案新增成功");
|
||||
// this.open = false;
|
||||
// this.getList();
|
||||
// });
|
||||
// }
|
||||
// }else {
|
||||
this.form.royaltyRate = this.form.royaltyRate + this.select
|
||||
addCommission(this.form).then(response => {
|
||||
if (response.data==1) {
|
||||
this.$modal.msgSuccess("提成方案新增成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
}
|
||||
}else {
|
||||
this.form.royaltyRate = this.form.royaltyRate + this.select
|
||||
addCommission(this.form).then(response => {
|
||||
this.$modal.msgSuccess("提成方案新增成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
}else {
|
||||
this.$modal.msgError("同一个角色组只能对应一个"+this.form.commissionSource+"提成方案")
|
||||
}
|
||||
});
|
||||
}
|
||||
})
|
||||
// }
|
||||
// })
|
||||
}
|
||||
}
|
||||
});
|
||||
|
@ -48,7 +48,7 @@ Vue.prototype.getName = getName
|
||||
Vue.prototype.download = download
|
||||
Vue.prototype.handleTree = handleTree
|
||||
// Vue.prototype.pcUrl = 'http://192.168.0.121:82/'
|
||||
Vue.prototype.pcUrl = 'http://192.168.0.178:82/'
|
||||
Vue.prototype.pcUrl = 'http://192.168.0.121:82/'
|
||||
|
||||
// 全局组件挂载
|
||||
Vue.component('DictTag', DictTag)
|
||||
|
@ -34,7 +34,7 @@ public interface MerchantConfigService extends IService<MerchantConfig> {
|
||||
* 根据店铺id查询商户信息
|
||||
* @return
|
||||
*/
|
||||
public List<MerchantConfig> selectMeChByIsOpen();
|
||||
public List<MerchantConfig> selectMeChByIsOpen(Integer storeId);
|
||||
|
||||
/**
|
||||
* 查询所有商户配置信息
|
||||
|
@ -483,12 +483,19 @@ public class FyPayServiceImpl implements FyPayService {
|
||||
allOrderInfo.setType(receiveParameter.getType());
|
||||
allOrderInfo.setStoreId(receiveParameter.getStoreId());
|
||||
allOrderInfo.setGoodsMoney(receiveParameter.getGoodsMoney());
|
||||
allOrderInfo.setPayMoney(receiveParameter.getGoodsMoney());
|
||||
allOrderInfo.setPayType(receiveParameter.getPayType());
|
||||
allOrderInfo.setUserId(receiveParameter.getUserId());
|
||||
allOrderInfo.setPayChannel("cashier");
|
||||
allOrderInfo.setStatus(payStatus);
|
||||
if (payStatus.equals("paid")){
|
||||
allOrderInfo.setPayTime(new Date());
|
||||
}
|
||||
allOrderInfo.setContent(receiveParameter.getContent());
|
||||
allOrderInfoService.insertAllOrderInfo(allOrderInfo);
|
||||
AllOrderInfo allOrderInfo1 = allOrderInfoService.selectAllOrderInfoByOrderNo(receiveParameter.getOrderNo());
|
||||
if (ObjectUtil.isEmpty(allOrderInfo1)){
|
||||
allOrderInfoService.insertAllOrderInfo(allOrderInfo);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@ -505,7 +512,10 @@ public class FyPayServiceImpl implements FyPayService {
|
||||
allOrderInfo.setPayChannel("applet");
|
||||
allOrderInfo.setStatus("unpaid");
|
||||
allOrderInfo.setContent(receiveParameter.getContent());
|
||||
allOrderInfoService.insertAllOrderInfo(allOrderInfo);
|
||||
AllOrderInfo allOrderInfo1 = allOrderInfoService.selectAllOrderInfoByOrderNo(receiveParameter.getOrderNo());
|
||||
if (ObjectUtil.isEmpty(allOrderInfo1)){
|
||||
allOrderInfoService.insertAllOrderInfo(allOrderInfo);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -46,9 +46,10 @@ public class MerchantConfigServiceImpl extends ServiceImpl<MerchantConfigMapper,
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<MerchantConfig> selectMeChByIsOpen() {
|
||||
public List<MerchantConfig> selectMeChByIsOpen(Integer storeId) {
|
||||
QueryWrapper queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.eq("is_open_rule","1");
|
||||
queryWrapper.eq("store_id",storeId);
|
||||
List list = baseMapper.selectList(queryWrapper);
|
||||
return list;
|
||||
}
|
||||
|
@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.fuint.business.commission.entity.StaffCommission;
|
||||
import com.fuint.business.commission.service.StaffCommissionService;
|
||||
import com.fuint.business.commission.vo.StaffCommissionVo;
|
||||
import com.fuint.framework.web.BaseController;
|
||||
import com.fuint.framework.web.ResponseObject;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
@ -31,7 +32,7 @@ public class StaffCommissionController extends BaseController {
|
||||
@RequestParam(value = "page",defaultValue = "1") Integer pageNo,
|
||||
@RequestParam(value = "pageSize",defaultValue = "10") Integer pageSize){
|
||||
Page page =new Page(pageNo,pageSize);
|
||||
IPage<StaffCommission> list = commissionService.selectCommissionList(page,commission);
|
||||
IPage<StaffCommissionVo> list = commissionService.selectCommissionList(page,commission);
|
||||
return getSuccessResult(list);
|
||||
}
|
||||
|
||||
|
@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.fuint.business.commission.entity.StaffCommission;
|
||||
import com.fuint.business.commission.vo.StaffCommissionVo;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
public interface StaffCommissionMapper extends BaseMapper<StaffCommission> {
|
||||
@ -12,5 +13,5 @@ public interface StaffCommissionMapper extends BaseMapper<StaffCommission> {
|
||||
* @param page
|
||||
* @return
|
||||
*/
|
||||
public IPage<StaffCommission> selectCommissionList(Page page,@Param("commission") StaffCommission commission);
|
||||
public IPage<StaffCommissionVo> selectCommissionList(Page page, @Param("commission") StaffCommission commission);
|
||||
}
|
||||
|
@ -2,14 +2,14 @@
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.fuint.business.commission.mapper.StaffCommissionMapper">
|
||||
<sql id="selectCommission">
|
||||
select * from staff_commission
|
||||
select sc.*,td.duty_name from staff_commission sc left join t_duty td on sc.staff_role_group = td.duty_id
|
||||
</sql>
|
||||
|
||||
<select id="selectCommissionList" resultType="com.fuint.business.commission.entity.StaffCommission">
|
||||
<select id="selectCommissionList" resultType="com.fuint.business.commission.vo.StaffCommissionVo">
|
||||
<include refid="selectCommission"></include>
|
||||
<where>
|
||||
store_id = #{commission.storeId}
|
||||
and commission_source = #{commission.commissionSource}
|
||||
sc.store_id = #{commission.storeId}
|
||||
and sc.commission_source = #{commission.commissionSource}
|
||||
</where>
|
||||
</select>
|
||||
</mapper>
|
@ -56,4 +56,10 @@ public interface CommissionRecordService {
|
||||
*/
|
||||
boolean deleteById(Integer id);
|
||||
|
||||
/**
|
||||
* 添加提成记录信息
|
||||
* @param commissionRecord
|
||||
* @return
|
||||
*/
|
||||
int insertRecord(CommissionRecord commissionRecord);
|
||||
}
|
||||
|
@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.fuint.business.commission.entity.StaffCommission;
|
||||
import com.fuint.business.commission.vo.StaffCommissionVo;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
@ -17,7 +18,7 @@ public interface StaffCommissionService extends IService<StaffCommission> {
|
||||
* @param page
|
||||
* @return
|
||||
*/
|
||||
public IPage<StaffCommission> selectCommissionList(Page page, StaffCommission commission);
|
||||
public IPage<StaffCommissionVo> selectCommissionList(Page page, StaffCommission commission);
|
||||
|
||||
/**
|
||||
* 根据id查询员工提成方案信息
|
||||
@ -53,4 +54,15 @@ public interface StaffCommissionService extends IService<StaffCommission> {
|
||||
*/
|
||||
public int updateStaffCommission(StaffCommission commission);
|
||||
|
||||
/**
|
||||
* 根据员工id计算提成金额
|
||||
* @param staffId 员工id
|
||||
* @param storeId 店铺id
|
||||
* @param amount 订单金额
|
||||
* @param payAmount 实付金额
|
||||
* @param oilLiters 油品消费升数
|
||||
* @param type 订单类型(油品、非油品)
|
||||
* @param orderNo 关联订单号
|
||||
*/
|
||||
void countStaffCommission(Integer staffId,Integer storeId,Double amount,Double payAmount,Double oilLiters,String type,String orderNo);
|
||||
}
|
||||
|
@ -92,4 +92,9 @@ public class CommissionRecordServiceImpl implements CommissionRecordService {
|
||||
public boolean deleteById(Integer id) {
|
||||
return this.commissionRecordMapper.deleteById(id) > 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int insertRecord(CommissionRecord commissionRecord) {
|
||||
return commissionRecordMapper.insert(commissionRecord);
|
||||
}
|
||||
}
|
||||
|
@ -1,14 +1,19 @@
|
||||
package com.fuint.business.commission.service.impl;
|
||||
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.fuint.business.commission.entity.CommissionRecord;
|
||||
import com.fuint.business.commission.entity.StaffCommission;
|
||||
import com.fuint.business.commission.mapper.StaffCommissionMapper;
|
||||
import com.fuint.business.commission.service.CommissionRecordService;
|
||||
import com.fuint.business.commission.service.StaffCommissionService;
|
||||
import com.fuint.business.commission.vo.StaffCommissionVo;
|
||||
import com.fuint.common.dto.AccountInfo;
|
||||
import com.fuint.common.util.TokenUtil;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
@ -26,26 +31,12 @@ import java.util.Map;
|
||||
@Service
|
||||
public class StaffCommissionServiceImpl extends ServiceImpl<StaffCommissionMapper, StaffCommission> implements StaffCommissionService {
|
||||
@Override
|
||||
public IPage<StaffCommission> selectCommissionList(Page page, StaffCommission commission) {
|
||||
public IPage<StaffCommissionVo> selectCommissionList(Page page, StaffCommission commission) {
|
||||
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
||||
Integer storeId = nowAccountInfo.getStoreId();
|
||||
commission.setStoreId(storeId);
|
||||
IPage<StaffCommission> staffCommissionIPage = baseMapper.selectCommissionList(page, commission);
|
||||
for (StaffCommission record : staffCommissionIPage.getRecords()) {
|
||||
if (record.getTakeEffect()!=null && record.getTakeEffect().equals("")){
|
||||
String substring = record.getTakeEffect().substring(24, 43);
|
||||
Date date = new Date();
|
||||
SimpleDateFormat dateFormat= new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||
String now = dateFormat.format(date);
|
||||
int row = substring.compareTo(now);
|
||||
if (row == -1){
|
||||
record.setStatus("jy");
|
||||
baseMapper.updateById(record);
|
||||
}
|
||||
}
|
||||
}
|
||||
IPage<StaffCommission> commissionIPage = baseMapper.selectCommissionList(page, commission);
|
||||
return commissionIPage;
|
||||
IPage<StaffCommissionVo> staffCommissionIPage = baseMapper.selectCommissionList(page, commission);
|
||||
return staffCommissionIPage;
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -74,18 +65,90 @@ public class StaffCommissionServiceImpl extends ServiceImpl<StaffCommissionMappe
|
||||
|
||||
@Override
|
||||
public int insertStaffCommission(StaffCommission commission) {
|
||||
StaffCommission staffCommission = this.selectCommissionByRole(commission);
|
||||
int row = 0;
|
||||
// 判断当前店铺是否存在同角色的同一提成方案
|
||||
if (ObjectUtil.isNotEmpty(staffCommission)){
|
||||
row = 0;
|
||||
return row;
|
||||
}
|
||||
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
||||
Integer storeId = nowAccountInfo.getStoreId();
|
||||
commission.setStoreId(storeId);
|
||||
int row = baseMapper.insert(commission);
|
||||
row = baseMapper.insert(commission);
|
||||
return row;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int updateStaffCommission(StaffCommission commission) {
|
||||
int row = baseMapper.updateById(commission);
|
||||
StaffCommission staffCommission = this.selectCommissionByRole(commission);
|
||||
int row = 0;
|
||||
// 判断当前店铺是否存在同角色的同一提成方案
|
||||
if (ObjectUtil.isNotEmpty(staffCommission) && staffCommission.getId()!=commission.getId()){
|
||||
row = 0;
|
||||
return row;
|
||||
}
|
||||
row = baseMapper.updateById(commission);
|
||||
return row;
|
||||
}
|
||||
|
||||
@Autowired
|
||||
private CommissionRecordService commissionRecordService;
|
||||
|
||||
@Override
|
||||
public void countStaffCommission(Integer staffId,Integer storeId,Double amount,Double payAmount,Double oilLiters,String type,String orderNo) {
|
||||
QueryWrapper queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.eq("store_id",storeId);
|
||||
queryWrapper.eq("status","qy");
|
||||
// 查询当前店铺启用的提成方案信息
|
||||
List<StaffCommission> list = baseMapper.selectList(queryWrapper);
|
||||
if (list.size()>0){
|
||||
for (StaffCommission staffCommission : list) {
|
||||
CommissionRecord commissionRecord = new CommissionRecord();
|
||||
if (type.equals(staffCommission.getCommissionSource())){
|
||||
commissionRecord.setStaffId(staffId);
|
||||
commissionRecord.setStoreId(storeId);
|
||||
commissionRecord.setType(type+"订单出售");
|
||||
commissionRecord.setDescription(type+"订单出售提成");
|
||||
commissionRecord.setOrderNo(orderNo);
|
||||
Double royaltyRate = Double.valueOf(staffCommission.getRoyaltyRate().substring(0,staffCommission.getRoyaltyRate().length()-1));
|
||||
String unit = staffCommission.getRoyaltyRate().substring(staffCommission.getRoyaltyRate().length()-1);
|
||||
// 按照订单金额计算提成
|
||||
if (staffCommission.getType().equals("orderAmount")){
|
||||
if (amount>=Double.valueOf(staffCommission.getMeetCondition())){
|
||||
if (unit.equals("元")){
|
||||
commissionRecord.setAmount(royaltyRate);
|
||||
}
|
||||
if (unit.equals("%")){
|
||||
commissionRecord.setAmount(amount*(royaltyRate/100));
|
||||
}
|
||||
}
|
||||
}
|
||||
// 按照实付金额计算提成
|
||||
if (staffCommission.getType().equals("payAmount")){
|
||||
if (payAmount>=Double.valueOf(staffCommission.getMeetCondition())){
|
||||
if (unit.equals("元")){
|
||||
commissionRecord.setAmount(royaltyRate);
|
||||
}
|
||||
if (unit.equals("%")){
|
||||
commissionRecord.setAmount(payAmount*(royaltyRate/100));
|
||||
}
|
||||
}
|
||||
}
|
||||
// 按照加油数量计算提成
|
||||
if (staffCommission.getType().equals("refuleNum")){
|
||||
if (oilLiters>=Double.valueOf(staffCommission.getMeetCondition())){
|
||||
if (unit.equals("元")){
|
||||
commissionRecord.setAmount(royaltyRate);
|
||||
}
|
||||
if (unit.equals("%")){
|
||||
commissionRecord.setAmount(oilLiters*(royaltyRate/100));
|
||||
}
|
||||
}
|
||||
}
|
||||
commissionRecordService.insertRecord(commissionRecord);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,12 @@
|
||||
package com.fuint.business.commission.vo;
|
||||
|
||||
import com.fuint.business.commission.entity.StaffCommission;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class StaffCommissionVo extends StaffCommission {
|
||||
/**
|
||||
* 角色名
|
||||
*/
|
||||
private String dutyName;
|
||||
}
|
@ -508,7 +508,7 @@ public class IntegralOrdersServiceImpl implements IntegralOrdersService {
|
||||
if (flag) {
|
||||
// 调用支付接口
|
||||
// 判断是否开启支付规则
|
||||
List<MerchantConfig> list = merchantConfigService.selectMeChByIsOpen();
|
||||
List<MerchantConfig> list = merchantConfigService.selectMeChByIsOpen(integralOrdersList.getStoreId());
|
||||
// if (list.size() > 0) {
|
||||
// oilConfigService.oilRule();
|
||||
// }
|
||||
|
@ -423,10 +423,10 @@ public class ActiveExchangeServiceImpl implements ActiveExchangeService {
|
||||
public PaymentActiveVO paymentActive(PaymentActiveDTO paymentActiveDTO) {
|
||||
PaymentActiveVO paymentActiveVO = new PaymentActiveVO();
|
||||
Integer storeId = paymentActiveDTO.getStoreId();
|
||||
BigDecimal amount = new BigDecimal(0.00);
|
||||
BigDecimal fullAmount = new BigDecimal(0.00);
|
||||
BigDecimal a = new BigDecimal(0.1);
|
||||
BigDecimal b = new BigDecimal(10);
|
||||
BigDecimal amount = new BigDecimal("0.00");
|
||||
BigDecimal fullAmount = new BigDecimal("0.00");
|
||||
BigDecimal a = new BigDecimal("0.1");
|
||||
BigDecimal b = new BigDecimal("10");
|
||||
//折扣
|
||||
List<ActiveDiscountPayVO> activeDiscountVOList = oilOrderMapper.selectActiveDiscount(storeId,paymentActiveDTO.getAmount());
|
||||
if (CollectionUtils.isNotEmpty(activeDiscountVOList)){
|
||||
|
@ -125,7 +125,7 @@ public class OilOrder extends BaseEntity implements Serializable {
|
||||
/**
|
||||
* 油罐id
|
||||
*/
|
||||
@TableField(exist = false)
|
||||
// @TableField(exist = false)
|
||||
private Integer tankId;
|
||||
}
|
||||
|
||||
|
@ -39,17 +39,17 @@ public interface HangBillMapper extends BaseMapper<HangBill> {
|
||||
* 查询当前店铺所有的订单总额
|
||||
* @return
|
||||
*/
|
||||
double selectAllAmount(@Param("storeId") int storeId);
|
||||
Double selectAllAmount(@Param("storeId") int storeId);
|
||||
|
||||
/**
|
||||
* 查询当前店铺归还的账单总额
|
||||
* @return
|
||||
*/
|
||||
double selectReturnAmount(@Param("storeId") int storeId);
|
||||
Double selectReturnAmount(@Param("storeId") int storeId);
|
||||
|
||||
/**
|
||||
* 查询当前店铺未归还的账单总额
|
||||
* @return
|
||||
*/
|
||||
double selectNoReturnAmount(@Param("storeId") int storeId);
|
||||
Double selectNoReturnAmount(@Param("storeId") int storeId);
|
||||
}
|
||||
|
@ -54,7 +54,7 @@
|
||||
<if test="allOrderInfo.params.endTime != null and allOrderInfo.params.endTime != ''"><!-- 结束时间检索 -->
|
||||
and date_format(pay_time,'%y%m%d') <= date_format(#{allOrderInfo.params.endTime},'%y%m%d')
|
||||
</if>
|
||||
order by pay_time desc
|
||||
order by aoi.create_time desc
|
||||
</select>
|
||||
<select id="sumPayMoney" resultType="java.lang.String">
|
||||
select
|
||||
|
@ -18,7 +18,7 @@
|
||||
<if test="order.status != null and order.status != ''">
|
||||
and cvco.status = #{order.status}
|
||||
</if>
|
||||
order by cvco.pay_time desc
|
||||
order by cvco.create_time desc
|
||||
</where>
|
||||
</select>
|
||||
</mapper>
|
@ -24,7 +24,7 @@
|
||||
<if test="order.params.endTime != null and order.params.endTime != ''"><!-- 结束时间检索 -->
|
||||
and date_format(pay_time,'%y%m%d') <= date_format(#{order.params.endTime},'%y%m%d')
|
||||
</if>
|
||||
order by pay_time desc
|
||||
order by create_time desc
|
||||
</where>
|
||||
</select>
|
||||
<select id="selectCashierOrderById" resultType="com.fuint.business.order.vo.CashierOrderVo"
|
||||
|
@ -36,6 +36,7 @@
|
||||
<if test="hangBill.params.endTime != null and hangBill.params.endTime != ''"><!-- 结束时间检索 -->
|
||||
and date_format(hb.create_time,'%y%m%d') <= date_format(#{hangBill.params.endTime},'%y%m%d')
|
||||
</if>
|
||||
order by create_time desc
|
||||
</where>
|
||||
</select>
|
||||
<select id="selectHangBillById" resultType="com.fuint.business.order.vo.HangBillVo" parameterType="int">
|
||||
@ -52,13 +53,13 @@
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectAllAmount" resultType="double">
|
||||
<select id="selectAllAmount" resultType="java.lang.Double">
|
||||
select sum(amount) from hang_bill where store_id = #{storeId}
|
||||
</select>
|
||||
<select id="selectReturnAmount" resultType="double">
|
||||
<select id="selectReturnAmount" resultType="java.lang.Double">
|
||||
select sum(repaid_amount) from hang_bill where store_id = #{storeId}
|
||||
</select>
|
||||
<select id="selectNoReturnAmount" resultType="double">
|
||||
<select id="selectNoReturnAmount" resultType="java.lang.Double">
|
||||
select sum(outstand_amount) from hang_bill where store_id = #{storeId}
|
||||
</select>
|
||||
</mapper>
|
@ -30,7 +30,7 @@
|
||||
<if test="order.params.endTime != null and order.params.endTime != ''"><!-- 结束时间检索 -->
|
||||
and date_format(create_time,'%y%m%d') <= date_format(#{order.params.endTime},'%y%m%d')
|
||||
</if>
|
||||
order by pay_time desc
|
||||
order by create_time desc
|
||||
</where>
|
||||
</select>
|
||||
<select id="getMtOrderList" resultType="com.fuint.business.order.vo.LJOrderVo">
|
||||
|
@ -39,7 +39,7 @@
|
||||
<if test="order.params.endTime != null and order.params.endTime != ''"><!-- 结束时间检索 -->
|
||||
and date_format(pay_time,'%y%m%d') <= date_format(#{order.params.endTime},'%y%m%d')
|
||||
</if>
|
||||
order by pay_time desc
|
||||
order by create_time desc
|
||||
</where>
|
||||
</select>
|
||||
<select id="selectOilOrderByOrderNo" resultType="com.fuint.business.order.vo.OilOrderVo"
|
||||
@ -75,7 +75,7 @@
|
||||
<if test="order.remark != null and order.remark != ''">
|
||||
and remark = #{order.remark}
|
||||
</if>
|
||||
order by pay_time desc
|
||||
order by create_time desc
|
||||
</where>
|
||||
</select>
|
||||
|
||||
|
@ -12,7 +12,7 @@
|
||||
<include refid="selectReturnRecord"></include>
|
||||
<where>
|
||||
rd.hang_bill_id = #{returnRecord.hangBillId}
|
||||
order by pay_time desc
|
||||
order by rd.create_time desc
|
||||
</where>
|
||||
</select>
|
||||
<!-- <select id="selectHangBillById" resultType="com.fuint.business.order.vo.HangBillVo" parameterType="int">-->
|
||||
|
@ -83,7 +83,7 @@ public interface HangBillService extends IService<HangBill> {
|
||||
* 查询当前店铺所有的订单总额
|
||||
* @return
|
||||
*/
|
||||
double selectAllAmount();
|
||||
Double selectAllAmount();
|
||||
|
||||
/**
|
||||
* 查询当前店铺归还账单的数量
|
||||
@ -95,11 +95,11 @@ public interface HangBillService extends IService<HangBill> {
|
||||
* 查询当前店铺归还的账单总额
|
||||
* @return
|
||||
*/
|
||||
double selectReturnAmount();
|
||||
Double selectReturnAmount();
|
||||
|
||||
/**
|
||||
* 查询当前店铺未归还的账单总额
|
||||
* @return
|
||||
*/
|
||||
double selectNoReturnAmount();
|
||||
Double selectNoReturnAmount();
|
||||
}
|
||||
|
@ -254,7 +254,7 @@ public class HangBillServiceImpl extends ServiceImpl<HangBillMapper, HangBill> i
|
||||
}
|
||||
|
||||
@Override
|
||||
public double selectAllAmount() {
|
||||
public Double selectAllAmount() {
|
||||
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
||||
return baseMapper.selectAllAmount(nowAccountInfo.getStoreId());
|
||||
}
|
||||
@ -269,13 +269,13 @@ public class HangBillServiceImpl extends ServiceImpl<HangBillMapper, HangBill> i
|
||||
}
|
||||
|
||||
@Override
|
||||
public double selectReturnAmount() {
|
||||
public Double selectReturnAmount() {
|
||||
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
||||
return baseMapper.selectReturnAmount(nowAccountInfo.getStoreId());
|
||||
}
|
||||
|
||||
@Override
|
||||
public double selectNoReturnAmount() {
|
||||
public Double selectNoReturnAmount() {
|
||||
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
||||
return baseMapper.selectNoReturnAmount(nowAccountInfo.getStoreId());
|
||||
}
|
||||
@ -290,7 +290,7 @@ public class HangBillServiceImpl extends ServiceImpl<HangBillMapper, HangBill> i
|
||||
if (!map.get("repaidAmount").equals("0") && !payType.equals("CASH")){
|
||||
Integer allAmount = (int) (Double.valueOf(map.get("repaidAmount"))*100);
|
||||
// 判断是否开启支付规则
|
||||
List<MerchantConfig> list = merchantConfigService.selectMeChByIsOpen();
|
||||
List<MerchantConfig> list = merchantConfigService.selectMeChByIsOpen(storeId);
|
||||
if (list.size()>0){
|
||||
oilConfigService.oilRule();
|
||||
}
|
||||
|
@ -369,6 +369,7 @@ public class OilOrderServiceImpl extends ServiceImpl<OilOrderMapper, OilOrder> i
|
||||
order.setPayType(payType);
|
||||
order.setInvoicing("未开票");
|
||||
order.setOrderStatus(payStatus);
|
||||
order.setTankId(Integer.valueOf(jsonObjects.get(0).get("tankId").toString()));
|
||||
if (payType.equals("CASH")){
|
||||
order.setPayTime(new Date());
|
||||
this.addOilTrack(jsonObjects.get(i),storeId);
|
||||
@ -386,7 +387,7 @@ public class OilOrderServiceImpl extends ServiceImpl<OilOrderMapper, OilOrder> i
|
||||
if (!map.get("allAmount").equals("0") && !map.get("payType").equals("CASH")){
|
||||
Integer allAmount = (int) (Double.valueOf(map.get("allAmount"))*100);
|
||||
// 判断是否开启支付规则
|
||||
List<MerchantConfig> list = merchantConfigService.selectMeChByIsOpen();
|
||||
List<MerchantConfig> list = merchantConfigService.selectMeChByIsOpen(storeId);
|
||||
if (list.size()>0){
|
||||
oilConfigService.oilRule();
|
||||
}
|
||||
@ -1173,7 +1174,7 @@ public class OilOrderServiceImpl extends ServiceImpl<OilOrderMapper, OilOrder> i
|
||||
int growth = balance.getGrowthValue();
|
||||
if (refuelMoney==null){
|
||||
String refuelMoney1 = balance.getRefuelMoney();
|
||||
if (StringUtils.isNotEmpty(refuelMoney1)){
|
||||
if (StringUtils.isNotEmpty(refuelMoney1) && !"null".equals(refuelMoney1)){
|
||||
JSONArray objects = JSONArray.parseArray(refuelMoney);
|
||||
JSONArray objects1 = JSONArray.parseArray(refuelMoney1);
|
||||
List<RefuelMoney> list = new ArrayList<>();
|
||||
|
@ -129,7 +129,7 @@ public class LJUserGradeServiceImpl extends ServiceImpl<LJUserGradeMapper, LJUse
|
||||
res.put("userGrade",baseMapper.selectById(Integer.valueOf(gradeId)));
|
||||
return res;
|
||||
}else {
|
||||
return null;
|
||||
return res;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -806,13 +806,19 @@ import {listReturnRecord, returnRecordByOrderNo, returnRecordInfo} from "@/api/c
|
||||
this.returnTotal = res.data
|
||||
})
|
||||
hangBillAllAmount().then(res => {
|
||||
this.allAmount = res.data
|
||||
if (res.data) {
|
||||
this.allAmount = res.data
|
||||
}
|
||||
})
|
||||
hangBillAllReturnAmount().then(res => {
|
||||
this.returnAllAmount = res.data
|
||||
if (res.data) {
|
||||
this.returnAllAmount = res.data
|
||||
}
|
||||
})
|
||||
hangBillAllNoReturnAmount().then(res => {
|
||||
this.noReturnAllAmount = res.data
|
||||
if (res.data) {
|
||||
this.noReturnAllAmount = res.data
|
||||
}
|
||||
})
|
||||
},
|
||||
getPayMeth(list,val){
|
||||
|
@ -508,7 +508,22 @@
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
<!-- 会员登录-->
|
||||
<!-- 立即结算-->
|
||||
<el-dialog
|
||||
title="扫码支付"
|
||||
:visible.sync="dialogVisiblejLoading"
|
||||
width="30%"
|
||||
:close-on-click-modal="false">
|
||||
<div>
|
||||
<el-result icon="info" title="支付状态未查询成功,请移至订单查看">
|
||||
<template slot="extra">
|
||||
<el-button type="primary" @click="handClose">关 闭</el-button>
|
||||
</template>
|
||||
</el-result>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
<!-- 会员登录-->
|
||||
<el-dialog
|
||||
title="会员信息"
|
||||
:visible.sync="dialogVisiblevip"
|
||||
@ -883,8 +898,11 @@
|
||||
oilGunList:[],
|
||||
// 支付方式列表
|
||||
payList:[],
|
||||
// 倒计时
|
||||
timestamp: 15,
|
||||
dialogVisible: false,
|
||||
dialogVisiblej: false,
|
||||
dialogVisiblejLoading: false,
|
||||
dialogVisiblevip:false,
|
||||
dialogVisibleamount:false,
|
||||
dialogVisibleMember:false,
|
||||
@ -2299,6 +2317,7 @@
|
||||
},
|
||||
// 重置油品订单
|
||||
resetting(){
|
||||
this.seekZero = 0;
|
||||
this.oilOrder = [];
|
||||
this.oilActualPay = 0;
|
||||
this.oilTotal = 0;
|
||||
@ -2339,7 +2358,6 @@
|
||||
|
||||
// 校验油罐内油是否足够
|
||||
getOilTank(this.form.tankId).then(res => {
|
||||
console.log(res)
|
||||
if (res.data.storedQuantity-this.form.liters<0){
|
||||
this.$modal.msgError("所加油的升数大于油罐内的升数,请重新选择加油升数")
|
||||
return;
|
||||
@ -2546,7 +2564,7 @@
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (!this.authCode){
|
||||
if (!this.authCode && ((+this.oilActualPay) + (+this.goodsActualPay))>0){
|
||||
this.$modal.msgError("请先扫码");
|
||||
return;
|
||||
}
|
||||
@ -2654,6 +2672,7 @@
|
||||
_this.oilOrder = []
|
||||
_this.goodsOrder = []
|
||||
_this.amount = 0
|
||||
_this.seekZero = 0;
|
||||
};
|
||||
this.userNo = ""
|
||||
this.map = {
|
||||
@ -2724,6 +2743,7 @@
|
||||
if (response.data!=null){
|
||||
if (response.data.status == "unpaid"){
|
||||
_this.isQuery = true;
|
||||
_this.dialogVisiblejLoading = true
|
||||
}
|
||||
if (response.data.status == "paid"){
|
||||
_this.isPay = true;
|
||||
@ -2749,7 +2769,8 @@
|
||||
let timer2 = setInterval(function () {
|
||||
if (_this.isQuery || !_this.dialogVisiblej) {
|
||||
_this.loading = false;
|
||||
_this.isPay = true;
|
||||
// _this.isPay = true;
|
||||
// _this.countdown()
|
||||
clearInterval(timer);
|
||||
clearTimeout(timer3);
|
||||
|
||||
@ -2764,7 +2785,22 @@
|
||||
this.isPaySuccess = false;
|
||||
}, 10000)
|
||||
},
|
||||
|
||||
// 倒计时刷新
|
||||
countdown(){
|
||||
let _this = this
|
||||
let timer = setInterval(() => {
|
||||
// countdown减1
|
||||
_this.timestamp--;
|
||||
// 如果倒计时为0,清除定时器
|
||||
if(_this.timestamp === 0) {
|
||||
clearInterval(timer)
|
||||
_this.timestamp = 15
|
||||
}
|
||||
}, 1000);
|
||||
},
|
||||
handClose(){
|
||||
this.dialogVisiblejLoading = false
|
||||
// this.resetting1()
|
||||
this.authCode = "";
|
||||
this.userNo = ""
|
||||
|
@ -145,7 +145,11 @@
|
||||
</el-form>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="terminal" label="终端" align="center" width="80"></el-table-column>
|
||||
<el-table-column prop="terminal" label="终端" align="center" width="80">
|
||||
<template slot-scope="props">
|
||||
<span>{{ getVal(terminalList,props.row.terminal) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="oils" label="油品/油枪" align="center">
|
||||
<template slot-scope="props">
|
||||
<span>{{ getName(oilNameList,props.row.oils) }}/{{ getName1(oilGunList,props.row.oilGunNum) }}</span>
|
||||
@ -252,6 +256,8 @@
|
||||
cash:'0',
|
||||
},
|
||||
oilGunList:[],
|
||||
// 终端列表
|
||||
terminalList:[],
|
||||
}
|
||||
},
|
||||
created() {
|
||||
@ -261,6 +267,15 @@
|
||||
this.getOilGunList();
|
||||
},
|
||||
methods:{
|
||||
getVal(list,val){
|
||||
let name = "";
|
||||
list.forEach(item => {
|
||||
if (item.dictValue == val){
|
||||
name = item.dictLabel
|
||||
}
|
||||
})
|
||||
return name;
|
||||
},
|
||||
// 获取油枪信息
|
||||
getOilGunList(){
|
||||
getOilNumberGun().then(res => {
|
||||
@ -356,6 +371,9 @@
|
||||
queryStaffs().then( response => {
|
||||
this.staffList = response.data;
|
||||
})
|
||||
getDicts("terminal").then( response => {
|
||||
this.terminalList = response.data;
|
||||
})
|
||||
},
|
||||
// 获取列表信息
|
||||
getList(val){
|
||||
|
@ -335,6 +335,7 @@
|
||||
this.oilOrder.storeId = this.storeId
|
||||
this.oilOrder.staffId = id
|
||||
this.oilOrder.oilNum = Math.ceil((this.value/this.oilPrice)*100)/100
|
||||
this.oilOrder.tankId = uni.getStorageSync("tankId")
|
||||
let _this = this;
|
||||
// 添加油品订单信息
|
||||
request({
|
||||
|
@ -39,7 +39,7 @@
|
||||
|
||||
<view style="background-color: white;width: 94%;margin: 15px auto;">
|
||||
|
||||
<view class="desc" v-if="isStoreValueCard">
|
||||
<view class="desc">
|
||||
<view style="display: flex;">
|
||||
储值卡
|
||||
<span style="display: flex;">(<span v-if="isUseChildCard">主卡</span>余额:¥{{user.cardBalance}})</span>
|
||||
@ -74,7 +74,7 @@
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="desc" v-if="isFullPreferential">
|
||||
<view class="desc">
|
||||
<view style="display: flex;">
|
||||
活动优惠
|
||||
<!-- <span style="display: flex;">(满减活动)</span> -->
|
||||
@ -91,7 +91,7 @@
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="desc" v-if="cardsList.length>0">
|
||||
<view class="desc" >
|
||||
<view style="display: flex;">
|
||||
优惠券优惠
|
||||
<span style="display: flex;">(优惠券)</span>
|
||||
@ -108,7 +108,7 @@
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="desc" v-if="isGradePreferential">
|
||||
<view class="desc">
|
||||
<view style="display: flex;">
|
||||
会员等级优惠
|
||||
<!-- <span style="display: flex;">({{userGrade.name}})</span> -->
|
||||
@ -254,7 +254,7 @@
|
||||
},
|
||||
onLoad(e) {
|
||||
this.orderNo = e.orderNo
|
||||
// this.orderNo = "2345202401161204280406d3"
|
||||
// this.orderNo = "234520240117095256fbd86e"
|
||||
},
|
||||
onShow() {
|
||||
this.getOilOrder();
|
||||
@ -827,7 +827,7 @@
|
||||
}
|
||||
_this.user = res.data.userVo;
|
||||
_this.user = res.data.userVo;
|
||||
if (res.data.userVo.refuelMoney){
|
||||
if (res.data.userVo.refuelMoney && res.data.userVo.refuelMoney!='null'){
|
||||
_this.refuelMoney = JSON.parse(res.data.userVo.refuelMoney)
|
||||
_this.refuelMoneyAfter = JSON.parse(res.data.userVo.refuelMoney)
|
||||
_this.chooseRefuelMoney()
|
||||
@ -852,7 +852,7 @@
|
||||
_this.getStaffList(res.data.staffId)
|
||||
_this.getStore(res.data.storeId)
|
||||
_this.getOilNumber(res.data.storeId)
|
||||
_this.chooseCoupons()
|
||||
// _this.chooseCoupons()
|
||||
_this.getUser(res.data.userId)
|
||||
}
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user