소스 검색

业务、微信调通

qzyReal 3 년 전
부모
커밋
a247d13252
27개의 변경된 파일554개의 추가작업 그리고 357개의 파일을 삭제
  1. 3 0
      app/apis/api.js
  2. 24 27
      app/pages/business-entering/business-edit.vue
  3. 14 29
      app/pages/business-entering/business-entering.vue
  4. 1 0
      app/pages/business-entering/declare-select.vue
  5. 3 5
      app/pages/business-order/business-order.vue
  6. 55 18
      app/pages/declare/add.vue
  7. 61 29
      app/pages/disinfect/addDisinfect.vue
  8. 14 0
      app/pages/index/index.vue
  9. 0 1
      app/pages/onely-disinfect/disinfect-Index.vue
  10. 2 1
      app/pages/wx/pay.vue
  11. 2 2
      app/utils/request.js
  12. 129 78
      sp-admin/sa-view/car/tb-business-car-list.html
  13. 38 53
      sp-admin/sa-view/tb-business/tb-business-add.html
  14. 156 51
      sp-admin/sa-view/tb-business/tb-business-edit.html
  15. 1 1
      sp-admin/sa-view/tb-business/tb-car-disincle-list.html
  16. 0 1
      sp-server/app.pid
  17. 15 24
      sp-server/src/main/java/com/pj/api/jh/service/JhService.java
  18. 2 0
      sp-server/src/main/java/com/pj/api/open/service/OpenService.java
  19. 8 4
      sp-server/src/main/java/com/pj/api/service/ApiService.java
  20. 16 30
      sp-server/src/main/java/com/pj/api/wx/service/WxService.java
  21. 1 0
      sp-server/src/main/java/com/pj/current/config/JhConfig.java
  22. 0 1
      sp-server/src/main/java/com/pj/project/tb_business/TbBusinessService.java
  23. 5 1
      sp-server/src/main/java/com/pj/project/tb_business_item/TbBusinessItemController.java
  24. 1 0
      sp-server/src/main/java/com/pj/project/tb_declare/TbDeclare.java
  25. 1 1
      sp-server/src/main/java/com/pj/project/tb_declare/TbDeclareMapper.xml
  26. 1 0
      sp-server/src/main/java/com/pj/project/tb_disinfect/TbDisinfect.java
  27. 1 0
      sp-server/src/main/resources/application-dev.yml

+ 3 - 0
app/apis/api.js

@@ -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)
 	},

+ 24 - 27
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;
@@ -547,7 +550,9 @@
 				})
 			},
 			getItemList() {
-				this.$api.getItemList({business:1}).then(resp => {
+				this.$api.getItemList({
+					business: 1
+				}).then(resp => {
 					this.itemList = resp.data;
 					this.getBusinessById();
 				})
@@ -588,18 +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;
-				
+
 				this.item = item;
 				this.show = true;
 
@@ -634,11 +632,11 @@
 					return false;
 				}
 				let filterItemList = this.filterItemList;
-				let needIds=this.needTypeId;
+				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){
+				for (let i in needIds) {
+					if (typeList.map(obj => obj.id).indexOf(needIds[i]) == -1) {
 						this.$common.toast('缺少必选业务');
 						return false;
 					}
@@ -672,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;
 				}

+ 14 - 29
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)"
@@ -325,9 +321,6 @@
 			},
 		},
 		created() {
-			if (this.customerId == '1') {
-				this.getCustomerList();
-			}
 			this.getGoodsList();
 			this.getUnit();
 		},
@@ -339,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 = [];
@@ -352,7 +347,9 @@
 					}else{
 						that.china.list =[];
 					}
+					that.handler();
 				})
+				console.log(that.form);
 			})
 		},
 		methods: {
@@ -537,12 +534,6 @@
 				}, 150)
 
 			},
-			getCustomerList() {
-				this.$api.getCustomerList({type:0}).then(resp => {
-					this.customer.customerList = resp.data;
-				})
-			},
-
 			selectItemFn(item) {
 				this.item = item;
 				this.show = true;
@@ -569,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,
@@ -611,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) {
@@ -690,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: [],

+ 3 - 5
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>
@@ -103,10 +103,8 @@
 				perList: []
 			}
 		},
-		created() {
-			this.customemrId = uni.getStorageSync('customerId')
-		},
 		onShow() {
+			this.customemrId = uni.getStorageSync('customerId')
 			this.getBusinessList();
 			this.perList = uni.getStorageSync('perList')
 		},

+ 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;
 			}
 		},

+ 14 - 0
app/pages/index/index.vue

@@ -138,6 +138,20 @@
 						
 					},
 					{
+						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: '车辆消杀',

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

@@ -162,7 +162,6 @@
 			},
 			confirmFn() {
 				let that = this;
-				console.log(this.form)
 				uni.showModal({
 					title: '提示',
 					content: '是否确认该账单?',

+ 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

+ 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';
 

+ 129 - 78
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="confirm==0&&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="confirm==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="confirm==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,49 +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),
-					confirm:sa.p('confirm',0),
+					report: {
+						visible: false,
+						business: {},
+					},
+					payStatus: sa.p('payStatus', 1),
+					confirm: sa.p('confirm', 0),
 					p: { // 查询参数  
 						id: '', //  
 						businessId: sa.p('id', ''), //  
@@ -124,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));
 					},
@@ -192,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) {
@@ -214,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;
 						}

