Merge branch 'master' of https://gitee.com/nny_1/oilSystem
This commit is contained in:
commit
478e6fc8f8
@ -427,61 +427,6 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<!-- <el-row>-->
|
||||
<!-- <el-col :span="24">-->
|
||||
<!-- <el-form-item label="升级条件描述" prop="catchCondition">-->
|
||||
<!-- <el-input v-model="form.catchCondition" placeholder="请输入升级条件描述" maxlength="200" />-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- </el-col>-->
|
||||
<!-- </el-row>-->
|
||||
<!-- <el-row>-->
|
||||
<!-- <el-col :span="24">-->
|
||||
<!-- <el-form-item label="升级权益描述" prop="userPrivilege">-->
|
||||
<!-- <el-input v-model="form.userPrivilege" type="textarea" placeholder="请输入升级权益描述"></el-input>-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- </el-col>-->
|
||||
<!-- </el-row>-->
|
||||
<!-- <el-row>-->
|
||||
<!-- <el-col :span="24">-->
|
||||
<!-- <el-form-item label="升级方式" prop="catchType">-->
|
||||
<!-- <el-select-->
|
||||
<!-- v-model="form.catchType"-->
|
||||
<!-- clearable-->
|
||||
<!-- placeholder="升级方式"-->
|
||||
<!-- >-->
|
||||
<!-- <el-option v-for="catchType in catchTypeList" :key="catchType.key" :label="catchType.name" :value="catchType.value"/>-->
|
||||
<!-- </el-select>-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- </el-col>-->
|
||||
<!-- </el-row>-->
|
||||
<!-- <el-row>-->
|
||||
<!-- <el-col :span="24">-->
|
||||
<!-- <el-form-item label="升级条件值" prop="catchValue">-->
|
||||
<!-- <el-input v-model="form.catchValue" placeholder="请输入升级条件值,单位可能是元、次"></el-input>-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- </el-col>-->
|
||||
<!-- </el-row>-->
|
||||
<!-- <el-row>-->
|
||||
<!-- <el-col :span="24">-->
|
||||
<!-- <el-form-item label="有效天数" prop="validDay">-->
|
||||
<!-- <el-input v-model="form.validDay" placeholder="请输入有效天数,如30,0表示永久有效"></el-input>-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- </el-col>-->
|
||||
<!-- </el-row>-->
|
||||
<!-- <el-row>-->
|
||||
<!-- <el-col :span="24">-->
|
||||
<!-- <el-form-item label="支付折扣" prop="discount">-->
|
||||
<!-- <el-input v-model="form.discount" placeholder="请输入支付折扣,数字,如:8.8"></el-input>-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- </el-col>-->
|
||||
<!-- </el-row>-->
|
||||
<!-- <el-row>-->
|
||||
<!-- <el-col :span="24">-->
|
||||
<!-- <el-form-item label="积分加速" prop="speedPoint">-->
|
||||
<!-- <el-input v-model="form.speedPoint" placeholder="请输入积分加速,积分加速倍数,数字"></el-input>-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- </el-col>-->
|
||||
<!-- </el-row>-->
|
||||
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
@ -588,6 +533,9 @@ export default {
|
||||
name: [
|
||||
{ required: true, message: "等级名称不能为空", trigger: "blur" },
|
||||
],
|
||||
growthValue: [
|
||||
{ required: true, message: "请填写会员升级所需成长值", trigger: "blur" },
|
||||
],
|
||||
gasoline: [
|
||||
{ required: true, message: "请填写汽油成长值", trigger: "blur" },
|
||||
],
|
||||
|
@ -25,7 +25,7 @@ public class LJGoodsController extends BaseController {
|
||||
private LJGoodsService goodsService;
|
||||
|
||||
/**
|
||||
* 根据条件查询商品信息
|
||||
* 根据条件查询商品信息 传参page、pageSize、商品是否在回收站isRecovery:0不在、1在
|
||||
* @param goods
|
||||
* @param pageNo
|
||||
* @param pageSize
|
||||
|
@ -37,6 +37,16 @@ public class OilOrderController extends BaseController {
|
||||
return getSuccessResult(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id查询油品订单信息
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/{id}")
|
||||
public ResponseObject oilOrderInfo(@PathVariable Integer id){
|
||||
return getSuccessResult(orderService.selectOilOrderById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量添加订单信息
|
||||
* @param map
|
||||
|
@ -28,6 +28,13 @@ public interface OilOrderService extends IService<OilOrder> {
|
||||
*/
|
||||
public OilOrder selectOilOrderByOrderNo(String orderNo);
|
||||
|
||||
/**
|
||||
* 根据id查询油品订单信息
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
public OilOrder selectOilOrderById(int id);
|
||||
|
||||
/**
|
||||
* 根据订单号模糊查询商品订单信息
|
||||
* @param orderNo
|
||||
|
@ -70,6 +70,11 @@ public class OilOrderServiceImpl extends ServiceImpl<OilOrderMapper, OilOrder> i
|
||||
return order;
|
||||
}
|
||||
|
||||
@Override
|
||||
public OilOrder selectOilOrderById(int id) {
|
||||
return baseMapper.selectById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<OilOrderVo> queryOilOrderByOrderNo(String orderNo) {
|
||||
List<OilOrderVo> oilOrderVos = baseMapper.selectOilOrderByOrderNo(orderNo);
|
||||
@ -92,6 +97,8 @@ public class OilOrderServiceImpl extends ServiceImpl<OilOrderMapper, OilOrder> i
|
||||
String oilOrder = map.get("oilOrder");
|
||||
// 商品订单信息
|
||||
String goodsOrder = map.get("goodsOrder");
|
||||
// 囤油卡变化之后的信息
|
||||
String refuelMoney = map.get("refuelMoney");
|
||||
// 支付类型
|
||||
String payType = map.get("payType");
|
||||
// 油品订单金额
|
||||
@ -193,7 +200,7 @@ public class OilOrderServiceImpl extends ServiceImpl<OilOrderMapper, OilOrder> i
|
||||
}
|
||||
|
||||
if (userId!=null){
|
||||
this.updateGrowthValue(oilActualPay, userId, Integer.valueOf(jsonObjects.get(i).get("oilName").toString()));
|
||||
this.updateGrowthValue(oilActualPay, userId, Integer.valueOf(jsonObjects.get(i).get("oilName").toString()),refuelMoney);
|
||||
}
|
||||
order.setStoreId(storeId);
|
||||
order.setUserId(userId);
|
||||
@ -316,7 +323,7 @@ public class OilOrderServiceImpl extends ServiceImpl<OilOrderMapper, OilOrder> i
|
||||
/**
|
||||
* 修改用户成长值信息
|
||||
*/
|
||||
private void updateGrowthValue(Double oilActualPay,Integer userid,Integer oilId){
|
||||
private void updateGrowthValue(Double oilActualPay,Integer userid,Integer oilId,String refuelMoney){
|
||||
if (oilId!=null){
|
||||
OilName oilName = oilNameService.selectOilNameById(oilId);
|
||||
// 获取成长值增长数值
|
||||
@ -327,6 +334,7 @@ public class OilOrderServiceImpl extends ServiceImpl<OilOrderMapper, OilOrder> i
|
||||
LJUser user = userService.selectUserById(userid);
|
||||
UserBalance balance = userBalanceService.selectUserBalance(userid);
|
||||
int growth = balance.getGrowthValue();
|
||||
balance.setRefuelMoney(refuelMoney);
|
||||
// 查询会员等级列表信息
|
||||
Page page = new Page(1,20);
|
||||
LJUserGrade ljUserGrade1 = new LJUserGrade();
|
||||
@ -351,6 +359,7 @@ public class OilOrderServiceImpl extends ServiceImpl<OilOrderMapper, OilOrder> i
|
||||
Integer addVal = (int) (dieselGrowthValue * oilActualPay);
|
||||
Integer growthAfter = growth + addVal;
|
||||
// 如果会员成长值达到会员等级成长值,则修改会员的会员等级信息
|
||||
System.out.println(records.size());
|
||||
for (int i = 0; i < records.size(); i++){
|
||||
if ((growthAfter-records.get(i).getGrowthValue())<100 && (growthAfter-records.get(i).getGrowthValue())>0){
|
||||
user.setGradeId(records.get(i).getId());
|
||||
|
@ -2,7 +2,7 @@
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.fuint.business.userManager.mapper.LJUserMapper">
|
||||
<sql id="selectUser">
|
||||
select mu.*,mub.card_balance,mub.points from mt_user mu
|
||||
select mu.*,mub.card_balance,mub.points,mub.growth_value,mub.refuel_money from mt_user mu
|
||||
inner join mt_user_balance mub on mu.id = mub.mt_user_id
|
||||
</sql>
|
||||
|
||||
|
@ -59,6 +59,7 @@ public class LJUserVo extends BaseEntity {
|
||||
// 成长值
|
||||
private Integer growthValue;
|
||||
|
||||
// 油量
|
||||
private String refuelMoney;
|
||||
|
||||
// 出生日期
|
||||
|
10
fuintCashierWeb/src/api/cashier/cardfavorablerecord.js
Normal file
10
fuintCashierWeb/src/api/cashier/cardfavorablerecord.js
Normal file
@ -0,0 +1,10 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询优惠券信息列表
|
||||
export function listCardFavorableRecord(cardValueRecord) {
|
||||
return request({
|
||||
url: '/business/marketingActivity/cardFavorableRecord',
|
||||
method: 'get',
|
||||
params: cardValueRecord
|
||||
})
|
||||
}
|
@ -1,10 +1,18 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询挂账信息列表
|
||||
export function listCardValueRecord(query) {
|
||||
export function listCardValueRecord(cardValueRecord) {
|
||||
return request({
|
||||
url: '/business/marketingActivity/cardValueRecord',
|
||||
method: 'get',
|
||||
params: query
|
||||
params: cardValueRecord
|
||||
})
|
||||
}
|
||||
|
||||
// 查询挂账信息列表
|
||||
export function cardValueRecordInfo(id) {
|
||||
return request({
|
||||
url: '/business/marketingActivity/cardValueRecord/'+id,
|
||||
method: 'get',
|
||||
})
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询油品订单列表
|
||||
// 查询收银台订单列表
|
||||
export function listCashierOrder(query) {
|
||||
return request({
|
||||
url: '/business/cashierOrder/list',
|
||||
@ -9,7 +9,7 @@ export function listCashierOrder(query) {
|
||||
})
|
||||
}
|
||||
|
||||
// 根据id查询油品订单列表
|
||||
// 根据id查询收银台订单列表
|
||||
export function cashierOrder(id) {
|
||||
return request({
|
||||
url: '/business/cashierOrder/'+id,
|
||||
|
43
fuintCashierWeb/src/api/cashier/oilGuns.js
Normal file
43
fuintCashierWeb/src/api/cashier/oilGuns.js
Normal file
@ -0,0 +1,43 @@
|
||||
import request from "@/utils/request";
|
||||
|
||||
// 查询油罐列表
|
||||
export function getGunApi(data) {
|
||||
return request({
|
||||
url: '/business/petrolStationManagement/oilGun/selectByNumberTGUn',
|
||||
method: 'get',
|
||||
params: data
|
||||
})
|
||||
}
|
||||
// 新增有关信息
|
||||
export function insertGunApi(data) {
|
||||
return request({
|
||||
url: 'business/petrolStationManagement/oilGun',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
// 修改有关信息
|
||||
export function updateGunApi(data) {
|
||||
return request({
|
||||
url: 'business/petrolStationManagement/oilGun',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
// 根据油号查询油罐
|
||||
export function selectTankByNumberApi(data) {
|
||||
return request({
|
||||
url: 'business/petrolStationManagement/oilTank/selectList?numberId='+data,
|
||||
method: 'get',
|
||||
params: data
|
||||
})
|
||||
}
|
||||
|
||||
// 查询油罐列表
|
||||
export function delGunApi(data) {
|
||||
return request({
|
||||
url: '/business/petrolStationManagement/oilGun/',
|
||||
method: 'delete',
|
||||
params: data
|
||||
})
|
||||
}
|
@ -9,6 +9,14 @@ export function listOilOrder(query) {
|
||||
})
|
||||
}
|
||||
|
||||
// 根据id查询油品订单信息
|
||||
export function oilOrderInfo(id) {
|
||||
return request({
|
||||
url: '/business/oilOrder/'+id,
|
||||
method: 'get',
|
||||
})
|
||||
}
|
||||
|
||||
// 新增油品订单信息
|
||||
export function addLJGoods(data) {
|
||||
return request({
|
||||
|
@ -1,5 +1,6 @@
|
||||
<template>
|
||||
<div class="app-center">
|
||||
<!-- 支付金额、会员登录-->
|
||||
<div class="center-left">
|
||||
<div class="center-vh">
|
||||
<div class="center-left-top">
|
||||
@ -36,7 +37,7 @@
|
||||
border-radius: 5px;text-align: center">
|
||||
<el-tooltip placement="top">
|
||||
<div slot="content">
|
||||
会员等级:{{ getGrade(member.gradeId) }}
|
||||
会员等级:{{ gradeName }}
|
||||
</div>
|
||||
<i class="el-icon-medal" style="font-size: 35px"></i>
|
||||
</el-tooltip>
|
||||
@ -60,6 +61,17 @@
|
||||
<div>充值优惠</div>
|
||||
<div>-¥0</div>
|
||||
</div>
|
||||
<div class="center-left-hj" v-show="isMember && refuelMoney!=null">
|
||||
<div>
|
||||
囤油卡
|
||||
<div style="margin: 5px 0" v-for="(item,index) in refuelMoney" :key="index">
|
||||
({{ item.type }}卡
|
||||
<span style="color: #00afff">{{ item.oilType }}</span>
|
||||
余额:{{ item.refuelMoney }}L)
|
||||
</div>
|
||||
</div>
|
||||
<div>- {{ consumeRefuelMoney }}L</div>
|
||||
</div>
|
||||
<div class="center-left-hj" v-show="isMember">
|
||||
<div>
|
||||
储值卡
|
||||
@ -93,7 +105,7 @@
|
||||
<div class="center-left-bottom">
|
||||
<div>
|
||||
<div class="bottom-price">¥{{ oilActualPay + goodsActualPay }}</div>
|
||||
<div class="price-red">优惠合计:{{ oilDiscount + goodsDiscount }}元</div>
|
||||
<div class="price-red">优惠合计:{{ oilDiscount + goodsDiscount }}元/{{consumeRefuelMoney}}L</div>
|
||||
</div>
|
||||
<div class="center-left-lv" @click="settlement">立即结算</div>
|
||||
</div>
|
||||
@ -101,6 +113,7 @@
|
||||
|
||||
</div>
|
||||
|
||||
<!-- 油品选择-->
|
||||
<div class="center-right">
|
||||
<div class="center-top">
|
||||
<div class="center-top-tab">
|
||||
@ -108,19 +121,24 @@
|
||||
<el-tab-pane label="全部" name="1"></el-tab-pane>
|
||||
<el-tab-pane v-for="item in oilNameList" :key="item.id"
|
||||
:label="item.oilName" :name="item.id+''"></el-tab-pane>
|
||||
<!-- <el-tab-pane label="95#" name="third"></el-tab-pane>-->
|
||||
<!-- <el-tab-pane label="98#" name="fourth"></el-tab-pane>-->
|
||||
<!-- <el-tab-pane label="0#" name="one"></el-tab-pane>-->
|
||||
<!-- <el-tab-pane label="京0#" name="two"></el-tab-pane>-->
|
||||
<!-- <el-tab-pane label="京10#" name="three"></el-tab-pane>-->
|
||||
<!-- <el-tab-pane label="CNG" name="frou"></el-tab-pane>-->
|
||||
<!-- <el-tab-pane label="LNG" name="frous"></el-tab-pane>-->
|
||||
<!-- <el-tab-pane v-for="(item,index) in gunList" :key="index"-->
|
||||
<!-- :label="item.oilName" :name="item.numberId+''"></el-tab-pane>-->
|
||||
</el-tabs>
|
||||
</div>
|
||||
|
||||
<div class="center-top-data">
|
||||
<div class="center-top-of">
|
||||
<div class="wrap-wrap">
|
||||
<!-- <div class="of-box" v-for="(item,index) in oilNumGunList" :key="index"-->
|
||||
<!-- :style="{'background-color': colorList[index%5].color}"-->
|
||||
<!-- @click="refuel(item.id)">-->
|
||||
<!-- <div>{{ getName(oilNameList,item.oilName) }}</div>-->
|
||||
|
||||
<!-- <div class="of-title" >{{item.oilGunNum}}号枪</div>-->
|
||||
<!-- <div>-->
|
||||
<!-- <img src="../../../assets/images/jya.png" style="width: 18px;height: 18px;">-->
|
||||
<!-- </div>-->
|
||||
<!-- </div>-->
|
||||
<div class="of-box" v-for="(item,index) in oilNumGunList" :key="index"
|
||||
:style="{'background-color': colorList[index%5].color}"
|
||||
@click="refuel(item.id)">
|
||||
@ -147,6 +165,7 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 商品选择-->
|
||||
<div class="center-app">
|
||||
<div class="center-top">
|
||||
<div class="center-top-title">非油商品</div>
|
||||
@ -240,6 +259,7 @@
|
||||
<!-- <el-button type="primary" @click="dialogVisible = false">确 定</el-button>-->
|
||||
</span>
|
||||
</el-dialog>
|
||||
|
||||
<!-- 挂单-->
|
||||
<el-dialog
|
||||
title="挂单提示"
|
||||
@ -266,6 +286,7 @@
|
||||
<el-button type="primary" @click="registration">确 定</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
|
||||
<!-- 挂单成功提示-->
|
||||
<el-dialog
|
||||
title="挂单成功"
|
||||
@ -279,6 +300,7 @@
|
||||
<el-button type="primary" @click="dialogSuccess = false">确 定</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
|
||||
<!-- 取单提示-->
|
||||
<el-dialog
|
||||
title="取单"
|
||||
@ -321,6 +343,7 @@
|
||||
</span>
|
||||
</span>
|
||||
</el-dialog>
|
||||
|
||||
<!-- 立即结算-->
|
||||
<el-dialog
|
||||
title="扫码支付"
|
||||
@ -334,7 +357,7 @@
|
||||
¥{{ oilActualPay + goodsActualPay }}
|
||||
</div>
|
||||
<div style="text-align: center;margin-bottom: 10px">
|
||||
合计金额:{{ oilAmount + goodsAmount }}元、优惠合计13.02元
|
||||
合计金额:{{ oilAmount + goodsAmount }}元、优惠合计{{ oilDiscount + goodsDiscount }}元
|
||||
</div>
|
||||
<div>
|
||||
<el-input v-model="authCode"
|
||||
@ -378,6 +401,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
<!-- 会员登录-->
|
||||
<el-dialog
|
||||
title="会员信息"
|
||||
@ -410,18 +434,17 @@
|
||||
</el-descriptions>
|
||||
<el-descriptions title="储值余额">
|
||||
<template slot="extra">
|
||||
<sapn style="color: red;margin-right: 20px">余额充值</sapn>
|
||||
<sapn style="font-weight: bold">¥{{member.cardBalance ? member.cardBalance : "--"}}</sapn>
|
||||
<span style="color: red;margin-right: 20px">余额充值</span>
|
||||
<span style="font-weight: bold">¥{{member.cardBalance ? member.cardBalance : "--"}}</span>
|
||||
</template>
|
||||
<el-descriptions-item v-if="member.cardBalance!=0" label="账户余额">{{member.cardBalance ? member.cardBalance : "--"}}元</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
</el-row>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="dialogVisiblevip = false">取 消</el-button>
|
||||
<el-button type="primary" @click="chooseUser(member.mobile,member.id)">确 定</el-button>
|
||||
<el-button type="primary" @click="chooseUser(member)">确 定</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
<!-- 油号选择-->
|
||||
|
||||
<!-- 加油枪加油金额-->
|
||||
<el-dialog
|
||||
@ -505,17 +528,25 @@
|
||||
import {queryStaffs, staffInfo} from "@/api/cashier/staff";
|
||||
import {addLJGoods, goodsOrder, oilOrder} from "@/api/cashier/oilorder";
|
||||
import {getUserGrade} from "@/api/cashier/usergrade";
|
||||
import {getGunApi} from "@/api/cashier/oilGuns";
|
||||
import {listCardFavorableRecord} from "@/api/cashier/cardfavorablerecord";
|
||||
|
||||
export default {
|
||||
name: "homeindex",
|
||||
data(){
|
||||
return{
|
||||
// 优惠券列表
|
||||
couponList:[],
|
||||
// 消费升数
|
||||
consumeRefuelMoney:0,
|
||||
// 囤油卡信息
|
||||
refuelMoney:null,
|
||||
// 会员消费金额(储值卡需要减少的金额)
|
||||
consumeAmount:0,
|
||||
// 账户余额
|
||||
balance:0,
|
||||
// 绑定数据
|
||||
amount:'',
|
||||
amount:0,
|
||||
// 等待中
|
||||
loading:false,
|
||||
// 油品类型
|
||||
@ -565,9 +596,7 @@
|
||||
// 查询的商品信息
|
||||
goods:"",
|
||||
select:"元",
|
||||
form:{
|
||||
amount : 0
|
||||
},
|
||||
form:{ amount : 0 },
|
||||
oilNumGunList:[],
|
||||
authCode:'',
|
||||
// 油号列表
|
||||
@ -608,9 +637,9 @@
|
||||
],
|
||||
restaurants:'',
|
||||
num: 1,
|
||||
// 油号名称
|
||||
// 油号名称
|
||||
oilNameList:'',
|
||||
// 员工列表
|
||||
// 员工列表
|
||||
staffList:[],
|
||||
isMember: false,
|
||||
// 员工信息
|
||||
@ -657,6 +686,8 @@
|
||||
goodsNum:0,
|
||||
// 会员消费金额(储值卡需要减少的金额)
|
||||
consumeAmount:0,
|
||||
// 消费后的升数json
|
||||
refuelMoney:"",
|
||||
},
|
||||
gradeName:"",
|
||||
menu:1,
|
||||
@ -666,6 +697,7 @@
|
||||
orderNo:'',
|
||||
timer: null,
|
||||
isQuery:true,
|
||||
gunList:[],
|
||||
}
|
||||
},
|
||||
created() {
|
||||
@ -674,11 +706,11 @@
|
||||
this.getGoods();
|
||||
this.getStaffList();
|
||||
this.getStaff();
|
||||
},
|
||||
mounted(){
|
||||
// this.restaurants = this.goodsList;
|
||||
this.getList();
|
||||
this.getCouponList();
|
||||
},
|
||||
methods:{
|
||||
// 模糊查询商品信息
|
||||
querySearch(queryString, cb) {
|
||||
let _this = this;
|
||||
let results = _this.goodsList;
|
||||
@ -743,44 +775,329 @@
|
||||
this.isMember = false;
|
||||
this.map.payUser == "";
|
||||
this.balance = 0;
|
||||
this.oilDiscount = 0;
|
||||
this.goodsDiscount = 0;
|
||||
this.userNo = "";
|
||||
this.oilActualPay = this.oilAmount - this.oilDiscount
|
||||
this.goodsActualPay = this.goodsAmount - this.goodsDiscount
|
||||
this.handleChange();
|
||||
},
|
||||
// 获取会员等级信息
|
||||
getGrade(id){
|
||||
let _this = this;
|
||||
this.oilDiscount = 0;
|
||||
getUserGrade(id).then( response => {
|
||||
this.gradeName = response.data.name;
|
||||
// if (this.oilType == "汽油"){
|
||||
//
|
||||
let gasolineDiscount = 0;
|
||||
let dieselDiscount = 0;
|
||||
let naturalGasDiscount = 0;
|
||||
_this.oilOrder.forEach(item => {
|
||||
if (item.oilType == "汽油"){
|
||||
let gasolineRule = JSON.parse(response.data.gasolineRule);
|
||||
if (response.data.preferential == '自定义优惠' && response.data.status == 'qy'){
|
||||
if (response.data.gasolineDiscount=="满减优惠"){
|
||||
let oilDiscount = 0;
|
||||
for (let i = 1; i <= gasolineRule.length; i++){
|
||||
if (gasolineRule.length>1){
|
||||
if (item.amount >= gasolineRule[gasolineRule.length-1].gasolineRule1){
|
||||
oilDiscount = (item.amount/gasolineRule[gasolineRule.length-1].gasolineRule1 *
|
||||
gasolineRule[gasolineRule.length-1].gasolineRule2).toFixed(2);
|
||||
break;
|
||||
}
|
||||
if (item.amount >= gasolineRule[i-1].gasolineRule1 && item.amount < gasolineRule[i].gasolineRule1){
|
||||
oilDiscount = (item.amount/gasolineRule[i-1].gasolineRule1 * gasolineRule[i-1].gasolineRule2).toFixed(2)
|
||||
}
|
||||
}else {
|
||||
if (item.amount >= gasolineRule[i-1].gasolineRule1){
|
||||
oilDiscount = (item.amount/gasolineRule[i-1].gasolineRule1 * gasolineRule[i-1].gasolineRule2).toFixed(2);
|
||||
}
|
||||
}
|
||||
}
|
||||
gasolineDiscount += +oilDiscount
|
||||
}else if (response.data.gasolineDiscount=="每升优惠"){
|
||||
let oilDiscount = 0;
|
||||
for (let i = 1; i <= gasolineRule.length; i++){
|
||||
if (gasolineRule.length>1){
|
||||
if (item.amount >= gasolineRule[gasolineRule.length-1].gasolineRule1){
|
||||
oilDiscount = (item.liters * gasolineRule[gasolineRule.length-1].gasolineRule3).toFixed(2);
|
||||
break;
|
||||
}
|
||||
if (item.amount >= gasolineRule[i-1].gasolineRule1 && item.amount < gasolineRule[i].gasolineRule1){
|
||||
oilDiscount = (item.liters * gasolineRule[i-1].gasolineRule3).toFixed(2)
|
||||
}
|
||||
}else {
|
||||
if (item.amount >= gasolineRule[i-1].gasolineRule1){
|
||||
oilDiscount = (item.liters * gasolineRule[i-1].gasolineRule3).toFixed(2)
|
||||
}
|
||||
}
|
||||
}
|
||||
gasolineDiscount += +oilDiscount
|
||||
}else {
|
||||
gasolineDiscount = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (item.oilType == "柴油"){
|
||||
let dieselRule = JSON.parse(response.data.dieselRule);
|
||||
if (response.data.preferential == '自定义优惠' && response.data.status == 'qy'){
|
||||
if (response.data.dieselDiscount=="满减优惠"){
|
||||
let oilDiscount = 0;
|
||||
for (let i = 1; i <= dieselRule.length; i++){
|
||||
if (dieselRule.length>1){
|
||||
if (item.amount >= dieselRule[dieselRule.length-1].dieselRule1){
|
||||
oilDiscount = (item.amount/dieselRule[dieselRule.length-1].dieselRule1 *
|
||||
dieselRule[dieselRule.length-1].dieselRule2).toFixed(2);
|
||||
break;
|
||||
}
|
||||
if (item.amount >= dieselRule[i-1].dieselRule1 && item.amount < dieselRule[i].dieselRule1){
|
||||
oilDiscount = (item.amount/dieselRule[i-1].dieselRule1 * dieselRule[i-1].dieselRule2).toFixed(2);
|
||||
}
|
||||
}else {
|
||||
if (item.amount >= dieselRule[i-1].dieselRule1){
|
||||
oilDiscount = (item.amount/dieselRule[i-1].dieselRule1 * dieselRule[i-1].dieselRule2).toFixed(2);
|
||||
}
|
||||
}
|
||||
}
|
||||
dieselDiscount += +oilDiscount
|
||||
}else if (response.data.dieselDiscount=="每升优惠"){
|
||||
let oilDiscount = 0;
|
||||
for (let i = 1; i <= dieselRule.length; i++){
|
||||
if (dieselRule.length>1){
|
||||
if (item.amount >= dieselRule[dieselRule.length-1].dieselRule1){
|
||||
oilDiscount = (item.liters * dieselRule[gasolineRule.length-1].dieselRule3).toFixed(2);
|
||||
break;
|
||||
}
|
||||
if (item.amount >= dieselRule[i-1].dieselRule1 && item.amount < dieselRule[i].dieselRule1){
|
||||
oilDiscount = (item.liters * dieselRule[i-1].dieselRule3).toFixed(2)
|
||||
}
|
||||
}else {
|
||||
if (item.amount >= dieselRule[i-1].dieselRule1){
|
||||
oilDiscount = (item.liters * dieselRule[i-1].dieselRule3).toFixed(2)
|
||||
}
|
||||
}
|
||||
}
|
||||
dieselDiscount += +oilDiscount
|
||||
}else {
|
||||
dieselDiscount = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (item.oilType == "天然气"){
|
||||
let naturalGasRule = JSON.parse(response.data.naturalGasRule);
|
||||
if (response.data.preferential == '自定义优惠' && response.data.status == 'qy'){
|
||||
if (response.data.naturalGasDiscount=="满减优惠"){
|
||||
let oilDiscount = 0;
|
||||
for (let i = 1; i <= naturalGasRule.length; i++){
|
||||
if (naturalGasRule.length>1){
|
||||
if (item.amount >= naturalGasRule[naturalGasRule.length-1].naturalGasRule1){
|
||||
oilDiscount = (item.amount/naturalGasRule[naturalGasRule.length-1].naturalGasRule1 *
|
||||
naturalGasRule[naturalGasRule.length-1].naturalGasRule2).toFixed(2);
|
||||
break;
|
||||
}
|
||||
if (item.amount >= naturalGasRule[i-1].naturalGasRule1 && item.amount < naturalGasRule[i].naturalGasRule1){
|
||||
oilDiscount = (item.amount/naturalGasRule[i-1].naturalGasRule1 * naturalGasRule[i-1].naturalGasRule2).toFixed(2);
|
||||
}
|
||||
}else {
|
||||
if (item.amount >= naturalGasRule[i-1].naturalGasRule1){
|
||||
oilDiscount = (item.amount/naturalGasRule[i-1].naturalGasRule1 * naturalGasRule[i-1].naturalGasRule2).toFixed(2);
|
||||
}
|
||||
}
|
||||
}
|
||||
naturalGasDiscount += +oilDiscount
|
||||
}else if (response.data.naturalGasDiscount=="每单位优惠"){
|
||||
let oilDiscount = 0;
|
||||
for (let i = 1; i <= naturalGasRule.length; i++){
|
||||
if (naturalGasRule.length>1){
|
||||
if (item.amount >= naturalGasRule[naturalGasRule.length-1].naturalGasRule1){
|
||||
oilDiscount = (item.liters * naturalGasRule[gasolineRule.length-1].naturalGasRule3).toFixed(2)
|
||||
break;
|
||||
}
|
||||
if (item.amount >= naturalGasRule[i-1].naturalGasRule1 && item.amount < naturalGasRule[i].naturalGasRule1){
|
||||
oilDiscount = (item.liters * naturalGasRule[i-1].naturalGasRule3).toFixed(2)
|
||||
}
|
||||
}else {
|
||||
if (item.amount >= naturalGasRule[i-1].naturalGasRule1){
|
||||
oilDiscount = (item.liters * naturalGasRule[i-1].naturalGasRule3).toFixed(2)
|
||||
}
|
||||
}
|
||||
}
|
||||
naturalGasDiscount += +oilDiscount
|
||||
}else {
|
||||
naturalGasDiscount = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
// if (_this.oilType == "汽油"){
|
||||
// let gasolineRule = JSON.parse(response.data.gasolineRule);
|
||||
// if (response.data.preferential == '自定义优惠' && response.data.status == 'qy'){
|
||||
// _this.oilOrder.forEach(item => {
|
||||
// if (response.data.gasolineDiscount=="满减优惠"){
|
||||
// let oilDiscount = 0;
|
||||
// for (let i = 0; i < gasolineRule.length; i++){
|
||||
// if (gasolineRule.length>1){
|
||||
// if (item.amount >= gasolineRule[i].gasolineRule1 && item.amount < gasolineRule[i+1].gasolineRule1){
|
||||
// oilDiscount = item.amount/gasolineRule[i].gasolineRule1 * gasolineRule[i].gasolineRule2
|
||||
// }
|
||||
// if (item.amount >= gasolineRule[gasolineRule.length-1].gasolineRule1){
|
||||
// oilDiscount = item.amount/gasolineRule[gasolineRule.length-1].gasolineRule1 * gasolineRule[gasolineRule.length-1].gasolineRule2
|
||||
// }
|
||||
// }else {
|
||||
// if (item.amount >= gasolineRule[i].gasolineRule1){
|
||||
// oilDiscount = item.amount/gasolineRule[i].gasolineRule1 * gasolineRule[i].gasolineRule2
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// gasolineDiscount += oilDiscount
|
||||
// }else if (response.data.gasolineDiscount=="每升优惠"){
|
||||
// let oilDiscount = 0;
|
||||
// for (let i = 0; i < gasolineRule.length; i++){
|
||||
// if (gasolineRule.length>1){
|
||||
// if (item.amount >= gasolineRule[i].gasolineRule1 && item.amount < gasolineRule[i+1].gasolineRule1){
|
||||
// oilDiscount = item.liters * gasolineRule[i].gasolineRule3
|
||||
// }
|
||||
// if (item.amount >= gasolineRule[gasolineRule.length-1].gasolineRule1){
|
||||
// oilDiscount = item.liters * gasolineRule[i].gasolineRule3
|
||||
// }
|
||||
// }else {
|
||||
// if (item.amount >= gasolineRule[i].gasolineRule1){
|
||||
// oilDiscount = item.liters * gasolineRule[i].gasolineRule3
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// gasolineDiscount += oilDiscount
|
||||
// }else {
|
||||
// gasolineDiscount = 0;
|
||||
// }
|
||||
// })
|
||||
// }
|
||||
// }
|
||||
// if (this.oilType == "柴油"){
|
||||
//
|
||||
// if (_this.oilType == "柴油"){
|
||||
// let dieselRule = JSON.parse(response.data.dieselRule);
|
||||
// if (response.data.preferential == '自定义优惠' && response.data.status == 'qy'){
|
||||
// _this.oilOrder.forEach(item => {
|
||||
// if (response.data.dieselDiscount=="满减优惠"){
|
||||
// let oilDiscount = 0;
|
||||
// for (let i = 0; i < dieselRule.length; i++){
|
||||
// if (dieselRule.length>1){
|
||||
// if (item.amount >= dieselRule[i].dieselRule1 && item.amount < dieselRule[i+1].dieselRule1){
|
||||
// oilDiscount = item.amount/dieselRule[i].dieselRule1 * dieselRule[i].dieselRule2
|
||||
// }
|
||||
// if (item.amount >= dieselRule[dieselRule.length-1].dieselRule1){
|
||||
// oilDiscount = item.amount/dieselRule[dieselRule.length-1].dieselRule1 * dieselRule[dieselRule.length-1].dieselRule2
|
||||
// }
|
||||
// }else {
|
||||
// if (item.amount >= dieselRule[i].dieselRule1){
|
||||
// oilDiscount = item.amount/dieselRule[i].dieselRule1 * dieselRule[i].dieselRule2
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// dieselDiscount += oilDiscount
|
||||
// }else if (response.data.dieselDiscount=="每升优惠"){
|
||||
// let oilDiscount = 0;
|
||||
// for (let i = 0; i < dieselRule.length; i++){
|
||||
// if (dieselRule.length>1){
|
||||
// if (item.amount >= dieselRule[i].dieselRule1 && item.amount < dieselRule[i+1].dieselRule1){
|
||||
// oilDiscount = item.liters * dieselRule[i].dieselRule3
|
||||
// }
|
||||
// if (item.amount >= dieselRule[dieselRule.length-1].dieselRule1){
|
||||
// oilDiscount = item.liters * dieselRule[i].dieselRule3
|
||||
// }
|
||||
// }else {
|
||||
// if (item.amount >= dieselRule[i].dieselRule1){
|
||||
// oilDiscount = item.liters * dieselRule[i].dieselRule3
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// dieselDiscount += oilDiscount
|
||||
// }else {
|
||||
// dieselDiscount = 0;
|
||||
// }
|
||||
// })
|
||||
// }
|
||||
// }
|
||||
// if (this.oilType == "天然气"){
|
||||
//
|
||||
// if (_this.oilType == "天然气"){
|
||||
// let naturalGasRule = JSON.parse(response.data.naturalGasRule);
|
||||
// if (response.data.preferential == '自定义优惠' && response.data.status == 'qy'){
|
||||
// _this.oilOrder.forEach(item => {
|
||||
// if (response.data.naturalGasDiscount=="满减优惠"){
|
||||
// let oilDiscount = 0;
|
||||
// for (let i = 0; i < naturalGasRule.length; i++){
|
||||
// if (naturalGasRule.length>1){
|
||||
// if (item.amount >= naturalGasRule[i].naturalGasRule1 && item.amount < naturalGasRule[i+1].naturalGasRule1){
|
||||
// oilDiscount = item.amount/naturalGasRule[i].naturalGasRule1 * naturalGasRule[i].naturalGasRule2
|
||||
// }
|
||||
// if (item.amount >= naturalGasRule[naturalGasRule.length-1].naturalGasRule1){
|
||||
// oilDiscount = item.amount/naturalGasRule[naturalGasRule.length-1].naturalGasRule1 * naturalGasRule[naturalGasRule.length-1].naturalGasRule2
|
||||
// }
|
||||
// }else {
|
||||
// if (item.amount >= naturalGasRule[i].naturalGasRule1){
|
||||
// oilDiscount = item.amount/naturalGasRule[i].naturalGasRule1 * naturalGasRule[i].naturalGasRule2
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// naturalGasDiscount += oilDiscount
|
||||
// }else if (response.data.naturalGasDiscount=="每单位优惠"){
|
||||
// let oilDiscount = 0;
|
||||
// for (let i = 0; i < naturalGasRule.length; i++){
|
||||
// if (naturalGasRule.length>1){
|
||||
// if (item.amount >= naturalGasRule[i].naturalGasRule1 && item.amount < naturalGasRule[i+1].naturalGasRule1){
|
||||
// oilDiscount = item.liters * naturalGasRule[i].naturalGasRule3
|
||||
// }
|
||||
// if (item.amount >= naturalGasRule[naturalGasRule.length-1].naturalGasRule1){
|
||||
// oilDiscount = item.liters * naturalGasRule[i].naturalGasRule3
|
||||
// }
|
||||
// }else {
|
||||
// if (item.amount >= naturalGasRule[i].naturalGasRule1){
|
||||
// oilDiscount = item.liters * naturalGasRule[i].naturalGasRule3
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// naturalGasDiscount += oilDiscount
|
||||
// }else {
|
||||
// naturalGasDiscount = 0;
|
||||
// }
|
||||
// })
|
||||
// }
|
||||
// }
|
||||
|
||||
let oilActualPay = _this.oilActualPay;
|
||||
_this.oilDiscount = gasolineDiscount + dieselDiscount + naturalGasDiscount
|
||||
_this.oilActualPay = oilActualPay - _this.oilDiscount;
|
||||
// 储值卡余额
|
||||
if (_this.balance>=(_this.oilAmount - _this.oilDiscount)){
|
||||
_this.consumeAmount = _this.oilAmount - _this.oilDiscount;
|
||||
_this.oilActualPay = 0;
|
||||
}else {
|
||||
_this.consumeAmount = _this.balance;
|
||||
_this.oilActualPay = oilActualPay - _this.oilDiscount - _this.balance;
|
||||
}
|
||||
})
|
||||
return this.gradeName;
|
||||
},
|
||||
// 选择会员
|
||||
chooseUser(mobile,id){
|
||||
chooseUser(data){
|
||||
this.dialogVisiblevip = false
|
||||
this.isMember = true;
|
||||
this.map.payUser = mobile;
|
||||
this.map.userId = id;
|
||||
this.map.payUser = data.mobile;
|
||||
this.map.userId = data.id;
|
||||
this.balance = this.member.cardBalance;
|
||||
if (this.balance>=(this.oilAmount - this.oilDiscount)){
|
||||
this.consumeAmount = this.oilAmount - this.oilDiscount;
|
||||
this.oilActualPay = 0;
|
||||
}else {
|
||||
this.consumeAmount = this.balance;
|
||||
this.oilActualPay = this.oilAmount - this.oilDiscount - this.balance;
|
||||
}
|
||||
this.getGrade(data.gradeId)
|
||||
this.changeRefuelMoney();
|
||||
this.handleChange();
|
||||
this.queryCoupon(this.couponList,data.id);
|
||||
},
|
||||
// 查询该会员是否可使用优惠券
|
||||
queryCoupon(list,id){
|
||||
let result = false;
|
||||
list.forEach(item => {
|
||||
if (item.mtUserId==id){
|
||||
|
||||
}
|
||||
})
|
||||
},
|
||||
// 选择会员信息
|
||||
handleChoose(data){
|
||||
this.member = data;
|
||||
this.refuelMoney = JSON.parse(data.refuelMoney)
|
||||
this.dialogVisibleMember = false;
|
||||
},
|
||||
// 清空商品订单列表
|
||||
@ -789,6 +1106,7 @@
|
||||
this.goodsTotal = 0;
|
||||
this.goodsAmount = 0;
|
||||
this.goodsActualPay = 0;
|
||||
this.goodsDiscount = 0;
|
||||
},
|
||||
// 获取当前账户信息
|
||||
getStaff(){
|
||||
@ -857,7 +1175,11 @@
|
||||
this.oilActualPay = 0;
|
||||
this.oilTotal = 0;
|
||||
this.oilAmount = 0;
|
||||
this.amount = "";
|
||||
this.oilDiscount = 0;
|
||||
this.consumeAmount = 0;
|
||||
this.consumeRefuelMoney = 0;
|
||||
this.refuelMoney = JSON.parse(this.member.refuelMoney)
|
||||
this.amount = 0;
|
||||
},
|
||||
// 获取员工列表
|
||||
getStaffList(){
|
||||
@ -868,7 +1190,19 @@
|
||||
// 油品订单信息
|
||||
getOilOrder(){
|
||||
this.dialogVisibleamount = false
|
||||
this.form.oilType = this.oilType;
|
||||
// 计算油的升数
|
||||
if (this.select == "元"){
|
||||
this.form.liters = (this.form.amount/this.form.oilPrice).toFixed(2)
|
||||
}else {
|
||||
this.form.liters = this.form.amount
|
||||
this.form.amount = this.form.oilPrice * this.form.amount
|
||||
}
|
||||
// 获取油号信息
|
||||
let name1 = this.getName(this.oilNameList,this.form.oilName);
|
||||
this.form.oilType = name1;
|
||||
this.oilOrder.push(this.form)
|
||||
|
||||
if (this.select == "元"){
|
||||
this.oilAmount = +this.form.amount + this.oilAmount;
|
||||
if (this.balance!=0){
|
||||
@ -883,11 +1217,47 @@
|
||||
this.oilActualPay = this.oilAmount - this.oilDiscount;
|
||||
}
|
||||
}else {
|
||||
this.oilAmount = +(this.form.oilPrice * this.form.amount) + this.oilAmount;
|
||||
this.oilAmount = this.form.amount + this.oilAmount;
|
||||
this.oilActualPay = this.oilAmount - this.oilDiscount;
|
||||
}
|
||||
|
||||
this.oilTotal += 1;
|
||||
this.select = "元";
|
||||
if (this.isMember){
|
||||
this.getGrade(this.member.gradeId)
|
||||
this.changeRefuelMoney();
|
||||
}
|
||||
},
|
||||
changeRefuelMoney(){
|
||||
let _this = this;
|
||||
_this.consumeRefuelMoney = 0;
|
||||
_this.oilActualPay = 0;
|
||||
_this.oilOrder.forEach(item => {
|
||||
let conRefMon = 0;
|
||||
let oilActualPay = 0;
|
||||
if (_this.refuelMoney!=null){
|
||||
let result = false;
|
||||
for (let i = 0;i < _this.refuelMoney.length;i++){
|
||||
// 囤油卡升数变化
|
||||
if (_this.refuelMoney[i].oilType==item.oilType){
|
||||
if ((_this.refuelMoney[i].refuelMoney-item.liters)>=0){
|
||||
conRefMon = item.liters
|
||||
oilActualPay = 0;
|
||||
}else {
|
||||
conRefMon = _this.refuelMoney[i].refuelMoney
|
||||
oilActualPay = item.amount - (_this.refuelMoney[i].refuelMoney * item.oilPrice).toFixed(2)
|
||||
}
|
||||
result = true;
|
||||
}else {
|
||||
if (result==false){
|
||||
oilActualPay = item.amount
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
_this.consumeRefuelMoney += +conRefMon
|
||||
_this.oilActualPay += +oilActualPay
|
||||
})
|
||||
},
|
||||
// 选择“元”或“L”
|
||||
changeSelect(){
|
||||
@ -962,6 +1332,7 @@
|
||||
},
|
||||
// 加油金额
|
||||
refuel(id){
|
||||
this.select = "元";
|
||||
this.amount = 0
|
||||
this.dialogVisibleamount = true;
|
||||
getOilNumGunById(id).then( response => {
|
||||
@ -983,6 +1354,8 @@
|
||||
this.map.authCode = this.authCode;
|
||||
this.map.allAmount = this.oilActualPay + this.goodsActualPay;
|
||||
this.map.consumeAmount = this.consumeAmount;
|
||||
this.updateRefuelMoney();
|
||||
this.map.refuelMoney = JSON.stringify(this.refuelMoney)
|
||||
|
||||
let _this = this;
|
||||
addLJGoods(_this.map).then( response => {
|
||||
@ -1020,8 +1393,10 @@
|
||||
_this.goodsActualPay = 0;
|
||||
_this.goodsDiscount = 0;
|
||||
_this.consumeAmount = 0;
|
||||
_this.consumeRefuelMoney = 0;
|
||||
_this.oilTotal = 0;
|
||||
_this.goodsTotal = 0;
|
||||
_this.isMember = false;
|
||||
};
|
||||
this.map = {
|
||||
allAmount:0,
|
||||
@ -1063,6 +1438,23 @@
|
||||
consumeAmount:0,
|
||||
};
|
||||
},
|
||||
updateRefuelMoney(){
|
||||
let _this = this;
|
||||
_this.oilOrder.forEach(item => {
|
||||
if (_this.refuelMoney!=null){
|
||||
_this.refuelMoney.forEach(i => {
|
||||
if (i.oilType==item.oilType){
|
||||
if ((i.refuelMoney-item.liters)>=0){
|
||||
let refuelMoney = i.refuelMoney;
|
||||
i.refuelMoney = refuelMoney-item.liters
|
||||
}else {
|
||||
i.refuelMoney = 0
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
// 查询订单支付状态
|
||||
queryPayStatus(){
|
||||
let _this = this;
|
||||
@ -1174,6 +1566,19 @@
|
||||
gocomponents(index){
|
||||
this.leftindex = index
|
||||
},
|
||||
// 获取优惠券列表信息
|
||||
getCouponList(){
|
||||
listCardFavorableRecord().then(response => {
|
||||
this.couponList = response.data.records
|
||||
})
|
||||
},
|
||||
// 获取列表信息
|
||||
getList(){
|
||||
getGunApi().then(response => {
|
||||
this.gunList = response.data;
|
||||
// console.log(this.gunList)
|
||||
})
|
||||
},
|
||||
},
|
||||
|
||||
}
|
||||
|
@ -63,10 +63,10 @@
|
||||
<el-card class="box-card">
|
||||
<div class="wgang">
|
||||
<div>收银台订单列表</div>
|
||||
<div style="display: flex ">
|
||||
<!-- <div style="display: flex ">-->
|
||||
|
||||
<el-button type="primary" size="mini" icon="el-icon-plus">新增会员</el-button>
|
||||
</div>
|
||||
<!-- <el-button type="primary" size="mini" icon="el-icon-plus">新增会员</el-button>-->
|
||||
<!-- </div>-->
|
||||
</div>
|
||||
<div class="table-box">
|
||||
<el-table
|
||||
@ -78,21 +78,14 @@
|
||||
<el-form-item label="收银员">
|
||||
<span>{{ getRealName(staffList,props.row.staffId) }}</span>
|
||||
</el-form-item>
|
||||
<el-form-item label="收银员">
|
||||
<el-form-item label="收银员手机号">
|
||||
<span>{{ getMobile(staffList,props.row.staffId) }}</span>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="orderNo"
|
||||
label="订单号"
|
||||
width="180">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="amount"
|
||||
label="订单金额">
|
||||
</el-table-column>
|
||||
<el-table-column prop="orderNo" label="订单号" width="180"> </el-table-column>
|
||||
<el-table-column prop="amount" label="订单金额"> </el-table-column>
|
||||
<el-table-column
|
||||
prop="payAmount"
|
||||
label="实付金额">
|
||||
@ -138,7 +131,6 @@
|
||||
<el-button style="width: 60px" size="mini"
|
||||
@click="handleRefund(scope.row.id)"
|
||||
type="danger" plain round>退款</el-button>
|
||||
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
|
@ -91,10 +91,10 @@
|
||||
<el-card class="box-card">
|
||||
<div class="wgang">
|
||||
<div>商品交易列表</div>
|
||||
<div style="display: flex ">
|
||||
<!-- <div style="display: flex ">-->
|
||||
|
||||
<el-button type="primary" size="mini" icon="el-icon-plus">新增会员</el-button>
|
||||
</div>
|
||||
<!-- <el-button type="primary" size="mini" icon="el-icon-plus">新增会员</el-button>-->
|
||||
<!-- </div>-->
|
||||
</div>
|
||||
<div class="table-box">
|
||||
<el-table
|
||||
|
@ -104,10 +104,10 @@
|
||||
<el-card class="box-card">
|
||||
<div class="wgang">
|
||||
<div>油品订单列表</div>
|
||||
<div style="display: flex ">
|
||||
<!-- <div style="display: flex ">-->
|
||||
|
||||
<el-button type="primary" size="mini" icon="el-icon-plus">新增会员</el-button>
|
||||
</div>
|
||||
<!-- <el-button type="primary" size="mini" icon="el-icon-plus">新增会员</el-button>-->
|
||||
<!-- </div>-->
|
||||
</div>
|
||||
<div class="table-box">
|
||||
<el-table
|
||||
@ -191,20 +191,21 @@
|
||||
width="220">
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="注册时间" align="center" width="160" prop="payTime">
|
||||
<el-table-column label="交易时间" align="center" width="160" prop="payTime">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.payTime) }}</span>
|
||||
<span>{{ scope.row.payTime ? parseTime(scope.row.payTime):"--" }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
>更多操作</el-button>
|
||||
|
||||
<!-- <el-button size="mini" type="text" icon="el-icon-edit" >更多操作</el-button>-->
|
||||
<el-button style="width: 60px" size="mini"
|
||||
@click="patchwork(scope.row)"
|
||||
type="primary" plain round>补打</el-button>
|
||||
<el-button style="width: 60px" size="mini"
|
||||
@click="handleRefund(scope.row.id)"
|
||||
type="danger" plain round>退款</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
@ -220,9 +221,36 @@
|
||||
@current-change="getList">
|
||||
</el-pagination>
|
||||
</div>
|
||||
|
||||
|
||||
</el-card>
|
||||
|
||||
<!-- 订单退款-->
|
||||
<el-dialog
|
||||
title="订单退款"
|
||||
width="25%"
|
||||
:visible.sync="dialogRefund">
|
||||
<div style="text-align: center;font-weight: bold">
|
||||
¥<span style="font-size: 35px">{{ oilOrder.payAmount }}</span>
|
||||
</div>
|
||||
<div class="tk">退款金额</div>
|
||||
<div class="tk">退款单号:{{ oilOrder.orderNo }}</div>
|
||||
<div style="margin: 10px 0">
|
||||
退款原因<br/>
|
||||
<el-radio-group v-model="radio1" style="margin: 10px 0">
|
||||
<el-radio-button label="油号选错"></el-radio-button>
|
||||
<el-radio-button label="金额错误"></el-radio-button>
|
||||
<el-radio-button label="其他原因"></el-radio-button>
|
||||
</el-radio-group>
|
||||
</div>
|
||||
<div>
|
||||
<el-input placeholder="请输入密码" v-model="password" show-password></el-input>
|
||||
<br/>
|
||||
<span style="color: grey;font-size: 12px">退款仅支持全额退款,退款金额将按照支付信息原路退回、优惠券、储值卡等原路退回处理</span>
|
||||
</div>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="dialogRefund = false">取 消</el-button>
|
||||
<el-button type="primary" @click="dialogRefund = false">确 定</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -230,13 +258,18 @@
|
||||
import {queryStaffs} from "@/api/cashier/staff";
|
||||
import {getDicts} from "@/api/dict/data";
|
||||
import {getOilNameList, getOilNumGun } from "@/api/cashier/oilnumgun";
|
||||
import {listOilOrder} from "@/api/cashier/oilorder";
|
||||
import {listOilOrder, oilOrderInfo} from "@/api/cashier/oilorder";
|
||||
import {getUser} from "@/api/cashier/user/user";
|
||||
|
||||
export default {
|
||||
name: "order_Cashier",
|
||||
data(){
|
||||
return{
|
||||
oilOrder:{},
|
||||
// 退款密码
|
||||
password:"",
|
||||
radio1:"油号选错",
|
||||
dialogRefund:false,
|
||||
// 员工列表
|
||||
staffList:[],
|
||||
// 终端列表
|
||||
@ -315,6 +348,22 @@
|
||||
this.getList();
|
||||
},
|
||||
methods:{
|
||||
// 补打
|
||||
patchwork(data){
|
||||
const orderNo = data.orderNo
|
||||
this.$modal.confirm('确定您要补打当前订单吗?当前订单号[' + orderNo + '],请确保云打印机正在运行中').then(function() {
|
||||
// return delUser(row.id);
|
||||
}).then(() => {
|
||||
this.$modal.msgSuccess("打印指令已发送打印机,请查看打印结果");
|
||||
}).catch(() => {});
|
||||
},
|
||||
// 退款
|
||||
handleRefund(id){
|
||||
this.dialogRefund = true;
|
||||
oilOrderInfo(id).then( response => {
|
||||
this.oilOrder = response.data
|
||||
})
|
||||
},
|
||||
// 根据员工id查询员工信息
|
||||
queryStaf(list,id){
|
||||
let name = "";
|
||||
@ -462,6 +511,10 @@
|
||||
.top-app-sou{
|
||||
width: 20%;
|
||||
}
|
||||
|
||||
.tk{
|
||||
text-align: center;
|
||||
color: grey;
|
||||
margin: 10px 0;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
@ -52,10 +52,10 @@
|
||||
<el-card class="box-card">
|
||||
<div class="wgang">
|
||||
<div>小程序订单列表</div>
|
||||
<div style="display: flex ">
|
||||
<!-- <div style="display: flex ">-->
|
||||
|
||||
<el-button type="primary" size="mini" icon="el-icon-plus">新增会员</el-button>
|
||||
</div>
|
||||
<!-- <el-button type="primary" size="mini" icon="el-icon-plus">新增会员</el-button>-->
|
||||
<!-- </div>-->
|
||||
</div>
|
||||
<div class="table-box">
|
||||
<el-table
|
||||
@ -335,7 +335,7 @@ import {queryStaffs} from "@/api/cashier/staff";
|
||||
},
|
||||
// 获取列表信息
|
||||
getList(){
|
||||
listCashierOrder(this.queryParams).then( response => {
|
||||
listCashierOrder(this.addDateRange(this.queryParams, this.dateRange)).then( response => {
|
||||
this.list = response.data.records;
|
||||
this.total = response.data.total;
|
||||
})
|
||||
@ -418,6 +418,10 @@ import {queryStaffs} from "@/api/cashier/staff";
|
||||
.top-app-sou{
|
||||
width: 20%;
|
||||
}
|
||||
|
||||
.tk{
|
||||
text-align: center;
|
||||
color: grey;
|
||||
margin: 10px 0;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
@ -27,19 +27,19 @@
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="支付类型" prop="payType">
|
||||
<el-select
|
||||
v-model="queryParams.payType"
|
||||
clearable
|
||||
placeholder="全部"
|
||||
>
|
||||
<el-option v-for="item in payList"
|
||||
:key="item.id"
|
||||
:label="item.dictLabel"
|
||||
:value="item.dictValue">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="支付类型" prop="payType">-->
|
||||
<!-- <el-select-->
|
||||
<!-- v-model="queryParams.payType"-->
|
||||
<!-- clearable-->
|
||||
<!-- placeholder="全部"-->
|
||||
<!-- >-->
|
||||
<!-- <el-option v-for="item in payList"-->
|
||||
<!-- :key="item.id"-->
|
||||
<!-- :label="item.dictLabel"-->
|
||||
<!-- :value="item.dictValue">-->
|
||||
<!-- </el-option>-->
|
||||
<!-- </el-select>-->
|
||||
<!-- </el-form-item>-->
|
||||
<el-form-item label="手机号">
|
||||
<el-input v-model="queryParams.payUser" placeholder="请输入手机号"></el-input>
|
||||
</el-form-item>
|
||||
@ -62,18 +62,18 @@
|
||||
<el-form-item label="订单号">
|
||||
<el-input v-model="queryParams.orderNo" placeholder="订单号、官方单号检索"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="交易时间">
|
||||
<el-date-picker
|
||||
v-model="dateRange"
|
||||
style="width: 240px"
|
||||
size="medium"
|
||||
value-format="yyyy-MM-dd"
|
||||
type="daterange"
|
||||
range-separator="-"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
></el-date-picker>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="交易时间">-->
|
||||
<!-- <el-date-picker-->
|
||||
<!-- v-model="dateRange"-->
|
||||
<!-- style="width: 240px"-->
|
||||
<!-- size="medium"-->
|
||||
<!-- value-format="yyyy-MM-dd"-->
|
||||
<!-- type="daterange"-->
|
||||
<!-- range-separator="-"-->
|
||||
<!-- start-placeholder="开始日期"-->
|
||||
<!-- end-placeholder="结束日期"-->
|
||||
<!-- ></el-date-picker>-->
|
||||
<!-- </el-form-item>-->
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" @click="resetQuery">重置</el-button>
|
||||
@ -95,10 +95,10 @@
|
||||
<el-card class="box-card">
|
||||
<div class="wgang">
|
||||
<div>未支付订单列表</div>
|
||||
<div style="display: flex ">
|
||||
<!-- <div style="display: flex ">-->
|
||||
|
||||
<el-button type="primary" size="mini" icon="el-icon-plus">新增会员</el-button>
|
||||
</div>
|
||||
<!-- <el-button type="primary" size="mini" icon="el-icon-plus">新增会员</el-button>-->
|
||||
<!-- </div>-->
|
||||
</div>
|
||||
<div class="table-box">
|
||||
<el-table
|
||||
@ -106,57 +106,39 @@
|
||||
style="width: 100%">
|
||||
<el-table-column type="expand">
|
||||
<template slot-scope="props">
|
||||
<el-form label-position="left" inline class="demo-table-expand">
|
||||
<el-form-item label="名称">
|
||||
<span>{{ props.row.name }}</span>
|
||||
<el-form label-position="left" class="demo-table-expand" style="margin-left: 20px">
|
||||
<el-form-item label="收银员">
|
||||
<span>{{ getRealName(staffList,props.row.staffId) }}</span>
|
||||
</el-form-item>
|
||||
<el-form-item label="收银员手机号">
|
||||
<span>{{ getMobile(staffList,props.row.staffId) }}</span>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="terminal"
|
||||
label="终端">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="oils"
|
||||
label="油品/油枪">
|
||||
<el-table-column prop="terminal" label="终端" align="center" width="80"></el-table-column>
|
||||
<el-table-column prop="oils" label="油品/油枪" align="center">
|
||||
<template slot-scope="props">
|
||||
<span>{{ getName(oilNameList,props.row.oils) }}/{{ props.row.oilGunNum }}号枪</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="订单信息">
|
||||
<el-table-column
|
||||
prop="orderNo"
|
||||
label="订单号">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="orderAmount"
|
||||
label="交易金额">
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="订单信息" align="center">
|
||||
<el-table-column prop="orderNo" label="订单号" align="center"> </el-table-column>
|
||||
<el-table-column prop="orderAmount" label="交易金额" align="center"> </el-table-column>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column
|
||||
prop="payType"
|
||||
label="付款类型">
|
||||
<el-table-column prop="payType" label="付款类型" align="center">
|
||||
<template slot-scope="scope">
|
||||
<span>{{getPayType(payTypeList,scope.row.payType)}}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column
|
||||
prop="payUser"
|
||||
label="付款用户">
|
||||
<el-table-column prop="payUser" label="付款用户" align="center">
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column
|
||||
prop="createTime"
|
||||
label="交易时间">
|
||||
</el-table-column>
|
||||
<el-table-column prop="createTime" label="交易时间" align="center"></el-table-column>
|
||||
|
||||
<el-table-column
|
||||
prop="orderStatus"
|
||||
label="支付状态">
|
||||
<el-table-column prop="orderStatus" label="支付状态">
|
||||
<template slot-scope="scope">
|
||||
<el-tag v-if="scope.row.orderStatus == 'unpaid'">未支付</el-tag>
|
||||
<el-tag type="info" v-else>支付失败</el-tag>
|
||||
@ -197,6 +179,7 @@
|
||||
import {listOilOrder} from "@/api/cashier/oilorder";
|
||||
import {getDicts} from "@/api/dict/data";
|
||||
import {getOilNameList, getOilNumGun} from "@/api/cashier/oilnumgun";
|
||||
import {queryStaffs} from "@/api/cashier/staff";
|
||||
|
||||
export default {
|
||||
name: "order_Cashier",
|
||||
@ -285,6 +268,26 @@
|
||||
this.getPayList();
|
||||
},
|
||||
methods:{
|
||||
// 获取员工姓名
|
||||
getRealName(list,val){
|
||||
let name = "";
|
||||
list.forEach(item => {
|
||||
if (item.id == val){
|
||||
name = item.realName
|
||||
}
|
||||
})
|
||||
return name;
|
||||
},
|
||||
// 获取员工手机号
|
||||
getMobile(list,val){
|
||||
let name = "";
|
||||
list.forEach(item => {
|
||||
if (item.id == val){
|
||||
name = item.mobile
|
||||
}
|
||||
})
|
||||
return name;
|
||||
},
|
||||
// 获取油号名称
|
||||
getName(oilNameList,id){
|
||||
let name = ""
|
||||
@ -323,6 +326,9 @@
|
||||
getOilNumGun({oilNum : "全部"}).then( response => {
|
||||
this.oilNumList = response.data
|
||||
})
|
||||
queryStaffs().then( response => {
|
||||
this.staffList = response.data;
|
||||
})
|
||||
},
|
||||
// 获取列表信息
|
||||
getList(val){
|
||||
|
@ -3,18 +3,64 @@
|
||||
<div>
|
||||
<!-- 条件查询-->
|
||||
<el-card class="box-card">
|
||||
<div style="display: flex;">
|
||||
<div class="top-app-sou">
|
||||
<el-form :label-position="labelPosition" label-width="40px" :model="formLabelAlign">
|
||||
<el-form-item label="名称">
|
||||
<el-input v-model="formLabelAlign.name" placeholder="请输入要搜索的内容"></el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
<div style="margin-left: 10px">
|
||||
<el-button type="primary" icon="el-icon-search">搜索</el-button>
|
||||
</div>
|
||||
</div>
|
||||
<!-- <div style="display: flex;">-->
|
||||
<!-- <div class="top-app-sou">-->
|
||||
<!-- <el-form :label-position="labelPosition" label-width="40px" :model="formLabelAlign">-->
|
||||
<!-- <el-form-item label="名称">-->
|
||||
<!-- <el-input v-model="formLabelAlign.name" placeholder="请输入要搜索的内容"></el-input>-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- </el-form>-->
|
||||
<!-- </div>-->
|
||||
<!-- <div style="margin-left: 10px">-->
|
||||
<!-- <el-button type="primary" icon="el-icon-search">搜索</el-button>-->
|
||||
<!-- </div>-->
|
||||
<!-- </div>-->
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" label-width="68px">
|
||||
<el-form-item label="交易员工" prop="staffId">
|
||||
<el-select
|
||||
v-model="queryParams.mtStaffId"
|
||||
clearable
|
||||
placeholder="全部"
|
||||
>
|
||||
<el-option v-for="item in staffList" :key="item.id" :label="item.realName" :value="item.id">
|
||||
<span style="float: left">{{ item.realName }}</span>
|
||||
<span style="float: right; color: #8492a6; font-size: 13px">{{ item.mobile }}</span>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="支付类型" prop="paymentType">
|
||||
<el-select
|
||||
v-model="queryParams.paymentType"
|
||||
clearable
|
||||
placeholder="全部"
|
||||
>
|
||||
<el-option v-for="item in payList"
|
||||
:key="item.id"
|
||||
:label="item.dictLabel"
|
||||
:value="item.dictValue">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="手机号">
|
||||
<el-input v-model="queryParams.mobile" placeholder="请输入会员手机号"></el-input>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="交易时间">-->
|
||||
<!-- <el-date-picker-->
|
||||
<!-- v-model="dateRange"-->
|
||||
<!-- style="width: 240px"-->
|
||||
<!-- size="medium"-->
|
||||
<!-- value-format="yyyy-MM-dd"-->
|
||||
<!-- type="daterange"-->
|
||||
<!-- range-separator="-"-->
|
||||
<!-- start-placeholder="开始日期"-->
|
||||
<!-- end-placeholder="结束日期"-->
|
||||
<!-- ></el-date-picker>-->
|
||||
<!-- </el-form-item>-->
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-card>
|
||||
<!-- 统计-->
|
||||
<el-card class="box-card">
|
||||
@ -92,12 +138,13 @@
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
>更多操作</el-button>
|
||||
|
||||
<!-- <el-button size="mini" type="text" icon="el-icon-edit">更多操作</el-button>-->
|
||||
<el-button style="width: 60px" size="mini"
|
||||
@click="patchwork(scope.row)"
|
||||
type="primary" plain round>补打</el-button>
|
||||
<el-button style="width: 60px" size="mini"
|
||||
@click="handleRefund(scope.row.id)"
|
||||
type="danger" plain round>退款</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
@ -109,7 +156,7 @@
|
||||
v-show="total>0"
|
||||
layout="prev, pager, next"
|
||||
:total="total"
|
||||
:page.sync="queryParams.page"
|
||||
:page.sync="queryParams.pageNo"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@current-change="getList">
|
||||
</el-pagination>
|
||||
@ -117,117 +164,190 @@
|
||||
|
||||
|
||||
</el-card>
|
||||
|
||||
<!-- 订单退款-->
|
||||
<el-dialog
|
||||
title="订单退款"
|
||||
width="25%"
|
||||
:visible.sync="dialogRefund">
|
||||
<div style="text-align: center;font-weight: bold">
|
||||
¥<span style="font-size: 35px">{{ oilOrder.rechargeBalance }}</span>
|
||||
</div>
|
||||
<div class="tk">退款金额</div>
|
||||
<div class="tk">会员手机号:{{ oilOrder.mobile }}</div>
|
||||
<div style="margin: 10px 0">
|
||||
退款原因<br/>
|
||||
<el-radio-group v-model="radio1" style="margin: 10px 0">
|
||||
<el-radio-button label="充值类型选错"></el-radio-button>
|
||||
<el-radio-button label="充值金额错误"></el-radio-button>
|
||||
<el-radio-button label="其他原因"></el-radio-button>
|
||||
</el-radio-group>
|
||||
</div>
|
||||
<div>
|
||||
<el-input placeholder="请输入密码" v-model="password" show-password></el-input>
|
||||
<br/>
|
||||
<span style="color: grey;font-size: 12px">退款仅支持全额退款,退款金额将按照支付信息原路退回、优惠券、储值卡等原路退回处理</span>
|
||||
</div>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="dialogRefund = false">取 消</el-button>
|
||||
<el-button type="primary" @click="dialogRefund = false">确 定</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {listCardValueRecord} from "@/api/cashier/cardvaluerecord";
|
||||
import {getDicts} from "@/api/dict/data";
|
||||
import {cardValueRecordInfo, listCardValueRecord} from "@/api/cashier/cardvaluerecord";
|
||||
import {getDicts} from "@/api/dict/data";
|
||||
import {queryStaffs} from "@/api/cashier/staff";
|
||||
|
||||
export default {
|
||||
name: "order_Cashier",
|
||||
data(){
|
||||
return{
|
||||
// 支付方式列表
|
||||
payList:[],
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
},
|
||||
// 列表信息
|
||||
list:[],
|
||||
// 总条数
|
||||
total:0,
|
||||
export default {
|
||||
name: "order_Cashier",
|
||||
data(){
|
||||
return{
|
||||
// 员工列表
|
||||
staffList:[],
|
||||
// 日期范围
|
||||
dateRange: [],
|
||||
oilOrder:{},
|
||||
// 退款密码
|
||||
password:"",
|
||||
radio1:"充值类型选错",
|
||||
dialogRefund:false,
|
||||
// 支付方式列表
|
||||
payList:[],
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
},
|
||||
// 列表信息
|
||||
list:[],
|
||||
// 总条数
|
||||
total:0,
|
||||
|
||||
labelPosition: 'right',
|
||||
formLabelAlign: {
|
||||
name: '',
|
||||
},
|
||||
tableData: [{
|
||||
date: '2016-05-03',
|
||||
name: '王小狼',
|
||||
province: '上海',
|
||||
city: '普陀区',
|
||||
address: '上海市普陀区金沙江路 1518 弄',
|
||||
zip: 200333
|
||||
}, {
|
||||
date: '2016-05-02',
|
||||
name: '王小虎',
|
||||
province: '上海',
|
||||
city: '普陀区',
|
||||
address: '上海市普陀区金沙江路 1518 弄',
|
||||
zip: 200333
|
||||
}, {
|
||||
date: '2016-05-04',
|
||||
name: '王小虎',
|
||||
province: '上海',
|
||||
city: '普陀区',
|
||||
address: '上海市普陀区金沙江路 1518 弄',
|
||||
zip: 200333
|
||||
}, {
|
||||
date: '2016-05-01',
|
||||
name: '王小虎',
|
||||
province: '上海',
|
||||
city: '普陀区',
|
||||
address: '上海市普陀区金沙江路 1518 弄',
|
||||
zip: 200333
|
||||
}, {
|
||||
date: '2016-05-08',
|
||||
name: '王小虎',
|
||||
province: '上海',
|
||||
city: '普陀区',
|
||||
address: '上海市普陀区金沙江路 1518 弄',
|
||||
zip: 200333
|
||||
}, {
|
||||
date: '2016-05-06',
|
||||
name: '王小虎',
|
||||
province: '上海',
|
||||
city: '普陀区',
|
||||
address: '上海市普陀区金沙江路 1518 弄',
|
||||
zip: 200333
|
||||
}, {
|
||||
date: '2016-05-07',
|
||||
name: '王小虎',
|
||||
province: '上海',
|
||||
city: '普陀区',
|
||||
address: '上海市普陀区金沙江路 1518 弄',
|
||||
zip: 200333
|
||||
}]
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
this.getPayList();
|
||||
},
|
||||
methods:{
|
||||
getType(list,val){
|
||||
let name = "";
|
||||
list.forEach(item => {
|
||||
if (item.dictValue == val){
|
||||
name = item.dictLabel
|
||||
}
|
||||
})
|
||||
return name;
|
||||
labelPosition: 'right',
|
||||
formLabelAlign: {
|
||||
name: '',
|
||||
},
|
||||
// 获取支付列表信息
|
||||
getPayList(){
|
||||
getDicts("payment_type").then( response => {
|
||||
this.payList = response.data;
|
||||
})
|
||||
},
|
||||
// 获取列表信息
|
||||
getList(val){
|
||||
if (val!=undefined){
|
||||
this.queryParams.pageNo = val
|
||||
}
|
||||
listCardValueRecord(this.queryParams).then( response => {
|
||||
this.list = response.data.records;
|
||||
this.total = response.data.total;
|
||||
})
|
||||
}
|
||||
// tableData: [{
|
||||
// date: '2016-05-03',
|
||||
// name: '王小狼',
|
||||
// province: '上海',
|
||||
// city: '普陀区',
|
||||
// address: '上海市普陀区金沙江路 1518 弄',
|
||||
// zip: 200333
|
||||
// }, {
|
||||
// date: '2016-05-02',
|
||||
// name: '王小虎',
|
||||
// province: '上海',
|
||||
// city: '普陀区',
|
||||
// address: '上海市普陀区金沙江路 1518 弄',
|
||||
// zip: 200333
|
||||
// }, {
|
||||
// date: '2016-05-04',
|
||||
// name: '王小虎',
|
||||
// province: '上海',
|
||||
// city: '普陀区',
|
||||
// address: '上海市普陀区金沙江路 1518 弄',
|
||||
// zip: 200333
|
||||
// }, {
|
||||
// date: '2016-05-01',
|
||||
// name: '王小虎',
|
||||
// province: '上海',
|
||||
// city: '普陀区',
|
||||
// address: '上海市普陀区金沙江路 1518 弄',
|
||||
// zip: 200333
|
||||
// }, {
|
||||
// date: '2016-05-08',
|
||||
// name: '王小虎',
|
||||
// province: '上海',
|
||||
// city: '普陀区',
|
||||
// address: '上海市普陀区金沙江路 1518 弄',
|
||||
// zip: 200333
|
||||
// }, {
|
||||
// date: '2016-05-06',
|
||||
// name: '王小虎',
|
||||
// province: '上海',
|
||||
// city: '普陀区',
|
||||
// address: '上海市普陀区金沙江路 1518 弄',
|
||||
// zip: 200333
|
||||
// }, {
|
||||
// date: '2016-05-07',
|
||||
// name: '王小虎',
|
||||
// province: '上海',
|
||||
// city: '普陀区',
|
||||
// address: '上海市普陀区金沙江路 1518 弄',
|
||||
// zip: 200333
|
||||
// }]
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
this.getPayList();
|
||||
},
|
||||
methods:{
|
||||
// 补打
|
||||
patchwork(data){
|
||||
const orderNo = data.name
|
||||
this.$modal.confirm('确定您要补打当前订单吗?当前会员[' + orderNo + '],请确保云打印机正在运行中').then(function() {
|
||||
// return delUser(row.id);
|
||||
}).then(() => {
|
||||
this.$modal.msgSuccess("打印指令已发送打印机,请查看打印结果");
|
||||
}).catch(() => {});
|
||||
},
|
||||
// 退款
|
||||
handleRefund(id){
|
||||
this.dialogRefund = true;
|
||||
cardValueRecordInfo(id).then( response => {
|
||||
this.oilOrder = response.data
|
||||
})
|
||||
},
|
||||
getType(list,val){
|
||||
let name = "";
|
||||
list.forEach(item => {
|
||||
if (item.dictValue == val){
|
||||
name = item.dictLabel
|
||||
}
|
||||
})
|
||||
return name;
|
||||
},
|
||||
// 获取支付列表信息
|
||||
getPayList(){
|
||||
getDicts("payment_type").then( response => {
|
||||
this.payList = response.data;
|
||||
})
|
||||
queryStaffs().then( response => {
|
||||
this.staffList = response.data;
|
||||
})
|
||||
},
|
||||
// 搜索按钮操作
|
||||
handleQuery() {
|
||||
this.queryParams.pageNo = 1;
|
||||
this.getList();
|
||||
},
|
||||
// 重置按钮操作
|
||||
resetQuery() {
|
||||
this.dateRange = [];
|
||||
this.queryParams = {
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
}
|
||||
// this.resetForm("queryForm");
|
||||
this.handleQuery();
|
||||
},
|
||||
// 获取列表信息
|
||||
getList(val){
|
||||
if (val!=undefined){
|
||||
this.queryParams.pageNo = val
|
||||
}
|
||||
listCardValueRecord(this.queryParams).then( response => {
|
||||
this.list = response.data.records;
|
||||
this.total = response.data.total;
|
||||
})
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
@ -288,6 +408,10 @@
|
||||
.top-app-sou{
|
||||
width: 20%;
|
||||
}
|
||||
|
||||
.tk{
|
||||
text-align: center;
|
||||
color: grey;
|
||||
margin: 10px 0;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
Loading…
Reference in New Issue
Block a user