This commit is contained in:
cun-nan 2024-09-22 14:16:55 +08:00
parent 049685178d
commit 297d52e5ea
4 changed files with 116 additions and 52 deletions

View File

@ -130,7 +130,7 @@ public class LJStaffServiceImpl extends ServiceImpl<LJStaffMapper, LJStaff> impl
QueryWrapper queryWrapper = new QueryWrapper<>(); QueryWrapper queryWrapper = new QueryWrapper<>();
queryWrapper.eq("store_id", storeId); queryWrapper.eq("store_id", storeId);
queryWrapper.eq("status", "qy"); queryWrapper.eq("status", "qy");
queryWrapper.eq("role_id", "15"); // queryWrapper.eq("role_id", "15");
queryWrapper.eq("if_delete", "0"); queryWrapper.eq("if_delete", "0");
queryWrapper.eq("is_refuel", "xs"); queryWrapper.eq("is_refuel", "xs");
List list = baseMapper.selectList(queryWrapper); List list = baseMapper.selectList(queryWrapper);

View File

@ -298,10 +298,10 @@
<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 12" <view class="xanniu" :class="{'acvit' : anIndex == index }" v-for="(item,index) in staffList"
:key="index" @click="setadindex(index)"> :key="index" @click="setadindex(index)">
<view class="">员工名</view> <view class="">{{item.realName}}</view>
</view> </view>
</view> </view>
</view> </view>
@ -310,17 +310,17 @@
<view class="popup-box"> <view class="popup-box">
<view class="p_title">选择油品油枪</view> <view class="p_title">选择油品油枪</view>
<scroll-view scroll-x="true" class="tap-top"> <scroll-view scroll-x="true" class="tap-top">
<view class="sz" :class="{'acvit': qhindex == index}" v-for="(item,index) in 5" :key="index" <view class="sz" :class="{'acvit': qhindex == index}" v-for="(item,index) in oilNumberList"
@click="setQindex(index)"> :key="index" @click="setQindex(index,item)">
<view>全部</view> <view>{{item.oilName}}</view>
</view> </view>
</scroll-view> </scroll-view>
<view class="wr_box"> <view class="wr_box">
<view class="xanniu" :class="{'acvit' : anIndex == index }" v-for="(item,index) in 9" <view class="xanniu" :class="{'acvit' : anIndex == index }"
:key="index" @click="setadindex(index)"> v-for="(item,index) in oilGunList" :key="index" @click="setadindex(index)">
<view class="">1号枪</view> <view class="">{{item.gunName}}</view>
<view class="">汽油92#</view> <view class="">{{item.oilName}}</view>
</view> </view>
</view> </view>
@ -562,8 +562,16 @@
cardTypeclose() { cardTypeclose() {
this.cardType = false this.cardType = false
}, },
setQindex() { setQindex(index, data) {
this.qhindex = false this.qhindex = index
this.oilGunList = data.oilGunList
if (data.oilGunList.length > 0) {
this.oilOrder.oilGunNum = data.oilGunList[0].id
this.oilPrice = data.oilPrice
this.oilUnit = data.unit
this.oilOrder.oils = data.oilNameId
uni.setStorageSync("tankId", data.oilGunList[0].tankId)
}
}, },
ypClose() { ypClose() {
this.selectShow = false this.selectShow = false
@ -735,6 +743,7 @@
// _this.welfare.push(res.data.welfare) // _this.welfare.push(res.data.welfare)
// } // }
// } // }
console.log(res, 738);
}).catch(err => { }).catch(err => {
// uni.showLoading({ // uni.showLoading({
// title: JSON.stringify(err) + 222 // title: JSON.stringify(err) + 222
@ -797,6 +806,7 @@
uni.setStorageSync("tankId", res.data[0].oilGunList[0].tankId) uni.setStorageSync("tankId", res.data[0].oilGunList[0].tankId)
} }
} }
console.log(res, 801);
}) })
}, },
// //

View File

