Blame view

pages/propertyPay/propertyPayList/propertyPayList.vue 7.68 KB
abd11604   monkeyhouyi   物业缴费
1
2
3
4
5
6
7
8
9
  <template>
  	<view class="page">
  		<view class="search-box">
  			<view>
  				<u-input v-model="value" type="select" border @click="show = true" style="background-color: #F7F7F7;"/>
  				<u-select v-model="show" :list="list"></u-select>
  			</view>
  			<view class="search-total">
  				<view class="left">
354e3811   杨鑫   '验收'
10
  					<text class="price-total"><u-icon name="rmb" style="font-size: 24rpx;" />100.00</text>
abd11604   monkeyhouyi   物业缴费
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
  					<text>(含代缴费)</text>
  				</view>
  				<div class="right" @click='toDetail'>
  					<text>缴费记录<u-icon name="arrow-right" style="margin-left: 8rpx;"></u-icon></text>
  				</div>
  			</view>
  		</view>
  		<!-- 记录列表 -->
  		<view class="record-list">
  			<view class="record-list-box" v-for="(item,index) in recordList" :key="index">
  				<u-checkbox-group class="list-group" style="width: 100%;">
  						<view class="list">
  							<u-checkbox v-model="checked" shape="circle" :label-disabled="false" />
  							<view class="list-item">
  								<view class="list-info">
  									<view class="img">
  										 <image :src="$imgUrl('/img/2.jpg')"></image>
  									</view>
  									<view class="info-items">
354e3811   杨鑫   '验收'
30
  										<view class="info-title">{{item.name}}:<text class="price"><u-icon name="rmb" style="font-size: 24rpx;" />100.00</text></view>
abd11604   monkeyhouyi   物业缴费
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
  										<view class="info-item">
  											<text>单价:¥15</text>
  											<text>费率:100%</text>
  										</view>
  									</view>
  								</view>
  							</view>
  							<view @click="recordList[index].showItem = !recordList[index].showItem"><u-icon name="arrow-right"></u-icon></view>
  						</view>
  						<view class="list" v-if="recordList[index].showItem">
  							<u-checkbox v-model="checked" shape="circle" :label-disabled="false" />
  							<view class="">
  								<view class="info-item">周期:2022.02.22 - 2022.02.22</view>
  								<view class="info-item">
  									<text>数量:100m²</text>
  									<text>门店号:A5646</text>
  								</view>
  							</view>
  							<view class="">
354e3811   杨鑫   '验收'
50
  								<text class="price"><u-icon name="rmb" style="font-size: 24rpx;" />20.00</text>
abd11604   monkeyhouyi   物业缴费
51
52
53
54
55
56
57
58
59
60
  							</view>
  						</view>
  				</u-checkbox-group>
  			</view>
  		</view>
  		<view style="height: 120rpx;"></view>
  		<view class="page-footer">
  			<view class="footer-buy">
  				<u-radio shape="circle">全选</u-radio>
  				<view class="">
354e3811   杨鑫   '验收'
61
  					合计:<text class="price"><u-icon name="rmb" style="font-size: 24rpx;" />100.00</text>
abd11604   monkeyhouyi   物业缴费
62
  				</view>
354e3811   杨鑫   '验收'
63
  				<u-button type="success" style="margin: 0 10rpx;" @click="joinShow = true">去支付</u-button>
abd11604   monkeyhouyi   物业缴费
64
65
  			</view>
  		</view>
354e3811   杨鑫   '验收'
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
  		<u-popup class="userForm" v-model="joinShow" mode="center" :closeable="true" width="80%" >
  			<u-form class="form-box"  ref="uForm" :label-width="120" >
  				<view style="padding: 30rpx;">
  					<view class="title">请选择支付方式</view>
  					<u-radio-group v-model="fangshi" @change="radioGroupChange" :wrap="true">
  								<u-radio 
  									@change="radioChange" 
  									v-for="(item, index) in list" :key="index" 
  									:name="item.name"
  									:disabled="item.disabled"
  									style="padding: 5px 0;"
  								>
  									{{item.name}}
  								</u-radio>
  							</u-radio-group>
  							<view class="" v-if="fangshi == 'H5支付'">
  							
  							</view>
  							<view class="" v-else>
  								<image :src="$imgUrl('/erwm.jpg')"   mode="widthFix"style="width: 80%;"/>
  								
  								
  							</view>
  					<!-- <u-form-item label="微信小程序支付">
  						
  					</u-form-item>
  					<u-form-item label="付款码扫码支付"></u-form-item> -->
  					<u-button type="success" @click="submit">提交</u-button>
  					
  				</view>
  				
  			</u-form>
  			
  		</u-popup>
  		 
  		<!-- <u-loading :show="true" size="60" style="position: absolute; top:80%;left: ;" color="red"></u-loading> -->
abd11604   monkeyhouyi   物业缴费
102
  	</view>
354e3811   杨鑫   '验收'
103
  	
