9.27
This commit is contained in:
parent
d0d804734b
commit
dc7e6e1cbd
@ -127,6 +127,10 @@ public class FleetMember extends BaseEntity implements Serializable {
|
||||
private Date updateTime;
|
||||
|
||||
private Integer userId;
|
||||
/**
|
||||
* 是否开启消费通知:0开启,1不开启
|
||||
*/
|
||||
private Integer isOpenNotice;
|
||||
|
||||
}
|
||||
|
||||
|
@ -144,7 +144,7 @@
|
||||
车队管理
|
||||
</view>
|
||||
</view>
|
||||
<view class="centenr-sx">
|
||||
<view class="centenr-sx" @click="goJP()">
|
||||
<view class="centenr-img">
|
||||
<image src="@/static/icon/icon/newmy11.png"></image>
|
||||
</view>
|
||||
@ -388,6 +388,11 @@
|
||||
url: '/pagesMy/growthValue/index'
|
||||
})
|
||||
},
|
||||
goJP() {
|
||||
uni.navigateTo({
|
||||
url: '/pagesHome/prize/index'
|
||||
})
|
||||
},
|
||||
goFleet() {
|
||||
uni.navigateTo({
|
||||
url: '/pagesMy/fleetInfo/index'
|
||||
|
@ -53,20 +53,23 @@
|
||||
</view> -->
|
||||
</view>
|
||||
|
||||
<view class="card_" @click="goDetails('fleet')" v-if="fleetInfo">
|
||||
<view class="top_card">
|
||||
<view class="">车队名称</view>
|
||||
<view class="" @click="goCode()">
|
||||
<image src="../../static/new/rwm.png" style="width: 25px; height: 25px; "></image>
|
||||
<view v-if="fleetList.length>0">
|
||||
<view class="card_" v-for="(item,index) in fleetList" :key="index" @click="goDetails('fleet',item.id)">
|
||||
<view class="top_card">
|
||||
<view class="">{{item.fleetName}}</view>
|
||||
<view class="" @click="goCode()">
|
||||
<image src="../../static/new/rwm.png" style="width: 25px; height: 25px; "></image>
|
||||
</view>
|
||||
</view>
|
||||
<view class="card-b">
|
||||
当前余额
|
||||
</view>
|
||||
<view class="card-num">
|
||||
¥{{item.totalBalance || 0}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="card-b">
|
||||
当前余额
|
||||
</view>
|
||||
<view class="card-num">
|
||||
¥{{cardBalance.cardBalance || 0}}
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
||||
@ -87,7 +90,7 @@
|
||||
cardsIndex: 0,
|
||||
title: '',
|
||||
giftInfo: {},
|
||||
fleetInfo:{}
|
||||
fleetList: []
|
||||
}
|
||||
},
|
||||
|
||||
@ -101,22 +104,22 @@
|
||||
this.getFleetInfo()
|
||||
},
|
||||
methods: {
|
||||
getFleetInfo(){
|
||||
getFleetInfo() {
|
||||
request({
|
||||
url: '/fleetInfo/getFleetInfoByStoreId',
|
||||
method: 'get',
|
||||
params:{storeId:uni.getStorageSync('storeId')}
|
||||
params: {
|
||||
storeId: uni.getStorageSync('storeId')
|
||||
}
|
||||
}).then(res => {
|
||||
if (res.code == 200) {
|
||||
this.fleetInfo = res.data
|
||||
console.log(this.fleetInfo, '111');
|
||||
}else{
|
||||
this.fleetInfo = {}
|
||||
this.fleetList = res.data
|
||||
console.log(this.fleetList, '111');
|
||||
}
|
||||
})
|
||||
},
|
||||
goFleetDetails(){
|
||||
|
||||
goFleetDetails() {
|
||||
|
||||
},
|
||||
goCode() {
|
||||
uni.navigateTo({
|
||||
@ -128,11 +131,38 @@
|
||||
url: '/pagesHome/oilRecharge/oilRecharge?id=' + id
|
||||
})
|
||||
},
|
||||
goDetails(val) {
|
||||
goDetails(val, fleetId) {
|
||||
if (fleetId) {
|
||||
uni.navigateTo({
|
||||
url: '/pagesHome/cardDetails/index?type=' + val + '&fleetId=' + fleetId
|
||||
})
|
||||
return
|
||||
}
|
||||
uni.navigateTo({
|
||||
url: '/pagesHome/cardDetails/index?type=' + val
|
||||
})
|
||||
},
|
||||
getCardFuleRecords() {
|
||||
request({
|
||||
url: 'business/marketingActivity/cardFuelRecord/queryByPageApplet',
|
||||
method: 'get',
|
||||
}).then(res => {
|
||||
if (res.code == 200) {
|
||||
this.cardsList = res.data.records
|
||||
}
|
||||
})
|
||||
},
|
||||
getUserBalance() {
|
||||
request({
|
||||
url: '/business/userManager/user/getUserBalanceApplet',
|
||||
method: 'get',
|
||||
params: this.query
|
||||
}).then(res => {
|
||||
if (res.code == 200) {
|
||||
this.cardBalance = res.data
|
||||
}
|
||||
})
|
||||
},
|
||||
s_() {
|
||||
if (this.cardsIndex == 0) {
|
||||
uni.showToast({
|
||||
@ -156,29 +186,6 @@
|
||||
}
|
||||
|
||||
},
|
||||
getCardFuleRecords() {
|
||||
request({
|
||||
url: 'business/marketingActivity/cardFuelRecord/queryByPageApplet',
|
||||
method: 'get',
|
||||
}).then(res => {
|
||||
if (res.code == 200) {
|
||||
this.cardsList = res.data.records
|
||||
console.log(this.cardsList, '131');
|
||||
}
|
||||
})
|
||||
},
|
||||
getUserBalance() {
|
||||
request({
|
||||
url: '/business/userManager/user/getUserBalanceApplet',
|
||||
method: 'get',
|
||||
params: this.query
|
||||
}).then(res => {
|
||||
if (res.code == 200) {
|
||||
this.cardBalance = res.data
|
||||
console.log(res.data);
|
||||
}
|
||||
})
|
||||
},
|
||||
goback() {
|
||||
uni.navigateBack()
|
||||
}
|
||||
|
@ -39,19 +39,19 @@
|
||||
<view class="top-box" v-if="type=='fleet'">
|
||||
<view class="t-db">
|
||||
<view class="d-s">
|
||||
<view style="margin-right: 10px;">储值卡</view>
|
||||
<view style="margin-right: 10px;">{{fleetInfo.cardType}}</view>
|
||||
<view class="icon_">主卡</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="on-title">总余额(元)</view>
|
||||
<view class="on-num">123456.78</view>
|
||||
<view class="on-num">{{fleetInfo.totalBalance}}</view>
|
||||
<view class="d-a">
|
||||
<view class="_dj">
|
||||
<view class="">10909.20</view>
|
||||
<view class="">{{fleetInfo.rechargeAmount}}</view>
|
||||
<view style="font-size: 14px;">本金金额(元)</view>
|
||||
</view>
|
||||
<view class="_dj">
|
||||
<view class="">109053.60</view>
|
||||
<view class="">{{fleetInfo.giveAmount}}</view>
|
||||
<view style="font-size: 14px;">赠送金额(元)</view>
|
||||
</view>
|
||||
</view>
|
||||
@ -95,7 +95,7 @@
|
||||
</view>
|
||||
<u-icon name="arrow-right" color="#333"></u-icon>
|
||||
</view>
|
||||
<view class="g-box">
|
||||
<view class="g-box" @click="goFleetMember()">
|
||||
<view class="d-s">
|
||||
<image src="../../static/my/fleetMember.png" style="width: 20px; height: 20px;margin-right: 5px; ">
|
||||
</image>
|
||||
@ -205,11 +205,17 @@
|
||||
equityShow: false,
|
||||
windex: 0,
|
||||
cardBalance: {},
|
||||
equity: {}
|
||||
equity: {},
|
||||
fleetInfo: {},
|
||||
fleetId: ''
|
||||
}
|
||||
},
|
||||
onLoad(e) {
|
||||
this.type = e.type
|
||||
if (e.type) this.type = e.type
|
||||
if (e.fleetId) {
|
||||
this.fleetId = e.fleetId
|
||||
this.getFleetInfo()
|
||||
}
|
||||
},
|
||||
onShow() {
|
||||
this.query.chainStoreId = uni.getStorageSync('chainStoreId');
|
||||
@ -217,10 +223,31 @@
|
||||
this.getEquity()
|
||||
},
|
||||
methods: {
|
||||
// 跳转车队信息
|
||||
goFleet(){
|
||||
getFleetInfo() {
|
||||
request({
|
||||
url: '/fleetInfo/' + this.fleetId,
|
||||
method: 'get',
|
||||
}).then(res => {
|
||||
if (res.code == 200) {
|
||||
this.fleetInfo = res.data
|
||||
console.log(res, '151');
|
||||
}
|
||||
})
|
||||
},
|
||||
goFleetMember(){
|
||||
uni.navigateTo({
|
||||
url: '/pagesMy/fleetInfo/index'
|
||||
url:'/pagesMy/fleetMember/index?fleetId='+this.fleetId
|
||||
})
|
||||
},
|
||||
goZJ(){
|
||||
uni.navigateTo({
|
||||
url:'/pagesMy/fleetInfo/fund'
|
||||
})
|
||||
},
|
||||
// 跳转车队信息
|
||||
goFleet() {
|
||||
uni.navigateTo({
|
||||
url: '/pagesMy/fleetInfo/index?fleetId='+this.fleetId
|
||||
})
|
||||
},
|
||||
goCode() {
|
||||
@ -241,7 +268,6 @@
|
||||
}).then(res => {
|
||||
if (res.code == 200) {
|
||||
this.equity = res.data
|
||||
console.log(res, '151');
|
||||
}
|
||||
})
|
||||
},
|
||||
|
@ -26,7 +26,10 @@
|
||||
<view class="si_">1、每人限领{{couponInfo.getNumLimit || 0}}张</view>
|
||||
<view class="si_">2、每日限领{{couponInfo.dayGetLimit || 0}}张</view>
|
||||
<view class="si_">核销说明:</view>
|
||||
<view class="si_">核销说明:</view>
|
||||
<view class="si_" style="display: flex;" v-for="(item,index) in couponInfo.hxList" :key="index">
|
||||
<view style="width: 6px;height: 6px;border-radius: 50%;margin-right: 5px;background-color: #FF9655;margin-top: 6px;"></view>
|
||||
<view>{{item}}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="bai-box">
|
||||
<view style="width: 100%; display: flex;align-items: center;justify-content: space-between; ">
|
||||
|
@ -18,7 +18,7 @@
|
||||
</view>
|
||||
<view class="card-box" v-for="(item,index) in cardsList" :key="index"
|
||||
:style="'background: url('+item.bgImg+') no-repeat;background-size: 100% 100%; '"
|
||||
@click="goRecharge(item.id,item.cardRecordId)">
|
||||
@click="goRecharge(item.cardCouponId,item.bgImg)">
|
||||
<view style="width: 20%;"></view>
|
||||
<view class="right-box">
|
||||
<view class="title">{{item.couponName}}</view>
|
||||
@ -170,11 +170,9 @@
|
||||
|
||||
})
|
||||
},
|
||||
goRecharge(id, cardRecordId) {
|
||||
goRecharge(id, bgImg) {
|
||||
uni.navigateTo({
|
||||
url: '/pages/refuel/refuel?id=0&cardFavorableId=' + id +
|
||||
'&cardRecordId=' +
|
||||
cardRecordId
|
||||
url: '/pagesMy/Coupons/details?certificateId=' + id + '&bgImg=' + bgImg
|
||||
})
|
||||
},
|
||||
click(item) {
|
||||
|
@ -3,55 +3,201 @@
|
||||
<view class="Candywrapper">
|
||||
<view class="bai-bs">
|
||||
<view class="">
|
||||
<image src="../../static/logo.png" style="width: 60px; height: 60px; "></image>
|
||||
<!-- <image :src="couponInfo.backgroundImage" v-if="couponInfo.backgroundImage" style="width: 60px; height: 60px; "></image>
|
||||
<image src="../../static/logo.png" v-else style="width: 60px; height: 60px; "></image> -->
|
||||
</view>
|
||||
<view class="rr-box">
|
||||
<view class="title_">50元优惠券</view>
|
||||
<view style="font-size: 12px;color: #666666;">最低消费500元</view>
|
||||
<view style="width: 100%;display: flex;justify-content: space-between; ">
|
||||
<view class="red-size">兑换券</view>
|
||||
<view class="red-size">剩余3张</view>
|
||||
<view class="card-box" :style="'background: url('+bgImg+') no-repeat;background-size: 100% 100%; '">
|
||||
<view style="width: 20%;"></view>
|
||||
<view class="right-box">
|
||||
<view class="title">{{couponInfo.name}}</view>
|
||||
<view class="hui-size">{{couponInfo.useCondition}}</view>
|
||||
<view style="width: 100%;display: flex;justify-content: space-between; ">
|
||||
<view class="red-size" v-if="couponInfo.type==1">代金券</view>
|
||||
<view class="red-size" v-if="couponInfo.type==2">兑换券</view>
|
||||
<view class="red-size" v-if="couponInfo.type==3">折扣券</view>
|
||||
<view class="red-size" v-if="couponInfo.type==4">油品立减券</view>
|
||||
<view class="red-size" v-if="couponInfo.type==5">单品代金券</view>
|
||||
<view class="red-size">
|
||||
剩余{{ couponInfo.tfGetNum ? (couponInfo.tfTotal - couponInfo.tfGetNum) : couponInfo.tfTotal}}张
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="bai-box">
|
||||
<view class="title_">使用须知</view>
|
||||
<view class="si_">消费条件:订单金额满300元可用</view>
|
||||
<view class="si_">有效期:领取后10天内有效</view>
|
||||
<view class="si_">有效期:领取后{{couponInfo.validityDay || 0}}天内有效</view>
|
||||
<view class="si_">领取说明:</view>
|
||||
<view class="si_"> 1、每人限领10张 2、每日</view>
|
||||
<view class="si_">1、每人限领{{couponInfo.getNumLimit || 0}}张</view>
|
||||
<view class="si_">2、每日限领{{couponInfo.dayGetLimit || 0}}张</view>
|
||||
<view class="si_">核销说明:</view>
|
||||
<view class="si_" style="display: flex;align-items: center;">
|
||||
<view style="width: 6px;height: 6px;background: #FF9655;margin-right: 5px;border-radius: 50%;">
|
||||
<view class="si_" style="display: flex;" v-for="(item,index) in couponInfo.hxList" :key="index">
|
||||
<view
|
||||
style="width: 6px;height: 6px;border-radius: 50%;margin-right: 5px;background-color: #FF9655;margin-top: 6px;">
|
||||
</view>
|
||||
以下模块可用:一键加油、扫码买单
|
||||
<view>{{item}}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="bai-box">
|
||||
<view style="width: 100%; display: flex;align-items: center;justify-content: space-between; ">
|
||||
<view class="title_">适用门店</view>
|
||||
<view class="d-s" style="font-size: 14px;color: #FF2828;">
|
||||
<view class="d-s" style="font-size: 14px;color: #FF2828;" @click="goGoGo()">
|
||||
<image src="../../static/icon/reddh.png" style="width: 18px; height: 18px; "></image>
|
||||
导航
|
||||
</view>
|
||||
</view>
|
||||
<view class="si">中建锦绣广场二期站</view>
|
||||
<view class="si">山东省济南市槐荫区 | 3.0km</view>
|
||||
<view class="si">{{store.name}}</view>
|
||||
<view class="si">{{store.address}} | {{distance}}km</view>
|
||||
|
||||
</view>
|
||||
<view class="but-sub">保存</view>
|
||||
<view class="but-sub" @click="showl=!showl">立即使用</view>
|
||||
|
||||
|
||||
<u-popup :show="showl" :round="10" mode="bottom" @close="close" @open="open">
|
||||
<view class="">
|
||||
<view class="pop-top">
|
||||
<view style="width: 20px;"></view>
|
||||
<view class="">立即使用</view>
|
||||
<view class=""><u-icon name="close"></u-icon></view>
|
||||
</view>
|
||||
<view class="popup-box">
|
||||
<view class="">
|
||||
<view class="">请向商家出示此码使用</view>
|
||||
<view style="display: flex;align-items: center;justify-content: center; margin: 10px auto;">
|
||||
<w-qrcode :options="options"></w-qrcode>
|
||||
</view>
|
||||
|
||||
<view class="">核销码:6688172293684182</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</u-popup>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import request from '../../utils/request';
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
value: 0
|
||||
value: 0,
|
||||
certificateId: '',
|
||||
bgImg: '',
|
||||
couponInfo: {},
|
||||
AppToken: uni.getStorageSync("App-Token"),
|
||||
// 当前经度信息
|
||||
longitude: "",
|
||||
// 当前纬度信息
|
||||
latitude: "",
|
||||
// 店铺经度信息
|
||||
lon: "",
|
||||
// 店铺纬度信息
|
||||
lat: "",
|
||||
// 店铺信息
|
||||
store: {
|
||||
name: "测试油站",
|
||||
description: "济南分店",
|
||||
address: "济南槐荫区"
|
||||
},
|
||||
distance: 0,
|
||||
showl: true,
|
||||
options: {
|
||||
code: 'https://oilapi.youkerr.com/oily?storeId=' + uni.getStorageSync('storeId') + '&userId=' + uni
|
||||
.getStorageSync('userId') + '&type=yaoqingyouli',
|
||||
// code: 'https://www.tuofeng.cc/oily?storeId=' + uni.getStorageSync('storeId') + ' &userId=' + uni
|
||||
// .getStorageSync('userId'), // 生成二维码的值
|
||||
size: 400, // 460代表生成的二维码的宽高均为460rpx
|
||||
},
|
||||
}
|
||||
},
|
||||
onLoad(e) {
|
||||
this.certificateId = e.certificateId
|
||||
this.bgImg = e.bgImg
|
||||
this.getInfo()
|
||||
this.getAddress(uni.getStorageSync("storeId"))
|
||||
},
|
||||
methods: {
|
||||
close() {
|
||||
this.showl = false
|
||||
},
|
||||
|
||||
goGoGo() {
|
||||
let lat = Number(this.lat)
|
||||
let lon = Number(this.lon)
|
||||
uni.openLocation({
|
||||
latitude: lat,
|
||||
longitude: lon,
|
||||
name: this.store.name,
|
||||
address: this.store.address,
|
||||
|
||||
success: function() {
|
||||
console.log('success');
|
||||
},
|
||||
complete: function(res) {
|
||||
console.log(res);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 获取当前位置
|
||||
getAddress(storeId) {
|
||||
let _this = this;
|
||||
uni.getLocation({
|
||||
// 谷歌使用wgs84 其他使用gcj02
|
||||
type: 'gcj02', // 使用国测局坐标系
|
||||
success: function(res) {
|
||||
if (_this.longitude == "" && _this.latitude == "") {
|
||||
|
||||
_this.longitude = res.longitude;
|
||||
_this.latitude = res.latitude
|
||||
}
|
||||
console.log('经度: ' + _this.longitude);
|
||||
console.log('纬度: ' + _this.latitude);
|
||||
request({
|
||||
url: 'business/storeInformation/store/recentlyStore',
|
||||
method: 'post',
|
||||
data: {
|
||||
"lon": _this.longitude,
|
||||
"lat": _this.latitude,
|
||||
"storeId": storeId,
|
||||
"isLogin": _this.AppToken ? "0" : "1", // 0为登录
|
||||
|
||||
},
|
||||
}).then((response) => {
|
||||
if (response.data.store) {
|
||||
_this.distance = (Math.ceil(response.data.distance))
|
||||
.toFixed(1)
|
||||
_this.store = response.data.store
|
||||
|
||||
_this.lon = _this.store.longitude
|
||||
_this.lat = _this.store.latitude
|
||||
console.log(_this.store, 129);
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: "当前店铺已关闭!!!",
|
||||
icon: "none"
|
||||
})
|
||||
}
|
||||
|
||||
}).catch(err => {})
|
||||
},
|
||||
fail: function(err) {
|
||||
console.log('获取位置信息失败: ' + err.errMsg);
|
||||
}
|
||||
});
|
||||
},
|
||||
getInfo() {
|
||||
request({
|
||||
url: '/cardCoupon/' + this.certificateId,
|
||||
method: 'get',
|
||||
}).then(res => {
|
||||
console.log(res, 74);
|
||||
if (res.code == 200) {
|
||||
this.couponInfo = res.data
|
||||
}
|
||||
})
|
||||
},
|
||||
valChange(e) {
|
||||
console.log('当前值为: ' + e.value)
|
||||
}
|
||||
@ -159,4 +305,50 @@
|
||||
bottom: 40px;
|
||||
left: 11%;
|
||||
}
|
||||
|
||||
.card-box {
|
||||
width: 95%;
|
||||
background: #ffffff;
|
||||
height: 90px;
|
||||
box-sizing: border-box;
|
||||
padding: 15px;
|
||||
|
||||
margin: 10px auto;
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.right-box {
|
||||
width: 80%;
|
||||
|
||||
}
|
||||
|
||||
.hui-size {
|
||||
font-size: 12px;
|
||||
color: #999999;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
overflow: hidden;
|
||||
margin: 5px 0;
|
||||
}
|
||||
|
||||
.popup-box {
|
||||
background: #fff;
|
||||
box-sizing: border-box;
|
||||
padding: 10px;
|
||||
background: #ffffff;
|
||||
margin: 15px auto;
|
||||
box-sizing: border-box;
|
||||
padding: 10px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.pop-top {
|
||||
width: 100%;
|
||||
box-sizing: border-box;
|
||||
padding: 10px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
border-bottom: 1px solid #eee;
|
||||
}
|
||||
</style>
|
@ -9,7 +9,7 @@
|
||||
</view>
|
||||
<view class="box-hang">
|
||||
<view class=""><span style="color: red;">*</span>开户门店</view>
|
||||
<view class="dis">
|
||||
<view class="dis" @click="show1=!show1">
|
||||
<text>{{storeName || '暂未选择'}}</text>
|
||||
<u-icon name="arrow-right" size="14"></u-icon>
|
||||
</view>
|
||||
@ -23,25 +23,28 @@
|
||||
<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="fleetInfo.status" activeValue='qy' inactiveValue='jy' 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">
|
||||
<text>xxxxxx</text>
|
||||
<image style="width: 24px;height: 24px;margin-left: 5px;" src="@/static/my/fleetRemove.png"></image>
|
||||
<text>{{fleetInfo.fleetLeader}}</text>
|
||||
<!-- <image style="width: 24px;height: 24px;margin-left: 5px;" src="@/static/my/fleetRemove.png"></image> -->
|
||||
</view>
|
||||
</view>
|
||||
<view class="box-end">
|
||||
<!-- <view class="box-end">
|
||||
<image style="width: 15px;height: 15px;margin-right: 5px;margin-top: 6px;"
|
||||
src="@/static/my/fleetAdd.png"></image>
|
||||
<text>添加管理员</text>
|
||||
</view>
|
||||
</view> -->
|
||||
|
||||
<view class="but-sub">保存</view>
|
||||
<view class="but-sub" @click="submitFrom()">保存</view>
|
||||
|
||||
<u-picker :show="show" :columns="columns" @cancel="cancel" @confirm="confirm" keyName="realName"></u-picker>
|
||||
<u-picker :show="show" :columns="columns" @cancel="cancel" @confirm="confirm" ></u-picker>
|
||||
<u-picker :show="show1" :columns="columns1" @cancel="cancel1" @confirm="confirm1"
|
||||
keyName="name"></u-picker>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
@ -63,18 +66,20 @@
|
||||
columns: [
|
||||
['储值卡', '囤油卡']
|
||||
],
|
||||
show1: false,
|
||||
columns1: [],
|
||||
// 员工列表信息
|
||||
staffList: [],
|
||||
fleetInfo: {
|
||||
cardType: '储值卡'
|
||||
cardType: '储值卡',
|
||||
status: 'qy'
|
||||
},
|
||||
storeName: '',
|
||||
storeList: []
|
||||
storeList: [],
|
||||
user: {},
|
||||
fleetId:''
|
||||
}
|
||||
},
|
||||
onShow() {
|
||||
this.getStoreList()
|
||||
},
|
||||
onPullDownRefresh() {
|
||||
//下拉刷新
|
||||
|
||||
@ -86,12 +91,79 @@
|
||||
|
||||
}
|
||||
},
|
||||
|
||||
onLoad(e) {
|
||||
if (e.fleetId){
|
||||
this.fleetId = e.fleetId
|
||||
this.getFleetInfo()
|
||||
}else{
|
||||
this.getUser()
|
||||
this.getStoreList(uni.getStorageSync('storeId'))
|
||||
}
|
||||
},
|
||||
onShow() {
|
||||
|
||||
},
|
||||
components: {
|
||||
|
||||
},
|
||||
methods: {
|
||||
getStoreList() {
|
||||
getFleetInfo() {
|
||||
request({
|
||||
url: '/fleetInfo/' + this.fleetId,
|
||||
method: 'get',
|
||||
}).then(res => {
|
||||
if (res.code == 200) {
|
||||
this.fleetInfo = res.data
|
||||
this.getStoreList(res.data.storeId)
|
||||
}
|
||||
})
|
||||
},
|
||||
submitFrom(){
|
||||
if (!this.fleetInfo.fleetName){
|
||||
uni.showToast({
|
||||
title:"请输入车队名称",
|
||||
icon:'none'
|
||||
})
|
||||
return;
|
||||
}
|
||||
if (this.fleetInfo.id){
|
||||
request({
|
||||
url: '/fleetInfo',
|
||||
method: 'put',
|
||||
data:this.fleetInfo
|
||||
}).then(res => {
|
||||
uni.navigateTo({
|
||||
url:'/pagesHome/cardDetails/index?type=fleet&fleetId='+res.data
|
||||
})
|
||||
})
|
||||
}else{
|
||||
request({
|
||||
url: 'fleetInfo/addFleetInfo',
|
||||
method: 'post',
|
||||
data:this.fleetInfo
|
||||
}).then(res => {
|
||||
uni.navigateTo({
|
||||
url:'/pagesHome/cardDetails/index?type=fleet&fleetId='+res.data
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
},
|
||||
// 查询当前登录用户信息
|
||||
getUser() {
|
||||
request({
|
||||
url: 'business/userManager/user/getUser',
|
||||
method: 'get',
|
||||
}).then(res => {
|
||||
if (res.data) {
|
||||
this.user = res.data
|
||||
this.fleetInfo.fleetLeader = res.data.name
|
||||
this.fleetInfo.mobile = res.data.mobile
|
||||
this.fleetInfo.userId = res.data.id
|
||||
}
|
||||
})
|
||||
},
|
||||
getStoreList(storeId) {
|
||||
request({
|
||||
url: '/business/storeInformation/store/selectByStoreId',
|
||||
method: 'get',
|
||||
@ -102,18 +174,29 @@
|
||||
if (res.code == 200) {
|
||||
this.storeList = res.data
|
||||
this.storeList.forEach(item => {
|
||||
if (item.id == uni.getStorageSync("storeId")){
|
||||
if (item.id == storeId) {
|
||||
this.storeName = item.name
|
||||
this.fleetInfo.storeId = storeId
|
||||
}
|
||||
})
|
||||
this.columns1 = []
|
||||
this.columns1.push(this.storeList)
|
||||
}
|
||||
console.log(res, '105');
|
||||
})
|
||||
},
|
||||
cancel1() {
|
||||
this.show1 = false
|
||||
},
|
||||
confirm1(e) {
|
||||
this.storeName = e.value[0].name
|
||||
this.fleetInfo.storeId = e.value[0].id
|
||||
this.show1 = false
|
||||
},
|
||||
cancel() {
|
||||
this.show = false
|
||||
},
|
||||
confirm() {
|
||||
confirm(e) {
|
||||
this.fleetInfo.cardType = e.value[0]
|
||||
this.show = false
|
||||
},
|
||||
goback() {
|
||||
|
@ -4,19 +4,19 @@
|
||||
<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.name" style="text-align: right;" placeholder="请输入"></input>
|
||||
</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.mobile" 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.userCardNum" style="text-align: right;" placeholder="请输入"></input>
|
||||
</view>
|
||||
</view>
|
||||
<view class="box-hang">
|
||||
@ -42,13 +42,14 @@
|
||||
<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="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>
|
||||
@ -83,6 +84,7 @@
|
||||
columns: [
|
||||
['共享副卡-不限额', '共享副卡-限额', '独立副卡']
|
||||
],
|
||||
memberInfo: {},
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
@ -95,7 +97,7 @@
|
||||
onReachBottom() {
|
||||
// 触底加载
|
||||
if (this.pageNo >= this.totalPage) {
|
||||
|
||||
|
||||
} else {
|
||||
this.pageNo++
|
||||
|
||||
|
@ -6,15 +6,15 @@
|
||||
<u-icon name="search" size="20"></u-icon>
|
||||
</view>
|
||||
|
||||
<view class="top-box">
|
||||
<view class="top-box" v-for="(item,index) in memberList" :key="index">
|
||||
<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;">{{item.name}}</view>
|
||||
<view class="icon_" v-if="item.secondaryCardType">{{item.secondaryCardType}}</view>
|
||||
<view class="icon_" v-if="item.carNum">{{item.carNum}}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="on-title">342.55</view>
|
||||
<view class="on-title">{{item.remainingCreditLimit}}</view>
|
||||
</view>
|
||||
|
||||
<view class="but-sub" @click="goAddFleet()">添加成员</view>
|
||||
@ -35,9 +35,16 @@
|
||||
pageSize: 10,
|
||||
totalPage: '',
|
||||
value: '',
|
||||
memberList:[],
|
||||
fleetId:''
|
||||
}
|
||||
},
|
||||
onLoad(e) {
|
||||
if (e.fleetId){
|
||||
this.fleetId = e.fleetId
|
||||
this.getList()
|
||||
}
|
||||
},
|
||||
onLoad() {},
|
||||
onPullDownRefresh() {
|
||||
//下拉刷新
|
||||
uni.stopPullDownRefresh()
|
||||
@ -55,6 +62,20 @@
|
||||
|
||||
},
|
||||
methods: {
|
||||
getList(){
|
||||
request({
|
||||
url: '/fleetMember/nameOrMobile',
|
||||
method: 'get',
|
||||
params:{
|
||||
fleetId:this.fleetId,
|
||||
page:1,
|
||||
pageSize:1000
|
||||
}
|
||||
}).then(res => {
|
||||
this.memberList = res.data.records
|
||||
console.log(res,73);
|
||||
})
|
||||
},
|
||||
goAddFleet() {
|
||||
uni.navigateTo({
|
||||
url: '/pagesMy/fleetMember/addMember'
|
||||
|
Loading…
Reference in New Issue
Block a user