This commit is contained in:
cun-nan 2024-09-28 18:04:43 +08:00
parent 6946ba6a15
commit fb5ec3d55f
8 changed files with 411 additions and 352 deletions

View File

@ -394,9 +394,32 @@
})
},
goFleet() {
uni.navigateTo({
url: '/pagesMy/fleetInfo/index'
let flag = this.getFleetInfo()
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() {
uni.navigateTo({

View File

@ -1,11 +1,7 @@
<template>
<view class="content">
<view class="container">
<!-- <view class="my-header">
<view class="my-text">一键加油</view>
</view> -->
<view class="top">
<view class="dis">
<view class="top-img">
<image v-if="!store.logo" src="../../static/logo.png" mode="aspectFit"></image>
@ -23,25 +19,27 @@
选择油品油枪
</view>
<view class="input_kuang">
<view class="leftIput" @click="selectShow = true">汽油92#1号枪</view>
<view class="rr_box" @click="Selectemployees = true">小王</view>
<view class="leftIput" @click="selectShow = true">{{oilTypeName || '--'}}{{oilGunName || '--'}}
</view>
<view class="rr_box" @click="Selectemployees = true">{{staffName || '--'}}</view>
</view>
<view style="display: flex;justify-content: space-between;">
<view class="title_">
加油金额
</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 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 class="rr_box">36.55L</view>
<view class="rr_box">{{oilOrder.oilNum}}L</view>
</view>
<view class="title_">
付款备注
</view>
<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 class="b_"></view>
@ -63,12 +61,6 @@
</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="dian"></view>
</view>
@ -123,82 +115,6 @@
</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>
@ -298,8 +214,8 @@
<view class="popup-box">
<view class="p_title">选择员工</view>
<view class="wr_box">
<view class="xanniu" :class="{'acvit' : anIndex == index }" v-for="(item,index) in staffList"
:key="index" @click="setadindex(index)">
<view class="xanniu" :class="{'acvit' : anIndex == index }"
v-for="(item,index) in staffList" :key="index" @click="setadindex(index,item)">
<view class="">{{item.realName}}</view>
</view>
@ -318,7 +234,7 @@
</scroll-view>
<view class="wr_box">
<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.oilName}}</view>
</view>
@ -442,10 +358,6 @@
description: "济南分店",
address: "济南槐荫区"
},
//
welfare: [],
//
distance: "",
// id
storeId: "",
//
@ -464,6 +376,12 @@
oilUnit: "",
AppToken: uni.getStorageSync("App-Token"),
//
oilTypeName: '',
//
oilGunName: '',
//
staffName: '',
//
oilOrder: {
storeId: "",
@ -479,6 +397,8 @@
payAmount: 0,
payType: uni.getStorageSync("appltType"),
},
//
couponList: []
}
},
components: {
@ -519,14 +439,12 @@
this.staffId = uni.getStorageSync("inviteStaffId")
if (uni.getStorageSync("storeId")) {
this.getStore(uni.getStorageSync("storeId"));
this.getStaffList(uni.getStorageSync("storeId"));
}
}
} else {
if (uni.getStorageSync("storeId")) {
this.getStore(uni.getStorageSync("storeId"));
this.getStaffList(uni.getStorageSync("storeId"));
} else {
this.getStoreIdBySn(uni.getStorageSync("sn"));
}
@ -538,21 +456,31 @@
this.staffId = query.staffId
this.storeId = query.storeId
this.getStore(uni.getStorageSync("storeId"));
this.getStaffList(uni.getStorageSync("storeId"));
}
},
onShow() {
// this.isExistStoreId();
this.getStore(uni.getStorageSync("storeId"));
// this.getStaffList(uni.getStorageSync("storeId"));
// this.getStoreIdBySn("byx19509291");
// this.getStore(0);
this.getTheJudgmentIsTheSame()
},
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() {
this.selectCoupon = false
},
@ -571,14 +499,26 @@
this.oilUnit = data.unit
this.oilOrder.oils = data.oilNameId
uni.setStorageSync("tankId", data.oilGunList[0].tankId)
this.oilGunName = data.oilGunList[0].gunName
}
this.oilTypeName = data.oilType + data.oilName
},
ypClose() {
this.selectShow = false
},
setadindex(index) {
setadindex(index, data) {
this.anIndex = index
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() {
@ -587,16 +527,10 @@
goPayment() {
//
this.ConfirmPayment = true
},
open() {
},
Selectclose() {
this.Selectemployees = false
},
closePayment() {
this.ConfirmPayment = false
},
close() {
this.PaymentDetails = false
},
@ -642,50 +576,13 @@
}
}).catch(err => {})
// uni.showToast({
// title: "",
// icon: "none"
// })
},
fail: function(err) {
_this.getStore(2);
// uni.showToast({
// title: ""
// })
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) {
}
})
},
// snstoreId
getStoreIdBySn(sn) {
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) {
// uni.showToast({
// title:333
// })
if (!id) {
return;
}
@ -735,56 +616,7 @@
_this.storeId = res.data.id;
uni.setStorageSync("storeId", _this.store.id)
uni.setStorageSync("chainStoreId", _this.store.chainStoreId)
// let welfare = res.data.welfare
// 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);
}
});
}).catch(err => {})
},
//
getOilNumber(storeId) {
@ -800,13 +632,14 @@
_this.oilPrice = res.data[0].oilPrice
_this.oilUnit = res.data[0].unit
_this.oilOrder.oils = res.data[0].oilNameId
_this.oilTypeName = res.data[0].oilType + res.data[0].oilName
if (res.data[0].oilGunList) {
_this.oilGunList = res.data[0].oilGunList
_this.oilOrder.oilGunNum = res.data[0].oilGunList[0].id
uni.setStorageSync("tankId", res.data[0].oilGunList[0].tankId)
_this.oilGunName = res.data[0].oilGunList[0].gunName
}
}
console.log(res, 801);
})
},
//
@ -831,6 +664,10 @@
method: 'get',
}).then((res) => {
_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) {
this.oilOrder.orderAmount = this.value
this.oilOrder.storeId = this.storeId
@ -896,18 +734,6 @@
this.oilOrder.oilGunNum = data.id
uni.setStorageSync("tankId", data.tankId)
},
goRefuel() {
uni.navigateTo({
url: '/pagesRefuel/pagesRefuel/index'
})
},
change() {
},
//
closeStaff() {
this.$refs.popup.close()
},
//
submitAmount() {
//
@ -962,32 +788,8 @@
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);
},
// tokenid
async getTheJudgmentIsTheSame() {
//
// if (!this.AppToken) {
// return;
// }
if (this.AppToken) {
await request({
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);
}
}
}

