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