支付宝兼容
This commit is contained in:
parent
237466ee75
commit
a2028102d4
@ -160,8 +160,8 @@ export default {
|
||||
loginForm: {
|
||||
tel:null,
|
||||
telcode:null,
|
||||
username: "oil_admin",
|
||||
password: "123456",
|
||||
username: "",
|
||||
password: "",
|
||||
rememberMe: false,
|
||||
captchaCode: "",
|
||||
uuid: ""
|
||||
@ -282,9 +282,9 @@ export default {
|
||||
app.$router.push({ path: this.redirect || "/" }).catch(()=>{});
|
||||
}).catch(() => {
|
||||
app.loading = false;
|
||||
if (app.captchaOnOff) {
|
||||
app.getCode();
|
||||
}
|
||||
// if (app.captchaOnOff) {
|
||||
// app.getCode();
|
||||
// }
|
||||
});
|
||||
}
|
||||
});
|
||||
|
@ -196,6 +196,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">
|
||||
@ -246,7 +248,6 @@
|
||||
<!-- 订单退款-->
|
||||
<el-dialog
|
||||
:close-on-click-modal="false"
|
||||
|
||||
title="订单退款"
|
||||
width="25%"
|
||||
:visible.sync="dialogRefund">
|
||||
@ -301,6 +302,7 @@ import {refundApi} from "@/api/order/refund";
|
||||
goodsInfo:[],
|
||||
// 收银员订单详情
|
||||
cashierOrder:{},
|
||||
loading:false,
|
||||
dialogVisible:false,
|
||||
dialogRefund:false,
|
||||
// 员工列表
|
||||
@ -402,8 +404,9 @@ import {refundApi} from "@/api/order/refund";
|
||||
});
|
||||
},
|
||||
|
||||
refundConfirmed() {
|
||||
async refundConfirmed() {
|
||||
this.dialogRefund = false;
|
||||
this.loading = true;
|
||||
console.log("cashierOrder",this.cashierOrder)
|
||||
let map={
|
||||
orderNo: this.cashierOrder.orderNo,
|
||||
@ -411,19 +414,18 @@ import {refundApi} from "@/api/order/refund";
|
||||
refundRemark:this.radio1 +"-"+ this.refundRemark,
|
||||
type: "canRefund"
|
||||
}
|
||||
refundApi(map).then(res=>{
|
||||
// if() {
|
||||
//
|
||||
// }
|
||||
await refundApi(map).then(res=>{
|
||||
this.$message({
|
||||
type: 'info',
|
||||
message: '退款成功'
|
||||
});
|
||||
this.getList();
|
||||
this.getOrderStatistics();
|
||||
this.getStaffList();
|
||||
|
||||
})
|
||||
|
||||
this.loading = false;
|
||||
|
||||
this.getList();
|
||||
this.getOrderStatistics();
|
||||
this.getStaffList();
|
||||
},
|
||||
// 获取油号名称
|
||||
getName(oilNameList,id){
|
||||
|
@ -245,7 +245,8 @@ export default {
|
||||
// 日期范围
|
||||
dateRange: [],
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
loading: false,
|
||||
loadingRes: true,
|
||||
// 标题
|
||||
title: "",
|
||||
// 选中数组
|
||||
@ -356,8 +357,9 @@ export default {
|
||||
|
||||
},
|
||||
// 退款接口
|
||||
refundConfirmed() {
|
||||
async refundConfirmed() {
|
||||
this.dialogRefund = false;
|
||||
this.loadingRes = true;
|
||||
console.log("cashierOrder",this.goods)
|
||||
let map={
|
||||
orderNo: this.goods.orderNo,
|
||||
@ -365,17 +367,17 @@ export default {
|
||||
refundRemark:this.radio1 +"-"+ this.refundRemark,
|
||||
type: "canRefund"
|
||||
}
|
||||
refundApi(map).then(res=>{
|
||||
if (res.code === 200){
|
||||
await refundApi(map).then(res=>{
|
||||
if (res.code === 200) {
|
||||
this.$message({
|
||||
type: 'info',
|
||||
message: '退款成功'
|
||||
});
|
||||
this.created()
|
||||
|
||||
}
|
||||
|
||||
})
|
||||
this.loadingRes = false;
|
||||
this.created()
|
||||
|
||||
},
|
||||
// 根据员工id查询员工信息
|
||||
queryStaf(list,id){
|
||||
|
@ -306,6 +306,7 @@
|
||||
import {getUser, queryUsers} from "@/api/order/user";
|
||||
import {exportExcelOilOrderApi} from "@/api/order/exportExcel";
|
||||
import {getOilNumberGun} from "@/api/oilConfig/oilGuns";
|
||||
import {getOrderInfoApi, refundApi} from "@/api/order/refund";
|
||||
|
||||
export default {
|
||||
name: "order_Oil",
|
||||
|
@ -217,6 +217,7 @@ import { exportExcelCashierApi } from "@/api/order/exportExcel";
|
||||
import {listOilOrder,oilOrderInfo} from "@/api/order/oilorder";
|
||||
import {getOilNumberGun} from "@/api/oilConfig/oilGuns";
|
||||
import {getOilNameList} from "@/api/order/oilnumgun";
|
||||
import {refundApi} from "@/api/order/refund";
|
||||
|
||||
export default {
|
||||
name: "order_Cashier",
|
||||
@ -399,7 +400,7 @@ import {getOilNameList} from "@/api/order/oilnumgun";
|
||||
|
||||
|
||||
},
|
||||
refundConfirmed() {
|
||||
async refundConfirmed() {
|
||||
this.loading = true;
|
||||
|
||||
this.dialogRefund = false;
|
||||
@ -410,18 +411,20 @@ import {getOilNameList} from "@/api/order/oilnumgun";
|
||||
refundRemark:this.radio1 +"-"+ this.refundRemark,
|
||||
type: "canRefund"
|
||||
}
|
||||
refundApi(map).then(res=>{
|
||||
this.loading = false;
|
||||
await refundApi(map).then(res=>{
|
||||
|
||||
this.$message({
|
||||
type: 'info',
|
||||
message: '退款成功'
|
||||
});
|
||||
this.getList();
|
||||
this.getOrderStatistics();
|
||||
this.getStaffList();
|
||||
|
||||
|
||||
})
|
||||
this.loading = false;
|
||||
|
||||
this.getList();
|
||||
this.getOrderStatistics();
|
||||
this.getStaffList();
|
||||
},
|
||||
|
||||
// 获取列表信息
|
||||
|
@ -63,7 +63,7 @@ export const constantRoutes = [
|
||||
children: [
|
||||
{
|
||||
path: 'index',
|
||||
component: () => import('@/views/index'),
|
||||
component: () => import('@/views/Service/index.vue'),
|
||||
name: 'Index',
|
||||
meta: { title: '系统首页', icon: 'dashboard', affix: true }
|
||||
}
|
||||
|
@ -93,41 +93,41 @@
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item prop="captchaCode" v-if="captchaOnOff">
|
||||
<div style="display: flex;align-items: center">
|
||||
<!-- <el-form-item prop="captchaCode" v-if="captchaOnOff">-->
|
||||
<!-- <div style="display: flex;align-items: center">-->
|
||||
|
||||
<div>
|
||||
<el-input
|
||||
v-model="loginForm.telcode"
|
||||
auto-complete="off"
|
||||
placeholder="请输入验证码"
|
||||
style="width: 90%"
|
||||
clearable
|
||||
@keyup.enter.native="handleLogin"
|
||||
>
|
||||
<svg-icon slot="prefix" icon-class="validCode" class="el-input__icon input-icon" />
|
||||
</el-input>
|
||||
</div>
|
||||
<div>
|
||||
<span class="anniulan" v-show="show" @click="getCodet" >获取验证码</span>
|
||||
<span style="cursor: pointer;color: #00aaff " v-show="!show" class="count">{{count}}s后重新获取</span>
|
||||
</div>
|
||||
<!-- <div>-->
|
||||
<!-- <el-input-->
|
||||
<!-- v-model="loginForm.telcode"-->
|
||||
<!-- auto-complete="off"-->
|
||||
<!-- placeholder="请输入验证码"-->
|
||||
<!-- style="width: 90%"-->
|
||||
<!-- clearable-->
|
||||
<!-- @keyup.enter.native="handleLogin"-->
|
||||
<!-- >-->
|
||||
<!-- <svg-icon slot="prefix" icon-class="validCode" class="el-input__icon input-icon" />-->
|
||||
<!-- </el-input>-->
|
||||
<!-- </div>-->
|
||||
<!-- <div>-->
|
||||
<!-- <span class="anniulan" v-show="show" @click="getCodet" >获取验证码</span>-->
|
||||
<!-- <span style="cursor: pointer;color: #00aaff " v-show="!show" class="count">{{count}}s后重新获取</span>-->
|
||||
<!-- </div>-->
|
||||
|
||||
</div>
|
||||
</el-form-item>
|
||||
<!-- </div>-->
|
||||
<!-- </el-form-item>-->
|
||||
<el-checkbox v-model="loginForm.rememberMe" style="margin:0px 0px 25px 0px;">记住密码</el-checkbox>
|
||||
<el-form-item style="width:100%;">
|
||||
<el-button
|
||||
:loading="loading"
|
||||
size="medium"
|
||||
type="primary"
|
||||
style="width:100%;line-height: 24px;font-size: 16px;"
|
||||
@click.native.prevent="posttelcode()"
|
||||
>
|
||||
<span v-if="!loading">立即登录</span>
|
||||
<span v-else>登 录 中...</span>
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item style="width:100%;">-->
|
||||
<!-- <el-button-->
|
||||
<!-- :loading="loading"-->
|
||||
<!-- size="medium"-->
|
||||
<!-- type="primary"-->
|
||||
<!-- style="width:100%;line-height: 24px;font-size: 16px;"-->
|
||||
<!-- @click.native.prevent="posttelcode()"-->
|
||||
<!-- >-->
|
||||
<!-- <span v-if="!loading">立即登录</span>-->
|
||||
<!-- <span v-else>登 录 中...</span>-->
|
||||
<!-- </el-button>-->
|
||||
<!-- </el-form-item>-->
|
||||
</el-form>
|
||||
</div>
|
||||
</div>
|
||||
@ -160,8 +160,8 @@ export default {
|
||||
loginForm: {
|
||||
tel:null,
|
||||
telcode:null,
|
||||
username: "admin_pt01",
|
||||
password: "123456",
|
||||
username: "",
|
||||
password: "",
|
||||
rememberMe: false,
|
||||
captchaCode: "",
|
||||
uuid: ""
|
||||
@ -199,35 +199,35 @@ export default {
|
||||
|
||||
getCodet() {
|
||||
|
||||
if(!this.loginForm.tel){
|
||||
this.$message.error("手机号不能为空")
|
||||
return
|
||||
}
|
||||
|
||||
const TIME_COUNT = 60;
|
||||
if (!this.timer) {
|
||||
this.count = TIME_COUNT;
|
||||
this.show = false;
|
||||
this.timer = setInterval(() => {
|
||||
if (this.count > 0 && this.count <= TIME_COUNT) {
|
||||
this.count--;
|
||||
} else {
|
||||
this.show = true;
|
||||
clearInterval(this.timer);
|
||||
this.timer = null;
|
||||
}
|
||||
}, 1000)
|
||||
}
|
||||
let data = {
|
||||
mobile:this.loginForm.tel
|
||||
}
|
||||
gettelcode(data).then(res =>{
|
||||
if(res.code == 200){
|
||||
this.$message.success("操作成功")
|
||||
}else{
|
||||
this.$message.error("操作失败请稍后再试")
|
||||
}
|
||||
})
|
||||
// if(!this.loginForm.tel){
|
||||
// this.$message.error("手机号不能为空")
|
||||
// return
|
||||
// }
|
||||
//
|
||||
// const TIME_COUNT = 60;
|
||||
// if (!this.timer) {
|
||||
// this.count = TIME_COUNT;
|
||||
// this.show = false;
|
||||
// this.timer = setInterval(() => {
|
||||
// if (this.count > 0 && this.count <= TIME_COUNT) {
|
||||
// this.count--;
|
||||
// } else {
|
||||
// this.show = true;
|
||||
// clearInterval(this.timer);
|
||||
// this.timer = null;
|
||||
// }
|
||||
// }, 1000)
|
||||
// }
|
||||
// let data = {
|
||||
// mobile:this.loginForm.tel
|
||||
// }
|
||||
// gettelcode(data).then(res =>{
|
||||
// if(res.code == 200){
|
||||
// this.$message.success("操作成功")
|
||||
// }else{
|
||||
// this.$message.error("操作失败请稍后再试")
|
||||
// }
|
||||
// })
|
||||
},
|
||||
getCodeimg() {
|
||||
const app = this
|
||||
|
@ -71,6 +71,9 @@ public class OilTankServiceImpl implements OilTankService {
|
||||
|
||||
@Override
|
||||
public List<OilTank> selectList2(OilTank oilTank) {
|
||||
AccountInfo accountInfo = TokenUtil.getNowAccountInfo();
|
||||
oilTank.setStoreId(accountInfo.getStoreId());
|
||||
|
||||
// 计算均进价
|
||||
return oilTankDao.selectList(oilTank);
|
||||
}
|
||||
|
@ -128,4 +128,46 @@ public class AlipayController extends BaseController {
|
||||
|
||||
return getSuccessResult("登录成功",response);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
// 验证当前登录用户是否相同
|
||||
@PostMapping("/getUserid2")
|
||||
public ResponseObject getUserId2(@RequestBody Map<String,String> map,HttpServletRequest request) throws Exception {
|
||||
String authCode = map.get("authCode");
|
||||
String storeId = map.get("storeId");
|
||||
|
||||
// 根据storeId查找对应的连锁店id
|
||||
LJStore ljStore = iljStoreService.selectStoreByIdUni(Integer.parseInt(storeId));
|
||||
// 获取支付宝userid
|
||||
AlipaySystemOauthTokenResponse alipayProfile = alipayService.getAlipayProfile(authCode);
|
||||
if (ObjectUtil.isEmpty(alipayProfile)) {
|
||||
return getSuccessResult("false");
|
||||
}
|
||||
if (ObjectUtil.isEmpty(alipayProfile.getUserId())) return getSuccessResult("false");
|
||||
|
||||
String userId = alipayProfile.getUserId();
|
||||
|
||||
// 根据手机号查询用户信息
|
||||
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
||||
if (ObjectUtil.isEmpty(nowAccountInfo)) return getSuccessResult(true);
|
||||
|
||||
LJUser ljUser = userService.queryUserByUserId(nowAccountInfo.getId());
|
||||
if (ObjectUtil.isNotEmpty(ljUser) && ObjectUtil.isNotEmpty(ljUser.getUserId())){
|
||||
|
||||
if (ljUser.getUserId().equals(userId)) {
|
||||
return getSuccessResult("true");
|
||||
|
||||
}
|
||||
|
||||
}else {
|
||||
return getSuccessResult("false");
|
||||
}
|
||||
|
||||
return getSuccessResult("false");
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
@ -555,7 +555,7 @@ import {getOilNumberGun} from "@/api/cashier/oilGuns";
|
||||
});
|
||||
},
|
||||
|
||||
refundConfirmed() {
|
||||
async refundConfirmed() {
|
||||
this.dialogRefund = false;
|
||||
this.loading = true;
|
||||
console.log("cashierOrder",this.cashierOrder)
|
||||
@ -565,18 +565,19 @@ import {getOilNumberGun} from "@/api/cashier/oilGuns";
|
||||
refundRemark:this.radio1 +"-"+ this.refundRemark,
|
||||
type: "canRefund"
|
||||
}
|
||||
refundApi(map).then(res=>{
|
||||
await refundApi(map).then(res=>{
|
||||
this.$message({
|
||||
type: 'info',
|
||||
message: '退款成功'
|
||||
});
|
||||
this.loading = false;
|
||||
|
||||
this.getList();
|
||||
this.getOrderStatistics();
|
||||
this.getStaffList();
|
||||
|
||||
})
|
||||
|
||||
this.loading = false;
|
||||
|
||||
this.getList();
|
||||
this.getOrderStatistics();
|
||||
this.getStaffList();
|
||||
|
||||
},
|
||||
// 获取油枪信息
|
||||
getOilGunList(){
|
||||
|
@ -110,7 +110,6 @@
|
||||
</div>
|
||||
<div class="table-box">
|
||||
<el-table
|
||||
v-loading="loadingRes"
|
||||
:data="list"
|
||||
style="width: 100%">
|
||||
<el-table-column type="expand">
|
||||
@ -493,7 +492,7 @@ export default {
|
||||
|
||||
},
|
||||
// 退款接口
|
||||
refundConfirmed() {
|
||||
async refundConfirmed() {
|
||||
this.dialogRefund = false;
|
||||
this.loadingRes = true;
|
||||
console.log("cashierOrder",this.goods)
|
||||
@ -503,19 +502,17 @@ export default {
|
||||
refundRemark:this.radio1 +"-"+ this.refundRemark,
|
||||
type: "canRefund"
|
||||
}
|
||||
refundApi(map).then(res=>{
|
||||
await refundApi(map).then(res=>{
|
||||
if (res.code === 200){
|
||||
this.$message({
|
||||
type: 'info',
|
||||
message: '退款成功'
|
||||
});
|
||||
this.loadingRes = false;
|
||||
|
||||
this.created()
|
||||
|
||||
}
|
||||
|
||||
})
|
||||
this.loadingRes = false;
|
||||
this.created()
|
||||
|
||||
},
|
||||
// 根据员工id查询员工信息
|
||||
queryStaf(list,id){
|
||||
|
@ -543,7 +543,7 @@
|
||||
|
||||
},
|
||||
|
||||
refundConfirmed() {
|
||||
async refundConfirmed() {
|
||||
this.dialogRefund = false;
|
||||
this.loading = true;
|
||||
console.log("cashierOrder",this.cashierOrder)
|
||||
@ -553,15 +553,16 @@
|
||||
refundRemark:this.radio1 +"-"+ this.refundRemark,
|
||||
type: "canRefund"
|
||||
}
|
||||
refundApi(map).then(res=>{
|
||||
await refundApi(map).then(res=>{
|
||||
this.$message({
|
||||
type: 'info',
|
||||
message: '退款成功'
|
||||
});
|
||||
|
||||
this.loading = false
|
||||
this.created()
|
||||
})
|
||||
this.loading = false
|
||||
// this.created()
|
||||
this.getList();
|
||||
|
||||
},
|
||||
// 根据员工id查询员工信息
|
||||
queryStaf(list,id){
|
||||
|
@ -496,7 +496,7 @@ import {getLodop} from "@/api/LodopFuncs";
|
||||
|
||||
|
||||
},
|
||||
refundConfirmed() {
|
||||
async refundConfirmed() {
|
||||
this.loading = true;
|
||||
|
||||
this.dialogRefund = false;
|
||||
@ -507,18 +507,20 @@ import {getLodop} from "@/api/LodopFuncs";
|
||||
refundRemark:this.radio1 +"-"+ this.refundRemark,
|
||||
type: "canRefund"
|
||||
}
|
||||
refundApi(map).then(res=>{
|
||||
this.loading = false;
|
||||
await refundApi(map).then(res=>{
|
||||
|
||||
this.$message({
|
||||
type: 'info',
|
||||
message: '退款成功'
|
||||
});
|
||||
this.getList();
|
||||
this.getOrderStatistics();
|
||||
this.getStaffList();
|
||||
|
||||
|
||||
})
|
||||
this.loading = false;
|
||||
|
||||
this.getList();
|
||||
this.getOrderStatistics();
|
||||
this.getStaffList();
|
||||
},
|
||||
|
||||
// 获取列表信息
|
||||
|
@ -158,8 +158,8 @@ export default {
|
||||
loginForm: {
|
||||
tel:null,
|
||||
telcode:null,
|
||||
username: "fuint",
|
||||
password: "123456",
|
||||
username: "",
|
||||
password: "",
|
||||
rememberMe: false,
|
||||
captchaCode: "",
|
||||
uuid: ""
|
||||
@ -301,7 +301,7 @@ export default {
|
||||
}).catch(() => {
|
||||
app.loading = false;
|
||||
if (app.captchaOnOff) {
|
||||
app.getCode();
|
||||
// app.getCode();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -401,7 +401,9 @@
|
||||
}
|
||||
})
|
||||
|
||||
if (uni.getStorageSync("appltType")== "WECHAT") {
|
||||
|
||||
console.log("appltType", uni.getStorageSync("appltType"))
|
||||
if (uni.getStorageSync("appltType") == "WECHAT") {
|
||||
// 判断当前登录的code是否相同
|
||||
wx.login({
|
||||
success(res) {
|
||||
@ -423,6 +425,30 @@
|
||||
}
|
||||
}
|
||||
})
|
||||
} else if (uni.getStorageSync("appltType") == "ALIPAY") {
|
||||
my.getAuthCode({
|
||||
scopes: 'auth_base',
|
||||
success: res => {
|
||||
const authCode = res.authCode;
|
||||
console.log(res)
|
||||
request({
|
||||
url: "clientApi/sign/alipayLogin/getUserid2",
|
||||
method: 'post',
|
||||
data: {
|
||||
authCode: authCode,
|
||||
storeId: uni.getStorageSync("storeId"),
|
||||
},
|
||||
}).then((resp) => {
|
||||
if (!res.data) {
|
||||
uni.removeStorageSync("App-Token");
|
||||
}
|
||||
|
||||
})
|
||||
},
|
||||
fail: err => {
|
||||
console.log('my.getAuthCode 调用失败', err)
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
},
|
||||
@ -484,7 +510,7 @@
|
||||
|
||||
},
|
||||
}).then((response) => {
|
||||
if (response.data.store){
|
||||
if (response.data.store) {
|
||||
_this.distance = (Math.ceil(response.data.distance))
|
||||
.toFixed(1)
|
||||
_this.store = response.data.store
|
||||
@ -507,18 +533,18 @@
|
||||
_this.list3.push(_this.baseUrl + item)
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
_this.lon = _this.store.longitude,
|
||||
_this.lat = _this.store.latitude,
|
||||
|
||||
_this.getIndexBanner()
|
||||
}else{
|
||||
_this.lat = _this.store.latitude,
|
||||
|
||||
_this.getIndexBanner()
|
||||
} else {
|
||||
uni.showToast({
|
||||
title:"当前店铺已关闭!!!",
|
||||
icon:"none"
|
||||
title: "当前店铺已关闭!!!",
|
||||
icon: "none"
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
})
|
||||
|
||||
// uni.showToast({
|
||||
@ -636,7 +662,7 @@
|
||||
uni.openLocation({
|
||||
latitude: lat,
|
||||
longitude: lon,
|
||||
|
||||
|
||||
success: function() {
|
||||
console.log('success');
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user