Commit a97e40e6 authored by 秦威威's avatar 秦威威

支付对接

parent 1755fb4b
......@@ -107,6 +107,12 @@
"navigationStyle": "custom"
}
},
{
"path": "pages/tsby_xq",
"style": {
"navigationStyle": "custom"
}
},
{
"path": "pages/tsby_lsgd",
"style": {
......
......@@ -236,7 +236,6 @@
}
if (index == 4) {
this.$wskj.toast("敬请期待")
this.$wskj.to("/pages/my/feedback")
return
}
if (index == 5) {
......
......@@ -27,7 +27,7 @@
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;">居家报修</text>
<text class="fs-32 fw-700" style="flex: 1;">{{item.type==1?'居家报修':'公区报事'}}</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"
......@@ -66,6 +66,8 @@
},
onLoad(e) {
this.type = e.type
},
onShow() {
this.getList()
},
methods: {
......@@ -75,7 +77,7 @@
},
onCz(e, index) {
if (e == "详情") {
this.$wskj.to("/pagesMain/pages/bxxq")
this.$wskj.to("/pagesMain/pages/bxxq?id=" + this.list[index].repairsId)
return
}
if (e == "关闭报修") {
......
......@@ -18,68 +18,75 @@
<scroll-view scroll-y style="height: 100%;">
<view class="mar-20">
<view class="flex-column-center">
<image class="w-20 h-20 mr-10" style="background-color: #1FCA7C;"></image>
<text style="flex: 1;text-align: left;">居家报修</text>
<text style="font-size: 24rpx;color: #EEA616;">待支付</text>
<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.type==1?'居家报修':'公区报事'}}</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>张三</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>利达国宾中心1栋2单元205室</text>
<text>{{data.room}}</text>
</view>
<view class="flex pad-30">
<text class="fw-700 w-200" style="text-align: left;">业主手机号</text>
<text>17778767876</text>
<text>{{data.proprietorPhone}}</text>
</view>
</view>
<view class="flex-column-center fs-32 fw-700 mt-30">
<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;">利达国宾中心利达国宾中心1栋2单元205室卫生
间漏水,请物业及时查看</text>
<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 10" :key="index2">
<image class="w-140 h-140" style="background: #1FCA7C;"></image>
<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 fs-24 v-center">
<view class="fw-700 fs-28">报修时间:</view>
<view class="fs-24 ml-10">2025-03-10 10:01:45</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>
<view class="flex-column br-12 fs-28 mt-30" style="background: #EBF5F0;">
<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>张三</text>
<text>{{data.accountName}}</text>
</view>
<view class="flex pad-30">
<text class="fw-700 w-200" style="text-align: left;">手机号:</text>
<text>利达国宾中心1栋2单元205室</text>
<text>{{data.accountMobile}}</text>
</view>
<view class="flex pad-30">
<text class="fw-700 w-200" style="text-align: left;">完成时间:</text>
<text>17778767876</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>
</view>
<view class="h-140 pt-20">
<view class="full-btn" v-if="false">
<view class="full-btn" v-if="data.state==2">
去支付
</view>
<view class="full-btn" style="color: #FF682D;">
<view @click="onCz('关闭报修')" class="full-btn" style="color: #FF682D;" v-if="data.state==1">
取消报修
</view>
</view>
......@@ -90,62 +97,50 @@
export default {
data() {
return {
title: '居家报修',
type: 0,
reason: '',
submitShow: false,
images: '',
id: '',
data: {},
};
},
onLoad(e) {
this.type = e.type
if (e.type == 0) {
this.title = "居家报修"
} else {
this.title = "公区报事"
}
this.id = e.id
this.getData()
},
methods: {
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
getData() {
const params = {
url: '/api/repairs/' + this.id,
method: 'GET',
}
this.$request(params).then(res => {
this.data = res.data
})
},
gb() {
const params = {
url: '/api/repairs/cancel/' + this.id,
method: 'PUT',
}
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 || '提交成功')
onCz(e) {
if (e == "关闭报修") {
this.gb();
return
}
if (e == "去支付") {
// this.reason = ''
// this.images = ''
// } else {
// this.$u.toast(res.msg || '提交失败')
// }
// }).catch(err => {
// this.submitShow = false
// this.$u.toast(err.msg || '提交失败')
// })
}
return
}
},
},
};
</script>
......
......@@ -37,7 +37,7 @@
};
},
onLoad(e) {
this.onGz(1)
this.onGz(e.type)
},
methods: {
onGz(type) {
......
......@@ -2,17 +2,17 @@
<view class="center plr-25">
<view class="flex-column-center fs-30 mt-30 h-140 pb-30 br-12 plr-25"
style="background: linear-gradient( 90deg, #5FE8A9 0%, #1FCA7C 100%);color: white;">
<image class="w-42 h-42 mr-20" style="background-color: #1FCA7C;"></image>
<text>{{type==0?"电费缴纳":"水费缴纳"}}</text>
<image class="w-42 h-42 mr-20" src="/pagesMain/static/icon_cz_img.png"></image>
<text>{{type==1?"电费缴纳":"水费缴纳"}}</text>
</view>
<view class="flex-column br-12 fs-28" style="background: white;margin-top: -40rpx;color: #999999;">
<view class="flex-row-between pad-30" style="border-bottom: 1rpx solid #E9E9E9;">
<text>户号信息</text>
<text>张三</text>
<text>{{$wskj.isNullStr(userinfo.name)}}</text>
</view>
<view class="flex-row-between pad-30" style="border-bottom: 1rpx solid #E9E9E9;">
<text>住址信息</text>
<text>张三</text>
<text>{{userinfo.communityName+userinfo.room}}</text>
</view>
<view class="flex-row-between pad-30" style="border-bottom: 1rpx solid #E9E9E9;">
<text>缴费单位</text>
......@@ -26,7 +26,7 @@
<view @click="onClickPrice(index)" class="grid-item"
:style="index==indexTab? 'color:#ffffff;background: #1FCA7C;':'color:#000000;;background:#F2F2F2;'"
v-for="(item, index) in 6" :key="index">
<text class="fs-32 fw-600 mtb-20">20</text>
<text class="fs-32 fw-600 mtb-20">{{(index+1)*20+''}}</text>
</view>
</view>
</view>
......@@ -34,7 +34,7 @@
<text class="fs-32 fw-700 mr-30"></text>
<input style="flex: 1;text-align: left;font-size: 30rpx;" placeholder="输入缴费金额" />
</view>
<view class="fullscreen-btn" style="margin: 0;margin-top: 60rpx;">
<view class="fullscreen-btn" style="margin: 0;margin-top: 60rpx;" @click="onSubmit()">
立即缴费
</view>
</view>
......@@ -47,36 +47,66 @@
data() {
return {
indexTab: 0,
type: 0,
type: 1,
money: 20,
userinfo: '',
};
},
onLoad(options) {
this.type = options.type
this.userinfo = uni.getStorageSync("userInfo")
},
methods: {
onClickPrice(index) {
this.indexTab = index
this.money = (index + 1) * 20
},
onClick(index) {
if (index == 0) {
this.$wskj.to("/pagesMain/pages/tsby_submit?type=0")
return
}
if (index == 1) {
this.$wskj.to("/pagesMain/pages/tsby_submit?type=1")
return
}
if (index == 2) {
this.$wskj.to("/pagesMain/pages/tsby_lsgd")
return
onSubmit() {
this.onCjdd()
},
onCjdd() {
const params = {
url: '/api/liveBill/add',
loadingTip: '',
data: {
money: this.money,
type: this.type, //类型(1电费 2水费 3物业费 4车位管理费 5车位出租费 6储藏室出租 7其他费用)
}
}
if (index == 3) {
this.$wskj.to("/pagesMain/pages/fwgz")
return
this.$request(params).then(res => {
this.pay(res.data.billId)
})
},
pay(orderId) {
const params = {
url: '/api/payRecord/pay',
loadingTip: '',
data: {
orderId: orderId,
amount: this.money,
payBizCode: "PRESTORE",
}
}
this.$request(params).then(res => {
uni.requestPayment({
provider: 'wxpay',
appid: res.data.data.appId, // 微信开放平台 - 应用 - AppId,注意和微信小程序、公众号 AppId 可能不一致
nonceStr: res.data.data.nonceStr, // 随机字符串
package: res.data.data.package, // 固定值
timeStamp: res.data.data.timeStamp, // 时间戳(单位:秒)
paySign: res.data.data.paySign, // 签名,这里用的 MD5/RSA 签名
signType: 'MD5',
success: (res) => {
},
fail: (err) => {
console.log(err);
}
});
})
}
}
};
......
......@@ -17,7 +17,7 @@
<text>¥0</text>
</view>
</view>
<view class="fullscreen-btn" style="margin: 0;margin-top: 60rpx;">
<view class="fullscreen-btn" style="margin: 0;margin-top: 60rpx;" @click="onSubmit">
立即缴费
</view>
<u-picker :show="show" :columns="columns" closeOnClickOverlay="true" @cancel="close" @close="close"
......@@ -72,7 +72,53 @@
this.carShow = false
this.carNumber = e.value[0]
console.log("LMG", e.value[0])
}
},
onSubmit() {
this.onCjdd()
},
onCjdd() {
const params = {
url: '/api/liveBill/add',
loadingTip: '',
data: {
money: this.monthsNumber.replace('个月', ''),
type: 5, //类型(1电费 2水费 3物业费 4车位管理费 5车位出租费 6储藏室出租 7其他费用)
duration: this.monthsNumber.replace('个月', '') //缴费时长(月)
}
}
this.$request(params).then(res => {
this.pay(res.data.billId)
})
},
pay(orderId) {
const params = {
url: '/api/payRecord/pay',
loadingTip: '',
data: {
orderId: orderId,
amount: this.monthsNumber.replace('个月', ''),
payBizCode: "PRESTORE",
}
}
this.$request(params).then(res => {
uni.requestPayment({
provider: 'wxpay',
appid: res.data.data.appId, // 微信开放平台 - 应用 - AppId,注意和微信小程序、公众号 AppId 可能不一致
nonceStr: res.data.data.nonceStr, // 随机字符串
package: res.data.data.package, // 固定值
timeStamp: res.data.data.timeStamp, // 时间戳(单位:秒)
paySign: res.data.data.paySign, // 签名,这里用的 MD5/RSA 签名
signType: 'MD5',
success: (res) => {
},
fail: (err) => {
console.log(err);
}
});
})
},
}
};
</script>
......
......@@ -5,11 +5,12 @@
<text class="fs-32 fw-700 mt-30" style="text-align: left;padding-left: 30rpx;">其他缴费</text>
<text class="fs-28 mt-30" style="text-align: left;padding-left: 30rpx;">项目名称</text>
<view class="flex-row-between mar-30 br-4 pad-25" style="background: #F2F2F2;">
<input style="width: 100%;text-align: left;" placeholder="请输入项目名称" />
<input style="width: 100%;text-align: left;" placeholder="请输入项目名称" v-model="projectName" />
</view>
<text class="fs-28" style="text-align: left;padding-left: 30rpx;">项目描述</text>
<view class="flex-row-between mar-30 br-4 pad-25" style="background: #F2F2F2;">
<textarea style="width: 100%;text-align: left;height: 120rpx;" placeholder="请输入项目描述" />
<textarea style="width: 100%;text-align: left;height: 120rpx;" placeholder="请输入项目描述"
v-model="projectInfo" />
</view>
<view class="flex-column br-12 fs-28 mt-20 pad-25" style="background: white;">
......@@ -20,13 +21,13 @@
<view @click="onClickPrice(index)" class="grid-item"
:style="index==indexTab? 'color:#ffffff;background: #1FCA7C;':'color:#000000;;background:#F2F2F2;'"
v-for="(item, index) in 6" :key="index">
<text class="fs-32 fw-600 mtb-20">20</text>
<text class="fs-32 fw-600 mtb-20">{{(index+1)*20+''}}</text>
</view>
</view>
</view>
</view>
</view>
<view class="fullscreen-btn" style="margin: 0;margin-top: 60rpx;">
<view class="fullscreen-btn" style="margin: 0;margin-top: 60rpx;" @click="onSubmit()">
立即缴费
</view>
......@@ -39,6 +40,9 @@
return {
indexTab: 0,
type: 0,
money: 20,
projectName: '',
projectInfo: '',
};
},
......@@ -49,25 +53,62 @@
methods: {
onClickPrice(index) {
this.indexTab = index
this.money = (index + 1) * 20
},
onClick(index) {
if (index == 0) {
this.$wskj.to("/pagesMain/pages/tsby_submit?type=0")
onSubmit() {
this.onCjdd()
},
onCjdd() {
if (this.$wskj.isNull(this.projectName)) {
this.$wskj.toast('请输入项目名称')
return
}
if (index == 1) {
this.$wskj.to("/pagesMain/pages/tsby_submit?type=1")
if (this.$wskj.isNull(this.projectInfo)) {
this.$wskj.toast('请输入项目描述')
return
}
if (index == 2) {
this.$wskj.to("/pagesMain/pages/tsby_lsgd")
return
const params = {
url: '/api/liveBill/add',
loadingTip: '',
data: {
money: this.money,
type: 7, //类型(1电费 2水费 3物业费 4车位管理费 5车位出租费 6储藏室出租 7其他费用)
projectName: this.projectName,
projectInfo: this.projectInfo,
}
}
if (index == 3) {
this.$wskj.to("/pagesMain/pages/fwgz")
return
this.$request(params).then(res => {
this.pay(res.data.billId)
})
},
pay(orderId) {
const params = {
url: '/api/payRecord/pay',
loadingTip: '',
data: {
orderId: orderId,
amount: this.money,
payBizCode: "PRESTORE",
}
}
this.$request(params).then(res => {
uni.requestPayment({
provider: 'wxpay',
appid: res.data.data.appId, // 微信开放平台 - 应用 - AppId,注意和微信小程序、公众号 AppId 可能不一致
nonceStr: res.data.data.nonceStr, // 随机字符串
package: res.data.data.package, // 固定值
timeStamp: res.data.data.timeStamp, // 时间戳(单位:秒)
paySign: res.data.data.paySign, // 签名,这里用的 MD5/RSA 签名
signType: 'MD5',
success: (res) => {
},
fail: (err) => {
console.log(err);
}
});
})
}
}
};
......
......@@ -2,7 +2,7 @@
<view class="center plr-25">
<view class="flex-column-center fs-30 mt-30 h-140 pb-30 br-12 plr-25"
style="background: linear-gradient( 90deg, #5FE8A9 0%, #1FCA7C 100%);color: white;">
<image class="w-42 h-42 mr-20" style="background-color: #1FCA7C;"></image>
<image class="w-42 h-42 mr-20" src="/pagesMain/static/icon_cz_img.png"></image>
<text>停车管理费</text>
</view>
<view class="flex-column br-12" style="margin-top: -50rpx;background:white;">
......@@ -10,15 +10,15 @@
<view class="flex-column br-12 fs-28" style="color: #999999;">
<view class="flex-row-between pad-30" style="border-bottom: 1rpx solid #E9E9E9;">
<text>户号信息</text>
<text>张三</text>
<text>{{$wskj.isNullStr(userinfo.name)}}</text>
</view>
<view class="flex-row-between pad-30" style="border-bottom: 1rpx solid #E9E9E9;">
<text>小区名称</text>
<text>张三</text>
<text>{{userinfo.communityName}}</text>
</view>
<view class="flex-row-between pad-30" style="border-bottom: 1rpx solid #E9E9E9;">
<text>住址信息</text>
<text>河南利龙物业管理有限公司</text>
<text>{{userinfo.room}}</text>
</view>
<view class="flex-row-between pad-30" style="border-bottom: 1rpx solid #E9E9E9;" @click="open">
<text>车位号</text>
......@@ -89,12 +89,14 @@
columns: [
['T01', 'T02', 'T03', 'T04', 'T05']
],
carNumber: ''
carNumber: '',
userinfo: '',
};
},
onLoad(options) {
this.type = options.type
this.userinfo = uni.getStorageSync("userInfo")
},
methods: {
......
......@@ -5,11 +5,11 @@
<text class="fs-32 fw-700 mt-30" style="text-align: left;padding-left: 30rpx;">物业费</text>
<text class="fs-28 mt-30" style="text-align: left;padding-left: 30rpx;">房屋</text>
<view class="flex-row-between mar-30 br-4 pad-25" style="background: #F2F2F2;">
<text>111111111</text>
<text>{{userinfo.room}}</text>
</view>
<text class="fs-28 mt-30" style="text-align: left;padding-left: 30rpx;">房屋面积</text>
<view class="flex-row-between mar-30 br-4 pad-25" style="background: #F2F2F2;">
<text>140</text>
<text>{{userinfo.sqm}}</text>
</view>
<text class="fs-28 mt-30" style="text-align: left;padding-left: 30rpx;">缴费时长</text>
<view class="flex-row-between mar-30 br-4 pad-25" style="background: #F2F2F2;" @click="open">
......@@ -22,7 +22,7 @@
</view>
</view>
<view class="fullscreen-btn" style="margin: 0;margin-top: 60rpx;">
<view class="fullscreen-btn" style="margin: 0;margin-top: 60rpx;" @click="onSubmit()">
立即缴费
</view>
<u-picker :show="show" :columns="columns" closeOnClickOverlay="true" @cancel="close" @close="close"
......@@ -39,10 +39,12 @@
['1个月', '3个月', '6个月', '9个月', '12个月']
],
monthsNumber: '',
userinfo: '',
};
},
onLoad(options) {
this.type = options.type
this.userinfo = uni.getStorageSync("userInfo")
},
methods: {
......@@ -56,7 +58,52 @@
this.show = false
this.monthsNumber = e.value[0]
console.log("LMG", e.value[0])
}
},
onSubmit() {
this.onCjdd()
},
onCjdd() {
const params = {
url: '/api/liveBill/add',
loadingTip: '',
data: {
money: this.monthsNumber.replace('个月', ''),
type: 3, //类型(1电费 2水费 3物业费 4车位管理费 5车位出租费 6储藏室出租 7其他费用)
duration: this.monthsNumber.replace('个月', '') //缴费时长(月)
}
}
this.$request(params).then(res => {
this.pay(res.data.billId)
})
},
pay(orderId) {
const params = {
url: '/api/payRecord/pay',
loadingTip: '',
data: {
orderId: orderId,
amount: this.monthsNumber.replace('个月', ''),
payBizCode: "PRESTORE",
}
}
this.$request(params).then(res => {
uni.requestPayment({
provider: 'wxpay',
appid: res.data.data.appId, // 微信开放平台 - 应用 - AppId,注意和微信小程序、公众号 AppId 可能不一致
nonceStr: res.data.data.nonceStr, // 随机字符串
package: res.data.data.package, // 固定值
timeStamp: res.data.data.timeStamp, // 时间戳(单位:秒)
paySign: res.data.data.paySign, // 签名,这里用的 MD5/RSA 签名
signType: 'MD5',
success: (res) => {
},
fail: (err) => {
console.log(err);
}
});
})
},
}
};
</script>
......
......@@ -2,8 +2,8 @@
<view class="center plr-25">
<view class="flex-column-center fs-30 mt-30 h-140 pb-30 br-12 plr-25"
style="background: linear-gradient( 90deg, #5FE8A9 0%, #1FCA7C 100%);color: white;">
<image class="w-42 h-42 mr-20" style="background-color: #1FCA7C;"></image>
<text>物业费:1栋2单元205室</text>
<image class="w-42 h-42 mr-20" src="/pagesMain/static/icon_cz_img.png"></image>
<text>物业费:{{userinfo.room}}</text>
</view>
<view class="flex-column br-12" style="margin-top: -50rpx;background:white;">
<view class="flex-column">
......@@ -63,11 +63,13 @@
indexTab: 1,
indexNumber: 0,
type: 0,
userinfo: '',
};
},
onLoad(options) {
this.type = options.type
this.userinfo = uni.getStorageSync("userInfo")
},
methods: {
......
......@@ -7,7 +7,7 @@
<view style="background: linear-gradient( 180deg, #1FCA7C 0%, #F2F2F2 100%);height: 800rpx;"></view>
<view style="margin-top: -800rpx;"></view>
<view class="fs-36 fw-600 mt-30 ml-20" style="text-align: left;color: #fff;">
<text>你好,利达国宾中心1栋2单元205室</text>
<text>你好,{{userinfo.communityName+userinfo.room}}</text>
</view>
<view class="mar-20 br-16" style="background-color: white;flex: 1;
......@@ -40,6 +40,7 @@
export default {
data() {
return {
userinfo: '',
listService: [{
img: "/pagesMain/static/icon_shjf_1.png",
title: "电费",
......@@ -73,7 +74,7 @@
};
},
onLoad(options) {
this.userinfo = uni.getStorageSync("userInfo")
},
methods: {
open() {
......@@ -85,11 +86,11 @@
},
onClick(index) {
if (index == 0) {
this.$wskj.to("/pagesMain/pages/jnzd?type=0")
this.$wskj.to("/pagesMain/pages/jnzd?type=1")
return
}
if (index == 1) {
this.$wskj.to("/pagesMain/pages/jnzd?type=1")
this.$wskj.to("/pagesMain/pages/jnzd?type=2")
return
}
if (index == 2) {
......
......@@ -7,15 +7,15 @@
<view class="flex-column br-12 fs-28 mt-30" style="box-shadow: 0px 0px 15px 1px rgba(142,142,142,0.16);">
<view class="flex-row-between pad-30" style="border-bottom: 1rpx solid #E9E9E9;">
<text style="color: #999999;">业主姓名</text>
<text>张三</text>
<text>{{$wskj.isNullStr(userinfo.name)}}</text>
</view>
<view class="flex-row-between pad-30" style="border-bottom: 1rpx solid #E9E9E9;">
<text style="color: #999999;">业主房间号</text>
<text>张三</text>
<text>{{$wskj.isNullStr(userinfo.room)}}</text>
</view>
<view class="flex-row-between pad-30" style="border-bottom: 1rpx solid #E9E9E9;">
<text style="color: #999999;">业主手机号</text>
<text>张三</text>
<text>{{userinfo.mobile}}</text>
</view>
</view>
<view class="flex-column">
......@@ -32,12 +32,12 @@
export default {
data() {
return {
userinfo: '',
};
},
onLoad(options) {
this.userinfo = uni.getStorageSync("userInfo")
},
methods: {
open() {
......@@ -48,11 +48,11 @@
},
onClick(index) {
if (index == 0) {
this.$wskj.to("/pagesMain/pages/tsby_submit?type=0")
this.$wskj.to("/pagesMain/pages/tsby_submit?type=1")
return
}
if (index == 1) {
this.$wskj.to("/pagesMain/pages/tsby_submit?type=1")
this.$wskj.to("/pagesMain/pages/tsby_submit?type=2")
return
}
if (index == 2) {
......
......@@ -11,7 +11,7 @@
:style="{ color: index==0?'#FF682D':index==1?'#EEA616':index==2?'#1FCA7C':'#23BBEE'}"
v-for="(item, index) in 3" :key="index">
<text class="mt-20 fs-36">25</text>
<text class="mb-20 fs-24">待处理</text>
<text class="mb-20 fs-24">{{index==0?'待处理':index==1?'已完成':index==2?'已取消':''}}</text>
<view v-if="index==tabIndex"
style="background: #27CC81;height: 10rpx;width: 100%;border-radius: 12rpx;">
</view>
......@@ -20,28 +20,31 @@
</view>
</view>
</view>
<view style="flex:1;overflow-y:auto;">
<view class="overflow-y">
<scroll-view scroll-y style="height: 100%;">
<view v-for="(item, index) in 8" :key="index" @click="onClick(index)">
<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-25 w-25 mr-15" style="background: #1FCA7C;"> </image>
<text class="fs-32 fw-700" style="flex: 1;">居家报修</text>
<text>待处理</text>
<image class="h-40 w-40 mr-15" src="/static/icon_gd.png"> </image>
<text class="fs-32 fw-700" style="flex: 1;">{{item.type==1?'我要投诉':'我要表扬'}}</text>
<text>{{item.state==1?'待处理':item.state==2?'已完成':item.state==3?'已关闭':''}}</text>
</view>
<text class="fs-28 br-6 pad-20 mtb-20" style="background: #EBF5F0;">待处理</text>
<text class="fs-28 br-6 pad-20 mtb-20"
style="background: #EBF5F0;">{{item.commentDescription}}</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 10" :key="index2">
<image class="w-140 h-140" style="background: #1FCA7C;"></image>
<view class="w-140 h-140 mr-15"
v-for="(itemImg, index2) in $wskj.splitList(item.commentImg)" :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;">2025-03-10 10:01:45</text>
<text style="color: #EEA616;">去支付</text>
<text style="color: #27CC81;margin-left: 30rpx;">报修详情</text>
<text style="flex: 1;color: #000;">{{item.createTime}}</text>
<text @tap.stop="onCz('关闭投诉表扬',index)" v-if="item.state==1"
style="color: #23BBEE;">{{item.type==1?'关闭投诉':'关闭表扬'}}</text>
<text style="color: #27CC81;margin-left: 30rpx;">{{item.type==1?'投诉详情':'表扬详情'}}</text>
</view>
</view>
</view>
......@@ -57,14 +60,48 @@
return {
type: 0,
tabIndex: 0,
list: [],
};
},
onLoad(e) {
this.type = e.type
},
onShow() {
this.getList()
},
methods: {
onClick(index) {
this.$wskj.to("/pagesMain/pages/bxxq")
this.tabIndex = index;
this.getList()
},
onCz(e, index) {
if (e == "详情") {
this.$wskj.to("/pagesMain/pages/tsby_xq?id=" + this.list[index].id)
return
}
if (e == "关闭投诉表扬") {
this.gb(this.list[index].id);
return
}
},
getList() {
const params = {
url: '/api/comment/userListAll?state=' + (this.tabIndex + 1),
method: 'GET',
}
this.$request(params).then(res => {
this.list = res.data
})
},
gb(id) {
const params = {
url: '/api/comment/cancel/' + id,
method: 'PUT',
}
this.$request(params).then(res => {
this.getList()
})
}
},
};
......
......@@ -7,54 +7,45 @@
</view>
<view class="mar-20">
<view class="flex-column-center">
<image class="w-20 h-20" style="background-color: #1FCA7C;"></image>
<text>利达国宾中心</text>
<image class="w-30 h-30" src="/static/icon_home_dw.png"></image>
<text>{{userinfo.communityName}}</text>
</view>
<view class="flex-column-center fs-32 fw-700 mt-30">
<view class="flex-column-center fs-32 fw-700 mt-30 ml-10">
<image class="w-10 h-40 mr-15" style="background-color: #1FCA7C;"></image>
<text>业主信息</text>
</view>
<view class="flex-column br-12 fs-28 mt-30" style="box-shadow: 0px 0px 15px 1px rgba(142,142,142,0.16);">
<view class="flex-row-between pad-30" style="border-bottom: 1rpx solid #E9E9E9;">
<text style="color: #999999;">业主姓名</text>
<text>张三</text>
<text>{{$wskj.isNullStr(userinfo.name)}}</text>
</view>
<view class="flex-row-between pad-30" style="border-bottom: 1rpx solid #E9E9E9;">
<text style="color: #999999;">业主房间号</text>
<text>张三</text>
<text>{{$wskj.isNullStr(userinfo.room)}}</text>
</view>
<view class="flex-row-between pad-30" style="border-bottom: 1rpx solid #E9E9E9;">
<text style="color: #999999;">业主手机号</text>
<text>张三</text>
<text>{{userinfo.mobile}}</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>
<text>{{type == 1?'投诉信息':'表扬信息'}}</text>
</view>
<view class="flex-column br-12 fs-28 mt-30 pad-30"
style="box-shadow: 0px 0px 15px 1px rgba(142,142,142,0.16);">
<u--textarea v-model="reason" height="260rpx" maxlength="100" placeholder="填写下详细报修内容,有助于工作人员快速帮您解决问题"
count border="border"></u--textarea>
<u--textarea v-model="reason" height="260rpx" maxlength="100" placeholder="请输入信息" count
border="border"></u--textarea>
<view class="mt-30">
<upload-image v-model="images" maxCount="3" width="70" height="70" type="fullurl"></upload-image>
<upload-image @upload="upload" v-model="imgurl" maxCount="3" width="70" height="70"
type="fullurl"></upload-image>
</view>
</view>
</view>
<view @click="onSubmit" class="fullscreen-btn mt-50">
<view @click="onSubmit" class="fullscreen-btn">
<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>
......@@ -65,58 +56,48 @@
title: '我要投诉',
type: 0,
reason: '',
submitShow: false,
images: '',
userinfo: '',
};
},
onLoad(e) {
this.type = e.type
if (e.type == 0) {
if (e.type == 1) {
this.title = "我要投诉"
} else {
this.title = "我要表扬"
}
this.userinfo = uni.getStorageSync("userInfo")
},
methods: {
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
upload(e) {
this.images = e
},
// 提交
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 || '提交失败')
// })
onSubmit() {
console.log(this.images)
if (!this.reason) {
this.$wskj.toast('请输入表扬信息');
return
}
if (!this.images) {
this.$wskj.toast('请上传图片');
return
}
const params = {
url: '/api/comment/add',
loadingTip: '加载中...',
data: {
commentDescription: this.reason,
commentImg: this.images,
type: this.type
}
}
this.$request(params).then(res => {
this.$wskj.toast('提交成功')
setTimeout(() => {
this.$wskj.goBack(1)
}, 600)
})
}
},
};
......
<template>
<view class='center'>
<view style="background: linear-gradient( 180deg, #1FCA7C 0%, #F2F2F2 100%);">
<u-navbar :autoBack="true" :title="data.type==1?'投诉详情':'表扬详情'" 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">{{data.type==1?'今日投诉':'今日表扬'}}</text>
<text class="fs-30">{{data.type==1?'投诉详情我知道':'表扬详情我知道'}}</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.type==1?'我要投诉':'我要表扬'}}</text>
<text
style="font-size: 24rpx;color: #EEA616;">{{data.state==1?'待处理':data.state==2?'已完成':data.state==3?'已关闭':''}}</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(userinfo.name)}}</text>
</view>
<view class="flex pad-30">
<text class="fw-700 w-200" style="text-align: left;">业主房间号</text>
<text>{{$wskj.isNullStr(userinfo.room)}}</text>
</view>
<view class="flex pad-30">
<text class="fw-700 w-200" style="text-align: left;">业主手机号</text>
<text>{{userinfo.mobile}}</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>{{data.type==1?'投诉信息':'表扬信息'}}</text>
</view>
<view class="flex-column br-12 fs-28 mtb-30 pad-30" style="background: #EBF5F0;">
<text style="text-align: left;">{{data.commentDescription}}</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.commentImg)" :key="index2">
<image class="w-140 h-140" :src="itemImg"></image>
</view>
</view>
</scroll-view>
<view class="flex mt-20 fs-28">
<text class="fw-700">{{data.type==1?'投诉时间:':'表扬时间:'}}</text>
<text>{{data.createTime}}</text>
</view>
<view v-if="data.state==3" 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>
</view>
<view class="h-140 pt-20">
<view @click="onCz('关闭报修')" class="full-btn" style="color: #FF682D;" v-if="data.state==1">
{{data.type==1?'关闭投诉':'关闭表扬'}}
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
type: 0,
reason: '',
submitShow: false,
images: '',
id: '',
data: {},
userinfo: '',
};
},
onLoad(e) {
this.id = e.id
this.userinfo = uni.getStorageSync("userInfo")
this.getData()
},
methods: {
getData() {
const params = {
url: '/api/comment/' + this.id,
method: 'GET',
}
this.$request(params).then(res => {
this.data = res.data
})
},
gb() {
const params = {
url: '/api/comment/cancel/' + this.id,
method: 'PUT',
}
this.$request(params).then(res => {
this.$wskj.toast('关闭成功')
setTimeout(() => {
this.$wskj.goBack(1)
}, 600)
})
},
onCz(e) {
if (e == "关闭报修") {
this.gb();
return
}
},
},
};
</script>
<style scoped>
.center {
height: 100vh;
display: flex;
flex-direction: column;
background: white;
}
</style>
\ No newline at end of file
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