View File

@ -15,20 +15,23 @@
<u-empty text="您当前没有订单~" style="margin-top: 25px;" v-if="orderList.length == 0"
icon="http://47.94.122.58:83/queshengye.png">
</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="">订单号xxxxxxxxxxxxxxxxxxxx</view>
<view class="">未使用</view>
<view class="">订单号{{item.orderNumber}}</view>
<view class="">{{item.orderStatus}}</view>
</view>
<view class="box_cont">
<view class="">
<image src="../../static/logo.png" style="width: 60px; height: 60px; "></image>
</view>
<view class="r-bas">
<view style="font-size: 16px;color: #333333;">虚拟产品</view>
<view class="">x1</view>
<view style="font-size: 16px;color: #333333;">{{item.giftName}}</view>
<view class="">x{{item.exchangeQuantity || 0}}</view>
<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>
</view>
@ -105,12 +108,12 @@
},
onShow() {
// this.getIntegralOrderList()
this.getIntegralOrderList()
},
methods: {
goDetails() {
goDetails(id) {
uni.navigateTo({
url: '/pagesHome/myPointsOrder/details'
url: '/pagesHome/myPointsOrder/details?orderId='+id
})
},
getindex(index) {
@ -144,6 +147,7 @@
}).then((res) => {
if (res.code == 200) {
this.orderList = res.data.records
console.log(res, 147);
}
})
},
@ -360,4 +364,4 @@
font-size: 14px;
border-radius: 50px;
}
</style>
</style>

View File

