Commit 305c6217 authored by 秦威威's avatar 秦威威

打卡对接

parent a97e40e6
......@@ -212,6 +212,18 @@
"style": {
"navigationStyle": "custom"
}
},
{
"path": "pages/wx_xq",
"style": {
"navigationStyle": "custom"
}
},
{
"path": "pages/wx_lsgd",
"style": {
"navigationStyle": "custom"
}
}
]
}
......@@ -220,7 +232,10 @@
"navigationBarTextStyle": "black",
"navigationBarTitleText": "uni-app",
"navigationBarBackgroundColor": "#FFFFFF",
"backgroundColor": "#FFFFFF"
"backgroundColor": "#FFFFFF",
"app-plus": {
"bounce": "none"
}
},
/* 底部菜单 */
"tabBar": {
......
......@@ -3,11 +3,11 @@
<view style="background: linear-gradient( 180deg, #1FCA7C 0%, #F2F2F2 100%);">
<u-navbar bgColor="transparent" placeholder="true">
<view style="display: flex;align-items: center;font-size: 32rpx;color: #fff;" slot="left">
<image src="/static/icon_home_dw.png" style="width: 40rpx;height: 40rpx;margin-right: 10rpx;"
<image src="/static/icon_home_dw1.png" style="width: 30rpx;height: 30rpx;margin-right: 10rpx;"
mode=""></image>
<text>利达物业中心</text>
<image src="https://zhongqian.xnszz.com/1-images/home/20250213003.png"
style="width: 30rpx;height: 8.5rpx;margin-left: 8rpx;" mode="widthFix"></image>
<text>{{address}}</text>
<image src="/static/icon_xsj.png" style="width: 30rpx;height: 8.5rpx;margin-left: 8rpx;"
mode="widthFix"></image>
</view>
</u-navbar>
<view class="h-300 flex flex-row-between v-center ml-60 mr-35">
......@@ -44,21 +44,20 @@
export default {
data() {
return {
address: '请选择',
};
},
onLoad(options) {
//获取小区信息
const addressItem = uni.getStorageSync("addressItem")
this.address = addressItem.communityName
},
methods: {
open() {
// console.log('open');
onClick(inder) {
this.$wskj.toast('敬请期待')
},
close() {
this.show = false
// console.log('close');
}
}
};
</script>
......
......@@ -3,11 +3,11 @@
<view>
<u-navbar bgColor="#1FCA7C" placeholder="true" @leftClick="open">
<view style="display: flex;align-items: center;font-size: 32rpx;color: #fff;" slot="left">
<image src="/static/icon_home_dw.png" style="width: 40rpx;height: 40rpx;margin-right: 10rpx;"
<image src="/static/icon_home_dw1.png" style="width: 30rpx;height: 30rpx;margin-right: 10rpx;"
mode=""></image>
<text>{{address}}</text>
<image src="https://zhongqian.xnszz.com/1-images/home/20250213003.png"
style="width: 30rpx;height: 8.5rpx;margin-left: 8rpx;" mode="widthFix"></image>
<image src="/static/icon_xsj.png" style="width: 30rpx;height: 8.5rpx;margin-left: 8rpx;"
mode="widthFix"></image>
</view>
</u-navbar>
</view>
......
......@@ -96,7 +96,11 @@
return
}
if (index == 2) {
this.$wskj.to("/pagesMine/pages/yg_login")
if (this.$wskj.isNull(uni.getStorageSync('userInfo_yg'))) {
this.$wskj.to("/pagesMine/pages/yg_login")
} else {
this.$wskj.to("/pagesMine/pages/ygzy")
}
return
}
}
......
......@@ -53,12 +53,12 @@
</view>
</view>
</scroll-view>
<view class="flex mt-20 fs-24 v-center">
<view class="fw-700 fs-28">报修时间:</view>
<view class="fs-24 ml-10">{{data.repairsTime}}</view>
<view class="fs-24 ml-10" style="flex: 1;"></view>
<view @click="onCz('关闭报修')" v-if="data.state==2" class="fs-24 mr-10" style="color: #23BBEE;">
关闭报修</view>
<view class="flex mt-20 h-40 lh-40">
<text class="fw-700 fs-28">报修时间:</text>
<text class="fs-24 ml-10">{{data.repairsTime}}</text>
<text class="fs-24 ml-10" style="flex: 1;"></text>
<text @click="onCz('关闭报修')" v-if="data.state==2" class="fs-24 mr-10" style="color: #23BBEE;">
关闭报修</text>
</view>
<view v-if="data.state==2||data.state==3" class="flex-column br-12 fs-28 mt-30"
style="background: #EBF5F0;">
......
......@@ -150,7 +150,6 @@
listAll() {
const params = {
url: '/api/community/listAll',
loadingTip: '',
method: 'GET',
data: {}
}
......@@ -180,7 +179,6 @@
if (this.$refs.uCode.canGetCode) {
const params = {
url: '/api/login/sendSmsCode',
loadingTip: '',
method: 'GET',
data: {
mobile: this.data.guestPhone
......
......@@ -23,11 +23,11 @@
</view>
<view class="overflow-y" style="background: white;">
<scroll-view scroll-y style="height:100%;">
<view v-if="indexTab==1" v-for="(item, index) in 8" :key="index" @click="onClick(index)">
<view v-if="indexTab==1" v-for="(item, index) in jfjlList" :key="index" @click="onClick(index)">
<view class="flex-column fs-24 mar-20 pb-20" style="border-bottom: 1rpx solid #E9E9E9;">
<view class="flex v-center fs-28">
<text>2025年01月</text>
<text style="color: #EE0101;">108.23</text>
<text style="color: #EE0101;">{{item.payAmount}}</text>
<image style="width: 20rpx;height: 20rpx;" src="/pagesMain/static/icon_zksq_1.png">
</image>
</view>
......@@ -36,18 +36,18 @@
<text>缴费项目:物业管理费</text>
<text>房屋面积:72.15</text>
<text>单价/平米:¥1.3</text>
<text>金额:93.8</text>
<text>金额:{{item.payAmount}}</text>
</view>
</view>
</view>
<view v-if="indexTab==2" v-for="(item, index) in 10" :key="index" @click="onClick(index)">
<view v-if="indexTab==2" v-for="(item, index) in jfjlList" :key="index" @click="onClick(index)">
<view class="flex-column fs-24 mb-20" style="text-align: left;">
<text class="fs-28 h-80 lh-80 plr-25" style="background:#F2F2F2;">2024年6月</text>
<text class="fs-28 h-80 lh-80 plr-25" style="background:#F2F2F2;">{{item.month}}</text>
<view class="flex-row-between plr-25 mtb-20">
<text style="color: #999999;">缴费渠道:线上缴费</text>
<text>1355.04</text>
<text>{{item.payAmount}}</text>
</view>
<text class="plr-25" style="color: #999999;">06-06 14:29</text>
<text class="plr-25" style="color: #999999;">{{item.month}}</text>
</view>
</view>
</scroll-view>
......@@ -64,12 +64,16 @@
indexNumber: 0,
type: 0,
userinfo: '',
jfjlList: [],
djList: [],
};
},
onLoad(options) {
this.type = options.type
this.userinfo = uni.getStorageSync("userInfo")
this.getDjList()
this.getJfjlList()
},
methods: {
......@@ -82,7 +86,27 @@
},
onClick(index) {
this.indexNumber = index
}
},
//类型(1电费 2水费 3物业费 4车位管理费 5车位出租费 6储藏室出租 7其他费用)
getDjList() {
const params = {
url: '/api/liveBill/listAll?type=1',
method: 'GET',
}
this.$request(params).then(res => {
this.djList = res.data
})
},
getJfjlList() {
const params = {
url: '/api/payRecord/listAll?type=1',
method: 'GET',
}
this.$request(params).then(res => {
this.jfjlList = res.data
})
},
}
};
</script>
......
......@@ -53,7 +53,7 @@
</view>
</view>
</scroll-view>
<view class="flex mt-20 fs-28">
<view class="flex mt-20 fs-28 h-40 lh-40">
<text class="fw-700">{{data.type==1?'投诉时间:':'表扬时间:'}}</text>
<text>{{data.createTime}}</text>
</view>
......
......@@ -5,25 +5,25 @@
<text class="fs-32 fw-700 pad-30" style="text-align: left;">基本信息</text>
<view class="flex-row-between pad-30" style="border-bottom: 1rpx solid #E9E9E9;">
<text style="color: #999999;">职业</text>
<text>安保</text>
<text>{{userInfo.accountType==1?'保洁':userInfo.accountType==2?'保安':userInfo.accountType==3?'维修':''}}</text>
</view>
<view class="flex-row-between pad-30" style="border-bottom: 1rpx solid #E9E9E9;">
<text style="color: #999999;">姓名</text>
<text>张三</text>
<text>{{userInfo.accountName}}</text>
</view>
<view class="flex-row-between pad-30" style="border-bottom: 1rpx solid #E9E9E9;">
<text style="color: #999999;">性别</text>
<text></text>
<text>{{userInfo.sex==1?'':''}}</text>
</view>
<view class="flex-row-between pad-30" style="border-bottom: 1rpx solid #E9E9E9;">
<text style="color: #999999;">手机号</text>
<text>199****8989</text>
<text>{{userInfo.accountMobile}}</text>
</view>
</view>
<view class="flex-column br-12 fs-24 mt-30 pad-30" style="background: white;color: #999999;">
<text class="fs-32 fw-700" style="color: #000;">我的位置</text>
<text class="mt-20">请定位当前位置</text>
<text class="mt-20">{{address==''?'请定位当前位置':address}}</text>
<view @click="onDw" class="mt-20"
style="display: flex;flex-direction: row-reverse;align-items: center;">
<text>重新定位</text>
......@@ -32,7 +32,7 @@
<view class="mt-50" style="height: 1rpx;background: #E9E9E9;"> </view>
<text class="mt-50" style="color: #000;">拍照</text>
<view class="mt-20">
<upload-image v-model="images" maxCount="3" width="70" height="70" type="fullurl"></upload-image>
<image class="w-120 h-120" :src="image" @click="onPz()"></image>
</view>
</view>
......@@ -40,16 +40,6 @@
<view @click="onSubmit" class="fullscreen-btn mt-100">
<text>提交打卡</text>
</view>
<!-- 提交 -->
<wskj-modal :show="submitShow" :showCancelButton="true" confirmText="确定" confirmColor="#EB7318"
@close="submitShow = false" @confirm="onConfirmSubmit" @cancel="submitShow = false">
<view class="pt-40 pb-40">
<view>
<text class="fs-28">确认提交?</text>
</view>
</view>
</wskj-modal>
</view>
</template>
......@@ -61,75 +51,99 @@
type: 0,
reason: '',
submitShow: false,
images: '',
userInfo: '',
address: '',
image: '/static/icon_upload.png'
};
},
onLoad(e) {
this.userInfo = uni.getStorageSync('userInfo_yg')
this.type = e.type
if (e.type == 0) {
this.title = "安保打卡"
} else {
this.title = "保洁打卡"
}
this.onDw()
},
onShow() {
// uni.$once('imageSrc', function(data) {
// console.log('监听到事件来自 update ,携带参数 msg 为:' + data);
// this.image = data
// })
},
mounted() {
// 监听一次性事件
uni.$once('imageSrc', (data) => {
// 确保数据变化是响应式的
this.image = data // 直接赋值会触发更新
});
},
methods: {
onPz() {
this.$wskj.to("/pagesMine/pages/dkpz")
},
onDw() {
const _this = this;
uni.getLocation({
type: 'gcj02',
success: function(res) {
const latitude = res.latitude;
const longitude = res.longitude;
uni.openLocation({
latitude: latitude,
longitude: longitude,
success: function(res) {
console.log(res);
}
});
_this.reverseGeocode(latitude, longitude)
}
});
},
onSubmit() {
this.$wskj.to("/pagesMain/pages/tjsq?type=" + this.type)
// if (!this.reason) {
// return this.$u.toast('请输入内容')
// }
// if (!this.images) {
// return this.$u.toast('请至少上传一张照片')
// }
// if (this.reason.length < 10) {
// return this.$u.toast('文字描述最低10个字')
// }
// this.submitShow = true
async onSubmit() {
if (!this.address) {
return this.$u.toast('请先定位当前位置')
}
if (!this.image) {
return this.$u.toast('请拍照上传照片')
}
const imgData = await this.$wskj.uploadImg(this.image)
console.log(imgData)
const params = {
url: '/api/clock/add',
loadingTip: '',
data: {
clockAddress: this.address,
clockImg: imgData.url
},
}
this.$request(params).then(res => {
this.$wskj.toast('提交成功')
setTimeout(() => {
this.$wskj.goBack(1)
}, 600)
})
},
// 提交
onConfirmSubmit() {
// const params = {
// url: '/api/user/yijian',
// loadingTip: '',
// data: {
// content: this.reason,
// images: this.images
// }
// }
// // console.log(params);
// this.$request(params).then(res => {
// // console.log(res)
// this.submitShow = false
// if (res.code === 1) {
// this.$u.toast(res.msg || '提交成功')
// this.reason = ''
// this.images = ''
// } else {
// this.$u.toast(res.msg || '提交失败')
// }
// }).catch(err => {
// this.submitShow = false
// this.$u.toast(err.msg || '提交失败')
// })
},
// 根据经纬度逆向解析为中文地址
reverseGeocode(latitude, longitude) {
const key = 'cc4f24cc4928169e0d623573e4e0687e'; // 替换为你的高德API Key
const url =
`https://restapi.amap.com/v3/geocode/regeo?key=${key}&location=${longitude},${latitude}&radius=1000&extensions=all`;
uni.request({
url: url,
success: (res) => {
if (res.data.status === '1') {
this.address = res.data.regeocode.formatted_address; // 获取中文地址
console.log('当前位置中文地址:', this.address);
} else {
console.error('地址解析失败:', res.data.info);
}
},
fail: (err) => {
console.error('请求失败:', err);
}
});
}
},
};
......
......@@ -7,25 +7,25 @@
<view class="h-200"></view>
</view>
<view class="mlr-25" style="margin-top: -100rpx;">
<attend-calendar :lateddates="[`2025-5-26`,`2025-5-27`,`2025-6-27`]"
:truancyeddates="[`2025-5-23`]"></attend-calendar>
<attend-calendar :lateddates="lateddates" :truancyeddates="truancyeddates"
@on-click="onclick"></attend-calendar>
</view>
<view class="flex-column mlr-25 mt-30" style="background: #EBF5F0;">
<view class="flex v-center pad-30">
<text class="fs-28 fw-700">打卡天数:</text>
<text class="fs-24">25</text>
<text class="fs-24">{{data.clockDay}}</text>
</view>
<view class="flex v-center pad-30">
<text class="fs-28 fw-700">缺卡天数:</text>
<text class="fs-24">1</text>
<text class="fs-24">{{data.noRecordDay}}</text>
</view>
</view>
<view class="overflow-y">
<scroll-view scroll-y style="height: 100%;">
<view @click="onClickSelecte(index)" v-for="(item, index) in 10" :key="index">
<view @click="onClickSelecte(index)" v-for="(item, index) in todayList" :key="index">
<view class="flex v-center pad-30 mlr-25 mt-30" style="background: #EBF5F0;">
<text class="fs-28 fw-700">打卡时间:</text>
<text class="fs-24">2025-04-03 10:32:31</text>
<text class="fs-24">{{item.clockTime}}</text>
</view>
</view>
</scroll-view>
......@@ -39,28 +39,47 @@
return {
show: false,
sex: '',
columns: [
['', '']
],
lateddates: [],
truancyeddates: [],
data: '',
todayList: []
};
},
onLoad(options) {
this.getList();
const time = this.$wskj.timeFormat(new Date().getTime(), "yyyy-mm-dd").replace(/(^|\D)0+/g, '\$1')
this.getTodayList(time)
},
methods: {
open() {
this.show = true
onclick(date) {
this.getTodayList(date)
},
close() {
this.show = false
getList() {
const params = {
url: '/api/clock/listAll',
method: 'GET',
}
this.$request(params).then(res => {
this.data = res.data
res.data.clockRecordList.forEach(item => {
if (item.clockState == 1) {
this.lateddates.push(item.date.replace(/(^|\D)0+/g, '\$1'))
}
})
console.log(this.lateddates)
})
},
confirm(e) {
this.show = false
this.sex = e.value[0]
console.log("LMG", e.value[0])
}
getTodayList(date) {
const params = {
url: '/api/clock/record/' + date,
method: 'GET',
}
this.$request(params).then(res => {
this.todayList = res.data
})
}
}
};
</script>
......
......@@ -154,7 +154,6 @@
console.log('拍照成功', res.tempImagePath)
that.imageSrc = res.tempImagePath //原图
that.takeCanvas(res.tempImagePath) //画图
}
})
},
......@@ -219,6 +218,11 @@
success: res1 => {
that.imageSrc = res1.tempFilePath
that.isshow = false
//通过 eventChannel 发送数据
uni.$emit('imageSrc', that.imageSrc)
setTimeout(() => {
this.$wskj.goBack(1)
}, 600)
},
fail: (err) => {
console.log('导出图片失败', err)
......
<template>
<view class='container'>
<view style="background: linear-gradient( 180deg, #D9F5E8 0%, #FFFFFF 100%);padding-bottom: 200rpx;">
<u-navbar :autoBack="true" placeholder="true" title="历史工单" bgColor="transparent">
</u-navbar>
</view>
<view style="margin-top: -200rpx;">
<view class="flex mlr-10">
<view @click="onClick(index)" class="h-150 mlr-10 br-12 flex-column flex-between-center"
style="flex: 1;background: #FFFFFF;"
:style="{ color: index==0?'#FF682D':index==1?'#EEA616':index==2?'#1FCA7C':'#23BBEE'}"
v-for="(item, index) in 4" :key="index">
<text class="mt-20 fs-36">25</text>
<text class="mb-20 fs-24">{{index==0?'待处理':index==1?'待支付':index==2?'已完成':index==3?'已取消':''}}</text>
<view v-if="index==tabIndex"
style="background: #27CC81;height: 10rpx;width: 100%;border-radius: 12rpx;">
</view>
<view v-else style="background: #FFFFFF;height: 10rpx;width: 100%;border-radius: 12rpx;">
</view>
</view>
</view>
</view>
<view class="overflow-y">
<scroll-view scroll-y style="height: 100%;">
<view v-for="(item, index) in list" :key="index" @click="onCz('详情',index)">
<view class="flex-column br-12 mt-30 mlr-24 pad-20"
style="box-shadow: 0px 0px 15px 1px rgba(142,142,142,0.16);background: white;">
<view class="flex vh-center mt-20">
<image class="h-40 w-40 mr-15" src="/static/icon_gd.png"> </image>
<text class="fs-32 fw-700" style="flex: 1;">{{item.communityName+item.room}}</text>
<text>{{item.state==1?'待处理':item.state==2?'待支付':item.state==3?'已完成':item.state==4?'已取消':''}}</text>
</view>
<text class="fs-28 br-6 pad-20 mtb-20"
style="background: #EBF5F0;">{{item.repairsDescription}}</text>
<scroll-view scroll-x="true" scroll-with-animation="true">
<view class="flex">
<view class="w-140 h-140 mr-15"
v-for="(itemImg, index2) in $wskj.splitList(item.repairsImg)" :key="index2">
<image class="w-140 h-140" :src="itemImg"></image>
</view>
</view>
</scroll-view>
<view class="flex vh-center h-60 mt-20 fs-24">
<text style="flex: 1;color: #000;">{{item.repairsTime}}</text>
<text @tap.stop="onCz('设置费用',index)" v-if="item.state==1"
style="color: #23BBEE;">设置费用</text>
<text style="color: #27CC81;margin-left: 30rpx;">报修详情</text>
</view>
</view>
</view>
</scroll-view>
<u-popup :show="show" mode="center" @close="close" @open="open" round="10">
<view class="flex-column mlr-50" style="width:600rpx;text-align: center;">
<text class="fs-32 fw-600 mtb-20">设置维修费用</text>
<input class="br-6 mtb-20 h-100" placeholder="请输入维修费用金额" type="digit"
style="background: #EBF5F0; border-radius: 20rpx;" v-model="price" />
<view class="fullscreen-btn" @click="onCz('提交',index)">
确定
</view>
</view>
</u-popup>
</view>
</view>
</template>
<script>
export default {
data() {
return {
show: false,
type: 0,
tabIndex: 0,
list: [],
price: '',
repairsId: '',
};
},
onLoad(e) {
this.type = e.type
},
onShow() {
this.getList()
},
methods: {
open() {
this.show = true
},
close() {
this.show = false
},
onClick(index) {
this.tabIndex = index;
this.getList()
},
onCz(e, index) {
if (e == "详情") {
this.$wskj.to("/pagesMine/pages/wx_xq?id=" + this.list[index].repairsId)
return
}
if (e == "设置费用") {
this.repairsId = this.list[index].repairsId
this.open();
return
}
if (e == "提交") {
if (this.price == '') {
this.$wskj.toast("请设置正确的金额")
return
}
this.setMoney()
return
}
},
getList() {
const params = {
url: '/api/repairs/maintainListAll?state=' + (this.tabIndex + 1),
method: 'GET',
}
this.$request(params).then(res => {
this.list = res.data
})
},
setMoney(id) {
const params = {
url: '/api/repairs/setMoney/' + this.repairsId + '/' + this.price,
method: 'PUT',
}
this.$request(params).then(res => {
this.close()
this.getList()
})
}
},
};
</script>
<style scoped>
.container {
height: 100vh;
display: flex;
flex-direction: column;
background: #fff;
}
</style>
\ No newline at end of file
<template>
<view class='center'>
<view style="background: linear-gradient( 180deg, #1FCA7C 0%, #F2F2F2 100%);">
<u-navbar :autoBack="true" title="报修详情" placeholder="true" bgColor="transparent" leftIconColor="#FFF"
:title-style="{color: '#FFF'}">
</u-navbar>
<view class="h-300 flex flex-row-between v-center ml-60 mr-35">
<view class="flex-column" style="color: #1BB871;">
<text class="fs-52">分配工单</text>
<text class="fs-30">今日分配我知道</text>
</view>
<image class="h-225 w-225" src="/pagesMain/static/icon_bxxq.png"></image>
</view>
</view>
<view class="overflow-y"
style="background: white;border-top-left-radius: 20rpx;border-top-right-radius: 20rpx;margin-top: -20rpx;">
<scroll-view scroll-y style="height: 100%;">
<view class="mar-20">
<view class="flex-column-center">
<image class="w-40 h-40 mr-10" src="/static/icon_gd.png"></image>
<text style="flex: 1;text-align: left;"
class="fs-32 fw-700">{{data.communityName+data.room}}</text>
<text
style="font-size: 24rpx;color: #EEA616;">{{data.state==1?'待处理':data.state==2?'待支付':data.state==3?'已完成':data.state==4?'已取消':''}}</text>
</view>
<view class="flex-column br-12 fs-28 mt-30" style="background: #EBF5F0;">
<view class="flex pad-30">
<text class="fw-700 w-200" style="text-align: left;">业主姓名:</text>
<text>{{$wskj.isNullStr(data.proprietorName)}}</text>
</view>
<view class="flex pad-30">
<text class="fw-700 w-200" style="text-align: left;">业主房间号</text>
<text>{{data.room}}</text>
</view>
<view class="flex pad-30">
<text class="fw-700 w-200" style="text-align: left;">业主手机号</text>
<text>{{data.proprietorPhone}}</text>
</view>
</view>
<view class="flex-column-center fs-32 fw-700 mt-30">
<image class="w-10 h-40 mr-15" style="background-color: #1FCA7C;"></image>
<text>报修信息</text>
</view>
<view class="flex-column br-12 fs-28 mtb-30 pad-30" style="background: #EBF5F0;">
<text style="text-align: left;">{{data.repairsDescription}}</text>
</view>
<scroll-view scroll-x="true" scroll-with-animation="true">
<view class="flex">
<view class="w-140 h-140 mr-15"
v-for="(itemImg, index2) in $wskj.splitList(data.repairsImg)" :key="index2">
<image class="w-140 h-140" :src="itemImg"></image>
</view>
</view>
</scroll-view>
<view class="flex mt-20 h-40 lh-40">
<text class="fw-700 fs-28">报修时间:</text>
<text class="fs-24 ml-10">{{data.repairsTime}}</text>
</view>
<view v-if="data.state==2||data.state==3" class="flex-column br-12 fs-28 mt-30"
style="background: #EBF5F0;">
<view class="flex pad-30">
<text class="fw-700 w-200" style="text-align: left;">负责人:</text>
<text>{{data.accountName}}</text>
</view>
<view class="flex pad-30">
<text class="fw-700 w-200" style="text-align: left;">维修费用:</text>
<text>{{data.money}}</text>
</view>
<view v-if="data.state==3" class="flex pad-30">
<text class="fw-700 w-200" style="text-align: left;">完成时间:</text>
<text>{{data.completeTime}}</text>
</view>
</view>
<view v-if="data.state==4" class="flex pad-30 br-12 mt-30" style="background: #EBF5F0;">
<text class="fw-700 w-200" style="text-align: left;">关闭时间:</text>
<text>{{data.closeTime}}</text>
</view>
</view>
</scroll-view>
<u-popup :show="show" mode="center" @close="close" @open="open" round="10">
<view class="flex-column mlr-50" style="width:600rpx;text-align: center;">
<text class="fs-32 fw-600 mtb-20">设置维修费用</text>
<input class="br-6 mtb-20 h-100" placeholder="请输入维修费用金额" type="digit"
style="background: #EBF5F0; border-radius: 20rpx;" v-model="price" />
<view class="fullscreen-btn" @click="onCz('提交',index)">
确定
</view>
</view>
</u-popup>
</view>
<view class="h-140 pt-20">
<view @click="onCz('设置费用')" class="full-btn" style="color: #FF682D;" v-if="data.state==1">
设置费用
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
show: false,
price: '',
type: 0,
reason: '',
submitShow: false,
images: '',
id: '',
data: {},
};
},
onLoad(e) {
this.id = e.id
this.getData()
},
methods: {
open() {
this.show = true
},
close() {
this.show = false
},
getData() {
const params = {
url: '/api/repairs/' + this.id,
method: 'GET',
}
this.$request(params).then(res => {
this.data = res.data
})
},
onCz(e) {
if (e == "设置费用") {
this.open();
return
}
if (e == "提交") {
if (this.price == '') {
this.$wskj.toast("请设置正确的金额")
return
}
this.setMoney()
return
}
},
setMoney() {
const params = {
url: '/api/repairs/setMoney/' + this.data.repairsId + '/' + this.price,
method: 'PUT',
}
this.$request(params).then(res => {
this.close()
this.getList()
})
}
},
};
</script>
<style scoped>
.center {
height: 100vh;
display: flex;
flex-direction: column;
background: white;
}
</style>
\ No newline at end of file
......@@ -6,8 +6,10 @@
</view>
<view class="flex-column mlr-70 mt-100" style="text-align: left;">
<text class="fs-48 fw-700">Hello!\n请登录员工账号</text>
<input class="h-86 lh-86 fs-28 plr-33 mt-80" style="background: #FFFFFF;" placeholder="手机号" />
<input class="h-86 lh-86 fs-28 plr-33 mt-50" style="background: #FFFFFF;" placeholder="密码" />
<input class="h-86 lh-86 fs-28 plr-33 mt-80" style="background: #FFFFFF;" placeholder="手机号"
v-model="account" />
<input class="h-86 lh-86 fs-28 plr-33 mt-50" style="background: #FFFFFF;" placeholder="密码"
v-model="password" />
<view class="fullscreen-btn mt-100" @click="login">
立即登录
</view>
......@@ -21,7 +23,8 @@
export default {
data() {
return {
account: '',
password: ''
};
},
onLoad(options) {
......@@ -29,7 +32,15 @@
},
methods: {
login() {
this.$wskj.to("/pagesMine/pages/ygzy")
const params = {
url: '/api/login/accountLogin/' + this.account + '/' + this.password,
loadingTip: '',
method: 'GET',
}
this.$request(params).then(res => {
uni.setStorageSync('userInfo_yg', res.data)
this.$wskj.to("/pagesMine/pages/ygzy")
})
}
}
};
......
<template>
<view class="center">
<view class="flex-column mlr-30">
<image @click="onClick(0)" class="item" src="/pagesMine/static/icon_ygzy_1.png"></image>
<image @click="onClick(1)" class="item" src="/pagesMine/static/icon_ygzy_2.png"></image>
<image @click="onClick(2)" class="item" src="/pagesMine/static/icon_ygzy_3.png"></image>
<image @click="onClick(3)" class="item2" src="/pagesMine/static/icon_ygzy_4.png"></image>
<!-- 用户类型accountType(1=保洁,2=保安,3=维修) -->
<image v-if="userInfo.accountType==1" @click="onClick(0)" class="item"
src="/pagesMine/static/icon_ygzy_2.png"></image>
<image v-if="userInfo.accountType==2" @click="onClick(1)" class="item"
src="/pagesMine/static/icon_ygzy_1.png"></image>
<image v-if="userInfo.accountType==3" @click="onClick(2)" class="item"
src="/pagesMine/static/icon_ygzy_3.png"></image>
<image v-if="userInfo.accountType!=3" @click="onClick(3)" class="item2"
src="/pagesMine/static/icon_ygzy_4.png"></image>
</view>
......@@ -15,12 +20,12 @@
export default {
data() {
return {
userInfo: '',
};
},
onLoad(options) {
this.userInfo = uni.getStorageSync('userInfo_yg')
},
methods: {
open() {
......@@ -39,7 +44,7 @@
return
}
if (index == 2) {
this.$wskj.to("/pagesMine/pages/dkpz")
this.$wskj.to("/pagesMine/pages/wx_lsgd")
return
}
if (index == 3) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment