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