9.28
This commit is contained in:
parent
6946ba6a15
commit
fb5ec3d55f
@ -394,9 +394,32 @@
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
goFleet() {
|
goFleet() {
|
||||||
uni.navigateTo({
|
let flag = this.getFleetInfo()
|
||||||
url: '/pagesMy/fleetInfo/index'
|
if (!flag) {
|
||||||
|
uni.navigateTo({
|
||||||
|
url: '/pagesMy/fleetInfo/index'
|
||||||
|
})
|
||||||
|
}else{
|
||||||
|
uni.navigateTo({
|
||||||
|
url: '/pagesHome/MyCard/MyCard'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// 查看是否为车队管理员
|
||||||
|
getFleetInfo() {
|
||||||
|
if (!this.AppToken) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
let flag = false
|
||||||
|
request({
|
||||||
|
url: '/fleetInfo/ifFleetAdmin',
|
||||||
|
method: 'get',
|
||||||
|
}).then(res => {
|
||||||
|
if (res.data == 1) {
|
||||||
|
flag = true
|
||||||
|
}
|
||||||
})
|
})
|
||||||
|
return flag
|
||||||
},
|
},
|
||||||
goFeedback() {
|
goFeedback() {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
|
@ -1,11 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="content">
|
<view class="content">
|
||||||
<view class="container">
|
<view class="container">
|
||||||
<!-- <view class="my-header">
|
|
||||||
<view class="my-text">一键加油</view>
|
|
||||||
</view> -->
|
|
||||||
<view class="top">
|
<view class="top">
|
||||||
|
|
||||||
<view class="dis">
|
<view class="dis">
|
||||||
<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>
|
||||||
@ -23,25 +19,27 @@
|
|||||||
选择油品油枪
|
选择油品油枪
|
||||||
</view>
|
</view>
|
||||||
<view class="input_kuang">
|
<view class="input_kuang">
|
||||||
<view class="leftIput" @click="selectShow = true">汽油92#1号枪</view>
|
<view class="leftIput" @click="selectShow = true">{{oilTypeName || '--'}}{{oilGunName || '--'}}
|
||||||
<view class="rr_box" @click="Selectemployees = true">小王</view>
|
</view>
|
||||||
|
<view class="rr_box" @click="Selectemployees = true">{{staffName || '--'}}</view>
|
||||||
</view>
|
</view>
|
||||||
<view style="display: flex;justify-content: space-between;">
|
<view style="display: flex;justify-content: space-between;">
|
||||||
<view class="title_">
|
<view class="title_">
|
||||||
加油金额
|
加油金额
|
||||||
</view>
|
</view>
|
||||||
<view class="sm_r-zie" style="font-weight: bold;">7.26元/L</view>
|
<view class="sm_r-zie" style="font-weight: bold;">{{oilPrice || 0}}元/{{oilUnit || 'L'}}</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="input_kuang">
|
<view class="input_kuang">
|
||||||
<view class="leftIput">¥<input style="width: 100%;" type="text" placeholder="请输入金额" />
|
<view class="leftIput">
|
||||||
|
¥<input style="width: 100%;" v-model="oilOrder.amount" type="text" placeholder="请输入金额" />
|
||||||
</view>
|
</view>
|
||||||
<view class="rr_box">36.55L</view>
|
<view class="rr_box">{{oilOrder.oilNum}}L</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="title_">
|
<view class="title_">
|
||||||
付款备注
|
付款备注
|
||||||
</view>
|
</view>
|
||||||
<view class="input_kuang">
|
<view class="input_kuang">
|
||||||
<input type="text" placeholder="备注" style="margin-left: 10px;" />
|
<input type="text" placeholder="备注" v-model="oilOrder.remark" style="margin-left: 10px;" />
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="b_"></view>
|
<view class="b_"></view>
|
||||||
@ -63,12 +61,6 @@
|
|||||||
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<!-- <view style="display: flex;align-items: center;">
|
|
||||||
<view class="anxuan">
|
|
||||||
<view class="dian"></view>
|
|
||||||
</view>
|
|
||||||
<u-icon name="arrow-right"></u-icon>
|
|
||||||
</view> -->
|
|
||||||
<view class="anxuan">
|
<view class="anxuan">
|
||||||
<view class="dian"></view>
|
<view class="dian"></view>
|
||||||
</view>
|
</view>
|
||||||
@ -123,82 +115,6 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<!--
|
|
||||||
<view v-if="appltType == 'ALIPAY'">
|
|
||||||
<view class="fa-box">
|
|
||||||
<view class="fa-title">选择油号 <text class="top-hui"> 请务必与员工确认类型</text> </view>
|
|
||||||
<view class="wrap-box">
|
|
||||||
<view class="box-oil" v-for="(item,index) in oilNumberList" :key="index"
|
|
||||||
:class=" {'xz' :hindex == index }" @click="getHIndex(index,item)">
|
|
||||||
<text>{{item.oilName}}</text>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<view class="fa-box">
|
|
||||||
<view class="fa-title">选择油枪 <text class="top-hui"> 请务必与员工确认枪号</text> </view>
|
|
||||||
<view class="wrap-box">
|
|
||||||
<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>
|
|
||||||
</view>
|
|
||||||
<view class="fa-box">
|
|
||||||
<view class="fa-title">请输入加油金额</view>
|
|
||||||
<view class="inputkuang" @click="openKey">
|
|
||||||
<view class="sbox">¥</view>
|
|
||||||
<view class="sbox" style="text-align: center;font-weight: bold;">{{value}}</view>
|
|
||||||
<view class="sbox-hui">约{{liters}}L</view>
|
|
||||||
</view>
|
|
||||||
<view class="wrap-box">
|
|
||||||
<view class="box-oil1" :class=" {'xz' :aindex == index }" @click="getAIndex(index,item)"
|
|
||||||
v-for="(item,index) in amountList" :key="index">
|
|
||||||
<text>¥{{item}}</text>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<view class="anniu" @click="submitAmount">
|
|
||||||
<text>立即加油</text>
|
|
||||||
</view>
|
|
||||||
</view> -->
|
|
||||||
|
|
||||||
<!-- <view v-if="appltType == 'WECHAT'">
|
|
||||||
<view class="fa-box">
|
|
||||||
<view class="fa-title">选择油号 <text class="top-hui"> 请务必与员工确认类型</text> </view>
|
|
||||||
<view class="wrap-box">
|
|
||||||
<view class="box-oil" v-for="(item,index) in oilNumberList" :key="index"
|
|
||||||
:class=" {'xz' :hindex == index }" @click="getHIndex(index,item)">
|
|
||||||
<text>{{item.oilName}}</text>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<view class="fa-box">
|
|
||||||
<view class="fa-title">选择油枪 <text class="top-hui"> 请务必与员工确认枪号</text> </view>
|
|
||||||
<view class="wrap-box">
|
|
||||||
<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>
|
|
||||||
</view>
|
|
||||||
<view class="fa-box">
|
|
||||||
<view class="fa-title">请输入加油金额</view>
|
|
||||||
<view class="inputkuang" @click="openKey">
|
|
||||||
<view class="sbox">¥</view>
|
|
||||||
<view class="sbox" style="text-align: center;font-weight: bold;">{{value}}</view>
|
|
||||||
<view class="sbox-hui">约{{liters}}L</view>
|
|
||||||
</view>
|
|
||||||
<view class="wrap-box">
|
|
||||||
<view class="box-oil1" :class=" {'xz' :aindex == index }" @click="getAIndex(index,item)"
|
|
||||||
v-for="(item,index) in amountList" :key="index">
|
|
||||||
<text>¥{{item}}</text>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<view class="anniu" @click="submitAmount">
|
|
||||||
<text>立即加油</text>
|
|
||||||
</view>
|
|
||||||
</view> -->
|
|
||||||
<view style="width: 100%; height: 60px; "></view>
|
<view style="width: 100%; height: 60px; "></view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
@ -298,8 +214,8 @@
|
|||||||
<view class="popup-box">
|
<view class="popup-box">
|
||||||
<view class="p_title">选择员工</view>
|
<view class="p_title">选择员工</view>
|
||||||
<view class="wr_box">
|
<view class="wr_box">
|
||||||
<view class="xanniu" :class="{'acvit' : anIndex == index }" v-for="(item,index) in staffList"
|
<view class="xanniu" :class="{'acvit' : anIndex == index }"
|
||||||
:key="index" @click="setadindex(index)">
|
v-for="(item,index) in staffList" :key="index" @click="setadindex(index,item)">
|
||||||
|
|
||||||
<view class="">{{item.realName}}</view>
|
<view class="">{{item.realName}}</view>
|
||||||
</view>
|
</view>
|
||||||
@ -318,7 +234,7 @@
|
|||||||
</scroll-view>
|
</scroll-view>
|
||||||
<view class="wr_box">
|
<view class="wr_box">
|
||||||
<view class="xanniu" :class="{'acvit' : anIndex == index }"
|
<view class="xanniu" :class="{'acvit' : anIndex == index }"
|
||||||
v-for="(item,index) in oilGunList" :key="index" @click="setadindex(index)">
|
v-for="(item,index) in oilGunList" :key="index" @click="setQhindex(index,item)">
|
||||||
<view class="">{{item.gunName}}</view>
|
<view class="">{{item.gunName}}</view>
|
||||||
<view class="">{{item.oilName}}</view>
|
<view class="">{{item.oilName}}</view>
|
||||||
</view>
|
</view>
|
||||||
@ -442,10 +358,6 @@
|
|||||||
description: "济南分店",
|
description: "济南分店",
|
||||||
address: "济南槐荫区"
|
address: "济南槐荫区"
|
||||||
},
|
},
|
||||||
// 店铺福利信息
|
|
||||||
welfare: [],
|
|
||||||
// 距离信息
|
|
||||||
distance: "",
|
|
||||||
// 当前店铺id
|
// 当前店铺id
|
||||||
storeId: "",
|
storeId: "",
|
||||||
// 油号列表信息
|
// 油号列表信息
|
||||||
@ -464,6 +376,12 @@
|
|||||||
oilUnit: "",
|
oilUnit: "",
|
||||||
AppToken: uni.getStorageSync("App-Token"),
|
AppToken: uni.getStorageSync("App-Token"),
|
||||||
|
|
||||||
|
// 选择的油品类型信息
|
||||||
|
oilTypeName: '',
|
||||||
|
// 选择的油枪信息
|
||||||
|
oilGunName: '',
|
||||||
|
// 店员名称
|
||||||
|
staffName: '',
|
||||||
// 油品订单信息
|
// 油品订单信息
|
||||||
oilOrder: {
|
oilOrder: {
|
||||||
storeId: "",
|
storeId: "",
|
||||||
@ -479,6 +397,8 @@
|
|||||||
payAmount: 0,
|
payAmount: 0,
|
||||||
payType: uni.getStorageSync("appltType"),
|
payType: uni.getStorageSync("appltType"),
|
||||||
},
|
},
|
||||||
|
// 优惠券列表
|
||||||
|
couponList: []
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
components: {
|
components: {
|
||||||
@ -519,14 +439,12 @@
|
|||||||
this.staffId = uni.getStorageSync("inviteStaffId")
|
this.staffId = uni.getStorageSync("inviteStaffId")
|
||||||
if (uni.getStorageSync("storeId")) {
|
if (uni.getStorageSync("storeId")) {
|
||||||
this.getStore(uni.getStorageSync("storeId"));
|
this.getStore(uni.getStorageSync("storeId"));
|
||||||
this.getStaffList(uni.getStorageSync("storeId"));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (uni.getStorageSync("storeId")) {
|
if (uni.getStorageSync("storeId")) {
|
||||||
this.getStore(uni.getStorageSync("storeId"));
|
this.getStore(uni.getStorageSync("storeId"));
|
||||||
this.getStaffList(uni.getStorageSync("storeId"));
|
|
||||||
} else {
|
} else {
|
||||||
this.getStoreIdBySn(uni.getStorageSync("sn"));
|
this.getStoreIdBySn(uni.getStorageSync("sn"));
|
||||||
}
|
}
|
||||||
@ -538,21 +456,31 @@
|
|||||||
this.staffId = query.staffId
|
this.staffId = query.staffId
|
||||||
this.storeId = query.storeId
|
this.storeId = query.storeId
|
||||||
this.getStore(uni.getStorageSync("storeId"));
|
this.getStore(uni.getStorageSync("storeId"));
|
||||||
this.getStaffList(uni.getStorageSync("storeId"));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
onShow() {
|
onShow() {
|
||||||
// this.isExistStoreId();
|
|
||||||
this.getStore(uni.getStorageSync("storeId"));
|
this.getStore(uni.getStorageSync("storeId"));
|
||||||
// this.getStaffList(uni.getStorageSync("storeId"));
|
|
||||||
// this.getStoreIdBySn("byx19509291");
|
|
||||||
// this.getStore(0);
|
|
||||||
this.getTheJudgmentIsTheSame()
|
this.getTheJudgmentIsTheSame()
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
|
getCouponList() {
|
||||||
|
request({
|
||||||
|
url: "pay/paycenter/getCoupon",
|
||||||
|
method: 'post',
|
||||||
|
data: {
|
||||||
|
userId: uni.getStorageSync('userId'),
|
||||||
|
oilId: this.oilOrder.oils,
|
||||||
|
oilAmount: this.oilOrder.amount,
|
||||||
|
oilLiter: this.oilOrder.oilNum,
|
||||||
|
payWay: this.oilOrder.payType,
|
||||||
|
},
|
||||||
|
}).then((res) => {
|
||||||
|
|
||||||
|
}).catch(err => {})
|
||||||
|
},
|
||||||
Couponclose() {
|
Couponclose() {
|
||||||
this.selectCoupon = false
|
this.selectCoupon = false
|
||||||
},
|
},
|
||||||
@ -571,14 +499,26 @@
|
|||||||
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)
|
||||||
|
this.oilGunName = data.oilGunList[0].gunName
|
||||||
}
|
}
|
||||||
|
|
||||||
|
this.oilTypeName = data.oilType + data.oilName
|
||||||
},
|
},
|
||||||
ypClose() {
|
ypClose() {
|
||||||
this.selectShow = false
|
this.selectShow = false
|
||||||
},
|
},
|
||||||
setadindex(index) {
|
setadindex(index, data) {
|
||||||
this.anIndex = index
|
this.anIndex = index
|
||||||
this.Selectemployees = false
|
this.Selectemployees = false
|
||||||
|
this.oilOrder.staffId = data.id
|
||||||
|
this.staffName = data.realName
|
||||||
|
},
|
||||||
|
setQhindex(index, data) {
|
||||||
|
this.qhindex = index
|
||||||
|
this.selectShow = false
|
||||||
|
this.oilOrder.oilGunNum = data.id
|
||||||
|
uni.setStorageSync("tankId", data.tankId)
|
||||||
|
this.oilGunName = data.gunName
|
||||||
},
|
},
|
||||||
|
|
||||||
Confirmclose() {
|
Confirmclose() {
|
||||||
@ -587,16 +527,10 @@
|
|||||||
goPayment() {
|
goPayment() {
|
||||||
// 判断一下按照什么方式支付的
|
// 判断一下按照什么方式支付的
|
||||||
this.ConfirmPayment = true
|
this.ConfirmPayment = true
|
||||||
},
|
|
||||||
open() {
|
|
||||||
|
|
||||||
},
|
},
|
||||||
Selectclose() {
|
Selectclose() {
|
||||||
this.Selectemployees = false
|
this.Selectemployees = false
|
||||||
},
|
},
|
||||||
closePayment() {
|
|
||||||
this.ConfirmPayment = false
|
|
||||||
},
|
|
||||||
close() {
|
close() {
|
||||||
this.PaymentDetails = false
|
this.PaymentDetails = false
|
||||||
},
|
},
|
||||||
@ -642,50 +576,13 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
}).catch(err => {})
|
}).catch(err => {})
|
||||||
|
|
||||||
// uni.showToast({
|
|
||||||
// title: "获取位置信息成功",
|
|
||||||
// icon: "none"
|
|
||||||
// })
|
|
||||||
},
|
},
|
||||||
fail: function(err) {
|
fail: function(err) {
|
||||||
_this.getStore(2);
|
_this.getStore(2);
|
||||||
// uni.showToast({
|
|
||||||
// title: "获取位置信息失败"
|
|
||||||
// })
|
|
||||||
console.log('获取位置信息失败: ' + err.errMsg);
|
console.log('获取位置信息失败: ' + err.errMsg);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
// 获取定位信息
|
|
||||||
getUserAuthority() {
|
|
||||||
let _this = this;
|
|
||||||
// this.getAddress();
|
|
||||||
uni.getSetting({
|
|
||||||
async success(res) {
|
|
||||||
if (!res.authSetting['scope.userLocation']) {
|
|
||||||
// uni.authorize({
|
|
||||||
// scope: 'scope.userLocation',
|
|
||||||
// success() {
|
|
||||||
// // 用户同意获取位置信息
|
|
||||||
// // _this.isExistStoreId()
|
|
||||||
// },
|
|
||||||
// fail() {
|
|
||||||
// // 用户拒绝
|
|
||||||
// }
|
|
||||||
// })
|
|
||||||
await _this.getAddress(uni.getStorageSync("storeId"));
|
|
||||||
} else {
|
|
||||||
// 用户同意获取位置信息
|
|
||||||
// _this.isExistStoreId()
|
|
||||||
await _this.getAddress(uni.getStorageSync("storeId"));
|
|
||||||
}
|
|
||||||
},
|
|
||||||
fail(err) {
|
|
||||||
|
|
||||||
}
|
|
||||||
})
|
|
||||||
},
|
|
||||||
// 通过sn获取storeId
|
// 通过sn获取storeId
|
||||||
getStoreIdBySn(sn) {
|
getStoreIdBySn(sn) {
|
||||||
request({
|
request({
|
||||||
@ -700,24 +597,8 @@
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
// 打开数字键盘
|
|
||||||
openKey() {
|
|
||||||
this.show = true
|
|
||||||
this.$refs.popup1.open('bottom')
|
|
||||||
},
|
|
||||||
isExistStoreId() {
|
|
||||||
if (uni.getStorageSync("storeId") != "") {
|
|
||||||
this.getStore(uni.getStorageSync("storeId"));
|
|
||||||
this.getStaffList(uni.getStorageSync("storeId"));
|
|
||||||
} else {
|
|
||||||
this.getAddress();
|
|
||||||
}
|
|
||||||
},
|
|
||||||
// 获取门店信息
|
// 获取门店信息
|
||||||
getStore(id) {
|
getStore(id) {
|
||||||
// uni.showToast({
|
|
||||||
// title:333
|
|
||||||
// })
|
|
||||||
if (!id) {
|
if (!id) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -735,56 +616,7 @@
|
|||||||
_this.storeId = res.data.id;
|
_this.storeId = res.data.id;
|
||||||
uni.setStorageSync("storeId", _this.store.id)
|
uni.setStorageSync("storeId", _this.store.id)
|
||||||
uni.setStorageSync("chainStoreId", _this.store.chainStoreId)
|
uni.setStorageSync("chainStoreId", _this.store.chainStoreId)
|
||||||
// let welfare = res.data.welfare
|
}).catch(err => {})
|
||||||
// if (welfare) {
|
|
||||||
// if (welfare.includes(",")) {
|
|
||||||
// _this.welfare = res.data.welfare.split(",")
|
|
||||||
// } else {
|
|
||||||
// _this.welfare.push(res.data.welfare)
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
console.log(res, 738);
|
|
||||||
}).catch(err => {
|
|
||||||
// uni.showLoading({
|
|
||||||
// title: JSON.stringify(err) + 222
|
|
||||||
// })
|
|
||||||
})
|
|
||||||
},
|
|
||||||
// 获取当前位置
|
|
||||||
getAddress1() {
|
|
||||||
let _this = this;
|
|
||||||
uni.getLocation({
|
|
||||||
// 谷歌使用wgs84 其他使用gcj02
|
|
||||||
type: 'gcj02', // 使用国测局坐标系
|
|
||||||
success: function(res) {
|
|
||||||
// console.log('经度: ' + res.longitude);
|
|
||||||
// console.log('纬度: ' + res.latitude);
|
|
||||||
request({
|
|
||||||
url: "business/storeInformation/store/recentlyStore",
|
|
||||||
method: 'post',
|
|
||||||
data: {
|
|
||||||
"lon": res.longitude,
|
|
||||||
"lat": res.latitude
|
|
||||||
},
|
|
||||||
}).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)
|
|
||||||
if (response.data.store.welfare) {
|
|
||||||
if (response.data.store.welfare.includes(",")) {
|
|
||||||
_this.welfare = response.data.store.welfare.split(",");
|
|
||||||
} else {
|
|
||||||
_this.welfare.push(response.data.store.welfare);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
})
|
|
||||||
},
|
|
||||||
fail: function(err) {
|
|
||||||
_this.getStore(0);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
},
|
||||||
// 获取当前店铺油号信息
|
// 获取当前店铺油号信息
|
||||||
getOilNumber(storeId) {
|
getOilNumber(storeId) {
|
||||||
@ -800,13 +632,14 @@
|
|||||||
_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
|
||||||
|
_this.oilTypeName = res.data[0].oilType + res.data[0].oilName
|
||||||
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)
|
||||||
|
_this.oilGunName = res.data[0].oilGunList[0].gunName
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
console.log(res, 801);
|
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
// 获取当前店铺油号对应的油枪信息
|
// 获取当前店铺油号对应的油枪信息
|
||||||
@ -831,6 +664,10 @@
|
|||||||
method: 'get',
|
method: 'get',
|
||||||
}).then((res) => {
|
}).then((res) => {
|
||||||
_this.staffList = res.data
|
_this.staffList = res.data
|
||||||
|
if (res.data && res.data.length > 0) {
|
||||||
|
_this.oilOrder.staffId = res.data[0].id
|
||||||
|
_this.staffName = res.data[0].realName
|
||||||
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
// 跳转订单详情页,并支付
|
// 跳转订单详情页,并支付
|
||||||
@ -853,6 +690,7 @@
|
|||||||
|
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
// 去支付(之前的)
|
||||||
toPayment(id) {
|
toPayment(id) {
|
||||||
this.oilOrder.orderAmount = this.value
|
this.oilOrder.orderAmount = this.value
|
||||||
this.oilOrder.storeId = this.storeId
|
this.oilOrder.storeId = this.storeId
|
||||||
@ -896,18 +734,6 @@
|
|||||||
this.oilOrder.oilGunNum = data.id
|
this.oilOrder.oilGunNum = data.id
|
||||||
uni.setStorageSync("tankId", data.tankId)
|
uni.setStorageSync("tankId", data.tankId)
|
||||||
},
|
},
|
||||||
goRefuel() {
|
|
||||||
uni.navigateTo({
|
|
||||||
url: '/pagesRefuel/pagesRefuel/index'
|
|
||||||
})
|
|
||||||
},
|
|
||||||
change() {
|
|
||||||
|
|
||||||
},
|
|
||||||
// 关闭弹窗
|
|
||||||
closeStaff() {
|
|
||||||
this.$refs.popup.close()
|
|
||||||
},
|
|
||||||
// 数字键盘确定按钮
|
// 数字键盘确定按钮
|
||||||
submitAmount() {
|
submitAmount() {
|
||||||
// 校验油罐内油量是否足够
|
// 校验油罐内油量是否足够
|
||||||
@ -962,32 +788,8 @@
|
|||||||
this.liters = (this.value / this.oilPrice).toFixed(2)
|
this.liters = (this.value / this.oilPrice).toFixed(2)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
valChange(val) {
|
|
||||||
// 将每次按键的值拼接到value变量中,注意+=写法
|
|
||||||
uni.vibrateShort({
|
|
||||||
success: function() {}
|
|
||||||
});
|
|
||||||
let index = this.value.indexOf(".")
|
|
||||||
if (index != -1) {
|
|
||||||
if ((this.value.length - index) >= 3) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
} else {
|
|
||||||
if (this.value.length >= 7 && val != ".") {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
this.value += val;
|
|
||||||
this.liters = (this.value / this.oilPrice).toFixed(2)
|
|
||||||
// console.log(this.value);
|
|
||||||
},
|
|
||||||
// 判断token是否与当前连锁店id相同
|
// 判断token是否与当前连锁店id相同
|
||||||
async getTheJudgmentIsTheSame() {
|
async getTheJudgmentIsTheSame() {
|
||||||
// 判断是否登录
|
|
||||||
// if (!this.AppToken) {
|
|
||||||
// return;
|
|
||||||
// }
|
|
||||||
if (this.AppToken) {
|
if (this.AppToken) {
|
||||||
await request({
|
await request({
|
||||||
url: 'chainStoreInfo/theJudgmentIsTheSame',
|
url: 'chainStoreInfo/theJudgmentIsTheSame',
|
||||||
@ -1054,18 +856,6 @@
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// 退格键被点击
|
|
||||||
backspace() {
|
|
||||||
uni.vibrateShort({
|
|
||||||
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)
|
|
||||||
}
|
|
||||||
// console.log(this.value);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -15,20 +15,23 @@
|
|||||||
<u-empty text="您当前没有订单~" style="margin-top: 25px;" v-if="orderList.length == 0"
|
<u-empty text="您当前没有订单~" style="margin-top: 25px;" v-if="orderList.length == 0"
|
||||||
icon="http://47.94.122.58:83/queshengye.png">
|
icon="http://47.94.122.58:83/queshengye.png">
|
||||||
</u-empty>
|
</u-empty>
|
||||||
<view class="box_f" @click="goDetails()">
|
<view class="box_f" v-for="(item,index) in orderList" :key="index" @click="goDetails(item.id)">
|
||||||
<view class="box_top">
|
<view class="box_top">
|
||||||
<view class="">订单号:xxxxxxxxxxxxxxxxxxxx</view>
|
<view class="">订单号:{{item.orderNumber}}</view>
|
||||||
<view class="">未使用</view>
|
<view class="">{{item.orderStatus}}</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="box_cont">
|
<view class="box_cont">
|
||||||
<view class="">
|
<view class="">
|
||||||
<image src="../../static/logo.png" style="width: 60px; height: 60px; "></image>
|
<image src="../../static/logo.png" style="width: 60px; height: 60px; "></image>
|
||||||
</view>
|
</view>
|
||||||
<view class="r-bas">
|
<view class="r-bas">
|
||||||
<view style="font-size: 16px;color: #333333;">虚拟产品</view>
|
<view style="font-size: 16px;color: #333333;">{{item.giftName}}</view>
|
||||||
<view class="">x1</view>
|
<view class="">x{{item.exchangeQuantity || 0}}</view>
|
||||||
<view class="b-bs">
|
<view class="b-bs">
|
||||||
<view class="size1">实付: <text style="color: #E02020;">100积分</text> </view>
|
<view class="size1">
|
||||||
|
实付: <text style="color: #E02020;">{{item.integral}}积分</text>
|
||||||
|
<text style="color: #E02020;" v-if="item.amount">+{{item.amount}}元</text>
|
||||||
|
</view>
|
||||||
<view class="anniu">立即使用</view>
|
<view class="anniu">立即使用</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@ -105,12 +108,12 @@
|
|||||||
|
|
||||||
},
|
},
|
||||||
onShow() {
|
onShow() {
|
||||||
// this.getIntegralOrderList()
|
this.getIntegralOrderList()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
goDetails() {
|
goDetails(id) {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: '/pagesHome/myPointsOrder/details'
|
url: '/pagesHome/myPointsOrder/details?orderId='+id
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
getindex(index) {
|
getindex(index) {
|
||||||
@ -144,6 +147,7 @@
|
|||||||
}).then((res) => {
|
}).then((res) => {
|
||||||
if (res.code == 200) {
|
if (res.code == 200) {
|
||||||
this.orderList = res.data.records
|
this.orderList = res.data.records
|
||||||
|
console.log(res, 147);
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
@ -360,4 +364,4 @@
|
|||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
border-radius: 50px;
|
border-radius: 50px;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
@ -4,42 +4,43 @@
|
|||||||
<view class="box-hang">
|
<view class="box-hang">
|
||||||
<view class="">副卡额度</view>
|
<view class="">副卡额度</view>
|
||||||
<view class="dis">
|
<view class="dis">
|
||||||
<input v-model="value" style="text-align: right;"></input>
|
{{memberInfo.secondaryCardLimit || 0}}
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="box-hang">
|
<view class="box-hang">
|
||||||
<view class="">已用额度</view>
|
<view class="">已用额度</view>
|
||||||
<view class="dis">
|
<view class="dis">
|
||||||
<input v-model="value" style="text-align: right;"></input>
|
{{memberInfo.usedCreditLimit}}
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="box-hang">
|
<view class="box-hang">
|
||||||
<view class="">剩余额度</view>
|
<view class="">剩余额度</view>
|
||||||
<view class="dis">
|
<view class="dis">
|
||||||
<input v-model="value" style="text-align: right;"></input>
|
{{memberInfo.remainingCreditLimit}}
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="box-hang">
|
<view class="box-hang" @click="show = !show">
|
||||||
<view class=""><span style="color: red;">*</span>调整类型</view>
|
<view class=""><span style="color: red;">*</span>调整类型</view>
|
||||||
<view class="dis" @click="show = !show">
|
<view class="dis">
|
||||||
<text>增加/扣除</text>
|
<text v-if="memberInfo.adjustType==0">增加</text>
|
||||||
|
<text v-if="memberInfo.adjustType==1">扣除</text>
|
||||||
<uni-icons type="right" size="16"></uni-icons>
|
<uni-icons type="right" size="16"></uni-icons>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="box-hang">
|
<view class="box-hang">
|
||||||
<view class=""><span style="color: red;">*</span>调整额度</view>
|
<view class=""><span style="color: red;">*</span>调整额度</view>
|
||||||
<view class="dis">
|
<view class="dis">
|
||||||
<input v-model="value" style="text-align: right;" placeholder="请输入"></input>
|
<input v-model="memberInfo.adjustLimit" style="text-align: right;" placeholder="请输入"></input>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="box-hang">
|
<view class="box-hang">
|
||||||
<view class="">备注</view>
|
<view class="">备注</view>
|
||||||
<view class="dis">
|
<view class="dis">
|
||||||
<input v-model="value" style="text-align: right;" placeholder="请输入"></input>
|
<input v-model="memberInfo.remark" style="text-align: right;" placeholder="请输入"></input>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="but-sub">确认</view>
|
<view class="but-sub" @click="submitFrom()">确认</view>
|
||||||
|
|
||||||
<u-picker :show="show" :columns="columns" @cancel="cancel" @confirm="confirm"></u-picker>
|
<u-picker :show="show" :columns="columns" @cancel="cancel" @confirm="confirm"></u-picker>
|
||||||
</view>
|
</view>
|
||||||
@ -63,10 +64,9 @@
|
|||||||
columns: [
|
columns: [
|
||||||
['增加', '扣除']
|
['增加', '扣除']
|
||||||
],
|
],
|
||||||
|
memberInfo: {},
|
||||||
|
memberId: ''
|
||||||
}
|
}
|
||||||
},
|
|
||||||
onLoad() {
|
|
||||||
|
|
||||||
},
|
},
|
||||||
onPullDownRefresh() {
|
onPullDownRefresh() {
|
||||||
//下拉刷新
|
//下拉刷新
|
||||||
@ -75,24 +75,86 @@
|
|||||||
onReachBottom() {
|
onReachBottom() {
|
||||||
// 触底加载
|
// 触底加载
|
||||||
if (this.pageNo >= this.totalPage) {
|
if (this.pageNo >= this.totalPage) {
|
||||||
uni.showToast({
|
|
||||||
title: '没有下一页数据',
|
|
||||||
icon: 'none'
|
|
||||||
})
|
|
||||||
} else {
|
} else {
|
||||||
this.pageNo++
|
this.pageNo++
|
||||||
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
onLoad(e) {
|
||||||
|
this.memberId = e.memberId
|
||||||
|
},
|
||||||
|
onShow() {
|
||||||
|
this.getInfo()
|
||||||
|
},
|
||||||
components: {
|
components: {
|
||||||
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
submitFrom(){
|
||||||
|
if (this.memberInfo.adjustType!=''){
|
||||||
|
uni.showToast({
|
||||||
|
title:'请选择调整类型',
|
||||||
|
icon:'none'
|
||||||
|
})
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if (!this.memberInfo.adjustLimit){
|
||||||
|
uni.showToast({
|
||||||
|
title:'请输入调整额度',
|
||||||
|
icon:'none'
|
||||||
|
})
|
||||||
|
return
|
||||||
|
}
|
||||||
|
request({
|
||||||
|
url: 'fleetMember/editLimitPC',
|
||||||
|
method: 'put',
|
||||||
|
data:this.memberInfo
|
||||||
|
}).then(res => {
|
||||||
|
if (res.data==1){
|
||||||
|
uni.navigateBack()
|
||||||
|
}else if (res.data==2){
|
||||||
|
uni.showToast({
|
||||||
|
title:'共享副卡-不限额,暂不支持修改',
|
||||||
|
icon:'none'
|
||||||
|
})
|
||||||
|
}else if (res.data==3){
|
||||||
|
uni.showToast({
|
||||||
|
title:'当前车队卡剩余额度不足,无法扣除',
|
||||||
|
icon:'none'
|
||||||
|
})
|
||||||
|
}else if (res.data==4){
|
||||||
|
uni.showToast({
|
||||||
|
title:'当前车队卡剩余额度不足,无法扣除',
|
||||||
|
icon:'none'
|
||||||
|
})
|
||||||
|
}else if (res.data==5){
|
||||||
|
uni.showToast({
|
||||||
|
title:'当前副卡剩余额度不足,无法扣除',
|
||||||
|
icon:'none'
|
||||||
|
})
|
||||||
|
}else{
|
||||||
|
uni.showToast({
|
||||||
|
title:'修改失败,请联系管理员',
|
||||||
|
icon:'none'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
getInfo() {
|
||||||
|
request({
|
||||||
|
url: '/fleetMember/' + this.memberId,
|
||||||
|
method: 'get',
|
||||||
|
}).then(res => {
|
||||||
|
this.memberInfo = res.data
|
||||||
|
})
|
||||||
|
},
|
||||||
cancel() {
|
cancel() {
|
||||||
this.show = false
|
this.show = false
|
||||||
},
|
},
|
||||||
confirm() {
|
confirm(e) {
|
||||||
|
this.memberInfo.adjustType = e.indexs[0]
|
||||||
|
console.log(this.memberInfo.adjustType,e.indexs[0],e,130);
|
||||||
this.show = false
|
this.show = false
|
||||||
},
|
},
|
||||||
goback() {
|
goback() {
|
||||||
|
@ -21,22 +21,24 @@
|
|||||||
</view>
|
</view>
|
||||||
<view class="box-hang">
|
<view class="box-hang">
|
||||||
<view class="">车牌号</view>
|
<view class="">车牌号</view>
|
||||||
<view class="dis">
|
<view class="dis" @click="show1 = !show1">
|
||||||
<text>未设置</text>
|
<input v-model="memberInfo.carNum" style="text-align: right;" placeholder="请输入"></input>
|
||||||
<uni-icons type="right" size="16"></uni-icons>
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="box-hang">
|
<view class="box-hang">
|
||||||
<view class=""><span style="color: red;">*</span>副卡类型</view>
|
<view class=""><span style="color: red;">*</span>副卡类型</view>
|
||||||
<view class="dis" @click="show = !show">
|
<view class="dis" @click="show = !show">
|
||||||
<text>共享副卡-不限额</text>
|
<text v-if="memberInfo.secondaryCardType==1">共享副卡-不限额</text>
|
||||||
|
<text v-if="memberInfo.secondaryCardType==2">共享副卡-限额</text>
|
||||||
|
<text v-if="memberInfo.secondaryCardType==3">独立副卡</text>
|
||||||
<uni-icons type="right" size="16"></uni-icons>
|
<uni-icons type="right" size="16"></uni-icons>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="box-hang" style="margin-top: 10px;">
|
<view class="box-hang" style="margin-top: 10px;">
|
||||||
<view class=""><span style="color: red;">*</span>是否开启消费通知</view>
|
<view class=""><span style="color: red;">*</span>是否开启消费通知</view>
|
||||||
<view class="dis">
|
<view class="dis">
|
||||||
<u-switch v-model="value1" activeColor="#6DD400" inactiveColor="rgb(230, 230, 230)"></u-switch>
|
<u-switch v-model="memberInfo.isOpenNotice" :activeValue='0' :inactiveValue='1' activeColor="#6DD400"
|
||||||
|
inactiveColor="rgb(230, 230, 230)"></u-switch>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="box-hang">
|
<view class="box-hang">
|
||||||
@ -49,7 +51,6 @@
|
|||||||
<view class="box-end">
|
<view class="box-end">
|
||||||
<view style="display: flex;">
|
<view style="display: flex;">
|
||||||
<view style="height: 14px;margin-right: 5px;"><u-icon name="info-circle"></u-icon></view>
|
<view style="height: 14px;margin-right: 5px;"><u-icon name="info-circle"></u-icon></view>
|
||||||
|
|
||||||
<view>注:</view>
|
<view>注:</view>
|
||||||
</view>
|
</view>
|
||||||
<view>
|
<view>
|
||||||
@ -59,9 +60,11 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="but-sub">保存</view>
|
<view class="but-sub" @click="submitFrom()">保存</view>
|
||||||
|
|
||||||
<u-picker :show="show" :columns="columns" @cancel="cancel" @confirm="confirm"></u-picker>
|
<u-picker :show="show" :columns="columns" @cancel="cancel" @confirm="confirm"></u-picker>
|
||||||
|
<u-keyboard ref="uKeyboard" mode="car" @change="valChange" @backspace="backspace" :show="show1"
|
||||||
|
@confirm="confirm1" @cancel="cancel1" :overlay="false"></u-keyboard>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
@ -81,14 +84,29 @@
|
|||||||
value1: true,
|
value1: true,
|
||||||
value2: true,
|
value2: true,
|
||||||
show: false,
|
show: false,
|
||||||
|
show1: false,
|
||||||
columns: [
|
columns: [
|
||||||
['共享副卡-不限额', '共享副卡-限额', '独立副卡']
|
['共享副卡-不限额', '共享副卡-限额', '独立副卡']
|
||||||
],
|
],
|
||||||
memberInfo: {},
|
memberInfo: {
|
||||||
|
carNum: '',
|
||||||
|
isOpenNotice: '0',
|
||||||
|
status: 'qy',
|
||||||
|
secondaryCardType: 1
|
||||||
|
},
|
||||||
|
fleetId: '',
|
||||||
|
memberId: '',
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad() {
|
onLoad(e) {
|
||||||
|
if (e.fleetId) {
|
||||||
|
this.fleetId = e.fleetId
|
||||||
|
this.memberInfo.fleetId = e.fleetId
|
||||||
|
}
|
||||||
|
if (e.memberId){
|
||||||
|
this.memberId = e.memberId
|
||||||
|
this.getInfo()
|
||||||
|
}
|
||||||
},
|
},
|
||||||
onPullDownRefresh() {
|
onPullDownRefresh() {
|
||||||
//下拉刷新
|
//下拉刷新
|
||||||
@ -108,10 +126,70 @@
|
|||||||
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
getInfo() {
|
||||||
|
request({
|
||||||
|
url: '/fleetMember/' + this.memberId,
|
||||||
|
method: 'get',
|
||||||
|
}).then(res => {
|
||||||
|
this.memberInfo = res.data
|
||||||
|
})
|
||||||
|
},
|
||||||
|
submitFrom() {
|
||||||
|
if (!this.memberInfo.name) {
|
||||||
|
uni.showToast({
|
||||||
|
title: '姓名不能为空',
|
||||||
|
icon: 'none'
|
||||||
|
})
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if (!this.memberInfo.mobile) {
|
||||||
|
uni.showToast({
|
||||||
|
title: '手机号不能为空',
|
||||||
|
icon: 'none'
|
||||||
|
})
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if (this.memberInfo.id){
|
||||||
|
request({
|
||||||
|
url: '/fleetMember',
|
||||||
|
method: 'put',
|
||||||
|
data: this.memberInfo
|
||||||
|
}).then(res => {
|
||||||
|
uni.navigateBack()
|
||||||
|
})
|
||||||
|
}else{
|
||||||
|
request({
|
||||||
|
url: '/fleetMember',
|
||||||
|
method: 'post',
|
||||||
|
data: this.memberInfo
|
||||||
|
}).then(res => {
|
||||||
|
uni.navigateBack()
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
},
|
||||||
|
// 按键被点击(点击退格键不会触发此事件)
|
||||||
|
valChange(val) {
|
||||||
|
// 将每次按键的值拼接到value变量中,注意+=写法
|
||||||
|
this.memberInfo.carNum += val
|
||||||
|
},
|
||||||
|
// 退格键被点击
|
||||||
|
backspace() {
|
||||||
|
// 删除value的最后一个字符
|
||||||
|
if (this.memberInfo.carNum.length) this.memberInfo.carNum = this.memberInfo.carNum.substr(0, this
|
||||||
|
.memberInfo.carNum.length - 1);
|
||||||
|
},
|
||||||
|
cancel1() {
|
||||||
|
this.show1 = false
|
||||||
|
},
|
||||||
|
confirm1() {
|
||||||
|
this.show1 = false
|
||||||
|
},
|
||||||
cancel() {
|
cancel() {
|
||||||
this.show = false
|
this.show = false
|
||||||
},
|
},
|
||||||
confirm() {
|
confirm(e) {
|
||||||
|
this.memberInfo.secondaryCardType = e.indexs[0] + 1
|
||||||
this.show = false
|
this.show = false
|
||||||
},
|
},
|
||||||
goback() {
|
goback() {
|
||||||
|
@ -2,15 +2,17 @@
|
|||||||
<view class="content">
|
<view class="content">
|
||||||
<view class="container">
|
<view class="container">
|
||||||
<view class="box-hang">
|
<view class="box-hang">
|
||||||
<input v-model="value" placeholder="输入姓名/手机号"></input>
|
<input v-model="value" @input="queryList()" placeholder="输入姓名/手机号"></input>
|
||||||
<u-icon name="search" size="20"></u-icon>
|
<u-icon name="search" size="20"></u-icon>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="top-box" v-for="(item,index) in memberList" :key="index">
|
<view class="top-box" v-for="(item,index) in memberList" :key="index" @click="goMemberInfo(item.id)">
|
||||||
<view class="t-db">
|
<view class="t-db">
|
||||||
<view class="d-s">
|
<view class="d-s">
|
||||||
<view style="margin-right: 10px;font-size: 14px;">{{item.name}}</view>
|
<view style="margin-right: 10px;font-size: 14px;">{{item.name}}</view>
|
||||||
<view class="icon_" v-if="item.secondaryCardType">{{item.secondaryCardType}}</view>
|
<view class="icon_" v-if="item.secondaryCardType && item.secondaryCardType==1">共享副卡-不限额</view>
|
||||||
|
<view class="icon_" v-if="item.secondaryCardType && item.secondaryCardType==2">共享副卡-限额</view>
|
||||||
|
<view class="icon_" v-if="item.secondaryCardType && item.secondaryCardType==3">独立副卡</view>
|
||||||
<view class="icon_" v-if="item.carNum">{{item.carNum}}</view>
|
<view class="icon_" v-if="item.carNum">{{item.carNum}}</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@ -35,14 +37,9 @@
|
|||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
totalPage: '',
|
totalPage: '',
|
||||||
value: '',
|
value: '',
|
||||||
memberList:[],
|
memberList: [],
|
||||||
fleetId:''
|
fleetId: '',
|
||||||
}
|
list: []
|
||||||
},
|
|
||||||
onLoad(e) {
|
|
||||||
if (e.fleetId){
|
|
||||||
this.fleetId = e.fleetId
|
|
||||||
this.getList()
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onPullDownRefresh() {
|
onPullDownRefresh() {
|
||||||
@ -57,28 +54,61 @@
|
|||||||
this.pageNo++
|
this.pageNo++
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
onLoad(e) {
|
||||||
|
if (e.fleetId) {
|
||||||
|
this.fleetId = e.fleetId
|
||||||
|
this.getList()
|
||||||
|
}
|
||||||
|
},
|
||||||
|
onShow() {
|
||||||
|
if (this.fleetId) {
|
||||||
|
this.getList()
|
||||||
|
}
|
||||||
|
},
|
||||||
components: {
|
components: {
|
||||||
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
getList(){
|
goMemberInfo(id) {
|
||||||
|
uni.navigateTo({
|
||||||
|
url: '/pagesMy/fleetMember/member?memberId=' + id
|
||||||
|
})
|
||||||
|
},
|
||||||
|
queryList() {
|
||||||
|
if (this.value) {
|
||||||
|
let lists = []
|
||||||
|
this.list.forEach(item => {
|
||||||
|
if (item.name.includes(this.value)) {
|
||||||
|
lists.push(item);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (item.mobile.includes(this.value)) {
|
||||||
|
lists.push(item);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
})
|
||||||
|
this.memberList = lists
|
||||||
|
} else {
|
||||||
|
this.memberList = this.list
|
||||||
|
}
|
||||||
|
},
|
||||||
|
getList() {
|
||||||
request({
|
request({
|
||||||
url: '/fleetMember/nameOrMobile',
|
url: '/fleetMember/nameOrMobile',
|
||||||
method: 'get',
|
method: 'get',
|
||||||
params:{
|
params: {
|
||||||
fleetId:this.fleetId,
|
fleetId: this.fleetId,
|
||||||
page:1,
|
page: 1,
|
||||||
pageSize:1000
|
pageSize: 1000
|
||||||
}
|
}
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
this.memberList = res.data.records
|
this.memberList = res.data.records
|
||||||
console.log(res,73);
|
this.list = res.data.records
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
goAddFleet() {
|
goAddFleet() {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: '/pagesMy/fleetMember/addMember'
|
url: '/pagesMy/fleetMember/addMember?fleetId=' + this.fleetId
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
goback() {
|
goback() {
|
||||||
@ -160,7 +190,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.icon_ {
|
.icon_ {
|
||||||
width: 60px;
|
width: 80px;
|
||||||
height: 16px;
|
height: 16px;
|
||||||
background: rgba(255, 255, 255, 0.48);
|
background: rgba(255, 255, 255, 0.48);
|
||||||
border-radius: 2px;
|
border-radius: 2px;
|
||||||
|
@ -4,14 +4,19 @@
|
|||||||
<view class="top-box">
|
<view class="top-box">
|
||||||
<view class="t-db">
|
<view class="t-db">
|
||||||
<view class="d-s">
|
<view class="d-s">
|
||||||
<view style="margin-right: 10px;font-size: 14px;">小明</view>
|
<view style="margin-right: 10px;font-size: 14px;">{{memberInfo.name}}</view>
|
||||||
<view class="icon_">共享-限制</view>
|
<view class="icon_" v-if="memberInfo.secondaryCardType && memberInfo.secondaryCardType==1">
|
||||||
<view class="icon_">鲁A123456</view>
|
共享副卡-不限额</view>
|
||||||
|
<view class="icon_" v-if="memberInfo.secondaryCardType && memberInfo.secondaryCardType==2">
|
||||||
|
共享副卡-限额</view>
|
||||||
|
<view class="icon_" v-if="memberInfo.secondaryCardType && memberInfo.secondaryCardType==3">独立副卡
|
||||||
|
</view>
|
||||||
|
<view class="icon_" v-if="memberInfo.carNum">{{memberInfo.carNum}}</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="on-title">342.55</view>
|
<view class="on-title">{{memberInfo.remainingCreditLimit}}</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="box-hang" style="margin-top: 10px;">
|
<view class="box-hang" style="margin-top: 10px;" @click="goEdit()">
|
||||||
<view class="">编辑信息</view>
|
<view class="">编辑信息</view>
|
||||||
<view class="dis">
|
<view class="dis">
|
||||||
<uni-icons type="right" size="16"></uni-icons>
|
<uni-icons type="right" size="16"></uni-icons>
|
||||||
@ -20,7 +25,7 @@
|
|||||||
<view class="box-wai">
|
<view class="box-wai">
|
||||||
<view class="">副卡额度(元)</view>
|
<view class="">副卡额度(元)</view>
|
||||||
<view class="box-hang1" style="margin-top: 10px;">
|
<view class="box-hang1" style="margin-top: 10px;">
|
||||||
<view class="">342.55</view>
|
<view class="">{{memberInfo.secondaryCardLimit}}</view>
|
||||||
<view class="tiao-z" @click="goFleetLimit()">
|
<view class="tiao-z" @click="goFleetLimit()">
|
||||||
调整
|
调整
|
||||||
</view>
|
</view>
|
||||||
@ -30,13 +35,15 @@
|
|||||||
<view class="box-hang" style="margin-top: 10px;">
|
<view class="box-hang" style="margin-top: 10px;">
|
||||||
<view class=""><span style="color: red;">*</span>是否开启消费通知</view>
|
<view class=""><span style="color: red;">*</span>是否开启消费通知</view>
|
||||||
<view class="dis">
|
<view class="dis">
|
||||||
<u-switch v-model="value1" activeColor="#6DD400" inactiveColor="rgb(230, 230, 230)"></u-switch>
|
<u-switch v-model="memberInfo.isOpenNotice" :activeValue='0' :inactiveValue='1'
|
||||||
|
activeColor="#6DD400" inactiveColor="rgb(230, 230, 230)"></u-switch>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="box-hang">
|
<view class="box-hang">
|
||||||
<view class=""><span style="color: red;">*</span>是否启用</view>
|
<view class=""><span style="color: red;">*</span>是否启用</view>
|
||||||
<view class="dis">
|
<view class="dis">
|
||||||
<u-switch v-model="value2" activeColor="#6DD400" inactiveColor="rgb(230, 230, 230)"></u-switch>
|
<u-switch v-model="memberInfo.status" activeValue='qy' inactiveValue='jy' activeColor="#6DD400"
|
||||||
|
inactiveColor="rgb(230, 230, 230)"></u-switch>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="but-sub" @click="show=!show">注销副卡</view>
|
<view class="but-sub" @click="show=!show">注销副卡</view>
|
||||||
@ -64,10 +71,11 @@
|
|||||||
value2: true,
|
value2: true,
|
||||||
show: false,
|
show: false,
|
||||||
title: "注销副卡",
|
title: "注销副卡",
|
||||||
content: '成员一经注销,将无法进行恢复,请谨慎操作,以免影响正常使用!'
|
content: '成员一经注销,将无法进行恢复,请谨慎操作,以免影响正常使用!',
|
||||||
|
memberInfo: {},
|
||||||
|
memberId: ''
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad() {},
|
|
||||||
onPullDownRefresh() {
|
onPullDownRefresh() {
|
||||||
//下拉刷新
|
//下拉刷新
|
||||||
uni.stopPullDownRefresh()
|
uni.stopPullDownRefresh()
|
||||||
@ -80,18 +88,46 @@
|
|||||||
this.pageNo++
|
this.pageNo++
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
onLoad(e) {
|
||||||
|
this.memberId = e.memberId
|
||||||
|
|
||||||
|
},
|
||||||
|
onShow() {
|
||||||
|
this.getInfo()
|
||||||
|
},
|
||||||
components: {
|
components: {
|
||||||
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
goFleetLimit(){
|
getInfo() {
|
||||||
|
request({
|
||||||
|
url: '/fleetMember/' + this.memberId,
|
||||||
|
method: 'get',
|
||||||
|
}).then(res => {
|
||||||
|
this.memberInfo = res.data
|
||||||
|
})
|
||||||
|
},
|
||||||
|
goEdit() {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: '/pagesMy/fleetLimit/index'
|
url: '/pagesMy/fleetMember/addMember?memberId=' + this.memberId
|
||||||
|
})
|
||||||
|
},
|
||||||
|
goFleetLimit() {
|
||||||
|
uni.navigateTo({
|
||||||
|
url: '/pagesMy/fleetLimit/index?memberId=' + this.memberId
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
confirm() {
|
confirm() {
|
||||||
this.show = false
|
this.show = false
|
||||||
|
request({
|
||||||
|
url: '/fleetMember/signOUTMember',
|
||||||
|
method: 'put',
|
||||||
|
data: {
|
||||||
|
id: this.memberId
|
||||||
|
}
|
||||||
|
}).then(res => {
|
||||||
|
this.memberInfo = res.data
|
||||||
|
})
|
||||||
},
|
},
|
||||||
cancel() {
|
cancel() {
|
||||||
this.show = false
|
this.show = false
|
||||||
@ -199,7 +235,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.icon_ {
|
.icon_ {
|
||||||
width: 60px;
|
width: 80px;
|
||||||
height: 16px;
|
height: 16px;
|
||||||
background: rgba(255, 255, 255, 0.48);
|
background: rgba(255, 255, 255, 0.48);
|
||||||
border-radius: 2px;
|
border-radius: 2px;
|
||||||
|
@ -5,16 +5,15 @@
|
|||||||
</view>
|
</view>
|
||||||
<view class="cont-title">
|
<view class="cont-title">
|
||||||
<view class="or-size">已连续签到</view>
|
<view class="or-size">已连续签到</view>
|
||||||
<view class="or-num">0</view>
|
<view class="or-num">{{signInDays}}</view>
|
||||||
<view class="or-num">5</view>
|
|
||||||
<view class="or-size">天</view>
|
<view class="or-size">天</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="wrap-box">
|
<view class="wrap-box">
|
||||||
<view class="w_box" v-for="(item,index) in 30" :key="index" @click="setIndex(index)"
|
<view class="w_box" v-for="(item,index) in list" :key="index" @click="setIndex(index,item)"
|
||||||
:class="{'acv_w' : wIndex == index }">
|
:class="{'acv_w' : wIndex == index }">
|
||||||
<view class="">第{{item+1}}天</view>
|
<view class="">{{item.integralName}}</view>
|
||||||
<image src="@/static/imgs/jinbi.png" style="width: 25px; height: 25px; "></image>
|
<image src="@/static/imgs/jinbi.png" style="width: 25px; height: 25px; "></image>
|
||||||
<view class="">5积分</view>
|
<view class="">{{item.integral}}积分</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="bottom_bs" @click="equityShow = true">
|
<view class="bottom_bs" @click="equityShow = true">
|
||||||
@ -23,12 +22,12 @@
|
|||||||
<view style="font-size: 14px; color: #333; margin-left: 5px; ">签到规则</view>
|
<view style="font-size: 14px; color: #333; margin-left: 5px; ">签到规则</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="anniu">
|
<view class="anniu" :style="isSignIn ? 'background: #FF9655;' : 'background: #999999;'" @click="goSignIn()">
|
||||||
签到
|
签到
|
||||||
</view>
|
</view>
|
||||||
<u-overlay :show="show" @click="show = false">
|
<u-overlay :show="show" @click="show = false">
|
||||||
<view class="box_">
|
<view class="box_">
|
||||||
<view class="r_size">+10积分</view>
|
<view class="r_size">+{{integral}}积分</view>
|
||||||
</view>
|
</view>
|
||||||
</u-overlay>
|
</u-overlay>
|
||||||
<u-popup :show="equityShow" :closeable="true" :round="10" mode="bottom" @close="equityclose">
|
<u-popup :show="equityShow" :closeable="true" :round="10" mode="bottom" @close="equityclose">
|
||||||
@ -66,7 +65,10 @@
|
|||||||
show: false,
|
show: false,
|
||||||
equityShow: false,
|
equityShow: false,
|
||||||
list: [],
|
list: [],
|
||||||
signInRule: ''
|
signInRule: '',
|
||||||
|
signInDays: '01',
|
||||||
|
isSignIn: false,
|
||||||
|
integral: 0,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad() {
|
onLoad() {
|
||||||
@ -88,11 +90,46 @@
|
|||||||
onShow() {
|
onShow() {
|
||||||
this.getList()
|
this.getList()
|
||||||
this.getSignIn()
|
this.getSignIn()
|
||||||
|
this.getIsSignIn()
|
||||||
},
|
},
|
||||||
components: {
|
components: {
|
||||||
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
goSignIn() {
|
||||||
|
request({
|
||||||
|
url: 'business/integral/integralSettings/signInFunction',
|
||||||
|
method: 'post',
|
||||||
|
data: {
|
||||||
|
storeId: uni.getStorageSync("storeId"),
|
||||||
|
chainStoreId: uni.getStorageSync("chainStoreId")
|
||||||
|
}
|
||||||
|
}).then((res) => {
|
||||||
|
if (res.code == 200) {
|
||||||
|
console.log(res, 108);
|
||||||
|
this.show = true
|
||||||
|
this.getList()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// 判断是否签到
|
||||||
|
getIsSignIn() {
|
||||||
|
request({
|
||||||
|
url: 'business/integral/integralSettings/todayIsSignIn',
|
||||||
|
method: 'get',
|
||||||
|
params: {
|
||||||
|
storeId: uni.getStorageSync("storeId")
|
||||||
|
}
|
||||||
|
}).then((res) => {
|
||||||
|
if (res.code == 200) {
|
||||||
|
if (res.data == 0) {
|
||||||
|
this.isSignIn = true
|
||||||
|
} else {
|
||||||
|
this.isSignIn = false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
getSignIn() {
|
getSignIn() {
|
||||||
request({
|
request({
|
||||||
url: '/business/integral/integralSettings/getIntegralSignInRules',
|
url: '/business/integral/integralSettings/getIntegralSignInRules',
|
||||||
@ -101,7 +138,6 @@
|
|||||||
storeId: uni.getStorageSync("storeId")
|
storeId: uni.getStorageSync("storeId")
|
||||||
}
|
}
|
||||||
}).then((res) => {
|
}).then((res) => {
|
||||||
console.log(res, 104);
|
|
||||||
if (res.code == 200) {
|
if (res.code == 200) {
|
||||||
this.signInRule = res.data
|
this.signInRule = res.data
|
||||||
}
|
}
|
||||||
@ -110,9 +146,9 @@
|
|||||||
equityclose() {
|
equityclose() {
|
||||||
this.equityShow = false
|
this.equityShow = false
|
||||||
},
|
},
|
||||||
setIndex(index) {
|
setIndex(index, data) {
|
||||||
this.wIndex = index
|
this.wIndex = index
|
||||||
this.show = true
|
this.integral = data.integral
|
||||||
},
|
},
|
||||||
getList() {
|
getList() {
|
||||||
request({
|
request({
|
||||||
@ -122,9 +158,9 @@
|
|||||||
storeId: uni.getStorageSync("storeId")
|
storeId: uni.getStorageSync("storeId")
|
||||||
}
|
}
|
||||||
}).then((res) => {
|
}).then((res) => {
|
||||||
console.log(res, 107);
|
|
||||||
if (res.code == 200) {
|
if (res.code == 200) {
|
||||||
this.list = res.data
|
this.list = res.data.integralSettings
|
||||||
|
this.signInDays = res.data.signInDays
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user