Browse Source

bug修复

qzyReal 3 years ago
parent
commit
90929b5dd2

+ 1 - 1
app/pages/business-order/business-order.vue

@@ -49,7 +49,7 @@
 					</view>
 				</view>
 				<view class="b">
-					<view class="btn b3" v-if="businessItem.confirmInput==0
+					<view class="btn b3" v-if="businessItem.payStatus==1
 								&&perList.indexOf('tb-business-confirm')!=-1
 								&&customemrId!='1'" @click="sureZdFn(businessItem)">
 						支付账单</view>

+ 18 - 15
app/pages/wx/payOrder.vue

@@ -1,7 +1,7 @@
 <template>
 	<view>
 		<view class="box">
-			<view class="item" >
+			<view class="item">
 				<view class="l">订单号:</view>
 				<view class="r">
 					{{form.no}}
@@ -23,7 +23,7 @@
 					<text>(元)</text>
 				</view>
 			</view>
-			<view class="item" >
+			<view class="item">
 				<view class="l" style="flex: 6;">境外车停车费:</view>
 				<view class="r">
 					{{form.partMoney}}
@@ -44,19 +44,20 @@
 				</view>
 			</view>
 		</view>
-		<u-button type="primary" v-if="form.payStatus==1" @click="confirmFn">马上支付</u-button>
-			<u-button type="info" v-if="form.payStatus==3">已支付支付</u-button>
+		<u-button type="primary" v-if="form.payStatus==1" @click="confirmFn">确认并支付</u-button>
+		<u-button type="info" v-if="form.payStatus==3">已支付</u-button>
 	</view>
 </template>
 
 <script>
+	var jweixin = require('@/components/jweixin-module/index.js');
 	export default {
 		data() {
 			return {
-				wx:{
-					id:'',
-					code:'',
-					openid:''
+				wx: {
+					id: '',
+					code: '',
+					openid: ''
 				},
 				form: {
 					partMoney: 0
@@ -69,7 +70,7 @@
 		},
 		onLoad(options) {
 			this.wx.id = options.state;
-			this.wx.code=options.state;
+			this.wx.code = options.code;
 			this.getOpenidByCode();
 			this.getWxConfig();
 		},
@@ -92,7 +93,7 @@
 					});
 					jweixin.ready(function() {
 						console.log('111')
-			
+
 					});
 					jweixin.error(function(res) {
 						console.log(res)
@@ -106,11 +107,11 @@
 					openid: storeOpenid
 				}).then(resp => {
 					let openid = resp.data;
-					this.openid = openid;
+					this.wx.openid = openid;
 					if (openid) {
 						uni.setStorageSync('openid', openid)
 					}
-			
+
 				})
 			},
 			getBusinessById() {
@@ -120,7 +121,7 @@
 					this.form = resp.data;
 				})
 			},
