Blame view

lvdao-miniapp/pages/serve/serve.vue 4.95 KB
e5b57447   杨鑫   '分包问卷'
1
2
3
4
  <template>
  	<view class="page">
  		<view class="screen-list">
  			<view class="list">
0e6c481b   wesley88   1
5
  				<u-input type="select" @click="typeShow = true" :placeholder='pageindex.start' />
e5b57447   杨鑫   '分包问卷'
6
7
8
9
10
11
12
13
14
15
16
  			</view>
  		</view>
  		<!-- 记录列表 -->
  		<view class="record-list">
  			<view class="record-list-box" v-for="(item,index) in recordList" :key="index" @click="recordXq(item)">
  				<view class="list">
  					<view class="title">
  						<view class="left">报修:{{item.warrantyIssue}}</view>
  						<view class="right"><u-icon name="arrow-rightward"></u-icon></view>
  					</view>
  					<view class="info-item">申请时间:{{item.applicationTime}}</view>
0e6c481b   wesley88   1
17
18
  					<view class="info-item">状态:<span style="color: #0FBB59;">{{item.status=='1'?'受理中':'已完成'}}</span>
  					</view>
8c0a2463   杨鑫   '最新'
19
  					<view style="margin-top: 10px;" v-if="item.status  == '2'">
0e6c481b   wesley88   1
20
21
  						<u-button type="success" style="width:30%;height: 28px;margin: 0 10px 0 0;"
  							@click="baoShow(0,item.id)">评价</u-button>
8c0a2463   杨鑫   '最新'
22
  					</view>
e5b57447   杨鑫   '分包问卷'
23
24
25
26
27
28
29
30
31
  				</view>
  			</view>
  			<view class="record-list-box" v-for="(item,index) in toushu" :key="index" @click="recordXq(item)">
  				<view class="list">
  					<view class="title">
  						<view class="left">投诉:{{item.complaintType}}</view>
  						<view class="right"><u-icon name="arrow-rightward"></u-icon></view>
  					</view>
  					<view class="info-item">申请时间:{{item.applicationTime}}</view>
0e6c481b   wesley88   1
32
33
  					<view class="info-item">状态:<span style="color: #0FBB59;">{{item.status=='1'?'受理中':'已完成'}}</span>
  					</view>
8c0a2463   杨鑫   '最新'
34
  					<view style="margin-top: 10px;" v-if="item.status  == '2'">
0e6c481b   wesley88   1
35
36
  						<u-button type="success" style="width:30%;height: 28px;margin: 0 10px 0 0;"
  							@click="baoShow(1,item.id)">评价</u-button>
45318813   杨鑫   '最新版本'
37
  					</view>
e5b57447   杨鑫   '分包问卷'
38
39
40
  				</view>
  			</view>
  		</view>
60cd6339   杨鑫   '最新'
41
  		<u-select v-model="typeShow" :list="activesType" @confirm="typeChange"></u-select>
0e6c481b   wesley88   1
42
  		<u-popup class="userForm" v-model="joinShow" mode="center" border-radius="20" :closeable="true" width="90%">
8c0a2463   杨鑫   '最新'
43
44
  			<view style="padding: 30rpx;">
  				<view style="text-align: center;font-size: 16px;font-weight: 600;margin-bottom: 30rpx;">评价</view>
0e6c481b   wesley88   1
45
46
47
48
49
50
51
52
  				<view class="" style="background-color: #F0F0F0;border-radius: 20rpx;margin-bottom: 15px;">
  					<textarea cols="30" rows="10" placeholder="请输入" maxlength="150"
  						style="font-size: 24rpx;background-color: #F0F0F0;border-radius: 20rpx;width: 96%;margin: 0 auto;padding: 20rpx;"
  						v-model="form.estimate"></textarea>
  					<p style="text-align: right; font-size: 24rpx; color: #666;padding:0 20rpx 10rpx 0;">
  						剩余 {{ remainingCharacters }} 字
  					</p>
  				</view>
8c0a2463   杨鑫   '最新'
53
54
55
  				<u-button type="success" @click="submit">提交</u-button>
  			</view>
  		</u-popup>
