no message

This commit is contained in:
wangh 2024-01-25 16:48:08 +08:00
parent 4f071179af
commit 3d3ea7ba06
14 changed files with 251 additions and 117 deletions

View File

@ -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();

View File

@ -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){

View File

@ -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({

View File

@ -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(() => {

View File

@ -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/>(需系统开启加油选择加油员功能)终端支持:(PCPOS小程序)</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/>(需系统开启加油选择加油员功能)终端支持:(PCPOS小程序)</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>

View File

@ -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;

View File

@ -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);

View File

@ -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 {
/**
* 发送短信

View File

@ -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) {

View File

@ -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) {

View File

@ -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();

View File

@ -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()
}

View File

@ -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()
})
},

View File

@ -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){