Parcourir la source

Merge branch 'master' of http://git.zthymaoyi.com/gongdc/wuye

ccjgmwz il y a 2 ans
Parent
commit
4e34346313

+ 1 - 1
unimall-app-api/src/main/java/com/iotechn/unimall/app/api/wuye/IWuyeAmountInfoAppService.java

@@ -58,7 +58,7 @@ public interface IWuyeAmountInfoAppService {
     @HttpMethod(description = "删除", permission = "admin:wuye:wuyeAmountInfo:delete", permissionParentName = "宠物管理", permissionName = "info管理")
     public Boolean delete(@NotNull @HttpParam(name = "id", type = HttpParamType.COMMON, description = "") Long id) throws ServiceException;
 
-    @HttpMethod(description = "修改", permission = "admin:wuyeAmountInfo:wuyeAmountInfo:update", permissionParentName = "宠物管理", permissionName = "info管理")
+    @HttpMethod(description = "修改")
     public Boolean update(@NotNull @HttpParam(name = "wuyeAmountInfo", type = HttpParamType.COMMON, description = "info") WuyeAmountInfo wuyeAmountInfo,
                           @HttpParam(name = "adminId", type = HttpParamType.ADMIN_ID, description = "adminId") Long adminId) throws ServiceException;
 

+ 1 - 1
wuyeH5/config/index.js

@@ -1,6 +1,6 @@
 const dev = {
 	// baseUrlNew: 'https://apitest.eliangeyun.com',
-	baseUrlNew: 'http://192.168.110.82:8081',
+	baseUrlNew: 'http://192.168.110.82:8181',
 	// baseUrlNew: 'https://api.thesunbelt.shop',
 	h5Appid: 'wxb66b599f7f61b46f',
 	debug: false

+ 10 - 1
wuyeH5/pages.json

@@ -9,7 +9,16 @@
 				"navigationBarTitleText": "东方御"
 			}
 		}
