浏览代码

Merge remote-tracking branch 'origin/dev' into dev

lzm 3 年之前
父节点
当前提交
9f5304df4d
共有 53 个文件被更改,包括 1865 次插入632 次删除
  1. 17 2
      app/apis/api.js
  2. 22 1
      app/pages.json
  3. 28 42
      app/pages/business-entering/business-edit.vue
  4. 22 58
      app/pages/business-entering/business-entering.vue
  5. 1 0
      app/pages/business-entering/declare-select.vue
  6. 6 8
      app/pages/business-order/business-order.vue
  7. 55 18
      app/pages/declare/add.vue
  8. 61 29
      app/pages/disinfect/addDisinfect.vue
  9. 33 9
      app/pages/index/index.vue
  10. 87 0
      app/pages/onely-disinfect/Index.vue
  11. 57 0
      app/pages/onely-disinfect/addSuccess.vue
  12. 235 0
      app/pages/onely-disinfect/disinfect-Index.vue
  13. 2 1
      app/pages/wx/pay.vue
  14. 50 3
      app/pages/wx/payOrder.vue
  15. 2 2
      app/utils/request.js
  16. 7 3
      sp-admin/sa-frame/menu-list.js
  17. 129 77
      sp-admin/sa-view/car/tb-business-car-list.html
  18. 41 77
      sp-admin/sa-view/tb-business/tb-business-add.html
  19. 160 64
      sp-admin/sa-view/tb-business/tb-business-edit.html
  20. 1 3
      sp-admin/sa-view/tb-business/tb-business-item-list.html
  21. 28 17
      sp-admin/sa-view/tb-business/tb-business-list.html
  22. 187 0
      sp-admin/sa-view/tb-business/tb-car-disincle-list.html
  23. 1 1
      sp-admin/sa-view/tb-item/tb-item-list.html
  24. 2 2
      sp-admin/sa-view/tb-partner/tb-business-item-list.html
  25. 1 2
      sp-admin/sa-view/tb-partner/tb-partner-info.html
  26. 1 1
      sp-admin/sa-view/tb-partner/tb-partner-list.html
  27. 1 1
      sp-admin/static/sa.js
  28. 42 1
      sp-server/src/main/java/com/pj/api/h5/ApiController.java
  29. 0 8
      sp-server/src/main/java/com/pj/api/jh/api/JhController.java
  30. 15 25
      sp-server/src/main/java/com/pj/api/jh/service/JhService.java
  31. 17 10
      sp-server/src/main/java/com/pj/api/open/service/OpenService.java
  32. 93 3
      sp-server/src/main/java/com/pj/api/service/ApiService.java
  33. 130 0
      sp-server/src/main/java/com/pj/api/wx/MerchantApiUtil.java
  34. 25 6
      sp-server/src/main/java/com/pj/api/wx/service/WxService.java
  35. 1 0
      sp-server/src/main/java/com/pj/current/config/JhConfig.java
  36. 23 0
      sp-server/src/main/java/com/pj/project/tb_business/CarDisincle.java
  37. 16 0
      sp-server/src/main/java/com/pj/project/tb_business/TbBusiness.java
  38. 13 2
      sp-server/src/main/java/com/pj/project/tb_business/TbBusinessController.java
  39. 11 8
      sp-server/src/main/java/com/pj/project/tb_business/TbBusinessMapper.java
  40. 78 62
      sp-server/src/main/java/com/pj/project/tb_business/TbBusinessMapper.xml
  41. 42 17
      sp-server/src/main/java/com/pj/project/tb_business/TbBusinessService.java
  42. 1 1
      sp-server/src/main/java/com/pj/project/tb_business_car/TbBusinessCarMapper.xml
  43. 21 8
      sp-server/src/main/java/com/pj/project/tb_business_car/TbBusinessCarService.java
  44. 5 1
      sp-server/src/main/java/com/pj/project/tb_business_item/TbBusinessItemController.java
  45. 20 0
      sp-server/src/main/java/com/pj/project/tb_costomer/TbCostomer.java
  46. 1 0
      sp-server/src/main/java/com/pj/project/tb_declare/TbDeclare.java
  47. 1 1
      sp-server/src/main/java/com/pj/project/tb_declare/TbDeclareMapper.xml
  48. 1 0
      sp-server/src/main/java/com/pj/project/tb_disinfect/TbDisinfect.java
  49. 61 48
      sp-server/src/main/java/com/pj/project/tb_fee_details/TbFeeDetailsService.java
  50. 1 0
      sp-server/src/main/java/com/pj/project/tb_item_type/TbItemType.java
  51. 1 0
      sp-server/src/main/java/com/pj/project/tb_item_type/TbItemTypeMapper.xml
  52. 8 9
      sp-server/src/main/resources/application-dev.yml
  53. 1 1
      sp-server/src/main/resources/application-pro.yml

+ 17 - 2
app/apis/api.js

