no message
This commit is contained in:
parent
149d4120ae
commit
f4f9ec07ff
@ -6,6 +6,7 @@
|
||||
"license": "MIT",
|
||||
"scripts": {
|
||||
"dev": "vue-cli-service serve",
|
||||
"后台": "vue-cli-service serve",
|
||||
"build:prod": "vue-cli-service build",
|
||||
"build:stage": "vue-cli-service build --mode staging",
|
||||
"preview": "node build/index.js --preview",
|
||||
|
@ -6,6 +6,7 @@
|
||||
"license": "MIT",
|
||||
"scripts": {
|
||||
"dev": "vue-cli-service serve",
|
||||
"中台": "vue-cli-service serve",
|
||||
"build:prod": "vue-cli-service build",
|
||||
"build:stage": "vue-cli-service build --mode staging",
|
||||
"preview": "node build/index.js --preview",
|
||||
|
@ -229,7 +229,7 @@ public class AllOrderInfoServiceImpl extends ServiceImpl<AllOrderInfoMapper,AllO
|
||||
}
|
||||
// 修改商户配置
|
||||
}else {
|
||||
throw new RuntimeException("退款失败");
|
||||
throw new RuntimeException("退款失败,请联系管理员");
|
||||
}
|
||||
|
||||
} catch (Exception e) {
|
||||
@ -255,7 +255,7 @@ public class AllOrderInfoServiceImpl extends ServiceImpl<AllOrderInfoMapper,AllO
|
||||
// 商户号
|
||||
map.put("mchntCd", merchantConfig.getMchntCd());
|
||||
// 生成退款id
|
||||
map.put("refundOrderNo",allOrderInfo.getOrderNo() + "_ref");
|
||||
map.put("refundOrderNo",allOrderInfo.getOrderNo() + "_rref");
|
||||
map.put("publicKey",merchantConfig.getPublicKey());
|
||||
map.put("privateKey",merchantConfig.getPrivateKey());
|
||||
return map;
|
||||
|
@ -87,5 +87,16 @@ public class ChainStoreInfoController extends BaseController {
|
||||
public ResponseObject delete(@RequestParam("idList") List<Long> idList) {
|
||||
return getSuccessResult(this.chainStoreInfoService.removeByIds(idList));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 判断token是否与当前连锁店id相同
|
||||
* @param idList
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("theJudgmentIsTheSame")
|
||||
public ResponseObject theJudgmentIsTheSame(Integer chainStoreId) {
|
||||
return getSuccessResult(this.chainStoreInfoService.theJudgmentIsTheSame(chainStoreId));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -13,5 +13,7 @@ import com.fuint.business.store.entity.ChainStoreInfo;
|
||||
*/
|
||||
public interface ChainStoreInfoService extends IService<ChainStoreInfo> {
|
||||
IPage<ChainStoreInfo> listVo(Page page, ChainStoreInfo chainStoreInfo);
|
||||
|
||||
boolean theJudgmentIsTheSame(Integer chainStoreId);
|
||||
}
|
||||
|
||||
|
@ -75,5 +75,17 @@ public class ChainStoreInfoServiceImpl extends ServiceImpl<ChainStoreInfoMapper,
|
||||
});
|
||||
return res;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean theJudgmentIsTheSame(Integer chainStoreId) {
|
||||
if (ObjectUtil.isEmpty(chainStoreId)) return false;
|
||||
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
||||
|
||||
System.out.println("nowAccount"+nowAccountInfo.toString());
|
||||
if (nowAccountInfo.getChainStoreId().equals(chainStoreId)) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -18,7 +18,7 @@ import org.springframework.beans.factory.annotation.Autowired;
|
||||
* @author caojing
|
||||
* @create 2020-04-28
|
||||
*/
|
||||
public class UserRealm extends AuthorizingRealm {
|
||||
public class UserRealm extends AuthorizingRealm {
|
||||
@Autowired
|
||||
TAccountMapper accountMapper;
|
||||
//doGetAuthorizationInfo: 权限认证,即登录过后,每个身份不一定,对应的所能看的页面也不一样。
|
||||
|
@ -153,6 +153,7 @@ public class ClientSignController extends BaseController {
|
||||
if (ObjectUtil.isNotEmpty(storeId) && storeId!= "") {
|
||||
accountInfo.setStoreId(Integer.parseInt(storeId));
|
||||
}
|
||||
accountInfo.setChainStoreId(ljStore.getChainStoreId());
|
||||
String token = TokenUtil.generateToken(userAgent, mtUser.getId());
|
||||
accountInfo.setToken(token);
|
||||
TokenUtil.saveAccountToken(accountInfo);
|
||||
|
@ -6,6 +6,7 @@
|
||||
"license": "MIT",
|
||||
"scripts": {
|
||||
"dev": "vue-cli-service serve",
|
||||
"收银台": "vue-cli-service serve",
|
||||
"build:prod": "vue-cli-service build",
|
||||
"build:stage": "vue-cli-service build --mode staging",
|
||||
"preview": "node build/index.js --preview",
|
||||
|
@ -10,7 +10,7 @@
|
||||
:autoplay="autoplay" :interval="interval" :duration="duration">
|
||||
<swiper-item v-for="(item,index) in list1" :key="index" @click="goPage(item.routeUrl)">
|
||||
<view class="swiper-item uni-bg-red">
|
||||
|
||||
|
||||
<image style="width: 100%;" :src="item.bannerUrl"></image>
|
||||
</view>
|
||||
<!-- <image style="width: 100%;" :src="getBannerUrl(item.bannerUrl)"></image> -->
|
||||
@ -136,7 +136,9 @@
|
||||
import tabbar from "../../components/tabbar/tabbar.vue"
|
||||
import config from '@/config'
|
||||
import request from '../../utils/request'
|
||||
import { callWithErrorHandling } from "vue"
|
||||
import {
|
||||
callWithErrorHandling
|
||||
} from "vue"
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
@ -182,7 +184,7 @@ import { callWithErrorHandling } from "vue"
|
||||
baseUrl: this.$baseUrl,
|
||||
}
|
||||
},
|
||||
onLoad(query) {
|
||||
async onLoad(query) {
|
||||
if (query.storeId) {
|
||||
// uni.setStorageSync("y_storeId", query.storeId)
|
||||
uni.setStorageSync("storeId", query.storeId)
|
||||
@ -217,8 +219,8 @@ import { callWithErrorHandling } from "vue"
|
||||
uni.setStorageSync("inviteStaffId", staffId)
|
||||
this.storeId = uni.getStorageSync("storeId")
|
||||
this.staffId = uni.getStorageSync("inviteStaffId")
|
||||
this.getUserAuthority();
|
||||
this.getOilType();
|
||||
await this.getUserAuthority();
|
||||
await this.getOilType();
|
||||
} else {
|
||||
if (uni.getStorageSync("storeId")) {
|
||||
this.storeId = uni.getStorageSync("storeId")
|
||||
@ -228,8 +230,9 @@ import { callWithErrorHandling } from "vue"
|
||||
uni.setStorageSync("storeId", storeId)
|
||||
}
|
||||
}
|
||||
this.getUserAuthority();
|
||||
this.getOilType();
|
||||
await this.getUserAuthority();
|
||||
await this.getOilType();
|
||||
await this.getTheJudgmentIsTheSame();
|
||||
},
|
||||
onShow() {
|
||||
this.isJoined()
|
||||
@ -240,11 +243,11 @@ import { callWithErrorHandling } from "vue"
|
||||
},
|
||||
methods: {
|
||||
// 返回图片路径
|
||||
getBannerUrl(url){
|
||||
getBannerUrl(url) {
|
||||
let imgurl = ""
|
||||
if (url.includes("http")){
|
||||
if (url.includes("http")) {
|
||||
imgurl = url
|
||||
}else {
|
||||
} else {
|
||||
imgurl = this.baseUrl + url
|
||||
}
|
||||
return imgurl;
|
||||
@ -264,10 +267,10 @@ import { callWithErrorHandling } from "vue"
|
||||
method: 'get',
|
||||
}).then(res => {
|
||||
_this.list1 = res.data
|
||||
for (let i = 0;i<res.data.length;i++){
|
||||
if (res.data[i].bannerUrl.includes("http")){
|
||||
for (let i = 0; i < res.data.length; i++) {
|
||||
if (res.data[i].bannerUrl.includes("http")) {
|
||||
_this.list1[i].bannerUrl = res.data[i].bannerUrl
|
||||
}else{
|
||||
} else {
|
||||
_this.list1[i].bannerUrl = _this.baseUrl + res.data[i].bannerUrl
|
||||
}
|
||||
}
|
||||
@ -373,6 +376,25 @@ import { callWithErrorHandling } from "vue"
|
||||
}
|
||||
})
|
||||
},
|
||||
// 判断token是否与当前连锁店id相同
|
||||
getTheJudgmentIsTheSame() {
|
||||
// 判断是否登录
|
||||
if (!this.AppToken) {
|
||||
return;
|
||||
}
|
||||
request({
|
||||
url: 'chainStoreInfo/theJudgmentIsTheSame',
|
||||
method: 'get',
|
||||
data: {
|
||||
"chainStoreId": uni.getStorageSync("chainStoreId")
|
||||
}
|
||||
}).then(res => {
|
||||
if (!res.data) {
|
||||
uni.removeStorageSync("App-Token");
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
// 获取门店信息
|
||||
getStore(id) {
|
||||
let _this = this;
|
||||
@ -402,7 +424,7 @@ import { callWithErrorHandling } from "vue"
|
||||
})
|
||||
}
|
||||
}).catch((res) => {
|
||||
|
||||
|
||||
})
|
||||
},
|
||||
// 获取当前位置
|
||||
@ -435,7 +457,7 @@ import { callWithErrorHandling } from "vue"
|
||||
_this.store = response.data.store
|
||||
uni.setStorageSync("storeId", response.data.store.id)
|
||||
uni.setStorageSync("chainStoreId", response.data.store.chainStoreId)
|
||||
// console.log(uni.getStorageSync("chainStoreId"));
|
||||
// console.log(uni.getStorageSync("chainStoreId"));
|
||||
let welfare = response.data.store.welfare
|
||||
if (welfare) {
|
||||
if (welfare.includes(",")) {
|
||||
@ -858,4 +880,4 @@ import { callWithErrorHandling } from "vue"
|
||||
color: white;
|
||||
margin: 0 auto;
|
||||
}
|
||||
</style>
|
||||
</style>
|
@ -8,8 +8,8 @@
|
||||
<view class="top-box">
|
||||
<view class="dis" style="width: 78%;">
|
||||
<view class="top-img">
|
||||
<image v-if="!store.logo" src="../../static/logo.png" mode="aspectFit"></image>
|
||||
<image v-else :src="baseUrl+store.logo" mode="aspectFit"></image>
|
||||
<image v-if="!store.logo" src="../../static/logo.png" mode="aspectFit"></image>
|
||||
<image v-else :src="baseUrl+store.logo" mode="aspectFit"></image>
|
||||
</view>
|
||||
<view style="width: 80%;">
|
||||
<view class="top-title">{{store.name}}{{store.description ? "("+store.description+")" : ""}}
|
||||
@ -48,9 +48,8 @@
|
||||
v-for="(item,index) in 8" :key="index">
|
||||
<text>{{index}}号枪</text>
|
||||
</view> -->
|
||||
<view class="box-oil" :class=" {'xz' :qindex == index }"
|
||||
v-for="(item,index) in oilGunList" :key="index"
|
||||
@click="getQIndex(index,item)">
|
||||
<view class="box-oil" :class=" {'xz' :qindex == index }" v-for="(item,index) in oilGunList"
|
||||
:key="index" @click="getQIndex(index,item)">
|
||||
<text>{{item.gunName}}</text>
|
||||
</view>
|
||||
</view>
|
||||
@ -96,9 +95,8 @@
|
||||
v-for="(item,index) in 19" :key="index">
|
||||
<text>{{index}}员工</text>
|
||||
</view> -->
|
||||
<view class="box-oil2" :class=" {'xz' :sindex == index }"
|
||||
v-for="(item,index) in staffList" :key="index"
|
||||
@click="getSIndex(index,item.id)">
|
||||
<view class="box-oil2" :class=" {'xz' :sindex == index }" v-for="(item,index) in staffList"
|
||||
:key="index" @click="getSIndex(index,item.id)">
|
||||
<text>{{item.realName}}</text>
|
||||
</view>
|
||||
</view>
|
||||
@ -119,9 +117,9 @@
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
appltType:uni.getStorageSync("appltType"),
|
||||
appltType: uni.getStorageSync("appltType"),
|
||||
value: '',
|
||||
liters:0,
|
||||
liters: 0,
|
||||
show: false,
|
||||
pic: 0,
|
||||
hindex: 0,
|
||||
@ -129,45 +127,47 @@
|
||||
aindex: null,
|
||||
sindex: null,
|
||||
// 店铺信息
|
||||
store:{
|
||||
name:"测试油站",
|
||||
description:"济南分店",
|
||||
address:"济南槐荫区"
|
||||
store: {
|
||||
name: "测试油站",
|
||||
description: "济南分店",
|
||||
address: "济南槐荫区"
|
||||
},
|
||||
// 店铺福利信息
|
||||
welfare:[],
|
||||
welfare: [],
|
||||
// 距离信息
|
||||
distance: "",
|
||||
// 当前店铺id
|
||||
storeId:"",
|
||||
storeId: "",
|
||||
// 油号列表信息
|
||||
oilNumberList:[],
|
||||
oilNumberList: [],
|
||||
// 油枪列表信息
|
||||
oilGunList:[],
|
||||
oilGunList: [],
|
||||
// 员工列表信息
|
||||
staffList: [],
|
||||
// 加油金额列表
|
||||
amountList:[100,200,300],
|
||||
amountList: [100, 200, 300],
|
||||
// url信息
|
||||
baseUrl: this.$baseUrl,
|
||||
// 油价
|
||||
oilPrice:0,
|
||||
oilPrice: 0,
|
||||
// 油品单位
|
||||
oilUnit:"",
|
||||
oilUnit: "",
|
||||
AppToken: uni.getStorageSync("App-Token"),
|
||||
|
||||
// 油品订单信息
|
||||
oilOrder:{
|
||||
storeId:"",
|
||||
couponId:"",
|
||||
commissionAmount:0,
|
||||
staffId:"",
|
||||
terminal:"applet",
|
||||
oils:"",
|
||||
oilGunNum:"",
|
||||
oilNum:"",
|
||||
orderAmount:0,
|
||||
discountAmount:0,
|
||||
payAmount:0,
|
||||
payType:uni.getStorageSync("appltType"),
|
||||
oilOrder: {
|
||||
storeId: "",
|
||||
couponId: "",
|
||||
commissionAmount: 0,
|
||||
staffId: "",
|
||||
terminal: "applet",
|
||||
oils: "",
|
||||
oilGunNum: "",
|
||||
oilNum: "",
|
||||
orderAmount: 0,
|
||||
discountAmount: 0,
|
||||
payAmount: 0,
|
||||
payType: uni.getStorageSync("appltType"),
|
||||
},
|
||||
}
|
||||
},
|
||||
@ -175,14 +175,14 @@
|
||||
tabbar
|
||||
},
|
||||
onLoad(query) {
|
||||
if (uni.getStorageSync("appltType") == "WECHAT"){
|
||||
if (uni.getStorageSync("appltType") == "WECHAT") {
|
||||
const q = decodeURIComponent(query.q) // 获取到二维码原始链接内容
|
||||
if (query.q) {
|
||||
let str = q.split("?")[1];
|
||||
let storeId = "19";
|
||||
|
||||
|
||||
let staffId = "";
|
||||
if (str.includes("&")){
|
||||
if (str.includes("&")) {
|
||||
let arr = str.split("&");
|
||||
arr.forEach(item => {
|
||||
if (item.includes("storeId")) {
|
||||
@ -191,7 +191,7 @@
|
||||
staffId = item.split("=")[1]
|
||||
}
|
||||
})
|
||||
}else{
|
||||
} else {
|
||||
storeId = str.split("=")[1]
|
||||
}
|
||||
uni.setStorageSync("storeId", storeId)
|
||||
@ -200,20 +200,21 @@
|
||||
this.staffId = uni.getStorageSync("inviteStaffId")
|
||||
this.getStore(uni.getStorageSync("storeId"));
|
||||
}
|
||||
}else{
|
||||
if (uni.getStorageSync("storeId")){
|
||||
} else {
|
||||
if (uni.getStorageSync("storeId")) {
|
||||
this.getStore(uni.getStorageSync("storeId"));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
},
|
||||
onShow() {
|
||||
// this.isExistStoreId();
|
||||
this.getStore(uni.getStorageSync("storeId"));
|
||||
// this.getStore(0);
|
||||
this.getTheJudgmentIsTheSame()
|
||||
|
||||
},
|
||||
methods: {
|
||||
// 打开数字键盘
|
||||
@ -221,15 +222,15 @@
|
||||
this.show = true
|
||||
this.$refs.popup1.open('bottom')
|
||||
},
|
||||
isExistStoreId(){
|
||||
if (uni.getStorageSync("storeId") != ""){
|
||||
isExistStoreId() {
|
||||
if (uni.getStorageSync("storeId") != "") {
|
||||
this.getStore(uni.getStorageSync("storeId"));
|
||||
}else{
|
||||
} else {
|
||||
this.getAddress();
|
||||
}
|
||||
},
|
||||
// 获取门店信息
|
||||
getStore(id){
|
||||
getStore(id) {
|
||||
// uni.showToast({
|
||||
// title:333
|
||||
// })
|
||||
@ -237,8 +238,10 @@
|
||||
request({
|
||||
url: "business/storeInformation/store/queryStoreById",
|
||||
method: 'post',
|
||||
data:{"storeId":id},
|
||||
}).then((res)=>{
|
||||
data: {
|
||||
"storeId": id
|
||||
},
|
||||
}).then((res) => {
|
||||
_this.getOilNumber(id);
|
||||
_this.getStaffList(id)
|
||||
_this.store = res.data
|
||||
@ -255,16 +258,16 @@
|
||||
}
|
||||
}).catch(err => {
|
||||
uni.showLoading({
|
||||
title:JSON.stringify(err)+222
|
||||
title: JSON.stringify(err) + 222
|
||||
})
|
||||
})
|
||||
},
|
||||
// 获取当前位置
|
||||
getAddress(){
|
||||
getAddress() {
|
||||
let _this = this;
|
||||
uni.getLocation({
|
||||
// 谷歌使用wgs84 其他使用gcj02
|
||||
type: 'gcj02', // 使用国测局坐标系
|
||||
type: 'gcj02', // 使用国测局坐标系
|
||||
success: function(res) {
|
||||
// console.log('经度: ' + res.longitude);
|
||||
// console.log('纬度: ' + res.latitude);
|
||||
@ -275,19 +278,19 @@
|
||||
"lon": res.longitude,
|
||||
"lat": res.latitude
|
||||
},
|
||||
}).then((response)=>{
|
||||
}).then((response) => {
|
||||
_this.distance = (response.data.distance).toFixed(1);
|
||||
_this.store = response.data.store;
|
||||
_this.storeId = response.data.store.id;
|
||||
_this.getOilNumber(_this.storeId);
|
||||
_this.getStaffList(_this.storeId)
|
||||
let welfare = response.data.store.welfare;
|
||||
if (welfare != undefined && welfare!=null && welfare!=""){
|
||||
if (welfare.includes(",")){
|
||||
_this.welfare = response.data.store.welfare.split(",");
|
||||
}else {
|
||||
_this.welfare.push(response.data.store.welfare);
|
||||
}
|
||||
if (welfare != undefined && welfare != null && welfare != "") {
|
||||
if (welfare.includes(",")) {
|
||||
_this.welfare = response.data.store.welfare.split(",");
|
||||
} else {
|
||||
_this.welfare.push(response.data.store.welfare);
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
@ -297,73 +300,73 @@
|
||||
});
|
||||
},
|
||||
// 获取当前店铺油号信息
|
||||
getOilNumber(storeId){
|
||||
getOilNumber(storeId) {
|
||||
let _this = this;
|
||||
request({
|
||||
// url: "business/petrolStationManagement/oilNumber/getOilNumberName/" + storeId,
|
||||
url: "business/petrolStationManagement/oilGun/selectByNumber/" + storeId,
|
||||
method: 'get',
|
||||
}).then((res)=>{
|
||||
}).then((res) => {
|
||||
_this.oilNumberList = res.data;
|
||||
if (res.data){
|
||||
if (res.data) {
|
||||
// _this.getOilGun(res.data[0].numberId);
|
||||
_this.oilPrice = res.data[0].oilPrice
|
||||
_this.oilUnit = res.data[0].unit
|
||||
_this.oilOrder.oils = res.data[0].oilNameId
|
||||
if (res.data[0].oilGunList){
|
||||
if (res.data[0].oilGunList) {
|
||||
_this.oilGunList = res.data[0].oilGunList
|
||||
_this.oilOrder.oilGunNum = res.data[0].oilGunList[0].id
|
||||
uni.setStorageSync("tankId",res.data[0].oilGunList[0].tankId)
|
||||
uni.setStorageSync("tankId", res.data[0].oilGunList[0].tankId)
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
// 获取当前店铺油号对应的油枪信息
|
||||
getOilGun(numberId){
|
||||
getOilGun(numberId) {
|
||||
let _this = this;
|
||||
request({
|
||||
url: "business/petrolStationManagement/oilGun/queryGunList/" + numberId,
|
||||
method: 'get',
|
||||
}).then((res)=>{
|
||||
}).then((res) => {
|
||||
_this.oilGunList = res.data
|
||||
_this.oilOrder.oilGunNum = res.data[0].id
|
||||
})
|
||||
},
|
||||
// 获取当前店铺员工信息列表
|
||||
getStaffList(storeId){
|
||||
getStaffList(storeId) {
|
||||
let _this = this;
|
||||
request({
|
||||
url: "business/member/staff/queryStaffList/" + storeId,
|
||||
method: 'get',
|
||||
}).then((res)=>{
|
||||
}).then((res) => {
|
||||
_this.staffList = res.data
|
||||
})
|
||||
},
|
||||
// 跳转订单详情页,并支付
|
||||
getSIndex(index,id) {
|
||||
getSIndex(index, id) {
|
||||
this.sindex = index
|
||||
// 校验油罐内油量是否足够
|
||||
request({
|
||||
url: "business/petrolStationManagement/oilTank/" + uni.getStorageSync('tankId'),
|
||||
method: 'get',
|
||||
}).then((res)=>{
|
||||
if (res.data.storedQuantity-this.liters<0){
|
||||
}).then((res) => {
|
||||
if (res.data.storedQuantity - this.liters < 0) {
|
||||
uni.showToast({
|
||||
title:"所加油的升数大于油罐内的升数,请重新选择加油升数",
|
||||
icon:"none"
|
||||
title: "所加油的升数大于油罐内的升数,请重新选择加油升数",
|
||||
icon: "none"
|
||||
})
|
||||
return;
|
||||
}else {
|
||||
} else {
|
||||
this.toPayment(id)
|
||||
}
|
||||
|
||||
|
||||
})
|
||||
},
|
||||
toPayment(id){
|
||||
toPayment(id) {
|
||||
this.oilOrder.orderAmount = this.value
|
||||
this.oilOrder.storeId = this.storeId
|
||||
this.oilOrder.staffId = id
|
||||
this.oilOrder.oilNum = (this.value/this.oilPrice).toFixed(2)
|
||||
this.oilOrder.oilNum = (this.value / this.oilPrice).toFixed(2)
|
||||
this.oilOrder.tankId = uni.getStorageSync("tankId")
|
||||
let _this = this;
|
||||
// 添加油品订单信息
|
||||
@ -371,20 +374,20 @@
|
||||
url: "business/oilOrder/addOilOrder",
|
||||
method: 'post',
|
||||
data: _this.oilOrder,
|
||||
}).then((res)=>{
|
||||
}).then((res) => {
|
||||
uni.navigateTo({
|
||||
url: '/pagesRefuel/orderDetail/index?orderNo=' + res.data,
|
||||
})
|
||||
})
|
||||
},
|
||||
// 选择加油金额
|
||||
getAIndex(index,amount) {
|
||||
this.value = amount+""
|
||||
getAIndex(index, amount) {
|
||||
this.value = amount + ""
|
||||
this.aindex = index
|
||||
this.liters = (amount/this.oilPrice).toFixed(2)
|
||||
this.liters = (amount / this.oilPrice).toFixed(2)
|
||||
},
|
||||
// 选择油品信息
|
||||
getHIndex(index,data) {
|
||||
getHIndex(index, data) {
|
||||
this.hindex = index
|
||||
// console.log(data)
|
||||
// this.getOilGun(data.numberId)
|
||||
@ -393,68 +396,68 @@
|
||||
this.oilPrice = data.oilPrice
|
||||
this.oilUnit = data.unit
|
||||
this.oilOrder.oils = data.oilNameId
|
||||
uni.setStorageSync("tankId",data.oilGunList[0].tankId)
|
||||
uni.setStorageSync("tankId", data.oilGunList[0].tankId)
|
||||
},
|
||||
// 选择油枪信息
|
||||
getQIndex(index,data) {
|
||||
getQIndex(index, data) {
|
||||
this.qindex = index
|
||||
this.oilOrder.oilGunNum = data.id
|
||||
uni.setStorageSync("tankId",data.tankId)
|
||||
uni.setStorageSync("tankId", data.tankId)
|
||||
},
|
||||
goRefuel() {
|
||||
uni.navigateTo({
|
||||
url: '/pagesRefuel/pagesRefuel/index'
|
||||
})
|
||||
},
|
||||
change(){
|
||||
change() {
|
||||
|
||||
},
|
||||
// 关闭弹窗
|
||||
closeStaff(){
|
||||
closeStaff() {
|
||||
this.$refs.popup.close()
|
||||
},
|
||||
// 数字键盘确定按钮
|
||||
submitAmount(){
|
||||
submitAmount() {
|
||||
// 校验油罐内油量是否足够
|
||||
request({
|
||||
url: "business/petrolStationManagement/oilTank/" + uni.getStorageSync('tankId'),
|
||||
method: 'get',
|
||||
}).then((res)=>{
|
||||
if (res.data.storedQuantity-this.liters<0){
|
||||
}).then((res) => {
|
||||
if (res.data.storedQuantity - this.liters < 0) {
|
||||
uni.showToast({
|
||||
title:"所加油的升数大于油罐内的升数,请重新选择加油升数",
|
||||
icon:"none"
|
||||
title: "所加油的升数大于油罐内的升数,请重新选择加油升数",
|
||||
icon: "none"
|
||||
})
|
||||
return;
|
||||
}else {
|
||||
if (this.value!="" && this.qindex!=null){
|
||||
} else {
|
||||
if (this.value != "" && this.qindex != null) {
|
||||
this.show = false
|
||||
if (uni.getStorageSync("inviteStaffId")){
|
||||
if (uni.getStorageSync("inviteStaffId")) {
|
||||
this.toPayment(uni.getStorageSync("inviteStaffId"))
|
||||
}else{
|
||||
} else {
|
||||
this.$refs.popup.open('bottom')
|
||||
}
|
||||
}else{
|
||||
if (this.value=="") {
|
||||
} else {
|
||||
if (this.value == "") {
|
||||
uni.showToast({
|
||||
title:"请输入加油金额",
|
||||
icon:"error"
|
||||
title: "请输入加油金额",
|
||||
icon: "error"
|
||||
})
|
||||
}else{
|
||||
} else {
|
||||
uni.showToast({
|
||||
title:"请选择油枪号",
|
||||
icon:"error"
|
||||
title: "请选择油枪号",
|
||||
icon: "error"
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
|
||||
|
||||
},
|
||||
changeVal(val) {
|
||||
this.value = val;
|
||||
this.liters = (this.value/this.oilPrice).toFixed(2)
|
||||
this.liters = (this.value / this.oilPrice).toFixed(2)
|
||||
},
|
||||
backspaceVal(val) {
|
||||
this.value = val;
|
||||
@ -463,38 +466,56 @@
|
||||
this.liters = 0
|
||||
} else {
|
||||
this.amount = val;
|
||||
this.liters = (this.value/this.oilPrice).toFixed(2)
|
||||
this.liters = (this.value / this.oilPrice).toFixed(2)
|
||||
}
|
||||
},
|
||||
valChange(val) {
|
||||
// 将每次按键的值拼接到value变量中,注意+=写法
|
||||
uni.vibrateShort({
|
||||
success: function () {}
|
||||
success: function() {}
|
||||
});
|
||||
let index = this.value.indexOf(".")
|
||||
if(index!=-1){
|
||||
if ((this.value.length-index)>=3){
|
||||
if (index != -1) {
|
||||
if ((this.value.length - index) >= 3) {
|
||||
return;
|
||||
}
|
||||
|
||||
}else{
|
||||
if (this.value.length>=7 && val!="."){
|
||||
|
||||
} else {
|
||||
if (this.value.length >= 7 && val != ".") {
|
||||
return;
|
||||
}
|
||||
}
|
||||
this.value += val;
|
||||
this.liters = (this.value/this.oilPrice).toFixed(2)
|
||||
this.liters = (this.value / this.oilPrice).toFixed(2)
|
||||
// console.log(this.value);
|
||||
},
|
||||
// 判断token是否与当前连锁店id相同
|
||||
getTheJudgmentIsTheSame() {
|
||||
// 判断是否登录
|
||||
if (!this.AppToken) {
|
||||
return;
|
||||
}
|
||||
request({
|
||||
url: 'chainStoreInfo/theJudgmentIsTheSame',
|
||||
method: 'get',
|
||||
data: {
|
||||
"chainStoreId": uni.getStorageSync("chainStoreId")
|
||||
}
|
||||
}).then(res => {
|
||||
if (!res.data) {
|
||||
uni.removeStorageSync("App-Token");
|
||||
}
|
||||
})
|
||||
},
|
||||
// 退格键被点击
|
||||
backspace() {
|
||||
uni.vibrateShort({
|
||||
success: function () {}
|
||||
success: function() {}
|
||||
});
|
||||
// 删除value的最后一个字符
|
||||
if (this.value.length) {
|
||||
this.value = this.value.substr(0, this.value.length - 1);
|
||||
this.liters = (this.value/this.oilPrice).toFixed(2)
|
||||
this.liters = (this.value / this.oilPrice).toFixed(2)
|
||||
}
|
||||
// console.log(this.value);
|
||||
}
|
||||
@ -616,6 +637,7 @@
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.wrap-box1 {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
@ -636,6 +658,7 @@
|
||||
padding: 12px 0px;
|
||||
border-radius: 6px;
|
||||
}
|
||||
|
||||
.box-oil1 {
|
||||
width: 29%;
|
||||
display: flex;
|
||||
@ -648,6 +671,7 @@
|
||||
padding: 12px 0px;
|
||||
border-radius: 6px;
|
||||
}
|
||||
|
||||
.box-oil2 {
|
||||
width: 28%;
|
||||
height: 25px;
|
||||
@ -712,4 +736,4 @@
|
||||
text-align: right;
|
||||
color: #999999;
|
||||
}
|
||||
</style>
|
||||
</style>
|
@ -152,9 +152,9 @@
|
||||
encryptedIv: e.detail.iv,
|
||||
encryptedData: e.detail.encryptedData,
|
||||
userInfo: {
|
||||
storeId: 12,
|
||||
storeId: uni.getStorageSync("storeId"),
|
||||
staffId: "",
|
||||
phone: '16548796325'
|
||||
// phone: '16548796325'
|
||||
},
|
||||
|
||||
type: 'phone',
|
||||
|
Loading…
Reference in New Issue
Block a user