-	],
+	    ,{
+            "path" : "pages/pay/pay",
+            "style" :                                                                                    
+            {
+                "navigationBarTitleText": "支付",
+                "enablePullDownRefresh": false
+            }
+            
+        }
+    ],
 	"globalStyle": {
 		"navigationBarTextStyle": "black",
 		"navigationBarTitleText": "东方御",

+ 150 - 84
wuyeH5/pages/index/index.vue

@@ -1,108 +1,128 @@
 <template>
 	<view class="content">
 		<!-- 注意,如果需要兼容微信小程序,最好通过setRules方法设置rules规则 -->
-		<u--form labelPosition="left" :model="userInfo" :rules="rules" ref="form1" labelWidth="80">
+		<u--form labelPosition="left" :model="wuyeAmountInfo" :rules="rules" ref="form1" labelWidth="80">
 			<u-form-item label="楼号" prop="name" borderBottom ref="item1">
-				<u--input v-model="userInfo.name" border="none" placeholder="请输入楼号"></u--input>
+				<u--input v-model="wuyeAmountInfo.buildingNo" border="none" placeholder="请输入楼号(例:1)" type='number'>
+				</u--input>
 			</u-form-item>
 			<u-form-item label="单元号" prop="name" borderBottom ref="item1">
-				<u--input v-model="userInfo.name1" border="none" placeholder="请输入单元号"></u--input>
+				<u--input v-model="wuyeAmountInfo.unitNo" border="none" placeholder="请输入单元号(例:2)" type='number'>
+				</u--input>
 			</u-form-item>
 			<u-form-item label="房间号" prop="name" borderBottom ref="item1">
-				<u--input v-model="userInfo.name2" border="none" placeholder="请输入房间号"></u--input>
+				<u--input v-model="wuyeAmountInfo.floor" border="none" placeholder="请输入房间号(例:501)" type='number'>
+				</u--input>
 			</u-form-item>
 		</u--form>
 		<u-button type="primary" text="查询" @click="selectInfo"></u-button>
 		<u-toast ref="uToast"></u-toast>
-		<view class="fy-detail">
-			<view class="title">
-				户主信息
-			</view>
-			<view class="row">
-				<view class="left">
-					户主:
-				</view>
-				<view class="">
-					王洋
-				</view>
-			</view>
-			<view class="row">
-				<view class="left">
-					房源号:
+		<view class="content1" v-if="isSHowInfo">
+			<view class="fy-detail">
+				<view class="title">
+					户主信息
 				</view>
-				<view class="">
-					1-1-602
+				<view class="row">
+					<view class="left">
+						户主:
+					</view>
+					<view class="">
+						{{wuyeAmountInfo.householder}}
+					</view>
 				</view>
-			</view>
-			<view class="row">
-				<view class="left">
-					实际面积:
+				<view class="row">
+					<view class="left">
+						房源号:
+					</view>
+					<view class="">
+						{{wuyeAmountInfo.sourceNumber}}
+					</view>
 				</view>
-				<view class="">
-					110.1
-				</view>
-			</view>
-			<view class="title">
-				费用明细:
-			</view>
-			<view class="row">
-				<view class="left">
-					物业费:
+				<view class="row">
+					<view class="left">
+						实际面积:
+					</view>
+					<view class="">
+						{{wuyeAmountInfo.actualMoney}}
+					</view>
 				</view>
-				<view class="">
-					2,114
+				<view class="row">
+					<view class="left">
+						付款状态:
+					</view>
+					<view class="">
+						{{wuyeAmountInfo.totalActualPayment==0?'未支付':"已支付"}}
+					</view>
 				</view>
-			</view>
-			<view class="row">
-				<view class="left">
-					电梯费:
+				<view class="title-qj">
+					缴费区间:{{wuyeAmountInfo.paymentRange}}
 				</view>
-				<view class="">
-					110.1
+				<view class="title">
+					费用明细:
 				</view>
-			</view>
-			<view class="row">
-				<view class="left">
-					车位管理费:
+				<view class="row">
+					<view class="left">
+						物业费:
+					</view>
+					<view class="">
+						{{wuyeAmountInfo.propertyFee}}
+					</view>
 				</view>
-				<view class="">
-					110.1
+				<view class="row">
+					<view class="left">
+						电梯费:
+					</view>
+					<view class="">
+						{{wuyeAmountInfo.elevatorFee}}
+					</view>
 				</view>
-			</view>
-			<view class="row">
-				<view class="left">
-					车库管理费:
+				<view class="row">
+					<view class="left">
+						车位管理费:
+					</view>
+					<view class="">
+						{{wuyeAmountInfo.parkingSpace}}
+					</view>
 				</view>
-				<view class="">
-					110.1
+				<view class="row">
+					<view class="left">
+						车库管理费:
+					</view>
+					<view class="">
+						{{wuyeAmountInfo.garage}}
+					</view>
 				</view>
-			</view>
-			<view class="row">
-				<view class="left">
-					仓库管理费:
+				<view class="row">
+					<view class="left">
+						仓库管理费:
+					</view>
+					<view class="">
+						{{wuyeAmountInfo.warehouse}}
+					</view>
 				</view>
-				<view class="">
-					110.1
+				<view class="row">
+					<view class="left">
+						垃圾清运费:
+					</view>
+					<view class="">
+						{{wuyeAmountInfo.garbageClearing}}
+					</view>
 				</view>
 			</view>
-			<view class="row">
+			<view class="total">
 				<view class="left">
-					垃圾清运费:
+					应缴费总合计
 				</view>
 				<view class="">
-					110.1
+					{{total}}
 				</view>
 			</view>
+			<u-button type="primary" text="去付款" @click="pay" class="pay"></u-button>
 		</view>
-		<view class="total">
-			<view class="left">
-				应缴费总合计:
-			</view>
-			<view class="">
-				110.1
-			</view>
-		</view>
-		<u-button type="primary" text="去付款" @click="pay" class="pay"></u-button>
+		<!-- <u-popup :show="isShowCode" @close="isShowCode= false" @open="open" mode="center">
+
+		</u-popup> -->
+
 	</view>
 </template>
 
@@ -110,39 +130,78 @@
 	export default {
 		data() {
 			return {
-				showSex: false,
-				userInfo: {
-					name: '',
+				isSHowInfo: false,
+				isShowCode: false,
+				wuyeAmountInfo: {
+					buildingNo: '',
+					unitNo: '',
+					floor: '',
 				},
 				rules: {
-					'name': {
+					'buildingNo': {
 						type: 'string',
 						required: true,
 						message: '请填写楼号',
-						trigger: ['blur']
+						trigger: ['blur', 'change']
 					},
-					'name1': {
+					'unitNo': {
 						type: 'string',
 						required: true,
 						message: '请填写单元号',
-						trigger: ['blur']
+						trigger: ['blur', 'change']
 					},
-					'name2': {
+					'floor': {
 						type: 'string',
 						required: true,
 						message: '请填写房间号',
-						trigger: ['blur']
+						trigger: ['blur', 'change']
 					}
 				}
 			};
 		},
+		computed: {
+			total() {
+				let _totalPrice = Number(this.wuyeAmountInfo.propertyFee) + Number(this.wuyeAmountInfo.elevatorFee) +
+					Number(this.wuyeAmountInfo.parkingSpace) + Number(this.wuyeAmountInfo.garage) + Number(this
+						.wuyeAmountInfo.warehouse) + Number(this.wuyeAmountInfo.garbageClearing)
+				return _totalPrice;
+			},
+		},
 		methods: {
 			pay() {
 				console.log("去付款")
+				this.isShowCode = true
+				uni.navigateTo({
+					url: '/pages/pay/pay?price=' + this.total + "&id=" + this.wuyeAmountInfo.id
+				})
+
 			},
 			selectInfo() {
-				this.$request.baseRequest('sunServiceOrderApp', 'payment', {
-					sunServiceOrder: JSON.stringify(this.dataObj)
+				if (!this.wuyeAmountInfo.buildingNo) {
+					this.$refs.uToast.show({
+						type: 'error',
+						message: '请输入楼号!',
+					})
+					return
+				}
+				if (!this.wuyeAmountInfo.unitNo) {
+					this.$refs.uToast.show({
+						type: 'error',
+						message: '请输入单元号!',
+					})
+					return
+				}
+				if (!this.wuyeAmountInfo.floor) {
+					this.$refs.uToast.show({
+						type: 'error',
+						message: '请输入房间号!',
+					})
+					return
+				}
+
+
+				this.$request.baseRequest('wuyeAmountInfoApp', 'getInfo', {
+					wuyeAmountInfo: JSON.stringify(this.wuyeAmountInfo)
 				}, failres => {
 					this.$refs.uToast.show({
 						type: 'error',
@@ -151,6 +210,8 @@
 					uni.hideLoading()
 				}).then(res => {
 					console.log(res)
+					this.isSHowInfo = true
+					this.wuyeAmountInfo = res.data
 				})
 
 			},
@@ -167,6 +228,11 @@
 	}
 
 	.fy-detail {
+		.title-qj {
+			font-weight: 700;
+			margin: 20rpx 0;
+		}
+
 		.title {
 			font-size: 36rpx;
 			font-weight: 700;

+ 105 - 0
wuyeH5/pages/pay/pay.vue

@@ -0,0 +1,105 @@
+<template>
+	<view class="content">
+		<view class="">
+			长按下方二维码,识别二维码支付!
+		</view>
+		<view class="row">
+			<view class="">
+				支付金额:
+			</view>
+			<view class="">
+				{{price}}
+			</view>
+		</view>
+		<view class="img">
+			<image src="https://taohaoliang.oss-cn-beijing.aliyuncs.com/pcfiles/dongfangyu.png" mode="widthFix"></image>
+		</view>
+		<view class="row3">
+			支付完成后,请点击支付完成按钮!
+		</view>
+		<u-popup :show="flag>1" @close="flag=1" mode="center" :closeOnClickOverlay='false' :round="10">
+			<view class="pay-btn">
+				<u-button type="primary" text="支付完成" @click="finishPay" class="pay btn"></u-button>
+				<u-button type="primary" text="取消支付" @click="qxPay" class="pay btn"></u-button>
+			</view>
+
+		</u-popup>
+
+	</view>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+				price: '',
+				flag: 0
+			};
+		},
+		onLoad(option) {
+			this.price = option.price
+			console.log("option", option)
+			console.log(option)
+			this.flag = 2
+			this.id = option.id
+		},
+		onShow() {
+			this.flag++
+		},
+		methods: {
+			qxPay() {
+				this.flag = 0
+			},
+			finishPay() {
+
+				this.$request.baseRequest('wuyeAmountInfoApp', 'update', {
+					wuyeAmountInfo: JSON.stringify({
+						id: this.id,
+						totalActualPayment: this.price
+					})
+				}, failres => {
+					this.$refs.uToast.show({
+						type: 'error',
+						message: failres.errmsg,
+					})
+					uni.hideLoading()
+				}).then(res => {
+					uni.navigateTo({
+						url: '/pages/index/index'
+					})
+				})
+			}
+		},
+	}
+</script>
+
+<style lang="scss">
+	.content {
+		padding: 20rpx;
+	}
+
+	.img {
+		display: flex;
+		justify-content: center;
+		margin-top: 20rpx
+	}
+
+	.row {
+		margin-top: 20rpx;
+		display: flex;
+	}
+
+	.row3 {
+		margin: 40rpx;
+	}
+
+	.pay-btn {
+		padding: 40rpx 20rpx;
+		width: 80vw;
+		display: flex;
+
+		.btn {
+			margin: 0 10rpx;
+		}
+	}
+</style>