12.01前端
This commit is contained in:
parent
8fb4b20d7f
commit
0cfc766146
@ -10,8 +10,9 @@
|
|||||||
<view class="top-img">
|
<view class="top-img">
|
||||||
<image src="../../static/logo.png" mode=""></image>
|
<image src="../../static/logo.png" mode=""></image>
|
||||||
</view>
|
</view>
|
||||||
<view class="">
|
<view style="width: 80%;">
|
||||||
<view class="top-title">{{store.name}}{{store.description ? "("+store.description+")" : ""}}</view><!--九州加油站(总站)-->
|
<view class="top-title">{{store.name}}{{store.description ? "("+store.description+")" : ""}}
|
||||||
|
</view><!--九州加油站(总站)-->
|
||||||
<view class="top-hui">{{store.address}}</view><!--平安大道东200米-->
|
<view class="top-hui">{{store.address}}</view><!--平安大道东200米-->
|
||||||
<view class="top-hong">¥{{oilPrice}}/{{oilUnit}}</view>
|
<view class="top-hong">¥{{oilPrice}}/{{oilUnit}}</view>
|
||||||
</view>
|
</view>
|
||||||
@ -33,10 +34,8 @@
|
|||||||
v-for="(item,index) in 4" :key="index">
|
v-for="(item,index) in 4" :key="index">
|
||||||
<text>92#</text>
|
<text>92#</text>
|
||||||
</view> -->
|
</view> -->
|
||||||
<view class="box-oil"
|
<view class="box-oil" v-for="(item,index) in oilNumberList" :key="index"
|
||||||
v-for="(item,index) in oilNumberList" :key="index"
|
:class=" {'xz' :hindex == index }" @click="getHIndex(index,item)">
|
||||||
:class=" {'xz' :hindex == index }"
|
|
||||||
@click="getHIndex(index,item)">
|
|
||||||
<text>{{item.oilNames}}</text>
|
<text>{{item.oilNames}}</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@ -48,9 +47,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.id)">
|
||||||
@click="getQIndex(index,item.id)">
|
|
||||||
<text>{{item.gunName}}</text>
|
<text>{{item.gunName}}</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@ -89,9 +87,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)">
|
||||||
@click="getSIndex(index)">
|
|
||||||
<text>{{item.realName}}员工</text>
|
<text>{{item.realName}}员工</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@ -120,43 +117,43 @@
|
|||||||
aindex: 0,
|
aindex: 0,
|
||||||
sindex: 0,
|
sindex: 0,
|
||||||
// 店铺信息
|
// 店铺信息
|
||||||
store:{},
|
store: {},
|
||||||
// 店铺福利信息
|
// 店铺福利信息
|
||||||
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: "",
|
||||||
// 油品订单信息
|
// 油品订单信息
|
||||||
oilOrder:{
|
oilOrder: {
|
||||||
storeId:"",
|
storeId: "",
|
||||||
userId:"",
|
userId: "",
|
||||||
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,
|
||||||
payUser:"",
|
payUser: "",
|
||||||
payType:"WECHAT",
|
payType: "WECHAT",
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -167,21 +164,23 @@
|
|||||||
this.isExistStoreId();
|
this.isExistStoreId();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
isExistStoreId(){
|
isExistStoreId() {
|
||||||
if (uni.getStorageSync("inviteStoreId") != ""){
|
if (uni.getStorageSync("inviteStoreId") != "") {
|
||||||
this.getStore(uni.getStorageSync("inviteStoreId"));
|
this.getStore(uni.getStorageSync("inviteStoreId"));
|
||||||
}else{
|
} else {
|
||||||
this.getAddress();
|
this.getAddress();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// 获取门店信息
|
// 获取门店信息
|
||||||
getStore(id){
|
getStore(id) {
|
||||||
let _this = this;
|
let _this = this;
|
||||||
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
|
||||||
@ -196,7 +195,7 @@
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
// 获取当前位置
|
// 获取当前位置
|
||||||
getAddress(){
|
getAddress() {
|
||||||
let _this = this;
|
let _this = this;
|
||||||
uni.getLocation({
|
uni.getLocation({
|
||||||
// 谷歌使用wgs84 其他使用gcj02
|
// 谷歌使用wgs84 其他使用gcj02
|
||||||
@ -211,17 +210,17 @@
|
|||||||
"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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -233,12 +232,12 @@
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
// 获取当前店铺油号信息
|
// 获取当前店铺油号信息
|
||||||
getOilNumber(storeId){
|
getOilNumber(storeId) {
|
||||||
let _this = this;
|
let _this = this;
|
||||||
request({
|
request({
|
||||||
url: "business/petrolStationManagement/oilNumber/getOilNumberName/" + storeId,
|
url: "business/petrolStationManagement/oilNumber/getOilNumberName/" + storeId,
|
||||||
method: 'get',
|
method: 'get',
|
||||||
}).then((res)=>{
|
}).then((res) => {
|
||||||
_this.oilNumberList = res.data;
|
_this.oilNumberList = res.data;
|
||||||
_this.getOilGun(res.data[0].numberId);
|
_this.getOilGun(res.data[0].numberId);
|
||||||
_this.oilPrice = res.data[0].gbPrice
|
_this.oilPrice = res.data[0].gbPrice
|
||||||
@ -246,21 +245,21 @@
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
// 获取当前店铺油号对应的油枪信息
|
// 获取当前店铺油号对应的油枪信息
|
||||||
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
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
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
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
@ -272,17 +271,17 @@
|
|||||||
url: '/pagesRefuel/orderDetail/index'
|
url: '/pagesRefuel/orderDetail/index'
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
getAIndex(index,amount) {
|
getAIndex(index, amount) {
|
||||||
this.value = amount+""
|
this.value = amount + ""
|
||||||
this.aindex = index
|
this.aindex = index
|
||||||
},
|
},
|
||||||
getHIndex(index,data) {
|
getHIndex(index, data) {
|
||||||
this.hindex = index
|
this.hindex = index
|
||||||
this.getOilGun(data.numberId)
|
this.getOilGun(data.numberId)
|
||||||
this.oilPrice = data.gbPrice
|
this.oilPrice = data.gbPrice
|
||||||
this.oilUnit = data.unit
|
this.oilUnit = data.unit
|
||||||
},
|
},
|
||||||
getQIndex(index,id) {
|
getQIndex(index, id) {
|
||||||
this.qindex = index
|
this.qindex = index
|
||||||
},
|
},
|
||||||
goRefuel() {
|
goRefuel() {
|
||||||
@ -290,22 +289,22 @@
|
|||||||
url: '/pagesRefuel/pagesRefuel/index'
|
url: '/pagesRefuel/pagesRefuel/index'
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
change(){
|
change() {
|
||||||
|
|
||||||
},
|
},
|
||||||
// 关闭弹窗
|
// 关闭弹窗
|
||||||
closeStaff(){
|
closeStaff() {
|
||||||
this.$refs.popup.close()
|
this.$refs.popup.close()
|
||||||
},
|
},
|
||||||
// 数字键盘确定按钮
|
// 数字键盘确定按钮
|
||||||
submitAmount(){
|
submitAmount() {
|
||||||
if (this.value!=""){
|
if (this.value != "") {
|
||||||
this.show = false
|
this.show = false
|
||||||
this.$refs.popup.open('bottom')
|
this.$refs.popup.open('bottom')
|
||||||
}else{
|
} else {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title:"请输入加油金额",
|
title: "请输入加油金额",
|
||||||
icon:"error"
|
icon: "error"
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -398,6 +397,13 @@
|
|||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
margin: 5px 0px;
|
margin: 5px 0px;
|
||||||
color: #999999;
|
color: #999999;
|
||||||
|
text-overflow: -o-ellipsis-lastline;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
display: -webkit-box;
|
||||||
|
-webkit-line-clamp: 2;
|
||||||
|
line-clamp: 2;
|
||||||
|
-webkit-box-orient: vertical;
|
||||||
}
|
}
|
||||||
|
|
||||||
.top-hong {
|
.top-hong {
|
||||||
@ -431,6 +437,7 @@
|
|||||||
display: flex;
|
display: flex;
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
}
|
}
|
||||||
|
|
||||||
.wrap-box1 {
|
.wrap-box1 {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
display: flex;
|
display: flex;
|
||||||
@ -451,6 +458,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;
|
||||||
@ -463,6 +471,7 @@
|
|||||||
padding: 12px 0px;
|
padding: 12px 0px;
|
||||||
border-radius: 6px;
|
border-radius: 6px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.box-oil2 {
|
.box-oil2 {
|
||||||
width: 28%;
|
width: 28%;
|
||||||
display: flex;
|
display: flex;
|
||||||
|
Loading…
Reference in New Issue
Block a user