<template>
|
<view>
|
<u-sticky bgColor="white">
|
<u-navbar title="执法记录" :autoBack="true" placeholder></u-navbar>
|
<u-tabs :list="list" @change="click" :current="current" :scrollable="false" bgColor="white"></u-tabs>
|
</u-sticky>
|
<view class="item" v-for="(item,index) in list1">
|
<img src="/static/i05.png" class="img" alt="" />
|
<view class="right">
|
<view class="name">
|
<view class="l">
|
{{item.enforceReason}}
|
</view>
|
<!-- <template v-if="item.orderStatus==2">
|
<view class="r color3">
|
未执法
|
</view>
|
</template>
|
<template v-if="item.isEva==0">
|
<view class="r color2">
|
待评价
|
</view>
|
</template>
|
<template v-if="item.isEva==1">
|
<view class="r color1">
|
已评价
|
</view>
|
</template> -->
|
</view>
|
<view class="box">
|
<view class="l">
|
<p style="display: flex;justify-content: flex-start;align-items: flex-start;"><text
|
style="display: inline-block;width: 35%;">执法单位:</text> <text
|
style="display: inline-block;width: 65%;">{{item.executeDeptName|| item.applyDeptName}}</text></p>
|
<p>执法时间:{{item.inTime || item.planTime}}</p>
|
</view>
|
<!-- 正常情况 -->
|
<view class="r" @click="chakan(item.orderId)">
|
去查看
|
</view>
|
</view>
|
</view>
|
</view>
|
<u-empty v-if="!list1.length"></u-empty>
|
<view style="height: 150rpx;"></view>
|
|
<view class="bottom" v-if="current == 0 && list1.length">
|
<view class="one">
|
<view class="b1" style="background-color: #1171E0;color: white;" @click="enterOrder()">
|
确认
|
</view>
|
</view>
|
</view>
|
|
<view class="bottom" v-if="list1.length && (current == 1 || current == 2)">
|
<view class="two" v-if="current == 1">
|
<view class="b2" @click="show = true">
|
投诉
|
</view>
|
<view class="b3" @click="pingjia()">
|
我要评价
|
</view>
|
</view>
|
</view>
|
|
<u-popup :show="show" @close="close" mode="bottom" round="10" closeable>
|
<view class="page-box">
|
<view class="title1">
|
企业投诉
|
</view>
|
<view class="border"></view>
|
<view class="padding">
|
<view class="font">
|
投诉主题
|
</view>
|
<view>
|
<u-radio-group v-model="complaintType" style="flex-Wrap: wrap;">
|
<u-radio :customStyle="{marginRigth: '20rpx'}" v-for="(aa, ii) in datalist" :key="ii" :name="aa.dictCode">
|
{{aa.dictLabel}}
|
</u-radio>
|
</u-radio-group>
|
</view>
|
<view class="font">
|
投诉内容
|
</view>
|
<view class="margin-top">
|
<u-textarea :cursorSpacing="70" v-model="complaintReason" placeholder="请输入..."></u-textarea>
|
</view>
|
</view>
|
<view class="down">
|
<view class="enter" @click="entery()">提交</view>
|
</view>
|
</view>
|
</u-popup>
|
</view>
|
</template>
|
|
<script>
|
import tabsCom from '@/qiye/components/bottom.vue'
|
import {
|
togetherList,
|
confirmOrderId,
|
orderComplaint
|
} from '@/api/qiye.js'
|
import {
|
getDicts
|
} from '@/api/data.js'
|
export default {
|
components: {
|
tabsCom
|
},
|
data() {
|
return {
|
activeNumber: 1,
|
list: [
|
// {
|
// name: '全部',
|
// value: {
|
|
// }
|
// }, {
|
// name: '未执法',
|
// value: {
|
// orderStatus: 2
|
// }
|
// },
|
{
|
name: '待确认',
|
value: {
|
orderStatus: 4
|
}
|
}, {
|
name: '待评价',
|
value: {
|
isEva: 0,
|
orderStatus: 5
|
}
|
}, {
|
name: '已评价',
|
value: {
|
isEva: 1
|
}
|
}
|
],
|
current: 0,
|
list1: [],
|
queryParams: {
|
pageNum: 1,
|
pageSize: 10,
|
companyId: '',
|
},
|
total: 1,
|
|
show: false,
|
complaintType: '',
|
complaintReason: '',
|
datalist: []
|
}
|
},
|
onLoad(options) {
|
this.id = options.id
|
this.getList()
|
getDicts('complaint_type').then(val => {
|
this.datalist = val.data.data
|
})
|
uni.$on('refresh', () => {
|
this.queryParams.pageNum = 1
|
this.list1 = []
|
this.getList()
|
})
|
},
|
|
onReachBottom() {
|
if (this.list1.length == this.total) {
|
return
|
}
|
this.queryParams.pageNum++
|
this.getList()
|
},
|
methods: {
|
chakan(id) {
|
uni.navigateTo({
|
url: `/qiye/record/details?id=${id}&type=1`
|
})
|
},
|
|
// 综合查一次
|
jumpCompositeDetail(id) {
|
uni.navigateTo({
|
url: `/qiye/record/compositeDetails?id=${id}`
|
})
|
},
|
|
getList() {
|
uni.showLoading({
|
title: '加载中...',
|
mask: true
|
})
|
let data = uni.getStorageSync("qiyedata")
|
this.queryParams.companyId = data.companyId
|
togetherList({
|
...this.queryParams,
|
comprehensiveId: this.id,
|
...this.list[this.current].value
|
}).then(val => {
|
this.total = val.data.total
|
this.list1 = [...this.list1, ...val.data.rows]
|
}).catch(err => {
|
uni.hideLoading()
|
})
|
},
|
click(i) {
|
this.list1 = []
|
this.queryParams.pageNum = 1
|
this.current = i.index
|
// console.log(i.index)
|
|
// if(i.index==1){
|
// this.queryParams.isEva = 0
|
// }
|
// if(i.index==2){
|
// this.queryParams.orderStatus = 2
|
// }
|
// if(i.index==3){
|
// this.queryParams.isEva = 1
|
// }
|
this.getList()
|
},
|
|
pingjia() {
|
uni.navigateTo({
|
url: `/qiye/record/evaluate?id=${this.list1[0].orderId}&type=1`
|
})
|
},
|
|
enterOrder() {
|
uni.showModal({
|
title: '提示',
|
content: '是否确认该检查内容?',
|
success: val => {
|
if (val.confirm) {
|
confirmOrderId({
|
orderId: this.list1[0].orderId
|
}).then(val => {
|
if (val.data.code == 200) {
|
uni.showToast({
|
title: '确认成功',
|
icon: 'none'
|
})
|
this.list1 = []
|
this.queryParams.pageNum = 1
|
this.getList()
|
}
|
})
|
}
|
}
|
})
|
},
|
|
close() {
|
this.show = false
|
this.$emit('cancel')
|
},
|
|
entery() {
|
this.$emit('entery')
|
if (this.complaintType == '') {
|
uni.showToast({
|
title: '请选择投诉主题',
|
icon: 'none'
|
})
|
return
|
}
|
if (this.complaintReason == '') {
|
uni.showToast({
|
title: '请输入投诉内容',
|
icon: 'none'
|
})
|
return
|
}
|
let data = {
|
orderId: Number(this.list1[0].orderId),
|
complaintType: this.complaintType,
|
complaintReason: this.complaintReason
|
}
|
console.log(data)
|
//return;
|
orderComplaint(data).then(val => {
|
uni.showToast({
|
title: '提交成功',
|
icon: 'none'
|
})
|
this.show = false
|
})
|
},
|
}
|
}
|
</script>
|
|
<style>
|
page {
|
background: #f4f4f4;
|
}
|
</style>
|
<style lang="scss">
|
.item {
|
background: #fff;
|
border-radius: 5px;
|
padding: 24rpx;
|
box-sizing: border-box;
|
margin: 20rpx 32rpx;
|
display: flex;
|
|
.img {
|
width: 56rpx;
|
height: 56rpx;
|
}
|
|
.right {
|
width: 90%;
|
|
.name {
|
display: flex;
|
justify-content: space-between;
|
|
.l {
|
color: #202d44;
|
font-size: 32rpx;
|
line-height: 44rpx;
|
margin-bottom: 24rpx;
|
width: 80%;
|
}
|
|
.r {
|
font-size: 28rpx;
|
width: 20%;
|
text-align: right;
|
}
|
}
|
|
.box {
|
display: flex;
|
justify-content: space-between;
|
|
.l {
|
font-size: 26rpx;
|
color: #7e8593;
|
max-width: 80%;
|
}
|
|
.r {
|
width: 132rpx;
|
height: 64rpx;
|
line-height: 64rpx;
|
border-radius: 5px;
|
border: 1px solid #ABD2FF;
|
background: #F0F8FF;
|
color: #1171e0;
|
text-align: center;
|
font-size: 30rpx;
|
}
|
}
|
}
|
}
|
|
.color1 {
|
color: #FE7B32;
|
//cheng
|
}
|
|
.color2 {
|
color: #EB4746;
|
|
//hong
|
}
|
|
.color3 {
|
color: #3EB47A;
|
//lv
|
}
|
|
.bottom {
|
position: fixed;
|
bottom: 0;
|
width: 100%;
|
left: 0;
|
height: 132rpx;
|
background: #fff;
|
|
.one {
|
display: flex;
|
justify-content: center;
|
align-items: center;
|
height: 100%;
|
|
.b1 {
|
width: 686rpx;
|
height: 88rpx;
|
border-radius: 10px;
|
background: #F7F7F7;
|
line-height: 88rpx;
|
text-align: center;
|
}
|
}
|
|
.two {
|
display: flex;
|
justify-content: center;
|
align-items: center;
|
height: 100%;
|
|
.b2 {
|
width: 146rpx;
|
height: 88rpx;
|
border-radius: 10px;
|
background: #F7F7F7;
|
line-height: 88rpx;
|
text-align: center;
|
margin-right: 18rpx;
|
}
|
|
.b3 {
|
width: 524rpx;
|
height: 88rpx;
|
border-radius: 10px;
|
background: #1171E0;
|
line-height: 88rpx;
|
text-align: center;
|
color: #fff;
|
}
|
}
|
}
|
|
.page-box {
|
padding: 24rpx 0;
|
|
.font {
|
color: #4a4e60;
|
font-size: 32rpx;
|
margin-top: 20rpx;
|
}
|
|
.title1 {
|
font-size: 36rpx;
|
font-weight: 700;
|
padding: 0 32rpx;
|
border-bottom: 2rpx solid #F4F4F4;
|
padding-bottom: 24rpx;
|
}
|
|
.padding {
|
padding: 0 24rpx;
|
}
|
|
.margin-top {
|
margin-top: 20rpx;
|
}
|
|
.down {
|
padding: 34rpx 30rpx 30rpx;
|
display: flex;
|
justify-content: space-between;
|
|
>view {
|
display: inline-block;
|
}
|
|
.button {
|
padding: 20rpx 40rpx;
|
background: #F7F7F7;
|
border-radius: 20rpx;
|
}
|
|
.enter {
|
width: 100%;
|
background: #1171E0;
|
color: white;
|
border-radius: 20rpx;
|
padding: 20rpx 40rpx;
|
text-align: center;
|
}
|
}
|
}
|
|
::v-deep .u-radio {
|
margin-bottom: 20rpx;
|
margin-right: 20rpx !important;
|
}
|
|
::v-deep .u-radio-group {
|
margin-top: 10rpx !important;
|
flex-wrap: wrap !important;
|
}
|
</style>
|