@ -1,19 +1,22 @@
<template> <template>
<view class="content"> <view class="content">
<view class="container"> <!-- <view class="container"> -->
<view class="my-header"> <!-- <view class="my-header">
<view class="my-icons" @click="goBack"> <uni-icons type="left" color="#ffffff" size="16"></uni-icons> <view class="my-icons" @click="goBack"> <uni-icons type="left" color="#ffffff" size="16"></uni-icons>
</view> </view>
<view class="my-text">意见反馈</view> <view class="my-text">意见反馈</view>
<view class="my-icons"></view> <view class="my-icons"></view>
</view> </view> -->
<!-- 顶部区域 --> <!-- 顶部区域 -->
<view class="top-title">您提交的意见反馈将鼓励我们做得更好~</view>
<view class="box-top"> <view class="box-top">
<view class="top-title"> <view class="title_">
反馈内容 反馈内容
</view> </view>
<u--textarea v-model="value5" placeholder="请填写您的反馈和建议" border="bottom"></u--textarea> <u--textarea v-model="value5" placeholder="请填写您的反馈和建议" border="bottom"></u--textarea>
<view class="top-title" style="border-bottom: none;"> <view class="title_" style="border-bottom: none;">
相关截图选填 相关截图选填
</view> </view>
<u-upload :fileList="fileList1" @afterRead="afterRead" @delete="deletePic" name="1" multiple <u-upload :fileList="fileList1" @afterRead="afterRead" @delete="deletePic" name="1" multiple
@ -24,7 +27,7 @@
</view> </view>
</view> <!-- </view> -->
</view> </view>
</template> </template>
@ -179,15 +182,26 @@
.anniu { .anniu {
width: 95%; width: 95%;
background: #1678ff; height: 40px;
margin: 10px auto;
margin-top: 50px;
border-radius: 4px;
background: #FA6400;
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
color: white; color: white;
margin: 10px auto;
border-radius: 50px;
box-sizing: border-box;
padding: 10px 0px;
} }
.title_ {
margin: 10px 0px;
}
.top-title {
background: rgba(255, 150, 85, 0.15);
box-sizing: border-box;
padding: 10px;
}
</style> </style>

View File

