no message
This commit is contained in:
parent
4f071179af
commit
3d3ea7ba06
@ -168,7 +168,10 @@ export default {
|
||||
|
||||
dataList.forEach(element => {
|
||||
this.fuelDate.push(element.total_sales);
|
||||
|
||||
this.cardSum+=element.total_sales
|
||||
this.cardSum = parseFloat(this.cardSum.toFixed(2));
|
||||
|
||||
});
|
||||
this.initChartwo()
|
||||
// this.changeLabel();
|
||||
|
@ -1,4 +1,4 @@
|
||||
<!--普通收款订单-->
|
||||
<!--小程序订单列表-->
|
||||
<template>
|
||||
<div>
|
||||
<el-card class="box-card">
|
||||
@ -36,7 +36,7 @@
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-card>
|
||||
<!-- 统计-->
|
||||
<!-- 统计-->
|
||||
<el-card class="box-card">
|
||||
<div slot="header" class="clearfix">
|
||||
<span>小程序订单统计</span>
|
||||
@ -78,6 +78,7 @@
|
||||
</div>
|
||||
<div class="table-box">
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="list"
|
||||
style="width: 100%">
|
||||
<el-table-column type="expand">
|
||||
@ -132,17 +133,18 @@
|
||||
<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">
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="180">
|
||||
<template slot-scope="scope">
|
||||
<!-- <el-button style="width: 60px" size="mini"-->
|
||||
<!-- @click="getOrdersInfo(scope.row.id)"-->
|
||||
<!-- type="success" plain round>详情</el-button>-->
|
||||
<!-- <el-button style="width: 60px" size="mini"-->
|
||||
<!-- @click="getOrdersInfo(scope.row.id)"-->
|
||||
<!-- type="success" plain round>详情</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>-->
|
||||
<el-button style="width: 60px" size="mini"
|
||||
v-if = "scope.row.orderStatus === 'paid'"
|
||||
@click="handleRefund(scope.row.id)"
|
||||
type="danger" plain round>退款</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
@ -179,7 +181,7 @@
|
||||
width="25%"
|
||||
:visible.sync="dialogRefund">
|
||||
<div style="text-align: center;font-weight: bold">
|
||||
¥<span style="font-size: 35px">{{ cashierOrder.amount }}</span>
|
||||
¥<span style="font-size: 35px">{{ cashierOrder.payAmount }}</span>
|
||||
</div>
|
||||
<div class="tk">退款金额</div>
|
||||
<div class="tk">退款单号:{{ cashierOrder.orderNo }}</div>
|
||||
@ -192,13 +194,13 @@
|
||||
</el-radio-group>
|
||||
</div>
|
||||
<div>
|
||||
<el-input placeholder="请输入密码" v-model="password" show-password></el-input>
|
||||
<el-input placeholder="请输入密码" v-model="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>
|
||||
<el-button type="primary" @click="refundConfirmed()">确 定</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</div>
|
||||
@ -209,7 +211,7 @@ import {cashierOrder, listCashierOrder,orderStatisticsApi} from "@/api/order/cas
|
||||
import {getDicts} from "@/api/order/data";
|
||||
import {queryStaffs} from "@/api/order/staff";
|
||||
import { exportExcelCashierApi } from "@/api/order/exportExcel";
|
||||
import {listOilOrder} from "@/api/order/oilorder";
|
||||
import {listOilOrder,oilOrderInfo} from "@/api/order/oilorder";
|
||||
import {getOilNumberGun} from "@/api/oilConfig/oilGuns";
|
||||
import {getOilNameList} from "@/api/order/oilnumgun";
|
||||
|
||||
@ -223,6 +225,7 @@ import {getOilNameList} from "@/api/order/oilnumgun";
|
||||
pageSize: 10,
|
||||
terminal:"applet",
|
||||
},
|
||||
loading: false,
|
||||
// 总条数
|
||||
total:0,
|
||||
// 列表信息
|
||||
@ -376,10 +379,48 @@ import {getOilNameList} from "@/api/order/oilnumgun";
|
||||
// 退款
|
||||
handleRefund(id){
|
||||
this.dialogRefund = true;
|
||||
cashierOrder(id).then( response => {
|
||||
|
||||
oilOrderInfo(id).then( response => {
|
||||
this.cashierOrder = response.data
|
||||
|
||||
if (response.data.orderStatus === "refund") {
|
||||
this.$message({
|
||||
type: 'info',
|
||||
message: '该订单已经退款'
|
||||
});
|
||||
this.dialogRefund = false;
|
||||
}
|
||||
|
||||
})
|
||||
|
||||
|
||||
|
||||
},
|
||||
refundConfirmed() {
|
||||
this.loading = true;
|
||||
|
||||
this.dialogRefund = false;
|
||||
console.log("cashierOrder",this.cashierOrder)
|
||||
let map={
|
||||
orderNo: this.cashierOrder.orderNo,
|
||||
storeId: this.cashierOrder.storeId,
|
||||
refundRemark:this.radio1 +"-"+ this.refundRemark,
|
||||
type: "canRefund"
|
||||
}
|
||||
refundApi(map).then(res=>{
|
||||
this.loading = false;
|
||||
|
||||
this.$message({
|
||||
type: 'info',
|
||||
message: '退款成功'
|
||||
});
|
||||
this.getList();
|
||||
this.getOrderStatistics();
|
||||
this.getStaffList();
|
||||
|
||||
})
|
||||
},
|
||||
|
||||
// 获取列表信息
|
||||
getList(val){
|
||||
if (val!=undefined){
|
||||
|
@ -68,9 +68,9 @@ export function delUser(userId) {
|
||||
}
|
||||
|
||||
// 用户密码重置
|
||||
export function resetUserPwd(userId, password) {
|
||||
export function resetUserPwd(acctId, password) {
|
||||
const data = {
|
||||
userId,
|
||||
acctId,
|
||||
password
|
||||
}
|
||||
return request({
|
||||
|
@ -580,7 +580,7 @@
|
||||
|
||||
// 页面初始化
|
||||
initPage() {
|
||||
|
||||
|
||||
this.activeName= 'list',
|
||||
this.userList= 'list',
|
||||
this.cleanUp()
|
||||
@ -677,10 +677,10 @@
|
||||
});
|
||||
|
||||
},
|
||||
resetForm(formName) {
|
||||
|
||||
// this.$refs[formName].resetFields();
|
||||
},
|
||||
// resetForm(formName) {
|
||||
//
|
||||
// // this.$refs[formName].resetFields();
|
||||
// },
|
||||
handleClick(tab, event) {
|
||||
|
||||
},
|
||||
@ -1006,6 +1006,8 @@
|
||||
},
|
||||
/** 重置密码按钮操作 */
|
||||
handleResetPwd(row) {
|
||||
|
||||
console.log("row",row)
|
||||
this.$prompt('请输入"' + row.realName + '"的新密码', "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
@ -1013,7 +1015,7 @@
|
||||
inputPattern: /^.{5,20}$/,
|
||||
inputErrorMessage: "用户密码长度必须介于 5 和 20 之间"
|
||||
}).then(({value}) => {
|
||||
resetUserPwd(row.userId, value).then(response => {
|
||||
resetUserPwd(row.acctId, value).then(response => {
|
||||
this.$modal.msgSuccess("修改成功,新密码是:" + value);
|
||||
});
|
||||
}).catch(() => {
|
||||
|
@ -130,77 +130,34 @@
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="姓名" prop="realName">
|
||||
<el-input v-model="form.realName" placeholder="请输入姓名" maxlength="30" />
|
||||
<el-input v-model="form.realName" placeholder="请输入姓名" maxlength="30" style="width: 270px"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="手机号" prop="mobile">
|
||||
<el-input v-model="form.mobile" placeholder="请输入联系人电话" maxlength="30"/>
|
||||
<el-input v-model="form.mobile" placeholder="请输入联系人电话" maxlength="30" style="width: 270px"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="角色组" prop="role">
|
||||
<el-select v-model="form.roleId" placeholder="请选择角色">
|
||||
<el-select v-model="form.roleId" placeholder="请选择角色" style="width: 270px">
|
||||
<el-option label="油站站长" :value="12" ></el-option>
|
||||
<el-option label="普通员工" :value="15" ></el-option>
|
||||
<el-option label="收银员" :value="16" ></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="登录密码" prop="password">
|
||||
<el-input v-model="form.password" placeholder="请输入登录密码" maxlength="30"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="一键加油" prop="isRefuel">
|
||||
<el-select v-model="form.isRefuel">
|
||||
<el-option
|
||||
v-for="dict in dict.type.display"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
<br/>
|
||||
<el-tooltip
|
||||
class="item"
|
||||
effect="dark"
|
||||
placement="bottom">
|
||||
<div slot="content">加油时选择加油员场景使用,选择不显示加油员将无法被指定<br/>(需系统开启加油选择加油员功能)终端支持:(PC、POS、小程序)</div>
|
||||
<span>加油时选择加油员场景使用,选择...</span>
|
||||
</el-tooltip>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="收款通知" prop="notice">
|
||||
<el-select v-model="form.notice">
|
||||
<el-option
|
||||
v-for="dict in dict.type.notice"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
<br/>
|
||||
<el-tooltip
|
||||
class="item"
|
||||
effect="dark"
|
||||
placement="bottom">
|
||||
<div slot="content"> 收款成功接收的公众号模板消息通知,需<br/>关注公众号,且本站小程序中会员手机号<br/>信息与当前员工手机号一致 </div>
|
||||
<span>收款成功接收的公众号模板消息...</span>
|
||||
</el-tooltip>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<!-- <el-col :span="8">-->
|
||||
<!-- <el-form-item label="登录密码" prop="password">-->
|
||||
<!-- <el-input v-model="form.password" placeholder="请输入登录密码" maxlength="30"/>-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- </el-col>-->
|
||||
|
||||
<el-col :span="8">
|
||||
<el-form-item label="账户状态" prop="status">
|
||||
<el-select v-model="form.status">
|
||||
<el-select v-model="form.status"style="width: 270px">
|
||||
<el-option
|
||||
v-for="dict in dict.type.zhzt"
|
||||
:key="dict.value"
|
||||
@ -220,7 +177,52 @@
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-col :span="8">
|
||||
<el-form-item label="一键加油" prop="isRefuel">
|
||||
<el-select v-model="form.isRefuel" style="width: 270px">
|
||||
<el-option
|
||||
v-for="dict in dict.type.display"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
<br/>
|
||||
<el-tooltip
|
||||
class="item"
|
||||
effect="dark"
|
||||
placement="bottom">
|
||||
<div slot="content">加油时选择加油员场景使用,选择不显示加油员将无法被指定<br/>(需系统开启加油选择加油员功能)终端支持:(PC、POS、小程序)</div>
|
||||
<span>加油时选择加油员场景使用,选择...</span>
|
||||
</el-tooltip>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="收款通知" prop="notice">
|
||||
<el-select v-model="form.notice" style="width: 270px">
|
||||
<el-option
|
||||
v-for="dict in dict.type.notice"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
<br/>
|
||||
<el-tooltip
|
||||
class="item"
|
||||
effect="dark"
|
||||
placement="bottom">
|
||||
<div slot="content"> 收款成功接收的公众号模板消息通知,需<br/>关注公众号,且本站小程序中会员手机号<br/>信息与当前员工手机号一致 </div>
|
||||
<span>收款成功接收的公众号模板消息...</span>
|
||||
</el-tooltip>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
|
||||
<!-- </el-row>-->
|
||||
<!-- <el-row>-->
|
||||
<el-col :span="17">
|
||||
<el-form-item label="备注信息">
|
||||
<el-input v-model="form.description" type="textarea" placeholder="请输入内容"></el-input>
|
||||
</el-form-item>
|
||||
|
@ -291,6 +291,7 @@ public class LJGoodsServiceImpl extends ServiceImpl<LJGoodsMapper, LJGoods> impl
|
||||
// 判断商品库存是否足够
|
||||
@Override
|
||||
public boolean determineTheInventoryOfTheProduct(@Param("id") Integer id, @Param("stock") Integer stock) {
|
||||
if (ObjectUtil.isEmpty(id)) return true;
|
||||
LJGoods ljGoods = baseMapper.selectById(id);
|
||||
if (stock.compareTo(ljGoods.getStock())>0) {
|
||||
return false;
|
||||
|
@ -229,12 +229,12 @@ public class AllOrderInfoServiceImpl extends ServiceImpl<AllOrderInfoMapper,AllO
|
||||
}
|
||||
// 修改商户配置
|
||||
}else {
|
||||
throw new RuntimeException("退款失败,请联系管理员");
|
||||
throw new RuntimeException("退款失败,请联系管理员! 失败原因:"+refund.get("result_msg"));
|
||||
}
|
||||
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
throw new RuntimeException("退款失败");
|
||||
throw new RuntimeException("退款失败!");
|
||||
}
|
||||
|
||||
log.info("refund{}",refund);
|
||||
|
@ -6,10 +6,13 @@ import com.aliyuncs.dysmsapi.model.v20170525.SendSmsRequest;
|
||||
import com.aliyuncs.dysmsapi.model.v20170525.SendSmsResponse;
|
||||
import com.aliyuncs.exceptions.ClientException;
|
||||
import com.aliyuncs.profile.DefaultProfile;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
/**
|
||||
* 短信发送工具类
|
||||
*/
|
||||
|
||||
@Slf4j
|
||||
public class SMSUtils {
|
||||
/**
|
||||
* 发送短信
|
||||
|
@ -283,7 +283,7 @@ public class BackendAccountController extends BaseController {
|
||||
@CrossOrigin
|
||||
public ResponseObject resetPwd(HttpServletRequest request, @RequestBody Map<String, Object> param) {
|
||||
String token = request.getHeader("Access-Token");
|
||||
Integer userId = param.get("userId") == null ? 0 : Integer.parseInt(param.get("userId").toString());
|
||||
Integer acctId = param.get("acctId") == null ? 0 : Integer.parseInt(param.get("acctId").toString());
|
||||
String password = param.get("password") == null ? "" : param.get("password").toString();
|
||||
|
||||
AccountInfo accountDto = TokenUtil.getAccountInfoByToken(token);
|
||||
@ -291,7 +291,7 @@ public class BackendAccountController extends BaseController {
|
||||
return getFailureResult(1001, "请先登录");
|
||||
}
|
||||
|
||||
TAccount tAccount = tAccountService.getAccountInfoById(userId.intValue());
|
||||
TAccount tAccount = tAccountService.getAccountInfoById(acctId.intValue());
|
||||
tAccount.setPassword(password);
|
||||
|
||||
if (tAccount != null) {
|
||||
|
@ -330,15 +330,17 @@
|
||||
v-loading="loading">
|
||||
<div style="text-align: center;font-size: 15px;font-weight: bold">应收金额</div>
|
||||
<div style="text-align: center;font-size: 30px;font-weight: bold;color: red;margin: 10px 0">
|
||||
¥{{ allAmout}}
|
||||
¥{{allAmout}}
|
||||
</div>
|
||||
<div style="text-align: center;margin-bottom: 10px">
|
||||
减去积分:{{ allPoints }}
|
||||
</div>
|
||||
<template v-if="paymentType !== 'CASH'">
|
||||
<template v-if="paymentType !== 'CASH' ">
|
||||
<template v-if="allAmout != 0 ">
|
||||
|
||||
<div>
|
||||
<el-input v-model="authCode"
|
||||
<el-input
|
||||
v-model="authCode"
|
||||
v-focus ref="getFocus"
|
||||
autofocus="autofocus"
|
||||
@keydown.enter.native="collection"
|
||||
@ -358,6 +360,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</template>
|
||||
|
||||
<el-divider></el-divider>
|
||||
<span slot="footer" class="dialog-footer" style="display: flex;justify-content: space-around">
|
||||
@ -483,9 +486,6 @@ import {getUserInfoMobile, getUserVoMobile, getUserVoName} from "@/api/cashier/u
|
||||
inserted: function (el) {
|
||||
// 聚焦元素
|
||||
el.querySelector('input').focus()
|
||||
// this.$nextTick( () =>{
|
||||
// this.$refs.getFocus.focus()
|
||||
// })
|
||||
},
|
||||
},
|
||||
},
|
||||
@ -500,7 +500,6 @@ import {getUserInfoMobile, getUserVoMobile, getUserVoName} from "@/api/cashier/u
|
||||
})
|
||||
console.log("imagePath",this.imagePath)
|
||||
},
|
||||
|
||||
// 获取商品分类
|
||||
getGiftCategory() {
|
||||
getGiftCategoryApi().then(res=>{
|
||||
@ -517,9 +516,26 @@ import {getUserInfoMobile, getUserVoMobile, getUserVoName} from "@/api/cashier/u
|
||||
this.paymentType = payType.dictValue
|
||||
this.payType = payType.dictLabel +"支付"
|
||||
},
|
||||
|
||||
// 点击商品增加库存
|
||||
async addGift(data) {
|
||||
if (data.giftType === "实物商品") {
|
||||
//判断商品库存(原库存)是否足够
|
||||
|
||||
let stock = 1;
|
||||
if (data.markPurchases) {
|
||||
stock = data.markPurchases+1
|
||||
}
|
||||
await getDetermineTheInventoryOfTheProductApi({id:data.goodsId,
|
||||
stock:stock}).then(res=> {
|
||||
if (!res.data) {
|
||||
// data.markPurchases = data.markPurchases-1
|
||||
this.$message.error('该商品库存不足');
|
||||
return
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
|
||||
if (data.markPurchases) {
|
||||
if (data.markPurchases>=data.remainingInventory){
|
||||
@ -531,19 +547,11 @@ import {getUserInfoMobile, getUserVoMobile, getUserVoName} from "@/api/cashier/u
|
||||
this.$set(data, "markPurchases", 1);
|
||||
}
|
||||
this.markPurchasesAll++
|
||||
|
||||
//判断商品库存是否足够
|
||||
await getDetermineTheInventoryOfTheProductApi({id:data.goodsId,
|
||||
stock:data.markPurchases}).then(res=> {
|
||||
if (!res.data) {
|
||||
data.markPurchases = data.markPurchases-1
|
||||
this.$message.error('该商品库存不足');
|
||||
return;
|
||||
}
|
||||
})
|
||||
console.log("addGift",data)
|
||||
|
||||
|
||||
|
||||
|
||||
// 计算总额
|
||||
this.dataChange(data);
|
||||
|
||||
@ -565,7 +573,6 @@ import {getUserInfoMobile, getUserVoMobile, getUserVoName} from "@/api/cashier/u
|
||||
|
||||
// 计算余额是否足够
|
||||
},
|
||||
|
||||
handleClick(tab, event){
|
||||
this.getGift()
|
||||
},
|
||||
@ -625,10 +632,7 @@ import {getUserInfoMobile, getUserVoMobile, getUserVoName} from "@/api/cashier/u
|
||||
resetMember(){
|
||||
this.member = {};
|
||||
this.isMember = false;
|
||||
// this.map.payUser == "";
|
||||
// this.balance = 0;
|
||||
this.userNo = "";
|
||||
// this.handleChange();
|
||||
},
|
||||
// 获取当前账户信息
|
||||
getStaff(){
|
||||
@ -657,8 +661,10 @@ import {getUserInfoMobile, getUserVoMobile, getUserVoName} from "@/api/cashier/u
|
||||
this.allPoints=0
|
||||
this.allAmout=0
|
||||
this.allMoneyRatio=0
|
||||
await this.getGift();
|
||||
this.giftList = ''
|
||||
this.getGiftCategory();
|
||||
|
||||
await this.getGift();
|
||||
// this.paymentType = ''
|
||||
this.resetMember()
|
||||
},
|
||||
@ -930,7 +936,6 @@ import {getUserInfoMobile, getUserVoMobile, getUserVoName} from "@/api/cashier/u
|
||||
|
||||
}
|
||||
// this.paymentType = ''
|
||||
this.reset()
|
||||
},
|
||||
// 清楚数据
|
||||
handClose(){
|
||||
@ -946,17 +951,35 @@ import {getUserInfoMobile, getUserVoMobile, getUserVoName} from "@/api/cashier/u
|
||||
// this.goodsTotal = 0;
|
||||
// }
|
||||
this.isPay=true,
|
||||
this.isPaySuccess=false,
|
||||
this.isQuery=true,
|
||||
this.openConfirm = false
|
||||
this.isPaySuccess=false,
|
||||
this.isQuery=true,
|
||||
this.openConfirm = false
|
||||
this.openRecharge = false
|
||||
|
||||
this.reset()
|
||||
// this.reset()
|
||||
this.dialogVisiblej = false
|
||||
this.authCode = '';
|
||||
},
|
||||
},
|
||||
watch: {
|
||||
dialogVisiblej(newValue) {
|
||||
if (!newValue) {
|
||||
console.log("newValue",newValue)
|
||||
|
||||
this.queryParams= {
|
||||
categoryId:'',
|
||||
giftName:'',
|
||||
deliveryMethod:'门店自提',
|
||||
page: 1,
|
||||
pageSize: 10000,
|
||||
},
|
||||
|
||||
this.handClose()
|
||||
this.reset()
|
||||
|
||||
}
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
isTheBalanceIsSufficient(){
|
||||
if (this.member && this.member.points !== undefined) {
|
||||
|
@ -181,6 +181,8 @@
|
||||
<el-descriptions :column="1" direction="vertical">
|
||||
<el-descriptions-item label="油品详情">
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
|
||||
:data="oilInfo"
|
||||
style="width: 100%">
|
||||
<el-table-column label="油品金额" prop="orderAmount">
|
||||
@ -284,6 +286,7 @@ import {refundApi} from "@/api/cashier/refund";
|
||||
goodsInfo:[],
|
||||
// 收银员订单详情
|
||||
cashierOrder:{},
|
||||
loading:false,
|
||||
dialogVisible:false,
|
||||
dialogRefund:false,
|
||||
// 员工列表
|
||||
@ -386,6 +389,7 @@ import {refundApi} from "@/api/cashier/refund";
|
||||
|
||||
refundConfirmed() {
|
||||
this.dialogRefund = false;
|
||||
this.loading = true;
|
||||
console.log("cashierOrder",this.cashierOrder)
|
||||
let map={
|
||||
orderNo: this.cashierOrder.orderNo,
|
||||
@ -398,6 +402,8 @@ import {refundApi} from "@/api/cashier/refund";
|
||||
type: 'info',
|
||||
message: '退款成功'
|
||||
});
|
||||
this.loading = false;
|
||||
|
||||
this.getList();
|
||||
this.getOrderStatistics();
|
||||
this.getStaffList();
|
||||
|
@ -110,6 +110,7 @@
|
||||
</div>
|
||||
<div class="table-box">
|
||||
<el-table
|
||||
v-loading="loadingRes"
|
||||
:data="list"
|
||||
style="width: 100%">
|
||||
<el-table-column type="expand">
|
||||
@ -244,6 +245,7 @@ export default {
|
||||
dateRange: [],
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
loadingRes: true,
|
||||
// 标题
|
||||
title: "",
|
||||
// 选中数组
|
||||
@ -347,6 +349,7 @@ export default {
|
||||
// 退款接口
|
||||
refundConfirmed() {
|
||||
this.dialogRefund = false;
|
||||
this.loadingRes = true;
|
||||
console.log("cashierOrder",this.goods)
|
||||
let map={
|
||||
orderNo: this.goods.orderNo,
|
||||
@ -360,6 +363,8 @@ export default {
|
||||
type: 'info',
|
||||
message: '退款成功'
|
||||
});
|
||||
this.loadingRes = false;
|
||||
|
||||
this.created()
|
||||
|
||||
}
|
||||
|
@ -139,6 +139,7 @@
|
||||
</div>
|
||||
<div class="table-box">
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="oilOrderList"
|
||||
style="width: 100%">
|
||||
<el-table-column type="expand">
|
||||
@ -283,6 +284,8 @@
|
||||
refundRemark:"",
|
||||
radio1:"油号选错",
|
||||
dialogRefund:false,
|
||||
loading: false,
|
||||
|
||||
// 员工列表
|
||||
staffList:[],
|
||||
// 终端列表
|
||||
@ -414,6 +417,7 @@
|
||||
|
||||
refundConfirmed() {
|
||||
this.dialogRefund = false;
|
||||
this.loading = true;
|
||||
console.log("cashierOrder",this.cashierOrder)
|
||||
let map={
|
||||
orderNo: this.oilOrder.orderNo,
|
||||
@ -426,6 +430,8 @@
|
||||
type: 'info',
|
||||
message: '退款成功'
|
||||
});
|
||||
|
||||
this.loading = false
|
||||
this.created()
|
||||
})
|
||||
},
|
||||
|
@ -1,4 +1,4 @@
|
||||
<!--普通收款订单-->
|
||||
<!--小程序订单列表-->
|
||||
<template>
|
||||
<div>
|
||||
<el-card class="box-card">
|
||||
@ -78,6 +78,7 @@
|
||||
</div>
|
||||
<div class="table-box">
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="list"
|
||||
style="width: 100%">
|
||||
<el-table-column type="expand">
|
||||
@ -140,9 +141,10 @@
|
||||
<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>-->
|
||||
<el-button style="width: 60px" size="mini"
|
||||
v-if = "scope.row.orderStatus === 'paid'"
|
||||
@click="handleRefund(scope.row.id)"
|
||||
type="danger" plain round>退款</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
@ -179,7 +181,7 @@
|
||||
width="25%"
|
||||
:visible.sync="dialogRefund">
|
||||
<div style="text-align: center;font-weight: bold">
|
||||
¥<span style="font-size: 35px">{{ cashierOrder.amount }}</span>
|
||||
¥<span style="font-size: 35px">{{ cashierOrder.payAmount }}</span>
|
||||
</div>
|
||||
<div class="tk">退款金额</div>
|
||||
<div class="tk">退款单号:{{ cashierOrder.orderNo }}</div>
|
||||
@ -192,13 +194,13 @@
|
||||
</el-radio-group>
|
||||
</div>
|
||||
<div>
|
||||
<el-input placeholder="请输入密码" v-model="password" show-password></el-input>
|
||||
<el-input placeholder="请输入密码" v-model="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>
|
||||
<el-button type="primary" @click="refundConfirmed()">确 定</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</div>
|
||||
@ -209,9 +211,10 @@ import {cashierOrder, listCashierOrder, orderStatisticsApi} from "@/api/cashier/
|
||||
import {getDicts} from "@/api/dict/data";
|
||||
import {queryStaffs} from "@/api/cashier/staff";
|
||||
import {exportExcelCashierApi} from "@/api/order/exportExcel";
|
||||
import {listOilOrder} from "@/api/cashier/oilorder";
|
||||
import {listOilOrder, oilOrderInfo} from "@/api/cashier/oilorder";
|
||||
import {getOilNameList} from "@/api/cashier/oilnumgun";
|
||||
import {getOilNumberGun} from "@/api/cashier/oilGuns";
|
||||
import {refundApi} from "@/api/cashier/refund";
|
||||
|
||||
export default {
|
||||
name: "order_Cashier",
|
||||
@ -223,6 +226,7 @@ import {getOilNumberGun} from "@/api/cashier/oilGuns";
|
||||
pageSize: 10,
|
||||
terminal:"applet",
|
||||
},
|
||||
loading: false,
|
||||
// 总条数
|
||||
total:0,
|
||||
// 列表信息
|
||||
@ -349,10 +353,48 @@ import {getOilNumberGun} from "@/api/cashier/oilGuns";
|
||||
// 退款
|
||||
handleRefund(id){
|
||||
this.dialogRefund = true;
|
||||
cashierOrder(id).then( response => {
|
||||
|
||||
oilOrderInfo(id).then( response => {
|
||||
this.cashierOrder = response.data
|
||||
|
||||
if (response.data.orderStatus === "refund") {
|
||||
this.$message({
|
||||
type: 'info',
|
||||
message: '该订单已经退款'
|
||||
});
|
||||
this.dialogRefund = false;
|
||||
}
|
||||
|
||||
})
|
||||
|
||||
|
||||
|
||||
},
|
||||
refundConfirmed() {
|
||||
this.loading = true;
|
||||
|
||||
this.dialogRefund = false;
|
||||
console.log("cashierOrder",this.cashierOrder)
|
||||
let map={
|
||||
orderNo: this.cashierOrder.orderNo,
|
||||
storeId: this.cashierOrder.storeId,
|
||||
refundRemark:this.radio1 +"-"+ this.refundRemark,
|
||||
type: "canRefund"
|
||||
}
|
||||
refundApi(map).then(res=>{
|
||||
this.loading = false;
|
||||
|
||||
this.$message({
|
||||
type: 'info',
|
||||
message: '退款成功'
|
||||
});
|
||||
this.getList();
|
||||
this.getOrderStatistics();
|
||||
this.getStaffList();
|
||||
|
||||
})
|
||||
},
|
||||
|
||||
// 获取列表信息
|
||||
getList(val){
|
||||
if (val!=undefined){
|
||||
|
Loading…
Reference in New Issue
Block a user