@ -4,42 +4,43 @@
<view class="box-hang">
<view class="">副卡额度</view>
<view class="dis">
<input v-model="value" style="text-align: right;"></input>
{{memberInfo.secondaryCardLimit || 0}}
</view>
</view>
<view class="box-hang">
<view class="">已用额度</view>
<view class="dis">
<input v-model="value" style="text-align: right;"></input>
{{memberInfo.usedCreditLimit}}
</view>
</view>
<view class="box-hang">
<view class="">剩余额度</view>
<view class="dis">
<input v-model="value" style="text-align: right;"></input>
{{memberInfo.remainingCreditLimit}}
</view>
</view>
<view class="box-hang">
<view class="box-hang" @click="show = !show">
<view class=""><span style="color: red;">*</span>调整类型</view>
<view class="dis" @click="show = !show">
<text>增加/扣除</text>
<view class="dis">
<text v-if="memberInfo.adjustType==0">增加</text>
<text v-if="memberInfo.adjustType==1">扣除</text>
<uni-icons type="right" size="16"></uni-icons>
</view>
</view>
<view class="box-hang">
<view class=""><span style="color: red;">*</span>调整额度</view>
<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 class="box-hang">
<view class="">备注</view>
<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 class="but-sub">确认</view>
<view class="but-sub" @click="submitFrom()">确认</view>
<u-picker :show="show" :columns="columns" @cancel="cancel" @confirm="confirm"></u-picker>
</view>
@ -63,10 +64,9 @@
columns: [
['增加', '扣除']
],
memberInfo: {},
memberId: ''
}
},
onLoad() {
},
onPullDownRefresh() {
//
@ -75,24 +75,86 @@
onReachBottom() {
//
if (this.pageNo >= this.totalPage) {
uni.showToast({
title: '没有下一页数据',
icon: 'none'
})
} else {
this.pageNo++
}
},
onLoad(e) {
this.memberId = e.memberId
},
onShow() {
this.getInfo()
},
components: {
},
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() {
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
},
goback() {

View File

@ -21,22 +21,24 @@
</view>
<view class="box-hang">
<view class="">车牌号</view>
<view class="dis">
<text>未设置</text>
<uni-icons type="right" size="16"></uni-icons>
<view class="dis" @click="show1 = !show1">
<input v-model="memberInfo.carNum" style="text-align: right;" placeholder="请输入"></input>
</view>
</view>
<view class="box-hang">
<view class=""><span style="color: red;">*</span>副卡类型</view>
<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>
</view>
</view>
<view class="box-hang" style="margin-top: 10px;">
<view class=""><span style="color: red;">*</span>是否开启消费通知</view>
<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 class="box-hang">
@ -49,7 +51,6 @@
<view class="box-end">
<view style="display: flex;">
<view style="height: 14px;margin-right: 5px;"><u-icon name="info-circle"></u-icon></view>
<view></view>
</view>
<view>
@ -59,9 +60,11 @@
</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-keyboard ref="uKeyboard" mode="car" @change="valChange" @backspace="backspace" :show="show1"
@confirm="confirm1" @cancel="cancel1" :overlay="false"></u-keyboard>
</view>
</view>
@ -81,14 +84,29 @@
value1: true,
value2: true,
show: false,
show1: false,
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() {
//
@ -108,10 +126,70 @@
},
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() {
this.show = false
},
confirm() {
confirm(e) {
this.memberInfo.secondaryCardType = e.indexs[0] + 1
this.show = false
},
goback() {

View File

@ -2,15 +2,17 @@
<view class="content">
<view class="container">
<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>
</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="d-s">
<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>
</view>
@ -35,14 +37,9 @@
pageSize: 10,
totalPage: '',
value: '',
memberList:[],
fleetId:''
}
},
onLoad(e) {
if (e.fleetId){
this.fleetId = e.fleetId
this.getList()
memberList: [],
fleetId: '',
list: []
}
},
onPullDownRefresh() {
@ -57,28 +54,61 @@
this.pageNo++
}
},
onLoad(e) {
if (e.fleetId) {
this.fleetId = e.fleetId
this.getList()
}
},
onShow() {
if (this.fleetId) {
this.getList()
}
},
components: {
},
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({
url: '/fleetMember/nameOrMobile',
method: 'get',
params:{
fleetId:this.fleetId,
page:1,
pageSize:1000
params: {
fleetId: this.fleetId,
page: 1,
pageSize: 1000
}
}).then(res => {
this.memberList = res.data.records
console.log(res,73);
this.list = res.data.records
})
},
goAddFleet() {
uni.navigateTo({
url: '/pagesMy/fleetMember/addMember'
url: '/pagesMy/fleetMember/addMember?fleetId=' + this.fleetId
})
},
goback() {
@ -160,7 +190,7 @@
}
.icon_ {
width: 60px;
width: 80px;
height: 16px;
background: rgba(255, 255, 255, 0.48);
border-radius: 2px;

View File

@ -4,14 +4,19 @@
<view class="top-box">
<view class="t-db">
<view class="d-s">
<view style="margin-right: 10px;font-size: 14px;">小明</view>
<view class="icon_">共享-限制</view>
<view class="icon_">鲁A123456</view>
<view style="margin-right: 10px;font-size: 14px;">{{memberInfo.name}}</view>
<view class="icon_" v-if="memberInfo.secondaryCardType && memberInfo.secondaryCardType==1">
共享副卡-不限额</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 class="on-title">342.55</view>
<view class="on-title">{{memberInfo.remainingCreditLimit}}</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="dis">
<uni-icons type="right" size="16"></uni-icons>
@ -20,7 +25,7 @@
<view class="box-wai">
<view class="">副卡额度</view>
<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>
@ -30,13 +35,15 @@
<view class="box-hang" style="margin-top: 10px;">
<view class=""><span style="color: red;">*</span>是否开启消费通知</view>
<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 class="box-hang">
<view class=""><span style="color: red;">*</span>是否启用</view>
<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 class="but-sub" @click="show=!show">注销副卡</view>
@ -64,10 +71,11 @@
value2: true,
show: false,
title: "注销副卡",
content: '成员一经注销,将无法进行恢复,请谨慎操作,以免影响正常使用!'
content: '成员一经注销,将无法进行恢复,请谨慎操作,以免影响正常使用!',
memberInfo: {},
memberId: ''
}
},
onLoad() {},
onPullDownRefresh() {
//
uni.stopPullDownRefresh()
@ -80,18 +88,46 @@
this.pageNo++
}
},
onLoad(e) {
this.memberId = e.memberId
},
onShow() {
this.getInfo()
},
components: {
},
methods: {
goFleetLimit(){
getInfo() {
request({
url: '/fleetMember/' + this.memberId,
method: 'get',
}).then(res => {
this.memberInfo = res.data
})
},
goEdit() {
uni.navigateTo({
url: '/pagesMy/fleetLimit/index'
url: '/pagesMy/fleetMember/addMember?memberId=' + this.memberId
})
},
goFleetLimit() {
uni.navigateTo({
url: '/pagesMy/fleetLimit/index?memberId=' + this.memberId
})
},
confirm() {
this.show = false
request({
url: '/fleetMember/signOUTMember',
method: 'put',
data: {
id: this.memberId
}
}).then(res => {
this.memberInfo = res.data
})
},
cancel() {
this.show = false
@ -199,7 +235,7 @@
}
.icon_ {
width: 60px;
width: 80px;
height: 16px;
background: rgba(255, 255, 255, 0.48);
border-radius: 2px;

View File

@ -5,16 +5,15 @@
</view>
<view class="cont-title">
<view class="or-size">已连续签到</view>
<view class="or-num">0</view>
<view class="or-num">5</view>
<view class="or-num">{{signInDays}}</view>
<view class="or-size"></view>
</view>
<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 }">
<view class="">{{item+1}}</view>
<view class="">{{item.integralName}}</view>
<image src="@/static/imgs/jinbi.png" style="width: 25px; height: 25px; "></image>
<view class="">5积分</view>
<view class="">{{item.integral}}积分</view>
</view>
</view>
<view class="bottom_bs" @click="equityShow = true">
@ -23,12 +22,12 @@
<view style="font-size: 14px; color: #333; margin-left: 5px; ">签到规则</view>
</view>
</view>
<view class="anniu">
<view class="anniu" :style="isSignIn ? 'background: #FF9655;' : 'background: #999999;'" @click="goSignIn()">
签到
</view>
<u-overlay :show="show" @click="show = false">
<view class="box_">
<view class="r_size">+10积分</view>
<view class="r_size">+{{integral}}积分</view>
</view>
</u-overlay>
<u-popup :show="equityShow" :closeable="true" :round="10" mode="bottom" @close="equityclose">
@ -66,7 +65,10 @@
show: false,
equityShow: false,
list: [],
signInRule: ''
signInRule: '',
signInDays: '01',
isSignIn: false,
integral: 0,
}
},
onLoad() {
@ -88,11 +90,46 @@
onShow() {
this.getList()
this.getSignIn()
this.getIsSignIn()
},
components: {
},
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() {
request({
url: '/business/integral/integralSettings/getIntegralSignInRules',
@ -101,7 +138,6 @@
storeId: uni.getStorageSync("storeId")
}
}).then((res) => {
console.log(res, 104);
if (res.code == 200) {
this.signInRule = res.data
}
@ -110,9 +146,9 @@
equityclose() {
this.equityShow = false
},
setIndex(index) {
setIndex(index, data) {
this.wIndex = index
this.show = true
this.integral = data.integral
},
getList() {
request({
@ -122,9 +158,9 @@
storeId: uni.getStorageSync("storeId")
}
}).then((res) => {
console.log(res, 107);
if (res.code == 200) {
this.list = res.data
this.list = res.data.integralSettings
this.signInDays = res.data.signInDays
}
})
},