@ -11,8 +11,9 @@
<button class="box-hang" open-type="chooseAvatar" @chooseavatar="onChooseAvatar"> <button class="box-hang" open-type="chooseAvatar" @chooseavatar="onChooseAvatar">
<view class="">头像</view> <view class="">头像</view>
<view class="touxiang"> <view class="touxiang">
<image class="touxiang" v-if="user.avatar!='' && user.avatar!=null && user.avatar!=undefined" :src="baseUrl + user.avatar" mode="aspectFit"></image> <image class="touxiang" v-if="user.avatar!='' && user.avatar!=null && user.avatar!=undefined"
<image class="touxiang" v-else src="@/static/imgs/myx.png" mode="aspectFit"></image> :src="baseUrl + user.avatar" mode="aspectFit"></image>
<image class="touxiang" v-else src="@/static/imgs/myx.png" mode="aspectFit"></image>
</view> </view>
</button> </button>
<!-- #endif --> <!-- #endif -->
@ -20,20 +21,29 @@
<button class="box-hang" @click="onChooseAvatar1"> <button class="box-hang" @click="onChooseAvatar1">
<view class="">头像</view> <view class="">头像</view>
<view class="touxiang"> <view class="touxiang">
<image class="touxiang" v-if="user.avatar!='' && user.avatar!=null && user.avatar!=undefined" :src="baseUrl + user.avatar" mode="aspectFit"></image> <image class="touxiang" v-if="user.avatar!='' && user.avatar!=null && user.avatar!=undefined"
<image class="touxiang" v-else src="@/static/imgs/myx.png" mode="aspectFit"></image> :src="baseUrl + user.avatar" mode="aspectFit"></image>
<image class="touxiang" v-else src="@/static/imgs/myx.png" mode="aspectFit"></image>
</view> </view>
</button> </button>
<!-- #endif --> <!-- #endif -->
<view class="box-hang" @click="goEdit(0)"> <view class="box-hang" @click="goEdit(0)">
<view class="">昵称</view> <view class="">昵称</view>
<view class="dis"> <view class="dis">
<text v-if="!user.name">未填写</text> <text v-if="!user.name">未填写</text>
<text v-else>{{user.name}}</text> <text v-else>{{user.name}}</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" @click="show1 =!show1">
<view class="">性别</view>
<view class="dis"> <text>{{user.sex}}</text> <uni-icons type="right" size="16"></uni-icons> </view>
</view>
<view class="box-hang" @click="show=!show">
<view class="">生日</view>
<view class="dis"> <text>{{user.birthday}}</text> <uni-icons type="right" size="16"></uni-icons> </view>
</view>
<!-- <view class="box-hang">
<view class="">手机号</view> <view class="">手机号</view>
<view class="dis"> <text>{{user.mobile}}</text> <uni-icons type="right" size="16"></uni-icons> </view> <view class="dis"> <text>{{user.mobile}}</text> <uni-icons type="right" size="16"></uni-icons> </view>
</view> </view>
@ -47,12 +57,15 @@
<text v-if="!user.carNo">未填写</text> <text v-if="!user.carNo">未填写</text>
<text v-else>{{user.carNo}}</text> <uni-icons type="right" size="16"></uni-icons> <text v-else>{{user.carNo}}</text> <uni-icons type="right" size="16"></uni-icons>
</view> </view>
</view> </view> -->
<!-- <view class="box-hang" @click="goEdit(3)"> <!-- <view class="box-hang" @click="goEdit(3)">
<view class="">支付密码</view> <view class="">会员支付设置</view>
<view class="dis"> <text></text> <uni-icons type="right" size="16"></uni-icons> </view> <view class="dis"> <text>已设置</text> <uni-icons type="right" size="16"></uni-icons> </view>
</view> --> </view> -->
<u-datetime-picker :show="show" v-model="value1" mode="date" @cancel="cancel1"
@confirm="confirm1"></u-datetime-picker>
<u-picker :show="show1" :columns="columns" @cancel="cancel" @confirm="confirm"></u-picker>
</view> </view>
</view> </view>
@ -66,12 +79,17 @@
return { return {
title: '', title: '',
// //
user:{ user: {
// //
avatar:"", avatar: "",
}, },
// url // url
baseUrl: this.$baseUrl, baseUrl: this.$baseUrl,
columns: [
['全部类型', '消费有礼', '会员充值']
],
show: false,
show1: false,
} }
}, },
onShow() { onShow() {
@ -81,19 +99,41 @@
}, },
methods: { methods: {
confirm(e) {
this.show1 = false
},
cancel() {
this.show1 = false
},
timestampToString(timestamp) {
// Date
const date = new Date(timestamp);
// 使toLocaleDateStringtoLocaleTimeString
const dateString = date.toLocaleDateString()
const timeString = date.toLocaleTimeString();
//
return date.getFullYear() + '-' + (date.getMonth() + 1);
},
confirm1(e) {
this.show = false
},
cancel1() {
this.show = false
},
// //
onChooseAvatar(e){ onChooseAvatar(e) {
let _this = this; let _this = this;
let tempFilePath = e.detail.avatarUrl // let tempFilePath = e.detail.avatarUrl //
let maxSizeInBytes = 1024*1024 // let maxSizeInBytes = 1024 * 1024 //
uni.getFileInfo({ uni.getFileInfo({
filePath:tempFilePath, filePath: tempFilePath,
success(res) { success(res) {
let fileSize = res.size let fileSize = res.size
if (fileSize > maxSizeInBytes){ if (fileSize > maxSizeInBytes) {
uni.showToast({ uni.showToast({
title:"请上传小于1MB的图片", title: "请上传小于1MB的图片",
icon:"error" icon: "error"
}) })
return return
} }
@ -111,17 +151,17 @@
}) })
}, },
// //
onChooseAvatar1(e){ onChooseAvatar1(e) {
let _this = this; let _this = this;
//使 //使
uni.chooseImage({ uni.chooseImage({
sourceType: ['album', 'camera'],// sourceType: ['album', 'camera'], //
success: (res) => { success: (res) => {
console.log('图片', res) console.log('图片', res)
var tempFilePath = res.tempFilePaths; var tempFilePath = res.tempFilePaths;
var filePath = tempFilePath[0]; var filePath = tempFilePath[0];
console.log(filePath);// console.log(filePath); //
//api //api
// //
upload({ upload({
url: '/clientApi/file/upload', url: '/clientApi/file/upload',
@ -135,11 +175,11 @@
}); });
}, },
// //
editUser(){ editUser() {
request({ request({
url: 'business/userManager/user/edit', url: 'business/userManager/user/edit',
method: 'put', method: 'put',
data:this.user, data: this.user,
}).then(res => { }).then(res => {
if (res.code == 200) { if (res.code == 200) {
this.getUser() this.getUser()
@ -147,13 +187,13 @@
}) })
}, },
// //
goEdit(val){ goEdit(val) {
uni.navigateTo({ uni.navigateTo({
url: '/pagesMy/editUser/index?editType=' + val, url: '/pagesMy/editUser/index?editType=' + val,
}) })
}, },
// //
getUser(){ getUser() {
request({ request({
url: 'business/userManager/user/getUser', url: 'business/userManager/user/getUser',
method: 'get', method: 'get',
@ -165,7 +205,7 @@
}, },
goBack() { goBack() {
uni.navigateTo({ uni.navigateTo({
url:"/pages/my/my" url: "/pages/my/my"
}) })
} }
} }