@@ -11,8 +11,8 @@ export default {
 	register(data) {
 		return ajax.postForm('/api/register', data)
 	},
-	getItemList() {
-		return ajax.get('/TbItemType/getList')
+	getItemList(data) {
+		return ajax.get('/TbItemType/getList',data)
 	},
 	getCustomerList() {
 		return ajax.get('/TbCostomer/getList', {
@@ -113,6 +113,9 @@ export default {
 	getPrePay(data) {
 		return ajax.get('/wx/pre-pay', data)
 	},
+	// getPrePay(data) {
+	// 	return ajax.get('/jh/init-pay', data)
+	// },
 	getRedirectUrl(data) {
 		return ajax.get('/wx/getRedirectUrl', data)
 	},
@@ -176,6 +179,18 @@ export default {
 	},
 	editCustomerAdmin(data){
 		return ajax.postForm('/admin/editCustomerAdmin',data)
+	},
+	adminConfirm(data){
+		return ajax.postForm('/TbBusiness/confirm',data)
+	},
+	addCarDisinfect(data){
+		return ajax.postForm('/api/addCarDisinfect',data)
+	},
+	editCarDisinfect(data){
+		return ajax.postForm('/api/editCarDisinfect',data)
+	},
+	getCarDisinFect(data){
+		return ajax.get('/TbBusiness/getCarDisincleList',data)	
 	}
 
 }

+ 22 - 1
app/pages.json

@@ -278,9 +278,30 @@
 				"navigationBarTitleText": ""
 			}
 		
+		},
+		{
+			"path": "pages/onely-disinfect/disinfect-Index",
+			"style": {
+				"navigationBarTitleText": ""
+			}
+		
+		},
+		{
+			"path": "pages/onely-disinfect/addSuccess",
+			"style": {
+				"navigationBarTitleText": ""
+			}
+		
+		},
+		
+	{
+			"path": "pages/onely-disinfect/Index",
+			"style": {
+				"navigationBarTitleText": ""
+			}
+	
 		}
 
-
 	],
 	"globalStyle": {
 		"navigationBarTextStyle": "white",

+ 28 - 42
app/pages/business-entering/business-edit.vue

@@ -70,15 +70,19 @@
 			<view class="top">
 				<text class="title">业务录入</text>
 			</view>
-			<view class="item" v-show="customerId=='1'">
-				<view class="l"><text style="color: red;">*</text>企业名称:</view>
+			<view class="item">
+				<view class="l"><text style="color: red;">*</text>申报单号:</view>
 				<view class="r">
-					<picker v-if="customer.customerList.length>0" class="p-picker" id="qy"
-						@change="bindPickerChange($event)" :value="customer.index" :range="customer.customerList"
-						range-key="name">
-						<text class="p-text">{{customer.customerList[customer.index].name}}</text>
-						<u-icon class="p-icon" name="arrow-down-fill" size="20"></u-icon>
-					</picker>
+					<u-input placeholder="申报订单号" v-model="form.declareNo" clearable readonly>
+						<text slot="suffix" style="font-size: 50rpx;" @click="selectDeclare">+</text>
+					</u-input>
+				</view>
+			</view>
+			<view class="item">
+				<view class="l">申报单位:</view>
+				<view class="r">
+					<u-input placeholder="申报单位" disabled  v-model="form.customerName">
+					</u-input>
 				</view>
 			</view>
 			<view class="item">
@@ -159,7 +163,8 @@
 				合计:{{totalPrice}}元
 			</view>
 		</view>
-		<u-button type="primary" text="确定" @click="saveFn" v-if="(!hs.visible&&!china.visible)&&perList.indexOf('tb-business-edit')!==-1"></u-button>
+		<u-button type="primary" text="确定" @click="saveFn"
+			v-if="(!hs.visible&&!china.visible)&&perList.indexOf('tb-business-edit')!==-1"></u-button>
 		<!-- ---------------------------------------------------------- -->
 		<view class="bottom-safety"></view>
 		<u-popup :show="car.carInput" :overlay="false" @close="car.carInput=false" borderRadius="10">
@@ -254,7 +259,6 @@
 					driverName: '',
 					driverPhone: '',
 					expectInDay: ''
-
 				},
 				show: false,
 				item: {
@@ -313,9 +317,6 @@
 		onLoad(options) {
 			this.form.id = options.id;
 			this.getBusinessPeople();
-			if (this.customerId == '1') {
-				this.getCustomerList();
-			}
 			this.getGoodsList();
 			this.getUnit();
 			let that = this;
@@ -325,6 +326,8 @@
 					that.form.cardNo = declare.carNo;
 					that.form.chinaCarNo = declare.chinaCarNo;
 					that.form.netWeight = declare.grossWeight;
+					that.form.customerId=declare.customerId;
+					that.form.customerName=declare.customerName;
 					let chinaCarNo = declare.chinaCarNo;
 					if (chinaCarNo) {
 						let list = [];
@@ -364,7 +367,7 @@
 		},
 		methods: {
 			selectDeclare() {
-				this.$common.to('/pages/business-entering/declare-select?declareNo=' + this.form.declareNo)
+				this.$common.to('/pages/business-entering/declare-select?declareNo=' + this.form.declareNo+'&businessId='+this.form.id)
 			},
 			addCar() {
 				this.china.visible = true;
@@ -437,9 +440,6 @@
 							if (item.itemTypeId == type.id) {
 								type.itemName = item.itemName;
 								let typeName = type.name;
-								if (typeName == '干杂货人工装卸' || typeName == '特殊车辆') {
-									this.checkItem = typeName;
-								}
 								type.num = item.num
 								break;
 							}
@@ -550,7 +550,9 @@
 				})
 			},
 			getItemList() {
-				this.$api.getItemList().then(resp => {
+				this.$api.getItemList({
+					business: 1
+				}).then(resp => {
 					this.itemList = resp.data;
 					this.getBusinessById();
 				})
@@ -591,25 +593,11 @@
 				}, 150)
 
 			},
-			getCustomerList() {
-				this.$api.getCustomerList({
-					type: 0
-				}).then(resp => {
-					this.customer.customerList = resp.data;
-				})
-			},
 
 			selectItemFn(item) {
 				let typeName = item.name;
 				let checkItem = this.checkItem;
-				if ((typeName == '干杂货人工装卸' && checkItem == '特殊车辆') ||
-					(typeName == '特殊车辆' && checkItem == '干杂货人工装卸')) {
-					this.$common.toast('不能同时选择干杂货人工装卸和特殊车辆');
-					return false;
-				}
-				if (typeName == '干杂货人工装卸' || typeName == '特殊车辆') {
-					this.checkItem = typeName;
-				}
+
 				this.item = item;
 				this.show = true;
 
@@ -644,14 +632,13 @@
 					return false;
 				}
 				let filterItemList = this.filterItemList;
-				for (let j in this.needTypeId) {
-					let id = this.needTypeId[j];
-					for (let i in filterItemList) {
-						let type = filterItemList[i];
-						if (id == type.id && !type.itemName) {
-							this.$common.toast('[' + type.name + ']必选')
-							return;
-						}
+				let needIds = this.needTypeId;
+				console.log(needIds);
+				console.log(typeList);
+				for (let i in needIds) {
+					if (typeList.map(obj => obj.id).indexOf(needIds[i]) == -1) {
+						this.$common.toast('缺少必选业务');
+						return false;
 					}
 				}
 				let peopleList = this.hs.list;
@@ -683,7 +670,6 @@
 				this.form.items = null;
 				this.form.cars = null;
 				if (this.customerId == '1') {
-					this.form.customerId = this.customer.customerList[this.customer.index].id;
 				} else {
 					this.form.customerId = this.customerId;
 				}

+ 22 - 58
app/pages/business-entering/business-entering.vue

@@ -68,18 +68,7 @@
 		</view>
 		<view class="box" v-show="!hs.visible&&!china.visible">
 			<view class="top">
-				<text class="title">业务录入</text>
-			</view>
-			<view class="item" v-show="customerId=='1'">
-				<view class="l"><text style="color: red;">*</text>企业名称:</view>
-				<view class="r">
-					<picker v-if="customer.customerList.length>0" class="p-picker" id="qy"
-						@change="bindPickerChange($event)" :value="customer.index" :range="customer.customerList"
-						range-key="name">
-						<text class="p-text">{{customer.customerList[customer.index].name}}</text>
-						<u-icon class="p-icon" name="arrow-down-fill" size="20"></u-icon>
-					</picker>
-				</view>
+				<text class="title">整车录入</text>
 			</view>
 			<view class="item">
 				<view class="l"><text style="color: red;">*</text>申报单号:</view>
@@ -90,6 +79,13 @@
 				</view>
 			</view>
 			<view class="item">
+				<view class="l">申报单位:</view>
+				<view class="r">
+					<u-input placeholder="申报单位" disabled @input="handler()" v-model="form.customerName">
+					</u-input>
+				</view>
+			</view>
+			<view class="item">
 				<view class="l"><text style="color: red;">*</text>货物:</view>
 				<view class="r">
 					<picker v-if="goods.goodsList.length>0" class="p-picker" id="hw" @change="whChange($event)"
@@ -252,7 +248,6 @@
 					driverName: '',
 					driverPhone: '',
 					expectInDay: ''
-
 				},
 				show: false,
 				item: {
@@ -306,7 +301,6 @@
 		onShow() {
 			this.customerId = uni.getStorageSync('customerId');
 			this.perList=uni.getStorageSync('perList')
-			console.log(this.perList)
 		},
 		computed: {
 			totalPrice() {
@@ -327,9 +321,6 @@
 			},
 		},
 		created() {
-			if (this.customerId == '1') {
-				this.getCustomerList();
-			}
 			this.getGoodsList();
 			this.getUnit();
 		},
@@ -341,6 +332,8 @@
 					that.form.cardNo = declare.carNo;
 					that.form.chinaCarNo = declare.chinaCarNo;
 					that.form.netWeight = declare.grossWeight;
+					that.form.customerId=declare.customerId;
+					that.form.customerName=declare.customerName;
 					let chinaCarNo = declare.chinaCarNo;
 					if (chinaCarNo) {
 						let list = [];
@@ -354,7 +347,9 @@
 					}else{
 						that.china.list =[];
 					}
+					that.handler();
 				})
+				console.log(that.form);
 			})
 		},
 		methods: {
@@ -491,7 +486,7 @@
 					let noNeedIds = goods.noNeedIds.split(',');
 					this.needTypeId = goods.needIds.split(',')
 					this.noNeedIds = goods.noNeedIds.split(',')
-					this.$api.getItemList().then(resp => {
+					this.$api.getItemList({business:1}).then(resp => {
 						let list = resp.data;
 						this.itemList = list;
 						this.filterItemList = list.filter(obj => noNeedIds.indexOf(obj.id) == -1);
@@ -539,23 +534,7 @@
 				}, 150)
 
 			},
-			getCustomerList() {
-				this.$api.getCustomerList({type:0}).then(resp => {
-					this.customer.customerList = resp.data;
-				})
-			},
-
 			selectItemFn(item) {
-				let typeName = item.name;
-				let checkItem = this.checkItem;
-				if ((typeName == '干杂货人工装卸' && checkItem == '特殊车辆') ||
-					(typeName == '特殊车辆' && checkItem == '干杂货人工装卸')) {
-					this.$common.toast('不能同时选择干杂货人工装卸和特殊车辆');
-					return false;
-				}
-				if (typeName == '干杂货人工装卸' || typeName == '特殊车辆') {
-					this.checkItem = typeName;
-				}
 				this.item = item;
 				this.show = true;
 			},
@@ -581,12 +560,8 @@
 				this.form.peopleJson = JSON.stringify(this.hs.list);
 				this.form.carJson = JSON.stringify(this.china.list);
 				let customerId = this.customerId;
-				if (customerId == '1') {
-					let customerIndex = this.customer.index;
-					this.form.customerId = this.customer.customerList[customerIndex].id;
-					this.form.customerIndex = customerIndex;
-				}
-				let inputItem = this.filterItemList.filter(obj => obj.itemName).map(o => {
+				let inputItem = this.filterItemList
+				.filter(obj => obj.itemName).map(o => {
 					return {
 						typeId: o.id,
 						itemName: o.itemName,
@@ -623,7 +598,6 @@
 			rebackStore(data) {
 				this.form = data;
 				this.goods.index = data.goodsIndex ? data.goodsIndex : 0;
-				this.customer.index = data.customerIndex ? data.customerIndex : 0;
 				this.hs.list = data.peopleJson ? JSON.parse(data.peopleJson) : [];
 				this.china.list = data.carJson ? JSON.parse(data.carJson) : [];
 				if (data.inputItemJson) {
@@ -665,24 +639,15 @@
 					return false;
 				}
 				let noNeedIds = this.noNeedIds;
-				let chechItem = this.checkItem;
-				let filterItemList = this.filterItemList.filter(obj => noNeedIds.indexOf(obj.id) == -1);
-				for (let j in this.needTypeId) {
-					let id = this.needTypeId[j];
-					for (let i in filterItemList) {
-						let type = filterItemList[i];
-						let typeName = type.name;
-						if (id == type.id && !type.itemName && typeName !== '特殊车辆' && typeName !== '干杂货人工装卸') {
-							this.$common.toast('[' + type.name + ']必选')
-							return;
-						}
-
+				let needIds=this.needTypeId;
+				console.log(needIds);
+				console.log(typeList);
+				for(let i in needIds){
+					if(typeList.map(obj=>obj.id).indexOf(needIds[i])==-1){
+						this.$common.toast('缺少必选业务');
+						return false;
 					}
 				}
-				if (!chechItem && this.form.goodsName == '干杂货') {
-					this.$common.toast('请选择特殊车辆或干杂货人工装卸之一')
-					return;
-				}
 				let peopleList = this.hs.list;
 				if (typeList.filter(obj => obj.name.indexOf('人') !== -1 &&
 						obj.name.indexOf('核酸') !== -1).length > 0 &&
@@ -711,7 +676,6 @@
 				this.form.carJson = JSON.stringify(this.china.list);
 				this.form.items = null;
 				if (this.customerId == '1') {
-					this.form.customerId = this.customer.customerList[this.customer.index].id;
 				} else {
 					this.form.customerId = this.customerId;
 				}

+ 1 - 0
app/pages/business-entering/declare-select.vue

@@ -57,6 +57,7 @@
 					pageSize: 10,
 					dataCount: 0,
 					declareNo: '',
+					
 				},
 				status: 'loadmore',
 				recordItemList: [],

+ 6 - 8
app/pages/business-order/business-order.vue

@@ -43,8 +43,8 @@
 						<text class="p1">支付状态:</text>
 						<text class="p2">
 							<text v-if="businessItem.payStatus==1">未支付</text>
-							<text v-if="businessItem.payStatus==2">已支付(未确认)</text>
-							<text v-if="businessItem.payStatus==3">已支付(已确认)</text>
+							<!-- <text v-if="businessItem.payStatus==2">已支付(未确认)</text> -->
+							<text v-if="businessItem.payStatus==3">已支付</text>
 						</text>
 					</view>
 				</view>
@@ -52,8 +52,8 @@
 					<view class="btn b3" v-if="customemrId=='1'&&perList.indexOf('tb-business-item')!==-1" @click="businessFn(businessItem)">
 						作业订单</view>
 					<view class="btn b3" v-if="businessItem.payStatus==1
-								&&perList.indexOf('tb-business-confirm')!=-1
-								&&customemrId!='1'" @click="sureZdFn(businessItem)">
+								&&perList.indexOf('tb-business-confirm')!=-1"
+								 @click="sureZdFn(businessItem)">
 						账单</view>
 					<view class="btn b3" v-if="customemrId!=='1'" @click="fkFn(businessItem)">
 						证明</view>
@@ -103,10 +103,8 @@
 				perList: []
 			}
 		},
-		created() {
-			this.customemrId = uni.getStorageSync('customerId')
-		},
 		onShow() {
+			this.customemrId = uni.getStorageSync('customerId')
 			this.getBusinessList();
 			this.perList = uni.getStorageSync('perList')
 		},
@@ -159,6 +157,7 @@
 				this.$common.to('/pages/business-order/sureOut?id=' + data.id)
 			},
 			getBusinessList() {
+				this.p.isCar=0;
 				this.$api.getBusinessList(this.p).then(resp => {
 					this.status = 'loadmore';
 					this.p.pageNo = resp.pageNo;
@@ -199,7 +198,6 @@
 			},
 
 			ccconfirm(index) {
-				console.log('出场')
 				this.$refs.ccpopup.close()
 			},
 			zd() {

+ 55 - 18
app/pages/declare/add.vue

@@ -4,6 +4,17 @@
 			<view class="top">
 				<text class="title">申报单录入</text>
 			</view>
+			<view class="item" v-show="customerId=='1'">
+				<view class="l"><text style="color: red;">*</text>申报单位:</view>
+				<view class="r">
+					<picker v-if="customer.customerList.length>0" class="p-picker" id="qy"
+						@change="bindPickerChange($event)" :value="customer.index" :range="customer.customerList"
+						range-key="name">
+						<text class="p-text">{{customer.customerList[customer.index].name}}</text>
+						<u-icon class="p-icon" name="arrow-down-fill" size="20"></u-icon>
+					</picker>
+				</view>
+			</view>
 			<view class="item">
 				<view class="l"><text style="color: red;">*</text>申报人:</view>
 				<view class="r">
@@ -45,8 +56,8 @@
 				<view class="l"><text style="color: red;">*</text>生产日期:</view>
 				<view class="r">
 					<view class="r">
-						<uni-datetime-picker placeholder="请选择" :end="startDate" @input="handler()" :clear-icon="false" type="date"
-							v-model="form.productionDate" />
+						<uni-datetime-picker placeholder="请选择" :end="startDate" @input="handler()" :clear-icon="false"
+							type="date" v-model="form.productionDate" />
 					</view>
 				</view>
 			</view>
@@ -123,7 +134,7 @@
 			<view class="item">
 				<view class="l"><text style="color: red;">*</text>司机电话:</view>
 				<view class="r">
-					<u--textarea  @input="handler()" v-model="form.driverPhone" placeholder="司机电话,多个请用逗号隔开">
+					<u--textarea @input="handler()" v-model="form.driverPhone" placeholder="司机电话,多个请用逗号隔开">
 					</u--textarea>
 				</view>
 			</view>
@@ -173,7 +184,7 @@
 			</view>
 
 		</view>
-		<u-button  type="primary" text="确定" @click="saveFn"></u-button>
+		<u-button type="primary" text="确定" @click="saveFn"></u-button>
 		<u-button type="info" text="重置" @click="cleanFn" style="margin-top: 20rpx;"></u-button>
 		<!-- ---------------------------------------------------------- -->
 		<view class="bottom-safety"></view>
@@ -185,7 +196,12 @@
 	export default {
 		data() {
 			return {
-				startDate:new Date().getTime()-24*60*60*1000,
+				customerId: '1',
+				customer: {
+					index: 0,
+					customerList: [],
+				},
+				startDate: new Date().getTime() - 24 * 60 * 60 * 1000,
 				form: {
 					declarePeople: '',
 					declarePhone: '',
@@ -213,21 +229,28 @@
 					productionCode: '',
 					containerCode: '',
 				},
-				perList:[]
+				perList: []
 			}
 		},
 		onShow() {
-			this.perList=uni.getStorageSync('perList');
+			this.customerId = uni.getStorageSync('customerId');
+			this.perList = uni.getStorageSync('perList');
 		},
 
 		mounted() {
 			this.checkStore();
+			this.getCustomerList();
 		},
 		onBackPress() {
 			this.$common.to('/pages/index/index');
 			return true;
 		},
 		methods: {
+			getCustomerList() {
+				this.$api.getCustomerList({type:0}).then(resp => {
+					this.customer.customerList = resp.data;
+				})
+			},
 			createModal() {
 				return {
 					declarePeople: '',
@@ -235,7 +258,7 @@
 					goodsName: '',
 					grossWeight: '',
 					num: '',
-					productionDate: this.$common.forDate(new Date().getTime()-24*60*60*1000,1),
+					productionDate: this.$common.forDate(new Date().getTime() - 24 * 60 * 60 * 1000, 1),
 					expirationDate: '',
 					productionMode: '',
 					origin: '',
@@ -257,6 +280,11 @@
 					containerCode: ''
 				}
 			},
+			bindPickerChange(e) {
+				var value = e.detail.value; //当前picker选中的值
+				this.customer.index=value;
+				this.handler();
+			},
 			cleanFn() {
 				this.form = this.createModal();
 				this.cleanStore();
@@ -271,7 +299,10 @@
 					count: 0,
 					cache: this.form
 				}
-				uni.setStorageSync('info',{declarePeople:this.form.declarePeople,declarePhone:this.form.declarePhone})
+				uni.setStorageSync('info', {
+					declarePeople: this.form.declarePeople,
+					declarePhone: this.form.declarePhone
+				})
 				uni.setStorageSync('declare', cacheObj);
 			},
 			addStoreCount() {
@@ -281,11 +312,11 @@
 				}
 				uni.setStorageSync('declare', cacheObj);
 			},
-			setInfo(){
-				let info=uni.getStorageSync('info');
-				if(info){
-					this.form.declarePeople=info.declarePeople;
-					this.form.declarePhone=info.declarePhone
+			setInfo() {
+				let info = uni.getStorageSync('info');
+				if (info) {
+					this.form.declarePeople = info.declarePeople;
+					this.form.declarePhone = info.declarePhone
 				}
 			},
 			checkStore() {
@@ -300,8 +331,9 @@
 						success(resp) {
 							if (resp.confirm) {
 								that.form = cache
-								if(!that.form.productionDate){
-									that.form.productionDate=that.$common.forDate(new Date().getTime()-24*60*60*1000,1)
+								if (!that.form.productionDate) {
+									that.form.productionDate = that.$common.forDate(new Date().getTime() - 24 *
+										60 * 60 * 1000, 1)
 								}
 							} else {
 								that.cleanFn();
@@ -393,7 +425,7 @@
 				}
 				let noArray = chinaCarNo.replace(",", ",").split(",");
 				for (let i in noArray) {
-					noArray[i]=noArray[i].toUpperCase();
+					noArray[i] = noArray[i].toUpperCase();
 					if (!this.$common.isCarNo(noArray[i])) {
 						this.$common.toast('运输车头牌不正确');
 						return;
@@ -406,7 +438,7 @@
 				}
 				let suffArray = chinaCarSuff.replace(",", ",").split(",");
 				for (let i in suffArray) {
-					suffArray[i]=suffArray[i].toUpperCase();
+					suffArray[i] = suffArray[i].toUpperCase();
 					if (!this.$common.isCarNo(suffArray[i])) {
 						this.$common.toast('运输车尾牌不正确');
 						return;
@@ -458,6 +490,11 @@
 					this.$common.toast('请填写越南车牌号');
 					return;
 				}
+				if (this.customerId == '1') {
+					this.form.customerId = this.customer.customerList[this.customer.index].id;
+				} else {
+					this.form.customerId = this.customerId;
+				}
 				this.$api.addDeclare(this.$common.removeNull(this.form)).then(resp => {
 					if (resp.code == 200) {
 						this.addStoreCount();

+ 61 - 29
app/pages/disinfect/addDisinfect.vue

@@ -4,6 +4,17 @@
 			<view class="top">
 				<text class="title">消毒申报单录入</text>
 			</view>
+			<view class="item" v-show="customerId=='1'">
+				<view class="l"><text style="color: red;">*</text>申报单位:</view>
+				<view class="r">
+					<picker v-if="customer.customerList.length>0" class="p-picker" id="qy"
+						@change="bindPickerChange($event)" :value="customer.index" :range="customer.customerList"
+						range-key="name">
+						<text class="p-text">{{customer.customerList[customer.index].name}}</text>
+						<u-icon class="p-icon" name="arrow-down-fill" size="20"></u-icon>
+					</picker>
+				</view>
+			</view>
 			<view class="item">
 				<view class="l" style="flex: 7;"><text style="color: red;">*</text>发货人名称:</view>
 				<view class="r">
@@ -129,13 +140,13 @@
 					</u-input>
 				</view>
 			</view>
-			<view class="item">
+			<!-- <view class="item">
 				<view class="l"><text style="color: red;">*</text>申报单位:</view>
 				<view class="r">
 					<u-input placeholder="申报单位" @input="handler()" v-model="form.applyUnit">
 					</u-input>
 				</view>
-			</view>
+			</view> -->
 			<view class="item">
 				<view class="l" style="flex: 7;">其他要求:</view>
 				<view class="r">
@@ -144,7 +155,7 @@
 				</view>
 			</view>
 		</view>
-		<u-button  type="primary" text="确定" @click="saveFn"></u-button>
+		<u-button type="primary" text="确定" @click="saveFn"></u-button>
 		<u-button type="info" text="重置" @click="cleanFn" style="margin-top: 20rpx;"></u-button>
 		<!-- ---------------------------------------------------------- -->
 		<view class="bottom-safety"></view>
@@ -156,6 +167,11 @@
 	export default {
 		data() {
 			return {
+				customerId: '1',
+				customer: {
+					index: 0,
+					customerList: [],
+				},
 				form: {
 					declarePeople: '',
 					declarePhone: '',
@@ -175,15 +191,17 @@
 					chinaCarNo: '',
 					remark: ''
 				},
-				perList:[]
+				perList: []
 			}
 		},
 		onShow() {
-			this.perList=uni.getStorageSync('perList');
+			this.customerId = uni.getStorageSync('customerId');
+			this.perList = uni.getStorageSync('perList');
 		},
 
 		mounted() {
 			this.checkStore();
+			this.getCustomerList();
 		},
 		onBackPress() {
 			this.$common.to('/pages/index/index');
@@ -192,8 +210,8 @@
 		methods: {
 			createModal() {
 				return {
-					sendPeople:'',
-					receivePeople:'',
+					sendPeople: '',
+					receivePeople: '',
 					declarePeople: '',
 					declarePhone: '',
 					goodsName: '',
@@ -213,6 +231,16 @@
 					remark: ''
 				}
 			},
+			getCustomerList() {
+				this.$api.getCustomerList({type:0}).then(resp => {
+					this.customer.customerList = resp.data;
+				})
+			},
+			bindPickerChange(e) {
+				var value = e.detail.value; //当前picker选中的值
+				this.customer.index=value;
+				this.handler();
+			},
 			cleanFn() {
 				this.form = this.createModal();
 				this.cleanStore();
@@ -227,7 +255,10 @@
 					count: 0,
 					cache: this.form
 				}
-				uni.setStorageSync('info',{declarePeople:this.form.declarePeople,declarePhone:this.form.declarePhone})
+				uni.setStorageSync('info', {
+					declarePeople: this.form.declarePeople,
+					declarePhone: this.form.declarePhone
+				})
 				uni.setStorageSync('disinfect', cacheObj);
 			},
 			addStoreCount() {
@@ -237,11 +268,11 @@
 				}
 				uni.setStorageSync('disinfect', cacheObj);
 			},
-			setInfo(){
-				let info=uni.getStorageSync('info');
-				if(info){
-					this.form.declarePeople=info.declarePeople;
-					this.form.declarePhone=info.declarePhone
+			setInfo() {
+				let info = uni.getStorageSync('info');
+				if (info) {
+					this.form.declarePeople = info.declarePeople;
+					this.form.declarePhone = info.declarePhone
 				}
 			},
 			checkStore() {
@@ -249,13 +280,13 @@
 				let disinfectStore = uni.getStorageSync('disinfect');
 				if (disinfectStore && disinfectStore.count == 0) {
 					let that = this;
-					let cache=disinfectStore.cache;
+					let cache = disinfectStore.cache;
 					uni.showModal({
 						title: '提示',
 						content: '检测到您有未完成表单,是否继续?',
 						success(resp) {
 							if (resp.confirm) {
-								that.form =cache 
+								that.form = cache
 							} else {
 								that.cleanFn();
 							}
@@ -263,17 +294,17 @@
 					})
 				}
 				let declareStore = uni.getStorageSync('declare');
-				if(declareStore){
+				if (declareStore) {
 					let that = this;
-					let cache=declareStore.cache;
-					that.form.declarePeople=cache.declarePeople
-					that.form.declarePhone=cache.declarePhone
+					let cache = declareStore.cache;
+					that.form.declarePeople = cache.declarePeople
+					that.form.declarePhone = cache.declarePhone
 					uni.showModal({
 						title: '提示',
 						content: '检测到最近有相似申报信息,是否导入?',
 						success(resp) {
 							if (resp.confirm) {
-								that.form=cache;
+								that.form = cache;
 							} else {
 								that.cleanFn();
 							}
@@ -282,17 +313,22 @@
 				}
 			},
 			saveFn() {
-				if(!this.check()){
+				if (!this.check()) {
 					return;
 				}
+				if (this.customerId == '1') {
+					this.form.customerId = this.customer.customerList[this.customer.index].id;
+				} else {
+					this.form.customerId = this.customerId;
+				}
 				this.$api.addDisinfect(this.$common.removeNull(this.form)).then(resp => {
-					if(resp.code==200){
+					if (resp.code == 200) {
 						this.addStoreCount();
 						this.$common.to('/pages/disinfect/addDisinfectSuccess')
 					}
 				})
 			},
-			check(){
+			check() {
 				if (!this.form.sendPeople) {
 					this.$common.toast('请填写发货人信息');
 					return false;
@@ -329,8 +365,8 @@
 					this.$common.toast('请填写标记');
 					return false;
 				}
-				if (!this.$common.isPhone(this.form.phone)) {
-					this.$common.toast('请填写正确号码');
+				if (!this.form.phone) {
+					this.$common.toast('请填写号码');
 					return false;
 				}
 				if (!this.form.sourceAddress) {
@@ -365,10 +401,6 @@
 					this.$common.toast('请填写正确申请电话');
 					return false;
 				}
-				if (!this.form.applyUnit) {
-					this.$common.toast('请填写申请单位');
-					return false;
-				}
 				return true;
 			}
 		},

+ 33 - 9
app/pages/index/index.vue

@@ -58,7 +58,8 @@
 					text: '企业注册',
 					url: '/pages/enterprise-reg/enterprise-reg',
 					customer:true
-				}],
+				}
+				],
 				code: '',
 				state: '',
 				userType: 1,
@@ -76,7 +77,7 @@
 					icon: '../../static/home-icon-04.png',
 					text: '用户管理',
 					url: '/pages/user/user-index',
-				},
+				}
 				],
 				customerList: [{
 						id: 'tb-costomer-account',
@@ -103,14 +104,14 @@
 						id: 'tb-business',
 						auth: true,
 						icon: '../../static/home-icon-02.png',
-						text: '业务录入',
+						text: '录入整车',
 						url: '/pages/business-entering/business-entering',
 					},
 					{
 						id: 'tb-business',
 						auth: true,
 						icon: '../../static/home-icon-03.png',
-						text: '业务订单',
+						text: '整车业务',
 						url: '/pages/business-order/business-order',
 					},
 					{
@@ -126,21 +127,42 @@
 						icon: '../../static/home-icon-04.png',
 						text: '用户管理',
 						url: '/pages/user/user-index',
-					},
+					}
 				],
 				adminList: [{
 						id: 'tb-business-add',
 						auth: true,
 						icon: '../../static/home-icon-02.png',
-						text: '业务录入',
+						text: '录入整车',
 						url: '/pages/business-entering/business-entering',
 						
 					},
 					{
+						id: 'tb-declare',
+						auth: false,
+						icon: '../../static/home-icon-07.jpg',
+						text: '申报录入',
+						url: '/pages/declare/add',
+					},
+					{
+						id: 'tb-disinfect',
+						auth: false,
+						icon: '../../static/home-icon-06.jpg',
+						text: '消杀申报',
+						url: '/pages/disinfect/addDisinfect',
+					},
+					{
+						auth: false,
+						icon: '../../static/home-icon-06.jpg',
+						text: '车辆消杀',
+						url: '/pages/onely-disinfect/Index',
+						customer:true
+					},
+					{
 						id: 'tb-business-list',
 						auth: true,
 						icon: '../../static/home-icon-03.png',
-						text: '业务订单',
+						text: '整车业务',
 						url: '/pages/business-order/business-order',
 					},
 					{
@@ -280,13 +302,15 @@
 				this.isLogin = false;
 				this.userName = '';
 				this.companyName = ''
-				this.indexItemList = [{
+				this.indexItemList = [
+					{
 					auth: false,
 					icon: '../../static/home-icon-01.png',
 					text: '企业注册',
 					url: '/pages/enterprise-reg/enterprise-reg',
 					customer:true
-				}]
+				}
+				]
 			},
 			navTo(item) {
 				let auth = item.auth;

+ 87 - 0
app/pages/onely-disinfect/Index.vue

@@ -0,0 +1,87 @@
+<template>
+	<view>
+		<view class="box">
+			<view class="top">
+				<text class="title">车辆消杀</text>
+			</view>
+			<view class="add" @click="addFn">+添加</view>
+		</view>
+		<view>
+			<uni-list>
+				<uni-list-item v-for="(item,index) in list" :title="item.carNo"
+				 :note="item.adminConfirmInput==1?'已确认':'未确认'" :rightText="item.createTime" clickable @click="toDetail(item)"/>
+			</uni-list>
+		</view>
+		<noData v-if="list.length==0"></noData>
+		<u-loadmore style="margin: 30rpx;" :status="status" />
+	</view>
+
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+				status: 'loadmore',
+				list: [],
+				p: {
+					pageNo: 1,
+					pageSize: 10,
+					dataCount: 0,
+					adminConfirmInput: -1,
+				}
+			}
+		},
+		onLoad() {
+			this.getCarDisinFect();
+		},
+		methods: {
+			toDetail(data){
+				this.$common.to('/pages/onely-disinfect/disinfect-Index?json='+JSON.stringify(data))
+			},
+			addFn() {
+				this.$common.to('/pages/onely-disinfect/disinfect-Index')
+			},
+			getCarDisinFect() {
+				this.$api.getCarDisinFect(this.p).then(resp => {
+					this.list = resp.data;
+					this.p.dataCount=resp.dataCount;
+					this.p.pageNo=resp.pageNo;
+					this.p.pageSize=resp.pageSize
+				})
+			}
+
+		},
+		//上拉加载更多,分页模拟数据
+		onReachBottom() {
+			if (parseInt(this.p.dataCount) > parseInt(this.p.pageSize) * parseInt(this.p.pageNo)) {
+				this.status = 'loading';
+				this.p.pageSize += 5;
+				this.getCarDisinFect();
+			} else {
+				this.status = 'nomore';
+			}
+		}
+
+	}
+</script>
+
+<style lang="scss">
+	page {
+		background-color: #fff;
+	}
+
+	.add {
+		position: absolute;
+		right: 40rpx;
+		top: -60rpx;
+		z-index: 999;
+		border: 1rpx solid #359aff;
+		border-radius: 8rpx;
+		color: #c8e4ff;
+		padding: 10rpx 20rpx;
+		font-size: 28rpx;
+	}
+
+	@import '@/common/common.scss'
+</style>

+ 57 - 0
app/pages/onely-disinfect/addSuccess.vue

@@ -0,0 +1,57 @@
+<template>
+	<view class="box">
+		<u-icon name="checkmark-circle-fill" color="#07c160" size="200"></u-icon>
+		<text class="text">申报信息提交成功!</text>
+		<view class="count-down-box">
+			<view @click="goback">返回</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+				timestamp: 3,
+			}
+		},
+		onBackPress() {
+			this.goback();
+			return true;
+		},
+		methods: {
+			goback() {
+				this.$common.to('/pages/index/index');
+			}
+		}
+	}
+</script>
+
+<style lang="scss">
+	page {
+		background-color: #fff;
+	}
+
+	.box {
+		display: flex;
+		flex: 1;
+		align-items: center;
+		justify-content: center;
+		flex-direction: column;
+		padding: 100rpx 0;
+
+		.text {
+			color: #191919;
+			font-size: 36rpx;
+			font-weight: bold;
+			margin-top: 40rpx;
+		}
+
+		.count-down-box {
+			display: flex;
+			align-items: center;
+			justify-content: center;
+			margin-top: 30rpx;
+		}
+	}
+</style>

+ 235 - 0
app/pages/onely-disinfect/disinfect-Index.vue

@@ -0,0 +1,235 @@
+<template>
+	<view>
+		<view class="box">
+			<view class="top">
+				<text class="title">车辆消杀</text>
+			</view>
+			<view class="item-line">
+				基本信息
+			</view>
+			<view class="item">
+				<view class="l"><text style="color: red;">*</text>车牌号:</view>
+				<view class="r">
+					<u-input placeholder="请填写车牌号" v-model="form.carNo" />
+				</view>
+			</view>
+			<view class="item">
+				<view class="l"><text style="color: red;">*</text>车辆类型:</view>
+				<view class="r">
+					<picker class="p-picker" id="qy" @change="bindPickerChange($event)" :value="type.index"
+						:range="type.list" range-key="name">
+						<text class="p-text">{{type.list[type.index]}}</text>
+						<u-icon class="p-icon" name="arrow-down-fill" size="20"></u-icon>
+					</picker>
+				</view>
+			</view>
+			<view class="item-line">
+				业务项
+			</view>
+			<view class="item" v-for="item in itemList" :key="item.id">
+				<view class="l" style="flex: 6;">{{item.itemName}}:
+				</view>
+				<view class="r">
+					<view style="margin-left: 20rpx;">
+						{{item.price}}元
+					</view>
+				</view>
+			</view>
+			<view class="item">
+				<view class="l">停车费:
+				</view>
+				<view class="r">
+					<view style="margin-left: 20rpx;">
+						30元
+					</view>
+				</view>
+			</view>
+		</view>
+		<view v-if="!form.adminConfirmInput">
+			<u-button type="primary" v-if="!obj" text="保存" @click="saveFn"></u-button>
+			<!-- <u-button type="primary" v-if="obj" text="修改" @click="saveFn"></u-button> -->
+			<u-button type="primary" v-if="obj" text="确认账单" @click="confirmFn" style="margin-top: 20rpx;"></u-button>
+			<u-button type="info" text="重置" @click="resetFn" style="margin-top: 20rpx;"></u-button>
+		</view>
+		<!-- ---------------------------------------------------------- -->
+		<view class="bottom-safety"></view>
+
+	</view>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+				type: {
+					index: 0,
+					list: ['空车', '载货']
+				},
+				obj: null,
+				form: {
+					carNo: ''
+				},
+				itemList: [],
+				list: []
+			}
+		},
+		onLoad(options) {
+			let data = options.json;
+			if (data) {
+				this.obj = JSON.parse(options.json)
+				console.log(this.form)
+			}
+		},
+		mounted() {
+			this.getTypeList();
+		},
+		onBackPress() {
+			this.$common.to('/pages/onely-disinfect/Index');
+			return true;
+		},
+		methods: {
+			bindPickerChange(e) {
+				let index = e.detail.value;
+				this.type.index = index //当前picker选中的值
+				if (index == 0) {
+					this.itemList = this.list.filter(obj => obj.itemName.indexOf('车头车厢') !== -1)
+				} else {
+					this.itemList = this.list.filter(obj => obj.itemName.indexOf('车头消杀') !== -1)
+				}
+			},
+			getTypeList() {
+				this.$api.getItemList({
+					business: 0
+				}).then(resp => {
+					let list = resp.data;
+					let itemList = [];
+					for (let i in list) {
+						let item = list[i];
+						itemList.push(item.items[0]);
+					}
+					this.list = itemList;
+					this.itemList = itemList.filter(obj => obj.itemName.indexOf('车头车厢') !== -1);
+					if (this.obj) {
+						this.form.carNo = this.obj.carNo;
+						this.form.businessCarId = this.obj.businessCarId;
+						this.form.adminConfirmInput = this.obj.adminConfirmInput;
+						this.form.id = this.obj.id;
+						let index = this.type.list.indexOf(this.obj.goodsName);
+						this.type.index = index
+						if (index == 0) {
+							this.itemList = this.list.filter(obj => obj.itemName.indexOf('车头车厢') !== -1)
+						} else {
+							this.itemList = this.list.filter(obj => obj.itemName.indexOf('车头消杀') !== -1)
+						}
+					}
+				})
+			},
+			resetFn() {
+				this.form.carNo = '';
+				this.type.index = 0;
+				this.itemList = this.list;
+			},
+			saveFn() {
+				if (!this.form.carNo) {
+					this.$common.toast('请输入车牌号')
+					return;
+				}
+				this.form.itemJson = JSON.stringify(this.itemList);
+				this.form.carType = this.type.list[this.type.index]
+				let that = this;
+				let content = this.obj ? '确认修改该业务?' : '确认录入该车辆的消杀业务?'
+				uni.showModal({
+					title: '提示',
+					content: content,
+					success(res) {
+						if (res.confirm) {
+							if (!that.obj) {
+								that.addFn();
+							} else {
+								that.editFn()
+							}
+
+						}
+					}
+				})
+			},
+			addFn() {
+				this.$api.addCarDisinfect(this.$common.removeNull(this.form)).then(resp => {
+					if (resp.code == 200) {
+						this.$common.to('/pages/onely-disinfect/addSuccess')
+					}
+				})
+			},
+			confirmFn() {
+				let that = this;
+				uni.showModal({
+					title: '提示',
+					content: '是否确认该账单?',
+					success(res) {
+						if (res.confirm) {
+							that.$api.adminConfirm({
+								ids: that.form.id
+							}).then(resp => {
+								if (resp.code == 200) {
+									that.$common.toast('已确认');
+									setTimeout(() => {
+										that.$common.to('/pages/onely-disinfect/Index')
+									}, 1500)
+								}
+							})
+						}
+					}
+				})
+			},
+			editFn() {
+				this.$api.editCarDisinfect(this.$common.removeNull(this.form)).then(resp => {
+					if (resp.code == 200) {
+						this.$common.toast('修改成功');
+						setTimeout(() => {
+							this.$common.to('/pages/onely-disinfect/Index')
+						}, 1500)
+					}
+				})
+			}
+		},
+
+	}
+</script>
+
+<style lang="scss">
+	page {
+		background-color: #fff;
+	}
+
+	.hs-item {
+		text-align: center;
+	}
+
+	.item-line {
+		color: #a2a2a2;
+		padding: 5px 0 10px 29px;
+		border-bottom: 1px solid #E5E5E5;
+	}
+
+	.hj {
+		padding: 50rpx;
+		font-size: 40rpx;
+		color: red;
+		font-weight: bold;
+	}
+
+	.save-btn {
+		background-color: #ff4200;
+		height: 88rpx;
+		display: flex;
+		justify-content: center;
+		align-items: center;
+		margin: 60rpx;
+		color: #fff;
+		font-size: 30rpx;
+		font-weight: bold;
+		border-radius: 10rpx;
+	}
+
+	@import '@/common/common.scss'
+</style>

+ 2 - 1
app/pages/wx/pay.vue

@@ -158,7 +158,7 @@
 					url: url
 				}).then(resp => {
 					jweixin.config({
-						//debug: true,
+						// debug: true,
 						appId: resp.data.appId,
 						timestamp: resp.data.timestamp, // 必填,生成签名的时间戳
 						nonceStr: resp.data.noncestr, // 必填,生成签名的随机串
@@ -190,6 +190,7 @@
 				}
 				this.$api.getPrePay(this.$common.removeNull(p)).then(resp => {
 					let data = resp.data;
+					console.log(data);
 					let that = this;
 					jweixin.chooseWXPay({
 						timestamp: data

+ 50 - 3
app/pages/wx/payOrder.vue

@@ -43,9 +43,24 @@
 					{{form.totalMoney}}元
 				</view>
 			</view>
+			<view class="item">
+				<view class="l" style="flex: 7;">状态:</view>
+				<view class="r">
+					<text v-if="form.adminConfirmInput==0">未确认</text>
+					<text v-else>已确认</text>
+				</view>
+			</view>
+		</view>
+		<view v-if="form.adminConfirmInput==0">
+			<u-button type="info" v-if="customerId!=='1'">待确认</u-button>
+			<u-button type="primary" v-if="customerId=='1'
+			&&perList.indexOf('tb-business-confirm')!==-1" @click="adminConfirmFn">确认账单</u-button>
+		</view>
+		<view v-else>
+			<u-button type="primary" v-if="form.payStatus==1&&customerId!=='1'&&form.adminConfirmInput==1"
+				@click="confirmFn">支付账单</u-button>
+			<u-button type="info" v-if="form.payStatus==3">已支付</u-button>
 		</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>
 	</view>
 </template>
 
@@ -54,6 +69,8 @@
 	export default {
 		data() {
 			return {
+				customerId: '',
+				perList: [],
 				wx: {
 					id: '',
 					code: '',
@@ -75,9 +92,34 @@
 			this.getWxConfig();
 		},
 		onShow() {
+			this.perList = uni.getStorageSync('perList')
+			let info = uni.getStorageSync('userInfo');
+			this.customerId = info.customerId;
+
 			this.getBusinessById();
 		},
 		methods: {
+			adminConfirmFn() {
+				let that = this;
+				uni.showModal({
+					title: '提示',
+					content: '是否确认该业务账单?',
+					success(res) {
+						if (res.confirm) {
+							that.$api.adminConfirm({
+								ids: that.form.id
+							}).then(resp => {
+								if (resp.code == 200) {
+									that.$common.toast('已确认');
+									setTimeout(() => {
+										that.$common.to('/pages/business-order/business-order');
+									}, 1500)
+								}
+							})
+						}
+					}
+				})
+			},
 			getWxConfig() {
 				let url = window.location.href;
 				this.$api.getWxConfig({
@@ -124,7 +166,12 @@
 			confirmFn() {
 				let p = {
 					b: this.wx.id,
-					c:JSON.stringify(this.form.cars.map(obj=>{return {id:obj.id,p:obj.basePartMoney}})),
+					c: JSON.stringify(this.form.cars.map(obj => {
+						return {
+							id: obj.id,
+							p: obj.basePartMoney
+						}
+					})),
 					money: this.form.totalMoney,
 					tradeType: "JSAPI",
 					openid: this.wx.openid

+ 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://pco.aseanbusiness.cn/pro';
-//const server = 'https://dxkaa1.bgigc.com/pro';
+const server = 'https://dxkaa1.bgigc.com/pro';
 
 import common from '../common/js/common.js';
 

+ 7 - 3
sp-admin/sa-frame/menu-list.js

@@ -243,13 +243,12 @@ var menuList = [{
 	},
 	{
 		id: 'tb-business',
-		name: '业务录入',
+		name: '业务管理',
 		icon: 'el-icon-edit-outline',
 		parent: true,
 		childList: [{
-				
 				id: 'tb-business-list',
-				name: '业务列表',
+				name: '整车业务',
 				url: 'sa-view/tb-business/tb-business-list.html',
 				childList: [{
 						
@@ -286,6 +285,11 @@ var menuList = [{
 
 				]
 			},
+			{
+				id: 'tb-car-disincle-list',
+				name: '车辆消杀',
+				url: 'sa-view/tb-business/tb-car-disincle-list.html'
+			}
 
 		]
 	},

+ 129 - 77
sp-admin/sa-view/car/tb-business-car-list.html

@@ -19,9 +19,10 @@
 		<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()" v-if="payStatus==1&&sa.isAuth('tb-business-edit')">
+					<el-button size="mini" type="primary" @click="add()"
+						v-if="confirm==0&&sa.isAuth('tb-business-edit')">
 						新增</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">
@@ -31,32 +32,42 @@
 					</sa-td>
 					<sa-td width=100 name="车辆状态" prop="isLock" type="switch" :jv="{1: '锁定[#ff0000]', 0: '正常[#005500]'}"
 						@change="s => updateStatus(s.row)"></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="证明">
+						<template slot-scope="s">
+							<el-button type="primary" @click="checkFn(s.row)">查看</el-button>
+						</template>
+					</el-table-column>
+					<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>
 					<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="操作" width="200px">
 						<template slot-scope="s">
-							<el-button v-if="sa.isAuth('tb-business-car-change')&&s.row.realInTime==null" class="c-btn" type="primary"  @click="inFn(s.row)">确认入场
+							<el-button v-if="sa.isAuth('tb-business-car-change')&&s.row.realInTime==null" class="c-btn"
+								type="primary" @click="inFn(s.row)">确认入场
 							</el-button>
-							<el-button v-if="sa.isAuth('tb-business-car-change')&&s.row.realInTime!=null&&s.row.realOutTime==null" class="c-btn" type="primary"  @click="outFn(s.row)">确认离场
+							<el-button
+								v-if="sa.isAuth('tb-business-car-change')&&s.row.realInTime!=null&&s.row.realOutTime==null"
+								class="c-btn" type="primary" @click="outFn(s.row)">确认离场
 							</el-button>
 							<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&&sa.isAuth('tb-business-edit')" class="c-btn" type="primary" icon="el-icon-edit" @click="update(s.row)">修改
+							<el-button v-if="confirm==0&&sa.isAuth('tb-business-edit')" class="c-btn" type="primary"
+								icon="el-icon-edit" @click="update(s.row)">修改
 							</el-button>
-							<el-button v-if="s.row.pay==0&&sa.isAuth('tb-business-edit')" class="c-btn" type="danger" icon="el-icon-delete" @click="del(s.row)">删除
+							<el-button v-if="confirm==0&&sa.isAuth('tb-business-edit')" class="c-btn" type="danger"
+								icon="el-icon-delete" @click="del(s.row)">删除
 							</el-button>
 						</template>
 					</el-table-column>
@@ -65,48 +76,76 @@
 				<sa-item type="page" :curr.sync="p.pageNo" :size.sync="p.pageSize" :total="dataCount" @change="f5()">
 				</sa-item>
 			</div>
-		<el-dialog title="确认入场" :visible.sync="rc.visible" width="400px">
-			<el-form label-position="left">
-				<div class="confirm-in">
-					<sa-item type="datetime" name="入场时间" v-model="rc.form.realInTime" br></sa-item>
-					<div class="c-item">
-						<label class="c-label"><span style="color: red;">*</span>入场通道:</label>
-						<el-input v-model="rc.form.inChannel" placeholder="入场通道" >
-						</el-input>
+			<el-dialog title="确认入场" :visible.sync="rc.visible" width="400px">
+				<el-form label-position="left">
+					<div class="confirm-in">
+						<sa-item type="datetime" name="入场时间" v-model="rc.form.realInTime" br></sa-item>
+						<div class="c-item">
+							<label class="c-label"><span style="color: red;">*</span>入场通道:</label>
+							<el-input v-model="rc.form.inChannel" placeholder="入场通道">
+							</el-input>
+						</div>
 					</div>
-				</div>
-			</el-form>
-			<span slot="footer" class="dialog-footer">
-				<el-button @click="rc.visible = false">取 消</el-button>
-				<el-button type="primary" @click="sureInFn">确 认</el-button>
-			</span>
-		</el-dialog>
-		<el-dialog title="确认离场" :visible.sync="out.visible" width="400px">
-			<el-form label-position="left">
-				<div class="confirm-in">
-					<sa-item type="datetime" name="离场时间" v-model="out.form.realOutTime" br></sa-item>
-					<div class="c-item">
-						<label class="c-label"><span style="color: red;">*</span>离场通道:</label>
-						<el-input v-model="out.form.outChannel" placeholder="离场通道" >
-						</el-input>
+				</el-form>
+				<span slot="footer" class="dialog-footer">
+					<el-button @click="rc.visible = false">取 消</el-button>
+					<el-button type="primary" @click="sureInFn">确 认</el-button>
+				</span>
+			</el-dialog>
+			<el-dialog title="确认离场" :visible.sync="out.visible" width="400px">
+				<el-form label-position="left">
+					<div class="confirm-in">
+						<sa-item type="datetime" name="离场时间" v-model="out.form.realOutTime" br></sa-item>
+						<div class="c-item">
+							<label class="c-label"><span style="color: red;">*</span>离场通道:</label>
+							<el-input v-model="out.form.outChannel" placeholder="离场通道">
+							</el-input>
+						</div>
 					</div>
+				</el-form>
+				<span slot="footer" class="dialog-footer">
+					<el-button @click="out.visible = false">取 消</el-button>
+					<el-button type="primary" @click="sureOutFn">确 认</el-button>
+				</span>
+			</el-dialog>
+			<el-dialog title="证明" :visible.sync="report.visible" width="500px">
+				<div>
+					<el-form >
+					<el-row>
+						<el-col span="12">
+							<sa-info name="核酸报告" :value="report.business.nucleicReport" type="img"></sa-info>
+						</el-col>
+						<el-col span="12">
+							<sa-info name="出仓证明" :value="report.business.outReport" type="img"></sa-info>
+						</el-col>
+					</el-row>
+					<el-row style="margin-top: 20px;">
+						<el-col span="12">
+							<sa-info name="消杀证明" :value="report.business.disinfectReport" type="img"></sa-info>
+						</el-col>
+						<el-col span="12">
+							<sa-info name="检验检疫证" :value="report.business.checkReport" type="img"></sa-info>
+						</el-col>
+					</el-row>
+					</el-form>
 				</div>
-			</el-form>
-			<span slot="footer" class="dialog-footer">
-				<el-button @click="out.visible = false">取 消</el-button>
-				<el-button type="primary" @click="sureOutFn">确 认</el-button>
-			</span>
-		</el-dialog>
+			</el-dialog>
 		</div>
 		<script>
 			var app = new Vue({
 				components: {
 					"sa-item": httpVueLoader('../../sa-frame/com/sa-item.vue'),
+					"sa-info": httpVueLoader('../../sa-frame/com/sa-info.vue'),
 					"sa-td": httpVueLoader('../../sa-frame/com/sa-td.vue'),
 				},
 				el: '.vue-box',
 				data: {
-					payStatus:sa.p('payStatus',1),
+					report: {
+						visible: false,
+						business: {},
+					},
+					payStatus: sa.p('payStatus', 1),
+					confirm: sa.p('confirm', 0),
 					p: { // 查询参数  
 						id: '', //  
 						businessId: sa.p('id', ''), //  
@@ -123,61 +162,71 @@
 					},
 					dataCount: 0,
 					dataList: [], // 数据集合 
-					rc:{
-						visible:false,
-						form:{
-							realInTime:'',
-							inChannel:''
+					rc: {
+						visible: false,
+						form: {
+							realInTime: '',
+							inChannel: ''
 						}
 					},
-					out:{
-						visible:false,
-						form:{
-							realOutTime:'',
-							outChannel:''
+					out: {
+						visible: false,
+						form: {
+							realOutTime: '',
+							outChannel: ''
 						}
 					}
 				},
 				methods: {
-					inFn(data){
-						Object.assign(this.rc,{
-							visible:true,
-							form:data
+					checkFn(data) {
+						sa.ajax('/TbBusiness/getById?id=' + data.businessId, function(resp) {
+							let business=resp.data;
+							if(!business.outReport){
+								//sa.error('未上传')
+							}
+							this.report.visible=true;
+							this.report.business=business;
+						}.bind(this))
+					},
+					inFn(data) {
+						Object.assign(this.rc, {
+							visible: true,
+							form: data
 						})
 					},
-					sureInFn(){
-						if(!this.rc.form.realInTime){
+					sureInFn() {
+						if (!this.rc.form.realInTime) {
 							sa.error('请填写入场时间')
 							return;
 						}
-						if(!this.rc.form.inChannel){
+						if (!this.rc.form.inChannel) {
 							sa.error('请填写入场通道')
 							return;
 						}
 						sa.ajax('/TbBusinessCar/update', this.rc.form, function(res) {
 							sa.alert('操作成功');
-							this.rc.visible=false;
+							this.rc.visible = false;
 							this.f5();
 						}.bind(this));
 					},
-					outFn(data){
-						Object.assign(this.out,{
-							visible:true,
-							form:data
+					outFn(data) {
+						Object.assign(this.out, {
+							visible: true,
+							form: data
 						})
 					},
-					sureOutFn(){
-						if(!this.out.form.realOutTime){
+					sureOutFn() {
+						if (!this.out.form.realOutTime) {
 							sa.error('请填写离场时间')
 							return;
 						}
-						if(!this.out.form.outChannel){
+						if (!this.out.form.outChannel) {
 							sa.error('请填写离场通道')
 							return;
 						}
 						sa.ajax('/TbBusinessCar/update', this.out.form, function(res) {
 							sa.alert('操作成功');
-							this.out.visible=false;
+							this.out.visible = false;
 							this.f5();
 						}.bind(this));
 					},
@@ -191,15 +240,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) {
@@ -213,7 +265,7 @@
 					},
 					// 改 - 状态(0=否,1=是)
 					updateStatus: function(data) {
-						if(!sa.isAuth('tb-business-car-change')){
+						if (!sa.isAuth('tb-business-car-change')) {
 							sa.error('无权限')
 							return false;
 						}

+ 41 - 77
sp-admin/sa-view/tb-business/tb-business-add.html

@@ -62,14 +62,6 @@
 										<span>基本资料</span>
 									</div>
 									<div>
-										<div class="c-item" v-show="currentCustomerId==1">
-											<label class="c-label"><span style="color: red;">*</span>选择客户:</label>
-											<el-select v-model="m.customerId" placeholder="请选择" filterable>
-												<el-option v-for="item in customerList" :key="item.id"
-													:label="item.name" :value="item.id">
-												</el-option>
-											</el-select>
-										</div>
 										<div class="c-item">
 											<label class="c-label">申报单号:</label>
 											<el-input v-model="m.declareNo" placeholder="选择申报单" readonly>
@@ -79,6 +71,8 @@
 												</div>
 											</el-input>
 										</div>
+										<sa-item name="客户名称" disabled  v-model="m.customerName" br>
+										</sa-item>
 										<div class="c-item">
 											<label class="c-label"><span style="color: red;">*</span>运输货品:</label>
 											<el-select v-model="m.goodsName" placeholder="请选择" @change="goodsChange">
@@ -283,6 +277,8 @@
 						</el-table-column>
 						<el-table-column prop="declarePeople" label="申报人">
 						</el-table-column>
+						<el-table-column prop="customerName" label="申报公司">
+						</el-table-column>
 						<el-table-column prop="declarePhone" label="申报电话">
 						</el-table-column>
 						<el-table-column prop="declareNo" width="180" label="申报单号">
@@ -387,7 +383,8 @@
 							pageSize: 8,
 							dataCount: 0,
 							declarePeople: '',
-							production: ''
+							production: '',
+							businessId:''
 						}
 					}
 				},
@@ -412,19 +409,22 @@
 				},
 				methods: {
 					resetDclare() {
-						this.declare.p = {
-							pageNo: 1,
-							pageSize: 8,
-							declarePeople: '',
-							production: ''
-						}
+						this.declare.p.pageNo=1;
+						this.declare.p.pageSize=8;
+						this.declare.p.production='';
+						this.declare.p.declarePeople='';
 						this.getDeclareList();
 					},
 					handlerDeclare() {
 						this.declare.visible = true;
+						
 						this.getDeclareList();
 					},
 					getDeclareList() {
+						let currentCustomerId=this.currentCustomerId;
+						if(currentCustomerId!='1'){
+							this.declare.p.customerId=this.currentCustomerId;
+						}
 						sa.ajax('/TbDeclare/getNotBindList', sa.removeNull(this.declare.p), function(resp) {
 							let list = resp.data;
 							this.declare.list = list;
@@ -432,7 +432,6 @@
 							this.declare.p.dataCount = resp.dataCount;
 							list.forEach(row => {
 								if (row.declareNo == this.m.declareNo) {
-									console.log(row);
 									this.$nextTick(() => {
 										this.$refs['declareTable'].toggleRowSelection(row, true)
 									})
@@ -453,6 +452,8 @@
 						let declare = selection[0];
 						if (this.m.declareNo !== declare.declareNo) {
 							this.m.declareNo = declare.declareNo;
+							this.m.customerId=declare.customerId;
+							this.m.customerName=declare.customerName;
 							this.m.cardNo = declare.carNo;
 							this.m.chinaCarNo = declare.chinaCarNo;
 							this.m.netWeight = declare.grossWeight;
@@ -500,19 +501,7 @@
 						}
 					},
 					itemChange(itemId) {
-						let items = this.itemTypeList.flatMap(obj => obj.items);
-						let item = items.filter(obj => obj.id == itemId)[0];
-						let typeName = item.typeName;
-						let checkItem = this.checkItem;
-						if ((typeName == '干杂货人工装卸' && checkItem == '特殊车辆') ||
-							(typeName == '特殊车辆' && checkItem == '干杂货人工装卸')) {
-							this.itemTypeList.filter(obj => obj.id == item.typeId)[0].itemId = ''
-							sa.error('不能同时选择干杂货人工装卸和特殊车辆')
-							return false;
-						}
-						if (typeName == '干杂货人工装卸' || typeName == '特殊车辆') {
-							this.checkItem = typeName;
-						}
+
 					},
 					addCar() {
 						this.china.visible = true;
@@ -567,9 +556,9 @@
 						let noNeedIds = goods.noNeedIds.split(',');
 						let list = this.itemTypeList;
 						for (let i in list) {
-							let item=list[i];
-							if(noNeedIds.indexOf(item.id)!==-1){
-								item.itemId=''
+							let item = list[i];
+							if (noNeedIds.indexOf(item.id) !== -1) {
+								item.itemId = ''
 							}
 						}
 						this.needTypeId = goods.needIds.split(',');
@@ -651,7 +640,9 @@
 						}.bind(this))
 					},
 					getItemTypeList() {
-						sa.ajax('/TbItemType/getList', function(resp) {
+						sa.ajax('/TbItemType/getList', {
+							business: 1
+						}, function(resp) {
 							let typeList = resp.data;
 							// 初始化数据
 							if (this.id > 0) {
@@ -683,30 +674,6 @@
 					handleSelectCarSize(item) {
 						this.m.cardSize = item.unit;
 					},
-					getCustomerList() {
-						sa.ajax('/TbCostomer/getList', {
-							pageNo: 1,
-							pageSize: 100,
-							judgeStatus: 2,
-							type: 0
-						}, function(resp) {
-							this.customerList = resp.data;
-							if (resp.data.length > 0) {
-								this.m.customerId = resp.data[0].id;
-							}
-						}.bind(this));
-					},
-					getCustomer() {
-						sa.ajax('/TbCostomer/getCurrentCustomerId', function(resp) {
-							let id = resp.data;
-							if (id == 1) {
-								this.getCustomerList();
-							} else {
-								this.m.customerId = id;
-							}
-							this.currentCustomerId = id;
-						}.bind(this));
-					},
 					closeFn() {
 						parent.app.f5();
 						sa.closeCurrIframe();
@@ -715,9 +682,6 @@
 					ok: function() {
 						// 表单校验
 						let m = this.m;
-						if (this.currentCustomerId == 1) {
-							sa.checkNull(m.customerId, '请选择 [客户名称]');
-						}
 						sa.checkNull(m.goodsName, '请选择运输货物');
 						sa.checkNull(m.cardNo, '请输入 [车牌号]');
 						if (!m.cardSize || !sa.isNum(m.cardSize)) {
@@ -728,24 +692,15 @@
 							sa.error('载重只能输入数字')
 							return;
 						}
-						let checkList = this.itemTypeList;
-						let chechItem = this.checkItem;
-						for (let j in this.needTypeId) {
-							let id = this.needTypeId[j];
-							for (let i in checkList) {
-								let type = checkList[i];
-								let typeName = type.name;
-								if (id == type.id && !type.itemId && typeName !== '特殊车辆' && typeName !== '干杂货人工装卸') {
-									sa.error('选择[' + this.m.goodsName + ']时,[' + typeName + ']必选')
-									return;
-								}
+
+						let typeList = this.itemTypeList.filter(obj => obj.itemId);
+						let needIds = this.needTypeId;
+						for (let i in needIds) {
+							if (typeList.map(obj => obj.id).indexOf(needIds[i]) == -1) {
+								sa.error('缺少必选业务');
+								return false;
 							}
 						}
-						if (!chechItem && this.m.goodsName == '干杂货') {
-							sa.error('请选择特殊车辆或干杂货人工装卸之一')
-							return;
-						}
-						let typeList = this.itemTypeList.filter(obj => obj.itemId);
 						let list = [];
 						if (typeList.length == 0) {
 							sa.error('至少选择一项业务');
@@ -784,7 +739,16 @@
 							parent.app.f5(); // 刷新父页面列表
 							sa.closeCurrIframe(); // 关闭本页 
 						}
-					}
+					},
+					getCustomer() {
+						sa.ajax('/TbCostomer/getCurrentCustomerId', function(resp) {
+							let id = resp.data;
+							if (id == 1) {} else {
+								this.m.customerId = id;
+							}
+							this.currentCustomerId = id;
+						}.bind(this));
+					},
 				},
 				mounted: function() {
 					this.getCustomer();

+ 160 - 64
sp-admin/sa-view/tb-business/tb-business-edit.html

@@ -58,14 +58,17 @@
 										<span>基本资料</span>
 									</div>
 									<div>
-										<div class="c-item" v-show="currentCustomerId==1">
-											<label class="c-label"><span style="color: red;">*</span>选择客户:</label>
-											<el-select v-model="m.customerId" placeholder="请选择" filterable>
-												<el-option v-for="item in customerList" :key="item.id"
-													:label="item.name" :value="item.id">
-												</el-option>
-											</el-select>
+										<div class="c-item">
+											<label class="c-label">申报单号:</label>
+											<el-input v-model="m.declareNo" placeholder="选择申报单" readonly>
+												<div slot="suffix" style="cursor: pointer;color: blue;"
+													@click="handlerDeclare">
+													<i class="el-icon-folder-add"></i>
+												</div>
+											</el-input>
 										</div>
+										<sa-item name="客户名称" disabled v-model="m.customerName" br>
+										</sa-item>
 										<div class="c-item">
 											<label class="c-label"><span style="color: red;">*</span>运输货品:</label>
 											<el-select v-model="m.goodsName" placeholder="请选择" @change="goodsChange">
@@ -76,7 +79,7 @@
 										</div>
 										<sa-item type="num" name="载重(吨)" placeholder="请输入车辆载重" v-model="m.netWeight" br>
 										</sa-item>
-									
+
 										<div class="c-item">
 											<label class="c-label">境外车牌号:</label>
 											<el-input v-model="m.cardNo" readonly disabled placeholder="请输入境外车牌号">
@@ -252,6 +255,50 @@
 					<el-button type="primary" @click="confirmAddCar">确 定</el-button>
 				</span>
 			</el-dialog>
+			<el-dialog title="申报单" :visible.sync="declare.visible" width="90%">
+				<div class="delect-search">
+					申报人:
+					<el-input style="width: 140px;" v-model="declare.p.declarePeople" placeholder="申报人">
+					</el-input>
+					<el-button type="primary" @click="getDeclareList">搜索</el-button>
+					<el-button type="info" @click="resetDclare">重置</el-button>
+				</div>
+				<el-card class="box-card" style="margin-top: 20px;">
+					<div slot="header">
+						<span>列表</span>
+					</div>
+					<el-table :data="declare.list" ref="declareTable">
+						<el-table-column type="selection">
+						</el-table-column>
+						<el-table-column prop="declarePeople" label="申报人">
+						</el-table-column>
+						<el-table-column prop="customerName" label="申报公司">
+						</el-table-column>
+						<el-table-column prop="declarePhone" label="申报电话">
+						</el-table-column>
+						<el-table-column prop="declareNo" width="180" label="申报单号">
+						</el-table-column>
+						<el-table-column prop="goodsName" label="产品学名">
+						</el-table-column>
+						<el-table-column prop="carNo" label="越南车牌">
+						</el-table-column>
+						<el-table-column prop="grossWeight" label="毛重(吨)">
+						</el-table-column>
+						<el-table-column prop="createTime" width="140" label="申报时间">
+						</el-table-column>
+					</el-table>
+					<div class="block">
+						<el-pagination layout="prev, pager, next" @current-change="getDeclareList"
+							:page-size="declare.p.pageSize" :total="declare.p.dataCount"
+							:current-page="declare.p.pageNo">
+						</el-pagination>
+					</div>
+				</el-card>
+				<span slot="footer" class="dialog-footer">
+					<el-button @click="declare.visible = false">取 消</el-button>
+					<el-button type="primary" @click="confirmSelectDeclare">确 定</el-button>
+				</span>
+			</el-dialog>
 		</div>
 		<script>
 			var app = new Vue({
@@ -322,6 +369,18 @@
 							driverPhone: '',
 							carSize: ''
 						}
+					},
+					declare: {
+						visible: false,
+						list: [],
+						p: {
+							pageNo: 1,
+							pageSize: 8,
+							dataCount: 0,
+							declarePeople: '',
+							production: '',
+							declareNo: ''
+						}
 					}
 				},
 				computed: {
@@ -344,27 +403,90 @@
 					}
 				},
 				methods: {
-					findInAndNoBusinessCar(){
-						sa.ajax('/TbBusinessCar/findInAndNoBusinessCar',function(resp){
-							this.carList=resp.data;
+					resetDclare() {
+						this.declare.p.pageNo = 1;
+						this.declare.p.pageSize = 8;
+						this.declare.p.production = '';
+						this.declare.p.declarePeople = '';
+						this.getDeclareList();
+					},
+					handlerDeclare() {
+						this.declare.visible = true;
+						this.declare.p.declareNo = this.m.declareNo;
+						this.getDeclareList();
+					},
+					confirmSelectDeclare() {
+						// 获取选中元素的id列表
+						let selection = this.$refs['declareTable'].selection;
+						let declareNo = sa.getArrayField(selection, 'declareNo');
+						if (selection.length == 0) {
+							return sa.msg('请至少选择一条数据')
+						}
+						if (selection.length > 1) {
+							return sa.msg('只能选择一条数据')
+						}
+						let declare = selection[0];
+						if (this.m.declareNo !== declare.declareNo) {
+							this.m.declareNo = declare.declareNo;
+							this.m.customerId = declare.customerId;
+							this.m.customerName = declare.customerName;
+							this.m.cardNo = declare.carNo;
+							this.m.chinaCarNo = declare.chinaCarNo;
+							this.m.netWeight = declare.grossWeight;
+							let chinaCarNo = declare.chinaCarNo;
+							if (chinaCarNo) {
+								let list = [];
+								chinaCarNo.replace(",", ",").split(",").forEach(carNo => {
+									let obj = {
+										carNo: carNo
+									}
+									list.push(obj);
+									this.china.list = list;
+								})
+							}
+						}
+						this.declare.visible = false;
+					},
+					getDeclareList() {
+						if(currentCustomerId!='1'){
+							this.declare.p.customerId=this.currentCustomerId;
+						}
+						sa.ajax('/TbDeclare/getNotBindList', sa.removeNull(this.declare.p), function(resp) {
+							let list = resp.data;
+							this.declare.list = list;
+							this.declare.p.pageNo = resp.pageNo;
+							this.declare.p.dataCount = resp.dataCount;
+							list.forEach(row => {
+								if (row.declareNo == this.m.declareNo) {
+									this.$nextTick(() => {
+										this.$refs['declareTable'].toggleRowSelection(row, true)
+									})
+								}
+							})
+						}.bind(this))
+					},
+					findInAndNoBusinessCar() {
+						sa.ajax('/TbBusinessCar/findInAndNoBusinessCar', function(resp) {
+							this.carList = resp.data;
 						}.bind(this))
 					},
-					handleSelectCar(data){
-						this.m.cardNo=data.carNo;
-						this.m.cardSize=data.carSize;
+					handleSelectCar(data) {
+						this.m.cardNo = data.carNo;
+						this.m.cardSize = data.carSize;
 					},
-					queryCarAsync(queryStr,cb){
+					queryCarAsync(queryStr, cb) {
 						let list = this.carList;
 						let filterList = list.filter(obj => obj.carNo.indexOf(queryStr) !== -1);
 						cb(filterList)
 					},
-					handleSelectChinaCar(data){
-						this.car.form.carNo=data.carNo;
-						this.car.form.cardSize=data.carSize;
+					handleSelectChinaCar(data) {
+						this.car.form.carNo = data.carNo;
+						this.car.form.cardSize = data.carSize;
 					},
-					queryChinaCarAsync(queryStr,cb){
+					queryChinaCarAsync(queryStr, cb) {
 						let list = this.carList;
-						let filterList = list.filter(obj => obj.carNo.indexOf(queryStr) !== -1&&obj.carNo!==this.m.cardNo);
+						let filterList = list.filter(obj => obj.carNo.indexOf(queryStr) !== -1 && obj.carNo !== this.m
+							.cardNo);
 						cb(filterList)
 					},
 					cleanItem(type) {
@@ -374,21 +496,7 @@
 							this.checkItem = '';
 						}
 					},
-					itemChange(itemId) {
-						let items = this.itemTypeList.flatMap(obj => obj.items);
-						let item = items.filter(obj => obj.id == itemId)[0];
-						let typeName = item.typeName;
-						let checkItem = this.checkItem;
-						if ((typeName == '干杂货人工装卸' && checkItem == '特殊车辆') ||
-							(typeName == '特殊车辆' && checkItem == '干杂货人工装卸')) {
-							this.itemTypeList.filter(obj => obj.id == item.typeId)[0].itemId = ''
-							sa.error('不能同时选择干杂货人工装卸和特殊车辆')
-							return false;
-						}
-						if (typeName == '干杂货人工装卸' || typeName == '特殊车辆') {
-							this.checkItem = typeName;
-						}
-					},
+					itemChange(itemId) {},
 					addCar() {
 						this.china.visible = true;
 					},
@@ -405,7 +513,7 @@
 					},
 					confirmAddCar() {
 						let carNo = this.car.form.carNo;
-						
+
 						if (!sa.isCarNo(carNo)) {
 							sa.error('请填入正确的车牌号')
 							return false;
@@ -442,9 +550,9 @@
 						let noNeedIds = goods.noNeedIds.split(',');
 						let list = this.itemTypeList;
 						for (let i in list) {
-							let item=list[i];
-							if(noNeedIds.indexOf(item.id)!==-1){
-								item.itemId=''
+							let item = list[i];
+							if (noNeedIds.indexOf(item.id) !== -1) {
+								item.itemId = ''
 							}
 						}
 						this.needTypeId = goods.needIds.split(',');
@@ -544,13 +652,15 @@
 						}.bind(this))
 					},
 					getItemTypeList() {
-						sa.ajax('/TbItemType/getList', function(resp) {
+						sa.ajax('/TbItemType/getList', {
+							business: 1
+						}, function(resp) {
 							let typeList = resp.data;
 							// 初始化数据
 							sa.ajax('/TbBusiness/getById?id=' + this.id, function(res) {
 								let m = res.data;
 								let items = m.items;
-								this.china.list = m.cars.filter(obj=>obj.carNo!==m.cardNo);
+								this.china.list = m.cars.filter(obj => obj.carNo !== m.cardNo);
 								let hsItem = items.filter(obj => obj.itemTypeName.indexOf('人') !== -1 &&
 									obj.itemTypeName.indexOf('核酸') !== -1);
 								if (hsItem.length > 0) {
@@ -558,9 +668,6 @@
 								}
 								for (let i in items) {
 									let item = items[i];
-									if (item.itemTypeName == '特殊车辆' || item.itemTypeName == '干杂货人工装卸') {
-										this.checkItem = item.itemTypeName
-									}
 									for (let j in typeList) {
 										let type = typeList[j];
 										if (item.itemTypeId == type.id) {
@@ -584,25 +691,10 @@
 					handleSelectCarSize(item) {
 						this.m.cardSize = item.unit;
 					},
-					getCustomerList() {
-						sa.ajax('/TbCostomer/getList', {
-							pageNo: 1,
-							pageSize: 100,
-							judgeStatus: 2,
-							type:0
-						}, function(resp) {
-							this.customerList = resp.data;
-							if (resp.data.length > 0) {
-								this.m.customerId = resp.data[0].id;
-							}
-						}.bind(this));
-					},
 					getCustomer() {
 						sa.ajax('/TbCostomer/getCurrentCustomerId', function(resp) {
 							let id = resp.data;
-							if (id == 1) {
-								this.getCustomerList();
-							} else {
+							if (id == 1) {} else {
 								this.m.customerId = id;
 							}
 							this.currentCustomerId = id;
@@ -616,12 +708,9 @@
 					ok: function() {
 						// 表单校验
 						let m = this.m;
-						if (this.currentCustomerId == 1) {
-							sa.checkNull(m.customerId, '请选择 [客户名称]');
-						}
 						sa.checkNull(m.goodsName, '请选择运输货物');
 						sa.checkNull(m.cardNo, '请输入 [车牌号]');
-						if (!m.cardSize||!sa.isNum(m.cardSize)) {
+						if (!m.cardSize || !sa.isNum(m.cardSize)) {
 							sa.error('车辆规格只能输入数字')
 							return;
 						}
@@ -647,6 +736,13 @@
 							}
 						}
 						let typeList = this.itemTypeList.filter(obj => obj.itemId);
+						let needIds = this.needTypeId;
+						for (let i in needIds) {
+							if (typeList.map(obj => obj.id).indexOf(needIds[i]) == -1) {
+								sa.error('缺少必选业务');
+								return false;
+							}
+						}
 						let list = [];
 						if (typeList.length == 0) {
 							sa.error('至少选择一项业务');

+ 1 - 3
sp-admin/sa-view/tb-business/tb-business-item-list.html

@@ -45,14 +45,12 @@
 						{{s.row.itemPrice}}{{s.row.unit}}
 					</template>
 				</sa-td>
-				<!-- 	<sa-td name="状态" prop="status" type="enum" :jv="{0: '未完成', 1: '已完成'}"></sa-td>
-					<sa-td name="作业时间" prop="operateTime"></sa-td> -->
 				<sa-td name="创建时间" prop="createTime" width="160"></sa-td>
 				<sa-td name="接单时间" prop="pickTime" width="160"></sa-td>
 				<sa-td name="确认时间" prop="confirmTime" width="160"></sa-td>
 				<!--<el-table-column label="操作" fixed="right" width="200px" v-if="currentCustomerId=='1'">
 					<template slot-scope="s">
-						<el-button v-if="s.row.pickTime&&!s.row.confirmTime" class="c-btn" type="success"
+						<el-button v-if="s.row.pickTime&&!s.row.confirmTime&&sa.isAuth('tb-business-item-confirm')" class="c-btn" type="success"
 								   icon="el-icon-edit" @click="confirmFn(s.row)">确认
 						</el-button>
 					</template>

+ 28 - 17
sp-admin/sa-view/tb-business/tb-business-list.html

@@ -20,7 +20,7 @@
 		.complete-modal .c-label,
 		.confirm-in .c-label,
 		.confirm-info .c-label {
-			width: 200px;
+			width: 140px;
 		}
 	</style>
 	<body>
@@ -59,30 +59,31 @@
 					<sa-td name="业务单号" prop="no" width="160"></sa-td>
 					<sa-td name="境外车牌号" width="130" prop="cardNo"></sa-td>
 					<sa-td name="载重(吨)" prop="netWeight"></sa-td>
+					<sa-td name="确认" prop="adminConfirmInput" type="enum" :jv="{1: '已确认', 0: '未确认'}"></sa-td>
 					<sa-td name="总用费(元)" prop="totalMoney"></sa-td>
-					<sa-td name="已支付用费(元)" prop="payMoney"></sa-td>
+					<sa-td name="已支付(元)" prop="payMoney" width="140"></sa-td>
 					<sa-td width="160" name="录入时间" prop="createTime"></sa-td>
 					</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.confirmInput==0
+							<el-button class="c-btn" type="primary"
+						v-if="s.row.adminConfirmInput==0
 								&&s.row.payStatus==1
-								&&s.row.complete==1
 								&&sa.isAuth('tb-business-confirm')
-								&&currentCustomerId!='1'" @click="confirmFn(s.row)">确认账单</el-button>
+								&&currentCustomerId=='1'" @click="confirmFn(s.row)">确认账单</el-button>
 							<el-button class="c-btn" type="success"
 							v-if="sa.isAuth('tb-business-pay')
 								&&s.row.payStatus==1
-								&&s.row.confirmInput==1
+								&&s.row.adminConfirmInput==1
 								&&currentCustomerId!='1'" @click="payFn(s.row)">
 								马上支付</el-button>
 							<el-button class="c-btn" type="primary" @click="itemFn(s.row)" v-if="currentCustomerId=='1'">业务项</el-button>
 							<el-button v-if="sa.isAuth('tb-business-add')" class="c-btn" type="primary" @click="carFn(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&&sa.isAuth('tb-business-edit')" @click="update(s.row)">
+							<el-button  class="c-btn" type="primary" v-if="s.row.adminConfirmInput==0&&sa.isAuth('tb-business-edit')" @click="update(s.row)">
 								修改</el-button>
-							<el-button class="c-btn" type="danger" v-if="s.row.payStatus==1&&sa.isAuth('tb-business-del')" @click="del(s.row)">删除
+							<el-button class="c-btn" type="danger" v-if="s.row.payStatus==1&&sa.isAuth('tb-business-del')&&s.row.adminConfirmInput==0" @click="del(s.row)">删除
 							</el-button>
 						</template>
 					</el-table-column>
@@ -100,15 +101,24 @@
 					<el-button type="primary" @click="surePayFn">确 定</el-button>
 				</span>
 			</el-dialog>
-			<el-dialog title="确认账单" :visible.sync="confirm.visible" width="400px">
+			<el-dialog title="确认账单" :visible.sync="confirm.visible" width="650px">
 				<div class="confirm-info">
-					<sa-info name="订单号" br>{{confirm.form.no}}</sa-info>
-					<sa-info :name="item.itemTypeName" br v-for="item in confirm.form.items">
-						{{item.itemPrice}}x{{item.num}}={{item.total}}元
-					</sa-info>
-					<sa-info name="业务费用" br>{{confirm.form.itemPrice}}(元)</sa-info>
-					<sa-info name="停车费用" br>{{confirm.form.partMoney+confirm.form.chinaPartMoney}}(元)</sa-info>
-					<sa-info name="合计费用" br>{{confirm.form.totalMoney}}(元)</sa-info>
+					<el-row>
+						<el-col span="12">
+							<sa-info name="订单号" br>{{confirm.form.no}}</sa-info>
+							<sa-info name="客户" br>{{confirm.form.customerName}}</sa-info>
+							<sa-info :name="item.itemTypeName" br v-for="item in confirm.form.items">
+								{{item.itemPrice}}x{{item.num}}={{item.total}}元
+							</sa-info>
+							<sa-info name="业务费用" br>{{confirm.form.itemPrice}}(元)</sa-info>
+						</el-col>
+						<el-col span="12">
+							<sa-info name="中国车停车费" br>{{confirm.form.chinaPartMoney}}(元)</sa-info>
+							<sa-info name="越南车停车费" br>{{confirm.form.partMoney}}(元)</sa-info>
+								<sa-info name="停车费合计" br>{{confirm.form.partMoney+confirm.form.chinaPartMoney}}(元)</sa-info>
+							<sa-info name="合计费用" br>{{confirm.form.totalMoney}}(元)</sa-info>
+						</el-col>
+					</el-row>
 				</div>
 				<span slot="footer" class="dialog-footer">
 					<el-button @click="confirm.visible = false">取 消</el-button>
@@ -204,6 +214,7 @@
 						customerId: '', // 客户id 
 						customerName: '', // 客户名称 
 						no: '', // 编号 
+						isCar:0,
 						cardNo: '', // 车牌号 
 						cardSize: '', // 车规格 
 						netWeight: '', // 载重(kg) 
@@ -263,7 +274,7 @@
 						sa.showIframe('业务项', 'tb-business-item-list.html?businessId=' + data.id, '1050px', '95%');
 					},
 					carFn(data) {
-						sa.showIframe('车辆管理', '../car/tb-business-car-list.html?id=' + data.id+'&payStatus='+data.payStatus, '1050px', '95%');
+						sa.showIframe('车辆管理', '../car/tb-business-car-list.html?id=' + data.id+'&payStatus='+data.payStatus+'&confirm='+data.adminConfirmInput, '1050px', '95%');
 					},
 					blurFn() {
 						console.log(123)

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

@@ -0,0 +1,187 @@
+<!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>
+		<script src="../../static/kj/upload-util.js"></script>
+	</head>
+	<style>
+		.complete-modal .c-label,
+		.confirm-in .c-label,
+		.confirm-info .c-label {
+			width: 140px;
+		}
+	</style>
+	<body>
+		<div class="vue-box" style="display: none;" :style="'display: block;'">
+			<div class="c-panel">
+				<!-- ------------- 检索参数 ------------- -->
+				<div class="c-title">检索参数</div>
+				<el-form ref="form" :model='p' @submit.native.prevent>
+					<sa-item type="text" name="车牌号" placeholder="越南车牌" v-model="p.cardNo"></sa-item>
+					<div class="c-item">
+						<label class="c-label">确认状态:</label>
+						<el-select v-model="p.adminConfirmInput" placeholder="请选择" @change="f5()">
+							<el-option label="全部" :value="-1"></el-option>
+							<el-option label="已确认" :value="1"></el-option>
+							<el-option label="未确认" :value="0"></el-option>
+						</el-select>
+					</div>
+					<el-button type="primary" icon="el-icon-search" @click="p.pageNo = 1; f5()">查询</el-button>
+					<el-button type="info" icon="el-icon-search" @click="p.cardNo = ''; f5()">重置</el-button>
+					<br />
+				</el-form>
+				<!-- ------------- 快捷按钮 ------------- -->
+				<!-- <div class="fast-btn">
+					<el-button  v-if="sa.isAuth('tb-business-add')" size="mini" type="primary" @click="add()">
+						新增</el-button>
+					<el-button size="mini" type="success" @click="getBySelect()">查看</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="no" width="160"></sa-td>
+					<sa-td name="业务类型" prop="goodsName" ></sa-td>
+					<sa-td name="车牌号"  prop="carNo"></sa-td>
+					<sa-td name="确认" prop="adminConfirmInput" type="enum" :jv="{1: '已确认', 0: '未确认'}"></sa-td>
+					<sa-td name="业务用费(元)" prop="itemPrice" width="130"></sa-td>
+					<sa-td name="停车用费(元)" prop="basePartMoney" width="130"></sa-td>
+					<sa-td name="总用费(元)" prop="totalMoney"></sa-td>
+					<sa-td name="已支付(元)" prop="payMoney" width="140"></sa-td>
+					<sa-td name="入场时间" prop="realInTime" width="140"></sa-td>
+					<sa-td name="离场时间" prop="realOutTime" width="140"></sa-td>
+					<sa-td width="160" name="创建时间" prop="createTime"></sa-td>
+					</sa-td>
+					<el-table-column label="操作" width="240px" fixed="right">
+						<template slot-scope="s">
+							<el-button class="c-btn" type="primary" v-if="sa.isAuth('tb-business-confirm')
+								&&currentCustomerId=='1'" @click="confirmFn(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>
+			<el-dialog title="业务确认" :visible.sync="confirm.visible" width="650px">
+				<div class="confirm-info">
+					<el-row>
+						<el-col span="12">
+							<sa-info name="订单号" br>{{confirm.form.no}}</sa-info>
+							<sa-info :name="item.itemName" br v-for="item in confirm.form.items">
+								{{item.itemPrice}}x{{item.num}}={{item.total}}元
+							</sa-info>
+						</el-col>
+						<el-col span="12">
+							<sa-info name="业务费用" br>{{confirm.form.itemPrice}}(元)</sa-info>
+							<sa-info name="停车费" br>{{confirm.form.basePartMoney}}(元)</sa-info>
+							<sa-info name="合计费用" br>{{confirm.form.totalMoney}}(元)</sa-info>
+						</el-col>
+					</el-row>
+				</div>
+				<span slot="footer" class="dialog-footer">
+					<div v-if="confirm.form.adminConfirmInput==0">
+						<el-button @click="confirm.visible = false">取 消</el-button>
+						<el-button type="primary" @click="sureConfirmFn" >确 认</el-button>
+					</div>
+					<div v-else>
+						<el-button @click="confirm.visible = false">关闭</el-button>
+						<el-button type="info">已确认</el-button>
+					</div>
+				</span>
+			</el-dialog>
+		</div>
+		<script>
+			var app = new Vue({
+				components: {
+					"sa-info": httpVueLoader('../../sa-frame/com/sa-info.vue'),
+					"sa-item": httpVueLoader('../../sa-frame/com/sa-item.vue'),
+					"sa-td": httpVueLoader('../../sa-frame/com/sa-td.vue'),
+				},
+				el: '.vue-box',
+				data: {
+					value: '',
+					currentCustomerId: '1',
+					confirm: {
+						visible: false,
+						form: {
+							ids: ''
+						}
+					},
+					p: { // 查询参数  
+						id: '', // 主键 
+						no: '', // 编号 
+						isCar: 1,
+						adminConfirmInput:-1,
+						cardNo: '', // 车牌号 
+						outDayTime: '', // 离境时间 
+						partMoney: '', // 停车费用 
+						partTime: '', // 停车时常(分) 
+						pageNo: 1, // 当前页 
+						pageSize: 10, // 页大小 
+						sortType: 0 // 排序方式 
+					},
+					dataCount: 0,
+					dataList: [], // 数据集合 
+					timmer: null,
+					fresh: {
+						value: 60
+					}
+				},
+				methods: {
+					getPcodeByCurrRid() {
+						sa.ajax('/SpRolePermission/getPcodeByCurrRid', function(resp) {
+							this.perCode = resp.data;
+						}.bind(this))
+					},
+					confirmFn(data) {
+						console.log(data);
+						sa.ajax('/TbBusinessItem/getList', {
+							businessId: data.id
+						}, function(resp) {
+							data.items = resp.data;
+							Object.assign(this.confirm, {
+								visible: true,
+								form: data,
+							})
+							this.confirm.form.ids = data.id;
+						}.bind(this));
+					},
+					sureConfirmFn() {
+						sa.ajax('/TbBusiness/confirm', {
+							ids: this.confirm.form.ids
+						}, function(resp) {
+							this.confirm.visible = false;
+							this.f5();
+						}.bind(this))
+					},
+					// 刷新
+					f5: function() {
+						sa.ajaxNoLoading('/TbBusiness/getCarDisincleList', sa.removeNull(this.p), function(res) {
+							this.dataList = res.data; // 数据
+							this.dataCount = res.dataCount; // 数据总数 
+							sa.f5TableHeight(); // 刷新表格高度 
+						}.bind(this));
+					},
+				},
+				created: function() {
+					sa.onInputEnter();
+				},
+				mounted() {
+					this.f5();
+				},
+			})
+		</script>
+	</body>
+</html>

+ 1 - 1
sp-admin/sa-view/tb-item/tb-item-list.html

@@ -67,7 +67,7 @@
 						id: '', // 主键
 						name: '', // 项目名称 
 						pageNo: 1, // 当前页 
-						pageSize: 10, // 页大小 
+						pageSize: 20, // 页大小 
 						sortType: 0 // 排序方式 
 					},
 					dataCount: 0,

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

@@ -38,8 +38,8 @@
 					<sa-td name="越南车" prop="cardNo"></sa-td>
 					<sa-td name="中国车" prop="chinaCarNo"></sa-td>
 					<sa-td name="作业公司" prop="pickCustomerName"></sa-td>
-					<sa-td name="项目" prop="itemName"></sa-td>
-					<sa-td name="类型" prop="itemTypeName"></sa-td>
+					<sa-td name="项目" prop="itemName" width="120"></sa-td>
+					<sa-td name="类型" prop="itemTypeName" width="120"></sa-td>
 					<sa-td name="计费标准" prop="unit">
 						<template slot-scope="s">
 							{{s.row.itemPrice}}{{s.row.unit}}

+ 1 - 2
sp-admin/sa-view/tb-partner/tb-partner-info.html

@@ -34,8 +34,7 @@
 							</el-col>
 							<el-col span="12">
 								<sa-info name="类型" br>
-									<span v-if="m.type == 1">消杀公司</span>
-									<span v-if="m.type == 2">装卸公司</span>
+									{{m.typeDes}}
 								</sa-info>
 								<sa-info name="创建时间" br>{{m.creareTime}}</sa-info>
 								<sa-info type="img" name="营业执照" :value="m.businessLicence" br></sa-info>

+ 1 - 1
sp-admin/sa-view/tb-partner/tb-partner-list.html

@@ -34,7 +34,7 @@
 				<el-table class="data-table" ref="data-table" :data="dataList">
 					<sa-td type="selection"></sa-td>
 					<sa-td name="名称" prop="name"></sa-td>
-					<sa-td name="类型" prop="type" type="enum" :jv="{1: '消杀公司', 2: '装卸公司'}"></sa-td>
+					<sa-td name="类型" prop="typeDes"></sa-td>
 					<sa-td name="联系人" prop="dutyPeople"></sa-td>
 					<sa-td name="联系电话" prop="phone"></sa-td>
 					<sa-td name="营业执照" prop="businessLicence" type="img"></sa-td>

+ 1 - 1
sp-admin/static/sa.js

@@ -22,7 +22,7 @@ var sa = {
 		api_url: 'https://dxkaa1.bgigc.com/pro',
 		web_url: 'http://www.baidu.com'
 	}
-	sa.cfg = cfg_test; // 最终环境 , 上线前请选择正确的环境
+	sa.cfg = cfg_dev; // 最终环境 , 上线前请选择正确的环境
 })();
 
 

+ 42 - 1
sp-server/src/main/java/com/pj/api/h5/ApiController.java

@@ -7,6 +7,7 @@ import com.pj.api.service.ApiService;
 import com.pj.constants.RoleEnum;
 import com.pj.constants.UserTypeEnum;
 import com.pj.current.satoken.StpUserUtil;
+import com.pj.project.tb_business.CarDisincle;
 import com.pj.project.tb_business.TbBusinessService;
 import com.pj.project.tb_business_car.TbBusinessCar;
 import com.pj.project.tb_business_car.TbBusinessCarService;
@@ -17,6 +18,7 @@ import com.pj.project.tb_declare.TbDeclare;
 import com.pj.project.tb_disinfect.TbDisinfect;
 import com.pj.project.tb_district.TbDistrict;
 import com.pj.project4sp.admin4login.SpAccAdminService;
+import com.pj.project4sp.global.BusinessException;
 import com.pj.utils.sg.AjaxJson;
 import com.pj.utils.sg.NbUtil;
 import com.pj.utils.so.SoMap;
@@ -101,7 +103,9 @@ public class ApiController {
 
     @GetMapping(value = "searchPartCar")
     public AjaxJson searchPartCar(String carNo) {
+
         List<TbBusinessCar> list = apiService.searchPartCar(carNo);
+
         return AjaxJson.getSuccessData(list);
     }
 
@@ -184,7 +188,7 @@ public class ApiController {
         int type = 1;
         if (!StrUtil.equals(customerId, UserTypeEnum.PLATFORM_ADMIN.getCustomerId())) {
             TbCostomer tbCostomer = tbCostomerService.getById(customerId);
-            if (TbCostomer.CustomerEnum.BUSINESS_TYPE.getType() .equals(tbCostomer.getType())) {
+            if (TbCostomer.CustomerEnum.BUSINESS_TYPE.getType().equals(tbCostomer.getType())) {
                 type = 2;
             } else {
                 type = 3;
@@ -192,4 +196,41 @@ public class ApiController {
         }
         return AjaxJson.getSuccessData(type);
     }
+
+    @RequestMapping(value = "addCarDisinfect")
+    public AjaxJson addCarDisinfect() {
+        SoMap so = SoMap.getRequestSoMap();
+        String carNo = so.getString("carNo");
+        if (StrUtil.isEmpty(carNo)){
+            throw new BusinessException("请录入车牌号");
+        }
+        String itemJson = so.getString("itemJson");
+        if (StrUtil.isEmpty(itemJson)){
+            throw new BusinessException("业务类型错误");
+        }
+        String carType = so.getString("carType");
+        if (StrUtil.isEmpty(carType)){
+            throw new BusinessException("请选车业务类型");
+        }
+        apiService.addCarDisinfect(carNo,itemJson,carType);
+        return AjaxJson.getSuccess();
+    }
+    @RequestMapping(value = "editCarDisinfect")
+    public AjaxJson editCarDisinfect(CarDisincle carDisincle) {
+        SoMap so = SoMap.getRequestSoMap();
+        String carNo = carDisincle.getCarNo();
+        if (StrUtil.isEmpty(carNo)){
+            throw new BusinessException("请录入车牌号");
+        }
+        String itemJson = so.getString("itemJson");
+        if (StrUtil.isEmpty(itemJson)){
+            throw new BusinessException("业务类型错误");
+        }
+        String carType = so.getString("carType");
+        if (StrUtil.isEmpty(carType)){
+            throw new BusinessException("请选车业务类型");
+        }
+        apiService.editCarDisinfect(carDisincle,itemJson,carType);
+        return AjaxJson.getSuccess();
+    }
 }

+ 0 - 8
sp-server/src/main/java/com/pj/api/jh/api/JhController.java

@@ -29,14 +29,6 @@ public class JhController {
 
     @Resource
     JhService jhService;
-
-    @RequestMapping(value = "notify")
-    public void notify(HttpServletResponse response) throws Exception{
-        response.setContentType("application/json");
-        response.setCharacterEncoding("UTF-8");
-
-    }
-
     @RequestMapping(value = "init-pay")
     public AjaxJson prePay( HttpServletRequest request) throws Exception {
         return AjaxJson.getSuccessData(jhService.initPay(request));

+ 15 - 25
sp-server/src/main/java/com/pj/api/jh/service/JhService.java

@@ -7,6 +7,7 @@ import cn.hutool.crypto.SecureUtil;
 import cn.hutool.http.HttpUtil;
 import cn.hutool.json.JSONObject;
 import cn.hutool.json.JSONUtil;
+import cn.hutool.log.StaticLog;
 import com.pj.api.jh.MerchantApiUtil;
 import com.pj.api.wx.WxUtils;
 import com.pj.api.wx.bo.Attach;
@@ -45,10 +46,13 @@ public class JhService {
     JhConfig jhConfig;
     @Resource
     WxUtils wxUtils;
+    @Resource
+    WxService wxService;
 
-    public Map<String, String> initPay(HttpServletRequest request) throws Exception {
+    public JSONObject initPay(HttpServletRequest request) throws Exception {
         String money = request.getParameter("money");
-        String openid = request.getParameter("openid");
+//        String openid = request.getParameter("openid");
+        String openid = "oDWvn5w-hVkzUuKeY7OBXBV_l1rU";
         String businessId = request.getParameter("b");
         String c = request.getParameter("c");
         String a = request.getParameter("a");
@@ -63,7 +67,8 @@ public class JhService {
         params.put("merchantNo", jhConfig.getBusinessMerchantNo());
         params.put("tradeType", jhConfig.getTradeType());
         params.put("subTradeType", "");
-        String total_free = NumberUtil.mul(money, 100 + "").intValue() + "";
+//        String total_free = money+"";
+        String total_free = "0.01";
         log.info("order price:{}", total_free);
         params.put("orderPrice", total_free);
         params.put("outTradeNo", out_trade_no);
@@ -74,40 +79,25 @@ public class JhService {
         params.put("returnUrl", "");
         params.put("notifyUrl", myConfig.getDomain() + "/wx/notify");
         params.put("remark", "业务订单支付");
-
         String paySecrit = jhConfig.getPaySecret();
         String sign = MerchantApiUtil.getSign(params, paySecrit);
         params.put("sign", sign);
 
         String jsonParam = JSONUtil.toJsonStr(params);
-        String initPayUrl = "http://116.252.74.15:8081/uaps-web-gateway/cnpPay/initPay";
+        String initPayUrl = jhConfig.getServerUrl() + "/uaps-web-gateway/cnpPay/initPay";
         String result = HttpUtil.createPost(initPayUrl).header("Content-Type", "application/json").body(jsonParam)
                 .execute().body();
+        StaticLog.info("调用聚合支付返回:{}", result);
         JSONObject jsonResult = JSONUtil.parseObj(result);
-        if(StrUtil.equals("0000", jsonResult.get("resultCode").toString())){
+        if (StrUtil.equals("0000", jsonResult.get("resultCode").toString())) {
             JSONObject payMessage = JSONUtil.parseObj(jsonResult.get("payMessage").toString());
-            String packStr = payMessage.get("package").toString();
-            String prePayId = StrUtil.sub(packStr, packStr.indexOf("=")+1, packStr.length());
-            String preId = prePayId == null ? "" : prePayId;
-            return getPayParams(openid, preId);
+            String p = payMessage.getStr("package");
+            Map<String, String> r = wxService.getPayP(payMessage.getStr("timeStamp"), payMessage.getStr("nonceStr"), openid, p);
+            StaticLog.info("re:{}", JSONUtil.toJsonStr(r));
+            return JSONUtil.parseObj(payMessage);
         }
         throw new Exception("支付信息有误");
     }
 
-    public Map<String, String> getPayParams(String openid, String prePayId) {
-        Map<String, String> signMap = new HashMap<>(10);
-        signMap.put("appId", wxConfig.getAppId());
-        signMap.put("timeStamp", System.currentTimeMillis() / 1000 + "");
-        signMap.put("nonceStr", RandomUtil.randomString(32));
-        signMap.put("signType", "MD5");
-        signMap.put("package", "prepay_id=" + prePayId);
-        String sign = wxUtils.sign(signMap, wxConfig.getKey());
-        signMap.put("paySign", sign);
-        signMap.put("openId", openid);
-        return signMap;
-    }
-
-
-
 
 }

+ 17 - 10
sp-server/src/main/java/com/pj/api/open/service/OpenService.java

@@ -16,6 +16,7 @@ import com.pj.project.tb_business_car.TbBusinessCarService;
 import com.pj.project.tb_business_item.TbBusinessItem;
 import com.pj.project.tb_business_item.TbBusinessItemService;
 import com.pj.utils.cache.RedisUtil;
+import com.sun.org.apache.bcel.internal.generic.IF_ACMPEQ;
 import org.springframework.context.annotation.Lazy;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
@@ -56,11 +57,11 @@ public class OpenService {
 
     private void handlerIn(String carNo, String channel) {
         carNo = carNo.toUpperCase();
-        TbBusinessCar tbBusinessCar = tbBusinessCarService.findNotInCar(carNo);
+        TbBusinessCar tbBusinessCar = tbBusinessCarService.findTheLastRecord(carNo);
         Date now = new Date();
-        if (tbBusinessCar == null) {
+        if (tbBusinessCar == null || (tbBusinessCar.getRealInTime() != null && tbBusinessCar.getRealOutTime() != null)) {
             tbBusinessCar = new TbBusinessCar();
-            tbBusinessCar.setCarNo(carNo).setPay(0).setCarSize(3D).setInChannel(channel).setRealInTime(now);
+            tbBusinessCar.setCarNo(carNo).setPay(0).setCarSize(3D).setIsLock(0).setInChannel(channel).setRealInTime(now);
             tbBusinessCarService.save(tbBusinessCar);
             return;
         }
@@ -85,16 +86,19 @@ public class OpenService {
         Date now = new Date();
         String businessId = tbBusinessCar.getBusinessId();
         if (StrUtil.isEmpty(businessId)) {
+            tbBusinessCar.setRealOutTime(now).setOutChannel(channel);
+            tbBusinessCarService.updateById(tbBusinessCar);
             return ResultJson.success();
         }
+        TbBusiness business = tbBusinessService.getById(businessId);
+        List<TbBusinessItem> items = tbBusinessItemService.findByBusinessId(businessId)
+                .stream().filter(tbBusinessItem -> tbBusinessItem.getPayStatus() == 1).collect(Collectors.toList());
+        BigDecimal itemPayPrice = new BigDecimal("0");
+        for (TbBusinessItem tbBusinessItem : items) {
+            itemPayPrice = itemPayPrice.add(tbBusinessItem.getItemPrice());
+        }
+
         if (!CAR_LIST.contains(StrUtil.sub(carNo, 0, 1))) {
-            TbBusiness business = tbBusinessService.getById(businessId);
-            List<TbBusinessItem> items = tbBusinessItemService.findByBusinessId(businessId)
-                    .stream().filter(tbBusinessItem -> tbBusinessItem.getPayStatus() == 1).collect(Collectors.toList());
-            BigDecimal itemPayPrice = new BigDecimal("0");
-            for (TbBusinessItem tbBusinessItem : items) {
-                itemPayPrice = itemPayPrice.add(tbBusinessItem.getItemPrice());
-            }
             if (!business.getItemPrice().equals(itemPayPrice) && business.getCustomerType() != 2) {
                 return ResultJson.error("请缴纳业务费用");
             }
@@ -107,6 +111,9 @@ public class OpenService {
             RedisUtil.set(channel, carNo);
             return ResultJson.error("请缴停车费" + dif + "元");
         }
+        if (TbBusiness.BusinessType.CAR_DISINCLE.getCode().equals(business.getBusinessType()) && !business.getItemPrice().equals(itemPayPrice)) {
+            return ResultJson.error("请缴纳业务费用");
+        }
         tbBusinessCar.setRealOutTime(now).setOutChannel(channel);
         tbBusinessCarService.updateById(tbBusinessCar);
         return ResultJson.success();

+ 93 - 3
sp-server/src/main/java/com/pj/api/service/ApiService.java

@@ -3,17 +3,21 @@ package com.pj.api.service;
 import cn.hutool.core.bean.BeanUtil;
 import cn.hutool.core.date.DateUtil;
 import cn.hutool.core.io.unit.DataUnit;
+import cn.hutool.core.util.NumberUtil;
 import cn.hutool.core.util.RandomUtil;
 import cn.hutool.core.util.StrUtil;
+import cn.hutool.json.JSONUtil;
 import com.pj.api.bo.InOutRecordBO;
 import com.pj.api.wx.bo.MsgDataBO;
 import com.pj.api.wx.service.WxService;
 import com.pj.constants.UserTypeEnum;
 import com.pj.current.config.MyConfig;
+import com.pj.current.config.PartConfig;
 import com.pj.current.config.WxConfig;
 import com.pj.current.satoken.StpUserUtil;
 import com.pj.project.tb_account.TbAccount;
 import com.pj.project.tb_account.TbAccountService;
+import com.pj.project.tb_business.CarDisincle;
 import com.pj.project.tb_business.TbBusiness;
 import com.pj.project.tb_business.TbBusinessService;
 import com.pj.project.tb_business_car.TbBusinessCar;
@@ -30,10 +34,12 @@ import com.pj.project.tb_disinfect.TbDisinfect;
 import com.pj.project.tb_disinfect.TbDisinfectService;
 import com.pj.project.tb_district.TbDistrict;
 import com.pj.project.tb_district.TbDistrictService;
+import com.pj.project.tb_item.TbItem;
 import com.pj.project.tb_pass_record.TbPassRecord;
 import com.pj.project.tb_pass_record.TbPassRecordService;
 import com.pj.project4sp.admin.SpAdmin;
 import com.pj.project4sp.admin.SpAdminService;
+import com.pj.project4sp.global.BusinessException;
 import com.pj.utils.cache.RedisUtil;
 import com.pj.utils.sg.AjaxJson;
 import com.pj.utils.so.SoMap;
@@ -47,6 +53,7 @@ import java.math.BigDecimal;
 import java.time.LocalDateTime;
 import java.time.format.DateTimeFormatter;
 import java.util.*;
+import java.util.stream.Collectors;
 
 /**
  *
@@ -86,6 +93,11 @@ public class ApiService {
     private WxConfig wxConfig;
     @Resource
     private MyConfig myConfig;
+    @Resource
+    private PartConfig partConfig;
+
+    private final List<String> CAR_LIST = StrUtil.splitTrim("浙,粤,京,津,冀,晋,蒙,辽,黑,沪,吉,苏,皖,赣,鲁,豫,鄂,湘,桂,琼,渝,川,贵,云,藏, 陕, 甘, 青, 宁", ",");
+
 
     public List<InOutRecordBO> getInOutRecord(SoMap so) {
         List<TbPassRecord> passRecords = tbPassRecordService.getList(so);
@@ -113,7 +125,16 @@ public class ApiService {
     }
 
     public List<TbBusinessCar> searchPartCar(String carNo) {
-        return tbBusinessCarService.searchPartCar(carNo);
+        List<TbBusinessCar> list = tbBusinessCarService.searchPartCar(carNo);
+        list = list.stream().filter(tbBusinessCar -> {
+            String businessId = tbBusinessCar.getBusinessId();
+            if (StrUtil.isEmpty(businessId)) {
+                return false;
+            }
+            TbBusiness tbBusiness = tbBusinessService.getById(businessId);
+            return tbBusiness.getAdminConfirmInput() == 1;
+        }).collect(Collectors.toList());
+        return list;
     }
 
     public void confirm(List<String> ids) {
@@ -144,10 +165,12 @@ public class ApiService {
     }
 
     public void addDeclare(TbDeclare tbDeclare) {
-        if (StpUserUtil.isLogin()) {
+        if (StpUserUtil.isLogin() && !StrUtil.equals(UserTypeEnum.PLATFORM_ADMIN.getCustomerId(), StpUserUtil.getCustomerId())) {
             String currentCustomerId = StpUserUtil.getCustomerId();
             tbDeclare.setCustomerId(currentCustomerId);
         }
+        TbCostomer tbCostomer = tbCostomerService.getById(tbDeclare.getCustomerId());
+        tbDeclare.setCustomerName(tbCostomer.getName());
         String chinaCarNo = tbDeclare.getChinaCarNo();
         if (StrUtil.isNotEmpty(chinaCarNo)) {
             chinaCarNo = chinaCarNo.toUpperCase();
@@ -165,10 +188,12 @@ public class ApiService {
     }
 
     public void addDisinfect(TbDisinfect tbDisinfect) {
-        if (StpUserUtil.isLogin()) {
+        if (StpUserUtil.isLogin() && !StrUtil.equals(UserTypeEnum.PLATFORM_ADMIN.getCustomerId(), StpUserUtil.getCustomerId())) {
             String currentCustomerId = StpUserUtil.getCustomerId();
             tbDisinfect.setCustomerId(currentCustomerId);
         }
+        TbCostomer tbCostomer = tbCostomerService.getById(tbDisinfect.getCustomerId());
+        tbDisinfect.setCustomerName(tbCostomer.getName()).setApplyUnit(tbCostomer.getName());
         String nowStr = LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyyMMddHHmmss"));
         tbDisinfect.setCode(nowStr + RandomUtil.randomNumbers(6)).setApplyTime(DateUtil.now());
         tbDisinfectService.save(tbDisinfect);
@@ -228,4 +253,69 @@ public class ApiService {
     public List<TbBusinessItem> getPartnerBusinessItem(SoMap startPage) {
         return tbBusinessItemService.getList(startPage);
     }
+
+    public void addCarDisinfect(String carNo, String itemJson, String carType) {
+        carNo = carNo.toUpperCase();
+        TbBusinessCar db = tbBusinessCarService.checkCar(carNo);
+        if (db != null) {
+            throw new BusinessException("该车辆有未完成作业");
+        }
+        db = new TbBusinessCar();
+        db.setCarNo(carNo).setIsLock(0);
+        TbBusiness tbBusiness = new TbBusiness();
+        if (StpUserUtil.isLogin()) {
+            String customerId = StpUserUtil.getCustomerId();
+            db.setCustomerId(customerId);
+            TbCostomer tbCostomer = tbCostomerService.getById(customerId);
+            tbBusiness.setCustomerId(customerId).setCustomerName(tbCostomer.getName());
+        }
+        db.setPay(0).setCarSize(12D);
+        List<TbItem> tbItems = JSONUtil.toList(itemJson, TbItem.class);
+        BigDecimal price = new BigDecimal("0");
+        List<TbBusinessItem> itemList = new ArrayList<>();
+        String no = LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyyMMddHHmm")) + RandomUtil.randomNumbers(4);
+        int index = 1;
+        for (TbItem tbItem : tbItems) {
+            TbBusinessItem item = new TbBusinessItem();
+            item.setNo(no + "0" + index)
+                    .setBusinessType(TbCostomer.CustomerEnum.DISINFECT_TYPE.getType());
+            item.setItemCode(tbItem.getItemCode()).setNum("1")
+                    .setItemName(tbItem.getItemName()).setItemPrice(tbItem.getPrice())
+                    .setItemTypeId(tbItem.getTypeId()).setItemTypeName(tbItem.getTypeName())
+                    .setUnit(tbItem.getUnit()).setTotal(tbItem.getPrice()).setCreateTime(new Date());
+            price = price.add(item.getItemPrice());
+            itemList.add(item);
+            index++;
+        }
+        BigDecimal initCarPartMoney = partConfig.getBasePrice();
+        tbBusiness.setPartMoney(initCarPartMoney)
+                .setNo(no).setGoodsName(carType)
+                .setCreateTime(new Date()).setBusinessType(TbBusiness.BusinessType.CAR_DISINCLE.getCode())
+                .setItemPrice(price)
+                .setTotalMoney(price.add(initCarPartMoney));
+        String prefix = carNo.substring(0, 1);
+        if (CAR_LIST.contains(prefix)) {
+            tbBusiness.setChinaCarNo(carNo);
+        } else {
+            tbBusiness.setCardNo(carNo);
+        }
+        tbBusinessService.save(tbBusiness);
+        db.setBusinessId(tbBusiness.getId());
+        tbBusinessCarService.save(db);
+        itemList.forEach(tbBusinessItem -> tbBusinessItem.setBusinessId(tbBusiness.getId()));
+        tbBusinessItemService.saveBatch(itemList);
+    }
+
+    public void editCarDisinfect(CarDisincle carDisincle, String itemJson, String type) {
+        String carId = carDisincle.getBusinessCarId();
+        TbBusinessCar businessCar = tbBusinessCarService.getById(carId);
+        if (businessCar == null) {
+            throw new BusinessException("数据不存在");
+        }
+        List<TbItem> tbItems = JSONUtil.toList(itemJson, TbItem.class);
+        tbItems.forEach(tbItem -> {
+
+
+        });
+    }
 }

+ 130 - 0
sp-server/src/main/java/com/pj/api/wx/MerchantApiUtil.java

@@ -0,0 +1,130 @@
+package com.pj.api.wx;
+
+import cn.hutool.core.util.StrUtil;
+import cn.hutool.crypto.SecureUtil;
+import cn.hutool.log.StaticLog;
+
+import java.io.UnsupportedEncodingException;
+import java.util.Map;
+import java.util.SortedMap;
+import java.util.TreeMap;
+
+public class MerchantApiUtil {
+
+	/**
+	 * 获取参数签名
+	 * 
+	 * @param paramMap
+	 *            签名参数
+	 * @param paySecret
+	 *            签名密钥
+	 * @return
+	 */
+	public static String getSign(Map<String, Object> paramMap, String paySecret) {
+		SortedMap<String, Object> smap = new TreeMap<String, Object>(paramMap);
+		if (smap.get("sign") != null) {
+			smap.remove("sign");
+		}
+		StringBuilder stringBuffer = new StringBuilder();
+		for (Map.Entry<String, Object> m : smap.entrySet()) {
+			Object value = m.getValue();
+			if (value != null && StrUtil.isNotEmpty(value.toString())) {
+				stringBuffer.append(m.getKey()).append("=").append(value).append("&");
+			}
+		}
+		stringBuffer.delete(stringBuffer.length() - 1, stringBuffer.length());
+		String argPreSign = stringBuffer.append("&paySecret=").append(paySecret).toString();
+		return	SecureUtil.md5(argPreSign).toUpperCase();
+	}
+
+	/**
+	 * 获取参数拼接串
+	 * 
+	 * @param paramMap
+	 * @return
+	 */
+	public static String getParamStr(Map<String, Object> paramMap) {
+		SortedMap<String, Object> smap = new TreeMap<String, Object>(paramMap);
+		StringBuffer stringBuffer = new StringBuffer();
+		for (Map.Entry<String, Object> m : smap.entrySet()) {
+			Object value = m.getValue();
+			if (value != null && StrUtil.isNotEmpty(value.toString())) {
+				stringBuffer.append(m.getKey()).append("=").append(value).append("&");
+			}
+		}
+		stringBuffer.delete(stringBuffer.length() - 1, stringBuffer.length());
+		return stringBuffer.toString();
+	}
+	/**
+	 * 获取参数拼接串
+	 *
+	 * @param paramMap
+	 * @return
+	 */
+	public static String getParamStr2(Map<String, String> paramMap) {
+		SortedMap<String, Object> smap = new TreeMap<String, Object>(paramMap);
+		StringBuffer stringBuffer = new StringBuffer();
+		for (Map.Entry<String, Object> m : smap.entrySet()) {
+			Object value = m.getValue();
+			if (value != null && StrUtil.isNotEmpty(value.toString())) {
+				stringBuffer.append(m.getKey()).append("=").append(value).append("&");
+			}
+		}
+		stringBuffer.delete(stringBuffer.length() - 1, stringBuffer.length());
+
+		return stringBuffer.toString();
+	}
+
+	/**
+	 * 获取参数拼接串
+	 *
+	 * @param paramMap
+	 * @return
+	 */
+	public static String getParamStrUrlEncode(Map<String, Object> paramMap) {
+		SortedMap<String, Object> smap = new TreeMap<String, Object>(paramMap);
+		StringBuffer stringBuffer = new StringBuffer();
+		for (Map.Entry<String, Object> m : smap.entrySet()) {
+			Object value = m.getValue();
+			if (value != null && StrUtil.isNotEmpty(value.toString())) {
+				String key = m.getKey();
+				String keyValue = null;
+				try {
+					keyValue = java.net.URLEncoder.encode(value.toString(), "UTF-8");
+				} catch (UnsupportedEncodingException e) {
+					StaticLog.error("error:{}",e);
+				}
+				stringBuffer.append(key).append("=").append(keyValue).append("&");
+			}
+		}
+		stringBuffer.delete(stringBuffer.length() - 1, stringBuffer.length());
+
+		return stringBuffer.toString();
+	}
+
+	/**
+	 * 验证商户签名
+	 * 
+	 * @param paramMap
+	 *            签名参数
+	 * @param paySecret
+	 *            签名私钥
+	 * @param signStr
+	 *            原始签名密文
+	 * @return
+	 */
+	public static boolean isRightSign(Map<String, Object> paramMap, String paySecret, String signStr) {
+
+		if (StrUtil.isEmpty(signStr)) {
+			return false;
+		}
+
+		String sign = getSign(paramMap, paySecret);
+		if (signStr.equals(sign)) {
+			return true;
+		} else {
+			return false;
+		}
+	}
+
+}

+ 25 - 6
sp-server/src/main/java/com/pj/api/wx/service/WxService.java

@@ -42,6 +42,8 @@ import javax.annotation.Resource;
 import javax.servlet.http.HttpServletRequest;
 import java.math.BigDecimal;
 import java.nio.charset.Charset;
+import java.time.LocalDateTime;
+import java.time.format.DateTimeFormatter;
 import java.util.*;
 
 @Service
@@ -81,6 +83,7 @@ public class WxService {
         String tradeType = request.getParameter("tradeType");
         String money = request.getParameter("money");
         String openid = request.getParameter("openid");
+//        String openid = "oDWvn5w-hVkzUuKeY7OBXBV_l1rU";
         String businessId = request.getParameter("b");
         String c = request.getParameter("c");
         String a = request.getParameter("a");
@@ -98,8 +101,8 @@ public class WxService {
         String total_free = NumberUtil.mul(money, 100 + "").intValue() + "";
 //        String total_free = "1";
         log.info("pay free:{}", total_free);
-//        params.put("total_fee", total_free);
-         params.put("total_fee", "1");
+        params.put("total_fee", total_free);
+//        params.put("total_fee", "1");
         params.put("spbill_create_ip", getIpAddress(request));
         params.put("notify_url", myConfig.getDomain() + "/wx/notify");
         params.put("trade_type", tradeType);
@@ -128,6 +131,8 @@ public class WxService {
         throw new Exception("支付信息有误");
     }
 
+
+
     public Map<String, String> getPayParams(String openid, String prePayId) {
         Map<String, String> signMap = new HashMap<>(10);
         signMap.put("appId", wxConfig.getAppId());
@@ -140,6 +145,18 @@ public class WxService {
         signMap.put("openId", openid);
         return signMap;
     }
+    public Map<String, String> getPayP(String timeStamp,String nonceStr,String openid, String pack) {
+        Map<String, String> signMap = new HashMap<>(10);
+        signMap.put("appId", wxConfig.getAppId());
+        signMap.put("timeStamp", timeStamp);
+        signMap.put("nonceStr", nonceStr);
+        signMap.put("signType", "MD5");
+        signMap.put("package", pack);
+        String sign = wxUtils.sign(signMap, wxConfig.getKey());
+        signMap.put("paySign", sign);
+        signMap.put("openId", openid);
+        return signMap;
+    }
 
     public static String getIpAddress(HttpServletRequest request) {
         String ip = request.getHeader("x-forwarded-for");
@@ -208,8 +225,10 @@ public class WxService {
                 payRecord.setCreateTime(now)
                         .setOutTradeNo(tradeNo)
                         .setTransactionId(transactionId)
-                        .setPayMoney(money)
-                        .setCustomerId(tbCostomer.getId()).setCustomerName(tbCostomer.getName());
+                        .setPayMoney(money);
+                if (tbCostomer!=null){
+                    payRecord.setCustomerId(tbCostomer.getId()).setCustomerName(tbCostomer.getName());
+                }
                 tbPayRecordService.save(payRecord);
             }
             String a = attach.getA();
@@ -268,9 +287,9 @@ public class WxService {
     }
 
     @Async
-    public void sendTemplateMsg(String templateId, String openid, MsgDataBO data,String detailUrl) {
+    public void sendTemplateMsg(String templateId, String openid, MsgDataBO data, String detailUrl) {
         String accessToken = RedisUtil.get(wxConfig.getAccessTokenKey());
-        BaseTemplate baseTemplate = new BaseTemplate(openid, templateId, detailUrl,data);
+        BaseTemplate baseTemplate = new BaseTemplate(openid, templateId, detailUrl, data);
         String json = JSON.toJSONString(baseTemplate);
         String url = wxConfig.getSendMsgUrl().replace("ACCESS_TOKEN", accessToken);
         String resp = HttpUtil.post(url, json);

+ 1 - 0
sp-server/src/main/java/com/pj/current/config/JhConfig.java

@@ -19,5 +19,6 @@ public class JhConfig {
     private String merchantNo;
     private String tradeType;
     private String paySecret;
+    private String serverUrl;
 
 }

+ 23 - 0
sp-server/src/main/java/com/pj/project/tb_business/CarDisincle.java

@@ -0,0 +1,23 @@
+package com.pj.project.tb_business;
+
+import lombok.Data;
+import lombok.experimental.Accessors;
+
+import java.io.Serializable;
+@Data
+@Accessors(chain = true)
+public class CarDisincle implements Serializable {
+    private String id;
+    private String businessCarId;
+    private String no;
+    private String itemPrice;
+    private String carNo;
+    private String goodsName;
+    private Integer adminConfirmInput;
+    private String basePartMoney;
+    private String totalMoney;
+    private String payMoney;
+    private String createTime;
+    private String realInTime;
+    private String realOutTime;
+}

+ 16 - 0
sp-server/src/main/java/com/pj/project/tb_business/TbBusiness.java

@@ -196,6 +196,7 @@ public class TbBusiness extends Model<TbBusiness> implements Serializable {
     private String confirmInputBy;
 
 
+    private Integer adminConfirmInput;
     private Integer adminConfirmPay;
     private Date adminConfirmPayTime;
     private String adminConfirmPayBy;
@@ -217,6 +218,11 @@ public class TbBusiness extends Model<TbBusiness> implements Serializable {
     private String disinfectReport;
     private String checkReport;
     private String outReport;
+    /**
+     * 业务类型(1=车辆消杀,2=录入业务)
+     */
+    private Integer businessType=2;
+
     private transient String itemJson;
     private transient String peopleJson;
     private transient String carJson;
@@ -228,6 +234,16 @@ public class TbBusiness extends Model<TbBusiness> implements Serializable {
 
     @Getter
     @AllArgsConstructor
+    public static enum BusinessType{
+        CAR_DISINCLE(1,"车辆消杀"),
+        HOLD_CAR(2,"整车业务"),
+        ;
+        private Integer code;
+        private String desc;
+    }
+
+    @Getter
+    @AllArgsConstructor
    public static enum PayStatus{
         NO_PAY(1,"未支付"),
         HAS_PAY(2,"已支付"),

+ 13 - 2
sp-server/src/main/java/com/pj/project/tb_business/TbBusinessController.java

@@ -163,7 +163,6 @@ public class TbBusinessController {
      */
     @RequestMapping("getList")
     public AjaxJson getList() {
-        System.out.println(StrUtil.subBefore("c_2222_fhjk","_",true));
         SoMap so = SoMap.getRequestSoMap();
         String currentCustomerId = StpUserUtil.getCustomerId();
         if (!currentCustomerId.equals(UserTypeEnum.PLATFORM_ADMIN.getCustomerId())) {
@@ -172,7 +171,19 @@ public class TbBusinessController {
         List<TbBusiness> list = tbBusinessService.getList(so.startPage());
         return AjaxJson.getPageData(so.getDataCount(), list);
     }
-
+    /**
+     * 查集合 - 根据条件(参数为空时代表忽略指定条件)
+     */
+    @RequestMapping("getCarDisincleList")
+    public AjaxJson getCarDisincleList() {
+        SoMap so = SoMap.getRequestSoMap();
+        String currentCustomerId = StpUserUtil.getCustomerId();
+        if (!currentCustomerId.equals(UserTypeEnum.PLATFORM_ADMIN.getCustomerId())) {
+            so.put("customerId", currentCustomerId);
+        }
+        List<CarDisincle> list = tbBusinessService.getCarDisincleList(so.startPage());
+        return AjaxJson.getPageData(so.getDataCount(), list);
+    }
     /**
      * 改
      */

+ 11 - 8
sp-server/src/main/java/com/pj/project/tb_business/TbBusinessMapper.java

@@ -10,19 +10,22 @@ import org.springframework.stereotype.Repository;
 
 /**
  * Mapper: tb_business -- 入境登记
- * @author qzy 
+ *
+ * @author qzy
  */
 
 @Mapper
 @Repository
-public interface TbBusinessMapper extends BaseMapper <TbBusiness> {
+public interface TbBusinessMapper extends BaseMapper<TbBusiness> {
 
-	/**
-	 * 查集合 - 根据条件(参数为空时代表忽略指定条件)
-	 * @param so 参数集合 
-	 * @return 数据列表 
-	 */
-	List<TbBusiness> getList(SoMap so);
+    /**
+     * 查集合 - 根据条件(参数为空时代表忽略指定条件)
+     *
+     * @param so 参数集合
+     * @return 数据列表
+     */
+    List<TbBusiness> getList(SoMap so);
 
+    List<CarDisincle> getCarDisincleList(SoMap soMap);
 
 }

+ 78 - 62
sp-server/src/main/java/com/pj/project/tb_business/TbBusinessMapper.xml

@@ -2,73 +2,89 @@
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="com.pj.project.tb_business.TbBusinessMapper">
 
-	<!-- 查集合 - 根据条件(参数为空时代表忽略指定条件) [G] -->
-	<select id="getList" resultType="com.pj.project.tb_business.TbBusiness">
-		select * from tb_business
-		<where>
-			<if test=' this.has("id") '> and id = #{id} </if>
-			<if test=' this.has("customerId") '> and customer_id = #{customerId} </if>
-			<if test=' this.has("customerName") '> and customer_name like concat('%', #{customerName} ,'%')</if>
-			<if test=' this.has("no") '> and no = #{no} </if>
-			<if test=' this.has("cardNo") '> and card_no  like concat('%', #{cardNo} ,'%')</if>
-			<if test=' this.has("cardSize") '> and card_size = #{cardSize} </if>
-			<if test=' this.has("netWeight") '> and net_weight = #{netWeight} </if>
-			<if test=' this.has("goodsName") '> and goods_name = #{goodsName} </if>
-			<if test=' this.has("goodsCode") '> and goods_code = #{goodsCode} </if>
-			<if test=' this.has("driverName") '> and driver_name  like concat('%', #{driverName} ,'%')</if>
-			<if test=' this.has("driverId") '> and driver_id = #{driverId} </if>
-			<if test=' this.has("driverPhone") '> and driver_phone = #{driverPhone} </if>
-			<if test=' this.has("driverIdCard") '> and driver_id_card  like concat('%', #{driverIdCard} ,'%')</if>
-			<if test=' this.has("expectInDay") '> and expect_in_day = #{expectInDay} </if>
-			<if test=' this.has("realInDay") '> and real_in_day = #{realInDay} </if>
-			<if test=' this.has("realInTime") '> and real_in_time = #{realInTime} </if>
-			<if test=' this.has("payStatus") '> and pay_status = #{payStatus} </if>
-			<if test=' this.has("payTime") '> and pay_time = #{payTime} </if>
-			<if test=' this.has("payType") '> and pay_type = #{payType} </if>
-			<if test=' this.has("outDayTime") '> and out_day_time = #{outDayTime} </if>
-			<if test=' this.has("partMoney") '> and part_money = #{partMoney} </if>
-			<if test=' this.has("partTime") '> and part_time = #{partTime} </if>
+    <!-- 查集合 - 根据条件(参数为空时代表忽略指定条件) [G] -->
+    <select id="getList" resultType="com.pj.project.tb_business.TbBusiness">
+        select * from tb_business
+        <where>
+            <if test=' this.has("id") '>and id = #{id}</if>
+            <if test=' this.has("customerId") '>and customer_id = #{customerId}</if>
+            <if test=' this.has("customerName") '>and customer_name like concat('%', #{customerName} ,'%')</if>
+            <if test=' this.has("no") '>and no = #{no}</if>
+            <if test=' this.has("cardNo") '>and card_no like concat('%', #{cardNo} ,'%')</if>
+            <if test=' this.has("cardSize") '>and card_size = #{cardSize}</if>
+            <if test=' this.has("netWeight") '>and net_weight = #{netWeight}</if>
+            <if test=' this.has("goodsName") '>and goods_name = #{goodsName}</if>
+            <if test=' this.has("goodsCode") '>and goods_code = #{goodsCode}</if>
+            <if test=' this.has("driverName") '>and driver_name like concat('%', #{driverName} ,'%')</if>
+            <if test=' this.has("driverId") '>and driver_id = #{driverId}</if>
+            <if test=' this.has("driverPhone") '>and driver_phone = #{driverPhone}</if>
+            <if test=' this.has("driverIdCard") '>and driver_id_card like concat('%', #{driverIdCard} ,'%')</if>
+            <if test=' this.has("expectInDay") '>and expect_in_day = #{expectInDay}</if>
+            <if test=' this.has("realInDay") '>and real_in_day = #{realInDay}</if>
+            <if test=' this.has("realInTime") '>and real_in_time = #{realInTime}</if>
+            <if test=' this.has("payStatus") '>and pay_status = #{payStatus}</if>
+            <if test=' this.has("payTime") '>and pay_time = #{payTime}</if>
+            <if test=' this.has("payType") '>and pay_type = #{payType}</if>
+            <if test=' this.has("outDayTime") '>and out_day_time = #{outDayTime}</if>
+            <if test=' this.has("partMoney") '>and part_money = #{partMoney}</if>
+            <if test=' this.has("partTime") '>and part_time = #{partTime}</if>
+            <if test='isCar==0'>
+                and declare_no is not null
+            </if>
+            <if test='isCar==1'>
+                and (declare_no is null or declare_no='')
+            </if>
             <if test=' this.has("current") '>
                 <if test=' current == 3 '>and real_in_time is not null and out_day_time is not null</if>
                 <if test=' current == 2 '>and real_in_time is not null and out_day_time is null</if>
                 <if test=' current == 1 '>and real_in_time is null and out_day_time is null</if>
             </if>
-		</where>
-		order by
-		<choose>
-			<when test='sortType == 1'> id desc </when>
-			<when test='sortType == 2'> customer_id desc </when>
-			<when test='sortType == 3'> customer_name desc </when>
-			<when test='sortType == 4'> no desc </when>
-			<when test='sortType == 5'> card_no desc </when>
-			<when test='sortType == 6'> card_size desc </when>
-			<when test='sortType == 7'> net_weight desc </when>
-			<when test='sortType == 8'> goods_name desc </when>
-			<when test='sortType == 9'> goods_code desc </when>
-			<when test='sortType == 10'> driver_name desc </when>
-			<when test='sortType == 11'> driver_id desc </when>
-			<when test='sortType == 12'> driver_phone desc </when>
-			<when test='sortType == 13'> driver_id_card desc </when>
-			<when test='sortType == 14'> expect_in_day desc </when>
-			<when test='sortType == 15'> real_in_day desc </when>
-			<when test='sortType == 16'> real_in_time desc </when>
-			<when test='sortType == 17'> pay_status desc </when>
-			<when test='sortType == 18'> pay_time desc </when>
-			<when test='sortType == 19'> pay_type desc </when>
-			<when test='sortType == 20'> out_day_time desc </when>
-			<when test='sortType == 21'> part_money desc </when>
-			<when test='sortType == 22'> part_time desc </when>
-			<otherwise> id desc </otherwise>
-		</choose>
+        </where>
+        order by
+        <choose>
+            <when test='sortType == 1'>id desc</when>
+            <when test='sortType == 2'>customer_id desc</when>
+            <when test='sortType == 3'>customer_name desc</when>
+            <when test='sortType == 4'>no desc</when>
+            <when test='sortType == 5'>card_no desc</when>
+            <when test='sortType == 6'>card_size desc</when>
+            <when test='sortType == 7'>net_weight desc</when>
+            <when test='sortType == 8'>goods_name desc</when>
+            <when test='sortType == 9'>goods_code desc</when>
+            <when test='sortType == 10'>driver_name desc</when>
+            <when test='sortType == 11'>driver_id desc</when>
+            <when test='sortType == 12'>driver_phone desc</when>
+            <when test='sortType == 13'>driver_id_card desc</when>
+            <when test='sortType == 14'>expect_in_day desc</when>
+            <when test='sortType == 15'>real_in_day desc</when>
+            <when test='sortType == 16'>real_in_time desc</when>
+            <when test='sortType == 17'>pay_status desc</when>
+            <when test='sortType == 18'>pay_time desc</when>
+            <when test='sortType == 19'>pay_type desc</when>
+            <when test='sortType == 20'>out_day_time desc</when>
+            <when test='sortType == 21'>part_money desc</when>
+            <when test='sortType == 22'>part_time desc</when>
+            <otherwise>id desc</otherwise>
+        </choose>
+    </select>
+    <select id="getCarDisincleList" resultType="com.pj.project.tb_business.CarDisincle">
+		SELECT
+            a.id,
+            b.id as businessCarId,
+            a.`no`,
+            a.item_price,a.goods_name,a.admin_confirm_input,b.car_no,
+            b.base_part_money,a.total_money,a.pay_money,a.create_time,
+            b.real_in_time,b.real_out_time
+        from tb_business a,tb_business_car b
+        WHERE a.id=b.business_id and (a.declare_no='' or a.declare_no is null)
+            <if test="cardNo !='' and cardNo !=null">
+                and b.car_no like concat('%',#{cardNo},'%')
+            </if>
+        <if test="adminConfirmInput !='-1'">
+            and a.admin_confirm_input=#{adminConfirmInput}
+        </if>
+        ORDER BY a.create_time desc
 	</select>
-	
-	
-	
-	
-	
-	
-	
-	
-	
+
 
 </mapper>

+ 42 - 17
sp-server/src/main/java/com/pj/project/tb_business/TbBusinessService.java

@@ -135,6 +135,10 @@ public class TbBusinessService extends ServiceImpl<TbBusinessMapper, TbBusiness>
      * 增
      */
     public AjaxJson addOrUpdate(TbBusiness t) {
+        t.setBusinessType(TbBusiness.BusinessType.HOLD_CAR.getCode());
+        if (StrUtil.isEmpty(t.getDeclareNo())) {
+            throw new BusinessException("请选择申报单");
+        }
         if (StrUtil.isNotEmpty(t.getId()) && StrUtil.isNotEmpty(t.getDeclareNo())) {
             TbBusiness db = this.getById(t.getId());
             if (!StrUtil.equals(db.getDeclareNo(), t.getDeclareNo())) {
@@ -188,21 +192,7 @@ public class TbBusinessService extends ServiceImpl<TbBusinessMapper, TbBusiness>
                     .setUnit(tbItem.getUnit()).setTotal(NumberUtil.mul(num, tbItem.getPrice())).setCreateTime(new Date())
                     .setNo(t.getNo() + "0" + index);
             tbBusinessItemService.save(item);
-            String businessType = tbItemType.getBusinessType();
-            if (!StrUtil.equals(businessType, TbCostomer.CustomerEnum.BUSINESS_TYPE.getType())) {
-                String remark = "车牌:" + t.getCardNo();
-                if (StrUtil.isNotEmpty(t.getChinaCarNo())) {
-                    remark += "、" + t.getChinaCarNo();
-                }
-                MsgDataBO msgDataBO = new MsgDataBO("订单号:"+item.getNo(), tbItemType.getName(), tbItem.getItemName(), t.getGoodsName(), DateUtil.now(), remark);
-                StrUtil.splitTrim(businessType, ",").forEach(type -> {
-                    List<String> openidList = tbCostomerService.findByBusinessTypeOpenid(type);
-                    openidList.forEach(openid -> {
-                        String detailUrl = myConfig.getWebDomain() + "/pages/business-item/item-detail?itemId=" + item.getId() + "&openid=" + openid;
-                        wxService.sendTemplateMsg(wxConfig.getBusinessNoticeTemplate(), openid, msgDataBO, detailUrl);
-                    });
-                });
-            }
+
             index++;
         }
         List<TbBusinessCar> carList = JSONUtil.toList(t.getCarJson(), TbBusinessCar.class);
@@ -331,9 +321,30 @@ public class TbBusinessService extends ServiceImpl<TbBusinessMapper, TbBusiness>
     public void confirm(List<String> ids) {
         ids.forEach(id -> {
             TbBusiness business = this.getById(id);
-            business.setConfirmInput(1).setConfirmInputTime(new Date()).setConfirmInputBy(StpUserUtil.getAdmin().getName());
+            business.setConfirmInput(1).setAdminConfirmInput(1)
+                    .setConfirmInputTime(new Date())
+                    .setConfirmInputBy(StpUserUtil.getAdmin().getName());
             this.updateById(business);
             storeMsg(business.getCustomerId(), "业务订单【" + business.getNo() + "】已确认" + DateUtil.now() + "。");
+            List<TbBusinessItem> items = tbBusinessItemService.findByBusinessId(id);
+            items.forEach(item -> {
+                TbItemType tbItemType = tbItemTypeService.getById(item.getItemTypeId());
+                String businessType = tbItemType.getBusinessType();
+                if (!StrUtil.equals(businessType, TbCostomer.CustomerEnum.BUSINESS_TYPE.getType())) {
+                    String remark = "车牌:" + business.getCardNo();
+                    if (StrUtil.isNotEmpty(business.getChinaCarNo())) {
+                        remark += "、" + business.getChinaCarNo();
+                    }
+                    MsgDataBO msgDataBO = new MsgDataBO("订单号:" + item.getNo(), tbItemType.getName(), item.getItemName(), business.getGoodsName(), DateUtil.now(), remark);
+                    StrUtil.splitTrim(businessType, ",").forEach(type -> {
+                        List<String> openidList = tbCostomerService.findByBusinessTypeOpenid(type);
+                        openidList.forEach(openid -> {
+                            String detailUrl = myConfig.getWebDomain() + "/pages/business-item/item-detail?itemId=" + item.getId() + "&openid=" + openid;
+                            wxService.sendTemplateMsg(wxConfig.getBusinessNoticeTemplate(), openid, msgDataBO, detailUrl);
+                        });
+                    });
+                }
+            });
         });
     }
 
@@ -457,6 +468,9 @@ public class TbBusinessService extends ServiceImpl<TbBusinessMapper, TbBusiness>
         String businessId = car.getBusinessId();
         result.put("businessId", businessId);
         List<TbBusinessCar> cars = tbBusinessCarService.findByBusinessId(businessId);
+        if (cars.isEmpty()){
+            cars.add(car);
+        }
         Date now = new Date();
         List<Map<String, Object>> carsList = new ArrayList<>();
         for (TbBusinessCar tbBusinessCar : cars) {
@@ -480,6 +494,7 @@ public class TbBusinessService extends ServiceImpl<TbBusinessMapper, TbBusiness>
             carsList.add(carMap);
         }
         result.put("carList", carsList);
+        result.put("itemList", Collections.emptyList());
         TbBusiness tbBusiness = this.getById(businessId);
         if (tbBusiness != null && tbBusiness.getPayStatus() != TbBusiness.PayStatus.HAS_PAY_CONFIRM.getCode()) {
             List<TbBusinessItem> items = tbBusinessItemService.findByBusinessId(businessId);
@@ -502,7 +517,17 @@ public class TbBusinessService extends ServiceImpl<TbBusinessMapper, TbBusiness>
     public void uploadReport(TbBusiness tbBusiness) {
         this.updateById(tbBusiness);
         List<TbBusinessCar> cars = tbBusinessCarService.findByBusinessId(tbBusiness.getId());
-        cars.forEach(tbBusinessCar -> tbBusinessCar.setIsLock(0));
         tbBusinessCarService.updateBatchById(cars);
     }
+
+    public TbBusiness checkCar(String carNo) {
+        QueryWrapper<TbBusiness> ew = new QueryWrapper<>();
+        ew.eq("car_no", carNo);
+        ew.eq("admin_confirm_input", 0);
+        return this.getOne(ew);
+    }
+
+    public List<CarDisincle> getCarDisincleList(SoMap soMap) {
+        return tbBusinessMapper.getCarDisincleList(soMap);
+    }
 }

+ 1 - 1
sp-server/src/main/java/com/pj/project/tb_business_car/TbBusinessCarMapper.xml

@@ -58,7 +58,7 @@
         FROM
             tb_business_car a,
             tb_business b
-        WHERE
+        where
             a.business_id = b.id
             AND b.total_money> b.pay_money
             AND a.car_no LIKE CONCAT( '%', #{carNo}, '%' )

+ 21 - 8
sp-server/src/main/java/com/pj/project/tb_business_car/TbBusinessCarService.java

@@ -1,9 +1,6 @@
 package com.pj.project.tb_business_car;
 
-import java.util.Date;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
+import java.util.*;
 import java.util.stream.Collectors;
 
 import cn.hutool.core.util.StrUtil;
@@ -48,6 +45,7 @@ public class TbBusinessCarService extends ServiceImpl<TbBusinessCarMapper, TbBus
     @Resource
     PartConfig partConfig;
     @Resource
+    @Lazy
     TbFeeDetailsService tbFeeDetailsService;
 
 
@@ -130,7 +128,7 @@ public class TbBusinessCarService extends ServiceImpl<TbBusinessCarMapper, TbBus
             throw new Exception("车辆已存在");
         }
         TbBusiness tbBusiness = tbBusinessService.getById(businessId);
-        if (!CAR_LIST.contains(carNo.substring(0,1))) {
+        if (!CAR_LIST.contains(carNo.substring(0, 1))) {
             tbBusiness.setCardNo(carNo);
             tbBusiness.setCardSize(t.getCarSize());
         }
@@ -144,11 +142,11 @@ public class TbBusinessCarService extends ServiceImpl<TbBusinessCarMapper, TbBus
         this.updateById(t);
         TbBusiness tbBusiness = tbBusinessService.getById(t.getBusinessId());
         String carNo = t.getCarNo();
-        if (!CAR_LIST.contains(carNo.substring(0,1))) {
+        if (!CAR_LIST.contains(carNo.substring(0, 1))) {
             tbBusiness.setCardNo(carNo);
         } else {
             List<TbBusinessCar> cars = this.findByBusinessId(t.getBusinessId());
-            String chiaCarNo = cars.stream().filter(obj -> CAR_LIST.contains(obj.getCarNo().substring(0,1))).map(TbBusinessCar::getCarNo).collect(Collectors.joining("、"));
+            String chiaCarNo = cars.stream().filter(obj -> CAR_LIST.contains(obj.getCarNo().substring(0, 1))).map(TbBusinessCar::getCarNo).collect(Collectors.joining("、"));
             tbBusiness.setChinaCarNo(chiaCarNo);
         }
         tbBusinessService.updateById(tbBusiness);
@@ -176,7 +174,7 @@ public class TbBusinessCarService extends ServiceImpl<TbBusinessCarMapper, TbBus
 
     public AjaxJson deleteCar(String id) {
         TbBusinessCar db = this.getById(id);
-        String checkStr=db.getCarNo().substring(0,1);
+        String checkStr = db.getCarNo().substring(0, 1);
         if (!CAR_LIST.contains(checkStr)) {
             return AjaxJson.getError("越南车不能删除");
         }
@@ -191,6 +189,21 @@ public class TbBusinessCarService extends ServiceImpl<TbBusinessCarMapper, TbBus
         return AjaxJson.getSuccess();
     }
 
+    public TbBusinessCar checkCar(String carNo) {
+        QueryWrapper<TbBusinessCar> ew = new QueryWrapper<>();
+        ew.eq("car_no", carNo);
+        ew.eq("pay", 0);
+        return this.getOne(ew);
+    }
+
+    public TbBusinessCar findTheLastRecord(String carNo) {
+        QueryWrapper<TbBusinessCar> ew = new QueryWrapper<>();
+        ew.eq("car_no", carNo);
+        ew.orderByDesc("id");
+        List<TbBusinessCar> list = this.list(ew);
+        return list.isEmpty() ? null : list.get(0);
+    }
+
     public void addCarRecord(TbBusinessCar t) throws Exception {
         String carNo = t.getCarNo().toUpperCase();
         TbBusinessCar db = this.check(carNo);

+ 5 - 1
sp-server/src/main/java/com/pj/project/tb_business_item/TbBusinessItemController.java

@@ -69,7 +69,9 @@ public class TbBusinessItemController {
     @RequestMapping("getList")
     public AjaxJson getList() {
         SoMap so = SoMap.getRequestSoMap();
-        so.put("typeFlag",1);
+        if (StrUtil.isEmpty(so.getString("businessId"))){
+            so.put("typeFlag",1);
+        }
         String customerId = StpUserUtil.getCustomerId();
         if (!StrUtil.equals(customerId, UserTypeEnum.PLATFORM_ADMIN.getCustomerId())) {
             so.put("pickCustomerId", customerId);
@@ -78,6 +80,8 @@ public class TbBusinessItemController {
         return AjaxJson.getPageData(so.getDataCount(), list);
     }
 
+
+
     @RequestMapping("export/items")
     public AjaxJson exportItems(HttpServletResponse response) throws Exception{
         SoMap so = SoMap.getRequestSoMap();

+ 20 - 0
sp-server/src/main/java/com/pj/project/tb_costomer/TbCostomer.java

@@ -1,10 +1,13 @@
 package com.pj.project.tb_costomer;
 
 import java.io.Serializable;
+import java.util.Arrays;
 import java.util.Date;
 
+import cn.hutool.core.util.StrUtil;
 import com.baomidou.mybatisplus.annotation.*;
 import com.baomidou.mybatisplus.extension.activerecord.Model;
+import com.pj.project4sp.global.BusinessException;
 import lombok.AllArgsConstructor;
 import lombok.EqualsAndHashCode;
 
@@ -107,6 +110,19 @@ public class TbCostomer extends Model<TbCostomer> implements Serializable {
 	 */
 	private String type="0";
 
+	@TableField(exist = false)
+	private String typeDes;
+
+	public String getTypeDes() {
+		String type=this.type;
+		StringBuilder sb=new StringBuilder();
+		StrUtil.splitTrim(type,",")
+				.forEach(t->{
+					sb.append(CustomerEnum.getDesc(t)).append("、");
+				});
+		return sb.substring(0,sb.lastIndexOf("、"));
+	}
+
 	@Getter
 	@AllArgsConstructor
 	public static enum CustomerEnum{
@@ -117,6 +133,10 @@ public class TbCostomer extends Model<TbCostomer> implements Serializable {
 		;
 		private String type;
 		private String desc;
+		public static String getDesc(String type){
+			return Arrays.stream(CustomerEnum.values()).filter(customerEnum -> customerEnum.getType().equals(type))
+					.findFirst().orElseThrow(()->new BusinessException("不存在")).getDesc();
+		}
 	}
 
 

+ 1 - 0
sp-server/src/main/java/com/pj/project/tb_declare/TbDeclare.java

@@ -40,6 +40,7 @@ public class TbDeclare implements Serializable {
     private String id;
 
     private String customerId;
+    private String customerName;
 
 	/**
 	 * 业务id 

+ 1 - 1
sp-server/src/main/java/com/pj/project/tb_declare/TbDeclareMapper.xml

@@ -98,7 +98,6 @@
         <include refid="select_sql"></include>
         <where>
             <if test=' this.has("id") '>and id = #{id}</if>
-            <if test=' this.has("businessId") '>and business_id = #{businessId}</if>
             <if test=' this.has("customerId") '>and customer_id = #{customerId}</if>
             <if test=' this.has("declarePeople") '>and declare_people like concat('%',#{declarePeople},'%')</if>
             <if test=' this.has("goodsName") '>and goods_name = #{goodsName}</if>
@@ -125,6 +124,7 @@
             <if test=' this.has("productionCode") '>and production_code = #{productionCode}</if>
             <if test=' this.has("containerCode") '>and container_code = #{containerCode}</if>
             <if test=' this.has("bind") '>and business_id is null or business_id=''</if>
+
             <if test=' this.has("declareNo") '>and (declare_no=#{declareNo} or business_id is null or business_id='')</if>
 
         </where>

+ 1 - 0
sp-server/src/main/java/com/pj/project/tb_disinfect/TbDisinfect.java

@@ -43,6 +43,7 @@ public class TbDisinfect extends Model<TbDisinfect> implements Serializable {
 	 */
 	private String id;
 	private String customerId;
+	private String customerName;
 
 	/**
 	 * 发货人 

+ 61 - 48
sp-server/src/main/java/com/pj/project/tb_fee_details/TbFeeDetailsService.java

@@ -24,6 +24,7 @@ import com.pj.project.tb_business_item.TbBusinessItem;
 import com.pj.project4sp.uploadfile.UploadUtil;
 import com.pj.utils.so.SoMap;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.context.annotation.Lazy;
 import org.springframework.core.io.ClassPathResource;
 import org.springframework.scheduling.annotation.Async;
 import org.springframework.stereotype.Service;
@@ -35,71 +36,83 @@ import javax.annotation.Resource;
 
 /**
  * Service: tb_fee_details -- 收费明细表
- * @author lzm 
+ *
+ * @author lzm
  */
 @Service
 @Transactional
 public class TbFeeDetailsService extends ServiceImpl<TbFeeDetailsMapper, TbFeeDetails> implements IService<TbFeeDetails> {
 
-	/** 底层 Mapper 对象 */
-	@Autowired
-	TbFeeDetailsMapper tbFeeDetailsMapper;
-	@Resource
+    /**
+     * 底层 Mapper 对象
+     */
+    @Autowired
+    TbFeeDetailsMapper tbFeeDetailsMapper;
+    @Resource
     TbBusinessCarService tbBusinessCarService;
     @Resource
+    @Lazy
     TbBusinessService tbBusinessService;
     @Resource
     private MyConfig myConfig;
     @Resource
     private PartConfig partConfig;
 
-	/** 增 */
-	int add(TbFeeDetails t){
-		return tbFeeDetailsMapper.add(t);
-	}
+    /**
+     * 增
+     */
+    int add(TbFeeDetails t) {
+        return tbFeeDetailsMapper.add(t);
+    }
 
-	/** 删 */
-	int delete(Long id){
-		return tbFeeDetailsMapper.delete(id);
-	}
+    /**
+     * 删
+     */
+    int delete(Long id) {
+        return tbFeeDetailsMapper.delete(id);
+    }
 
-	/** 改 */
-	int update(TbFeeDetails t){
-		return tbFeeDetailsMapper.update(t);
-	}
+    /**
+     * 改
+     */
+    int update(TbFeeDetails t) {
+        return tbFeeDetailsMapper.update(t);
+    }
 
-	/** 查 */
-	TbFeeDetails getById(Long id){
-		return tbFeeDetailsMapper.getById(id);
-	}
+    /**
+     * 查
+     */
+    TbFeeDetails getById(Long id) {
+        return tbFeeDetailsMapper.getById(id);
+    }
 
-	/** 查集合 - 根据条件(参数为空时代表忽略指定条件) */  
-	List<TbFeeDetails> getList(SoMap so) {
-		return tbFeeDetailsMapper.getList(so);	
-	}
+    /**
+     * 查集合 - 根据条件(参数为空时代表忽略指定条件)
+     */
+    List<TbFeeDetails> getList(SoMap so) {
+        return tbFeeDetailsMapper.getList(so);
+    }
 
-    public TbFeeDetails getByBusinessItemId(String businessItemId){
+    public TbFeeDetails getByBusinessItemId(String businessItemId) {
         QueryWrapper<TbFeeDetails> qw = new QueryWrapper<>();
         qw.eq("business_item_id", businessItemId);
         return getOne(qw);
     }
 
-    public List<TbFeeDetails> getByBusinessIdAndCarNo(String businessId, String carNo){
+    public TbFeeDetails getByBusinessIdAndCarNoAndFeeType(String businessId, String carNo, Integer feeType) {
         QueryWrapper<TbFeeDetails> qw = new QueryWrapper<>();
         qw.eq("business_id", businessId);
         qw.eq("car_no", carNo);
-        return list(qw);
+        qw.eq("fee_type", feeType);
+        return getOne(qw);
     }
-
-    public TbFeeDetails getByBusinessIdAndCarNoAndFeeType(String businessId, String carNo, Integer feeType){
+    public List<TbFeeDetails> getByBusinessIdAndCarNo(String businessId, String carNo){
         QueryWrapper<TbFeeDetails> qw = new QueryWrapper<>();
         qw.eq("business_id", businessId);
         qw.eq("car_no", carNo);
-        qw.eq("fee_type", feeType);
-        return getOne(qw);
+        return list(qw);
     }
-
-    public TbFeeDetails getByBusinessIdAndCarNoAndItemType(String businessId, String carNo, String itemTypeId){
+    public TbFeeDetails getByBusinessIdAndCarNoAndItemType(String businessId, String carNo, String itemTypeId) {
         QueryWrapper<TbFeeDetails> qw = new QueryWrapper<>();
         qw.eq("business_id", businessId);
         qw.eq("car_no", carNo);
@@ -108,7 +121,7 @@ public class TbFeeDetailsService extends ServiceImpl<TbFeeDetailsMapper, TbFeeDe
     }
 
 
-	public void chargeParkFee(List<PriceBO> cars){
+    public void chargeParkFee(List<PriceBO> cars) {
         Date now = new Date();
         String toDay = DateUtil.format(now, "yyyy-MM-dd");
         for (PriceBO bo1 : cars) {
@@ -116,7 +129,7 @@ public class TbFeeDetailsService extends ServiceImpl<TbFeeDetailsMapper, TbFeeDe
             TbBusiness business = tbBusinessService.getById(car.getBusinessId());
             String carNo = car.getCarNo();
             TbFeeDetails parkFee = getByBusinessIdAndCarNoAndFeeType(car.getBusinessId(), carNo, TbFeeDetails.fee.PARK_FEE.getCode());
-            if(parkFee == null){
+            if (parkFee == null) {
                 parkFee = new TbFeeDetails();
                 parkFee.setTaxRate(partConfig.getTaxRate());
             }
@@ -132,28 +145,28 @@ public class TbFeeDetailsService extends ServiceImpl<TbFeeDetailsMapper, TbFeeDe
     }
 
     //@Async
-    public void chargeBusinessFee(List<TbBusinessItem> items){
+    public void chargeBusinessFee(List<TbBusinessItem> items) {
         Date now = new Date();
         String toDay = DateUtil.format(now, "yyyy-MM-dd");
         for (TbBusinessItem item : items) {
             int feeType = -1;
             String itemType = item.getItemTypeName();
-            if(itemType.contains("核酸")){
+            if (itemType.contains("核酸")) {
                 feeType = TbFeeDetails.fee.NUCLEIC_FEE.getCode();
-            } else if(itemType.contains("消毒")){
+            } else if (itemType.contains("消毒")) {
                 feeType = TbFeeDetails.fee.DISINFECT_FEE.getCode();
-            } else if(itemType.contains("装卸")){
+            } else if (itemType.contains("装卸")) {
                 feeType = TbFeeDetails.fee.STEVEDORE_FEE.getCode();
-            } else if(StrUtil.equals(itemType, "特殊车辆") || StrUtil.equals(itemType, "汽车吊" )){
+            } else if (StrUtil.equals(itemType, "特殊车辆") || StrUtil.equals(itemType, "汽车吊")) {
                 feeType = TbFeeDetails.fee.STEVEDORE_FEE.getCode();
-            } else if(itemType.contains("入场管理")){
+            } else if (itemType.contains("入场管理")) {
                 feeType = TbFeeDetails.fee.MANAGE_FEE.getCode();
-            } else if(StrUtil.equals(itemType, "充电打冷")) {
+            } else if (StrUtil.equals(itemType, "充电打冷")) {
                 feeType = TbFeeDetails.fee.CHARGE_FEE.getCode();
             }
             TbBusiness business = tbBusinessService.getById(item.getBusinessId());
             TbFeeDetails businessFee = getByBusinessIdAndCarNoAndItemType(item.getBusinessId(), business.getCardNo(), item.getItemTypeId());
-            if(businessFee == null){
+            if (businessFee == null) {
                 businessFee = new TbFeeDetails();
             }
             businessFee.setBusinessId(item.getBusinessId()).setBusinessNo(business.getNo())
@@ -167,10 +180,10 @@ public class TbFeeDetailsService extends ServiceImpl<TbFeeDetailsMapper, TbFeeDe
         }
     }
 
-    public String export(SoMap so) throws Exception{
+    public String export(SoMap so) throws Exception {
         Map<String, String> head = new HashMap<>();
         head.put("time", so.getString("payDay"));
-	    List<ExportFeeDetailDTO> exportList = new ArrayList<>();
+        List<ExportFeeDetailDTO> exportList = new ArrayList<>();
         List<TbFeeDetails> list = this.getList(so);
         Integer index = 1;
         for (TbFeeDetails feeDetails : list) {
@@ -196,9 +209,9 @@ public class TbFeeDetailsService extends ServiceImpl<TbFeeDetailsMapper, TbFeeDe
         }
 
         ClassPathResource classPathResource = new ClassPathResource("static/day-fee.xlsx");
-        InputStream tempInputStream =classPathResource.getInputStream();
+        InputStream tempInputStream = classPathResource.getInputStream();
 
-        ExcelWriter excelWriter = EasyExcel.write(savePath+fileName, ExportFeeDetailDTO.class)
+        ExcelWriter excelWriter = EasyExcel.write(savePath + fileName, ExportFeeDetailDTO.class)
                 .withTemplate(tempInputStream).build();
         WriteSheet writeSheet = EasyExcel.writerSheet().build();
         excelWriter.fill(exportList, writeSheet);

+ 1 - 0
sp-server/src/main/java/com/pj/project/tb_item_type/TbItemType.java

@@ -65,6 +65,7 @@ public class TbItemType extends Model<TbItemType> implements Serializable {
 	 * 业务类型1,消杀;2装卸;0默认
 	 */
 	private String businessType="0";
+	private Integer business=1;
 
 	@TableField(exist = false)
 	private List<TbItem>items=new ArrayList<>();

+ 1 - 0
sp-server/src/main/java/com/pj/project/tb_item_type/TbItemTypeMapper.xml

@@ -60,6 +60,7 @@
 			<if test=' this.has("id") '> and id = #{id} </if>
 			<if test=' this.has("name") '> and name like concat('%',#{name},'%')  </if>
 			<if test=' this.has("need") '> and need = #{need} </if>
+			<if test=' this.has("business") '> and business = #{business} </if>
 		</where>
 		order by
 		<choose>

+ 8 - 9
sp-server/src/main/resources/application-dev.yml

@@ -6,9 +6,9 @@ spring:
     # 数据源配置
     datasource:
         type: com.alibaba.druid.pool.DruidDataSource
-        url: jdbc:mysql://127.0.0.1:3307/pco_system?useUnicode=true&characterEncoding=utf-8&useSSL=true&serverTimezone=UTC
+        url: jdbc:mysql://127.0.0.1:3306/pco_system?useUnicode=true&characterEncoding=utf-8&useSSL=true&serverTimezone=GMT%2B8
         username: root
-        password: 1234
+        password: 123456
         # 是否打开sql监控台  (生产环境请务必关闭此选项)
         druid:
             stat-view-servlet:
@@ -45,10 +45,10 @@ spring:
     # 项目自定义配置
     myconfig:
         # 本项目部署到的服务器域名(文件上传等等模块  要用到)
-        domain: http://192.168.3.131:8099/pro
-        web-domain: https://192.168.3.131:8080/h5
+        domain: https://127.0.0.1:8099/pro
+        web-domain: https://127.0.0.1:8080
 part-config:
-    base-price: 0.01 #基础费用
+    base-price: 30 #基础费用
     extra-price: 0.01 #过夜额外收费
     night-end: 06:00:00 #夜间结束时间
     free-minutes: 30
@@ -60,10 +60,8 @@ car:
 wx-config:
     title: 场站管理系统
     flush-second: 12000 #token刷新时间 秒
-#    app-id: wxd40a34141872bf0c
-#    secret: 2e6a69fab1fbab60369ebd21b0882f3e
-    app-id: wx4979e287cbed0d86
-    secret: 0f2c93b93615b768c6423651ab536ddb
+    app-id: wxd40a34141872bf0c
+    secret: 2e6a69fab1fbab60369ebd21b0882f3e
     mach-id: 1615645036
     key: dongxingkouanerqiao8888888888888
     token: dx1123
@@ -84,3 +82,4 @@ jh-config:
     merchant-no: PRO88882021122310003030
     trade-type: GAS_PAY
     pay-secret: f0b9d6ea704d4c03a6b44be50d055025
+    server-url: http://116.252.74.15:8081

+ 1 - 1
sp-server/src/main/resources/application-pro.yml

@@ -59,10 +59,10 @@ car:
 wx-config:
     flush-second: 120 #token刷新时间 秒
     app-id: wxf33627516d0851e1
+    secret: fd1dd75b8063fbf4c94fce3aac5de524
     mach-id: 1615645036
     key: dongxingkouanerqiao8888888888888
     token: dx1123
-    secret: fd1dd75b8063fbf4c94fce3aac5de524
     access-token-key: wechat:base_token_key
     js-api-ticket-key: wechat:jsapi_ticket_key
     access-token-url: https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid=${wx-config.app-id}&secret=${wx-config.secret}