abd11604   monkeyhouyi   物业缴费
104
105
106
107
108
109
110
  </template>
  
  <script>
  	export default {
  		data() {
  			return {
  				show: false,
354e3811   杨鑫   '验收'
111
  				joinShow: false,
abd11604   monkeyhouyi   物业缴费
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
  				value: '',
  				list: [{ value: '1', label: '大兴鸡排(A2144' }, { value: '2', label: '湖' }],
  				checked: [],
  				recordList:[
  					{
  						img: '',
  						name: '物业费',
  						price: 15,
  						rate: '100%',
  						chilren: [],
  						showItem: false,
  					},
  					{
  						img: '',
  						name: '卫生费',
  						price: 15,
  						rate: '100%',
  						chilren: [],
  						showItem: false,
  					},
  					{
  						img: '',
  						name: '水费',
  						price: 15,
  						rate: '100%',
  						chilren: [],
  						showItem: false,
  					},
  					{
  						img: '',
  						name: '电费',
  						price: 15,
  						rate: '100%',
  						chilren: [],
  						showItem: false,
  					},
  					{
  						img: '',
  						name: '燃气费',
  						price: 15,
  						rate: '100%',
  						chilren: [],
  						showItem: false,
  					},
  				],
354e3811   杨鑫   '验收'
157
158
159
160
161
162
163
164
165
166
167
168
169
  				list: [
  								{
  									name: 'H5支付',
  									disabled: false
  								},
  								// {
  								// 	name: '付款码扫码支付',
  								// 	disabled: false
  								// }
  							],
  							fangshi:'H5支付',
  							loadShow:false,
  							
abd11604   monkeyhouyi   物业缴费
170
171
  			};
  		},
354e3811   杨鑫   '验收'
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
  		onShow() {
  		let shopId = {
  			shopId:uni.getStorageSync('shopId') || ''
  		}
  		  const isLogin = uni.getStorageSync('token');
  		  if (isLogin =='') { 
  		    // 如果未登录,跳转到登录页面
  		        	uni.navigateTo({
  		        	  url: '/pages/login/login'
  		        	})
  		  }else{
  			  let page={
  				condition:2
  			  }
  			 this.$http.sendRequest('/shop/getById', 'POST',shopId).then(res => {
  				 if(res.data.code !="20004"){
  					 this.shopMsg = res.data.data
  					 this.Islogin= false
  					 this.$http.sendRequest('/index/index', 'POST',page).then(res => {
  					 	//成功回调
  					 	this.tongji = res.data.data
  					 })
  				 }else{
  					 uni.navigateTo({
  					   url: '/pages/login/login'
  					 })
  				 }
  			 })
  		  }		
  		
  		},
abd11604   monkeyhouyi   物业缴费
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
  		methods: {
  			recordXq(item){
  				 const encodedItem = encodeURIComponent(JSON.stringify(item));
  				uni.navigateTo({
  				 url: `/pages/accepting/accepting?item=${encodedItem}`,
  				 })
  			},
  			toDetail() {
  				uni.navigateTo({
  					url: '/pages/propertyPay/payRecord/payRecord'
  				})
  			},
  			contractdetail(){
  				// uni.navigateTo({
  				
  				// })
354e3811   杨鑫   '验收'
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
  			},
  			submit(){
  				
  			// 	this.loadShow = true
  			// setTimeout(()=>{
  			// 	this.loadShow = false
  			// },2000)
  		 if(this.fangshi =='付款码扫码支付'){
  			this.joinShow = false
  			 
  		 }else{
  			 let payList ={
  			 	additional: "附加交易授权",
  			 	backUrl: "",
  			 	channelId: "",
  			 	expireTime: 1800,
  			 	finishUrl: "",
  			 	latitude: "1",
  			 	longitude: "1",
  			 	orderNo: "",
  			 	payId: "",
  			 	payMerData: [
  			 		{
  			 			amount: 1,
  			 			body: "物业缴费",
  			 		}
  			 	],
  			 	payType: "Online",
  			 	returnUrl: "",
  			 	showBtn: "1",
  			 	siteId: "",
  			 	toApp: "0",
  			 	totalAmount: 1,
  			 	uid: "1693617316237021185",
  			 	universalLink: ""
  			 }
  			   const randomNumber = Math.floor(Math.random() * 10000); // 生成一个0到9999之间的随机数
  			       const timestamp = new Date().getTime(); // 获取当前时间的时间戳
  			       payList.orderNo = `${randomNumber}${timestamp}`
  			
  			 payList.uid =uni.getStorageSync('shopId')
  			 this.$http.sendRequest('/aggregationPayment/createOrder', 'POST', payList,1).then(res => {
  				 console.log(JSON.parse(res.data.data).data.codeUrl)
  				 let url  = JSON.parse(res.data.data).data.codeUrl
  				 
  				 // window.location.href = url
  				 // plus.runtime.openURL(url , function(e) {console.log(e)})
  				uni.showModal({
  					title: res.data.message,
  					showCancel:false,
  					success:ress => {
  						uni.switchTab({
  							url: '/pages/home/home'
  						})
  					}
  				})
  			 })
  
  			 this.joinShow = false
  			 	// uni.showModal({
  			 	// 	title: '支付成功	',
  			 	// 	showCancel:false,
  			 	// 	success:ress => {
  			 	// 		uni.switchTab({
  			 	// 			url: '/pages/home/home'
  			 	// 		})
  			 	// 	}
  			 	// })
  		 }
  		 
  			},
  			radioGroupChange(e) {
  						this.fangshi = e
  					}
abd11604   monkeyhouyi   物业缴费
293
294
295
296
297
298
299
  		}
  	}
  </script>
  
  <style scoped lang="scss">
  	@import 'propertyPayList.scss';
  </style>