+ 38 - 53
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,7 +501,7 @@
 						}
 					},
 					itemChange(itemId) {
-						
+
 					},
 					addCar() {
 						this.china.visible = true;
@@ -555,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(',');
@@ -639,7 +640,9 @@
 						}.bind(this))
 					},
 					getItemTypeList() {
-						sa.ajax('/TbItemType/getList',{business:1}, function(resp) {
+						sa.ajax('/TbItemType/getList', {
+							business: 1
+						}, function(resp) {
 							let typeList = resp.data;
 							// 初始化数据
 							if (this.id > 0) {
@@ -671,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();
@@ -703,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)) {
@@ -716,11 +692,11 @@
 							sa.error('载重只能输入数字')
 							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){
+						let needIds = this.needTypeId;
+						for (let i in needIds) {
+							if (typeList.map(obj => obj.id).indexOf(needIds[i]) == -1) {
 								sa.error('缺少必选业务');
 								return false;
 							}
@@ -763,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();

+ 156 - 51
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,8 +496,7 @@
 							this.checkItem = '';
 						}
 					},
-					itemChange(itemId) {
-					},
+					itemChange(itemId) {},
 					addCar() {
 						this.china.visible = true;
 					},
@@ -392,7 +513,7 @@
 					},
 					confirmAddCar() {
 						let carNo = this.car.form.carNo;
-						
+
 						if (!sa.isCarNo(carNo)) {
 							sa.error('请填入正确的车牌号')
 							return false;
@@ -429,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(',');
@@ -531,13 +652,15 @@
 						}.bind(this))
 					},
 					getItemTypeList() {
-						sa.ajax('/TbItemType/getList',{business:1}, 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) {
@@ -568,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;
@@ -600,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;
 						}
@@ -631,9 +736,9 @@
 							}
 						}
 						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){
+						let needIds = this.needTypeId;
+						for (let i in needIds) {
+							if (typeList.map(obj => obj.id).indexOf(needIds[i]) == -1) {
 								sa.error('缺少必选业务');
 								return false;
 							}

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

@@ -66,7 +66,7 @@
 					<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>
+								&&currentCustomerId=='1'" @click="confirmFn(s.row)">账单确认</el-button>
 						</template>
 					</el-table-column>
 				</el-table>

+ 0 - 1
sp-server/app.pid

@@ -1 +0,0 @@
-21600

+ 15 - 24
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);
@@ -79,34 +84,20 @@ public class JhService {
         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;
-    }
-
-
-
 
 }

+ 2 - 0
sp-server/src/main/java/com/pj/api/open/service/OpenService.java

@@ -86,6 +86,8 @@ 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);

+ 8 - 4
sp-server/src/main/java/com/pj/api/service/ApiService.java

@@ -165,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();
@@ -186,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);
@@ -309,9 +313,9 @@ public class ApiService {
             throw new BusinessException("数据不存在");
         }
         List<TbItem> tbItems = JSONUtil.toList(itemJson, TbItem.class);
-       tbItems.forEach(tbItem -> {
+        tbItems.forEach(tbItem -> {
 
 
-       });
+        });
     }
 }

+ 16 - 30
sp-server/src/main/java/com/pj/api/wx/service/WxService.java

@@ -83,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");
@@ -100,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);
@@ -130,34 +131,7 @@ public class WxService {
         throw new Exception("支付信息有误");
     }
 
-    public Map<String, String> getPayInit(HttpServletRequest request) throws Exception {
-        String money = request.getParameter("money");
-        String openid = request.getParameter("openid");
-        String businessId = request.getParameter("b");
-        String c = request.getParameter("c");
-        String a = request.getParameter("a");
-        Attach atchMap = new Attach();
-        atchMap.setC(c).setB(businessId).setA(a);
-        String out_trade_no = RandomUtil.randomString(32);
-        Map<String, String> params = new HashMap<>();
-        params.put("productType", "10000301");
-        params.put("businessMerchantNo", "PRO88882021122310003030");
-        params.put("openId", openid);
-        params.put("merchantNo", "PRO88882021122310003030");
-        params.put("tradeType", "GAS_PAY");
-        params.put("subTradeType", "");
-        params.put("orderPrice", NumberUtil.div(money, "1", 2) + "");
-        params.put("outTradeNo", out_trade_no);
-        params.put("productName", "场站费用");
-        params.put("orderIp", getIpAddress(request));
-        params.put("orderTime", LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyyMMddHHmmss")));
-        params.put("returnUrl", "");
-        params.put("notifyUrl", myConfig.getDomain() + "/wx/notify");
-        params.put("remark", "");
-        String sign = wxUtils.sign(params, "f0b9d6ea704d4c03a6b44be50d055025");
-        params.put("sign", sign);
-        return params;
-    }
+
 
     public Map<String, String> getPayParams(String openid, String prePayId) {
         Map<String, String> signMap = new HashMap<>(10);
@@ -171,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");

+ 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;
 
 }

+ 0 - 1
sp-server/src/main/java/com/pj/project/tb_business/TbBusinessService.java

@@ -517,7 +517,6 @@ 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);
     }
 

+ 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();

+ 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;
 
 	/**
 	 * 发货人 

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

@@ -82,3 +82,4 @@ jh-config:
     merchant-no: PRO88882021122310003030
     trade-type: GAS_PAY
     pay-secret: f0b9d6ea704d4c03a6b44be50d055025
+    server-url: http://116.252.74.15:8081