-			confirmFn(){
+			confirmFn() {
 				let p = {
 					businessId: this.wx.id,
 					money: this.form.totalMoney,
@@ -132,7 +133,7 @@
 					let that = this;
 					jweixin.chooseWXPay({
 						timestamp: data
-						.timeStamp, // 支付签名时间戳,注意微信jssdk中的所有使用timestamp字段均为小写。但最新版的支付后台生成签名使用的timeStamp字段名需大写其中的S字符
+							.timeStamp, // 支付签名时间戳,注意微信jssdk中的所有使用timestamp字段均为小写。但最新版的支付后台生成签名使用的timeStamp字段名需大写其中的S字符
 						nonceStr: data.nonceStr, // 支付签名随机串,不长于 32 位
 						package: data.package, // 统一支付接口返回的prepay_id参数值,提交格式如:prepay_id=\*\*\*)
 						signType: data.signType, // 微信支付V3的传入RSA,微信支付V2的传入格式与V2统一下单的签名格式保持一致
@@ -154,10 +155,12 @@
 	page {
 		background-color: #fff;
 	}
-.item-line {
+
+	.item-line {
 		color: #a2a2a2;
 		padding: 5px 0 10px 29px;
 		border-bottom: 1px solid #E5E5E5;
 	}
+
 	@import '@/common/common.scss'
 </style>

+ 2 - 2
app/utils/request.js

@@ -1,6 +1,6 @@
-const server = 'http://127.0.0.1:8099/pro';
+// const server = 'http://127.0.0.1:8099/pro';
 // const server = 'http://47.101.143.145/pro';
- // const server = 'https://dxkaa1.bgigc.com/pro';
+ const server = 'https://dxkaa1.bgigc.com/pro';
 
 import common from '../common/js/common.js';
 

+ 133 - 0
sp-admin/sa-view/car/tb-business-car-add.html

@@ -0,0 +1,133 @@
+<!DOCTYPE html>
+<html>
+	<head>
+		<title>-添加/修改</title>
+		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+		<meta name="viewport"
+			content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
+		<!-- 所有的 css js 资源 -->
+		<link rel="stylesheet" href="../../static/kj/element-ui/theme-chalk/index.css">
+		<link rel="stylesheet" href="../../static/sa.css">
+		<script src="../../static/kj/vue.min.js"></script>
+		<script src="../../static/kj/element-ui/index.js"></script>
+		<script src="../../static/kj/httpVueLoader.js"></script>
+		<script src="../../static/kj/jquery.min.js"></script>
+		<script src="../../static/kj/layer/layer.js"></script>
+		<script src="../../static/sa.js"></script>
+		<style type="text/css">
+			.c-panel .el-form .c-label {
+				width: 7em !important;
+			}
+
+			.c-panel .el-form .el-input,
+			.c-panel .el-form .el-textarea__inner {
+				width: 250px;
+			}
+			.china-car-size .el-input__inner {
+				width: 130px;
+			}
+		</style>
+	</head>
+	<body>
+		<div class="vue-box" :class="{sbot: id}" style="display: none;" :style="'display: block;'">
+			<!-- ------- 内容部分 ------- -->
+			<div class="s-body">
+				<div class="c-panel">
+					<div class="c-title" v-if="id == 0">数据添加</div>
+					<div class="c-title" v-else>数据修改</div>
+					<el-form v-if="m">
+						<sa-item type="text" name="车牌号" v-model="m.carNo" br></sa-item>
+						<div class="c-item">
+							<label class="c-label"><span style="color: red;">*</span>车辆规格:</label>
+							<el-input-number class="china-car-size" v-model="m.carSize" controls-position="right"
+								:min="4.2" :max="50"></el-input-number>
+						</div>
+						<div class="c-item">
+							<label class="c-label">联系人:</label>
+							<el-input v-model="m.driverName" placeholder="联系人" readonly>
+							</el-input>
+						</div>
+						<div class="c-item">
+							<label class="c-label">联系号码:</label>
+							<el-input v-model="m.driverPhone" placeholder="联系人" readonly>
+							</el-input>
+						</div>
+						<sa-item name="" class="s-ok" br>
+							<el-button type="primary" icon="el-icon-plus" @click="ok()">保存</el-button>
+						</sa-item>
+					</el-form>
+				</div>
+			</div>
+			<!-- ------- 底部按钮 ------- -->
+			<div class="s-foot">
+				<el-button type="primary" @click="ok()">确定</el-button>
+				<el-button @click="sa.closeCurrIframe()">取消</el-button>
+			</div>
+		</div>
+		<script>
+			var app = new Vue({
+				components: {
+					"sa-item": httpVueLoader('../../sa-frame/com/sa-item.vue')
+				},
+				el: '.vue-box',
+				data: {
+					id: sa.p('id', 0), // 获取超链接中的id参数(0=添加,非0=修改) 
+					m: {
+						id: '', //  
+						businessId: sa.p('businessId', -1), //  
+						carNo: '', //  
+						carSize: '', //  
+						driverName: '', //  
+						money: '', //  
+						driverPhone: '', //  
+					}, // 实体对象 
+				},
+				methods: {
+					// 提交数据 
+					ok: function() {
+						// 表单校验 
+						let m = this.m;
+						sa.checkNull(m.carNo, '请输入 [车牌号]');
+						sa.checkNull(m.carSize, '请输入 [车辆规格]');
+						let phone = m.driverPhone;
+						if (phone && !sa.isPhone(phone)) {
+							sa.error('联系号码不正确')
+							return;
+						}
+
+						// 开始增加或修改
+						if (this.id <= 0) { // 添加
+							sa.ajax('/TbBusinessCar/add', m, function(res) {
+								sa.alert('增加成功', this.clean);
+							}.bind(this));
+						} else { // 修改
+							sa.ajax('/TbBusinessCar/update', m, function(res) {
+								sa.alert('修改成功', this.clean);
+							}.bind(this));
+						}
+					},
+					// 添加/修改 完成后的动作
+					clean: function() {
+						if (this.id == 0) {
+							this.m = this.createModel();
+						} else {
+							parent.app.f5(); // 刷新父页面列表
+							sa.closeCurrIframe(); // 关闭本页 
+						}
+					}
+				},
+				mounted: function() {
+					// 初始化数据 
+					if (this.id > 0) {
+						sa.ajax('/TbBusinessCar/getById?id=' + this.id, function(res) {
+							this.m = res.data;
+							if (res.data == null) {
+								sa.alert('未能查找到 id=' + this.id + " 详细数据");
+							}
+						}.bind(this))
+					}
+				}
+			})
+		</script>
+	</body>
+</html>

+ 75 - 0
sp-admin/sa-view/car/tb-business-car-info.html

@@ -0,0 +1,75 @@
+<!DOCTYPE html>
+<html>
+	<head>
+		<title>-详情</title>
+		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+		<meta name="viewport"
+			content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
+		<!-- 所有的 css js 资源 -->
+		<link rel="stylesheet" href="../../static/kj/element-ui/theme-chalk/index.css">
+		<link rel="stylesheet" href="../../static/sa.css">
+		<script src="../../static/kj/vue.min.js"></script>
+		<script src="../../static/kj/element-ui/index.js"></script>
+		<script src="../../static/kj/httpVueLoader.js"></script>
+		<script src="../../static/kj/jquery.min.js"></script>
+		<script src="../../static/kj/layer/layer.js"></script>
+		<script src="../../static/sa.js"></script>
+		<style type="text/css">
+			.c-panel .c-label {
+				width: 8em;
+			}
+		</style>
+	</head>
+	<body>
+		<div class="vue-box sbot" style="display: none;" :style="'display: block;'">
+			<!-- ------- 内容部分 ------- -->
+			<div class="s-body">
+				<div class="c-panel">
+					<el-form v-if="m">
+						<el-row>
+							<el-col span=12>
+								<sa-info name="车牌号" br>{{m.carNo}}</sa-info>
+								<sa-info name="入场时间" br>{{m.realInTime}}</sa-info>
+								<sa-info name="离场时间" br>{{m.realOutTime}}</sa-info>
+								<sa-info name="停车费" br>{{m.money}}元</sa-info>
+							</el-col>
+							<el-col span=12>
+								<sa-info name="联系人" br>{{m.driverName}}</sa-info>
+								<sa-info name="联系号码" br>{{m.driverPhone}}</sa-info>
+								<sa-info name="状态" br>
+									<label v-if="m.isLock==1">锁定</label>
+									<label v-else>正常</label>
+								</sa-info>
+							</el-col>
+						</el-row>
+					</el-form>
+				</div>
+			</div>
+			<!-- ------- 底部按钮 ------- -->
+			<div class="s-foot">
+				<el-button type="success" @click="sa.closeCurrIframe()">关闭</el-button>
+			</div>
+		</div>
+		<script>
+			var app = new Vue({
+				components: {
+					"sa-info": httpVueLoader('../../sa-frame/com/sa-info.vue')
+				},
+				el: '.vue-box',
+				data: {
+					id: sa.p('id', 0), // 获取数据ID 
+					m: null
+				},
+				methods: {},
+				mounted: function() {
+					sa.ajax('/TbBusinessCar/getById?id=' + this.id, function(res) {
+						this.m = res.data;
+						if (res.data == null) {
+							sa.alert('未能查找到 id=' + this.id + " 详细数据");
+						}
+					}.bind(this))
+				}
+			})
+		</script>
+	</body>
+</html>

+ 150 - 0
sp-admin/sa-view/car/tb-business-car-list.html

@@ -0,0 +1,150 @@
+<!DOCTYPE html>
+<html>
+	<head>
+		<title>-列表</title>
+		<meta charset="utf-8">
+		<meta name="viewport"
+			content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
+		<!-- 所有的 css & js 资源 -->
+		<link rel="stylesheet" href="../../static/kj/element-ui/theme-chalk/index.css">
+		<link rel="stylesheet" href="../../static/sa.css">
+		<script src="../../static/kj/vue.min.js"></script>
+		<script src="../../static/kj/element-ui/index.js"></script>
+		<script src="../../static/kj/httpVueLoader.js"></script>
+		<script src="../../static/kj/jquery.min.js"></script>
+		<script src="../../static/kj/layer/layer.js"></script>
+		<script src="../../static/sa.js"></script>
+	</head>
+	<body>
+		<div class="vue-box" style="display: none;" :style="'display: block;'">
+			<div class="c-panel">
+				<div class="fast-btn">
+					<el-button size="mini" type="primary"  @click="add()">
+						新增</el-button>
+						<el-button size="mini" type="info" @click="sa.f5()">刷新</el-button>
+				</div>
+				<!-- ------------- 数据列表 ------------- -->
+				<el-table class="data-table" ref="data-table" :data="dataList">
+					<sa-td name="车牌号" prop="carNo" width=120></sa-td>
+					<sa-td name="车辆规格" prop="carSize"></sa-td>
+					<sa-td width="130" name="支付状态" prop="pay" type="enum" :jv="{0: '未支付[#ff0000]', 1: '已支付[#005500]'}">
+					</sa-td>
+					<sa-td width=100 name="车辆状态" prop="isLock" type="switch" :jv="{1: '锁定[#ff0000]', 0: '正常[#005500]'}"
+						@change="s => updateStatus(s.row)"></sa-td>
+					<sa-td name="联系人" prop="driverName"></sa-td>
+					<sa-td name="联系号码" prop="driverPhone"></sa-td>
+					<sa-td name="入场时间" prop="realInTime" width=180></sa-td>
+					<sa-td name="离场时间" prop="realOutTime" width=180></sa-td>
+					<el-table-column label="预交停车费">
+						<template slot-scope="s">
+							<label>{{s.row.basePartMoney}}</label>
+						</template>
+					</el-table-column>
+					<el-table-column label="实际停车费">
+						<template slot-scope="s">
+							<label v-if="s.row.money">{{s.row.money}}</label>
+							<label v-else>未计算</label>
+						</template>
+					</el-table-column>
+				
+					
+					<el-table-column label="操作" fixed="right" width="200px">
+						<template slot-scope="s">
+							<el-button class="c-btn" type="success" icon="el-icon-view" @click="get(s.row)">查看
+							</el-button>
+							<el-button v-if="s.row.pay==0" class="c-btn" type="primary" icon="el-icon-edit" @click="update(s.row)">修改
+							</el-button>
+							<el-button v-if="s.row.pay==0" class="c-btn" type="danger" icon="el-icon-delete" @click="del(s.row)">删除
+							</el-button>
+						</template>
+					</el-table-column>
+				</el-table>
+				<!-- ------------- 分页 ------------- -->
+				<sa-item type="page" :curr.sync="p.pageNo" :size.sync="p.pageSize" :total="dataCount" @change="f5()">
+				</sa-item>
+			</div>
+		</div>
+		<script>
+			var app = new Vue({
+				components: {
+					"sa-item": httpVueLoader('../../sa-frame/com/sa-item.vue'),
+					"sa-td": httpVueLoader('../../sa-frame/com/sa-td.vue'),
+				},
+				el: '.vue-box',
+				data: {
+					p: { // 查询参数  
+						id: '', //  
+						businessId: sa.p('id', ''), //  
+						carNo: '', //  
+						preInTime: '', //  
+						preOutTime: '', //  
+						realInTime: '', //  
+						realOutTime: '', //  
+						money: '', //  
+						driverPhone: '', //  
+						pageNo: 1, // 当前页 
+						pageSize: 10, // 页大小 
+						sortType: 0 // 排序方式 
+					},
+					dataCount: 0,
+					dataList: [], // 数据集合 
+				},
+				methods: {
+					// 刷新
+					f5: function() {
+						sa.ajax('/TbBusinessCar/getList', sa.removeNull(this.p), function(res) {
+							this.dataList = res.data; // 数据
+							this.dataCount = res.dataCount; // 数据总数 
+							sa.f5TableHeight(); // 刷新表格高度 
+						}.bind(this));
+					},
+					// 查看
+					get: function(data) {
+						sa.showIframe('数据详情', 'tb-business-car-info.html?id=' + data.id+'&businessId='+this.p.businessId, '800px', '80%');
+					},
+					// 修改
+					update: function(data) {
+						sa.showIframe('修改数据', 'tb-business-car-add.html?id=' + data.id+'&businessId='+this.p.businessId, '500px', '70%');
+					},
+					// 新增
+					add: function(data) {
+						sa.showIframe('新增数据', 'tb-business-car-add.html?id=-1'+'&businessId='+this.p.businessId, '550px', '80%');
+					},
+					// 删除
+					del: function(data) {
+						sa.confirm('是否删除,此操作不可撤销', function() {
+							sa.ajax('/TbBusinessCar/delete?id=' + data.id, function(res) {
+								sa.arrayDelete(this.dataList, data);
+								sa.ok('删除成功');
+								sa.f5TableHeight(); // 刷新表格高度 
+							}.bind(this))
+						}.bind(this));
+					},
+					// 改 - 状态(0=否,1=是)
+					updateStatus: function(data) {
+						// 声明变量记录是否成功 
+						var isOk = false;
+						var oldValue = data.isLock;
+						var ajax = sa.ajax('/TbBusinessCar/updateStatus', {
+							id: data.id,
+							value: data.isLock
+						}, function(res) {
+							isOk = true;
+							sa.msg('修改成功');
+						}.bind(this));
+						// 如果未能修改成功, 则回滚 
+						$.when(ajax).done(function() {
+							if (isOk == false) {
+								data.isLock = oldValue;
+							}
+						})
+					},
+				},
+				created: function() {
+					this.f5();
+					sa.onInputEnter();
+				}
+			})
+		</script>
+	</body>
+</html>

+ 12 - 16
sp-admin/sa-view/tb-business-car/tb-business-car-list.html

@@ -19,18 +19,16 @@
 		<div class="vue-box" style="display: none;" :style="'display: block;'">
 			<div class="c-panel">
 				<div class="fast-btn">
-					<el-button size="mini" type="primary"  @click="add()">
-						新增</el-button>
-						<el-button size="mini" type="info" @click="sa.f5()">刷新</el-button>
+					<el-button size="mini" type="info" @click="sa.f5()">刷新</el-button>
 				</div>
 				<!-- ------------- 数据列表 ------------- -->
 				<el-table class="data-table" ref="data-table" :data="dataList">
-					<sa-td name="车牌号" prop="carNo"></sa-td>
+					<sa-td name="车牌号" prop="carNo" width=120></sa-td>
 					<sa-td name="车辆规格" prop="carSize"></sa-td>
 					<sa-td width="130" name="支付状态" prop="pay" type="enum" :jv="{0: '未支付[#ff0000]', 1: '已支付[#005500]'}">
 					</sa-td>
-					<sa-td width=100 name="车辆状态" prop="isLock" type="switch" :jv="{1: '锁定[#ff0000]', 0: '正常[#005500]'}"
-						@change="s => updateStatus(s.row)"></sa-td>
+					<sa-td width="130" name="车辆状态" prop="pay" type="enum" :jv="{1: '锁定[#ff0000]', 0: '正常[#005500]'}">
+					</sa-td>
 					<sa-td name="联系人" prop="driverName"></sa-td>
 					<sa-td name="联系号码" prop="driverPhone"></sa-td>
 					<sa-td name="入场时间" prop="realInTime" width=180></sa-td>
@@ -46,16 +44,11 @@
 							<label v-else>未计算</label>
 						</template>
 					</el-table-column>
-				
-					
+
 					<el-table-column label="操作" fixed="right" width="200px">
 						<template slot-scope="s">
 							<el-button class="c-btn" type="success" icon="el-icon-view" @click="get(s.row)">查看
 							</el-button>
-							<el-button v-if="s.row.pay==0" class="c-btn" type="primary" icon="el-icon-edit" @click="update(s.row)">修改
-							</el-button>
-							<el-button v-if="s.row.pay==0" class="c-btn" type="danger" icon="el-icon-delete" @click="del(s.row)">删除
-							</el-button>
 						</template>
 					</el-table-column>
 				</el-table>
@@ -74,7 +67,7 @@
 				data: {
 					p: { // 查询参数  
 						id: '', //  
-						businessId: sa.p('id', '-1'), //  
+						businessId: sa.p('id', ''), //  
 						carNo: '', //  
 						preInTime: '', //  
 						preOutTime: '', //  
@@ -100,15 +93,18 @@
 					},
 					// 查看
 					get: function(data) {
-						sa.showIframe('数据详情', 'tb-business-car-info.html?id=' + data.id+'&businessId='+this.p.businessId, '800px', '80%');
+						sa.showIframe('数据详情', 'tb-business-car-info.html?id=' + data.id + '&businessId=' + this.p
+							.businessId, '800px', '80%');
 					},
 					// 修改
 					update: function(data) {
-						sa.showIframe('修改数据', 'tb-business-car-add.html?id=' + data.id+'&businessId='+this.p.businessId, '500px', '70%');
+						sa.showIframe('修改数据', 'tb-business-car-add.html?id=' + data.id + '&businessId=' + this.p
+							.businessId, '500px', '70%');
 					},
 					// 新增
 					add: function(data) {
-						sa.showIframe('新增数据', 'tb-business-car-add.html?id=-1'+'&businessId='+this.p.businessId, '550px', '80%');
+						sa.showIframe('新增数据', 'tb-business-car-add.html?id=-1' + '&businessId=' + this.p.businessId,
+							'550px', '80%');
 					},
 					// 删除
 					del: function(data) {

+ 2 - 18
sp-admin/sa-view/tb-business/tb-business-list.html

@@ -78,8 +78,6 @@
 					</sa-td>
 					<el-table-column label="操作" width="240px" fixed="right">
 						<template slot-scope="s">
-							<el-button class="c-btn" type="primary" v-if="s.row.realInTime!=null&&s.row.chinaCarInTime!=null
-								&&s.row.complete==0&&currentCustomerId=='1'" @click="completeFn(s.row)">生成账单</el-button>
 							<el-button class="c-btn" type="primary" v-if="(s.row.confirmInput==0)
 								&&s.row.payStatus==1
 								&&s.row.complete==1
@@ -88,22 +86,8 @@
 							<el-button class="c-btn" type="success" v-if="perCode.indexOf('tb-business-pay')!=-1
 								&&s.row.payStatus==1&&s.row.confirmInput==1&&currentCustomerId!='1'" @click="payFn(s.row)">
 								马上支付</el-button>
-							<el-button class="c-btn" type="primary" @click="carFn(s.row)">车辆
+							<el-button class="c-btn" type="primary" @click="carFn(s.row)">车辆管理
 							</el-button>
-							<!-- <el-button class="c-btn" type="primary"
-								v-if="currentCustomerId=='1'&&(s.row.realInTime==null||s.row.chinaCarInTime==null)"
-								@click="inFn(s.row)">确认入场
-							</el-button> -->
-							<!-- <el-button class="c-btn" type="primary" v-if="currentCustomerId=='1'&&s.row.complete==1
-							 &&s.row.payStatus>1
-							 &&s.row.adminConfirmPay==1
-							 &&s.row.adminConfirmOut==0" @click="outFn(s.row)">确认离场
-							</el-button> -->
-							<el-button class="c-btn" type="success" v-if="perCode.indexOf('tb-business-pay')!=-1
-								&&currentCustomerId=='1'
-								&&s.row.payStatus==2
-								&&s.row.outDayTime!=null
-								&&s.row.adminConfirmPay==0" @click="adminSurePayFn(s.row)">确认支付</el-button>
 							<el-button class="c-btn" type="success" @click="get(s.row)">查看</el-button>
 							<el-button class="c-btn" type="primary" v-if="s.row.confirmInput==0" @click="update(s.row)">
 								修改</el-button>
@@ -289,7 +273,7 @@
 				},
 				methods: {
 					carFn(data) {
-						sa.showIframe('车辆管理', '../tb-business-car/tb-business-car-list.html?id=' + data.id, '1050px', '95%');
+						sa.showIframe('车辆管理', '../car/tb-business-car-list.html?id=' + data.id, '1050px', '95%');
 					},
 					blurFn() {
 						console.log(123)

+ 1 - 1
sp-server/app.pid

@@ -1 +1 @@
-32524
+16020

+ 8 - 4
sp-server/src/main/java/com/pj/api/wx/WxService.java

@@ -72,9 +72,7 @@ public class WxService {
         } else {
             for (String id : StrUtil.splitTrim(carIds, ",")) {
                 TbBusinessCar car = tbBusinessCarService.getById(id);
-                String bId = car.getBusinessId();
-                TbBusiness tbBusiness = tbBusinessService.getById(bId);
-                out_trade_no = tbBusiness.getNo();
+                out_trade_no = "c_" + car.getId();
                 break;
             }
         }
@@ -87,6 +85,7 @@ public class WxService {
         params.put("out_trade_no", out_trade_no);
         params.put("attach", JSONUtil.toJsonStr(atchMap));
         String total_free = Integer.parseInt(money) * 100 + "";
+//        String total_free = "1";
         log.info("pay free:{}", total_free);
         params.put("total_fee", total_free);
         // params.put("total_fee", "1");
@@ -163,7 +162,7 @@ public class WxService {
             String businessId = attach.getB();
             if (StrUtil.isNotEmpty(businessId)) {
                 TbBusiness tbBusiness = tbBusinessService.getById(businessId);
-                if (tbBusiness.getPayStatus()==2){
+                if (tbBusiness.getPayStatus() == 2) {
                     return;
                 }
                 tbBusiness.setPayTime(now).setPayType(3)
@@ -186,6 +185,11 @@ public class WxService {
             }
         }
         TbBusiness tbBusiness = tbBusinessService.finByNo(tradeNo);
+        if (tradeNo.contains("c_")) {
+            String busiCarId = tradeNo.replace("c_", "");
+            TbBusinessCar tbBusinessCar = tbBusinessCarService.getById(busiCarId);
+            tbBusiness=tbBusinessService.getById(tbBusinessCar.getBusinessId());
+        }
         if (tbBusiness != null) {
             TbPayRecord payRecord = new TbPayRecord();
             TbCostomer tbCostomer = tbCostomerService.getById(tbBusiness.getCustomerId());