e5b57447   杨鑫   '分包问卷'
56
57
58
59
60
61
62
  	</view>
  </template>
  
  <script>
  	export default {
  		data() {
  			return {
0e6c481b   wesley88   1
63
64
  				recordList: [
  
e5b57447   杨鑫   '分包问卷'
65
  				],
0e6c481b   wesley88   1
66
  				toushu: [],
e5b57447   杨鑫   '分包问卷'
67
  				pageindex: {
0e6c481b   wesley88   1
68
  					start:'投诉记录',
60cd6339   杨鑫   '最新'
69
  					pageNumber: 0,
e5b57447   杨鑫   '分包问卷'
70
71
  					pageSize: 10
  				},
0e6c481b   wesley88   1
72
  				activesType: [{
60cd6339   杨鑫   '最新'
73
74
  					value: 0,
  					label: '投诉记录'
0e6c481b   wesley88   1
75
  				}, {
60cd6339   杨鑫   '最新'
76
77
  					value: 1,
  					label: '报修记录'
0e6c481b   wesley88   1
78
79
80
81
82
83
  				}],
  				typeShow: false,
  				joinShow: false,
  				form: {
  					estimate: '',
  					id: ''
8c0a2463   杨鑫   '最新'
84
  				},
0e6c481b   wesley88   1
85
  				indexMsg: 0
e5b57447   杨鑫   '分包问卷'
86
87
  			}
  		},
0e6c481b   wesley88   1
88
  		mounted() {
e5b57447   杨鑫   '分包问卷'
89
90
  			this.getALL()
  		},
0e6c481b   wesley88   1
91
92
93
94
95
96
  		computed: {
  			remainingCharacters() {
  				const maxLength = 150;
  				return maxLength - this.form.estimate.length;
  			}
  		},
e5b57447   杨鑫   '分包问卷'
97
  		methods: {
0e6c481b   wesley88   1
98
99
100
101
102
  			baoShow(val, ids) {
  				this.joinShow = true
  				this.form.estimate = ''
  				this.form.id = ids
  				this.indexMsg = val
8c0a2463   杨鑫   '最新'
103
  			},
0e6c481b   wesley88   1
104
105
106
107
108
109
  			getALL() {
  				this.pageindex.createUser = uni.getStorageSync('user').phone
  				this.$http.sendRequest('/cereComplaintsSuggestions/queryByPage', 'POST', this.pageindex, 1).then(
  				res => {
  					this.toushu = res.data.data.content
  					this.recordList = []
e5b57447   杨鑫   '分包问卷'
110
111
  				})
  			},
0e6c481b   wesley88   1
112
113
  			recordXq(item) {
  				const encodedItem = encodeURIComponent(JSON.stringify(item));
e5b57447   杨鑫   '分包问卷'
114
  				uni.navigateTo({
0e6c481b   wesley88   1
115
116
  					url: `/pages/serve/jiDed?item=${encodedItem}`,
  				})
e5b57447   杨鑫   '分包问卷'
117
  			},
60cd6339   杨鑫   '最新'
118
  			typeChange(e) {
0e6c481b   wesley88   1
119
120
121
122
123
  				this.pageindex.start = e[0].label
  				if (e[0].value == 0) {
  
  					this.$http.sendRequest('/cereComplaintsSuggestions/queryByPage', 'POST', this.pageindex, 1).then(
  					res => {
8c0a2463   杨鑫   '最新'
124
  						this.toushu = res.data.data.content
0e6c481b   wesley88   1
125
126
127
128
129
130
  						this.recordList = []
  					})
  				} else {
  					this.$http.sendRequest('/cereReportIssuesRepairs/queryByPage', 'POST', this.pageindex, 1).then(res => {
  						this.recordList = res.data.data.content
  						this.toushu = []
60cd6339   杨鑫   '最新'
131
132
133
  					})
  				}
  			},
0e6c481b   wesley88   1
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
  			submit() {
  				if (!this.form.estimate) {
  					uni.showToast({
  						icon: 'none',
  						title: '请输入评价信息'
  					});
  					return;
  				}
  				if (this.indexMsg == 1) {
  					this.$http.sendRequest('/cereComplaintsSuggestions/edit', 'POST', this.form, 1).then(res => {
  						uni.showToast({
  							icon: 'success',
  							title: '评价成功'
  						});
  					})
  					this.joinShow = false
  				} else {
  					this.$http.sendRequest('/cereReportIssuesRepairs/edit', 'POST', this.form, 1).then(res => {
  						uni.showToast({
  							icon: 'success',
  							title: '评价成功'
  						});
  					})
  					this.joinShow = false
  				}
45318813   杨鑫   '最新版本'
159
  			}
e5b57447   杨鑫   '分包问卷'
160
161
162
163
164
165
  		}
  	}
  </script>
  
  <style scoped lang="scss">
  	@import 'serve.scss';
0e6c481b   wesley88   1
166
  </style>