gjy 3 年之前
父节点
当前提交
df4b48a725
共有 56 个文件被更改,包括 5108 次插入4062 次删除
  1. 46 25
      common/helper.js
  2. 3 2
      config/index.js
  3. 2 2
      manifest.json
  4. 113 95
      pageA/product/buydetails.vue
  5. 32 17
      pageA/product/detail.vue
  6. 29 15
      pageA/product/detail_buy.vue
  7. 113 95
      pageA/product/saledetails.vue
  8. 178 147
      pageA/product/sales_detail.vue
  9. 49 37
      pageB/contract/collectLook.vue
  10. 43 37
      pageB/contract/contract.vue
  11. 84 59
      pageB/contract/look.vue
  12. 727 706
      pageB/trust/trust.vue
  13. 260 218
      pages/bill/index.vue
  14. 31 16
      pages/erp/contactCustomerService/contactCustomerService.vue
  15. 1 3
      pages/erp/deliveryfeedback/details.vue
  16. 29 19
      pages/erp/demo.vue
  17. 61 34
      pages/erp/exWarehousing/exWarehousing.vue
  18. 1 0
      pages/erp/exWarehousing/selectContractNo.vue
  19. 1 1
      pages/erp/improvedExWaehousing/improvedExWaehousingDetail.vue
  20. 1 1
      pages/erp/improvedWrehousing/improvedWrehousingDetail.vue
  21. 54 38
      pages/erp/index.vue
  22. 26 15
      pages/erp/openService/openService.vue
  23. 1 4
      pages/erp/receivingfeedback/details.vue
  24. 1 1
      pages/erp/warehousing/warehousing.vue
  25. 29 15
      pages/erpbusiness/QRCode/QRCode.vue
  26. 29 15
      pages/erpbusiness/acquisitionInspection/acquisitionInspection.vue
  27. 67 57
      pages/erpbusiness/acquisitionInspection/grossWeightDetail1.vue
  28. 72 52
      pages/erpbusiness/acquisitionInspection/warehouseWeighing.vue
  29. 266 251
      pages/erpbusiness/add_quality_testing.vue
  30. 52 46
      pages/erpbusiness/edit_quality_testing.vue
  31. 148 126
      pages/erpbusiness/examine_quality_testing.vue
  32. 30 16
      pages/erpbusiness/index.vue
  33. 148 132
      pages/erpbusiness/out_quality_testing.vue
  34. 291 244
      pages/erpbusiness/quality_testing.vue
  35. 103 76
      pages/grain_pulse/dynamic.vue
  36. 106 87
      pages/grain_pulse/home.vue
  37. 34 20
      pages/home/home.vue
  38. 98 75
      pages/task/audit/Issueandreceipt_task_approval.vue
  39. 47 28
      pages/task/audit/acquisition_settlement_approval.vue
  40. 1 3
      pages/task/audit/acquisition_settlement_details.vue
  41. 35 11
      pages/task/audit/freight_setting_approval.vue
  42. 130 98
      pages/task/audit/freight_settlement_approval.vue
  43. 71 57
      pages/task/audit/freight_settlement_details.vue
  44. 125 99
      pages/task/audit/purchase_settlement_approval.vue
  45. 52 24
      pages/task/audit/purchasecontract.vue
  46. 110 33
      pages/task/audit/salecontract.vue
  47. 79 44
      pages/task/audit/warehouse_approval.vue
  48. 185 61
      pages/task/my_task.vue
  49. 94 81
      pages/tran/car_detail.vue
  50. 331 305
      pages/tran/my_tran.vue
  51. 164 145
      pages/tran/tran_detail.vue
  52. 29 16
      pages/user/depotMonitoring.vue
  53. 10 3
      pages/user/setUp.vue
  54. 164 140
      pages/user/task_detail_kn.vue
  55. 121 115
      pages/user/user.vue
  56. 1 0
      store/index.js

+ 46 - 25
common/helper.js

@@ -1,52 +1,73 @@
 import * as config from '../config'
 const selectContractNo = {}
 const detailData = {}
-const erpWarehouse={}
+const erpWarehouse = {}
 const rolesList = []
-const now = Date.now || function () {  
-    return new Date().getTime();  
-};  
-const isArray = Array.isArray || function (obj) {  
-    return obj instanceof Array;  
-};  
-const getListByUserId = function(){
+const now = Date.now || function() {
+	return new Date().getTime();
+};
+const isArray = Array.isArray || function(obj) {
+	return obj instanceof Array;
+};
+const getListByUserId = function() {
 	let baseUrlNew = config.def().baseUrlNew
 	var userInfo = uni.getStorageSync("userInfo")
 	uni.request({
-	    url: baseUrlNew + '/roleMenu/query/getListByUserId',
-	    data: {
-	    	userId: userInfo.id
-	    },
+		url: baseUrlNew + '/roleMenu/query/getListByUserId',
+		data: {
+			userId: userInfo.id
+		},
 		method: 'GET',
-	    success: (res) => {			
-	    	if (res.statusCode === 200) {
+		success: (res) => {
+			if (res.statusCode === 200) {
 				uni.setStorageSync("jurisdiction", res.data.data)
 				let list = getUserAllRoles(res.data.data);
 				uni.setStorageSync("rolesList", list)
-				
-	    	}
-	    }
+
+			}
+		}
 	})
 }
 const getUserAllRoles = (item) => {
 	console.log(item)
-	
-	for(let i = 0;i<item.length;i++){
+
+	for (let i = 0; i < item.length; i++) {
 		rolesList.push(item[i].name)
 		// console.log('用户权限',rolesList)
-		if(item[i].children&&item[i].children.length>0){
+		if (item[i].children && item[i].children.length > 0) {
 			getUserAllRoles(item[i].children)
 		}
 	}
 	return rolesList;
 }
+const setAudit = (item) => {
+	let _list = uni.getStorageSync("copyTaskInfo")
+	let _isShowbtn =true
+	if(_list.length==0){
+		_isShowbtn = false
+	}
+	for (let i = 0; i < _list.length; i++) {
+		if (_list[i].businessId == item.id) {
+			_list.splice(i, 1)
+			uni.setStorageSync("copyTaskInfo",_list)
+		} 
+	}
+	if(_list.length > 0) {
+		uni.navigateTo({
+			url: _list[0].itemUrl+'&isShowbtn='+_isShowbtn,
+		})
+	}
+	console.log(item)
+}
 
 
-export default {  
+
+export default {
 	detailData,
 	selectContractNo,
-    now,  
-    isArray,
+	now,
+	isArray,
 	erpWarehouse,
-	getListByUserId
-}
+	getListByUserId,
+	setAudit
+}

+ 3 - 2
config/index.js

@@ -1,8 +1,9 @@
 const dev = {
 	baseUrl: 'https://www.zthymaoyi.com',
 	// baseUrlNew: 'http://api1.eliangeyun.com/',
-	// baseUrlNew: 'http://192.168.1.117:8090/',
-	baseUrlNew: 'http://192.168.1.122:9100/',
+	baseUrlNew: 'http://192.168.1.117:8090/',
+	// baseUrlNew: 'http://192.168.1.122:9100/',
+	// baseUrlNew: 'http://api1.eliangeyun.com/',
 	h5Appid: 'wxb66b599f7f61b46f',
 	debug: false
 }

+ 2 - 2
manifest.json

@@ -2,8 +2,8 @@
     "name" : "易粮易运",
     "appid" : "__UNI__7297DA2",
     "description" : "易粮易运——为天下粮食人服务的App",
-    "versionName" : "1.1.23",
-    "versionCode" : 1123,
+    "versionName" : "1.1.25",
+    "versionCode" : 1125,
     "transformPx" : false,
     /* SDK配置 */
     "quickapp" : {},

文件差异内容过多而无法显示
+ 113 - 95
pageA/product/buydetails.vue


+ 32 - 17
pageA/product/detail.vue

@@ -5,7 +5,6 @@
 			<view class="back-btn cuIcon-back" @click="navBack"></view>
 			<view class='title1'>采购详情</view>
 		</view>
-
 		<image style='width:100%;' src='../../static/img/jiaoyi/bg@3x.png'></image>
 		<view class="introduce-section">
 			<view style='height:70px;'>
@@ -220,12 +219,16 @@
 				<u-button class="talk-online" @click="contactUs">立即沟通</u-button>
 				<u-button @click="salegrain" v-if="goods.pcFlag == 1" type="primary"
 					class="action-btn no-border add-cart-btn">立即卖粮</u-button>
-				<u-button v-else type="primary" class="action-btn no-border add-cart-btn" @click="tradeNow">立即发车</u-button>
+				<u-button v-else type="primary" class="action-btn no-border add-cart-btn" @click="tradeNow">立即发车
+				</u-button>
 			</view>
 		</view>
 		<u-modal v-model="isShowAlert" :title-style="{fontSize: '18px',fontWeight:'500'}"
 			:content-style="{fontSize: '14px',fontWeight:'400'}" confirm-color='#22C572' confirm-text='去认证' title='温馨提示'
 			showCancelButton='false' :content="content" @confirm="goOpenService" @cancel="cancelClick"></u-modal>
+		<u-modal v-model="isShowAlert1" :title-style="{fontSize: '18px',fontWeight:'500'}"
+			:content-style="{fontSize: '14px',fontWeight:'400'}" confirm-color='#22C572' confirm-text='确定' title='登录提示'
+			showCancelButton='false' :content="content1" @confirm="alertBtn1" @cancel="cancelClick1"></u-modal>
 	</view>
 </template>
 
@@ -240,6 +243,8 @@
 		},
 		data() {
 			return {
+				isShowAlert1: false,
+				content1: '您尚未登录,是否立即登录?',
 				content: '您还未认证粮商身份,下单前请先完善您的身份信息。',
 				isShowAlert: false,
 				swiperCurrent: 0,
@@ -308,6 +313,14 @@
 			...mapState(['hasLogin', 'userInfo'])
 		},
 		methods: {
+			alertBtn1() {
+				uni.navigateTo({
+					url: '/pages/public/login'
+				})
+			},
+			cancelClick1() {
+				this.isShowAlert = false
+			},
 			cancelClick() {
 				this.isShowAlert = false
 			},
@@ -408,21 +421,22 @@
 				// 			})
 				// var that=this
 				if (!this.hasLogin) {
-					uni.showModal({
-						title: '登录提示',
-						content: '您尚未登录,是否立即登录?',
-						showCancel: true,
-						confirmText: '登录',
-						success: (e) => {
-							if (e.confirm) {
-								uni.navigateTo({
-									url: '/pages/public/login'
-								})
-							}
-						},
-						fail: () => {},
-						complete: () => {}
-					})
+					this.isShowAlert1 = true;
+					// uni.showModal({
+					// 	title: '登录提示',
+					// 	content: '您尚未登录,是否立即登录?',
+					// 	showCancel: true,
+					// 	confirmText: '登录',
+					// 	success: (e) => {
+					// 		if (e.confirm) {
+					// 			uni.navigateTo({
+					// 				url: '/pages/public/login'
+					// 			})
+					// 		}
+					// 	},
+					// 	fail: () => {},
+					// 	complete: () => {}
+					// })
 				} else {
 					this.$api.doRequest('get', '/identityAuthenticationInfo/getInfo', {
 						commonId: this.userInfo.id
@@ -1277,6 +1291,7 @@
 		border: 1px solid #B7B9C3 !important;
 		padding: 0 34rpx;
 	}
+
 	.u-hairline-border:after {
 		border: none;
 	}

+ 29 - 15
pageA/product/detail_buy.vue

@@ -156,6 +156,9 @@
 				<button v-else type="primary" class=" action-btn no-border add-cart-btn" >交易结束</button>
 			</view>
 		</view>
+		<u-modal v-model="isShowAlert" :title-style="{fontSize: '18px',fontWeight:'500'}"
+					:content-style="{fontSize: '14px',fontWeight:'400'}" confirm-color='#22C572' confirm-text='确定' title='登录提示'
+					showCancelButton='false' :content="content" @confirm="alertBtn" @cancel="cancelClick"></u-modal>
 	</view>
 </template>
 
@@ -170,6 +173,8 @@
 		},
 		data() {
 			return {
+				isShowAlert: false,
+							content: '您尚未登录,是否立即登录?',
 				goods: {
 				},
 				share:{
@@ -205,6 +210,14 @@
 			...mapState(['hasLogin','userInfo'])
 		},
 		methods: {
+			alertBtn() {
+							uni.navigateTo({
+								url: '/pages/public/login'
+							})
+						},
+						cancelClick() {
+							this.isShowAlert = false
+						},
 			contactUs() {
 				const that = this
 				uni.makePhoneCall({
@@ -227,21 +240,22 @@
 			},
 			tradeNow(){
 				if (!this.hasLogin) {
-					uni.showModal({
-						title: '登录提示',
-						content: '您尚未登录,是否立即登录?',
-						showCancel: true,
-						confirmText: '登录',
-						success: (e) => {
-							if (e.confirm) {
-								uni.navigateTo({
-									url: '/pages/public/login'
-								})
-							}
-						},
-						fail: () => {},
-						complete: () => {}
-					})
+					// uni.showModal({
+					// 	title: '登录提示',
+					// 	content: '您尚未登录,是否立即登录?',
+					// 	showCancel: true,
+					// 	confirmText: '登录',
+					// 	success: (e) => {
+					// 		if (e.confirm) {
+					// 			uni.navigateTo({
+					// 				url: '/pages/public/login'
+					// 			})
+					// 		}
+					// 	},
+					// 	fail: () => {},
+					// 	complete: () => {}
+					// })
+					this.isShowAlert = true;
 				}
 				else{
 					const that = this

文件差异内容过多而无法显示
+ 113 - 95
pageA/product/saledetails.vue


文件差异内容过多而无法显示
+ 178 - 147
pageA/product/sales_detail.vue


+ 49 - 37
pageB/contract/collectLook.vue

@@ -38,18 +38,19 @@
 				</view>
 				<view class="c-row" v-bind:class="item.confirmFlag == 1 ? 'b-b' : ''">
 					<text class="tit">净重(吨)</text>
-					<view style="font-size: 18px;margin-left: 80px;">{{item.loadNetWeight}}<text class="hair">发</text></view>
+					<view style="font-size: 18px;margin-left: 80px;">{{item.loadNetWeight}}<text class="hair">发</text>
+					</view>
 					<view class="con-list">
 						<view v-if="item.confirmFlag == 1" style="color: #FE6430;">未收货</view>
 						<view v-if="item.confirmFlag == 3" style="color: #22C572;">已收货</view>
 					</view>
 				</view>
-				<view v-if="item.confirmFlag == 1" >
+				<view v-if="item.confirmFlag == 1">
 					<view class="titles">磅单照片</view>
-					<upload class="upload" ref="upload" :action="action"  :max-count="1"
-						:size-type="['compressed']" @on-success="getImgUrl" @on-remove="onRemove"
-						@on-uploaded="isAdd = true" :before-upload="filterFileType"
-						v-if="item.loadPoundImg == null || item.loadPoundImg == '' "></upload>
+					<upload class="upload" ref="upload" :action="action" :max-count="1" :size-type="['compressed']"
+						@on-success="getImgUrl" @on-remove="onRemove" @on-uploaded="isAdd = true"
+						:before-upload="filterFileType" v-if="item.loadPoundImg == null || item.loadPoundImg == '' ">
+					</upload>
 					<image :src="item.loadPoundImg" mode="" v-if="item.loadPoundImg != null || item.loadPoundImg != ''"
 						class="picture "></image>
 				</view>
@@ -67,9 +68,10 @@
 				<image v-if='img' style='width:100px;height:100px;' :src='img'></image>
 				<button style='' @click='imgstatus=false'>取消</button>
 			</view>
-
 		</view>
-
+		<u-modal v-model="isShowAlert" :title-style="{fontSize: '18px',fontWeight:'500'}"
+			:content-style="{fontSize: '14px',fontWeight:'400'}" confirm-color='#22C572' confirm-text='确定' title='登录提示'
+			showCancelButton='false' :content="content" @confirm="alertBtn" @cancel="cancelClick"></u-modal>
 
 	</view>
 </template>
@@ -85,6 +87,8 @@
 		},
 		data() {
 			return {
+				isShowAlert: false,
+				content: '您尚未登录,是否立即登录?',
 				carlist: [],
 				swiperCurrent: 0,
 				titleNViewBackground: '',
@@ -118,7 +122,7 @@
 		//下拉刷新
 		onPullDownRefresh() {
 			this.loaddata()
-			setTimeout(function () {
+			setTimeout(function() {
 				uni.stopPullDownRefresh();
 			}, 1000);
 		},
@@ -142,10 +146,10 @@
 			collect() {
 				var num = 0
 				for (var i = 0; i < this.carlist.length; i++) {
-					if( this.carlist[i].confirmFlag == 3){
+					if (this.carlist[i].confirmFlag == 3) {
 						num += this.carlist[i].loadNetWeight
 					}
-					
+
 				}
 				return num
 			}
@@ -188,14 +192,13 @@
 						}
 					})
 					.catch(res => {
-						if(res.errmsg){
+						if (res.errmsg) {
 							uni.showToast({
 								title: res.errmsg,
 								icon: 'none',
 								duration: 2000
 							})
-						}
-						else{
+						} else {
 							uni.showToast({
 								title: "系统异常,请联系管理员",
 								icon: 'none',
@@ -213,14 +216,13 @@
 						}
 					})
 					.catch(res => {
-						if(res.errmsg){
+						if (res.errmsg) {
 							uni.showToast({
 								title: res.errmsg,
 								icon: 'none',
 								duration: 2000
 							})
-						}
-						else{
+						} else {
 							uni.showToast({
 								title: "系统异常,请联系管理员",
 								icon: 'none',
@@ -254,14 +256,13 @@
 					id: that.goods.id,
 					reason: that.reason
 				}, failres => {
-					if(failres.errmsg){
+					if (failres.errmsg) {
 						uni.showToast({
 							title: failres.errmsg,
 							icon: 'none',
 							duration: 2000
 						})
-					}
-					else{
+					} else {
 						uni.showToast({
 							title: "系统异常,请联系管理员",
 							icon: 'none',
@@ -278,23 +279,32 @@
 
 				})
 			},
+			alertBtn() {
+				uni.navigateTo({
+					url: '/pages/public/login'
+				})
+			},
+			cancelClick() {
+				this.isShowAlert = false
+			},
 			tradeNow() {
 				if (!this.hasLogin) {
-					uni.showModal({
-						title: '登录提示',
-						content: '您尚未登录,是否立即登录?',
-						showCancel: true,
-						confirmText: '登录',
-						success: (e) => {
-							if (e.confirm) {
-								uni.navigateTo({
-									url: '/pages/public/login'
-								})
-							}
-						},
-						fail: () => {},
-						complete: () => {}
-					})
+					this.isShowAlert = true;
+					// uni.showModal({
+					// 	title: '登录提示',
+					// 	content: '您尚未登录,是否立即登录?',
+					// 	showCancel: true,
+					// 	confirmText: '登录',
+					// 	success: (e) => {
+					// 		if (e.confirm) {
+					// 			uni.navigateTo({
+					// 				url: '/pages/public/login'
+					// 			})
+					// 		}
+					// 	},
+					// 	fail: () => {},
+					// 	complete: () => {}
+					// })
 				} else {
 					const that = this
 					uni.navigateTo({
@@ -440,6 +450,7 @@
 			color: $uni-color-primary;
 		}
 	}
+
 	/* 评价 */
 	.eva-section {
 		display: flex;
@@ -987,7 +998,7 @@
 		margin-left: 16px;
 	}
 
-	.commit {	
+	.commit {
 		width: 85px;
 		height: 35px;
 		border-radius: 16px;
@@ -996,7 +1007,8 @@
 		line-height: 33px;
 		color: #22C572;
 	}
-	.titles{
+
+	.titles {
 		margin: 10px 0 10px 16px;
 		font-size: 15px;
 	}

+ 43 - 37
pageB/contract/contract.vue

@@ -15,7 +15,6 @@
 					<text class="status status1" v-if="item.status == '审核中'">{{item.status}}</text>
 					<text class="status status1" v-if="item.status == '执行中'">{{item.status}}</text> -->
 					<text class="status status1">{{item.status}}</text>
-
 				</view>
 			</view>
 			<view>
@@ -38,7 +37,7 @@
 					v-if="item.procurementPlanType == '期货' && (item.status == '已成交' || item.status == '已挂单')"> 点价</text>
 				<text class="anniu1" @click="commit1(item)" v-if="item.orderType == '采购'&&item.status!='待审核'"> 发货</text>
 
-			<!-- 	<text class="anniu" @click="commit"> 附件</text>
+				<!-- 	<text class="anniu" @click="commit"> 附件</text>
 				<text class="anniu" @click="someprice(item)" v-if="item.procurementPlanType == '期货' && (item.status == '已成交' || item.status == '已挂单')"> 点价</text>
 				<text class="anniu1" @click="commit1(item)" v-if="item.orderType == '采购'&&item.status != '待审核'"> 发货</text> -->
 
@@ -72,6 +71,9 @@
 		<view class="padding flex flex-direction">
 			<!-- <button class="cu-btn commit margin-tb-sm lg" @click="commit">提交</button> -->
 		</view>
+		<u-modal v-model="isShowAlert" :title-style="{fontSize: '18px',fontWeight:'500'}"
+			:content-style="{fontSize: '14px',fontWeight:'400'}" confirm-color='#22C572' confirm-text='确定' title='登录提示'
+			showCancelButton='false' :content="content" @confirm="alertBtn" @cancel="cancelClick"></u-modal>
 		<!-- </block> -->
 	</view>
 </template>
@@ -85,6 +87,8 @@
 		name: "trust",
 		data() {
 			return {
+				isShowAlert: false,
+				content: '您尚未登录,是否立即登录?',
 				lists: [],
 				shadestatus: false,
 				pricestatus: false,
@@ -175,7 +179,7 @@
 		},
 		onPullDownRefresh() {
 			this.getList()
-			setTimeout(function () {
+			setTimeout(function() {
 				uni.stopPullDownRefresh();
 			}, 1000);
 		},
@@ -196,14 +200,13 @@
 						}
 					})
 					.catch(res => {
-						if(res.errmsg){
+						if (res.errmsg) {
 							uni.showToast({
 								title: res.errmsg,
 								icon: 'none',
 								duration: 2000
 							})
-						}
-						else{
+						} else {
 							uni.showToast({
 								title: "系统异常,请联系管理员",
 								icon: 'none',
@@ -274,14 +277,13 @@
 						}
 					})
 					.catch(res => {
-						if(res.errmsg){
+						if (res.errmsg) {
 							uni.showToast({
 								title: res.errmsg,
 								icon: 'none',
 								duration: 2000
 							})
-						}
-						else{
+						} else {
 							uni.showToast({
 								title: "系统异常,请联系管理员",
 								icon: 'none',
@@ -346,24 +348,32 @@
 			// 		}
 			// 	})
 			// },
-
+			alertBtn() {
+				uni.navigateTo({
+					url: '/pages/public/login'
+				})
+			},
+			cancelClick() {
+				this.isShowAlert = false
+			},
 			commit11() {
 				if (this.hasLogin) {
-					uni.showModal({
-						title: '登录提示',
-						content: '您尚未登录,是否立即登录?',
-						showCancel: true,
-						confirmText: '登录',
-						success: (e) => {
-							if (e.confirm) {
-								uni.navigateTo({
-									url: '/pagesB/contract/look'
-								})
-							}
-						},
-						fail: () => {},
-						complete: () => {}
-					})
+					this.isShowAlert = true;
+					// 	uni.showModal({
+					// 		title: '登录提示',
+					// 		content: '您尚未登录,是否立即登录?',
+					// 		showCancel: true,
+					// 		confirmText: '登录',
+					// 		success: (e) => {
+					// 			if (e.confirm) {
+					// 				uni.navigateTo({
+					// 					url: '/pagesB/contract/look'
+					// 				})
+					// 			}
+					// 		},
+					// 		fail: () => {},
+					// 		complete: () => {}
+					// 	})
 				} else {
 					const that = this
 					if (this.TabCur == 0) {
@@ -589,14 +599,13 @@
 												that.$api.request('sale', 'addSale', that.saleInfo,
 													failres => {
 														uni.hideLoading()
-														if(failres.errmsg){
+														if (failres.errmsg) {
 															uni.showToast({
 																title: failres.errmsg,
 																icon: 'none',
 																duration: 2000
 															})
-														}
-														else{
+														} else {
 															uni.showToast({
 																title: "系统异常,请联系管理员",
 																icon: 'none',
@@ -621,14 +630,13 @@
 												that.$api.request('sale', 'addBuy', that.saleInfo,
 													failres => {
 														uni.hideLoading()
-														if(failres.errmsg){
+														if (failres.errmsg) {
 															uni.showToast({
 																title: failres.errmsg,
 																icon: 'none',
 																duration: 2000
 															})
-														}
-														else{
+														} else {
 															uni.showToast({
 																title: "系统异常,请联系管理员",
 																icon: 'none',
@@ -653,14 +661,13 @@
 												that.$api.request('tran', 'addTran', that.tran,
 													failres => {
 														uni.hideLoading()
-														if(failres.errmsg){
+														if (failres.errmsg) {
 															uni.showToast({
 																title: failres.errmsg,
 																icon: 'none',
 																duration: 2000
 															})
-														}
-														else{
+														} else {
 															uni.showToast({
 																title: "系统异常,请联系管理员",
 																icon: 'none',
@@ -685,14 +692,13 @@
 												that.$api.request('tran', 'addCarDriver', that.tran,
 													failres => {
 														uni.hideLoading()
-														if(failres.errmsg){
+														if (failres.errmsg) {
 															uni.showToast({
 																title: failres.errmsg,
 																icon: 'none',
 																duration: 2000
 															})
-														}
-														else{
+														} else {
 															uni.showToast({
 																title: "系统异常,请联系管理员",
 																icon: 'none',

+ 84 - 59
pageB/contract/look.vue

@@ -1,5 +1,5 @@
 <template>
-	<view class="center">	
+	<view class="center">
 		<view class="c-list">
 			<view class="xinxiup">
 				<view class="c-row b-b">
@@ -55,20 +55,23 @@
 						<text>{{item.deductionItems}}</text>
 					</view>
 				</view>
-				<view  v-if='item.loadPoundImg'>
+				<view v-if='item.loadPoundImg'>
 					<view class="poundtitle">发货磅单</view>
 					<view class="poundlists">
-						<image :src="item.loadPoundImg" mode="" @click="ViewImage(item.loadPoundImg)" class="poundlist"></image>
+						<image :src="item.loadPoundImg" mode="" @click="ViewImage(item.loadPoundImg)" class="poundlist">
+						</image>
 					</view>
 				</view>
-				<view  v-if='item.unloadPoundImg'>
+				<view v-if='item.unloadPoundImg'>
 					<view class="poundtitle">收货磅单</view>
 					<view class="poundlists">
-						<image :src="item.unloadPoundImg" mode="" @click="ViewImage(item.unloadPoundImg)" class="poundlist"></image>
+						<image :src="item.unloadPoundImg" mode="" @click="ViewImage(item.unloadPoundImg)"
+							class="poundlist"></image>
 					</view>
 				</view>
-				<button v-if='item.confirmFlag != 3 && item.status == "已送达"' class=" btn btns unload" style="background-color: #22C572; color: #FFFFFF ;width:80%;"
-					@click="confirmunload(item)" >确认卸货</button>
+				<button v-if='item.confirmFlag != 3 && item.status == "已送达"' class=" btn btns unload"
+					style="background-color: #22C572; color: #FFFFFF ;width:80%;"
+					@click="confirmunload(item)">确认卸货</button>
 			</view>
 		</view>
 		<view class='footer'>
@@ -87,7 +90,9 @@
 			</view>
 
 		</view>
-
+		<u-modal v-model="isShowAlert" :title-style="{fontSize: '18px',fontWeight:'500'}"
+			:content-style="{fontSize: '14px',fontWeight:'400'}" confirm-color='#22C572' confirm-text='确定' title='登录提示'
+			showCancelButton='false' :content="content" @confirm="alertBtn" @cancel="cancelClick"></u-modal>
 
 	</view>
 </template>
@@ -103,6 +108,8 @@
 		},
 		data() {
 			return {
+				isShowAlert: false,
+				content: '您尚未登录,是否立即登录?',
 				carlist: [],
 				swiperCurrent: 0,
 				titleNViewBackground: '',
@@ -131,10 +138,10 @@
 				imgstatus: false,
 				reason: "",
 				price: undefined,
-				imgstatus:false,
-				reason:"",
-				price:undefined,
-				planId:'',
+				imgstatus: false,
+				reason: "",
+				price: undefined,
+				planId: '',
 			};
 		},
 		onShow() {
@@ -143,7 +150,7 @@
 		//下拉刷新
 		onPullDownRefresh() {
 			this.loaddata()
-			setTimeout(function () {
+			setTimeout(function() {
 				uni.stopPullDownRefresh();
 			}, 1000);
 		},
@@ -151,7 +158,7 @@
 			this.goods.goodsName = option.goodsName
 			this.goods.contracter = option.contracter
 			this.id = option.id
-			this.planId=option.planId
+			this.planId = option.planId
 			this.goods.contractNo = option.contractNo
 		},
 		computed: {
@@ -191,8 +198,9 @@
 				}
 				var that = this
 				uni.navigateTo({
-					url: `/pageB/contract/contract_detail?contractNo=`
-					+that.goods.contractNo+'&goodsName='+that.goods.goodsName+'&tranCarNo='+tranCarNo+'&planId='+that.planId
+					url: `/pageB/contract/contract_detail?contractNo=` +
+						that.goods.contractNo + '&goodsName=' + that.goods.goodsName + '&tranCarNo=' + tranCarNo +
+						'&planId=' + that.planId
 				})
 			},
 			confirmunload(item) {
@@ -209,14 +217,13 @@
 						}
 					})
 					.catch(res => {
-						if(res.errmsg){
+						if (res.errmsg) {
 							uni.showToast({
 								title: res.errmsg,
 								icon: 'none',
 								duration: 2000
 							})
-						}
-						else{
+						} else {
 							uni.showToast({
 								title: "系统异常,请联系管理员",
 								icon: 'none',
@@ -234,14 +241,13 @@
 						}
 					})
 					.catch(res => {
-						if(res.errmsg){
+						if (res.errmsg) {
 							uni.showToast({
 								title: res.errmsg,
 								icon: 'none',
 								duration: 2000
 							})
-						}
-						else{
+						} else {
 							uni.showToast({
 								title: "系统异常,请联系管理员",
 								icon: 'none',
@@ -254,28 +260,34 @@
 				console.log(imageUrl) // http://192.168.100.251:8970/6_1597822634094.png
 				var images = [];
 				images.push(imageUrl);
-				console.log(images)  // ["http://192.168.100.251:8970/6_1597822634094.png"]
+				console.log(images) // ["http://192.168.100.251:8970/6_1597822634094.png"]
 				uni.previewImage({ // 预览图片  图片路径必须是一个数组 => ["http://192.168.100.251:8970/6_1597822634094.png"]
-					current:0,
-					urls:images,
-					longPressActions: {  //长按保存图片到相册
+					current: 0,
+					urls: images,
+					longPressActions: { //长按保存图片到相册
 						itemList: ['保存图片'],
-						success: (data)=> {
+						success: (data) => {
 							console.log(data);
 							uni.saveImageToPhotosAlbum({ //保存图片到相册
 								filePath: payUrl,
-								success: function () {
-									uni.showToast({icon:'success',title:'保存成功'})
+								success: function() {
+									uni.showToast({
+										icon: 'success',
+										title: '保存成功'
+									})
 								},
 								fail: (err) => {
-									uni.showToast({icon:'none',title:'保存失败,请重新尝试'})
+									uni.showToast({
+										icon: 'none',
+										title: '保存失败,请重新尝试'
+									})
 								}
 							});
 						},
-						fail: (err)=> {
+						fail: (err) => {
 							console.log(err.errMsg);
 						}
-				}
+					}
 				});
 			},
 			priceInput(e) {
@@ -301,14 +313,13 @@
 					id: that.goods.id,
 					reason: that.reason
 				}, failres => {
-					if(failres.errmsg){
+					if (failres.errmsg) {
 						uni.showToast({
 							title: failres.errmsg,
 							icon: 'none',
 							duration: 2000
 						})
-					}
-					else{
+					} else {
 						uni.showToast({
 							title: "系统异常,请联系管理员",
 							icon: 'none',
@@ -325,23 +336,32 @@
 
 				})
 			},
+			alertBtn() {
+				uni.navigateTo({
+					url: '/pages/public/login'
+				})
+			},
+			cancelClick() {
+				this.isShowAlert = false
+			},
 			tradeNow() {
 				if (!this.hasLogin) {
-					uni.showModal({
-						title: '登录提示',
-						content: '您尚未登录,是否立即登录?',
-						showCancel: true,
-						confirmText: '登录',
-						success: (e) => {
-							if (e.confirm) {
-								uni.navigateTo({
-									url: '/pages/public/login'
-								})
-							}
-						},
-						fail: () => {},
-						complete: () => {}
-					})
+					this.isShowAlert = true;
+					// uni.showModal({
+					// 	title: '登录提示',
+					// 	content: '您尚未登录,是否立即登录?',
+					// 	showCancel: true,
+					// 	confirmText: '登录',
+					// 	success: (e) => {
+					// 		if (e.confirm) {
+					// 			uni.navigateTo({
+					// 				url: '/pages/public/login'
+					// 			})
+					// 		}
+					// 	},
+					// 	fail: () => {},
+					// 	complete: () => {}
+					// })
 				} else {
 					const that = this
 					uni.navigateTo({
@@ -1039,7 +1059,7 @@
 		background-color: #FFFFFF;
 		margin-top: 20px;
 		border-radius: 20px;
-		padding-bottom:20px;
+		padding-bottom: 20px;
 		/* 	padding: 5px 10px; */
 	}
 
@@ -1069,35 +1089,40 @@
 		color: #FE6430;
 		background-color: #FEECE6;
 	}
+
 	.footer {
 		position: fixed;
 		bottom: 0;
 		width: 90%;
 		padding: 20px 0;
-		z-index:4;
+		z-index: 4;
 	}
+
 	.btn {
 		width: 90%;
 		background: #22C572;
 		color: #fff;
 		border-radius: 30px;
 	}
-	.poundlist{
+
+	.poundlist {
 		width: 62px;
 		height: 85px;
 	}
-	.poundlists{
+
+	.poundlists {
 		margin-left: 14px;
 		margin-top: 10px;
-		}
-	.poundtitle{
+	}
+
+	.poundtitle {
 		font-size: 15px;
 		margin-left: 14px;
 		margin-top: 10px;
 	}
-	.unload{
-		
-	}
+
+	.unload {}
+
 	/* .addcarwrap{
 		position:fixed;bottom:0;
 		width:100%;

+ 727 - 706
pageB/trust/trust.vue

@@ -8,11 +8,13 @@
 				<view class="cu-item flex-sub" :class="1==TabCur?'text-white':''" @tap="tabSelect" data-id="1">
 					<text>我要买粮</text>
 				</view>
-				<view v-if="showTran" class="cu-item flex-sub" :class="2==TabCur?'text-white':''" @tap="tabSelect" data-id="2">
+				<view v-if="showTran" class="cu-item flex-sub" :class="2==TabCur?'text-white':''" @tap="tabSelect"
+					data-id="2">
 					<text>我要找车</text>
 				</view>
-				<view v-if="showTran" class="cu-item flex-sub" :class="3==TabCur?'text-white':''" @tap="tabSelect" data-id="3">
-				<text>我要找货</text>
+				<view v-if="showTran" class="cu-item flex-sub" :class="3==TabCur?'text-white':''" @tap="tabSelect"
+					data-id="3">
+					<text>我要找货</text>
 				</view>
 			</view>
 		</scroll-view>
@@ -27,9 +29,10 @@
 			</view>
 			<view class="cu-form-group">
 				<view class="title">验证码</view>
-				<input type="mobile" value="" placeholder="6位验证码" maxlength="6"
-					 data-key="verifyCode" @input="verifyCodeInput" style="width: 60%;"></input>
-				<button class='cu-btn bg-green shadow':disabled="sendDisabled0" @click="doGetVerify">{{sendText0}}</button>
+				<input type="mobile" value="" placeholder="6位验证码" maxlength="6" data-key="verifyCode"
+					@input="verifyCodeInput" style="width: 60%;"></input>
+				<button class='cu-btn bg-green shadow' :disabled="sendDisabled0"
+					@click="doGetVerify">{{sendText0}}</button>
 			</view>
 			<view class="cu-form-group">
 				<view class="title">货名</view>
@@ -82,9 +85,10 @@
 			</view>
 			<view class="cu-form-group">
 				<view class="title">验证码</view>
-				<input type="mobile" value="" placeholder="6位验证码" maxlength="6"
-					 data-key="verifyCode" @input="verifyCodeInput" style="width: 60%;"></input>
-				<button class='cu-btn bg-green shadow':disabled="sendDisabled1" @click="doGetVerify">{{sendText1}}</button>
+				<input type="mobile" value="" placeholder="6位验证码" maxlength="6" data-key="verifyCode"
+					@input="verifyCodeInput" style="width: 60%;"></input>
+				<button class='cu-btn bg-green shadow' :disabled="sendDisabled1"
+					@click="doGetVerify">{{sendText1}}</button>
 			</view>
 			<view class="cu-form-group">
 				<view class="title">货名</view>
@@ -153,9 +157,10 @@
 			</view>
 			<view class="cu-form-group">
 				<view class="title">验证码</view>
-				<input type="mobile" value="" placeholder="6位验证码" maxlength="6"
-					 data-key="verifyCode" @input="verifyCodeInput" style="width: 60%;"></input>
-				<button class='cu-btn bg-green shadow':disabled="sendDisabled2" @click="doGetVerify">{{sendText2}}</button>
+				<input type="mobile" value="" placeholder="6位验证码" maxlength="6" data-key="verifyCode"
+					@input="verifyCodeInput" style="width: 60%;"></input>
+				<button class='cu-btn bg-green shadow' :disabled="sendDisabled2"
+					@click="doGetVerify">{{sendText2}}</button>
 			</view>
 			<view class="cu-form-group">
 				<view class="title">收货人</view>
@@ -194,7 +199,11 @@
 				<view class="title">承运人电话</view>
 				<input placeholder="请填写" type="mobile" name="input" @input="driverPhoneInput"></input>
 			</view>
-			<view class="cu-form-group">				<view class="title">验证码</view>				<input type="mobile" value="" placeholder="6位验证码" maxlength="6"					 data-key="verifyCode" @input="verifyCodeInput" style="width: 60%;"></input>				<button class='cu-btn bg-green shadow':disabled="sendDisabled3" @click="doGetVerify">{{sendText3}}</button>			</view>
+			<view class="cu-form-group">
+				<view class="title">验证码</view> <input type="mobile" value="" placeholder="6位验证码" maxlength="6"
+					data-key="verifyCode" @input="verifyCodeInput" style="width: 60%;"></input> <button
+					class='cu-btn bg-green shadow' :disabled="sendDisabled3" @click="doGetVerify">{{sendText3}}</button>
+			</view>
 			<view class="cu-bar bg-white margin-top">
 				<view class="action">
 					司机身份证(正、反面)上传
@@ -203,13 +212,13 @@
 			<view class="cu-form-group">
 				<view class="grid col-4 grid-square flex-sub">
 					<view class="bg-img" v-if="personNoImg != ''" @tap="ViewImage" :data-url="personNoImg">
-					 <image :src="personNoImg" mode="aspectFit"></image>
+						<image :src="personNoImg" mode="aspectFit"></image>
 						<view class="cu-tag bg-red" @tap.stop="DelImg" :data-index="0">
 							<text class='cuIcon-close'></text>
 						</view>
 					</view>
 					<view class="bg-img" v-if="personNoImg1 != ''" @tap="ViewImage" :data-url="personNoImg1">
-					 <image :src="personNoImg1" mode="aspectFit"></image>
+						<image :src="personNoImg1" mode="aspectFit"></image>
 						<view class="cu-tag bg-red" @tap.stop="DelImg" :data-index="1">
 							<text class='cuIcon-close'></text>
 						</view>
@@ -227,13 +236,13 @@
 			<view class="cu-form-group">
 				<view class="grid col-4 grid-square flex-sub">
 					<view class="bg-img" v-if="driverNoImg != ''" @tap="ViewImage" :data-url="driverNoImg">
-					 <image :src="driverNoImg" mode="aspectFit"></image>
+						<image :src="driverNoImg" mode="aspectFit"></image>
 						<view class="cu-tag bg-red" @tap.stop="DelImg" :data-index="2">
 							<text class='cuIcon-close'></text>
 						</view>
 					</view>
 					<view class="bg-img" v-if="driverNoImg1 != ''" @tap="ViewImage" :data-url="driverNoImg1">
-					 <image :src="driverNoImg1" mode="aspectFit"></image>
+						<image :src="driverNoImg1" mode="aspectFit"></image>
 						<view class="cu-tag bg-red" @tap.stop="DelImg" :data-index="3">
 							<text class='cuIcon-close'></text>
 						</view>
@@ -251,13 +260,13 @@
 			<view class="cu-form-group">
 				<view class="grid col-4 grid-square flex-sub">
 					<view class="bg-img" v-if="carNoImg != ''" @tap="ViewImage" :data-url="carNoImg">
-					 <image :src="carNoImg" mode="aspectFit"></image>
+						<image :src="carNoImg" mode="aspectFit"></image>
 						<view class="cu-tag bg-red" @tap.stop="DelImg" :data-index="4">
 							<text class='cuIcon-close'></text>
 						</view>
 					</view>
 					<view class="bg-img" v-if="carNoImg1 != ''" @tap="ViewImage" :data-url="carNoImg1">
-					 <image :src="carNoImg1" mode="aspectFit"></image>
+						<image :src="carNoImg1" mode="aspectFit"></image>
 						<view class="cu-tag bg-red" @tap.stop="DelImg" :data-index="5">
 							<text class='cuIcon-close'></text>
 						</view>
@@ -270,8 +279,12 @@
 			<view class="padding flex flex-direction">
 				<button class="cu-btn commit margin-tb-sm lg" @click="commit">提交</button>
 			</view>
+			<u-modal v-model="isShowAlert" :title-style="{fontSize: '18px',fontWeight:'500'}"
+				:content-style="{fontSize: '14px',fontWeight:'400'}" confirm-color='#22C572' confirm-text='确定'
+				title='登录提示' showCancelButton='false' :content="content" @confirm="alertBtn" @cancel="cancelClick">
+			</u-modal>
 		</block>
-		
+
 	</view>
 </template>
 
@@ -281,722 +294,730 @@
 		mapState
 	} from 'vuex';
 	export default {
-			name: "trust",
-			data() {
-				return {
-					saleInfo:{
-						seller:'',
-						sellerPhone:'',
-						priceType:'',
-						unitPrice:0,
-						origin:'',
-						stock:'',
-						minSale:0,
-						exsitCount:0,
-						goodsName:'',
-						verifyCode:'',
-						buyer:'',
-						buyerPhone:'',
-						level:''
-					},
-					tran: {
-						total: 0,
-						price: 0,
-						startPlace: undefined,
-						endPlace: undefined,
-						goodsName: undefined,
-						sender:'',
-						senderPhone:'',
-						status:0,
-						receiver:'',
-						receiverPhone:'',
-						verifyCode:'',
-						driver:'',
-						driverPhone:'',
-						carNo:'',
-						personNoImg:'',
-						personNoImg1:'',
-						driverNoImg:'',
-						driverNoImg1:'',
-						carNoImg:'',
-						carNoImg1:''
-						
-					},
-					PageCur: "trust",
-					TabCur: 0,
-					priceTypeIndex:-1,
-					priceType: ['库内价', '到库价', '到港价'],
-					unitPrice:0,
-					price:'',
-					seller:'',
-					sellerPhone:'',
-					minSale:'',
-					exsitCount:0,
-					origin:'',
-					stock:'',
-					goodsName:'',
-					verifyCode:'',
-					sendText0:'获取验证码',
-					sendText1:'获取验证码',
-					sendText2:'获取验证码',
-					sendText3:'获取验证码',
-					sendDisabled0: false,
-					sendDisabled1: false,
-					sendDisabled2: false,
-					sendDisabled3: false,
-					buyer:'',
-					buyerPhone:'',
-					level:'',
-					sender:'',
-					senderPhone:'',
-					receiver:'',
-					receiverPhone:'',
-					total:0,
-					startPlace:'',
-					endPlace:'',
-					driver:'',
-					driverPhone:'',
-					carNo:'',
-					personNoImg:'',
-					personNoImg1:'',
-					driverNoImg:'',
-					driverNoImg1:'',
-					carNoImg:'',
-					carNoImg1:'',
-					showTran:true
-				};
-			},
-			computed: {
-				...mapState(['hasLogin','userInfo'])
-			},
-			onShow() {
-				this.loadData()
-			},
-			methods: {
-				async loadData(){
-					if (!this.hasLogin) {
-						uni.showModal({
-							title: '登录提示',
-							content: '您尚未登录,是否立即登录?',
-							showCancel: true,
-							confirmText: '登录',
-							success: (e) => {
-								if (e.confirm) {
-									uni.navigateTo({
-										url: '/pages/public/login'
-									})
-								}
-							},
-							fail: () => {},
-							complete: () => {}
-						})
-					}
-				},
-				driverInput(e) {
-					this.driver = e.detail.value
-				},
-				driverPhoneInput(e) {
-					this.driverPhone = e.detail.value
-				},
-				carNoInput(e) {
-					this.carNo = e.detail.value
-				},
-				senderInput(e){
-					this.sender = e.detail.value;
-				},
-				senderPhoneInput(e){
-					this.senderPhone = e.detail.value;
-				},
-				receiverInput(e){
-					this.receiver = e.detail.value;
-				},
-				receiverPhoneInput(e){
-					this.receiverPhone = e.detail.value;
-				},
-				startPlaceInput(e){
-					this.startPlace = e.detail.value;
-				},
-				endPlaceInput(e){
-					this.endPlace = e.detail.value;
-				},
-				totalInput(e){
-					this.total = e.detail.value;
-				},
-				priceInput(e){
-					this.price = e.detail.value;
-				},
-				tabSelect(e) {
-					this.TabCur = e.currentTarget.dataset.id;
-				},
-				PriceTypeChange(e) {
-					this.priceTypeIndex = e.detail.value
-					this.price = this.priceType[this.priceTypeIndex]
-				},
-				RegionChange(e) {
-					this.region = e.detail.value
-					this.province = this.region[0];
-					this.area = this.region[0]+this.region[1]+this.region[2];
-				},
-				sellerInput(e){
-					this.seller = e.detail.value
-				},
-				sellerPhoneInput(e){
-					this.sellerPhone = e.detail.value
-				},
-				buyerInput(e){
-					this.buyer = e.detail.value
-				},
-				buyerPhoneInput(e){
-					this.buyerPhone = e.detail.value
-				},
-				unitPriceInput(e){
-					this.unitPrice = e.detail.value
-				},
-				minSaleInput(e){
-					this.minSale = e.detail.value
-				},
-				exsitCountInput(e){
-					this.exsitCount = e.detail.value
-				},
-				originInput(e){
-					this.origin = e.detail.value
-				},
-				stockInput(e){
-					this.stock = e.detail.value
-				},
-				goodsNameInput(e){
-					this.goodsName = e.detail.value
-				},
-				verifyCodeInput(e){
-					this.verifyCode = e.detail.value
-				},
-				levelInput(e){
-					this.level = e.detail.value
+		name: "trust",
+		data() {
+			return {
+				isShowAlert: false,
+				content: '您尚未登录,是否立即登录?',
+				saleInfo: {
+					seller: '',
+					sellerPhone: '',
+					priceType: '',
+					unitPrice: 0,
+					origin: '',
+					stock: '',
+					minSale: 0,
+					exsitCount: 0,
+					goodsName: '',
+					verifyCode: '',
+					buyer: '',
+					buyerPhone: '',
+					level: ''
+				},
+				tran: {
+					total: 0,
+					price: 0,
+					startPlace: undefined,
+					endPlace: undefined,
+					goodsName: undefined,
+					sender: '',
+					senderPhone: '',
+					status: 0,
+					receiver: '',
+					receiverPhone: '',
+					verifyCode: '',
+					driver: '',
+					driverPhone: '',
+					carNo: '',
+					personNoImg: '',
+					personNoImg1: '',
+					driverNoImg: '',
+					driverNoImg1: '',
+					carNoImg: '',
+					carNoImg1: ''
+
 				},
-				doGetVerify() {
-					const that = this
-					var phone = "";
-					if(this.TabCur == 0){
-						phone = that.sellerPhone
-					}else if(this.TabCur == 1){
-						phone = that.buyerPhone
-					}
-					else if(this.TabCur == 2){
-						phone = that.senderPhone
-					}
-					else if(this.TabCur == 3){
-						phone = that.driverPhone
-					}
-					if (!phone || phone.length != 11) {
-						uni.showToast({
-							title:'请输入正确手机号!',
-							icon:'none'
-						})
-						return
+				PageCur: "trust",
+				TabCur: 0,
+				priceTypeIndex: -1,
+				priceType: ['库内价', '到库价', '到港价'],
+				unitPrice: 0,
+				price: '',
+				seller: '',
+				sellerPhone: '',
+				minSale: '',
+				exsitCount: 0,
+				origin: '',
+				stock: '',
+				goodsName: '',
+				verifyCode: '',
+				sendText0: '获取验证码',
+				sendText1: '获取验证码',
+				sendText2: '获取验证码',
+				sendText3: '获取验证码',
+				sendDisabled0: false,
+				sendDisabled1: false,
+				sendDisabled2: false,
+				sendDisabled3: false,
+				buyer: '',
+				buyerPhone: '',
+				level: '',
+				sender: '',
+				senderPhone: '',
+				receiver: '',
+				receiverPhone: '',
+				total: 0,
+				startPlace: '',
+				endPlace: '',
+				driver: '',
+				driverPhone: '',
+				carNo: '',
+				personNoImg: '',
+				personNoImg1: '',
+				driverNoImg: '',
+				driverNoImg1: '',
+				carNoImg: '',
+				carNoImg1: '',
+				showTran: true
+			};
+		},
+		computed: {
+			...mapState(['hasLogin', 'userInfo'])
+		},
+		onShow() {
+			this.loadData()
+		},
+		methods: {
+			alertBtn() {
+				uni.navigateTo({
+					url: '/pages/public/login'
+				})
+			},
+			cancelClick() {
+				this.isShowAlert = false
+			},
+			async loadData() {
+				if (!this.hasLogin) {
+					this.isShowAlert = true;
+					// uni.showModal({
+					// 	title: '登录提示',
+					// 	content: '您尚未登录,是否立即登录?',
+					// 	showCancel: true,
+					// 	confirmText: '登录',
+					// 	success: (e) => {
+					// 		if (e.confirm) {
+					// 			uni.navigateTo({
+					// 				url: '/pages/public/login'
+					// 			})
+					// 		}
+					// 	},
+					// 	fail: () => {},
+					// 	complete: () => {}
+					// })
+				}
+			},
+			driverInput(e) {
+				this.driver = e.detail.value
+			},
+			driverPhoneInput(e) {
+				this.driverPhone = e.detail.value
+			},
+			carNoInput(e) {
+				this.carNo = e.detail.value
+			},
+			senderInput(e) {
+				this.sender = e.detail.value;
+			},
+			senderPhoneInput(e) {
+				this.senderPhone = e.detail.value;
+			},
+			receiverInput(e) {
+				this.receiver = e.detail.value;
+			},
+			receiverPhoneInput(e) {
+				this.receiverPhone = e.detail.value;
+			},
+			startPlaceInput(e) {
+				this.startPlace = e.detail.value;
+			},
+			endPlaceInput(e) {
+				this.endPlace = e.detail.value;
+			},
+			totalInput(e) {
+				this.total = e.detail.value;
+			},
+			priceInput(e) {
+				this.price = e.detail.value;
+			},
+			tabSelect(e) {
+				this.TabCur = e.currentTarget.dataset.id;
+			},
+			PriceTypeChange(e) {
+				this.priceTypeIndex = e.detail.value
+				this.price = this.priceType[this.priceTypeIndex]
+			},
+			RegionChange(e) {
+				this.region = e.detail.value
+				this.province = this.region[0];
+				this.area = this.region[0] + this.region[1] + this.region[2];
+			},
+			sellerInput(e) {
+				this.seller = e.detail.value
+			},
+			sellerPhoneInput(e) {
+				this.sellerPhone = e.detail.value
+			},
+			buyerInput(e) {
+				this.buyer = e.detail.value
+			},
+			buyerPhoneInput(e) {
+				this.buyerPhone = e.detail.value
+			},
+			unitPriceInput(e) {
+				this.unitPrice = e.detail.value
+			},
+			minSaleInput(e) {
+				this.minSale = e.detail.value
+			},
+			exsitCountInput(e) {
+				this.exsitCount = e.detail.value
+			},
+			originInput(e) {
+				this.origin = e.detail.value
+			},
+			stockInput(e) {
+				this.stock = e.detail.value
+			},
+			goodsNameInput(e) {
+				this.goodsName = e.detail.value
+			},
+			verifyCodeInput(e) {
+				this.verifyCode = e.detail.value
+			},
+			levelInput(e) {
+				this.level = e.detail.value
+			},
+			doGetVerify() {
+				const that = this
+				var phone = "";
+				if (this.TabCur == 0) {
+					phone = that.sellerPhone
+				} else if (this.TabCur == 1) {
+					phone = that.buyerPhone
+				} else if (this.TabCur == 2) {
+					phone = that.senderPhone
+				} else if (this.TabCur == 3) {
+					phone = that.driverPhone
+				}
+				if (!phone || phone.length != 11) {
+					uni.showToast({
+						title: '请输入正确手机号!',
+						icon: 'none'
+					})
+					return
+				}
+				that.$api.request('user', 'sendVerifyCode', {
+					phone: phone,
+				}).then(res => {
+
+					if (that.TabCur == 0) {
+						that.sendDisabled0 = true
+					} else if (that.TabCur == 1) {
+						that.sendDisabled1 = true
+					} else if (that.TabCur == 2) {
+						that.sendDisabled2 = true
+					} else if (that.TabCur == 3) {
+						that.sendDisabled3 = true
 					}
-					that.$api.request('user', 'sendVerifyCode', {
-						phone: phone,
-					}).then(res => {
-						
-						if(that.TabCur == 0){
-							that.sendDisabled0 = true
-						}else if(that.TabCur == 1){
-							that.sendDisabled1 = true
-						}
-						else if(that.TabCur == 2){
-							that.sendDisabled2 = true
-						}
-						else if(that.TabCur == 3){
-							that.sendDisabled3 = true
-						}
-						let sec = 60
-						let interval = setInterval(() => {
-							sec--;
-							if(that.TabCur == 0){
-								that.sendText0 = sec + 's后重发'
-								if (sec <= 0) {
-									that.sendDisabled0 = false
-									that.sendText0 = "获取验证码"
-									clearInterval(interval)
-								}
-							}else if(that.TabCur == 1){
-								that.sendText1 = sec + 's后重发'
-								if (sec <= 0) {
-									that.sendDisabled1 = false
-									that.sendText1 = "获取验证码"
-									clearInterval(interval)
-								}
+					let sec = 60
+					let interval = setInterval(() => {
+						sec--;
+						if (that.TabCur == 0) {
+							that.sendText0 = sec + 's后重发'
+							if (sec <= 0) {
+								that.sendDisabled0 = false
+								that.sendText0 = "获取验证码"
+								clearInterval(interval)
+							}
+						} else if (that.TabCur == 1) {
+							that.sendText1 = sec + 's后重发'
+							if (sec <= 0) {
+								that.sendDisabled1 = false
+								that.sendText1 = "获取验证码"
+								clearInterval(interval)
+							}
+						} else if (that.TabCur == 2) {
+							that.sendText2 = sec + 's后重发'
+							if (sec <= 0) {
+								that.sendDisabled2 = false
+								that.sendText2 = "获取验证码"
+								clearInterval(interval)
+							}
+						} else if (that.TabCur == 3) {
+							that.sendText3 = sec + 's后重发'
+							if (sec <= 0) {
+								that.sendDisabled3 = false
+								that.sendText3 = "获取验证码"
+								clearInterval(interval)
 							}
-							else if(that.TabCur == 2){
-								that.sendText2 = sec + 's后重发'
-								if (sec <= 0) {
-									that.sendDisabled2 = false
-									that.sendText2 = "获取验证码"
-									clearInterval(interval)
+						}
+					}, 1000)
+				})
+
+			},
+			ChooseImagePerson() {
+				uni.chooseImage({
+					count: 1, //默认9
+					sizeType: ['original', 'compressed'], //可以指定是原图还是压缩图,默认二者都有
+					sourceType: ['album', 'camera'], //从相册选择
+					success: (res) => {
+						//上传图片
+						//图片路径可自行修改
+						uploadImage(res.tempFilePaths[0], 'personNoImg/',
+							result => {
+								if (this.personNoImg.length != 0) {
+									this.personNoImg1 = result
+								} else {
+									this.personNoImg = result
 								}
+								uni.hideLoading();
 							}
-							else if(that.TabCur == 3){
-								that.sendText3 = sec + 's后重发'
-								if (sec <= 0) {
-									that.sendDisabled3 = false
-									that.sendText3 = "获取验证码"
-									clearInterval(interval)
+						)
+					}
+				});
+			},
+			ChooseImageDriver() {
+				uni.chooseImage({
+					count: 1, //默认9
+					sizeType: ['original', 'compressed'], //可以指定是原图还是压缩图,默认二者都有
+					sourceType: ['album', 'camera'], //从相册选择
+					success: (res) => {
+						//上传图片
+						//图片路径可自行修改
+						uploadImage(res.tempFilePaths[0], 'driverNoImg/',
+							result => {
+								if (this.driverNoImg.length != 0) {
+									this.driverNoImg1 = result
+								} else {
+									this.driverNoImg = result
 								}
+								uni.hideLoading();
 							}
-						}, 1000)
-					})
-					
-				},
-				ChooseImagePerson() {
-					uni.chooseImage({
-						count: 1, //默认9
-						sizeType: ['original', 'compressed'], //可以指定是原图还是压缩图,默认二者都有
-						sourceType: ['album','camera'], //从相册选择
-						success: (res) => {
-							//上传图片
-							//图片路径可自行修改
-							uploadImage(res.tempFilePaths[0], 'personNoImg/',
-								result => {
-								 if (this.personNoImg.length != 0) {
-								 	this.personNoImg1 = result
-								 } else {
-								 	this.personNoImg = result
-								 }
-								 uni.hideLoading();
+						)
+					}
+				});
+			},
+			ChooseImageCar() {
+				uni.chooseImage({
+					count: 1, //默认9
+					sizeType: ['original', 'compressed'], //可以指定是原图还是压缩图,默认二者都有
+					sourceType: ['album', 'camera'], //从相册选择
+					success: (res) => {
+						//上传图片
+						//图片路径可自行修改
+						uploadImage(res.tempFilePaths[0], 'carNoImg/',
+							result => {
+								if (this.carNoImg.length != 0) {
+									this.carNoImg1 = result
+								} else {
+									this.carNoImg = result
 								}
-							)
+								uni.hideLoading();
+							}
+						)
+					}
+				});
+			},
+			ViewImage(e) {
+				var img = [];
+				img = e.currentTarget.dataset.url.split(' ')
+				uni.previewImage({
+					current: 0,
+					urls: img
+				});
+			},
+			DelImg(e) {
+				uni.showModal({
+					title: '提示',
+					content: '确定要删除该照片吗?',
+					cancelText: '取消',
+					confirmText: '确定',
+					success: res => {
+						if (res.confirm) {
+							if (e.currentTarget.dataset.index == 0) {
+								this.personNoImg = "";
+							} else if (e.currentTarget.dataset.index == 1) {
+								this.personNoImg1 = "";
+							} else if (e.currentTarget.dataset.index == 2) {
+								this.driverNoImg = "";
+							} else if (e.currentTarget.dataset.index == 3) {
+								this.driverNoImg1 = "";
+							} else if (e.currentTarget.dataset.index == 4) {
+								this.carNoImg = "";
+							} else if (e.currentTarget.dataset.index == 5) {
+								this.carNoImg1 = "";
+							}
+
 						}
-					});
-				},
-				ChooseImageDriver() {
-					uni.chooseImage({
-						count: 1, //默认9
-						sizeType: ['original', 'compressed'], //可以指定是原图还是压缩图,默认二者都有
-						sourceType: ['album','camera'], //从相册选择
-						success: (res) => {
-							//上传图片
-							//图片路径可自行修改
-							uploadImage(res.tempFilePaths[0], 'driverNoImg/',
-								result => {
-									if (this.driverNoImg.length != 0) {
-										this.driverNoImg1 = result
-									} else {
-										this.driverNoImg = result
-									}
-									uni.hideLoading();
-								}
-							)
+					}
+				})
+			},
+			commit() {
+				if (!this.hasLogin) {
+					this.isShowAlert = true;
+					// uni.showModal({
+					// 	title: '登录提示',
+					// 	content: '您尚未登录,是否立即登录?',
+					// 	showCancel: true,
+					// 	confirmText: '登录',
+					// 	success: (e) => {
+					// 		if (e.confirm) {
+					// 			uni.navigateTo({
+					// 				url: '/pages/public/login'
+					// 			})
+					// 		}
+					// 	},
+					// 	fail: () => {},
+					// 	complete: () => {}
+					// })
+				} else {
+					const that = this
+					if (this.TabCur == 0) {
+						if (!that.seller) {
+							this.$api.msg('请填写卖方');
+							return;
 						}
-					});
-				},
-				ChooseImageCar() {
-					uni.chooseImage({
-						count: 1, //默认9
-						sizeType: ['original', 'compressed'], //可以指定是原图还是压缩图,默认二者都有
-						sourceType: ['album','camera'], //从相册选择
-						success: (res) => {
-							//上传图片
-							//图片路径可自行修改
-							uploadImage(res.tempFilePaths[0], 'carNoImg/',
-								result => {
-									if (this.carNoImg.length != 0) {
-										this.carNoImg1 = result
-									} else {
-										this.carNoImg = result
-									}
-									uni.hideLoading();
-								}
-							)
+						if (!that.sellerPhone) {
+							this.$api.msg('请填写手机号码');
+							return;
 						}
-					});
-				},
-				ViewImage(e) {
-					var img = [];
-					img = e.currentTarget.dataset.url.split(' ')
-					uni.previewImage({
-						current:0,
-						urls: img
-					});
-				},
-				DelImg(e) {
-					uni.showModal({
-						title: '提示',
-						content: '确定要删除该照片吗?',
-						cancelText: '取消',
-						confirmText: '确定',
-						success: res => {
-							if (res.confirm) {
-								if(e.currentTarget.dataset.index == 0){
-									this.personNoImg = "";
-								}
-								else if(e.currentTarget.dataset.index == 1){
-									this.personNoImg1 = "";
-								}
-								else if(e.currentTarget.dataset.index == 2){
-									this.driverNoImg = "";
-								}
-								else if(e.currentTarget.dataset.index == 3){
-									this.driverNoImg1 = "";
-								}
-								else if(e.currentTarget.dataset.index == 4){
-									this.carNoImg = "";
-								}
-								else if(e.currentTarget.dataset.index == 5){
-									this.carNoImg1 = "";
-								}
-								
-							}
+						if (!that.exsitCount) {
+							this.$api.msg('请填写库存量');
+							return;
 						}
-					})
-				},
-				commit(){
-					if (!this.hasLogin) {
-						uni.showModal({
-							title: '登录提示',
-							content: '您尚未登录,是否立即登录?',
-							showCancel: true,
-							confirmText: '登录',
-							success: (e) => {
-								if (e.confirm) {
-									uni.navigateTo({
-										url: '/pages/public/login'
-									})
-								}
-							},
-							fail: () => {},
-							complete: () => {}
-						})
+						if (!that.minSale) {
+							this.$api.msg('请填写最小成交量');
+							return;
+						}
+						if (!that.goodsName) {
+							this.$api.msg('请填写货名');
+							return;
+						}
+						if (!that.verifyCode) {
+							this.$api.msg('请填写验证码');
+							return;
+						}
+
+						if (!that.price) {
+							that.$api.msg('请选择价格类型')
+							return
+						}
+						if (!that.unitPrice) {
+							that.$api.msg('请填写协议价格(元/吨)');
+							return
+						}
+						if (!that.origin) {
+							this.$api.msg('请填写产地');
+							return;
+						}
+						if (!that.stock) {
+							this.$api.msg('请填写库存地');
+							return;
+						}
+						if (!that.level) {
+							this.$api.msg('请填写国标等级');
+							return;
+						}
+						that.saleInfo.seller = that.seller
+						that.saleInfo.sellerPhone = that.sellerPhone
+						that.saleInfo.priceType = that.price
+						that.saleInfo.unitPrice = that.unitPrice
+						that.saleInfo.minSale = that.minSale
+						that.saleInfo.exsitCount = that.exsitCount
+						that.saleInfo.origin = that.origin
+						that.saleInfo.stock = that.stock
+						that.saleInfo.verifyCode = that.verifyCode
+						that.saleInfo.goodsName = that.goodsName
+						that.saleInfo.buyer = that.buyer
+						that.saleInfo.buyerPhone = that.buyerPhone
+						that.saleInfo.level = that.level
+					} else if (this.TabCur == 1) {
+						if (!that.buyer) {
+							this.$api.msg('请填写买方');
+							return;
+						}
+						if (!that.buyerPhone) {
+							this.$api.msg('请填写手机号码');
+							return;
+						}
+						if (!that.goodsName) {
+							this.$api.msg('请填写货名');
+							return;
+						}
+						if (!that.verifyCode) {
+							this.$api.msg('请填写验证码');
+							return;
+						}
+
+						if (!that.price) {
+							that.$api.msg('请选择价格类型')
+							return
+						}
+						if (!that.unitPrice) {
+							that.$api.msg('请填写协议价格(元/吨)');
+							return
+						}
+						if (!that.origin) {
+							this.$api.msg('请填写产地');
+							return;
+						}
+						if (!that.stock) {
+							this.$api.msg('请填写库存地');
+							return;
+						}
+						if (!that.level) {
+							this.$api.msg('请填写国标等级');
+							return;
+						}
+						that.saleInfo.seller = that.seller
+						that.saleInfo.sellerPhone = that.sellerPhone
+						that.saleInfo.priceType = that.price
+						that.saleInfo.unitPrice = that.unitPrice
+						that.saleInfo.minSale = that.minSale
+						that.saleInfo.exsitCount = that.exsitCount
+						that.saleInfo.origin = that.origin
+						that.saleInfo.stock = that.stock
+						that.saleInfo.verifyCode = that.verifyCode
+						that.saleInfo.goodsName = that.goodsName
+						that.saleInfo.buyer = that.buyer
+						that.saleInfo.buyerPhone = that.buyerPhone
+						that.saleInfo.level = that.level
+					} else if (this.TabCur == 2) {
+						if (!that.sender) {
+							this.$api.msg('请填写发货方');
+							return;
+						}
+						if (!that.senderPhone) {
+							this.$api.msg('请填写发货方手机号码');
+							return;
+						}
+						if (!that.receiver) {
+							this.$api.msg('请填写收货方');
+							return;
+						}
+						if (!that.receiverPhone) {
+							this.$api.msg('请填写收货方手机号码');
+							return;
+						}
+						if (!that.goodsName) {
+							this.$api.msg('请填写货名');
+							return;
+						}
+						if (!that.verifyCode) {
+							this.$api.msg('请填写验证码');
+							return;
+						}
+						that.tran.sender = that.sender
+						that.tran.senderPhone = that.senderPhone
+						that.tran.receiver = that.receiver
+						that.tran.receiverPhone = that.receiverPhone
+						that.tran.verifyCode = that.verifyCode
+						that.tran.goodsName = that.goodsName
+						that.tran.total = that.total
+						that.tran.price = that.price
+						that.tran.startPlace = that.startPlace
+						that.tran.endPlace = that.endPlace
+					} else if (this.TabCur == 3) {
+						if (!that.startPlace) {
+							this.$api.msg('请填写起始地');
+							return;
+						}
+						if (!that.endPlace) {
+							this.$api.msg('请填写目的地');
+							return;
+						}
+						if (!that.driver) {
+							this.$api.msg('请填写承运人');
+							return;
+						}
+						if (!that.driverPhone) {
+							this.$api.msg('请填写承运人手机号码');
+							return;
+						}
+						if (!/(^1[3|4|5|7|8][0-9]{9}$)/.test(that.driverPhone)) {
+							that.$api.msg('请输入正确的承运人手机号码');
+							return
+						}
+						if (!that.carNo) {
+							this.$api.msg('请填写车牌号');
+							return;
+						}
+						if (!that.verifyCode) {
+							this.$api.msg('请填写验证码');
+							return;
+						}
+						if (!that.personNoImg || !that.personNoImg1) {
+							that.$api.msg('请上传身份证正、反面照片');
+							return
+						}
+						if (!that.driverNoImg || !that.driverNoImg1) {
+							that.$api.msg('请上传驾驶证主、副页照片');
+							return
+						}
+						if (!that.carNoImg || !that.carNoImg1) {
+							that.$api.msg('请上传行车证主、副页照片');
+							return
+						}
+						that.tran.driver = that.driver
+						that.tran.driverPhone = that.driverPhone
+						that.tran.verifyCode = that.verifyCode
+						that.tran.price = that.price
+						that.tran.startPlace = that.startPlace
+						that.tran.endPlace = that.endPlace
+						that.tran.carNo = that.carNo
+						that.tran.personNoImg = that.personNoImg
+						that.tran.personNoImg1 = that.personNoImg1
+						that.tran.driverNoImg = that.driverNoImg
+						that.tran.driverNoImg1 = that.driverNoImg1
+						that.tran.carNoImg = that.carNoImg
+						that.tran.carNoImg1 = that.carNoImg1
 					}
-					else{
-						const that = this
-						if(this.TabCur == 0){
-							if(!that.seller){
-								this.$api.msg('请填写卖方');
-								return;
-							}
-							if(!that.sellerPhone){
-								this.$api.msg('请填写手机号码');
-								return;
-							}
-							if(!that.exsitCount){
-								this.$api.msg('请填写库存量');
-								return;
-							}
-							if(!that.minSale){
-								this.$api.msg('请填写最小成交量');
-								return;
-							}
-							if(!that.goodsName){
-								this.$api.msg('请填写货名');
-								return;
-							}
-							if(!that.verifyCode){
-								this.$api.msg('请填写验证码');
-								return;
-							}
-							
-							if (!that.price) {
-								that.$api.msg('请选择价格类型')
-								return
-							}
-							if(!that.unitPrice){
-								that.$api.msg('请填写协议价格(元/吨)');
-								return
-							}
-							if(!that.origin){
-								this.$api.msg('请填写产地');
-								return;
-							}
-							if(!that.stock){
-								this.$api.msg('请填写库存地');
-								return;
-							}
-							if(!that.level){
-								this.$api.msg('请填写国标等级');
-								return;
-							}
-							that.saleInfo.seller = that.seller
-							that.saleInfo.sellerPhone = that.sellerPhone
-							that.saleInfo.priceType = that.price
-							that.saleInfo.unitPrice = that.unitPrice
-							that.saleInfo.minSale = that.minSale
-							that.saleInfo.exsitCount = that.exsitCount
-							that.saleInfo.origin = that.origin
-							that.saleInfo.stock = that.stock
-							that.saleInfo.verifyCode = that.verifyCode
-							that.saleInfo.goodsName = that.goodsName
-							that.saleInfo.buyer = that.buyer
-							that.saleInfo.buyerPhone = that.buyerPhone
-							that.saleInfo.level = that.level
-						}else if(this.TabCur == 1){
-							if(!that.buyer){
-								this.$api.msg('请填写买方');
-								return;
-							}
-							if(!that.buyerPhone){
-								this.$api.msg('请填写手机号码');
-								return;
-							}
-							if(!that.goodsName){
-								this.$api.msg('请填写货名');
-								return;
-							}
-							if(!that.verifyCode){
-								this.$api.msg('请填写验证码');
-								return;
-							}
-							
-							if (!that.price) {
-								that.$api.msg('请选择价格类型')
-								return
-							}
-							if(!that.unitPrice){
-								that.$api.msg('请填写协议价格(元/吨)');
-								return
-							}
-							if(!that.origin){
-								this.$api.msg('请填写产地');
-								return;
-							}
-							if(!that.stock){
-								this.$api.msg('请填写库存地');
-								return;
-							}
-							if(!that.level){
-								this.$api.msg('请填写国标等级');
-								return;
-							}
-							that.saleInfo.seller = that.seller
-							that.saleInfo.sellerPhone = that.sellerPhone
-							that.saleInfo.priceType = that.price
-							that.saleInfo.unitPrice = that.unitPrice
-							that.saleInfo.minSale = that.minSale
-							that.saleInfo.exsitCount = that.exsitCount
-							that.saleInfo.origin = that.origin
-							that.saleInfo.stock = that.stock
-							that.saleInfo.verifyCode = that.verifyCode
-							that.saleInfo.goodsName = that.goodsName
-							that.saleInfo.buyer = that.buyer
-							that.saleInfo.buyerPhone = that.buyerPhone
-							that.saleInfo.level = that.level
-						}
-						else if(this.TabCur == 2){
-							if(!that.sender){
-								this.$api.msg('请填写发货方');
-								return;
-							}
-							if(!that.senderPhone){
-								this.$api.msg('请填写发货方手机号码');
-								return;
-							}
-							if(!that.receiver){
-								this.$api.msg('请填写收货方');
-								return;
-							}
-							if(!that.receiverPhone){
-								this.$api.msg('请填写收货方手机号码');
-								return;
-							}
-							if(!that.goodsName){
-								this.$api.msg('请填写货名');
-								return;
-							}
-							if(!that.verifyCode){
-								this.$api.msg('请填写验证码');
-								return;
-							}
-							that.tran.sender = that.sender
-							that.tran.senderPhone = that.senderPhone
-							that.tran.receiver = that.receiver
-							that.tran.receiverPhone = that.receiverPhone
-							that.tran.verifyCode = that.verifyCode
-							that.tran.goodsName = that.goodsName
-							that.tran.total = that.total
-							that.tran.price = that.price
-							that.tran.startPlace = that.startPlace
-							that.tran.endPlace = that.endPlace
-						}
-						else if(this.TabCur == 3){
-							if(!that.startPlace){
-								this.$api.msg('请填写起始地');
-								return;
-							}
-							if(!that.endPlace){
-								this.$api.msg('请填写目的地');
-								return;
-							}
-							if(!that.driver){
-								this.$api.msg('请填写承运人');
-								return;
-							}
-							if(!that.driverPhone){
-								this.$api.msg('请填写承运人手机号码');
-								return;
-							}
-							if(!/(^1[3|4|5|7|8][0-9]{9}$)/.test(that.driverPhone)){
-								that.$api.msg('请输入正确的承运人手机号码');
-								return
-							}
-							if(!that.carNo){
-								this.$api.msg('请填写车牌号');
-								return;
-							}
-							if(!that.verifyCode){
-								this.$api.msg('请填写验证码');
-								return;
-							}
-							if (!that.personNoImg || !that.personNoImg1) {
-								that.$api.msg('请上传身份证正、反面照片');
-								return
-							}
-							if (!that.driverNoImg || !that.driverNoImg1) {
-								that.$api.msg('请上传驾驶证主、副页照片');
-								return
-							}
-							if (!that.carNoImg || !that.carNoImg1) {
-								that.$api.msg('请上传行车证主、副页照片');
-								return
+					// 获取用户的当前设置,判断是否点击了“总是保持以上,不在询问”
+					wx.getSetting({
+						// withSubscriptions: true,//是否获取用户订阅消息的订阅状态,默认false不返回
+						success(res) {
+							if (res.authSetting['scope.subscribeMessage']) {
+								uni.openSetting({ // 打开设置页
+									success(res) {
+										console.log(res.authSetting)
+									}
+								});
+							} else { // 用户没有点击“总是保持以上,不再询问”则每次都会调起订阅消息
+								uni.requestSubscribeMessage({
+									tmplIds: ['8cVkckXi_8zfHeScXRHhjN6cgZFYYCWIMPDTiPWagXY'], // 
+									success(res) {
+										console.log(res)
+										if (res['8cVkckXi_8zfHeScXRHhjN6cgZFYYCWIMPDTiPWagXY'] ==
+											"accept") { // 字段就是tmplIds模板id
+											uni.showLoading({
+												title: '正在提交',
+												mask: true
+											})
+											if (that.TabCur == 0) {
+												that.$api.request('sale', 'addSale', that.saleInfo,
+													failres => {
+														uni.hideLoading()
+														that.$api.msg(failres.errmsg);
+
+													}).then(res => {
+													uni.hideLoading()
+													uni.showModal({
+														title: '提示',
+														content: "发布提交成功,工作人员会尽快联系该号码:" +
+															that.sellerPhone,
+														showCancel: false,
+														confirmText: '确定',
+														success: () => {
+															uni.navigateBack()
+														}
+													})
+													// that.$api.prePage().refreshList(data, that.manageType);
+												})
+											} else if (that.TabCur == 1) {
+												that.$api.request('sale', 'addBuy', that.saleInfo,
+													failres => {
+														uni.hideLoading()
+														that.$api.msg(failres.errmsg);
+
+													}).then(res => {
+													uni.hideLoading()
+													uni.showModal({
+														title: '提示',
+														showCancel: false,
+														content: "发布提交成功,工作人员会尽快联系该号码:" +
+															that.buyerPhone,
+														confirmText: '确定',
+														success: () => {
+															uni.navigateBack()
+														}
+													})
+													// that.$api.prePage().refreshList(data, that.manageType);
+												})
+											} else if (that.TabCur == 2) {
+												that.$api.request('tran', 'addTran', that.tran,
+												failres => {
+													uni.hideLoading()
+													that.$api.msg(failres.errmsg);
+												}).then(res => {
+													uni.hideLoading()
+													uni.showModal({
+														title: '提示',
+														showCancel: false,
+														content: "发布提交成功,工作人员会尽快联系该号码:" +
+															that.senderPhone,
+														confirmText: '确定',
+														success: () => {
+															uni.navigateBack()
+														}
+													})
+													// that.$api.prePage().refreshList(data, that.manageType);
+												})
+
+											} else if (that.TabCur == 3) {
+												that.$api.request('tran', 'addCarDriver', that.tran,
+													failres => {
+														uni.hideLoading()
+														that.$api.msg(failres.errmsg);
+													}).then(res => {
+													uni.hideLoading()
+													uni.showModal({
+														title: '提示',
+														showCancel: false,
+														content: "发布提交成功,工作人员会尽快联系该号码:" +
+															that.driverPhone,
+														confirmText: '确定',
+														success: () => {
+															uni.navigateBack()
+														}
+													})
+													// that.$api.prePage().refreshList(data, that.manageType);
+												})
+
+											}
+
+										}
+									}
+								})
 							}
-							that.tran.driver = that.driver
-							that.tran.driverPhone = that.driverPhone
-							that.tran.verifyCode = that.verifyCode
-							that.tran.price = that.price
-							that.tran.startPlace = that.startPlace
-							that.tran.endPlace = that.endPlace
-							that.tran.carNo = that.carNo
-							that.tran.personNoImg = that.personNoImg
-							that.tran.personNoImg1 = that.personNoImg1
-							that.tran.driverNoImg = that.driverNoImg
-							that.tran.driverNoImg1 = that.driverNoImg1
-							that.tran.carNoImg = that.carNoImg
-							that.tran.carNoImg1 = that.carNoImg1
-						}
-						// 获取用户的当前设置,判断是否点击了“总是保持以上,不在询问”
-						wx.getSetting({
-						 	// withSubscriptions: true,//是否获取用户订阅消息的订阅状态,默认false不返回
-						   success(res){
-						   if(res.authSetting['scope.subscribeMessage']){
-						     uni.openSetting({ // 打开设置页
-						       success(res) {
-									console.log(res.authSetting)
-						       }
-						     });
-						   }else{// 用户没有点击“总是保持以上,不再询问”则每次都会调起订阅消息
-						     uni.requestSubscribeMessage({
-						       tmplIds: ['8cVkckXi_8zfHeScXRHhjN6cgZFYYCWIMPDTiPWagXY'],// 
-						       success (res) {
-						         console.log(res)
-						         if(res['8cVkckXi_8zfHeScXRHhjN6cgZFYYCWIMPDTiPWagXY'] == "accept"){// 字段就是tmplIds模板id
-						            uni.showLoading({
-						            		title: '正在提交',
-											mask:true
-						            	})
-						            	if(that.TabCur == 0){
-						            		that.$api.request('sale', 'addSale',that.saleInfo, failres => {
-						            			uni.hideLoading()
-						            			that.$api.msg(failres.errmsg);
-						            			
-						            		}).then(res => {
-						            			uni.hideLoading()
-						            			uni.showModal({
-						            				title: '提示',
-						            				content: "发布提交成功,工作人员会尽快联系该号码:"+that.sellerPhone,
-						            				showCancel: false,
-						            				confirmText: '确定',
-						            				success: () => {
-						            					uni.navigateBack()
-						            				}
-						            			})
-						            			// that.$api.prePage().refreshList(data, that.manageType);
-						            		})
-						            	}
-						            	else if(that.TabCur == 1){
-						            		that.$api.request('sale', 'addBuy',that.saleInfo, failres => {
-						            			uni.hideLoading()
-						            			that.$api.msg(failres.errmsg);
-						            			
-						            		}).then(res => {
-						            			uni.hideLoading()
-						            			uni.showModal({
-						            				title: '提示',
-						            				showCancel: false,
-						            				content: "发布提交成功,工作人员会尽快联系该号码:"+that.buyerPhone,
-						            				confirmText: '确定',
-						            				success: () => {
-						            					uni.navigateBack()
-						            				}
-						            			})
-						            			// that.$api.prePage().refreshList(data, that.manageType);
-						            		})
-						            	}
-						            	else if(that.TabCur == 2){
-						            		that.$api.request('tran', 'addTran',that.tran, failres => {
-						            			uni.hideLoading()
-						            			that.$api.msg(failres.errmsg);
-						            		}).then(res => {
-						            			uni.hideLoading()
-						            			uni.showModal({
-						            				title: '提示',
-						            				showCancel: false,
-						            				content: "发布提交成功,工作人员会尽快联系该号码:"+that.senderPhone,
-						            				confirmText: '确定',
-						            				success: () => {
-						            					uni.navigateBack()
-						            				}
-						            			})
-						            			// that.$api.prePage().refreshList(data, that.manageType);
-						            		})
-						            		
-						            	}
-						            	else if(that.TabCur == 3){
-						            		that.$api.request('tran', 'addCarDriver',that.tran, failres => {
-						            			uni.hideLoading()
-						            			that.$api.msg(failres.errmsg);
-						            		}).then(res => {
-						            			uni.hideLoading()
-						            			uni.showModal({
-						            				title: '提示',
-						            				showCancel: false,
-						            				content: "发布提交成功,工作人员会尽快联系该号码:"+that.driverPhone,
-						            				confirmText: '确定',
-						            				success: () => {
-						            					uni.navigateBack()
-						            				}
-						            			})
-						            			// that.$api.prePage().refreshList(data, that.manageType);
-						            		})
-						            		
-						            	}
-						            
-						         }
-						       }
-						      })
-						     }
-						   }
-						})
 						}
+					})
 				}
-			},
-		}
+			}
+		},
+	}
 </script>
 
 <style scoped>
-	.container{
+	.container {
 		padding-bottom: 160rpx;
 	}
+
 	.cu-form-group input {
 		text-align: right;
 	}
-	.text-white text{
+
+	.text-white text {
 		background: linear-gradient(45deg, #3DC146, #B2D612);
-		padding:5px 10px;
+		padding: 5px 10px;
 		border-radius: 38rpx;
 	}
+
 	.cu-form-group textarea {
 		text-align: right;
 	}
-	.commit{
+
+	.commit {
 		background: linear-gradient(45deg, #DF331C, #DA611A);
-		color:#fff;
+		color: #fff;
 	}
 </style>

+ 260 - 218
pages/bill/index.vue

@@ -1,14 +1,15 @@
 <template>
-	<view  :class="show ? 'tl-show': ''">
+	<view :class="show ? 'tl-show': ''">
 		<view>
 			<view style='background:#fff;display:flex;' class="cu-bar search">
 				<view style='flex:6;' class="search-form round Medium">
 					<text style='color: #ccc;text-indent:6px;' class="cuIcon-search"></text>
-					<input type="text" maxlength="20"  v-model="searchKeyWord" @confirm="doSearch()"
-						 placeholder="请输入买方名称或编号" confirm-type="search"></input>
+					<input type="text" maxlength="20" v-model="searchKeyWord" @confirm="doSearch()"
+						placeholder="请输入买方名称或编号" confirm-type="search"></input>
 				</view>
 				<view @click='doSearch()' class="Regular" style="width:4%;flex:1;">搜索</view>
-				<u-icon @click='emptysearch' class="cuIcon" v-if='searchKeyWord.length>0' size="34" name="close-circle-fill" color="#D6D9E0"></u-icon>
+				<u-icon @click='emptysearch' class="cuIcon" v-if='searchKeyWord.length>0' size="34"
+					name="close-circle-fill" color="#D6D9E0"></u-icon>
 				<!-- <text @click='emptysearch' v-if='searchKeyWord.length>0' class='tip_text cuIcon-roundclosefill'></text> -->
 			</view>
 			<view style='background:#fff;padding:0 15px;border-radius:0rpx 0rpx 30rpx 30rpx;' class="Semibold">
@@ -18,18 +19,21 @@
 			</view>
 		</view>
 		<view class='wrap' v-for='item in dataInfo'>
-			<view style='margin:5px;padding:10px 0;border-bottom:1px solid #eee;' class="flex justify-between align-item-center">
+			<view style='margin:5px;padding:10px 0;border-bottom:1px solid #eee;'
+				class="flex justify-between align-item-center">
 				<view style='color:#878C9C;'>{{item.paymentNo}}</view>
-				<view class='already'  v-if='item.status=="全部付款"'>已付款</view>
+				<view class='already' v-if='item.status=="全部付款"'>已付款</view>
 				<view class='not' v-else>待付款</view>
 			</view>
 			<view style='line-height:30px;'>
-				<view class='purchaser'>买方</view><view style='font-size:14px;display:inline-block;'>{{item.compName}}</view>
+				<view class='purchaser'>买方</view>
+				<view style='font-size:14px;display:inline-block;'>{{item.compName}}</view>
 			</view>
 			<view style='line-height:30px;'>
 				<view class='flex justify-between align-item-center'>
-					<view >
-						<view class='seller'>卖方</view><view style='font-size:14px;display:inline-block;'>{{item.customerName}}</view>
+					<view>
+						<view class='seller'>卖方</view>
+						<view style='font-size:14px;display:inline-block;'>{{item.customerName}}</view>
 					</view>
 					<view>{{item.carNo}}</view>
 				</view>
@@ -39,7 +43,8 @@
 				<view>{{item.netWeight}}</view>
 			</view>
 			<view class='flex justify-between align-item-center'>
-				<view style="color:#878C9C;padding:5px;">单价</view><view>{{(item.tidalGrainPrice-item.unitDeduction).toFixed(2)}}</view>
+				<view style="color:#878C9C;padding:5px;">单价</view>
+				<view>{{(item.tidalGrainPrice-item.unitDeduction).toFixed(2)}}</view>
 			</view>
 			<view class='flex justify-between align-item-center'>
 				<view style="color:#878C9C;padding:5px;">应付</view>
@@ -51,8 +56,10 @@
 			</view>
 			<view style='flex-direction:row-reverse;' class='flex'>
 				<view v-show="item.pictureAddress" @click='showImage(item.pictureAddress)' class='button'>结算单</view>
-				<view v-show="item.weighingPictureAddress" @click='showImage(item.weighingPictureAddress)' class='button'>检斤单</view>
-				<view v-show="item.qualityInspectionPictureAddress" @click='showImage(item.qualityInspectionPictureAddress)' class='button'>质检单</view>
+				<view v-show="item.weighingPictureAddress" @click='showImage(item.weighingPictureAddress)'
+					class='button'>检斤单</view>
+				<view v-show="item.qualityInspectionPictureAddress"
+					@click='showImage(item.qualityInspectionPictureAddress)' class='button'>质检单</view>
 			</view>
 		</view>
 		<view v-show="isContent">
@@ -62,8 +69,13 @@
 			<view class='imagewrap' style='text-align:center;'>
 				<image :src="img" mode="aspectFit"></image>
 			</view>
-			<view @click='xiazai' class='xiazai'><image style='width:24px;height:24px;' src="../../static/img/erp/xiazai@3x.png" mode=""></image></view>
+			<view @click='xiazai' class='xiazai'>
+				<image style='width:24px;height:24px;' src="../../static/img/erp/xiazai@3x.png" mode=""></image>
+			</view>
 		</view>
+		<u-modal v-model="isShowAlert" :title-style="{fontSize: '18px',fontWeight:'500'}"
+			:content-style="{fontSize: '14px',fontWeight:'400'}" confirm-color='#22C572' confirm-text='确定' title='登录提示'
+			showCancelButton='false' :content="content" @confirm="alertBtn" @cancel="cancelClick"></u-modal>
 	</view>
 </template>
 
@@ -75,21 +87,22 @@
 		name: "business",
 		data() {
 			return {
-				TabCur:0,
-				pageSize:10,
-				currentPage:1,
-				isLoadMore:false,
-				isContent:false,
-				loadStatus:'noMore',
-				searchKeyWord:'',
-				show:false,
-				img:'',
-				searchType:'',
-				dataInfo:[]
+				isShowAlert: false,
+				content: '您尚未登录,是否立即登录?',
+				TabCur: 0,
+				pageSize: 10,
+				currentPage: 1,
+				isLoadMore: false,
+				isContent: false,
+				loadStatus: 'noMore',
+				searchKeyWord: '',
+				show: false,
+				img: '',
+				searchType: '',
+				dataInfo: []
 			}
 		},
-		onShow() {
-		},
+		onShow() {},
 		onLoad(options) {
 			this.loadData();
 		},
@@ -117,56 +130,57 @@
 			}
 		},
 		methods: {
-			closepop(){
-				this.show=false
+			closepop() {
+				this.show = false
 			},
-			xiazai(){
+			xiazai() {
 				const that = this;
-							uni.downloadFile({
-								url:that.img,
-								success: res => {
-									if (res.statusCode === 200) {
-										uni.saveImageToPhotosAlbum({
-											filePath: res.tempFilePath,
-											success: function() {
-												this.tools.toast('保存成功');
-												that.show=false
-											},
-											fail: function() {
-												this.tools.toast('保存失败,请稍后重试');
-											}
-										});
-									} else {
-										this.tools.toast('下载失败');
-									}
+				uni.downloadFile({
+					url: that.img,
+					success: res => {
+						if (res.statusCode === 200) {
+							uni.saveImageToPhotosAlbum({
+								filePath: res.tempFilePath,
+								success: function() {
+									this.tools.toast('保存成功');
+									that.show = false
+								},
+								fail: function() {
+									this.tools.toast('保存失败,请稍后重试');
 								}
 							});
-				
+						} else {
+							this.tools.toast('下载失败');
+						}
+					}
+				});
+
 			},
-			showImage(url){
+			showImage(url) {
 				var img = [];
 				img.push(url)
 				uni.previewImage({
-					current:0,
+					current: 0,
 					urls: img
 				});
-				
+
 			},
-			tabcarchange(status){
-				this.TabCur=status
-				if(status==0){
-					this.searchType=''
-				}else{
-					this.searchType=status
+			tabcarchange(status) {
+				this.TabCur = status
+				if (status == 0) {
+					this.searchType = ''
+				} else {
+					this.searchType = status
 				}
 				this.currentPage = 1
 				this.loadData()
-				
+
 			},
 			top() { //回到顶部  
-			    uni.pageScrollTo({ 
-			      scrollTop: 0, duration: 300 
-			    }); 
+				uni.pageScrollTo({
+					scrollTop: 0,
+					duration: 300
+				});
 			},
 			naviageToPage(page) {
 				page = page + this.TabCur
@@ -192,35 +206,44 @@
 				this.currentPage = 1
 				this.loadData()
 			},
-			emptysearch(){
-				this.searchKeyWord=''
-				this.dataInfo=[]
+			emptysearch() {
+				this.searchKeyWord = ''
+				this.dataInfo = []
 				this.loadData()
 			},
-			doSearch(){
-				this.dataInfo=[]
+			doSearch() {
+				this.dataInfo = []
 				this.loadData()
 			},
+			alertBtn() {
+				uni.navigateTo({
+					url: '/pages/public/login'
+				})
+			},
+			cancelClick() {
+				this.isShowAlert = false
+			},
 			//加载商品 ,带下拉刷新和上滑加载
 			async loadData(type, loading) {
 				if(!this.hasLogin){
-					ni.showModal({
-						title: '登录提示',
-						content: '您尚未登录,是否立即登录?',
-						showCancel: true,
-						confirmText: '登录',
-						success: (e) => {
-							if (e.confirm) {
-								uni.navigateTo({
-									url: '/pages/public/login'
-								})
-							}
-						},
-						fail: () => {},
-						complete: () => {}
-					})
-				}else{
-					const that = this
+					this.isShowAlert = true;
+				// 	ni.showModal({
+				// 		title: '登录提示',
+				// 		content: '您尚未登录,是否立即登录?',
+				// 		showCancel: true,
+				// 		confirmText: '登录',
+				// 		success: (e) => {
+				// 			if (e.confirm) {
+				// 				uni.navigateTo({
+				// 					url: '/pages/public/login'
+				// 				})
+				// 			}
+				// 		},
+				// 		fail: () => {},
+				// 		complete: () => {}
+				// 	})
+			} else {
+				const that = this
 				uni.showLoading({
 					title: '正在加载'
 				})
@@ -230,21 +253,20 @@
 						currentPage: this.currentPage,
 						searchKeyWord: this.searchKeyWord,
 						searchType: this.searchType,
-						managementType:1,
-						customerPhone:this.userInfo.phone,
+						managementType: 1,
+						customerPhone: this.userInfo.phone,
 						// pcFlag:1
 						// warehouseName:'',
 					}).then(res => {
 						uni.hideLoading()
-						var data= res.data.data.records
-						if(type == "add"){
+						var data = res.data.data.records
+						if (type == "add") {
 							this.dataInfo = this.dataInfo.concat(data)
-						}
-						else{
+						} else {
 							this.dataInfo = data
 						}
-						if(data.length==0){
-							this.isContent=true
+						if (data.length == 0) {
+							this.isContent = true
 							this.isLoadMore = false
 							this.loadStatus = 'nomore'
 						}
@@ -265,144 +287,164 @@
 							})
 						}
 					});
-				}
-				
-			},
-		}
+			}
+
+		},
+	}
 	}
 </script>
 
 <style scoped>
-	.wrap{
-		background:#fff;
-		margin:10px;
-		border-radius:10px;
-		padding:0  10px 10px;
-		font-size:12px;
+	.wrap {
+		background: #fff;
+		margin: 10px;
+		border-radius: 10px;
+		padding: 0 10px 10px;
+		font-size: 12px;
 	}
-	.already{
-		color:#22C572;
+
+	.already {
+		color: #22C572;
 	}
-	.not{
-		color:#FE6430;
+
+	.not {
+		color: #FE6430;
 	}
-	.purchaser{
-		padding:5px;background:#E9F8F0;color:#22C572;
-		display:inline;
-		border-radius:3px;
-		margin-right:10px;
+
+	.purchaser {
+		padding: 5px;
+		background: #E9F8F0;
+		color: #22C572;
+		display: inline;
+		border-radius: 3px;
+		margin-right: 10px;
 	}
-	.seller{
-		padding:5px;background:#FEECE6;color:#FE6430;
-		display:inline;
-		border-radius:3px;
-		margin-right:10px;
+
+	.seller {
+		padding: 5px;
+		background: #FEECE6;
+		color: #FE6430;
+		display: inline;
+		border-radius: 3px;
+		margin-right: 10px;
 	}
-	.button{
-		display:inline-block;
-		border:1px solid #CDCDCD;
-		padding:6px 15px;
-		border-radius:15px;
-		margin:5px 3px;
+
+	.button {
+		display: inline-block;
+		border: 1px solid #CDCDCD;
+		padding: 6px 15px;
+		border-radius: 15px;
+		margin: 5px 3px;
 	}
+
 	.search-form {
-			background: #F5F6F9;
-		}
-	
-		.search-box {
-			width: 100%;
-			background-color: rgb(242, 242, 242);
-			padding: 15upx 2.5%;
-			display: flex;
-			justify-content: space-between;
-		}
-	
-		.search-box .mSearch-input-box {
-			width: 100%;
-		}
-	
-		.search-box .input-box {
-			width: 85%;
-			flex-shrink: 1;
-			display: flex;
-			justify-content: center;
-			align-items: center;
-		}
-	
-		.search-box .search-btn {
-			width: 15%;
-			margin: 0 0 0 2%;
-			display: flex;
-			justify-content: center;
-			align-items: center;
-			flex-shrink: 0;
-			font-size: 28upx;
-			color: #fff;
-			background: linear-gradient(to right, #ff9801, #ff570a);
-			border-radius: 60upx;
-		}
-	
-		.search-box .input-box>input {
-			width: 100%;
-			height: 60upx;
-			font-size: 32upx;
-			border: 0;
-			border-radius: 60upx;
-			-webkit-appearance: none;
-			-moz-appearance: none;
-			appearance: none;
-			padding: 0 3%;
-			margin: 0;
-			background-color: #ffffff;
-		}
+		background: #F5F6F9;
+	}
+
+	.search-box {
+		width: 100%;
+		background-color: rgb(242, 242, 242);
+		padding: 15upx 2.5%;
+		display: flex;
+		justify-content: space-between;
+	}
+
+	.search-box .mSearch-input-box {
+		width: 100%;
+	}
+
+	.search-box .input-box {
+		width: 85%;
+		flex-shrink: 1;
+		display: flex;
+		justify-content: center;
+		align-items: center;
+	}
+
+	.search-box .search-btn {
+		width: 15%;
+		margin: 0 0 0 2%;
+		display: flex;
+		justify-content: center;
+		align-items: center;
+		flex-shrink: 0;
+		font-size: 28upx;
+		color: #fff;
+		background: linear-gradient(to right, #ff9801, #ff570a);
+		border-radius: 60upx;
+	}
+
+	.search-box .input-box>input {
+		width: 100%;
+		height: 60upx;
+		font-size: 32upx;
+		border: 0;
+		border-radius: 60upx;
+		-webkit-appearance: none;
+		-moz-appearance: none;
+		appearance: none;
+		padding: 0 3%;
+		margin: 0;
+		background-color: #ffffff;
+	}
+
 	.cuIcon {
-			position: absolute;
-			right: 80px;
-		}
-		.line {
-			display: inline-block;
-			padding: 5px;
-			position: relative;
-			font-size: 17px;
-		}
-		
-		.line.active {
-			font-size: 19px;
-			font-weight: 900;
-		}
-		
-		.line.active:after {
-			content: '';
-			display: block;
-			position: absolute;
-			width: 36rpx;
-			height: 6rpx;
-			left: 50%;
-			transform: translateX(-50%);
-			bottom: 0;
-			background: #22C572;
-			/* border-bottom: 1px solid #22C572; */
-		}
-		.popup{
-			background:rgba(0, 0, 0, 0.8);
-			position:fixed;top:0;left:0;width:100%;height:100%;
-		}
-		.imagewrap{
-			position:absolute;
-			top:50%;
-			transform: translateY(-50%) translateX(-50%);
-			left:50%;
-		}
-		.xiazai{
-			position: absolute;
-			bottom:10px;
-			left:50%;
-			transform: translateX(-50%);
-		}
-		.tl-show{
-		  overflow: hidden;
-		  position:fixed;
-		  height: 100%;
-		  width: 100%;
-		}
+		position: absolute;
+		right: 80px;
+	}
+
+	.line {
+		display: inline-block;
+		padding: 5px;
+		position: relative;
+		font-size: 17px;
+	}
+
+	.line.active {
+		font-size: 19px;
+		font-weight: 900;
+	}
+
+	.line.active:after {
+		content: '';
+		display: block;
+		position: absolute;
+		width: 36rpx;
+		height: 6rpx;
+		left: 50%;
+		transform: translateX(-50%);
+		bottom: 0;
+		background: #22C572;
+		/* border-bottom: 1px solid #22C572; */
+	}
+
+	.popup {
+		background: rgba(0, 0, 0, 0.8);
+		position: fixed;
+		top: 0;
+		left: 0;
+		width: 100%;
+		height: 100%;
+	}
+
+	.imagewrap {
+		position: absolute;
+		top: 50%;
+		transform: translateY(-50%) translateX(-50%);
+		left: 50%;
+	}
+
+	.xiazai {
+		position: absolute;
+		bottom: 10px;
+		left: 50%;
+		transform: translateX(-50%);
+	}
+
+	.tl-show {
+		overflow: hidden;
+		position: fixed;
+		height: 100%;
+		width: 100%;
+	}
 </style>

+ 31 - 16
pages/erp/contactCustomerService/contactCustomerService.vue

@@ -21,6 +21,9 @@
 			</view>
 		</view>
 		<u-toast ref="uToast" />
+		<u-modal v-model="isShowAlert" :title-style="{fontSize: '18px',fontWeight:'500'}"
+			:content-style="{fontSize: '14px',fontWeight:'400'}" confirm-color='#22C572' confirm-text='确定' title='登录提示'
+			showCancelButton='false' :content="content" @confirm="alertBtn" @cancel="cancelClick"></u-modal>
 	</view>
 </template>
 <script>
@@ -34,6 +37,9 @@
 		},
 		data() {
 			return {
+
+				isShowAlert: false,
+				content: '当前登入信息验证失败,是否重新登录?',
 				personInfo: {
 					name: '',
 					mobilePhone: '',
@@ -78,21 +84,22 @@
 			this.$api.doRequest('get', '/commonUser/api/checkSession').then(res => {
 				console.log("checkSession", res)
 				if (res.data.data == "INVALID") {
-					uni.showModal({
-						title: '登录提示',
-						content: '当前登入信息验证失败,是否重新登录?',
-						showCancel: true,
-						confirmText: '登录',
-						success: (e) => {
-							if (e.confirm) {
-								uni.navigateTo({
-									url: '/pages/public/login'
-								})
-							}
-						},
-						fail: () => {},
-						complete: () => {}
-					})
+					this.isShowAlert = true;
+					// uni.showModal({
+					// 	title: '登录提示',
+					// 	content: '当前登入信息验证失败,是否重新登录?',
+					// 	showCancel: true,
+					// 	confirmText: '登录',
+					// 	success: (e) => {
+					// 		if (e.confirm) {
+					// 			uni.navigateTo({
+					// 				url: '/pages/public/login'
+					// 			})
+					// 		}
+					// 	},
+					// 	fail: () => {},
+					// 	complete: () => {}
+					// })
 				}
 			})
 			console.log("hasLogin", this.hasLogin)
@@ -110,6 +117,14 @@
 					url
 				})
 			},
+			alertBtn() {
+				uni.navigateTo({
+					url: '/pages/public/login'
+				})
+			},
+			cancelClick() {
+				this.isShowAlert = false
+			},
 			calculate() {},
 			submit() {
 				if (!this.personInfo.name) {
@@ -125,7 +140,7 @@
 					})
 				}
 				this.$api.doRequest('post', '/openServiceInfo/api/addInfo', this.personInfo).then(res => {
-					
+
 					if (res.data.code == 200) {
 						this.$refs.uToast.show({
 							title: '提交成功,客服人员会及时与您取得联系。!',

+ 1 - 3
pages/erp/deliveryfeedback/details.vue

@@ -877,14 +877,12 @@
 				})
 			},
 			getImgUrl(res1,res2,res3,res4) {
-				// debugger
 				this.freightspace[res4].loadPoundImg=res1
 				// this.detailData.addressUrl = res
 				// console.log(res)
 				// console.log('------------res-----------')
 			},
 			setImgUrl(val){
-				// debugger
 				for(let i = 0;i<freightspace.length;i++){
 					
 				}
@@ -939,7 +937,7 @@
 	}
 	.wrap {
 		margin: 10rpx;
-		padding: 20rpx 20rpx 240rpx 20rpx;
+		padding: 20rpx 20rpx 300rpx 20rpx;
 	
 		.top {
 			display: flex;

+ 29 - 19
pages/erp/demo.vue

@@ -1,6 +1,8 @@
 <template>
 	<view class="wrap">
-		
+		<u-modal v-model="isShowAlert" :title-style="{fontSize: '18px',fontWeight:'500'}"
+			:content-style="{fontSize: '14px',fontWeight:'400'}" confirm-color='#22C572' confirm-text='确定' title='登录提示'
+			showCancelButton='false' :content="content" @confirm="alertBtn" @cancel="cancelClick"></u-modal>
 	</view>
 </template>
 <script>
@@ -14,7 +16,8 @@
 		},
 		data() {
 			return {
-			
+				isShowAlert: false,
+				content: '当前登入信息验证失败,是否重新登录?',
 			}
 		},
 
@@ -48,21 +51,22 @@
 			this.$api.doRequest('get', '/commonUser/api/checkSession').then(res => {
 				console.log("checkSession", res)
 				if (res.data.data == "INVALID") {
-					uni.showModal({
-						title: '登录提示',
-						content: '当前登入信息验证失败,是否重新登录?',
-						showCancel: true,
-						confirmText: '登录',
-						success: (e) => {
-							if (e.confirm) {
-								uni.navigateTo({
-									url: '/pages/public/login'
-								})
-							}
-						},
-						fail: () => {},
-						complete: () => {}
-					})
+					this.isShowAlert = true;
+					// uni.showModal({
+					// 	title: '登录提示',
+					// 	content: '当前登入信息验证失败,是否重新登录?',
+					// 	showCancel: true,
+					// 	confirmText: '登录',
+					// 	success: (e) => {
+					// 		if (e.confirm) {
+					// 			uni.navigateTo({
+					// 				url: '/pages/public/login'
+					// 			})
+					// 		}
+					// 	},
+					// 	fail: () => {},
+					// 	complete: () => {}
+					// })
 				}
 			})
 			console.log("hasLogin", this.hasLogin)
@@ -79,6 +83,14 @@
 				uni.navigateTo({
 					url
 				})
+			},
+			alertBtn() {
+				uni.navigateTo({
+					url: '/pages/public/login'
+				})
+			},
+			cancelClick() {
+				this.isShowAlert = false
 			}
 		}
 	}
@@ -94,6 +106,4 @@
 		border-radius: 10px;
 		padding: 10px;
 	}
-
-	
 </style>

+ 61 - 34
pages/erp/exWarehousing/exWarehousing.vue

@@ -75,15 +75,17 @@
 			</view>
 			<view class="row row-bottom">
 				<view class="left">出库类型</view>
-				<input v-model='detailData.inOutType'  class="right-bottom"  :disabled="isSelectType" placeholder="自动获取"></input>
-			<!-- 	<u-picker :range="warehousingTypeList" range-key="constValue" @confirm='warehousingTypePicker($event)'
+				<input v-model='detailData.inOutType' class="right-bottom" :disabled="isSelectType"
+					placeholder="自动获取"></input>
+				<!-- 	<u-picker :range="warehousingTypeList" range-key="constValue" @confirm='warehousingTypePicker($event)'
 					v-model="show5" mode="selector">
 				</u-picker> -->
 			</view>
 			<view class="row">
 				<view class="left">出库方式</view>
 				<view @click='show8=true'>{{detailData.outType?detailData.outType:'汽运'}}</view>
-				<u-picker v-model="show8" mode="selector" range-key="name" :range="multiSelector" @confirm='outtypeChange($event)'>
+				<u-picker v-model="show8" mode="selector" range-key="name" :range="multiSelector"
+					@confirm='outtypeChange($event)'>
 				</u-picker>
 			</view>
 			<view class="row row-bottom">
@@ -97,12 +99,15 @@
 				<u-picker v-model="show9" mode="selector" range-key="name" :range="multiSelector1" @confirm='usestartChange($event)'>
 				</u-picker> -->
 				<input v-model='detailData.boxNo' @input="toUpperCase" class="right-bottom" placeholder="请输入箱号"></input>
-				<input v-model='detailData.boxNoOther' @input="toUpperCase1" class="right-bottom" placeholder="请输入箱号"></input>
+				<input v-model='detailData.boxNoOther' @input="toUpperCase1" class="right-bottom"
+					placeholder="请输入箱号"></input>
 			</view>
 			<view v-if='detailData.outType=="火运"' class="row row-bottom">
 				<view class="left">车厢号</view>
-				<input v-model='detailData.boxNo' @input="toUpperCase" class="right-bottom" placeholder="请输入车厢号"></input>
-				<input v-model='detailData.boxNoOther' @input="toUpperCase1" class="right-bottom" placeholder="请输入车厢号"></input>
+				<input v-model='detailData.boxNo' @input="toUpperCase" class="right-bottom"
+					placeholder="请输入车厢号"></input>
+				<input v-model='detailData.boxNoOther' @input="toUpperCase1" class="right-bottom"
+					placeholder="请输入车厢号"></input>
 			</view>
 			<view v-if='detailData.outType=="散船"' class="row row-bottom">
 				<view class="left">仓位号</view>
@@ -183,22 +188,44 @@
 				show6: false,
 				show7: false,
 				isPC: true,
-				show8:false,
-				usestart:'',
-				multiSelector:[
-					{name:'汽运',value:'0'},
-					{name:'火运',value:'1'},
-					{name:'集装箱船',value:'2'},
-					{name:'散船',value:'3'},
+				show8: false,
+				usestart: '',
+				multiSelector: [{
+						name: '汽运',
+						value: '0'
+					},
+					{
+						name: '火运',
+						value: '1'
+					},
+					{
+						name: '集装箱船',
+						value: '2'
+					},
+					{
+						name: '散船',
+						value: '3'
+					},
 				],
-				show9:false,
-				multiSelector1:[
-					{name:'汽运',value:'0'},
-					{name:'火运',value:'1'},
-					{name:'集装箱船',value:'2'},
-					{name:'散船',value:'3'},
+				show9: false,
+				multiSelector1: [{
+						name: '汽运',
+						value: '0'
+					},
+					{
+						name: '火运',
+						value: '1'
+					},
+					{
+						name: '集装箱船',
+						value: '2'
+					},
+					{
+						name: '散船',
+						value: '3'
+					},
 				],
-				isSelectType:true,
+				isSelectType: true,
 				// contractNoList: [{
 				// 	contractNo: ""
 				// }],
@@ -231,7 +258,7 @@
 				warehouseName: '',
 				binNumber: '',
 				detailData: {
-					outType:'汽运',
+					outType: '汽运',
 					contractNo: "请选择合同编号或移库任务编号",
 					type: "干粮",
 					grade: "请输入品级",
@@ -265,7 +292,7 @@
 		},
 		onShow() {
 			let _data = uni.getStorageSync('erpContractNoCK') == '' ? {} : uni.getStorageSync('erpContractNoCK')
-			console.log("当前合同",_data)
+			console.log("当前合同", _data)
 			this.binNumber = helper.erpWarehouse.binNumber
 			this.warehouseName = helper.erpWarehouse.warehouseName
 			this.detailData.goodsName = _data.goodsName;
@@ -324,14 +351,14 @@
 			this.handler()
 		},
 		methods: {
-			toUpperCase(val){
+			toUpperCase(val) {
 				this.detailData.boxNo = val.detail.value.toUpperCase()
 			},
-			toUpperCase1(val){
+			toUpperCase1(val) {
 				this.detailData.boxNoOther = val.detail.value.toUpperCase()
 			},
-			usestartChange(e){
-				this.usestart=this.multiSelector1[e].name
+			usestartChange(e) {
+				this.usestart = this.multiSelector1[e].name
 			},
 			//计算纯重
 			pureWeightCount() {
@@ -343,8 +370,8 @@
 					this.detailData.pureWeight = this.detailData.pureWeight.toFixed(3)
 				}
 			},
-			outtypeChange(e){
-				this.detailData.outType=this.multiSelector[e].name
+			outtypeChange(e) {
+				this.detailData.outType = this.multiSelector[e].name
 				console.log(e)
 			},
 			outWarehouse() {
@@ -652,11 +679,11 @@
 						return
 					}
 				}
-				if(this.detailData.boxNo){
-					this.detailData.boxNo=this.detailData.boxNo.toUpperCase()
+				if (this.detailData.boxNo) {
+					this.detailData.boxNo = this.detailData.boxNo.toUpperCase()
 				}
-				if(this.detailData.boxNoOther){
-					this.detailData.boxNoOther=this.detailData.boxNoOther.toUpperCase()
+				if (this.detailData.boxNoOther) {
+					this.detailData.boxNoOther = this.detailData.boxNoOther.toUpperCase()
 				}
 				this.detailData.baseId = helper.erpWarehouse.warehouseId
 				this.detailData.warehouseName = helper.erpWarehouse.warehouseName
@@ -687,7 +714,7 @@
 						if (res.confirm) {
 							that.$api.doRequest('post', '/warehouseInOutInfo/InOutWarehouse',
 								that.detailData).then(res => {
-									console.log(res,"报异常")
+								console.log(res, "报异常")
 								if (res.data.code == 200) {
 									that.$api.msg(title)
 									setTimeout(() => {
@@ -722,7 +749,7 @@
 
 	.warp {
 		margin: 10rpx;
-		padding: 20rpx 20rpx 140rpx 20rpx;
+		padding: 20rpx 20rpx 300rpx 20rpx;
 
 		.top {
 			display: flex;

+ 1 - 0
pages/erp/exWarehousing/selectContractNo.vue

@@ -125,6 +125,7 @@
 			padding: 10rpx 15rpx;
 			border-radius: 30rpx;
 			text-align: center;
+			overflow-x: scroll;
 		}
 	}
 

+ 1 - 1
pages/erp/improvedExWaehousing/improvedExWaehousingDetail.vue

@@ -695,7 +695,7 @@
 
 	.warp {
 		margin: 10rpx;
-		padding: 20rpx 20rpx 140rpx 20rpx;
+		padding: 20rpx 20rpx 300rpx 20rpx;
 
 		.top {
 			display: flex;

+ 1 - 1
pages/erp/improvedWrehousing/improvedWrehousingDetail.vue

@@ -860,7 +860,7 @@
 
 	.warp {
 		margin: 10rpx;
-		padding: 20rpx 20rpx 140rpx 20rpx;
+		padding: 20rpx 20rpx 300rpx 20rpx;
 
 		.top {
 			display: flex;

+ 54 - 38
pages/erp/index.vue

@@ -42,14 +42,18 @@
 					<view :class="['cuIcon-' + item.cuIcon,'text-' + item.color]">
 						<image :src="item.src" class="sign"></image>
 					</view>
-		
+
 					<text>{{item.name}}</text>
 				</view>
 			</view>
 		</view>
 		<u-modal v-model="isShowAlert" :title-style="{fontSize: '18px',fontWeight:'500'}"
 			:content-style="{fontSize: '14px',fontWeight:'400'}" confirm-color='#22C572' confirm-text='立即开通'
-			title='您尚未开通ERP业务' showCancelButton='false' :content="content" @confirm="goOpenService" @cancel="cancelClick"></u-modal>
+			title='您尚未开通ERP业务' showCancelButton='false' :content="content" @confirm="goOpenService"
+			@cancel="cancelClick"></u-modal>
+		<u-modal v-model="isShowAlert1" :title-style="{fontSize: '18px',fontWeight:'500'}"
+			:content-style="{fontSize: '14px',fontWeight:'400'}" confirm-color='#22C572' confirm-text='确定' title='登录提示'
+			showCancelButton='false' :content="content1" @confirm="alertBtn1" @cancel="cancelClick1"></u-modal>
 	</view>
 </template>
 <script>
@@ -63,13 +67,15 @@
 		},
 		data() {
 			return {
+				isShowAlert1: false,
+				content1: '您尚未登录,是否立即登录?',
 				show0: false,
 				show1: false,
 				show2: false,
 				isShowAlert: false,
 				compName: '',
 				compList: [],
-				isShowBtn:false,
+				isShowBtn: false,
 				content: '易粮易运ERP系统包含合同管理、仓库管理、运输管理、结算管理等多个模块,可为粮企提供粮食贸易的全流程服务,平台诚邀您的加入。',
 				warehouseName: '暂无仓库',
 				binNumber: '暂无',
@@ -81,7 +87,7 @@
 				allWarehouse: [],
 				gridCol: 4,
 				gridBorder: false,
-				personCharge:'',
+				personCharge: '',
 				gridList: [{
 						num: 0,
 						name: '入库',
@@ -137,8 +143,7 @@
 					// 	show: true
 					// }
 				],
-				gridList1: [
-					{
+				gridList1: [{
 						num: 0,
 						name: '发货反馈',
 						// icon: 'cuIcon-copy',
@@ -206,21 +211,22 @@
 			this.$api.doRequest('get', '/commonUser/api/checkSession').then(res => {
 				console.log("checkSession", res)
 				if (res.data.data == "INVALID") {
-					uni.showModal({
-						title: '登录提示',
-						content: '当前登入信息验证失败,是否重新登录?',
-						showCancel: true,
-						confirmText: '登录',
-						success: (e) => {
-							if (e.confirm) {
-								uni.navigateTo({
-									url: '/pages/public/login'
-								})
-							}
-						},
-						fail: () => {},
-						complete: () => {}
-					})
+					this.isShowAlert1 = true;
+					// uni.showModal({
+					// 	title: '登录提示',
+					// 	content: '当前登入信息验证失败,是否重新登录?',
+					// 	showCancel: true,
+					// 	confirmText: '登录',
+					// 	success: (e) => {
+					// 		if (e.confirm) {
+					// 			uni.navigateTo({
+					// 				url: '/pages/public/login'
+					// 			})
+					// 		}
+					// 	},
+					// 	fail: () => {},
+					// 	complete: () => {}
+					// })
 				}
 			})
 			this.$api.doRequest('get', '/openServiceInfo/selectCommonCompany', {
@@ -239,10 +245,19 @@
 			})
 		},
 		methods: {
-			cancelClick(){
+
+			cancelClick() {
 				uni.navigateBack(-1)
 			},
 			getCompWarehouse() {},
+			alertBtn1() {
+				uni.navigateTo({
+					url: '/pages/public/login'
+				})
+			},
+			cancelClick1() {
+				this.isShowAlert = false
+			},
 			goOpenService() {
 				if (!this.hasLogin) {
 					url = '/pages/public/login';
@@ -266,21 +281,22 @@
 			gridClick(item, index) {
 				var that = this
 				if (!this.hasLogin) {
-					uni.showModal({
-						title: '登录提示',
-						content: '您尚未登录,是否立即登录?',
-						showCancel: true,
-						confirmText: '登录',
-						success: (e) => {
-							if (e.confirm) {
-								uni.navigateTo({
-									url: '/pages/public/login'
-								})
-							}
-						},
-						fail: () => {},
-						complete: () => {}
-					})
+					this.isShowAlert1 = true;
+					// uni.showModal({
+					// 	title: '登录提示',
+					// 	content: '您尚未登录,是否立即登录?',
+					// 	showCancel: true,
+					// 	confirmText: '登录',
+					// 	success: (e) => {
+					// 		if (e.confirm) {
+					// 			uni.navigateTo({
+					// 				url: '/pages/public/login'
+					// 			})
+					// 		}
+					// 	},
+					// 	fail: () => {},
+					// 	complete: () => {}
+					// })
 				} else {
 					if (item.url) {
 						helper.erpWarehouse = {
@@ -292,7 +308,7 @@
 							allWarehouse: this.allWarehouse,
 							warehouseCWList: this.warehouseCWList,
 							positionId: this.positionId,
-							personCharge:this.personCharge
+							personCharge: this.personCharge
 						}
 						uni.navigateTo({
 							url: item.url

+ 26 - 15
pages/erp/openService/openService.vue

@@ -34,6 +34,8 @@
 		},
 		data() {
 			return {
+				isShowAlert: false,
+				content: '当前登入信息验证失败,是否重新登录?',
 				personInfo: {
 					name: '',
 					mobilePhone: '',
@@ -78,21 +80,22 @@
 			this.$api.doRequest('get', '/commonUser/api/checkSession').then(res => {
 				console.log("checkSession", res)
 				if (res.data.data == "INVALID") {
-					uni.showModal({
-						title: '登录提示',
-						content: '当前登入信息验证失败,是否重新登录?',
-						showCancel: true,
-						confirmText: '登录',
-						success: (e) => {
-							if (e.confirm) {
-								uni.navigateTo({
-									url: '/pages/public/login'
-								})
-							}
-						},
-						fail: () => {},
-						complete: () => {}
-					})
+					this.isShowAlert = true;
+					// uni.showModal({
+					// 	title: '登录提示',
+					// 	content: '当前登入信息验证失败,是否重新登录?',
+					// 	showCancel: true,
+					// 	confirmText: '登录',
+					// 	success: (e) => {
+					// 		if (e.confirm) {
+					// 			uni.navigateTo({
+					// 				url: '/pages/public/login'
+					// 			})
+					// 		}
+					// 	},
+					// 	fail: () => {},
+					// 	complete: () => {}
+					// })
 				}
 			})
 			console.log("hasLogin", this.hasLogin)
@@ -110,6 +113,14 @@
 					url
 				})
 			},
+			alertBtn() {
+				uni.navigateTo({
+					url: '/pages/public/login'
+				})
+			},
+			cancelClick() {
+				this.isShowAlert = false
+			},
 			calculate() {},
 			submit() {
 				if (!this.personInfo.name) {

+ 1 - 4
pages/erp/receivingfeedback/details.vue

@@ -881,7 +881,6 @@
 				})
 			},
 			getImgUrl(res1,res2,res3,res4) {
-				// debugger
 				this.freightspace[res4].unloadPoundImg=res1
 				
 				// this.detailData.addressUrl = res
@@ -897,7 +896,6 @@
 				}
 			},
 			setImgUrl(val){
-				// debugger
 				for(let i = 0;i<freightspace.length;i++){
 					
 				}
@@ -919,7 +917,6 @@
 			},
 			train(index){
 				console.log(index)
-				// debugger
 				this.freightspace[index].show2 = true
 				this.$forceUpdate();
 				this.index=index
@@ -952,7 +949,7 @@
 	}
 	.wrap {
 		margin: 10rpx;
-		padding: 20rpx 20rpx 240rpx 20rpx;
+		padding: 20rpx 20rpx 300rpx 20rpx;
 	
 		.top {
 			display: flex;

+ 1 - 1
pages/erp/warehousing/warehousing.vue

@@ -852,7 +852,7 @@
 
 	.warp {
 		margin: 10rpx;
-		padding: 20rpx 20rpx 140rpx 20rpx;
+		padding: 20rpx 20rpx 300rpx 20rpx;
 
 		.top {
 			border-radius: 20rpx;

+ 29 - 15
pages/erpbusiness/QRCode/QRCode.vue

@@ -5,6 +5,9 @@
 			<img :src="imgSrc" alt="" class="img">
 			<!-- <view class="qrcode-text">客户扫码</view> -->
 		</view>
+		<u-modal v-model="isShowAlert" :title-style="{fontSize: '18px',fontWeight:'500'}"
+			:content-style="{fontSize: '14px',fontWeight:'400'}" confirm-color='#22C572' confirm-text='确定' title='登录提示'
+			showCancelButton='false' :content="content" @confirm="alertBtn" @cancel="cancelClick"></u-modal>
 	</view>
 </template>
 
@@ -15,26 +18,29 @@
 	export default {
 		data() {
 			return {
-				imgSrc: ""
+				imgSrc: "",
+				isShowAlert: false,
+				content: '登录信息过期需要重新登录,是否立即登录?',
 			};
 		},
 		onReady() {
 			this.$api.doRequest('get', '/commonUser/api/checkSession').then(res => {
-				console.log("checkSession",res)
+					console.log("checkSession", res)
 					if (res.data.data == "INVALID") {
-						uni.showModal({
-							title: "登录提示",
-							content: "Session过期需要重新登录,是否立即登录",
-							showCancel: true,
-							confirmText: '登录',
-							success(e) {
-								if (e.confirm) {
-									uni.navigateTo({
-										url: '/pages/public/login'
-									})
-								}
-							}
-						})
+						this.isShowAlert = true;
+						// uni.showModal({
+						// 	title: "登录提示",
+						// 	content: "Session过期需要重新登录,是否立即登录",
+						// 	showCancel: true,
+						// 	confirmText: '登录',
+						// 	success(e) {
+						// 		if (e.confirm) {
+						// 			uni.navigateTo({
+						// 				url: '/pages/public/login'
+						// 			})
+						// 		}
+						// 	}
+						// })
 					} else {
 						this.getQRCode()
 					}
@@ -67,6 +73,14 @@
 			...mapState(['hasLogin', 'userInfo'])
 		},
 		methods: {
+			alertBtn() {
+				uni.navigateTo({
+					url: '/pages/public/login'
+				})
+			},
+			cancelClick() {
+				this.isShowAlert = false
+			},
 			maskClick() {
 				uni.navigateBack(-1)
 			},

+ 29 - 15
pages/erpbusiness/acquisitionInspection/acquisitionInspection.vue

@@ -56,14 +56,17 @@
 					<view v-if="getRoles('acquisitionWeight.mao')&&item.status!='已称皮重'" class="right"
 						@click="grossWeightClick(item)">毛重</view>
 					<view v-if="getRoles('acquisitionWeight.weight')&&(!(item.paymentManagement&&item.paymentManagement.status=='已收款')||
-					!(item.paymentManagement&&item.paymentManagement.status=='部分收款')) && item.status!='已质检' && item.allow != 2" class="right"
-						@click="tareClick(item)" >皮重</view>
+					!(item.paymentManagement&&item.paymentManagement.status=='部分收款')) && item.status!='已质检' && item.allow != 2"
+						class="right" @click="tareClick(item)">皮重</view>
 				</view>
 			</view>
 		</view>
 		<view v-show="isContent">
 			<uni-load-more :status="loadStatus"></uni-load-more>
 		</view>
+		<u-modal v-model="isShowAlert" :title-style="{fontSize: '18px',fontWeight:'500'}"
+			:content-style="{fontSize: '14px',fontWeight:'400'}" confirm-color='#22C572' confirm-text='确定' title='登录提示'
+			showCancelButton='false' :content="content" @confirm="alertBtn" @cancel="cancelClick"></u-modal>
 	</view>
 </template>
 
@@ -74,6 +77,8 @@
 	export default {
 		data() {
 			return {
+				isShowAlert: false,
+				content: '登录信息过期需要重新登录,是否立即登录?',
 				inputKeyword: '',
 				warehouseName: '',
 				warehouseId: '',
@@ -95,19 +100,20 @@
 			}
 			this.$api.doRequest('get', '/commonUser/api/checkSession').then(res => {
 					if (res.data.data == "INVALID") {
-						uni.showModal({
-							title: "登录提示",
-							content: "Session过期需要重新登录,是否立即登录",
-							showCancel: true,
-							confirmText: '登录',
-							success(e) {
-								if (e.confirm) {
-									uni.navigateTo({
-										url: '/pages/public/login'
-									})
-								}
-							}
-						})
+						this.isShowAlert = true;
+						// uni.showModal({
+						// 	title: "登录提示",
+						// 	content: "Session过期需要重新登录,是否立即登录",
+						// 	showCancel: true,
+						// 	confirmText: '登录',
+						// 	success(e) {
+						// 		if (e.confirm) {
+						// 			uni.navigateTo({
+						// 				url: '/pages/public/login'
+						// 			})
+						// 		}
+						// 	}
+						// })
 					} else {
 						this.compId = uni.getStorageSync('pcUserInfo').compId
 						console.log("compId", this.compId)
@@ -141,6 +147,14 @@
 			// this.getMoreNews()
 		},
 		methods: {
+			alertBtn() {
+				uni.navigateTo({
+					url: '/pages/public/login'
+				})
+			},
+			cancelClick() {
+				this.isShowAlert = false
+			},
 			//获取当前按钮权限
 			getRoles: function(role) {
 				let _roles = uni.getStorageSync('rolesList')

+ 67 - 57
pages/erpbusiness/acquisitionInspection/grossWeightDetail1.vue

@@ -1,9 +1,9 @@
 <template>
 	<view class="warp">
 		<view class="content">
-				<view class="title">
-					基本信息
-				</view>
+			<view class="title">
+				基本信息
+			</view>
 			<view class="row">
 				<view class="left">仓库</view>
 				<view class="right">{{detailData.warehouseName}}</view>
@@ -18,7 +18,7 @@
 			</view>
 			<view class="row">
 				<view class="left">车牌号</view>
-				<view  class="right">{{detailData.qualityInspectionManagement.carNumber}}</view>
+				<view class="right">{{detailData.qualityInspectionManagement.carNumber}}</view>
 			</view>
 			<view class="row">
 				<view class="left">仓位号</view>
@@ -47,22 +47,25 @@
 			</view>
 			<view class="row row-bottom">
 				<view class="left">毛重(公斤)</view>
-				<input @input='calculate' v-model='detailData.grossWeight' class="right-bottom" placeholder="输入毛重"></input>
+				<input @input='calculate' v-model='detailData.grossWeight' class="right-bottom"
+					placeholder="输入毛重"></input>
 			</view>
 			<view class="row row-bottom" style="border: 0;">
 				<view class="left">净重(公斤)</view>
 				<input v-model='detailData.netWeight' class="right-bottom" disabled placeholder="自动计算"></input>
 			</view>
 		</view>
-		<view class="content2">
-			<view class="left">上传磅单</view>
-			<upload class="upload" ref="upload" :action="action" :max-size="maxSize" :max-count="1"
-				:size-type="['compressed']" @on-success="getImgUrl" @on-error="onError" @on-remove="onRemove"
-				@on-uploaded="isAdd = true" :before-upload="filterFileType" @on-progress="onProgress"></upload>
+		<view style="padding-bottom: 300rpx;">
+			<view class="content2">
+				<view class="left">上传磅单</view>
+				<upload class="upload" ref="upload" :action="action" :max-size="maxSize" :max-count="1"
+					:size-type="['compressed']" @on-success="getImgUrl" @on-error="onError" @on-remove="onRemove"
+					@on-uploaded="isAdd = true" :before-upload="filterFileType" @on-progress="onProgress"></upload>
+			</view>
 		</view>
-		<u-toast ref="uToast"/>
+		
+		<u-toast ref="uToast" />
 		<u-button type="primary" class="submit" @click="submit">提交</u-button>
-
 	</view>
 </template>
 
@@ -80,7 +83,7 @@
 				isAdd: true,
 				detailData: {
 					name: "",
-					qualityInspectionManagement:{}
+					qualityInspectionManagement: {}
 				}
 			}
 		},
@@ -104,11 +107,11 @@
 					this.isAdd = false;
 				}
 			},
-			calculate(){
-				this.detailData.netWeight=this.detailData.grossWeight-this.detailData.tare
+			calculate() {
+				this.detailData.netWeight = this.detailData.grossWeight - this.detailData.tare
 			},
 			getImgUrl(res) {
-				this.detailData.addressUrl=res
+				this.detailData.addressUrl = res
 				console.log(res)
 				console.log('------------res-----------')
 			},
@@ -117,50 +120,52 @@
 				console.log('------------error-----------')
 				console.log(error)
 			},
-			contractNopicker(e){
-				this.detailData.goodsName=this.contractNoList[e[0]].goodsName
-				this.detailData.contractNo=this.contractNoList[e[0]].contractNo
+			contractNopicker(e) {
+				this.detailData.goodsName = this.contractNoList[e[0]].goodsName
+				this.detailData.contractNo = this.contractNoList[e[0]].contractNo
 			},
-			binNumberpicker(e){
-				this.detailData.binNumber=this.positionList[e[0]].binNumber
+			binNumberpicker(e) {
+				this.detailData.binNumber = this.positionList[e[0]].binNumber
 			},
-			getWeighingManagement(){
-					this.$api.doRequest('get', '/weighingManagement/getWeighingManagement',
-					{id: this.id}).then(res => {
-						if(res.data.code==200){
+			getWeighingManagement() {
+				this.$api.doRequest('get', '/weighingManagement/getWeighingManagement', {
+					id: this.id
+				}).then(res => {
+					if (res.data.code == 200) {
 						console.log(res)
 						this.detailData = res.data.data
-						}
-					})
-					this.$api.doRequest('get', '/warehouseBaseInfo/getWarehouse',
-					{id: this.cangId}).then(res => {
-						if(res.data.code==200){
+					}
+				})
+				this.$api.doRequest('get', '/warehouseBaseInfo/getWarehouse', {
+					id: this.cangId
+				}).then(res => {
+					if (res.data.code == 200) {
 						this.positionList = res.data.data.warehousePositionInfoList
-						}
-					})
-					this.$api.doRequest('get', '/warehouseBaseInfo/selectContractNoList',{
-						compId: '',
-						flag:5
-						}).then(res => {
-						if(res.data.code==200){
+					}
+				})
+				this.$api.doRequest('get', '/warehouseBaseInfo/selectContractNoList', {
+					compId: '',
+					flag: 5
+				}).then(res => {
+					if (res.data.code == 200) {
 						this.contractNoList = res.data.data
-						}
-					})
+					}
+				})
 			},
 			onProgress(e) {
 				console.log(e)
 			},
 			onRemove(index) {},
-			submit(){
+			submit() {
 				if (!this.detailData.grossWeight) {
 					this.$api.msg('毛重不能为空')
 					return
 				}
 				if (isNaN(this.detailData.grossWeight) ||
 					(String(this.detailData.grossWeight).indexOf('.') != -1 &&
-					String(this.detailData.grossWeight).length -
-					(String(this.detailData.grossWeight).indexOf('.') + 1) >
-					1) ||
+						String(this.detailData.grossWeight).length -
+						(String(this.detailData.grossWeight).indexOf('.') + 1) >
+						1) ||
 					this.detailData.grossWeight < 1 ||
 					this.detailData.grossWeight > 100000
 				) {
@@ -169,18 +174,18 @@
 				}
 				let that = this
 				uni.showModal({
-					content:"确定提交检斤信息?",
+					content: "确定提交检斤信息?",
 					success(res) {
-						if(res.confirm){
+						if (res.confirm) {
 							that.$api.doRequest('post', '/weighingManagement/api/editGrossWeight',
-							that.detailData).then(res => {
-								if(res.data.code==200){
-								that.$api.msg('提交成功')
-								uni.navigateBack()
+								that.detailData).then(res => {
+								if (res.data.code == 200) {
+									that.$api.msg('提交成功')
+									uni.navigateBack()
 								}
 							})
 						}
-						
+
 					}
 				})
 			}
@@ -200,22 +205,24 @@
 
 	.content,
 	.content1,
-	.content2
-	{
+	.content2 {
 		border-radius: 20rpx;
 		background: white;
 		padding: 20rpx;
-		.title{
+
+		.title {
 			font-size: 28rpx;
 			font-weight: 600;
 			color: #333333;
 		}
+
 		.row {
 			display: flex;
 			justify-content: space-between;
 			padding: 21rpx 0;
 
-			.right,input {
+			.right,
+			input {
 				font-size: 28rpx;
 				color: #333333;
 			}
@@ -230,14 +237,17 @@
 			}
 		}
 	}
-	.content1{
+
+	.content1 {
 		margin-top: 20rpx;
 	}
-	.content2{
+
+	.content2 {
 		margin-top: 10px;
 		display: flex;
 		align-items: center;
-		.left{
+
+		.left {
 			margin-right: 20px;
 		}
 	}

+ 72 - 52
pages/erpbusiness/acquisitionInspection/warehouseWeighing.vue

@@ -33,7 +33,8 @@
 				<view class="row2" v-if="item.paymentManagement">
 					<view>{{item.paymentManagement.customerName}}</view>
 					<view>{{item.paymentManagement.carNo}}</view>
-					<view>{{item.paymentManagement.goodsName}}({{item.qualityInspectionManagement.waterContent}}水)</view>
+					<view>{{item.paymentManagement.goodsName}}({{item.qualityInspectionManagement.waterContent}}水)
+					</view>
 				</view>
 				<view class="row3">
 					<view class="row3-item">
@@ -50,11 +51,13 @@
 					</view>
 				</view>
 				<view class="row4">
-					<view v-if="getRoles('acquisitionWeightOut.weight')&&item.status!='已称毛重'" class="right" @click.stop="tareClick(item)">皮重</view>
+					<view v-if="getRoles('acquisitionWeightOut.weight')&&item.status!='已称毛重'" class="right"
+						@click.stop="tareClick(item)">皮重</view>
 					<view v-if="getRoles('acquisitionWeightOut.mao')&&!(item.paymentManagement&&item.paymentManagement.status=='已收款')||
 					!(item.paymentManagement&&item.paymentManagement.status=='部分收款')
 					" class="right" :class="item.status=='已质检'?'gray':''" @click.stop="grossWeightClick(item)">毛重</view>
-					<view class="right" v-if='getRoles("acquisitionWeightOut.view")' @click.stop="delClick(item)">删除</view>
+					<view class="right" v-if='getRoles("acquisitionWeightOut.view")' @click.stop="delClick(item)">删除
+					</view>
 				</view>
 			</view>
 		</view>
@@ -65,6 +68,9 @@
 		<view class="footer">
 			<view @click='add' class="button" v-if='getRoles("acquisitionWeightOut.new")'>新增</view>
 		</view>
+		<u-modal v-model="isShowAlert" :title-style="{fontSize: '18px',fontWeight:'500'}"
+			:content-style="{fontSize: '14px',fontWeight:'400'}" confirm-color='#22C572' confirm-text='确定' title='登录提示'
+			showCancelButton='false' :content="content" @confirm="alertBtn" @cancel="cancelClick"></u-modal>
 	</view>
 </template>
 
@@ -72,20 +78,22 @@
 	import {
 		mapState
 	} from 'vuex';
-	import helper from '@/common/helper.js'; 
+	import helper from '@/common/helper.js';
 	export default {
 		data() {
 			return {
+				isShowAlert: false,
+				content: '登录信息过期需要重新登录,是否立即登录?',
 				inputKeyword: '',
 				warehouseName: '',
 				isShowWarehouse: false,
 				warehouseList: [],
-				isContent:false,
-				loadStatus:'noMore',
+				isContent: false,
+				loadStatus: 'noMore',
 				dataList: [],
-				pageSize:10,
-				currentPage:1,
-				cangId:''
+				pageSize: 10,
+				currentPage: 1,
+				cangId: ''
 			}
 		},
 		computed: {
@@ -94,19 +102,20 @@
 		onShow() {
 			this.$api.doRequest('get', '/commonUser/api/checkSession').then(res => {
 					if (res.data.data == "INVALID") {
-						uni.showModal({
-							title: "登录提示",
-							content: "Session过期需要重新登录,是否立即登录",
-							showCancel: true,
-							confirmText: '登录',
-							success(e) {
-								if (e.confirm) {
-									uni.navigateTo({
-										url: '/pages/public/login'
-									})
-								}
-							}
-						})
+						this.isShowAlert = true;
+						// uni.showModal({
+						// 	title: "登录提示",
+						// 	content: "Session过期需要重新登录,是否立即登录",
+						// 	showCancel: true,
+						// 	confirmText: '登录',
+						// 	success(e) {
+						// 		if (e.confirm) {
+						// 			uni.navigateTo({
+						// 				url: '/pages/public/login'
+						// 			})
+						// 		}
+						// 	}
+						// })
 					} else {
 						this.compId = uni.getStorageSync('pcUserInfo').compId
 						console.log("compId", this.compId)
@@ -124,35 +133,44 @@
 				});
 		},
 		onPullDownRefresh() {
-			this.currentPage=1
-			this.gridList=[]
+			this.currentPage = 1
+			this.gridList = []
 			this.getList()
 		},
-		 onReachBottom() {
-			 this.currentPage+=1
-		    this.getList()
+		onReachBottom() {
+			this.currentPage += 1
+			this.getList()
 			// this.getMoreNews()
 		},
 		methods: {
+			alertBtn() {
+				uni.navigateTo({
+					url: '/pages/public/login'
+				})
+			},
+			cancelClick() {
+				this.isShowAlert = false
+			},
 			//获取当前按钮权限
 			getRoles: function(role) {
 				let _roles = uni.getStorageSync('rolesList')
 				for (let i = 0; i < _roles.length; i++) {
 					if (_roles[i] == role) {
-						 return true
-					} 
+						return true
+					}
 				}
 				return false
 			},
-			add(){
+			add() {
 				uni.navigateTo({
-					url:'/pages/erpbusiness/acquisitionInspection/add_check_the_weight?cangId='+this.cangId+'&warehouseName='+this.warehouseName
+					url: '/pages/erpbusiness/acquisitionInspection/add_check_the_weight?cangId=' + this.cangId +
+						'&warehouseName=' + this.warehouseName
 				})
 			},
 			loadData() {
 				this.$api.doRequest('get', '/warehouseBaseInfo/selectWarehouseSelf', {
 					compId: '',
-					personCharge:this.userInfo.phone
+					personCharge: this.userInfo.phone
 				}).then(res => {
 					console.log("warehouseBaseInfo", res)
 					let _resData = res.data.data
@@ -178,11 +196,11 @@
 					warehouseName: this.warehouseName,
 					managementType: 3,
 				}).then(res => {
-					var data=res.data.data.records
+					var data = res.data.data.records
 					this.dataList = this.dataList.concat(data)
 					console.log(res.data.data.records)
-					if(res.data.data.records.length==0){
-						this.isContent=true
+					if (res.data.data.records.length == 0) {
+						this.isContent = true
 					}
 					// console.log("--------------------------------")
 					// console.log("this.dataList",this.dataList)
@@ -201,13 +219,13 @@
 				if (item.status == "已质检") return;
 				console.log(item)
 				uni.navigateTo({
-					url: './grossWeightDetail1?id=' + item.id+'&cangId='+this.cangId
+					url: './grossWeightDetail1?id=' + item.id + '&cangId=' + this.cangId
 				})
 			},
 			tareClick(item) {
 				// 
 				uni.navigateTo({
-					url: './tareDetail1?id=' + item.id+'&cangId='+this.cangId
+					url: './tareDetail1?id=' + item.id + '&cangId=' + this.cangId
 				})
 			},
 			delClick(val) {
@@ -245,7 +263,7 @@
 			},
 			toDetail(item) {
 				uni.navigateTo({
-					url: './tareDetail2?id=' + item.id+'&cangId='+this.cangId
+					url: './tareDetail2?id=' + item.id + '&cangId=' + this.cangId
 				})
 			}
 		}
@@ -378,20 +396,22 @@
 	}
 
 	.gray {}
-	.footer{
-		background:#fff;
-		position:fixed;
-		bottom:0;
-		width:100%;
-		padding:20px 10px;
-		z-index:10;
-		.button{
-			background:#22C572;
-			width:90%;
-			margin:0 auto;
-			padding:10px;
-			color:#fff;
-			text-align:center;
+
+	.footer {
+		background: #fff;
+		position: fixed;
+		bottom: 0;
+		width: 100%;
+		padding: 20px 10px;
+		z-index: 10;
+
+		.button {
+			background: #22C572;
+			width: 90%;
+			margin: 0 auto;
+			padding: 10px;
+			color: #fff;
+			text-align: center;
 			border-radius: 30px;
 		}
 	}

+ 266 - 251
pages/erpbusiness/add_quality_testing.vue

@@ -28,53 +28,51 @@
 			<view class="c-row ">
 				<view class="title">车牌号</view>
 				<view class="con-list">
-					<input v-model='gridList.carNumber' placeholder="请输入车牌号"
-						 name="input"></input>
+					<input v-model='gridList.carNumber' placeholder="请输入车牌号" name="input"></input>
 				</view>
 			</view>
 			<view v-if="gridList.paramType != '1'" class="c-row ">
 				<view class="title">扣重比</view>
 				<view class="con-list">
-					<input v-model='gridList.buckleWeightRatio' placeholder="请输入扣重比"
-						 name="input"></input>
+					<input v-model='gridList.buckleWeightRatio' placeholder="请输入扣重比" name="input"></input>
 				</view>
 			</view>
 			<view v-else class="c-row ">
 				<view class="title">扣杂</view>
 				<view class="con-list">
 					<input v-model='gridList.buckleMiscellaneous' placeholder="初检扣杂" @input="waterContentChange"
-						 name="input"></input>
+						name="input"></input>
 					<input v-model='gridList.reBuckleMiscellaneous' placeholder="复检扣杂" @input="waterContentChange"
-						 	 name="input"></input>
+						name="input"></input>
 				</view>
 			</view>
 			<view class="c-row ">
 				<view class="title">购粮性质</view>
 				<view class="con-list">
-					<input v-model='gridList.natureOfGrainPurchase' placeholder="请输入购粮性质"
-						 name="input"></input>
+					<input v-model='gridList.natureOfGrainPurchase' placeholder="请输入购粮性质" name="input"></input>
 				</view>
 			</view>
 			<view class="c-row ">
 				<view class="title">仓位号</view>
 				<view class="con-list">
 					<view @click='show=true'>{{gridList.binNumber?gridList.binNumber:'请选择仓位号'}}</view>
-					<u-picker :range="warehouseList" range-key="binNumber" @confirm='binNumberpicker($event)' v-model="show" mode="selector" >
+					<u-picker :range="warehouseList" range-key="binNumber" @confirm='binNumberpicker($event)'
+						v-model="show" mode="selector">
 					</u-picker>
 				</view>
 			</view>
 			<view class="c-row ">
 				<view class="title">囤位号</view>
 				<view class="con-list">
-					<input type='number' v-model='gridList.storageTagNo' placeholder="请输入囤位号"
-						 name="input"></input>
+					<input type='number' v-model='gridList.storageTagNo' placeholder="请输入囤位号" name="input"></input>
 				</view>
 			</view>
 			<view class="c-row ">
 				<view class="title">货名</view>
 				<view class="con-list">
 					<view @click='show2=true'>{{gridList.goodsName}}</view>
-					<u-picker :range="goodsList" range-key="goodsName" @confirm='goodspicker($event)' v-model="show2" mode="selector" >
+					<u-picker :range="goodsList" range-key="goodsName" @confirm='goodspicker($event)' v-model="show2"
+						mode="selector">
 					</u-picker>
 				</view>
 			</view>
@@ -82,81 +80,78 @@
 				<view class="title">类型</view>
 				<view class="con-list">
 					<view @click='show3=true'>{{gridList.type}}</view>
-					<u-picker :range="typeList" @confirm='typepicker($event)' v-model="show3" mode="selector" >
+					<u-picker :range="typeList" @confirm='typepicker($event)' v-model="show3" mode="selector">
 					</u-picker>
 				</view>
 			</view>
 			<view v-if="gridList.type == '潮粮'" class="c-row">
 				<view class="title">净重单价(元/公斤)</view>
 				<view class="con-list">
-					<input v-model='gridList.tidalGrainPrice' disabled placeholder="自动获取,不可编辑"
-						 name="input"></input>
+					<input v-model='gridList.tidalGrainPrice' disabled placeholder="自动获取,不可编辑" name="input"></input>
 				</view>
 			</view>
 			<view v-if="gridList.type == '干粮'" class="c-row">
 				<view class="title">干粮单价(元/公斤)</view>
 				<view class="con-list">
-					<input v-model='gridList.dryGrainPrice' placeholder="请输入干粮单价"
-						 name="input"></input>
+					<input v-model='gridList.dryGrainPrice' placeholder="请输入干粮单价" name="input"></input>
 				</view>
 			</view>
 		</view>
-		<view style='margin-bottom:300rpx;' class='wrap'>
-			<view class='title_b'>化验信息</view>
+		<view style='padding-bottom:300rpx;'>
+			<view class='wrap'>
+				<view class='title_b'>化验信息</view>
 
-			<view class="c-row ">
-				<view class="title">等级</view>
-				<view class="con-list">
-					<view @click='show1=true'>{{gridList.grade?gridList.grade:'请选择等级'}}</view>
-					<u-picker :range="gradeList" range-key="value" @confirm='gradepicker($event)' v-model="show1" mode="selector" >
-					</u-picker>
+				<view class="c-row ">
+					<view class="title">等级</view>
+					<view class="con-list">
+						<view @click='show1=true'>{{gridList.grade?gridList.grade:'请选择等级'}}</view>
+						<u-picker :range="gradeList" range-key="value" @confirm='gradepicker($event)' v-model="show1"
+							mode="selector">
+						</u-picker>
+					</view>
 				</view>
-			</view>
-			<view class="c-row ">
-				<view class="title">水分(%)</view>
-				<view class="con-list">
-					<input v-model='gridList.waterContent' placeholder="初检水分" @input="waterContentChange"
-					 name="input"></input>
-					 <input v-model='gridList.rewaterContent' placeholder="复检水分" @input="waterContentChange"
-					  name="input"></input>
+				<view class="c-row ">
+					<view class="title">水分(%)</view>
+					<view class="con-list">
+						<input v-model='gridList.waterContent' placeholder="初检水分" @input="waterContentChange"
+							name="input"></input>
+						<input v-model='gridList.rewaterContent' placeholder="复检水分" @input="waterContentChange"
+							name="input"></input>
+					</view>
 				</view>
-			</view>
-			<view class="c-row ">
-				<view class="title">容重(克/升)</view>
-				<view class="con-list">
-					<input v-model='gridList.bulkDensity' placeholder="请输入容重" 
-					 name="input"></input>
+				<view class="c-row ">
+					<view class="title">容重(克/升)</view>
+					<view class="con-list">
+						<input v-model='gridList.bulkDensity' placeholder="请输入容重" name="input"></input>
+					</view>
 				</view>
-			</view>
-			<view class="c-row ">
-				<view class="title">不完善粒(%)</view>
-				<view class="con-list">
-					<input v-model='gridList.imperfectGrain' placeholder="请输入不完整粒占比"
-						 name="input"></input>
+				<view class="c-row ">
+					<view class="title">不完善粒(%)</view>
+					<view class="con-list">
+						<input v-model='gridList.imperfectGrain' placeholder="请输入不完整粒占比" name="input"></input>
+					</view>
 				</view>
-			</view>
-			<view class="c-row ">
-				<view class="title">杂质(%)</view>
-				<view class="con-list">
-					<input v-model='gridList.impurity' placeholder="请输入杂质占比"
-					 name="input"></input>
+				<view class="c-row ">
+					<view class="title">杂质(%)</view>
+					<view class="con-list">
+						<input v-model='gridList.impurity' placeholder="请输入杂质占比" name="input"></input>
+					</view>
 				</view>
-			</view>
-			<view class="c-row ">
-				<view class="title">霉变粒(%)</view>
-				<view class="con-list">
-					<input v-model='gridList.mildewGrain' placeholder="请输入霉变粒占比"
-					 name="input"></input>
+				<view class="c-row ">
+					<view class="title">霉变粒(%)</view>
+					<view class="con-list">
+						<input v-model='gridList.mildewGrain' placeholder="请输入霉变粒占比" name="input"></input>
+					</view>
 				</view>
-			</view>
-			<view class="c-row">
-				<view class="title">热损伤(%)</view>
-				<view class="con-list">
-					<input v-model='gridList.jiaorenli' placeholder="请输入热损伤占比"
-					 name="input"></input>
+				<view class="c-row">
+					<view class="title">热损伤(%)</view>
+					<view class="con-list">
+						<input v-model='gridList.jiaorenli' placeholder="请输入热损伤占比" name="input"></input>
+					</view>
 				</view>
 			</view>
 		</view>
+
 		<view class="footer">
 			<view @click='submit' class="button">提交</view>
 		</view>
@@ -181,53 +176,64 @@
 				modalName: '',
 				mycarStyle: '',
 				feild: undefined,
-				id:0,
-				show:false,
-				selector:[],
-				show1:false,
+				id: 0,
+				show: false,
+				selector: [],
+				show1: false,
 				inputContent: '',
 				coverTransform: 'translateY(0px)',
 				coverTransition: '0s',
 				moving: false,
 				footprintList: [],
-				searchKeyWord:'',
+				searchKeyWord: '',
 				isVip: false,
 				userInfoTmp: [],
 				inputStatus: 'none',
 				carInfo: [],
 				gridCol: 4,
-				pageSize:10,
-				show3:false,
-				show2:false,
-				goodsList:[],
-				currentPage:1,
+				pageSize: 10,
+				show3: false,
+				show2: false,
+				goodsList: [],
+				currentPage: 1,
 				gridBorder: false,
-				headUrl:"../../static/img/myimg/YongHu@3x.png",
-				userphone:"",
-				username:"请更改昵称",
+				headUrl: "../../static/img/myimg/YongHu@3x.png",
+				userphone: "",
+				username: "请更改昵称",
 				gridList: {
-					natureOfGrainPurchase:'贸易粮',
-					type:'潮粮',
-					tidalGrainPrice:'',
-					dryGrainPrice:'',
-					buckleMiscellaneous:'',
+					natureOfGrainPurchase: '贸易粮',
+					type: '潮粮',
+					tidalGrainPrice: '',
+					dryGrainPrice: '',
+					buckleMiscellaneous: '',
 				},
-				typeList:['潮粮','干粮'],
-				managementType:'',
+				typeList: ['潮粮', '干粮'],
+				managementType: '',
 				warehouseName: '',
-				warehouseList:[],
-				warehouseCount:'',
-				commonWarehouseNo:'',
+				warehouseList: [],
+				warehouseCount: '',
+				commonWarehouseNo: '',
 				showTran: true,
 				companyId: 1,
 				current: 4,
-				gradeList:[
-					{key:1,value:'一等品'},
-					{key:2,value:'二等品'},
-					{key:3,value:'三等品'},
-					{key:4,value:'等外'},
+				gradeList: [{
+						key: 1,
+						value: '一等品'
+					},
+					{
+						key: 2,
+						value: '二等品'
+					},
+					{
+						key: 3,
+						value: '三等品'
+					},
+					{
+						key: 4,
+						value: '等外'
+					},
 				],
-				cangid:''
+				cangid: ''
 			}
 		},
 		// #ifndef MP
@@ -253,131 +259,133 @@
 		computed: {
 			...mapState(['hasLogin', 'userInfo']),
 			// 手机号中间4位加*
-			starUserphone(){
+			starUserphone() {
 				let reg = /^(\d{3})\d{4}(\d{4})$/;
-				if(this.userphone){
+				if (this.userphone) {
 					return this.userphone.replace(reg, "$1****$2");
 				}
 			}
 		},
-		onLoad(options){
-			
-			this.commonWarehouseNo=options.commonWarehouseNo
-			this.warehouseCount=Number(options.warehouseCount) + 1
-			 let number = '000' + this.warehouseCount
-			 number = number.substring(number.length - 4, number.length)
-			this.gridList.warehouseName=options.warehouseName
-			this.gridList.qualityNo='SGRK' + this.getdate() + this.commonWarehouseNo + number
-			this.cangid=options.cangid
-			this.$api.doRequest('get', '/qualityInspectionManagement/api/goodsName',{
-				warehouseId:this.cangid
+		onLoad(options) {
+
+			this.commonWarehouseNo = options.commonWarehouseNo
+			this.warehouseCount = Number(options.warehouseCount) + 1
+			let number = '000' + this.warehouseCount
+			number = number.substring(number.length - 4, number.length)
+			this.gridList.warehouseName = options.warehouseName
+			this.gridList.qualityNo = 'SGRK' + this.getdate() + this.commonWarehouseNo + number
+			this.cangid = options.cangid
+			this.$api.doRequest('get', '/qualityInspectionManagement/api/goodsName', {
+				warehouseId: this.cangid
 			}).then(res => {
-				if(res.data.data){
-					
+				if (res.data.data) {
+
 				}
 			})
-			this.managementType=options.managementType
+			this.managementType = options.managementType
 		},
 		onShow() {
-			this.purchasePriceList=uni.getStorageSync('purchasePriceList')
-			if(uni.getStorageSync('checkcustomer')){
-				this.gridList.customerName=uni.getStorageSync('checkcustomer').customerName
-				this.gridList.customerPhone=uni.getStorageSync('checkcustomer').customerPhone
+			this.purchasePriceList = uni.getStorageSync('purchasePriceList')
+			if (uni.getStorageSync('checkcustomer')) {
+				this.gridList.customerName = uni.getStorageSync('checkcustomer').customerName
+				this.gridList.customerPhone = uni.getStorageSync('checkcustomer').customerPhone
 			}
-			this.gridList.grade=this.gradeList[0].value
-			this.gridList.gradeKey=this.gradeList[0].key
+			this.gridList.grade = this.gradeList[0].value
+			this.gridList.gradeKey = this.gradeList[0].key
 			var that = this
-				this.$api.doRequest('get', '/identityAuthenticationInfo/identityAuthenticationInfoCustomer',{
-					compId:'',
-					authenticationStatusKey:7
-				}).then(res => {
-					if(res.data.data){
-						// let data = res.data.data
-						// that.gridList =data
-						that.$api.doRequest('get', '/warehouseBaseInfo/getWarehouse',{
-							id:this.cangid
-						}).then(res => {
-							that.warehouseList=res.data.data.warehousePositionInfoList
-						})
-					}
-				})
-				this.$api.doRequest('get', '/qualityInspectionManagement/api/goodsName',{
-					warehouseId:this.cangid
-				}).then(res => {
-					if(res.data.data){
-						that.goodsList = res.data.data
-						if(that.goodsList.length > 0){
-							that.gridList.goodsName=that.goodsList[0].goodsName
-							uni.setStorageSync('purchasePriceList',that.goodsList)
-							that.purchasePriceList=uni.getStorageSync('purchasePriceList')
-							that.waterContentChange()
-						}
-						
-						// for (let i = 0; i < res.data.data.length; i++) {
-						// 	this.goodsList.push(res.data.data[i].goodsName)
-						// }
-							// if(this.goodsList.some(item=>{return item.goodsName=='玉米'})){
-							// 	this.gridList.goodsName='玉米'
-							// 	uni.setStorageSync('goodsName',this.gridList.goodsName)
-							// }else{
-							// 	this.gridList.goodsName=this.goodsList[0].goodsName
-							// 	uni.setStorageSync('goodsName',this.gridList.goodsName)
-							// }
+			this.$api.doRequest('get', '/identityAuthenticationInfo/identityAuthenticationInfoCustomer', {
+				compId: '',
+				authenticationStatusKey: 7
+			}).then(res => {
+				if (res.data.data) {
+					// let data = res.data.data
+					// that.gridList =data
+					that.$api.doRequest('get', '/warehouseBaseInfo/getWarehouse', {
+						id: this.cangid
+					}).then(res => {
+						that.warehouseList = res.data.data.warehousePositionInfoList
+					})
+				}
+			})
+			this.$api.doRequest('get', '/qualityInspectionManagement/api/goodsName', {
+				warehouseId: this.cangid
+			}).then(res => {
+				if (res.data.data) {
+					that.goodsList = res.data.data
+					if (that.goodsList.length > 0) {
+						that.gridList.goodsName = that.goodsList[0].goodsName
+						uni.setStorageSync('purchasePriceList', that.goodsList)
+						that.purchasePriceList = uni.getStorageSync('purchasePriceList')
+						that.waterContentChange()
 					}
-				})
+
+					// for (let i = 0; i < res.data.data.length; i++) {
+					// 	this.goodsList.push(res.data.data[i].goodsName)
+					// }
+					// if(this.goodsList.some(item=>{return item.goodsName=='玉米'})){
+					// 	this.gridList.goodsName='玉米'
+					// 	uni.setStorageSync('goodsName',this.gridList.goodsName)
+					// }else{
+					// 	this.gridList.goodsName=this.goodsList[0].goodsName
+					// 	uni.setStorageSync('goodsName',this.gridList.goodsName)
+					// }
+				}
+			})
 		},
 		methods: {
 			waterContentChange() {
 				var that = this
-				if(this.gridList.goodsName && this.cangid){
-					if(!this.gridList.dryGrainPrice||this.gridList.dryGrainPrice == 0){
-						this.$api.doRequest('get', '/purchasePrice/dryGrainPrice',{
-							warehouseId:this.cangid,
-							goodsName:this.gridList.goodsName
+				if (this.gridList.goodsName && this.cangid) {
+					if (!this.gridList.dryGrainPrice || this.gridList.dryGrainPrice == 0) {
+						this.$api.doRequest('get', '/purchasePrice/dryGrainPrice', {
+							warehouseId: this.cangid,
+							goodsName: this.gridList.goodsName
 						}).then(res => {
 							that.gridList.dryGrainPrice = res.data.data
 						})
 					}
-					
+
 				}
-				
+
 				if (this.gridList.goodsName) {
-				  for (var i = 0; i < this.purchasePriceList.length; i++) {
-					if (this.purchasePriceList[i].goodsName == this.gridList.goodsName) {
-					  this.gridList.buckleWeightRatio = this.purchasePriceList[i].deductWeight
-					  this.gridList.paramType = this.purchasePriceList[i].paramType
+					for (var i = 0; i < this.purchasePriceList.length; i++) {
+						if (this.purchasePriceList[i].goodsName == this.gridList.goodsName) {
+							this.gridList.buckleWeightRatio = this.purchasePriceList[i].deductWeight
+							this.gridList.paramType = this.purchasePriceList[i].paramType
+						}
 					}
-				  }
 				}
 				var numReg = /^[0-9]*$/
 				var numRe = new RegExp(numReg)
 				//潮粮单价改变事件
 				if (
-				  this.gridList.goodsName &&
-				  this.gridList.waterContent &&
-				  this.gridList.grade&&
-				  numRe.test(this.gridList.waterContent)
+					this.gridList.goodsName &&
+					this.gridList.waterContent &&
+					this.gridList.grade &&
+					numRe.test(this.gridList.waterContent)
 				) {
-					this.$api.doRequest('get', '/purchasePrice/tidalGrainPrice',{
-						warehouseId:this.cangid,
-						goodsName:this.gridList.goodsName,
+					this.$api.doRequest('get', '/purchasePrice/tidalGrainPrice', {
+						warehouseId: this.cangid,
+						goodsName: this.gridList.goodsName,
 						waterContent: this.gridList.waterContent,
 						grade: this.gridList.grade,
 					}).then(res => {
-						if(that.gridList.paramType == '1'){
-							that.gridList.tidalGrainPrice = parseFloat(parseFloat(res.data.data) - parseFloat(that.gridList.buckleMiscellaneous)/100*parseFloat(that.gridList.dryGrainPrice)).toFixed(4)
-							if(!that.gridList.tidalGrainPrice){
+						if (that.gridList.paramType == '1') {
+							that.gridList.tidalGrainPrice = parseFloat(parseFloat(res.data.data) - parseFloat(that
+								.gridList.buckleMiscellaneous) / 100 * parseFloat(that.gridList
+								.dryGrainPrice)).toFixed(4)
+							if (!that.gridList.tidalGrainPrice) {
 								that.gridList.tidalGrainPrice = ''
 							}
-						}else{
+						} else {
 							that.gridList.tidalGrainPrice = res.data.data
 						}
 					})
 				}
 			},
-			gocustomer(){
+			gocustomer() {
 				uni.navigateTo({
-					url:'/pages/erpbusiness/customer?cangid='+this.cangid
+					url: '/pages/erpbusiness/customer?cangid=' + this.cangid
 				})
 			},
 			getdate() {
@@ -386,14 +394,14 @@
 				var mouth = date.getMonth() + 1 //获取当前月份(0-11,0代表1月)
 				var datetime = date.getDate() //获取当前日(1-31)
 				if (mouth < 10) {
-				  mouth = '0' + mouth
+					mouth = '0' + mouth
 				}
 				if (datetime < 10) {
-				  datetime = '0' + datetime
+					datetime = '0' + datetime
 				}
-				return year +'' + mouth + '' + datetime
+				return year + '' + mouth + '' + datetime
 			},
-			submit(){
+			submit() {
 				var that = this
 				if (!this.gridList.qualityNo) {
 					this.$api.msg('编号不能为空')
@@ -427,17 +435,16 @@
 					this.$api.msg('货名不能为空')
 					return
 				}
-				if (this.gridList.buckleWeightRatio < 0 ||this.gridList.buckleWeightRatio > 2) {
+				if (this.gridList.buckleWeightRatio < 0 || this.gridList.buckleWeightRatio > 2) {
 					this.$api.msg('扣重比输入错误')
 					return
 				}
 				if (
 					String(this.gridList.buckleWeightRatio).indexOf('.') != -1 &&
 					String(this.gridList.buckleWeightRatio).length -
-					(String(this.gridList.buckleWeightRatio).indexOf('.') + 1) > 2) 
-					{
-						this.$api.msg('扣重比输入错误')
-						return
+					(String(this.gridList.buckleWeightRatio).indexOf('.') + 1) > 2) {
+					this.$api.msg('扣重比输入错误')
+					return
 				}
 				if (!this.gridList.type) {
 					this.$api.msg('类型不能为空')
@@ -481,63 +488,64 @@
 					confirmText: '提交',
 					success: function(res) {
 						if (res.confirm) {
-							that.$api.doRequest('post', '/qualityInspectionManagement/api/addQualityInspection',that.gridList).then(res => {
-								if(res.data.code==200){
-									that.$api.msg('提交成功')
-									uni.navigateBack({
-									})
-								}else{
-									hat.$api.msg('提交失败')
-								}
-							})
+							that.$api.doRequest('post',
+									'/qualityInspectionManagement/api/addQualityInspection', that.gridList)
+								.then(res => {
+									if (res.data.code == 200) {
+										that.$api.msg('提交成功')
+										uni.navigateBack({})
+									} else {
+										hat.$api.msg('提交失败')
+									}
+								})
 						}
 					}
 				})
 			},
-			gradepicker(e){
+			gradepicker(e) {
 				console.log(e)
 				// this.$set(this.gradeList,'grade',this.gradeList[e[0]].value)
-				this.gridList.grade=this.gradeList[e[0]].value
-				this.gridList.gradeKey=this.gradeList[e[0]].key
+				this.gridList.grade = this.gradeList[e[0]].value
+				this.gridList.gradeKey = this.gradeList[e[0]].key
 				this.waterContentChange()
 			},
-			goodspicker(e){
+			goodspicker(e) {
 				console.log(e)
 				// this.$set(this.gradeList,'grade',this.gradeList[e[0]].value)
-				this.gridList.goodsName=this.goodsList[e[0]].goodsName
-				uni.setStorageSync('goodsName',this.gridList.goodsName)
-				if(this.gridList.type == "干粮" && this.gridList.goodsName){
-				  this.$api.doRequest('get', '/purchasePrice/dryGrainPrice',{
-					warehouseId:this.cangid,
-					goodsName:this.gridList.goodsName
-				  }).then(res => {
-					that.gridList.dryGrainPrice = res.data.data
-				  })
+				this.gridList.goodsName = this.goodsList[e[0]].goodsName
+				uni.setStorageSync('goodsName', this.gridList.goodsName)
+				if (this.gridList.type == "干粮" && this.gridList.goodsName) {
+					this.$api.doRequest('get', '/purchasePrice/dryGrainPrice', {
+						warehouseId: this.cangid,
+						goodsName: this.gridList.goodsName
+					}).then(res => {
+						that.gridList.dryGrainPrice = res.data.data
+					})
 				}
 				this.waterContentChange()
 			},
-			typepicker(e){
+			typepicker(e) {
 				var that = this
-				this.gridList.type=this.typeList[e[0]]
-				if(this.gridList.type == "干粮" &&this.gridList.goodsName){
-				  this.$api.doRequest('get', '/purchasePrice/dryGrainPrice',{
-					warehouseId:this.cangid,
-					goodsName:this.gridList.goodsName
-				  }).then(res => {
-					that.gridList.dryGrainPrice = res.data.data
-				  })
+				this.gridList.type = this.typeList[e[0]]
+				if (this.gridList.type == "干粮" && this.gridList.goodsName) {
+					this.$api.doRequest('get', '/purchasePrice/dryGrainPrice', {
+						warehouseId: this.cangid,
+						goodsName: this.gridList.goodsName
+					}).then(res => {
+						that.gridList.dryGrainPrice = res.data.data
+					})
 				}
 			},
-			binNumberpicker(e){
-				this.gridList.binNumber=this.warehouseList[e[0]].binNumber
+			binNumberpicker(e) {
+				this.gridList.binNumber = this.warehouseList[e[0]].binNumber
 			},
-			del(item){
-				this.$api.doRequest('get', '/qualityInspectionManagement/api/deleteQualityInspection',{
-					id:item.id
+			del(item) {
+				this.$api.doRequest('get', '/qualityInspectionManagement/api/deleteQualityInspection', {
+					id: item.id
 				}).then(res => {
-					if(res.data.code==200){
+					if (res.data.code == 200) {
 						this.$api.msg('删除成功')
-					}else{
+					} else {
 						this.$api.msg('系统异常,请联系管理员')
 					}
 				})
@@ -638,15 +646,17 @@
 	}
 </script>
 <style lang='scss' scoped>
-	page{
-		background:#F5F6FA;
+	page {
+		background: #F5F6FA;
 	}
+
 	.title_b {
 		margin: 20rpx 20rpx 0rpx 20rpx;
 		padding: 20rpx 10rpx 20rpx 10rpx;
 		font-size: 18px;
 		font-weight: 550;
 	}
+
 	.c-row {
 		display: -webkit-box;
 		display: -webkit-flex;
@@ -657,7 +667,7 @@
 		padding: 20rpx 30rpx;
 		position: relative;
 	}
-	
+
 	.con-list {
 		-webkit-box-flex: 1;
 		-webkit-flex: 1;
@@ -674,35 +684,40 @@
 		text-align: right;
 		padding-right: 20rpx;
 	}
-	.wrap{
-		padding-bottom:10px;
-		font-size:14px;
-		background:#fff;margin:10px;border-radius:10px;
-		input{
-			font-size:14px;
+
+	.wrap {
+		padding-bottom: 10px;
+		font-size: 14px;
+		background: #fff;
+		margin: 10px;
+		border-radius: 10px;
+
+		input {
+			font-size: 14px;
 		}
-		>.title{
-			padding:10px 16px;
+
+		>.title {
+			padding: 10px 16px;
 		}
-		
+
 	}
-	.footer{
-		background:#fff;
-		position:fixed;
-		bottom:0;
-		width:100%;
-		padding:20px 10px;
-		z-index:10;
-		.button{
-			background:#22C572;
-			width:90%;
-			margin:0 auto;
-			padding:10px;
-			color:#fff;
-			text-align:center;
+
+	.footer {
+		background: #fff;
+		position: fixed;
+		bottom: 0;
+		width: 100%;
+		padding: 20px 10px;
+		z-index: 10;
+
+		.button {
+			background: #22C572;
+			width: 90%;
+			margin: 0 auto;
+			padding: 10px;
+			color: #fff;
+			text-align: center;
 			border-radius: 30px;
 		}
 	}
 </style>
-
-

+ 52 - 46
pages/erpbusiness/edit_quality_testing.vue

@@ -93,62 +93,68 @@
 				</view>
 			</view>
 		</view>
-		<view style='margin-bottom:100px;' class='wrap'>
-			<view class='title_b'>化验信息</view>
+		<view style='padding-bottom:300rpx;'>
+			<view class='wrap'>
+				<view class='title_b'>化验信息</view>
 
-			<view class="c-row ">
-				<view class="title">等级</view>
-				<view class="con-list">
-					<u-picker :range="gradeList" range-key="value" @confirm='gradepicker($event)' v-model="show1"
-						mode="selector">
-					</u-picker>
-					<view v-if='flag!=1' @click='show1=true'>{{gridList.grade?gridList.grade:'请选择等级'}}</view>
-					<view v-else>{{gridList.grade}}</view>
+				<view class="c-row ">
+					<view class="title">等级</view>
+					<view class="con-list">
+						<u-picker :range="gradeList" range-key="value" @confirm='gradepicker($event)' v-model="show1"
+							mode="selector">
+						</u-picker>
+						<view v-if='flag!=1' @click='show1=true'>{{gridList.grade?gridList.grade:'请选择等级'}}</view>
+						<view v-else>{{gridList.grade}}</view>
+					</view>
 				</view>
-			</view>
-			<view class="c-row ">
-				<view class="title">水分(%)</view>
-				<view class="con-list">
-					<input :disabled='flag==1' v-model='gridList.waterContent' placeholder="初检水分"
-						@input="waterContentChange" name="input"></input>
-					<input v-if='flag==0' value='未复检' disabled placeholder="复检水分" name="input"></input>
-					<input :disabled='flag!=1' v-else v-model='gridList.reWaterContent' placeholder="复检水分"
-						name="input"></input>
+				<view class="c-row ">
+					<view class="title">水分(%)</view>
+					<view class="con-list">
+						<input :disabled='flag==1' v-model='gridList.waterContent' placeholder="初检水分"
+							@input="waterContentChange" name="input"></input>
+						<input v-if='flag==0' value='未复检' disabled placeholder="复检水分" name="input"></input>
+						<input :disabled='flag!=1' v-else v-model='gridList.reWaterContent' placeholder="复检水分"
+							name="input"></input>
+					</view>
 				</view>
-			</view>
-			<view class="c-row ">
-				<view class="title">容重(克/升)</view>
-				<view class="con-list">
-					<input :disabled='flag==1' v-model='gridList.bulkDensity' placeholder="请输入容重" name="input"></input>
+				<view class="c-row ">
+					<view class="title">容重(克/升)</view>
+					<view class="con-list">
+						<input :disabled='flag==1' v-model='gridList.bulkDensity' placeholder="请输入容重"
+							name="input"></input>
+					</view>
 				</view>
-			</view>
-			<view class="c-row ">
-				<view class="title">不完善粒(%)</view>
-				<view class="con-list">
-					<input :disabled='flag==1' v-model='gridList.imperfectGrain' placeholder="请输入不完整粒占比"
-						name="input"></input>
+				<view class="c-row ">
+					<view class="title">不完善粒(%)</view>
+					<view class="con-list">
+						<input :disabled='flag==1' v-model='gridList.imperfectGrain' placeholder="请输入不完整粒占比"
+							name="input"></input>
+					</view>
 				</view>
-			</view>
-			<view class="c-row ">
-				<view class="title">杂质(%)</view>
-				<view class="con-list">
-					<input :disabled='flag==1' v-model='gridList.impurity' placeholder="请输入杂质占比" name="input"></input>
+				<view class="c-row ">
+					<view class="title">杂质(%)</view>
+					<view class="con-list">
+						<input :disabled='flag==1' v-model='gridList.impurity' placeholder="请输入杂质占比"
+							name="input"></input>
+					</view>
 				</view>
-			</view>
-			<view class="c-row ">
-				<view class="title">霉变粒(%)</view>
-				<view class="con-list">
-					<input :disabled='flag==1' v-model='gridList.mildewGrain' placeholder="请输入霉变粒占比"
-						name="input"></input>
+				<view class="c-row ">
+					<view class="title">霉变粒(%)</view>
+					<view class="con-list">
+						<input :disabled='flag==1' v-model='gridList.mildewGrain' placeholder="请输入霉变粒占比"
+							name="input"></input>
+					</view>
 				</view>
-			</view>
-			<view class="c-row ">
-				<view class="title">热损伤(%)</view>
-				<view class="con-list">
-					<input :disabled='flag==1' v-model='gridList.jiaorenli' placeholder="请输入热损伤占比" name="input"></input>
+				<view class="c-row ">
+					<view class="title">热损伤(%)</view>
+					<view class="con-list">
+						<input :disabled='flag==1' v-model='gridList.jiaorenli' placeholder="请输入热损伤占比"
+							name="input"></input>
+					</view>
 				</view>
 			</view>
 		</view>
+
 		<view class="footer">
 			<view @click='submit' class="button">提交</view>
 		</view>

+ 148 - 126
pages/erpbusiness/examine_quality_testing.vue

@@ -38,7 +38,7 @@
 					{{gridList.carNumber}}
 				</view>
 			</view>
-			<view v-if="gridList.paramType != '1'"  class="c-row ">
+			<view v-if="gridList.paramType != '1'" class="c-row ">
 				<view class="title">扣重比</view>
 			</view>
 			<view v-if='managementType==1' class="c-row ">
@@ -54,9 +54,9 @@
 				<view class="title">扣杂</view>
 				<view class="con-list">
 					<input v-model='gridList.buckleMiscellaneous' placeholder="初检扣杂" @input="waterContentChange"
-						 name="input"></input>
+						name="input"></input>
 					<input v-model='gridList.reBuckleMiscellaneous' placeholder="复检扣杂" @input="waterContentChange"
-						 	 name="input"></input>
+						name="input"></input>
 				</view>
 			</view>
 			<view v-if='managementType==1' class="c-row ">
@@ -102,59 +102,62 @@
 				</view>
 			</view>
 		</view>
-		<view style='margin-bottom:100px;' class='wrap'>
-			<view class='title_b'>化验信息</view>
+		<view style='margin-bottom:300rpx;'>
+			<view class='wrap'>
+				<view class='title_b'>化验信息</view>
 
-			<view class="c-row ">
-				<view class="title">等级</view>
-				<view class="con-list">
-					{{gridList.grade}}
+				<view class="c-row ">
+					<view class="title">等级</view>
+					<view class="con-list">
+						{{gridList.grade}}
+					</view>
 				</view>
-			</view>
-			<view class="c-row ">
-				<view class="title">水分(%)</view>
-				<view class="con-list">
-					<input v-model='gridList.waterContent' placeholder="初检水分" @input="waterContentChange"
-					 name="input"></input>
-					 <input v-model='gridList.rewaterContent' placeholder="复检水分" @input="waterContentChange"
-					  name="input"></input>
+				<view class="c-row ">
+					<view class="title">水分(%)</view>
+					<view class="con-list">
+						<input v-model='gridList.waterContent' placeholder="初检水分" @input="waterContentChange"
+							name="input"></input>
+						<input v-model='gridList.rewaterContent' placeholder="复检水分" @input="waterContentChange"
+							name="input"></input>
+					</view>
+					<view class="con-list">
+						{{gridList.rewaterContent}}
+					</view>
+
 				</view>
-				<view class="con-list">
-					{{gridList.rewaterContent}}
+				<view class="c-row ">
+					<view class="title">容重(克/升)</view>
+					<view class="con-list">
+						{{gridList.bulkDensity}}
+					</view>
 				</view>
-				
-			</view>
-			<view class="c-row ">
-				<view class="title">容重(克/升)</view>
-				<view class="con-list">
-					{{gridList.bulkDensity}}
+				<view class="c-row ">
+					<view class="title">不完善粒(%)</view>
+					<view class="con-list">
+						{{gridList.imperfectGrain}}
+					</view>
 				</view>
-			</view>
-			<view class="c-row ">
-				<view class="title">不完善粒(%)</view>
-				<view class="con-list">
-					{{gridList.imperfectGrain}}
-				</view>
-			</view>
-			<view class="c-row ">
-				<view class="title">杂质(%)</view>
-				<view class="con-list">
-					{{gridList.impurity}}
+				<view class="c-row ">
+					<view class="title">杂质(%)</view>
+					<view class="con-list">
+						{{gridList.impurity}}
+					</view>
 				</view>
-			</view>
-			<view class="c-row ">
-				<view class="title">霉变粒(%)</view>
-				<view class="con-list">
-					{{gridList.mildewGrain}}
+				<view class="c-row ">
+					<view class="title">霉变粒(%)</view>
+					<view class="con-list">
+						{{gridList.mildewGrain}}
+					</view>
 				</view>
-			</view>
-			<view class="c-row ">
-				<view class="title">热损伤(%)</view>
-				<view class="con-list">
-					{{gridList.jiaorenli}}
+				<view class="c-row ">
+					<view class="title">热损伤(%)</view>
+					<view class="con-list">
+						{{gridList.jiaorenli}}
+					</view>
 				</view>
 			</view>
 		</view>
+
 	</view>
 </template>
 
@@ -176,48 +179,59 @@
 				modalName: '',
 				mycarStyle: '',
 				feild: undefined,
-				id:0,
-				show:false,
-				selector:[],
-				show1:false,
+				id: 0,
+				show: false,
+				selector: [],
+				show1: false,
 				inputContent: '',
 				coverTransform: 'translateY(0px)',
 				coverTransition: '0s',
 				moving: false,
 				footprintList: [],
-				searchKeyWord:'',
+				searchKeyWord: '',
 				isVip: false,
 				userInfoTmp: [],
 				inputStatus: 'none',
 				carInfo: [],
 				gridCol: 4,
-				pageSize:10,
-				currentPage:1,
+				pageSize: 10,
+				currentPage: 1,
 				gridBorder: false,
-				headUrl:"../../static/img/myimg/YongHu@3x.png",
-				userphone:"",
-				username:"请更改昵称",
+				headUrl: "../../static/img/myimg/YongHu@3x.png",
+				userphone: "",
+				username: "请更改昵称",
 				gridList: {
-					type:'潮粮'
+					type: '潮粮'
 				},
-				managementType:'',
+				managementType: '',
 				warehouseName: '',
-				warehouseList:[],
+				warehouseList: [],
 				showTran: true,
 				companyId: 1,
 				current: 4,
-				gradeList:[
-					{key:1,value:'一等品'},
-					{key:2,value:'二等品'},
-					{key:3,value:'三等品'},
-					{key:4,value:'等外'},
+				gradeList: [{
+						key: 1,
+						value: '一等品'
+					},
+					{
+						key: 2,
+						value: '二等品'
+					},
+					{
+						key: 3,
+						value: '三等品'
+					},
+					{
+						key: 4,
+						value: '等外'
+					},
 				],
-				cangid:''
+				cangid: ''
 			}
 		},
-		
+
 		onLoad() {
-			
+
 		},
 		// #ifndef MP
 		onNavigationBarButtonTap(e) {
@@ -242,57 +256,57 @@
 		computed: {
 			...mapState(['hasLogin', 'userInfo']),
 			// 手机号中间4位加*
-			starUserphone(){
+			starUserphone() {
 				let reg = /^(\d{3})\d{4}(\d{4})$/;
-				if(this.userphone){
+				if (this.userphone) {
 					return this.userphone.replace(reg, "$1****$2");
 				}
 			}
 		},
-		onLoad(options){
+		onLoad(options) {
 			console.log(options)
-			this.id=options.id
-			this.cangid=options.cangid
-			this.managementType=options.managementType
+			this.id = options.id
+			this.cangid = options.cangid
+			this.managementType = options.managementType
 		},
 		onShow() {
 			var that = this
-				this.$api.doRequest('get', '/qualityInspectionManagement/api/getQualityInspection',{
-					id:this.id
-				}).then(res => {
-					if(res.data.data){
-						let data = res.data.data
-						that.gridList =data
-						that.$api.doRequest('get', '/warehouseBaseInfo/getWarehouse',{
-							id:this.cangid
-						}).then(res => {
-							that.warehouseList=res.data.data.warehousePositionInfoList
-						})
-					}
-				})
+			this.$api.doRequest('get', '/qualityInspectionManagement/api/getQualityInspection', {
+				id: this.id
+			}).then(res => {
+				if (res.data.data) {
+					let data = res.data.data
+					that.gridList = data
+					that.$api.doRequest('get', '/warehouseBaseInfo/getWarehouse', {
+						id: this.cangid
+					}).then(res => {
+						that.warehouseList = res.data.data.warehousePositionInfoList
+					})
+				}
+			})
 		},
 		methods: {
-			gradepicker(e){
+			gradepicker(e) {
 				console.log(e)
 				// this.$set(this.gradeList,'grade',this.gradeList[e[0]].value)
-				this.gridList.grade=this.gradeList[e[0]].value
-				this.gridList.gradeKey=this.gradeList[e[0]].key
+				this.gridList.grade = this.gradeList[e[0]].value
+				this.gridList.gradeKey = this.gradeList[e[0]].key
 			},
-			binNumberpicker(e){
-				this.gridList.binNumber=this.warehouseList[e[0]].binNumber
+			binNumberpicker(e) {
+				this.gridList.binNumber = this.warehouseList[e[0]].binNumber
 			},
-			del(item){
-				this.$api.doRequest('get', '/qualityInspectionManagement/api/deleteQualityInspection',{
-					id:item.id
+			del(item) {
+				this.$api.doRequest('get', '/qualityInspectionManagement/api/deleteQualityInspection', {
+					id: item.id
 				}).then(res => {
-					if(res.data.code==200){
+					if (res.data.code == 200) {
 						this.$api.msg('删除成功')
-					}else{
+					} else {
 						this.$api.msg('系统异常,请联系管理员')
 					}
 				})
 			},
-			fankui(){
+			fankui() {
 				uni.navigateTo({
 					url: `/pages/user/fankui`
 				})
@@ -403,15 +417,17 @@
 	}
 </script>
 <style lang='scss' scoped>
-	page{
-		background:#F5F6FA;
+	page {
+		background: #F5F6FA;
 	}
+
 	.title_b {
 		margin: 20rpx 20rpx 0rpx 20rpx;
 		padding: 20rpx 10rpx 20rpx 10rpx;
 		font-size: 18px;
 		font-weight: 550;
 	}
+
 	.c-row {
 		display: -webkit-box;
 		display: -webkit-flex;
@@ -422,7 +438,7 @@
 		padding: 20rpx 30rpx;
 		position: relative;
 	}
-	
+
 	.con-list {
 		-webkit-box-flex: 1;
 		-webkit-flex: 1;
@@ -439,37 +455,43 @@
 		text-align: right;
 		padding-right: 20rpx;
 	}
-	.wrap{
-		padding-bottom:10px;
-		font-size:14px;
-		background:#fff;margin:10px;border-radius:10px;
-		input{
-			font-size:14px;
+
+	.wrap {
+		padding-bottom: 10px;
+		font-size: 14px;
+		background: #fff;
+		margin: 10px;
+		border-radius: 10px;
+
+		input {
+			font-size: 14px;
 		}
-		>.title{
-			padding:10px 16px;
+
+		>.title {
+			padding: 10px 16px;
 		}
-		.b-b:after{
-			border-bottom:1px solid #eee;
+
+		.b-b:after {
+			border-bottom: 1px solid #eee;
 		}
 	}
-	.footer{
-		background:#fff;
-		position:fixed;
-		bottom:0;
-		width:100%;
-		padding:20px 10px;
-		z-index:10;
-		.button{
-			background:#22C572;
-			width:90%;
-			margin:0 auto;
-			padding:10px;
-			color:#fff;
-			text-align:center;
+
+	.footer {
+		background: #fff;
+		position: fixed;
+		bottom: 0;
+		width: 100%;
+		padding: 20px 10px;
+		z-index: 10;
+
+		.button {
+			background: #22C572;
+			width: 90%;
+			margin: 0 auto;
+			padding: 10px;
+			color: #fff;
+			text-align: center;
 			border-radius: 30px;
 		}
 	}
 </style>
-
-

+ 30 - 16
pages/erpbusiness/index.vue

@@ -28,6 +28,9 @@
 		<u-modal v-model="isShowAlert" :title-style="{fontSize: '18px',fontWeight:'500'}"
 			:content-style="{fontSize: '14px',fontWeight:'400'}" confirm-color='#22C572' confirm-text='确定' title='温馨提示'
 			showCancelButton='false' :content="content" @confirm="goOpenService" @cancel="cancelClick"></u-modal>
+		<u-modal v-model="isShowAlert1" :title-style="{fontSize: '18px',fontWeight:'500'}"
+			:content-style="{fontSize: '14px',fontWeight:'400'}" confirm-color='#22C572' confirm-text='确定' title='登录提示'
+			showCancelButton='false' :content="content1" @confirm="alertBtn1" @cancel="cancelClick1"></u-modal>
 	</view>
 </template>
 <script>
@@ -44,6 +47,8 @@
 		},
 		data() {
 			return {
+				isShowAlert1: false,
+				content1: '当前登入信息验证失败,是否重新登录?',
 				isShowAlert: false,
 				content: '您确定要退出吗?',
 				a: false,
@@ -88,7 +93,7 @@
 						num: 2,
 						name: '收购检斤',
 						// icon: 'cuIcon-copy',
-						src:'../../static/img/erp/shougoujianjin@3x.png',
+						src: '../../static/img/erp/shougoujianjin@3x.png',
 						tips: 0,
 						url: '/pages/erpbusiness/acquisitionInspection/acquisitionInspection',
 						show: true
@@ -180,21 +185,22 @@
 			this.$api.doRequest('get', '/commonUser/api/checkSession').then(res => {
 				console.log("checkSession", res)
 				if (res.data.data == "INVALID") {
-					uni.showModal({
-						title: '登录提示',
-						content: '当前登入信息验证失败,是否重新登录?',
-						showCancel: true,
-						confirmText: '登录',
-						success: (e) => {
-							if (e.confirm) {
-								uni.navigateTo({
-									url: '/pages/public/login'
-								})
-							}
-						},
-						fail: () => {},
-						complete: () => {}
-					})
+					this.isShowAlert1 = true;
+					// uni.showModal({
+					// 	title: '登录提示',
+					// 	content: '当前登入信息验证失败,是否重新登录?',
+					// 	showCancel: true,
+					// 	confirmText: '登录',
+					// 	success: (e) => {
+					// 		if (e.confirm) {
+					// 			uni.navigateTo({
+					// 				url: '/pages/public/login'
+					// 			})
+					// 		}
+					// 	},
+					// 	fail: () => {},
+					// 	complete: () => {}
+					// })
 				}
 			})
 			console.log("hasLogin", this.hasLogin)
@@ -243,9 +249,17 @@
 			console.log("this.userInfo", this.userInfo)
 		},
 		methods: {
+			alertBtn1() {
+				uni.navigateTo({
+					url: '/pages/public/login'
+				})
+			},
 			cancelClick() {
 				this.isShowAlert = false
 			},
+			cancelClick1() {
+				this.isShowAlert = false
+			},
 			goOpenService() {
 				uni.hideTabBarRedDot({
 					index: 3

+ 148 - 132
pages/erpbusiness/out_quality_testing.vue

@@ -23,80 +23,77 @@
 			<view class="c-row ">
 				<view class="title">车牌号</view>
 				<view class="con-list">
-					<input v-model='gridList.carNumber' placeholder="请输入车牌号"
-						 name="input"></input>
+					<input v-model='gridList.carNumber' placeholder="请输入车牌号" name="input"></input>
 				</view>
 			</view>
 			<view class="c-row ">
 				<view class="title">仓位号</view>
 				<view class="con-list">
 					<view @click='show=true'>{{gridList.binNumber}}</view>
-					<u-picker :range="warehouseList" range-key="binNumber" @confirm='binNumberpicker($event)' v-model="show" mode="selector" >
+					<u-picker :range="warehouseList" range-key="binNumber" @confirm='binNumberpicker($event)'
+						v-model="show" mode="selector">
 					</u-picker>
 				</view>
 			</view>
 			<view class="c-row ">
 				<view class="title">囤位号</view>
 				<view class="con-list">
-					<input v-model='gridList.storageTagNo' placeholder="请输入囤位号"
-						 name="input"></input>
+					<input v-model='gridList.storageTagNo' placeholder="请输入囤位号" name="input"></input>
 				</view>
 			</view>
 		</view>
-		<view style='margin-bottom:100px;' class='wrap'>
-			<view class='title_b'>化验信息</view>
+		<view style='margin-bottom:300rpx;'>
+			<view class='wrap'>
+				<view class='title_b'>化验信息</view>
 
-			<view class="c-row ">
-				<view class="title">等级</view>
-				<view class="con-list">
-					<view @click='show1=true'>{{gridList.grade?gridList.grade:'请选择等级'}}</view>
-					<u-picker :range="gradeList" range-key="value" @confirm='gradepicker($event)' v-model="show1" mode="selector" >
-					</u-picker>
+				<view class="c-row ">
+					<view class="title">等级</view>
+					<view class="con-list">
+						<view @click='show1=true'>{{gridList.grade?gridList.grade:'请选择等级'}}</view>
+						<u-picker :range="gradeList" range-key="value" @confirm='gradepicker($event)' v-model="show1"
+							mode="selector">
+						</u-picker>
+					</view>
 				</view>
-			</view>
-			<view class="c-row ">
-				<view class="title">水分(%)</view>
-				<view class="con-list">
-					<input v-model='gridList.waterContent' placeholder="请输入水分占比"
-					 name="input"></input>
+				<view class="c-row ">
+					<view class="title">水分(%)</view>
+					<view class="con-list">
+						<input v-model='gridList.waterContent' placeholder="请输入水分占比" name="input"></input>
+					</view>
 				</view>
-			</view>
-			<view class="c-row ">
-				<view class="title">容重(克/升)</view>
-				<view class="con-list">
-					<input v-model='gridList.bulkDensity' placeholder="请输入容重"
-					 name="input"></input>
+				<view class="c-row ">
+					<view class="title">容重(克/升)</view>
+					<view class="con-list">
+						<input v-model='gridList.bulkDensity' placeholder="请输入容重" name="input"></input>
+					</view>
 				</view>
-			</view>
-			<view class="c-row ">
-				<view class="title">不完善粒(%)</view>
-				<view class="con-list">
-					<input v-model='gridList.imperfectGrain' placeholder="请输入不完整粒占比"
-						 name="input"></input>
+				<view class="c-row ">
+					<view class="title">不完善粒(%)</view>
+					<view class="con-list">
+						<input v-model='gridList.imperfectGrain' placeholder="请输入不完整粒占比" name="input"></input>
+					</view>
 				</view>
-			</view>
-			<view class="c-row ">
-				<view class="title">杂质(%)</view>
-				<view class="con-list">
-					<input v-model='gridList.impurity' placeholder="请输入杂质占比"
-					 name="input"></input>
+				<view class="c-row ">
+					<view class="title">杂质(%)</view>
+					<view class="con-list">
+						<input v-model='gridList.impurity' placeholder="请输入杂质占比" name="input"></input>
+					</view>
 				</view>
-			</view>
-			<view class="c-row ">
-				<view class="title">霉变粒(%)</view>
-				<view class="con-list">
-					<input v-model='gridList.mildewGrain' placeholder="请输入霉变粒占比"
-					 name="input"></input>
+				<view class="c-row ">
+					<view class="title">霉变粒(%)</view>
+					<view class="con-list">
+						<input v-model='gridList.mildewGrain' placeholder="请输入霉变粒占比" name="input"></input>
+					</view>
 				</view>
-			</view>
-			<view class="c-row ">
-				<view class="title">热损伤(%)</view>
-				<view class="con-list">
-					<input v-model='gridList.jiaorenli' placeholder="请输入热损伤占比"
-					 name="input"></input>
+				<view class="c-row ">
+					<view class="title">热损伤(%)</view>
+					<view class="con-list">
+						<input v-model='gridList.jiaorenli' placeholder="请输入热损伤占比" name="input"></input>
+					</view>
 				</view>
 			</view>
 		</view>
+
 		<view class="footer">
 			<view @click='submit' class="button">提交</view>
 		</view>
@@ -121,41 +118,52 @@
 				modalName: '',
 				mycarStyle: '',
 				feild: undefined,
-				id:0,
-				show:false,
-				selector:[],
-				show1:false,
+				id: 0,
+				show: false,
+				selector: [],
+				show1: false,
 				inputContent: '',
 				coverTransform: 'translateY(0px)',
 				coverTransition: '0s',
 				moving: false,
 				footprintList: [],
-				searchKeyWord:'',
+				searchKeyWord: '',
 				isVip: false,
 				userInfoTmp: [],
 				inputStatus: 'none',
 				carInfo: [],
 				gridCol: 4,
-				pageSize:10,
-				currentPage:1,
+				pageSize: 10,
+				currentPage: 1,
 				gridBorder: false,
-				headUrl:"../../static/img/myimg/YongHu@3x.png",
-				userphone:"",
-				username:"请更改昵称",
+				headUrl: "../../static/img/myimg/YongHu@3x.png",
+				userphone: "",
+				username: "请更改昵称",
 				gridList: {},
-				managementType:'',
+				managementType: '',
 				warehouseName: '',
-				warehouseList:[],
+				warehouseList: [],
 				showTran: true,
 				companyId: 1,
 				current: 4,
-				gradeList:[
-					{key:1,value:'一等品'},
-					{key:2,value:'二等品'},
-					{key:3,value:'三等品'},
-					{key:4,value:'等外'},
+				gradeList: [{
+						key: 1,
+						value: '一等品'
+					},
+					{
+						key: 2,
+						value: '二等品'
+					},
+					{
+						key: 3,
+						value: '三等品'
+					},
+					{
+						key: 4,
+						value: '等外'
+					},
 				],
-				cangid:''
+				cangid: ''
 			}
 		},
 		// #ifndef MP
@@ -181,36 +189,36 @@
 		computed: {
 			...mapState(['hasLogin', 'userInfo']),
 			// 手机号中间4位加*
-			starUserphone(){
+			starUserphone() {
 				let reg = /^(\d{3})\d{4}(\d{4})$/;
-				if(this.userphone){
+				if (this.userphone) {
 					return this.userphone.replace(reg, "$1****$2");
 				}
 			}
 		},
-		onLoad(options){
-			this.id=options.id
-			this.cangid=options.cangid
-			this.managementType=options.managementType
+		onLoad(options) {
+			this.id = options.id
+			this.cangid = options.cangid
+			this.managementType = options.managementType
 		},
 		onShow() {
 			var that = this
-				this.$api.doRequest('get', '/qualityInspectionManagement/api/getQualityInspection',{
-					id:this.id
-				}).then(res => {
-					if(res.data.data){
-						let data = res.data.data
-						that.gridList =data
-						that.$api.doRequest('get', '/warehouseBaseInfo/getWarehouse',{
-							id:this.cangid
-						}).then(res => {
-							that.warehouseList=res.data.data.warehousePositionInfoList
-						})
-					}
-				})
+			this.$api.doRequest('get', '/qualityInspectionManagement/api/getQualityInspection', {
+				id: this.id
+			}).then(res => {
+				if (res.data.data) {
+					let data = res.data.data
+					that.gridList = data
+					that.$api.doRequest('get', '/warehouseBaseInfo/getWarehouse', {
+						id: this.cangid
+					}).then(res => {
+						that.warehouseList = res.data.data.warehousePositionInfoList
+					})
+				}
+			})
 		},
 		methods: {
-			submit(){
+			submit() {
 				var that = this
 				if (!this.gridList.contractNo) {
 					this.$api.msg('编号不能为空')
@@ -274,38 +282,39 @@
 					confirmText: '提交',
 					success: function(res) {
 						if (res.confirm) {
-							that.$api.doRequest('post', '/qualityInspectionManagement/api/addQualityInspectionOut',that.gridList).then(res => {
-								if(res.data.code==200){
-									that.$api.msg('提交成功')
-									uni.navigateBack({
-									})
-								}
-							})
+							that.$api.doRequest('post',
+									'/qualityInspectionManagement/api/addQualityInspectionOut', that.gridList)
+								.then(res => {
+									if (res.data.code == 200) {
+										that.$api.msg('提交成功')
+										uni.navigateBack({})
+									}
+								})
 						}
 					}
 				})
 			},
-			gradepicker(e){
+			gradepicker(e) {
 				console.log(e)
 				// this.$set(this.gradeList,'grade',this.gradeList[e[0]].value)
-				this.gridList.grade=this.gradeList[e[0]].value
-				this.gridList.gradeKey=this.gradeList[e[0]].key
+				this.gridList.grade = this.gradeList[e[0]].value
+				this.gridList.gradeKey = this.gradeList[e[0]].key
 			},
-			binNumberpicker(e){
-				this.gridList.binNumber=this.warehouseList[e[0]].binNumber
+			binNumberpicker(e) {
+				this.gridList.binNumber = this.warehouseList[e[0]].binNumber
 			},
-			del(item){
-				this.$api.doRequest('get', '/qualityInspectionManagement/api/deleteQualityInspection',{
-					id:item.id
+			del(item) {
+				this.$api.doRequest('get', '/qualityInspectionManagement/api/deleteQualityInspection', {
+					id: item.id
 				}).then(res => {
-					if(res.data.code==200){
+					if (res.data.code == 200) {
 						this.$api.msg('删除成功')
-					}else{
+					} else {
 						this.$api.msg('系统异常,请联系管理员')
 					}
 				})
 			},
-			fankui(){
+			fankui() {
 				uni.navigateTo({
 					url: `/pages/user/fankui`
 				})
@@ -416,15 +425,17 @@
 	}
 </script>
 <style lang='scss' scoped>
-	page{
-		background:#F5F6FA;
+	page {
+		background: #F5F6FA;
 	}
+
 	.title_b {
 		margin: 20rpx 20rpx 0rpx 20rpx;
 		padding: 20rpx 10rpx 20rpx 10rpx;
 		font-size: 18px;
 		font-weight: 550;
 	}
+
 	.c-row {
 		display: -webkit-box;
 		display: -webkit-flex;
@@ -435,7 +446,7 @@
 		padding: 20rpx 30rpx;
 		position: relative;
 	}
-	
+
 	.con-list {
 		-webkit-box-flex: 1;
 		-webkit-flex: 1;
@@ -452,34 +463,39 @@
 		text-align: right;
 		padding-right: 20rpx;
 	}
-	.wrap{
-		padding-bottom:10px;
-		font-size:14px;
-		background:#fff;margin:10px;border-radius:10px;
-		input{
-			font-size:14px;
+
+	.wrap {
+		padding-bottom: 10px;
+		font-size: 14px;
+		background: #fff;
+		margin: 10px;
+		border-radius: 10px;
+
+		input {
+			font-size: 14px;
 		}
-		>.title{
-			padding:10px 16px;
+
+		>.title {
+			padding: 10px 16px;
 		}
 	}
-	.footer{
-		background:#fff;
-		position:fixed;
-		bottom:0;
-		width:100%;
-		padding:20px 10px;
-		z-index:10;
-		.button{
-			background:#22C572;
-			width:90%;
-			margin:0 auto;
-			padding:10px;
-			color:#fff;
-			text-align:center;
+
+	.footer {
+		background: #fff;
+		position: fixed;
+		bottom: 0;
+		width: 100%;
+		padding: 20px 10px;
+		z-index: 10;
+
+		.button {
+			background: #22C572;
+			width: 90%;
+			margin: 0 auto;
+			padding: 10px;
+			color: #fff;
+			text-align: center;
 			border-radius: 30px;
 		}
 	}
 </style>
-
-

+ 291 - 244
pages/erpbusiness/quality_testing.vue

@@ -2,27 +2,27 @@
 	<view class="center">
 		<view class='navbar' style='position:fixed;background:#fff;top:0;width:100%;z-index:3;'>
 			<view class="back-btn cuIcon-back" @click="navBack"></view>
-				<view class='header-content' v-if='managementType==3'>出库质检</view>
-				<view class='header-content' v-if='managementType==1'>收购质检</view>
+			<view class='header-content' v-if='managementType==3'>出库质检</view>
+			<view class='header-content' v-if='managementType==1'>收购质检</view>
 		</view>
-		
 		<view class="header">
-
 			<view style='background:#fff;display:flex;' class="cu-bar search">
 				<view style='flex:6;' class="search-form round Medium">
 					<text style='color: #ccc;text-indent:6px;' class="cuIcon-search"></text>
-					<input v-if='managementType==1' type="text" maxlength="20"  v-model="searchKeyWord" @confirm="doSearch()"
-						 placeholder="输入编号、客户名、车牌号" confirm-type="search"></input>
-					<input v-if='managementType==3' type="text" maxlength="20"  v-model="searchKeyWord" @confirm="doSearch()"
-						 placeholder="输入合同编号、车牌号" confirm-type="search"></input>
+					<input v-if='managementType==1' type="text" maxlength="20" v-model="searchKeyWord"
+						@confirm="doSearch()" placeholder="输入编号、客户名、车牌号" confirm-type="search"></input>
+					<input v-if='managementType==3' type="text" maxlength="20" v-model="searchKeyWord"
+						@confirm="doSearch()" placeholder="输入合同编号、车牌号" confirm-type="search"></input>
 				</view>
 				<view @click='doSearch()' class="Regular" style="width:4%;flex:1;">搜索</view>
-				<u-icon @click='emptysearch' class="cuIcon" v-if='searchKeyWord.length>0' size="34" name="close-circle-fill" color="#D6D9E0"></u-icon>
+				<u-icon @click='emptysearch' class="cuIcon" v-if='searchKeyWord.length>0' size="34"
+					name="close-circle-fill" color="#D6D9E0"></u-icon>
 				<!-- <text @click='emptysearch' v-if='searchKeyWord.length>0' class='tip_text cuIcon-roundclosefill'></text> -->
 			</view>
 			<view class='changewarehouse'>
 				<view @click='show=true'>{{warehouseName}}<text class='cuIcon-unfold'></text></view>
-				<u-picker @confirm="warehousechange" range-key='warehouseName' mode="selector" v-model="show"  :range="selector"></u-picker>
+				<u-picker @confirm="warehousechange" range-key='warehouseName' mode="selector" v-model="show"
+					:range="selector"></u-picker>
 			</view>
 		</view>
 		<view class="content">
@@ -37,8 +37,8 @@
 						<view class="left status3" v-if="item.confirm=='1'">确</view>
 						<view>
 							<view class="top-title">
-								<view  v-if='managementType==1' >{{item.qualityNo}}</view>
-								<view  v-if='managementType==3' >{{item.contractNo}}</view>
+								<view v-if='managementType==1'>{{item.qualityNo}}</view>
+								<view v-if='managementType==3'>{{item.contractNo}}</view>
 							</view>
 							<view class="bottom">{{item.updateDate}}</view>
 						</view>
@@ -46,17 +46,24 @@
 					<view class="right">{{item.customer}}</view>
 					<view class='right'>{{item.qualityInspector}} {{item.reInspector}}</view>
 				</view>
-				<view class="row2" >
+				<view class="row2">
 					<view v-if='managementType==1'>{{item.customerName}}</view>
 					<view>{{item.carNumber}}</view>
 					<view>{{item.goodsName}}({{item.waterContent}}水)</view>
 				</view>
 				<view class="row3">
-					<view v-if='getRoles("acquisitionQuality.delete")&&item.weighingManagement&&item.weighingManagement.status=="已质检"&&managementType==1' @click.stop='del(item)' class='button'>删除</view>
-						<view v-if='getRoles("acquisitionQuality.initial")&&item.status=="已初检"&&managementType==1' @click.stop='edit(item,0)' class='button'>初检</view>
-						<view v-if='getRoles("acquisitionQuality.con")&&item.confirm!="1"&&item.status=="已复检"&&managementType==1' @click.stop='edit(item,2)' class='button'>确认</view>
-						<view v-if='getRoles("acquisitionQuality.again")&&item.confirm!="1"&&managementType==1' @click.stop='edit(item,1)' class='button'>复检</view>
-						<view v-if='getRoles("acquisitionQualityOut.edit")&&item.status=="已称毛重"&&managementType==3' @click.stop='quality_testing(item)' class='button'>质检</view>
+					<view
+						v-if='getRoles("acquisitionQuality.delete")&&item.weighingManagement&&item.weighingManagement.status=="已质检"&&managementType==1'
+						@click.stop='del(item)' class='button'>删除</view>
+					<view v-if='getRoles("acquisitionQuality.initial")&&item.status=="已初检"&&managementType==1'
+						@click.stop='edit(item,0)' class='button'>初检</view>
+					<view
+						v-if='getRoles("acquisitionQuality.con")&&item.confirm!="1"&&item.status=="已复检"&&managementType==1'
+						@click.stop='edit(item,2)' class='button'>确认</view>
+					<view v-if='getRoles("acquisitionQuality.again")&&item.confirm!="1"&&managementType==1'
+						@click.stop='edit(item,1)' class='button'>复检</view>
+					<view v-if='getRoles("acquisitionQualityOut.edit")&&item.status=="已称毛重"&&managementType==3'
+						@click.stop='quality_testing(item)' class='button'>质检</view>
 				</view>
 			</view>
 			<!-- <view class='wrap' v-for='item in gridList' @click='examine(item)'>
@@ -89,13 +96,13 @@
 				<view v-if='item.status=="已称毛重"&&managementType==3' @click.stop='quality_testing(item)' class='button'>质检</view>
 			</view>
 		</view> -->
-		<!-- <view class='flex buttons'>
+			<!-- <view class='flex buttons'>
 			<view v-if='item.status=="已质检"&&managementType==1' @click.stop='del(item)' class='button'>删除</view>
 			<view v-if='item.status!="已称皮重"&&managementType==1' @click.stop='edit(item)' class='button'>编辑</view>
 			<view v-if='item.status=="已称毛重"&&managementType==3' @click.stop='quality_testing(item)' class='button'>质检</view>
 		</view> -->
 		</view>
-		
+
 		<view v-show="isContent">
 			<uni-load-more :status="loadStatus"></uni-load-more>
 		</view>
@@ -122,38 +129,38 @@
 				modalName: '',
 				mycarStyle: '',
 				feild: undefined,
-				params:{},
-				selector:[],
-				isContent:false,
-				loadStatus:'noMore',
+				params: {},
+				selector: [],
+				isContent: false,
+				loadStatus: 'noMore',
 				inputContent: '',
 				coverTransform: 'translateY(0px)',
 				coverTransition: '0s',
 				moving: false,
 				footprintList: [],
-				searchKeyWord:'',
+				searchKeyWord: '',
 				isVip: false,
 				userInfoTmp: [],
 				inputStatus: 'none',
 				carInfo: [],
 				gridCol: 4,
-				show:false,
-				pageSize:10,
-				currentPage:1,
+				show: false,
+				pageSize: 10,
+				currentPage: 1,
 				gridBorder: false,
-				headUrl:"../../static/img/myimg/YongHu@3x.png",
-				userphone:"",
-				username:"请更改昵称",
+				headUrl: "../../static/img/myimg/YongHu@3x.png",
+				userphone: "",
+				username: "请更改昵称",
 				gridList: [],
-				managementType:1,
+				managementType: 1,
 				warehouseName: '',
 				showTran: true,
 				companyId: 1,
 				current: 4,
-				warehouseCount:'',
-				commonWarehouseNo:'',
-				cangid:''
-				
+				warehouseCount: '',
+				commonWarehouseNo: '',
+				cangid: ''
+
 			}
 		},
 		// #ifndef MP
@@ -179,61 +186,60 @@
 		computed: {
 			...mapState(['hasLogin', 'userInfo']),
 			// 手机号中间4位加*
-			starUserphone(){
+			starUserphone() {
 				let reg = /^(\d{3})\d{4}(\d{4})$/;
-				if(this.userphone){
+				if (this.userphone) {
 					return this.userphone.replace(reg, "$1****$2");
 				}
 			}
 		},
 		onPullDownRefresh() {
-			this.currentPage=1
-			this.gridList=[]
+			this.currentPage = 1
+			this.gridList = []
 			this.getList(true)
-			setTimeout(function () {
+			setTimeout(function() {
 				uni.stopPullDownRefresh();
 			}, 1000);
 		},
-		 onReachBottom() {
-			 this.currentPage+=1
-		    this.getList(false)
+		onReachBottom() {
+			this.currentPage += 1
+			this.getList(false)
 			// this.getMoreNews()
 		},
-		onLoad(options){
-			this.managementType=options.managementType
+		onLoad(options) {
+			this.managementType = options.managementType
 		},
 		onShow() {
 			this.pageSize = 10
 			this.currentPage = 1
 			var that = this
-			if(this.cangid){
-				uni.setStorageSync("cangid",this.cangid)
-			}
-			else{
+			if (this.cangid) {
+				uni.setStorageSync("cangid", this.cangid)
+			} else {
 				this.cangid = uni.getStorageSync("cangid")
 			}
-			this.gridList=[]
-			this.$api.doRequest('get', '/warehouseBaseInfo/selectWarehouseSelf',{
-				compId:'',
-				personCharge:this.userInfo.phone
+			this.gridList = []
+			this.$api.doRequest('get', '/warehouseBaseInfo/selectWarehouseSelf', {
+				compId: '',
+				personCharge: this.userInfo.phone
 			}).then(res => {
-				if(res.data.data){
+				if (res.data.data) {
 					let list = res.data.data
-					for(var i=0;i<list.length;i++){
-						if (that.cangid&&that.cangid == list[i].id) {
-						  that.warehouseName = list[i].warehouseName
-						  that.warehouseCount =  list[i].count
-						  that.commonWarehouseNo =  list[i].commonWarehouseNo
-						  // uni.setStorageSync('purchasePriceList',list[i].purchasePriceList)
-						  break
-						} 
+					for (var i = 0; i < list.length; i++) {
+						if (that.cangid && that.cangid == list[i].id) {
+							that.warehouseName = list[i].warehouseName
+							that.warehouseCount = list[i].count
+							that.commonWarehouseNo = list[i].commonWarehouseNo
+							// uni.setStorageSync('purchasePriceList',list[i].purchasePriceList)
+							break
+						}
 					}
-					that.selector=res.data.data
-					if(that.selector.length > 0 && !that.cangid){
+					that.selector = res.data.data
+					if (that.selector.length > 0 && !that.cangid) {
 						that.warehouseName = that.selector[0].warehouseName
-						that.warehouseCount =  that.selector[0].count
-						that.commonWarehouseNo =  that.selector[0].commonWarehouseNo
-						that.cangid =  that.selector[0].id
+						that.warehouseCount = that.selector[0].count
+						that.commonWarehouseNo = that.selector[0].commonWarehouseNo
+						that.cangid = that.selector[0].id
 						// uni.setStorageSync('purchasePriceList',that.selector[0].purchasePriceList)
 					}
 					this.getList(true)
@@ -246,112 +252,117 @@
 				let _roles = uni.getStorageSync('rolesList')
 				for (let i = 0; i < _roles.length; i++) {
 					if (_roles[i] == role) {
-						 return true
-					} 
+						return true
+					}
 				}
 				return false
 			},
-			quality_testing(item){
+			quality_testing(item) {
 				uni.navigateTo({
-					url:'/pages/erpbusiness/out_quality_testing?id='+item.id+'&managementType='+this.managementType+'&cangid='+this.cangid
+					url: '/pages/erpbusiness/out_quality_testing?id=' + item.id + '&managementType=' + this
+						.managementType + '&cangid=' + this.cangid
 				})
 			},
-			examine(item){
+			examine(item) {
 				uni.navigateTo({
-					url:'/pages/erpbusiness/examine_quality_testing?id='+item.id+'&managementType='+this.managementType+'&cangid='+this.cangid
+					url: '/pages/erpbusiness/examine_quality_testing?id=' + item.id + '&managementType=' + this
+						.managementType + '&cangid=' + this.cangid
 				})
 			},
-			emptysearch(){
-				this.searchKeyWord=''
-				this.gridList=[]
-				this.currentPage=1
+			emptysearch() {
+				this.searchKeyWord = ''
+				this.gridList = []
+				this.currentPage = 1
 				this.getList(true)
 			},
-			doSearch(){
-				this.gridList=[]
-				this.currentPage=1
+			doSearch() {
+				this.gridList = []
+				this.currentPage = 1
 				this.getList(true)
 			},
-			warehousechange(e){
-				this.warehouseName=this.selector[e[0]].warehouseName
-				this.cangid=this.selector[e[0]].id
-				uni.setStorageSync("cangid",this.cangid)
+			warehousechange(e) {
+				this.warehouseName = this.selector[e[0]].warehouseName
+				this.cangid = this.selector[e[0]].id
+				uni.setStorageSync("cangid", this.cangid)
 				this.warehouseCount = this.selector[e[0]].count
-				this.commonWarehouseNo=this.selector[e[0]].commonWarehouseNo
+				this.commonWarehouseNo = this.selector[e[0]].commonWarehouseNo
 				// uni.setStorageSync('purchasePriceList',this.selector[e[0]].purchasePriceList)
 				this.getList(true)
 				console.log(e)
 			},
-			getList(flag){
+			getList(flag) {
 				var that = this
 				uni.showLoading({
-					title:"正在加载"
+					title: "正在加载"
 				})
-				this.$api.doRequest('get', 'qualityInspectionManagement/selectQualityInspection',{
-					pageSize: this.pageSize,
-					currentPage: this.currentPage,
-					searchKeyWord: this.searchKeyWord,
-					searchType: this.searchType,
-					managementType:this.managementType,
-					warehouseName: this.warehouseName,
-					compId:'',
-					// pcFlag:1
-				}).then(res => {
-					uni.hideLoading()
-					if(res.data.data){
-						let data = res.data.data.records
-						//采购信息
-						if (data.length > 0) {
-							if(flag){
-								that.gridList = data
-							}
-							else{
-								that.gridList = that.gridList.concat(data)
-							}
-						}else{
-							if(this.currentPage==1){
-								that.gridList=[]
+				this.$api.doRequest('get', 'qualityInspectionManagement/selectQualityInspection', {
+						pageSize: this.pageSize,
+						currentPage: this.currentPage,
+						searchKeyWord: this.searchKeyWord,
+						searchType: this.searchType,
+						managementType: this.managementType,
+						warehouseName: this.warehouseName,
+						compId: '',
+						// pcFlag:1
+					}).then(res => {
+						uni.hideLoading()
+						if (res.data.data) {
+							let data = res.data.data.records
+							//采购信息
+							if (data.length > 0) {
+								if (flag) {
+									that.gridList = data
+								} else {
+									that.gridList = that.gridList.concat(data)
+								}
+							} else {
+								if (this.currentPage == 1) {
+									that.gridList = []
+								}
+								this.isContent = true
 							}
-							this.isContent=true
 						}
-					}
-					// console.log(that.gridList)
-				})
-				.catch(res => {
-					uni.showToast({
-						title: '系统异常,请联系管理员',
-						icon: 'none',
-						duration: 2000
+						// console.log(that.gridList)
+					})
+					.catch(res => {
+						uni.showToast({
+							title: '系统异常,请联系管理员',
+							icon: 'none',
+							duration: 2000
+						})
+						uni.hideLoading()
 					})
-					uni.hideLoading()
-				})
 			},
-			edit(item,status){
+			edit(item, status) {
 				uni.navigateTo({
-					url:'/pages/erpbusiness/edit_quality_testing?id='+item.id+'&managementType='+this.managementType+'&cangid='+this.cangid+'&flag='+status
+					url: '/pages/erpbusiness/edit_quality_testing?id=' + item.id + '&managementType=' + this
+						.managementType + '&cangid=' + this.cangid + '&flag=' + status
 				})
 			},
-			add(){
+			add() {
 				uni.navigateTo({
-					url:'/pages/erpbusiness/add_quality_testing?managementType='+this.managementType+'&cangid='+this.cangid+'&warehouseCount='+this.warehouseCount+'&commonWarehouseNo='+this.commonWarehouseNo+'&warehouseName='+this.warehouseName
+					url: '/pages/erpbusiness/add_quality_testing?managementType=' + this.managementType +
+						'&cangid=' + this.cangid + '&warehouseCount=' + this.warehouseCount +
+						'&commonWarehouseNo=' + this.commonWarehouseNo + '&warehouseName=' + this.warehouseName
 				})
 			},
-			del(item){
-				var that=this
+			del(item) {
+				var that = this
 				uni.showModal({
 					content: "是否删除该质检信息?",
 					showCancel: true,
 					confirmText: '删除',
 					success: function(res) {
 						if (res.confirm) {
-							that.$api.doRequest('post', '/qualityInspectionManagement/api/deleteQualityInspection',{
-								id:item.id
-							}).then(res => {
-								if(res.data.code==200){
+							that.$api.doRequest('post',
+								'/qualityInspectionManagement/api/deleteQualityInspection', {
+									id: item.id
+								}).then(res => {
+								if (res.data.code == 200) {
 									that.$api.msg('删除成功')
-									that.gridList=[]
+									that.gridList = []
 									that.getList()
-								}else{
+								} else {
 									that.$api.msg('系统异常,请联系管理员')
 								}
 							})
@@ -359,7 +370,7 @@
 					}
 				})
 			},
-			fankui(){
+			fankui() {
 				uni.navigateTo({
 					url: `/pages/user/fankui`
 				})
@@ -461,12 +472,12 @@
 		}
 	}
 </script>
-<style scoped lang='scss' >
-	page{
-		background:#F5F6FA;		
-		margin-bottom:160rpx;
+<style scoped lang='scss'>
+	page {
+		background: #F5F6FA;
+		margin-bottom: 160rpx;
 	}
-	
+
 	.container {
 		padding-top: 85px;
 		padding-top: 35px;
@@ -479,44 +490,45 @@
 		background-size: 100% 100%;
 		margin: 0 auto;
 	}
+
 	.item-style {
 		background: white;
 		margin: 20rpx;
 		padding: 20rpx;
-	
+
 		.row1 {
 			display: flex;
 			align-items: center;
 			justify-content: space-between;
-	
+
 			.row1-left {
 				display: flex;
 				justify-content: flex-start;
 				align-items: center;
-	
+
 				.left {
 					margin-right: 20rpx;
 				}
-	
+
 				.top-title {
 					font-size: 32rpx;
 					font-weight: 600;
 					color: #333333;
 				}
-	
+
 				.bottom {
 					color: #878C9C;
 				}
-	
+
 				.right {
 					font-size: 28rpx;
 					font-weight: 600;
 					color: #333333;
 				}
-	
+
 			}
 		}
-	
+
 		.row2 {
 			display: flex;
 			background: #F9F9FA;
@@ -527,14 +539,15 @@
 			color: #878C9C;
 			align-items: center;
 		}
-	
+
 		.row3 {
 			display: flex;
 			margin-top: 30rpx;
+
 			.row3-item {
 				display: flex;
 				margin-right: 40rpx;
-	
+
 				.left {
 					background: #22C572;
 					border-radius: 10rpx;
@@ -546,12 +559,12 @@
 				}
 			}
 		}
-	
+
 		.row4 {
 			display: flex;
 			justify-content: flex-end;
 			margin-top: 10px;
-	
+
 			.right {
 				border: 1px solid #CDCDCD;
 				border-radius: 45rpx;
@@ -559,8 +572,9 @@
 				margin-left: 20rpx;
 			}
 		}
-	
+
 	}
+
 	.cu-tag.badge {
 		right: 26rpx;
 	}
@@ -584,6 +598,7 @@
 		color: #fff;
 		font-size: 32rpx;
 	}
+
 	@keyframes move_wave {
 		0% {
 			transform: translateX(0) translateZ(0) scaleY(1)
@@ -631,10 +646,11 @@
 		border-radius: 10upx;
 	}
 
-.cuIcon {
+	.cuIcon {
 		position: absolute;
 		right: 80px;
 	}
+
 	.grid-item-box {
 		flex: 1;
 		/* position: relative;
@@ -675,12 +691,13 @@
 			/* opacity: .7; */
 		}
 	}
+
 	.cover-container {
-		padding: 1px 10px ;
+		padding: 1px 10px;
 		padding-bottom: 200upx;
-		
-	   /* background-color: #F5F6FA; */
-	/* 	border-radius: 20px; */
+
+		/* background-color: #F5F6FA; */
+		/* 	border-radius: 20px; */
 		margin-top: 60upx;
 
 		.arc {
@@ -770,7 +787,8 @@
 			}
 		}
 	}
-.search-form {
+
+	.search-form {
 		background: #F5F6F9;
 	}
 
@@ -829,6 +847,7 @@
 		width: 100%;
 		background-color: rgb(242, 242, 242);
 	}
+
 	.grid {
 		display: flex;
 		align-items: center;
@@ -881,14 +900,17 @@
 		border-radius: 40px;
 		border: 2px solid #ffffff;
 	}
+
 	.information {
 		font-size: 15px;
 		font-weight: 600;
 		height: 36px;
 	}
-	.cu-list>.cu-item:after{
-		border:none;
+
+	.cu-list>.cu-item:after {
+		border: none;
 	}
+
 	.back-btn {
 		position: fixed;
 		left: 40upx;
@@ -898,9 +920,11 @@
 		font-size: 36upx;
 		color: $font-color-dark;
 	}
-	.navbar{
-		height:50px;
+
+	.navbar {
+		height: 50px;
 	}
+
 	.header-content {
 		position: fixed;
 		left: 50%;
@@ -911,106 +935,129 @@
 		font-size: 36upx;
 		color: $font-color-dark;
 	}
-	.sign{
+
+	.sign {
 		width: 40px;
 		height: 40px;
 		top: 4px;
 		margin-right: 6px;
 	}
-	.indexUp{
-		padding:0 20px;
+
+	.indexUp {
+		padding: 0 20px;
 		align-items: center;
 	}
-	.wrap{
-		background:#fff;
-		margin:10px;
-		border-radius:10px;
-		padding:10px;
-		
-	}
-	.qualityNo{
-		font-size:16px;
-	}
-	.type{
-		font-size:12px;
-		color:#fff;
-		padding:3px 5px;
-		border-radius:50%;
-		line-height:16px;
-	}
-	.type-zhi{
-		background:#22C572;
-	}
-	.type-mao{
-		background:#3296FA;
-	}
-	.type-pi{
-		background:#FD714F;
-	}
-	.time{
-		font-size:12px;
-		color:#878C9C;
-	}
-	.qualityInspector{
-		font-size:14px;
-	}
-	.customerinformation{
-		background:#F9F9FA;
-		padding:7px;
-		margin:20px 0;
-		border-radius:10px;
-		color:#9698A2;
-	}
-	.buttons{
-		flex-direction:row-reverse;
-	}
-	.button{
-		padding:13rpx 30rpx;
-		border:1px solid #CDCDCD;
-		border-radius:15px;
-		margin:0 10px;
-	}
-	.changewarehouse{
-		padding:10px 20px;
-	}
-	.header{
-		background:#fff;
-		margin-top:60px;
-		border-radius:0px 0px 16px 16px;
-	}
-	.footer{
-		background:#fff;
-		position:fixed;
-		bottom:0;
-		width:100%;
-		padding:20px 10px;
-		z-index:10;
-		.button{
-			background:#22C572;
-			width:90%;
-			margin:0 auto;
-			padding:10px;
-			color:#fff;
-			text-align:center;
+
+	.wrap {
+		background: #fff;
+		margin: 10px;
+		border-radius: 10px;
+		padding: 10px;
+
+	}
+
+	.qualityNo {
+		font-size: 16px;
+	}
+
+	.type {
+		font-size: 12px;
+		color: #fff;
+		padding: 3px 5px;
+		border-radius: 50%;
+		line-height: 16px;
+	}
+
+	.type-zhi {
+		background: #22C572;
+	}
+
+	.type-mao {
+		background: #3296FA;
+	}
+
+	.type-pi {
+		background: #FD714F;
+	}
+
+	.time {
+		font-size: 12px;
+		color: #878C9C;
+	}
+
+	.qualityInspector {
+		font-size: 14px;
+	}
+
+	.customerinformation {
+		background: #F9F9FA;
+		padding: 7px;
+		margin: 20px 0;
+		border-radius: 10px;
+		color: #9698A2;
+	}
+
+	.buttons {
+		flex-direction: row-reverse;
+	}
+
+	.button {
+		padding: 13rpx 30rpx;
+		border: 1px solid #CDCDCD;
+		border-radius: 15px;
+		margin: 0 10px;
+	}
+
+	.changewarehouse {
+		padding: 10px 20px;
+	}
+
+	.header {
+		background: #fff;
+		margin-top: 60px;
+		border-radius: 0px 0px 16px 16px;
+	}
+
+	.footer {
+		background: #fff;
+		position: fixed;
+		bottom: 0;
+		width: 100%;
+		padding: 20px 10px;
+		z-index: 10;
+
+		.button {
+			background: #22C572;
+			width: 90%;
+			margin: 0 auto;
+			padding: 10px;
+			color: #fff;
+			text-align: center;
 			border-radius: 30px;
 		}
 	}
-	.status1,.status2,.status3{
+
+	.status1,
+	.status2,
+	.status3 {
 		padding: 8rpx 12rpx;
 		border-radius: 50%;
 		color: white;
 	}
-	.status1{
+
+	.status1 {
 		background: #FD714F;
 	}
-	.status2{
+
+	.status2 {
 		background: #22C572;
 	}
-	.status3{
+
+	.status3 {
 		background: #3296FA;
 	}
-	.center{
+
+	.center {
 		padding-bottom: 150rpx;
 	}
 </style>
-

+ 103 - 76
pages/grain_pulse/dynamic.vue

@@ -1,10 +1,10 @@
 <template>
 	<view class="center">
-		<view class='search' >
-			<u-search placeholder="请输入关键字" bg-color='#F5F6F9' v-model="keyword" @clear="searchClear" style="width: 96%; margin: 0 auto;"
-			@search="getData" @custom="getData"></u-search>
+		<view class='search'>
+			<u-search placeholder="请输入关键字" bg-color='#F5F6F9' v-model="keyword" @clear="searchClear"
+				style="width: 96%; margin: 0 auto;" @search="getData" @custom="getData"></u-search>
 		</view>
-		
+
 		<view class="bottom flex">
 			<view class="bottonCss" @click="release">
 				<image src="../../static/img/liangmai/fabu-2-check@3x.png" mode="" style="width: 40rpx; height: 40rpx;">
@@ -21,8 +21,10 @@
 			<view class="modular">
 				<view class="flex">
 					<view class="touxiang">
-						<image v-if='item.avatarUrl' :src="item.avatarUrl" mode="" style="height: 76rpx;border-radius: 8rpx;"></image>
-						<image v-else src="../../static/img/myimg/YongHu@3x.png" mode="" style="height: 76rpx;border-radius: 8rpx;"></image>
+						<image v-if='item.avatarUrl' :src="item.avatarUrl" mode=""
+							style="height: 76rpx;border-radius: 8rpx;"></image>
+						<image v-else src="../../static/img/myimg/YongHu@3x.png" mode=""
+							style="height: 76rpx;border-radius: 8rpx;"></image>
 					</view>
 					<view class="" style="margin: 20rpx 30rpx;">
 						<view style="color: #333333;font-weight: 600;font-size: 34rpx;">{{item.compName}}</view>
@@ -34,13 +36,14 @@
 					<!-- {{item.content}} -->
 					<u-read-more show-height="200" :shadow-style="shadowStyle" :toggle="true" close-text="展开">
 						<rich-text :nodes="item.content"></rich-text>
-						 <!-- @load="parseLoaded" -->
+						<!-- @load="parseLoaded" -->
 						<!-- <u-parse :html="item.content" ></u-parse> -->
 					</u-read-more>
 				</view>
 				<view class="imgList flex" v-if="item.address != ''">
 					<view v-for="(items,count) in item.imgList" style="width: 30%;margin-left: 20rpx;">
-						<image @click="preview(item.imgList,count)" :src="items" style="height: 220rpx;border-radius: 16rpx;"></image>
+						<image @click="preview(item.imgList,count)" :src="items"
+							style="height: 220rpx;border-radius: 16rpx;"></image>
 					</view>
 				</view>
 				<view class="flex">
@@ -54,9 +57,12 @@
 		</view>
 		<view v-show="isLoadMore">
 			<!-- <uni-load-more :status="loadStatus" icon icon-type></uni-load-more> -->
-			<u-loadmore :status="loadStatus" icon icon-type="circle" margin-bottom="200"/>
+			<u-loadmore :status="loadStatus" icon icon-type="circle" margin-bottom="200" />
 		</view>
 		<u-back-top :scroll-top="scrollTop" mode="circle" icon="arrow-upward"></u-back-top>
+		<u-modal v-model="isShowAlert" :title-style="{fontSize: '18px',fontWeight:'500'}"
+			:content-style="{fontSize: '14px',fontWeight:'400'}" confirm-color='#22C572' confirm-text='确定' title='登录提示'
+			showCancelButton='false' :content="content" @confirm="alertBtn" @cancel="cancelClick"></u-modal>
 	</view>
 </template>
 
@@ -67,6 +73,8 @@
 	export default {
 		data() {
 			return {
+				isShowAlert: false,
+				content: '您尚未登录,是否立即登录?',
 				keyword: "",
 				releaseList: [],
 				releaseInfo: [],
@@ -74,7 +82,7 @@
 				pageSize: 10,
 				isLoadMore: false,
 				loadStatus: "loading",
-				getCompany:{},
+				getCompany: {},
 				shadowStyle: {
 					backgroundImage: "none",
 					paddingTop: "0",
@@ -94,15 +102,15 @@
 			}, 1000);
 		},
 		onReachBottom() { //上拉触底函数
-		var that = this
+			var that = this
 			if (!this.isLoadMore) { //此处判断,上锁,防止重复请求
 				this.isLoadMore = true
 				this.currentPage += 1
 				setTimeout(function() {
-					 uni.stopPullDownRefresh();
-					 that.getrelease()
+					uni.stopPullDownRefresh();
+					that.getrelease()
 				}, 1000);
-				
+
 			}
 		},
 		onShow() {
@@ -114,33 +122,33 @@
 			this.scrollTop = e.scrollTop;
 		},
 		methods: {
-			preview(img,index){
+			preview(img, index) {
 				uni.previewImage({
-				    urls: img,
-				    current:index
+					urls: img,
+					current: index
 				});
 			},
 			getData() {
 				this.$api.doRequest('get', '/settledCompanyDynamics/selectSettledCompanyDynamicsPage', {
 						currentPage: 1,
-						pageSize:10,
+						pageSize: 10,
 						searchKeyWord: this.keyword,
-						searchType:2
+						searchType: 2
 					})
 					.then(res => {
 						if (res.data.code == 200) {
 							this.releaseList = res.data.data.records
-							console.log("releaseList",this.releaseList)
+							console.log("releaseList", this.releaseList)
 							for (let i = 0; i < this.releaseList.length; i++) {
 								if (this.releaseList[i].address != null) {
-									if(this.releaseList[i].address.indexOf(',')!=-1){
+									if (this.releaseList[i].address.indexOf(',') != -1) {
 										this.releaseList[i].imgList = this.releaseList[i].address.split(",")
-									}else{
-										this.releaseList[i].imgList =[this.releaseList[i].address]
+									} else {
+										this.releaseList[i].imgList = [this.releaseList[i].address]
 									}
 								}
 							}
-							
+
 						}
 					})
 			},
@@ -149,7 +157,7 @@
 						currentPage: this.currentPage,
 						pageSize: this.pageSize,
 						searchKeyWord: this.keyword,
-						searchType:2
+						searchType: 2
 					})
 					.then(res => {
 						if (res.data.code == 200) {
@@ -159,54 +167,62 @@
 								this.isLoadMore = false
 								for (let i = 0; i < this.releaseList.length; i++) {
 									if (this.releaseList[i].address != null) {
-										if(this.releaseList[i].address.indexOf(',')!=-1){
+										if (this.releaseList[i].address.indexOf(',') != -1) {
 											this.releaseList[i].imgList = this.releaseList[i].address.split(",")
-										}else{
-											this.releaseList[i].imgList =[this.releaseList[i].address]
+										} else {
+											this.releaseList[i].imgList = [this.releaseList[i].address]
 										}
-										
+
 									}
-			
+
 								}
 							} else {
 								this.loadStatus = 'nomore'
 							}
-			
+
 						}
 					})
 			},
 			searchClear() {
 				this.keyword = ""
 			},
+			alertBtn() {
+				uni.navigateTo({
+					url: '/pages/public/login'
+				})
+			},
+			cancelClick() {
+				this.isShowAlert = false
+			},
 			release() {
 				if (!this.hasLogin) {
-					uni.showModal({
-						title: '登录提示',
-						content: '您尚未登录,是否立即登录?',
-						showCancel: true,
-						confirmText: '登录',
-						success: (e) => {
-							if (e.confirm) {
-								uni.navigateTo({
-									url: '/pages/public/login'
-								})
-							}
-						},
-						fail: () => {},
-						complete: () => {}
-					})
-				}
-				else{
+					this.isShowAlert = true;
+					// uni.showModal({
+					// 	title: '登录提示',
+					// 	content: '您尚未登录,是否立即登录?',
+					// 	showCancel: true,
+					// 	confirmText: '登录',
+					// 	success: (e) => {
+					// 		if (e.confirm) {
+					// 			uni.navigateTo({
+					// 				url: '/pages/public/login'
+					// 			})
+					// 		}
+					// 	},
+					// 	fail: () => {},
+					// 	complete: () => {}
+					// })
+				} else {
 					this.getCompany.loginPhone = this.userInfo.phone
 					this.$api.doRequest('get', '/settledCompanyInfo/companyList', this.getCompany)
 						.then(res => {
 							if (res.data.code == 200) {
-								console.log("companyList",res)
-								if(res.data.data.length > 0){
+								console.log("companyList", res)
+								if (res.data.data.length > 0) {
 									uni.navigateTo({
 										url: `/pages/grain_pulse/release`
 									})
-								}else{
+								} else {
 									uni.showModal({
 										content: "您还没有入驻粮脉,不能发布,是否前去完善入驻信息!",
 										showCancel: true,
@@ -224,25 +240,33 @@
 						})
 				}
 			},
+			alertBtn() {
+				uni.navigateTo({
+					url: '/pages/public/login'
+				})
+			},
+			cancelClick() {
+				this.isShowAlert = false
+			},
 			record() {
 				if (!this.hasLogin) {
-					uni.showModal({
-						title: '登录提示',
-						content: '您尚未登录,是否立即登录?',
-						showCancel: true,
-						confirmText: '登录',
-						success: (e) => {
-							if (e.confirm) {
-								uni.navigateTo({
-									url: '/pages/public/login'
-								})
-							}
-						},
-						fail: () => {},
-						complete: () => {}
-					})
-				}
-				else{
+					this.isShowAlert = true;
+					// uni.showModal({
+					// 	title: '登录提示',
+					// 	content: '您尚未登录,是否立即登录?',
+					// 	showCancel: true,
+					// 	confirmText: '登录',
+					// 	success: (e) => {
+					// 		if (e.confirm) {
+					// 			uni.navigateTo({
+					// 				url: '/pages/public/login'
+					// 			})
+					// 		}
+					// 	},
+					// 	fail: () => {},
+					// 	complete: () => {}
+					// })
+				} else {
 					uni.navigateTo({
 						url: `/pages/grain_pulse/record`
 					})
@@ -253,9 +277,10 @@
 </script>
 
 <style lang="scss" scoped>
-	page{
-		background:#F5F6FA;
+	page {
+		background: #F5F6FA;
 	}
+
 	.center {
 		padding: 0 4rpx;
 	}
@@ -274,7 +299,7 @@
 		height: 40rpx;
 		margin-top: 40rpx;
 		text-align: center;
-		font-size:20rpx;
+		font-size: 20rpx;
 	}
 
 	.modular {
@@ -316,13 +341,15 @@
 		margin-left: 30rpx;
 		text-align: center;
 		line-height: 48rpx;
-		padding:0px 13px 0 5px;
+		padding: 0px 13px 0 5px;
 	}
+
 	/deep/.u-content {
-		text-indent:0 !important;	
+		text-indent: 0 !important;
 	}
-	.search{
-		background:#fff;
-		padding:10px;
+
+	.search {
+		background: #fff;
+		padding: 10px;
 	}
 </style>

+ 106 - 87
pages/grain_pulse/home.vue

@@ -7,7 +7,8 @@
 					<image class='location' src="../../static/img/liangmai/icon_ditu@2x.png" mode=""></image>
 					{{position.name}}
 				</view>
-				<view @click='naviageToPage("/pages/grain_pulse/distribution/distribution?position="+JSON.stringify(position))'
+				<view
+					@click='naviageToPage("/pages/grain_pulse/distribution/distribution?position="+JSON.stringify(position))'
 					class='Regular flex align-item-center distribution justify-center'>
 					<image class='cangku' src="../../static/img/liangmai/cangku.png" mode=""></image>
 					分布
@@ -30,9 +31,11 @@
 				<view class='friendcircle-content flex justify-between'>
 					<image class='bg' src="../../static/img/liangmai/bg.png" mode=""></image>
 					<view class='friendcircle-content-right'>
-						<view v-for='item in releaseInfo' class='friendcircle-content-right-item Regular flex align-item-center'>
+						<view v-for='item in releaseInfo'
+							class='friendcircle-content-right-item Regular flex align-item-center'>
 							<image class='headportrait' v-if='item.avatarUrl' :src="item.avatarUrl" mode=""></image>
-							<image class='headportrait' v-else src="../../static/img/myimg/YongHu@3x.png" mode=""></image>
+							<image class='headportrait' v-else src="../../static/img/myimg/YongHu@3x.png" mode="">
+							</image>
 							{{item.title}}
 						</view>
 					</view>
@@ -45,7 +48,8 @@
 			</scroll-view>
 			<view v-if='datalist.length>0' v-for='item in datalist' @click='todetails(item)' class="listitem">
 				<view class="flex">
-					<image style='width:98px;height:97px;flex:1;' class='listitem-left' :src="item.attachmentAddress" mode=""></image>
+					<image style='width:98px;height:97px;flex:1;' class='listitem-left' :src="item.attachmentAddress"
+						mode=""></image>
 					<view style='flex:2;' class="listitem-right">
 						<view class="companyname Medium">{{item.compName}}</view>
 						<view class='Regular introduce'>{{item.companyProfile}}</view>
@@ -60,19 +64,22 @@
 					<view v-if='position.name!="未设置"' class='distance Regular'>{{item._metre}}</view>
 				</view>
 			</view>
-			
+
 			<view style='padding:10px;text-align:center;' v-if='datalist.length==0'>
 				当前暂无数据
 			</view>
-			<view v-else-if="isLoadMore" >
+			<view v-else-if="isLoadMore">
 				<uni-load-more :status="loadStatus"></uni-load-more>
 			</view>
 		</view>
-		<view  class="enter" @click="enterUrl">
+		<view class="enter" @click="enterUrl">
 			<image style='width:56.5px;height:28px;' src="../../static/img/liangmai/ruzhu.png" mode=""></image>
 			<view class='enter-content'>入驻</view>
 		</view>
 		<u-back-top :scroll-top="scrollTop" mode="circle" icon="arrow-upward"></u-back-top>
+		<u-modal v-model="isShowAlert" :title-style="{fontSize: '18px',fontWeight:'500'}"
+			:content-style="{fontSize: '14px',fontWeight:'400'}" confirm-color='#22C572' confirm-text='确定' title='登录提示'
+			showCancelButton='false' :content="content" @confirm="alertBtn" @cancel="cancelClick"></u-modal>
 	</view>
 </template>
 
@@ -86,14 +93,16 @@
 		},
 		data() {
 			return {
-				position:{
-					name:"未设置"
-				} ,
+				isShowAlert: false,
+				content: '您尚未登录,是否立即登录?',
+				position: {
+					name: "未设置"
+				},
 				status: 0,
 				mainBusinessType: '',
 				mainBusinessTypeKey: '0',
 				pageSize: 10,
-				releaseInfo:[],
+				releaseInfo: [],
 				currentPage: 1,
 				isLoadMore: false, //是否加载中
 				loadStatus: 'loading', //加载样式:more-加载前样式,loading-加载中样式,nomore-没有数据样式
@@ -125,7 +134,7 @@
 						value: '7'
 					}
 				],
-				notlist:false,
+				notlist: false,
 				datalist: [],
 				scrollTop: 0,
 			}
@@ -137,22 +146,22 @@
 			this.scrollTop = e.scrollTop;
 		},
 		onPullDownRefresh() {
-		    this.getList()
+			this.getList()
 			this.isLoadMore = false
 			this.loadStatus = 'loading'
 			this.currentPage = 1
-		     setTimeout(function () {
-		         uni.stopPullDownRefresh();  //关闭下拉刷新
-		     }, 1000);
-		 },
-		 onReachBottom() { //上拉触底函数
+			setTimeout(function() {
+				uni.stopPullDownRefresh(); //关闭下拉刷新
+			}, 1000);
+		},
+		onReachBottom() { //上拉触底函数
 			if (!this.isLoadMore) { //此处判断,上锁,防止重复请求
 				this.isLoadMore = true
 				this.currentPage += 1
-				console.log("currentPage",this.currentPage)
+				console.log("currentPage", this.currentPage)
 				this.getData()
 			}
-		 },
+		},
 		onShow(val) {
 			this.isLoadMore = false
 			this.currentPage = 1
@@ -160,14 +169,14 @@
 			uni.getStorage({
 				key: 'setLocaltion',
 				success: (res) => {
-					console.log("setLocaltion",res.data)
+					console.log("setLocaltion", res.data)
 					this.position = res.data
 					// uni.removeStorage({
 					// 	key: 'setLocaltion'
 					// })
 				},
 			})
-			if(this.position.name == "未设置"){
+			if (this.position.name == "未设置") {
 				let that = this;
 				uni.getLocation({
 					type: 'gcj02',
@@ -180,7 +189,7 @@
 						// #ifdef APP-PLUS
 						that.position.name = res.address.poiName
 						that.position.cityname = res.address.city
-						that.position.location = res.longitude + "," +  res.latitude
+						that.position.location = res.longitude + "," + res.latitude
 						uni.setStorage({
 							key: 'setLocaltion',
 							data: that.position
@@ -188,13 +197,12 @@
 						// #endif
 						that.getList()
 					},
-					fail:function(req){
+					fail: function(req) {
 						console.log(req)
 						that.getList()
 					}
 				});
-			}
-			else{
+			} else {
 				this.getList()
 			}
 			uni.removeTabBarBadge({
@@ -208,10 +216,10 @@
 						name,
 						value
 					});
-					if(value != 0&&value){
+					if (value != 0 && value) {
 						uni.setTabBarBadge({
-							index:4,
-							text:value+""
+							index: 4,
+							text: value + ""
 						})
 					}
 					name = 'taskTip';
@@ -224,18 +232,18 @@
 			})
 		},
 		onLoad(option) {
-			if (option.position){
+			if (option.position) {
 				this.position = option.position
 			}
 		},
 		methods: {
-			getList(){
-				
+			getList() {
+
 				this.$api.doRequest('get', '/settledCompanyDynamics/selectSettledCompanyDynamicsPage', {
 						currentPage: 1,
 						pageSize: 3,
 						searchKeyWord: this.keyword,
-						searchType:2
+						searchType: 2
 					})
 					.then(res => {
 						if (res.data.code == 200) {
@@ -244,61 +252,63 @@
 					})
 				this.getInfo()
 			},
-			getData(){
+			getData() {
 				var that = this
 				uni.showLoading({
-					title:"正在加载"
-				}) 
-				
+					title: "正在加载"
+				})
+
 				this.$api.doRequest('get', '/settledCompanyInfo/selectSettledCompanyInfo', {
 					mainBusinessType: this.mainBusinessType,
 					pageSize: this.pageSize,
 					currentPage: this.currentPage,
 					pcFlag: 2,
 					searchType: 2,
-					location:that.position.cityname
+					location: that.position.cityname
 				}).then(res => {
 					if (res.data.code == 200) {
 						var data = res.data.data.records
-						if(data.length > 0){
+						if (data.length > 0) {
 							this.datalist = this.datalist.concat(data)
-							if(this.position&&this.position.location){
-								let lat2 =this.position.location.split(',')[1];
+							if (this.position && this.position.location) {
+								let lat2 = this.position.location.split(',')[1];
 								let lng2 = this.position.location.split(',')[0];
-								for(var i=0;i<this.datalist.length;i++){
-									this.datalist[i]._metre=this.utils.getDistance(this.datalist[i].latitude,this.datalist[i].longitude,lat2,lng2)
+								for (var i = 0; i < this.datalist.length; i++) {
+									this.datalist[i]._metre = this.utils.getDistance(this.datalist[i].latitude,
+										this.datalist[i].longitude, lat2, lng2)
 								}
 							}
-							if(this.currentPage==1&&this.datalist.length==0){
-								this.notlist=true
-							}else{
-								this.notlist=false
+							if (this.currentPage == 1 && this.datalist.length == 0) {
+								this.notlist = true
+							} else {
+								this.notlist = false
 							}
-							console.log("this.datalist",this.datalist)
-							that.isLoadMore=false
-						}
-						else{
+							console.log("this.datalist", this.datalist)
+							that.isLoadMore = false
+						} else {
 							if (that.currentPage > 1) {
 								that.currentPage -= 1
 							}
 							that.isLoadMore = true
 							that.loadStatus = 'nomore'
 						}
-						
+
 						// let _metre = this.utils.getDistance(lat1,lng1,lat2,lng2) +"千米"
 					}
 					uni.hideLoading()
 				}).catch(res => {
-					that.isLoadMore=false
+					that.isLoadMore = false
 					that.loadStatus = 'nomore'
-					if(that.currentPage>1){that.currentPage=1}
+					if (that.currentPage > 1) {
+						that.currentPage = 1
+					}
 					uni.hideLoading()
 				})
 			},
-			getInfo(){
+			getInfo() {
 				var that = this
 				uni.showLoading({
-					title:"正在加载"
+					title: "正在加载"
 				})
 				this.$api.doRequest('get', '/settledCompanyInfo/selectSettledCompanyInfo', {
 					mainBusinessType: this.mainBusinessType,
@@ -306,20 +316,21 @@
 					currentPage: this.currentPage,
 					pcFlag: 2,
 					searchType: 2,
-					location:that.position.cityname
+					location: that.position.cityname
 				}).then(res => {
 					if (res.data.code == 200) {
 						this.datalist = res.data.data.records
 						console.log(this.position)
-						let lat2 =this.position.location.split(',')[1];
+						let lat2 = this.position.location.split(',')[1];
 						let lng2 = this.position.location.split(',')[0];
-						for(var i=0;i<this.datalist.length;i++){
-							this.datalist[i]._metre=this.utils.getDistance(this.datalist[i].latitude,this.datalist[i].longitude,lat2,lng2)
+						for (var i = 0; i < this.datalist.length; i++) {
+							this.datalist[i]._metre = this.utils.getDistance(this.datalist[i].latitude, this
+								.datalist[i].longitude, lat2, lng2)
 						}
-						if(this.currentPage==1&&this.datalist.length==0){
-							this.notlist=true
-						}else{
-							this.notlist=false
+						if (this.currentPage == 1 && this.datalist.length == 0) {
+							this.notlist = true
+						} else {
+							this.notlist = false
 						}
 						console.log(this.datalist)
 						// let _metre = this.utils.getDistance(lat1,lng1,lat2,lng2) +"千米"
@@ -335,35 +346,43 @@
 				} else {
 					this.mainBusinessType = ''
 				}
-				this.currentPage=1
+				this.currentPage = 1
 				this.getInfo()
 				this.mainBusinessTypeKey = item.value
 			},
+			alertBtn() {
+				uni.navigateTo({
+					url: '/pages/public/login'
+				})
+			},
+			cancelClick() {
+				this.isShowAlert = false
+			},
 			enterUrl() {
 				if (!this.hasLogin) {
-					uni.showModal({
-						title: '登录提示',
-						content: '您尚未登录,是否立即登录?',
-						showCancel: true,
-						confirmText: '登录',
-						success: (e) => {
-							if (e.confirm) {
-								uni.navigateTo({
-									url: '/pages/public/login'
-								})
-							}
-						},
-						fail: () => {},
-						complete: () => {}
-					})
-				}
-				else{
+					this.isShowAlert = true;
+					// uni.showModal({
+					// 	title: '登录提示',
+					// 	content: '您尚未登录,是否立即登录?',
+					// 	showCancel: true,
+					// 	confirmText: '登录',
+					// 	success: (e) => {
+					// 		if (e.confirm) {
+					// 			uni.navigateTo({
+					// 				url: '/pages/public/login'
+					// 			})
+					// 		}
+					// 	},
+					// 	fail: () => {},
+					// 	complete: () => {}
+					// })
+				} else {
 					//入驻
 					uni.navigateTo({
 						url: '/pages/grain_pulse/enter'
 					})
 				}
-				
+
 			},
 			friendcircle() {
 				uni.navigateTo({
@@ -381,7 +400,7 @@
 					url: item
 				})
 			},
-			naviageToPage1(item,url) {
+			naviageToPage1(item, url) {
 				uni.setStorageSync('location', item)
 				uni.navigateTo({
 					url: url
@@ -404,7 +423,7 @@
 	.location {
 		width: 30rpx;
 		height: 35rpx;
-		margin-right:10rpx ;
+		margin-right: 10rpx;
 	}
 
 	.locationwrap {
@@ -497,7 +516,7 @@
 		width: 22.5px;
 		height: 22.5px;
 		margin-right: 8.5px;
-		border-radius:10px;
+		border-radius: 10px;
 	}
 
 	/* 圈友说--》 */
@@ -548,7 +567,7 @@
 		height: 200rpx;
 		margin-right: 8px;
 		border-radius: 5px;
-		
+
 	}
 
 	.companyname {

+ 34 - 20
pages/home/home.vue

@@ -111,6 +111,9 @@
 				<view :class="PageCur=='find'?'cuIcon-friendfill':'cuIcon-friendfill'"></view> 发现
 			</view>
 		</view>
+		<u-modal v-model="isShowAlert" :title-style="{fontSize: '18px',fontWeight:'500'}"
+					:content-style="{fontSize: '14px',fontWeight:'400'}" confirm-color='#22C572' confirm-text='确定' title='登录提示'
+					showCancelButton='false' :content="content" @confirm="alertBtn" @cancel="cancelClick"></u-modal>
 	</view>
 </template>
 
@@ -129,6 +132,8 @@ export default {
 	
 	data() {
 		return {
+			isShowAlert: false,
+						content: '您尚未登录,是否立即登录?',
 			selectShow: false,
 			PageCur: "msg",
 			options: [
@@ -225,26 +230,27 @@ export default {
 	},
 	onLoad(){	
 		if (!this.hasLogin) {
-			uni.showModal({
-				title: '登录提示',
-				content: '您尚未登录,是否立即登录?',
-				showCancel: true,
-				confirmText: '登录',
-				success: (e) => {
-					if (e.confirm) {
-						uni.navigateTo({
-							url: '/pages/public/login'
-						})
-					}
-					else{
-						uni.switchTab({
-							url: '/pages/sale/information'
-						});
-					}
-				},
-				fail: () => {},
-				complete: () => {}
-			})
+			this.isShowAlert = true;
+			// uni.showModal({
+			// 	title: '登录提示',
+			// 	content: '您尚未登录,是否立即登录?',
+			// 	showCancel: true,
+			// 	confirmText: '登录',
+			// 	success: (e) => {
+			// 		if (e.confirm) {
+			// 			uni.navigateTo({
+			// 				url: '/pages/public/login'
+			// 			})
+			// 		}
+			// 		else{
+			// 			uni.switchTab({
+			// 				url: '/pages/sale/information'
+			// 			});
+			// 		}
+			// 	},
+			// 	fail: () => {},
+			// 	complete: () => {}
+			// })
 		}
 		else{
 			uni.hideTabBar()
@@ -260,6 +266,14 @@ export default {
 		}
 	},
 	methods: {
+			alertBtn() {
+						uni.navigateTo({
+							url: '/pages/public/login'
+						})
+					},
+					cancelClick() {
+						this.isShowAlert = false
+					},
 		back(){
 			uni.switchTab({
 				url:'/pages/sale/information'

+ 98 - 75
pages/task/audit/Issueandreceipt_task_approval.vue

@@ -249,8 +249,8 @@
 		<u-popup v-model="show1" mode="center">
 			<view style="width: 300px;padding: 30rpx 10rpx;border-radius: 20rpx;">
 				<view class="rejectText">审核意见(驳回)</view>
-				<u-input v-model="rejectInfo" type="textarea" :border="border" :height="height" :auto-height="autoHeight"  class="rejectInfoCss"
-					placeholder="请输入审核意见" />
+				<u-input v-model="rejectInfo" type="textarea" :border="border" :height="height"
+					:auto-height="autoHeight" class="rejectInfoCss" placeholder="请输入审核意见" />
 				<view class="flex">
 					<u-button @click="show1 = false" type="error" hover-class='none'>取消</u-button>
 					<u-button @click="rejectSubmit()" type="success">确定</u-button>
@@ -260,8 +260,8 @@
 		<u-popup v-model="show2" mode="center">
 			<view style="width: 300px;padding: 30rpx 10rpx;border-radius: 20rpx;">
 				<view class="rejectText">审核意见(通过)</view>
-				<u-input v-model="rejectInfo1" type="textarea" :border="border" :height="height" :auto-height="autoHeight"  class="rejectInfoCss"
-					placeholder="请输入审核意见" />
+				<u-input v-model="rejectInfo1" type="textarea" :border="border" :height="height"
+					:auto-height="autoHeight" class="rejectInfoCss" placeholder="请输入审核意见" />
 				<view class="flex">
 					<u-button @click="show2 = false" type="error" hover-class='none'>取消</u-button>
 					<u-button @click="passSubmit()" type="success">确定</u-button>
@@ -278,12 +278,14 @@
 </template>
 
 <script>
+	import helper from '@/common/helper.js';
 	import {
 		mapState
 	} from 'vuex';
 	export default {
 		data() {
 			return {
+				everyCheck: '',
 				height: 200,
 				autoHeight: true,
 				border: false,
@@ -296,7 +298,7 @@
 				show1: false,
 				show2: false,
 				rejectInfo: "", //驳回原因
-				rejectInfo1: "",//通过意见
+				rejectInfo1: "", //通过意见
 				pjList: [{
 						type: '一等品'
 					},
@@ -315,8 +317,15 @@
 		// onReady() {
 		// 	this.$refs.uForm.setRules(this.rules);
 		// },
+		onBackPress(e) {
+			uni.navigateTo({
+				url: "/pages/task/my_task"
+			})
+			return true;
+		},
 		onLoad(options) {
 			this.id = options.id
+			this.everyCheck = uni.getStorageSync("everyTask")
 			this.getList()
 		},
 		computed: {
@@ -453,7 +462,7 @@
 				list.compId = sessionStorage.getItem('ws-pf_compId')
 				// list.publisher = this.userInfo.userName
 				uni.showLoading({
-					title:"审核中"
+					title: "审核中"
 				})
 				this.$api.doRequest('post', '/inOutWarehouseTask/api/checkOrUpdateInOutTask', list).then(res => {
 					if (res.data.code == 200) {
@@ -463,25 +472,28 @@
 							auditMind: this.rejectInfo1,
 							needReapply: false
 						}).then(res => {
-							uni.hideLoading()
 							if (res.data.code == 200) {
 								this.$api.msg('审核成功!')
-								setTimeout(function() {
-									uni.navigateBack()
-								}, 1000);
-							}else{
+							} else {
 								this.$api.msg('审核失败!')
 							}
+							setTimeout(function() {
+								if (this.everyCheck) {
+									helper.setAudit(this.list)
+								} else {
+									uni.navigateBack()
+								}
+								uni.hideLoading()
+							}, 1000);
 						}).catch(res => {
 							uni.hideLoading()
-							if(res.message){
+							if (res.message) {
 								uni.showToast({
 									title: res.message,
 									icon: 'none',
 									duration: 2000
 								})
-							}
-							else{
+							} else {
 								uni.showToast({
 									title: "系统异常,请联系管理员",
 									icon: 'none',
@@ -489,21 +501,19 @@
 								})
 							}
 						})
-						
-					}
-					else{
+
+					} else {
 						this.$api.msg('审核失败!')
 					}
 				}).catch(res => {
 					uni.hideLoading()
-					if(res.message){
+					if (res.message) {
 						uni.showToast({
 							title: res.message,
 							icon: 'none',
 							duration: 2000
 						})
-					}
-					else{
+					} else {
 						uni.showToast({
 							title: "系统异常,请联系管理员",
 							icon: 'none',
@@ -513,6 +523,9 @@
 				})
 			},
 			requestaudit(list, status) {
+				uni.showLoading({
+					title: "审核中"
+				})
 				list.compId = '2710b21efc1e4393930c5dc800010dc4'
 				// list.publisher = this.userInfo.userName
 				this.$api.doRequest('post', '/inOutWarehouseTask/api/checkOrUpdateInOutTask', list).then(res => {
@@ -526,7 +539,12 @@
 							if (res.data.code == 200) {
 								this.$api.msg('驳回成功!')
 								setTimeout(function() {
-									uni.navigateBack()
+									if (this.everyCheck) {
+										helper.setAudit(this.list)
+									} else {
+										uni.navigateBack()
+									}
+									uni.hideLoading()
 								}, 1000);
 							}
 						})
@@ -535,56 +553,56 @@
 			},
 			check() {
 				// (1出库2入库3移库4退库并出库)taskTypeKey
-				if(this.OutList.taskTypeKey == 1 || this.OutList.taskTypeKey == 3){
+				if (this.OutList.taskTypeKey == 1 || this.OutList.taskTypeKey == 3) {
 					if (!this.OutList.grade) {
-					this.$api.msg('品级不能为空')
-					return
-				}
-				if (!this.OutList.bulkDensity) {
-					this.$api.msg('容重不能为空')
-					return
-				}
-				if (this.OutList.bulkDensity < 500 || this.OutList.bulkDensity > 1000) {
-					this.$api.msg('容重输入错误')
-					return
-				}
-				if (String(this.OutList.bulkDensity).indexOf('.') != -1 && String(this.OutList.bulkDensity).length - (
-						String(this.OutList.bulkDensity).indexOf('.') + 1) > 0) {
-					this.$api.msg('容重输入错误')
-					return
-				}
-				if (!this.OutList.waterContent) {
-					this.$api.msg('水分不能为空')
-					return
-				}
-				if (isNaN(this.OutList.waterContent) ||
-					(String(this.OutList.waterContent).indexOf('.') != -1 &&
-						String(this.OutList.waterContent).length -
-						(String(this.OutList.waterContent).indexOf('.') + 1) >
-						2) ||
-					this.OutList.waterContent < 1 ||
-					this.OutList.waterContent > 40
-				) {
-					this.$api.msg('水分输入错误!')
-					return
-				}
-				if (!this.OutList.unitPrice) {
-					this.$api.msg('单价不能为空')
-					return
-				}
-				if (isNaN(this.OutList.unitPrice) ||
-					(String(this.OutList.unitPrice).indexOf('.') != -1 &&
-						String(this.OutList.unitPrice).length -
-						(String(this.OutList.unitPrice).indexOf('.') + 1) >
-						2) ||
-					this.OutList.unitPrice < 1 ||
-					this.OutList.unitPrice > 10000
-				) {
-					this.$api.msg('单价输入错误!')
-					return
-				}
+						this.$api.msg('品级不能为空')
+						return
+					}
+					if (!this.OutList.bulkDensity) {
+						this.$api.msg('容重不能为空')
+						return
+					}
+					if (this.OutList.bulkDensity < 500 || this.OutList.bulkDensity > 1000) {
+						this.$api.msg('容重输入错误')
+						return
+					}
+					if (String(this.OutList.bulkDensity).indexOf('.') != -1 && String(this.OutList.bulkDensity).length - (
+							String(this.OutList.bulkDensity).indexOf('.') + 1) > 0) {
+						this.$api.msg('容重输入错误')
+						return
+					}
+					if (!this.OutList.waterContent) {
+						this.$api.msg('水分不能为空')
+						return
+					}
+					if (isNaN(this.OutList.waterContent) ||
+						(String(this.OutList.waterContent).indexOf('.') != -1 &&
+							String(this.OutList.waterContent).length -
+							(String(this.OutList.waterContent).indexOf('.') + 1) >
+							2) ||
+						this.OutList.waterContent < 1 ||
+						this.OutList.waterContent > 40
+					) {
+						this.$api.msg('水分输入错误!')
+						return
+					}
+					if (!this.OutList.unitPrice) {
+						this.$api.msg('单价不能为空')
+						return
+					}
+					if (isNaN(this.OutList.unitPrice) ||
+						(String(this.OutList.unitPrice).indexOf('.') != -1 &&
+							String(this.OutList.unitPrice).length -
+							(String(this.OutList.unitPrice).indexOf('.') + 1) >
+							2) ||
+						this.OutList.unitPrice < 1 ||
+						this.OutList.unitPrice > 10000
+					) {
+						this.$api.msg('单价输入错误!')
+						return
+					}
 				}
-				
+
 				if (this.OutList.taskTypeKey == 1) {
 					if (!this.OutList.businessDescribe) {
 						this.$api.msg('业务描述不能为空')
@@ -595,7 +613,7 @@
 						return
 					}
 				}
-				if (this.EnterList.taskTypeKey ==2 && this.EnterList.judge) {
+				if (this.EnterList.taskTypeKey == 2 && this.EnterList.judge) {
 					if (!this.EnterList.grade) {
 						this.$api.msg('品级不能为空')
 						return
@@ -608,7 +626,8 @@
 						this.$api.msg('容重输入错误')
 						return
 					}
-					if (String(this.EnterList.bulkDensity).indexOf('.') != -1 && String(this.EnterList.bulkDensity).length - (
+					if (String(this.EnterList.bulkDensity).indexOf('.') != -1 && String(this.EnterList.bulkDensity)
+						.length - (
 							String(this.EnterList.bulkDensity).indexOf('.') + 1) > 0) {
 						this.$api.msg('容重输入错误')
 						return
@@ -662,7 +681,7 @@
 						return
 					}
 				}
-				if(this.retreatList.taskTypeKey == 4 && this.retreatList.judge){
+				if (this.retreatList.taskTypeKey == 4 && this.retreatList.judge) {
 					if (!this.retreatList.grade) {
 						this.$api.msg('品级不能为空')
 						return
@@ -675,7 +694,8 @@
 						this.$api.msg('容重输入错误')
 						return
 					}
-					if (String(this.retreatList.bulkDensity).indexOf('.') != -1 && String(this.retreatList.bulkDensity).length - (
+					if (String(this.retreatList.bulkDensity).indexOf('.') != -1 && String(this.retreatList.bulkDensity)
+						.length - (
 							String(this.retreatList.bulkDensity).indexOf('.') + 1) > 0) {
 						this.$api.msg('容重输入错误')
 						return
@@ -857,6 +877,7 @@
 			}
 		}
 	}
+
 	.rejectInfoCss {
 		border: 1px solid #ccc;
 		border-radius: 10rpx;
@@ -865,10 +886,12 @@
 		overflow-y: auto;
 		margin: 30rpx;
 	}
+
 	.rejectText {
 		text-align: center;
 	}
-	/deep/.u-input__textarea{
-		height: 300rpx!important;
+
+	/deep/.u-input__textarea {
+		height: 300rpx !important;
 	}
 </style>

+ 47 - 28
pages/task/audit/acquisition_settlement_approval.vue

@@ -9,8 +9,7 @@
 						<image src="../../../static/img/tongguo.png" mode="" v-if="status == '已通过'"
 							style="height: 40rpx;"></image><!-- 通过 -->
 						<image src="../../../static/img/daishenhe.png" mode=""
-							v-if="status == '审核中' || status == '待决策人审核'"
-							style="height: 40rpx;"></image><!-- 待审核 -->
+							v-if="status == '审核中' || status == '待决策人审核'" style="height: 40rpx;"></image><!-- 待审核 -->
 					</view>
 					<view class="infoText">{{status}}</view>
 				</view>
@@ -50,8 +49,8 @@
 		<u-popup v-model="show2" mode="center">
 			<view style="width: 300px;padding: 30rpx 10rpx;border-radius: 20rpx;">
 				<view class="rejectText">审核意见(通过)</view>
-				<u-input v-model="rejectInfo1" type="textarea" :border="border" :height="height" :auto-height="autoHeight"  class="rejectInfoCss"
-					placeholder="请输入审核意见" />
+				<u-input v-model="rejectInfo1" type="textarea" :border="border" :height="height"
+					:auto-height="autoHeight" class="rejectInfoCss" placeholder="请输入审核意见" />
 				<view class="flex">
 					<u-button @click="show2 = false" type="error" hover-class='none'>取消</u-button>
 					<u-button @click="passSubmit()" type="success">确定</u-button>
@@ -61,41 +60,50 @@
 		<u-toast ref="uToast" />
 		<view style='padding:10px;' class='flex bottom-btn'>
 			<!-- getRoles("acquisitionQuality.initial") -->
-			<u-button @click='show1 = true' type="error" class="btn1" hover-class='none'>驳回</u-button>
-			<u-button @click='show2 = true' type="success" class="btn2">通过</u-button>
-<!-- 			<u-button @click='rejectSubmit()' type="error" class="btn1" hover-class='none'>驳回</u-button>
+			<u-button v-if='isSHowBtn' @click='show1 = true' type="error" class="btn1" hover-class='none'>驳回</u-button>
+			<u-button v-if='isSHowBtn' @click='show2 = true' type="success" class="btn2">通过</u-button>
+			<!-- 			<u-button @click='rejectSubmit()' type="error" class="btn1" hover-class='none'>驳回</u-button>
 			<u-button @click='passSubmit()' type="success" class="btn2">通过</u-button> -->
 		</view>
 	</view>
 </template>
 
 <script>
+	import helper from '@/common/helper.js';
 	import {
 		mapState
 	} from 'vuex';
 	export default {
 		data() {
 			return {
+				isSHowBtn: true,
 				height: 200,
 				autoHeight: true,
 				border: false,
-				show2:false,
-				show1:false,
+				show2: false,
+				show1: false,
 				id: "",
 				currentPage: 1,
 				pageSize: 100,
 				rejectInfo: "", //审核驳回意见
 				rejectInfo1: "", //审核通过意见
-				List: [{
-					approveStatus: "",
-				}],
+				List: [],
 				status: "",
-				updateDate:"",
-				warehouseName:"",
+				updateDate: "",
+				warehouseName: "",
+				everyCheck: ''
 			}
 		},
+		onBackPress(e) {
+			uni.navigateTo({
+				url: "/pages/task/my_task"
+			})
+			return true;
+		},
 		onLoad(options) {
 			this.id = options.id
+			this.everyCheck = uni.getStorageSync("everyTask")
+			this.isSHowBtn = options.isShowbtn
 		},
 		onShow(options) {
 			this.getList()
@@ -130,9 +138,10 @@
 			rejectSubmit() {
 				if (!this.rejectInfo) {
 					this.$api.msg('驳回原因不能为空!')
-				}else{
+				} else {
 					var that = this
 					that.show1 = false
+
 					if (this.List.length > 0) {
 						uni.showModal({
 							content: "确定驳回付款申请?",
@@ -146,13 +155,13 @@
 						})
 					}
 				}
-		
+
 			},
 			//通過
 			passSubmit() {
 				if (!this.rejectInfo1) {
 					this.$api.msg('审核意见不能为空!')
-				}else{
+				} else {
 					var that = this
 					this.show2 = false
 					uni.showModal({
@@ -166,9 +175,12 @@
 						}
 					})
 				}
-		
+
 			},
 			audit(item, index, status, status2, reason) {
+				uni.showLoading({
+					title: "审核中"
+				})
 				if (this.List.length > 0) {
 					if (status == true && item.status == "已驳回") {
 						this.$api.doRequest('get', '/paymentManagement/api/openAuditFlow', {
@@ -193,16 +205,20 @@
 					}
 				} else {
 					if (status == true) {
-						that.$api.msg('通过成功')
-						setTimeout(function() {
-							uni.navigateBack()
-						}, 1000);
+						this.$api.msg('通过成功')
 					} else if (status == false) {
-						that.$api.msg('驳回成功')
-						setTimeout(function() {
-							uni.navigateBack()
-						}, 1000);
+						this.$api.msg('驳回成功')
 					}
+					let that = this
+					setTimeout(function() {
+
+						if (that.everyCheck) {
+							helper.setAudit(that.list)
+						} else {
+							uni.navigateBack()
+						}
+						uni.hideLoading()
+					}, 1000);
 				}
 			},
 		}
@@ -316,6 +332,7 @@
 			}
 		}
 	}
+
 	.rejectInfoCss {
 		border: 1px solid #ccc;
 		border-radius: 10rpx;
@@ -324,10 +341,12 @@
 		overflow-y: auto;
 		margin: 30rpx;
 	}
+
 	.rejectText {
 		text-align: center;
 	}
-	/deep/.u-input__textarea{
-		height: 300rpx!important;
+
+	/deep/.u-input__textarea {
+		height: 300rpx !important;
 	}
 </style>

+ 1 - 3
pages/task/audit/acquisition_settlement_details.vue

@@ -53,9 +53,7 @@
 				id: "",
 				currentPage: 1,
 				pageSize: 100,
-				List: [{
-					approveStatus: "",
-				}],
+				List: [],
 				status: "",
 				updateDate:"",
 				warehouseName:"",

+ 35 - 11
pages/task/audit/freight_setting_approval.vue

@@ -32,14 +32,14 @@
 					<view class="text_info">
 						{{list.sendPrivate}}{{list.sendCity}}{{list.sendArea}}{{list.sendDetailedAddress}}
 					</view>
-					
+
 				</u-form-item>
 				<u-form-item label="收货地址" prop="receiveDetailedAddress" label-width="140">
 					<!-- <u-input v-model="list.receiveDetailedAddress" input-align="right" placeholder="收货地址" disabled /> -->
 					<view class="text_info">
 						{{list.receivePrivate}}{{list.receiveCity}}{{list.receiveArea}}{{list.receiveDetailedAddress}}
 					</view>
-					
+
 				</u-form-item>
 				<u-form-item label="运费(元/吨)" prop="tranPrice" label-width="250">
 					<u-input v-model="list.tranPriceIng" input-align="right" placeholder="请输入运费单价" />
@@ -58,31 +58,43 @@
 				</view>
 			</view>
 		</u-popup> -->
-		<u-button type="primary" class="submit" @click="passSubmit()" v-if="list.priceStatus == '审核中'">通过</u-button>
+		<u-button type="primary" class="submit" @click="passSubmit()" v-if="list.priceStatus == '审核中'||isSHowBtn">通过
+		</u-button>
 	</view>
 </template>
 
 <script>
+	import helper from '@/common/helper.js';
 	import {
 		mapState
 	} from 'vuex';
 	export default {
 		data() {
 			return {
+				isSHowBtn: true,
+				everyCheck: '',
 				list: {
 					priceStatus: "",
 				},
 				id: "",
-				show1:false,
-				rejectInfo:"",//审核意见
+				show1: false,
+				rejectInfo: "", //审核意见
 				//弹窗属性
 				// height:200,
 				// autoHeight: true,
 				// border: false,
 			}
 		},
+		onBackPress(e) {
+			uni.navigateTo({
+				url: "/pages/task/my_task"
+			})
+			return true;
+		},
 		onLoad(options) {
 			this.id = options.id
+			this.everyCheck = uni.getStorageSync("everyTask")
+			this.isSHowBtn = options.isShowbtn
 			this.getList()
 		},
 		computed: {
@@ -105,13 +117,16 @@
 				// if (!this.rejectInfo1) {
 				// 	this.$api.msg('审核意见不能为空!')
 				// }else{
-				
+
 				// }
 				uni.showModal({
 					content: "是否通过该设置?",
 					showCancel: true,
 					confirmText: '确定',
 					success: function(res) {
+						uni.showLoading({
+							title: "审核中"
+						})
 						if (res.confirm) {
 							var tranProcessInfo = {}
 							tranProcessInfo.id = that.list.id
@@ -124,10 +139,15 @@
 									if (res.data.code == 200) {
 										that.$api.msg('审核通过成功!')
 										setTimeout(function() {
-											uni.navigateBack()
+											if (that.everyCheck) {
+												helper.setAudit(that.list)
+											} else {
+												uni.navigateBack()
+											}
+											uni.hideLoading()
 										}, 1000);
 									}
-							})
+								})
 						}
 					}
 				})
@@ -197,6 +217,7 @@
 		border-radius: 40rpx;
 		margin-top: 40rpx;
 	}
+
 	.rejectInfoCss {
 		border: 1px solid #ccc;
 		border-radius: 10rpx;
@@ -205,13 +226,16 @@
 		overflow-y: auto;
 		margin: 30rpx;
 	}
+
 	.rejectText {
 		text-align: center;
 	}
-	/deep/.u-input__textarea{
-		height: 300rpx!important;
+
+	/deep/.u-input__textarea {
+		height: 300rpx !important;
 	}
-	.text_info{
+
+	.text_info {
 		display: flex;
 		width: 100%;
 		justify-content: flex-end;

+ 130 - 98
pages/task/audit/freight_settlement_approval.vue

@@ -8,7 +8,8 @@
 							style="height: 40rpx;"></image><!-- 驳回 -->
 						<image src="../../../static/img/tongguo.png" mode="" v-if="list.approveStatus == '已通过'"
 							style="height: 40rpx;"></image><!-- 通过 -->
-						<image src="../../../static/img/daishenhe.png" mode="" v-if="list.approveStatus == '待决策人审核'|| list.approveStatus == '待财务审核'"
+						<image src="../../../static/img/daishenhe.png" mode=""
+							v-if="list.approveStatus == '待决策人审核'|| list.approveStatus == '待财务审核'"
 							style="height: 40rpx;"></image><!-- 待审核 -->
 					</view>
 					<view class="infoText">{{list.approveStatus}}</view>
@@ -22,34 +23,34 @@
 				<view>{{list.contractNo}}</view>
 			</view>
 			<view class="car-container">
-					<view class="car-num title" v-if="list.tranTypeKey== '1'">{{list.carNo}} ({{list.tranCarNo}})</view>
-					<view class="car-num title" v-if="list.tranTypeKey== '2'">车厢号{{list.boxNo}}</view>
-					<view class="car-num title" v-if="list.tranTypeKey== '3'&&list.shipType== '散船'">仓位号{{list.boxNo}}</view>
-					<view class="car-num title" v-if="list.tranTypeKey== '3'&&list.shipType== '集装箱'">箱号{{list.boxNo}}</view>
-					<view class="car-type-item">
-						<view class="left">装</view>
-						<view class="textInfo">{{list.loadingWeight}}吨</view>
-					</view>
-					<view class="car-type-item">
-						<view class="center">卸</view>
-						<view class="textInfo">{{list.unloadingWeight}}吨</view>
-					</view>
-					<view class="car-type-item">
-						<view class="right">结</view>
-						<view class="textInfo">{{list.settlementWeight}}吨</view>
-					</view>
-					<view class="car-type-item">
-						<view class="left">运</view>
-						<view class="textInfo">{{list.transportPrice}}元/吨</view>
-					</view>
-					<view class="car-type-item">
-						<view class="center">扣</view>
-						<view class="textInfo">{{list.deductionAmount}}元</view>
-					</view>
-					<view class="car-type-item">
-						<view class="right">付</view>
-						<view class="textInfo">{{list.amountIngPayable}}元</view>
-					</view>
+				<view class="car-num title" v-if="list.tranTypeKey== '1'">{{list.carNo}} ({{list.tranCarNo}})</view>
+				<view class="car-num title" v-if="list.tranTypeKey== '2'">车厢号{{list.boxNo}}</view>
+				<view class="car-num title" v-if="list.tranTypeKey== '3'&&list.shipType== '散船'">仓位号{{list.boxNo}}</view>
+				<view class="car-num title" v-if="list.tranTypeKey== '3'&&list.shipType== '集装箱'">箱号{{list.boxNo}}</view>
+				<view class="car-type-item">
+					<view class="left">装</view>
+					<view class="textInfo">{{list.loadingWeight}}吨</view>
+				</view>
+				<view class="car-type-item">
+					<view class="center">卸</view>
+					<view class="textInfo">{{list.unloadingWeight}}吨</view>
+				</view>
+				<view class="car-type-item">
+					<view class="right">结</view>
+					<view class="textInfo">{{list.settlementWeight}}吨</view>
+				</view>
+				<view class="car-type-item">
+					<view class="left">运</view>
+					<view class="textInfo">{{list.transportPrice}}元/吨</view>
+				</view>
+				<view class="car-type-item">
+					<view class="center">扣</view>
+					<view class="textInfo">{{list.deductionAmount}}元</view>
+				</view>
+				<view class="car-type-item">
+					<view class="right">付</view>
+					<view class="textInfo">{{list.amountIngPayable}}元</view>
+				</view>
 			</view>
 		</view>
 		<u-popup v-model="show1" mode="center">
@@ -66,8 +67,8 @@
 		<u-popup v-model="show2" mode="center">
 			<view style="width: 300px;padding: 30rpx 10rpx;border-radius: 20rpx;">
 				<view class="rejectText">审核意见(通过)</view>
-				<u-input v-model="rejectInfo1" type="textarea" :border="border" :height="height" :auto-height="autoHeight"  class="rejectInfoCss"
-					placeholder="请输入审核意见" />
+				<u-input v-model="rejectInfo1" type="textarea" :border="border" :height="height"
+					:auto-height="autoHeight" class="rejectInfoCss" placeholder="请输入审核意见" />
 				<view class="flex">
 					<u-button @click="show2 = false" type="error" hover-class='none'>取消</u-button>
 					<u-button @click="passSubmit()" type="success">确定</u-button>
@@ -76,34 +77,43 @@
 		</u-popup>
 		<u-toast ref="uToast" />
 		<view style='padding:10px;' class='flex bottom-btn'>
-			<u-button @click="show1 = true" type="error" class="btn1" hover-class='none'>驳回</u-button>
-			<u-button  @click="show2 = true" type="success" class="btn2">通过</u-button>
+			<u-button v-if='isSHowBtn' @click="show1 = true" type="error" class="btn1" hover-class='none'>驳回</u-button>
+			<u-button v-if='isSHowBtn' @click="show2 = true" type="success" class="btn2">通过</u-button>
 		</view>
 	</view>
 </template>
 
 <script>
+	import helper from '@/common/helper.js';
 	export default {
 		data() {
 			return {
+				isSHowBtn: true,
 				currentPage: 1,
 				pageSize: 10,
-				list: [
-					{
-						approveStatus:"",
-					}
-				],
-				rejectInfo:"",
-				rejectInfo1:"",
-				show1:false,
-				show2:false,
-				height:200,
+				list: {
+					approveStatus: "",
+				},
+				rejectInfo: "",
+				rejectInfo1: "",
+				show1: false,
+				show2: false,
+				height: 200,
 				autoHeight: true,
 				border: false,
+				everyCheck: ''
 			}
 		},
+		onBackPress(e) {
+			uni.navigateTo({
+				url: "/pages/task/my_task"
+			})
+			return true;
+		},
 		onLoad(options) {
 			this.id = options.id
+			this.everyCheck = uni.getStorageSync("everyTask")
+			this.isSHowBtn = options.isShowbtn
 			this.getList()
 		},
 		methods: {
@@ -119,11 +129,11 @@
 							currentPage: this.currentPage,
 							pageSize: this.pageSize,
 							contractNo: this.contractNo,
-							carId:this.carId,
+							carId: this.carId,
 						}).then(res => {
 							if (res.data.code == 200) {
-								this.list= res.data.data.records[0]
-								console.log(this.list,124)
+								this.list = res.data.data.records[0]
+								console.log(this.list, 124)
 							}
 						})
 					}
@@ -134,19 +144,19 @@
 				var that = this
 				if (!this.rejectInfo) {
 					this.$api.msg('驳回原因不能为空!')
-				}else{
-				this.show1 = false
-				uni.showModal({
-					content: "是否确定驳回?",
-					showCancel: true,
-					confirmText: '确定',
-					success: function(res) {
-						if (res.confirm) {
-							that.audit(that.list, 0, false, true, that.rejectInfo)
+				} else {
+					this.show1 = false
+					uni.showModal({
+						content: "是否确定驳回?",
+						showCancel: true,
+						confirmText: '确定',
+						success: function(res) {
+							if (res.confirm) {
+								that.audit(that.list, 0, false, true, that.rejectInfo)
+							}
 						}
-					}
-				})
-			}
+					})
+				}
 
 			},
 			//通过
@@ -154,22 +164,26 @@
 				var that = this
 				if (!this.rejectInfo1) {
 					this.$api.msg('审核意见不能为空!')
-				}else{
-				this.show2 = false
-				uni.showModal({
-					content: "是否确定通过?",
-					showCancel: true,
-					confirmText: '确定',
-					success: function(res) {
-						if (res.confirm) {
-							that.audit(that.list, 0, true, 2,that.rejectInfo1)
+				} else {
+					this.show2 = false
+					uni.showModal({
+						content: "是否确定通过?",
+						showCancel: true,
+						confirmText: '确定',
+						success: function(res) {
+							if (res.confirm) {
+								that.audit(that.list, 0, true, 2, that.rejectInfo1)
+							}
 						}
-					}
-				})
-			}
+					})
+				}
 			},
 			//审核方法
 			audit(list, index, status, status2, reason) {
+				uni.showLoading({
+					title: "审核中"
+				})
+				let that = this
 				if (this.list) {
 					this.$api.doRequest('post', '/workflow/api/handle', {
 						taskId: list.taskId,
@@ -178,16 +192,17 @@
 						needReapply: status2 != undefined ? true : false,
 					}).then(res => {
 						if (status == true) {
-								this.$api.msg('通过成功')
-							setTimeout(function() {
-								uni.navigateBack()
-							}, 1000);
+							this.$api.msg('通过成功')
 						} else if (status == false) {
-								this.$api.msg('驳回成功')
-							setTimeout(function() {
-								uni.navigateBack()
-							}, 1000);
+							this.$api.msg('驳回成功')
 						}
+						setTimeout(function() {
+							if (that.everyCheck) {
+								helper.setAudit(that.list)
+							} else {
+								uni.navigateBack()
+							}
+						}, 1000);
 					})
 				}
 			},
@@ -219,11 +234,12 @@
 			text-align: left;
 			margin-bottom: 30rpx;
 		}
-		.car-container{
+
+		.car-container {
 			padding: 10rpx 20rpx;
 			border-radius: 20rpx;
 			background: white;
-			margin:30rpx 0 ;
+			margin: 30rpx 0;
 			// border-bottom: 2rpx solid #EEEEEE;
 		}
 
@@ -231,27 +247,32 @@
 			display: inline-flex;
 			// justify-content: center;
 			width: 33.33%;
-			margin-bottom: 40rpx ;
+			margin-bottom: 40rpx;
 		}
-		.title{
+
+		.title {
 			font-size: 36rpx;
 		}
 	}
+
 	.bottom-btn {
 		width: 100%;
 		position: fixed;
-		bottom:0;
+		bottom: 0;
 		display: flex;
 		z-index: 2;
 		left: 0;
 		background-color: #f8f8f8;
 		flex-direction: column;
-		.btn1,.btn2{
+
+		.btn1,
+		.btn2 {
 			width: 100%;
 			margin-bottom: 26rpx;
 			border-radius: 90rpx;
 		}
-		.btn1{
+
+		.btn1 {
 			background: white;
 			color: #00C265;
 		}
@@ -262,51 +283,59 @@
 		background: #22C572;
 		border-radius: 10rpx;
 	}
-	.left{
+
+	.left {
 		background: #FEECE6;
 		color: #FE6430;
 	}
-	.center{
+
+	.center {
 		background: #EBEEFA;
 		color: #5C76DF;
 	}
-	.right{
-		background: #E9F8F0 ;
-		color: #22C572 ;
+
+	.right {
+		background: #E9F8F0;
+		color: #22C572;
 	}
-	.left,.center,.right{
+
+	.left,
+	.center,
+	.right {
 		width: 50rpx;
 		height: 50rpx;
 		text-align: center;
 		line-height: 50rpx;
 		border-radius: 10rpx;
 	}
-	.textInfo{
+
+	.textInfo {
 		margin: 6rpx 0 0 10rpx;
 	}
+
 	.topInfo {
 		height: 210rpx;
 		background: linear-gradient(270deg, #22C572 0%, #34DE8A 100%);
 		padding: 30rpx;
-	
+
 		.topInfo-item {
 			height: 158rpx;
 			background-color: #FFFFFF;
 			border-radius: 20rpx;
 			padding: 40rpx;
-	
+
 			.logo {
 				width: 40rpx;
 				height: 40rpx;
 				margin-top: 8rpx;
 			}
-	
+
 			.infoText {
 				font-size: 36rpx;
 				font-weight: 600;
 				margin-left: 20rpx;
 			}
-	
+
 			.infoData {
 				color: #878C9C;
 				font-size: 26rpx;
@@ -314,6 +343,7 @@
 			}
 		}
 	}
+
 	.rejectInfoCss {
 		border: 1px solid #ccc;
 		border-radius: 10rpx;
@@ -322,10 +352,12 @@
 		overflow-y: auto;
 		margin: 30rpx;
 	}
+
 	.rejectText {
 		text-align: center;
 	}
-	/deep/.u-input__textarea{
-		height: 300rpx!important;
+
+	/deep/.u-input__textarea {
+		height: 300rpx !important;
 	}
 </style>

+ 71 - 57
pages/task/audit/freight_settlement_details.vue

@@ -20,34 +20,34 @@
 				<view>{{list.contractNo}}</view>
 			</view>
 			<view class="car-container">
-					<view class="car-num title" v-if="list.tranTypeKey== '1'">{{list.carNo}} ({{list.tranCarNo}})</view>
-					<view class="car-num title" v-if="list.tranTypeKey== '2'">车厢号{{list.boxNo}}</view>
-					<view class="car-num title" v-if="list.tranTypeKey== '3'&&list.shipType== '散船'">仓位号{{list.boxNo}}</view>
-					<view class="car-num title" v-if="list.tranTypeKey== '3'&&list.shipType== '集装箱'">箱号{{list.boxNo}}</view>
-					<view class="car-type-item">
-						<view class="left">装</view>
-						<view class="textInfo">{{list.loadingWeight}}吨</view>
-					</view>
-					<view class="car-type-item">
-						<view class="center">卸</view>
-						<view class="textInfo">{{list.unloadingWeight}}吨</view>
-					</view>
-					<view class="car-type-item">
-						<view class="right">结</view>
-						<view class="textInfo">{{list.settlementWeight}}吨</view>
-					</view>
-					<view class="car-type-item">
-						<view class="left">运</view>
-						<view class="textInfo">{{list.transportPrice}}元/吨</view>
-					</view>
-					<view class="car-type-item">
-						<view class="center">扣</view>
-						<view class="textInfo">{{list.deductionAmount}}元</view>
-					</view>
-					<view class="car-type-item">
-						<view class="right">付</view>
-						<view class="textInfo">{{list.amountIngPayable}}元</view>
-					</view>
+				<view class="car-num title" v-if="list.tranTypeKey== '1'">{{list.carNo}} ({{list.tranCarNo}})</view>
+				<view class="car-num title" v-if="list.tranTypeKey== '2'">车厢号{{list.boxNo}}</view>
+				<view class="car-num title" v-if="list.tranTypeKey== '3'&&list.shipType== '散船'">仓位号{{list.boxNo}}</view>
+				<view class="car-num title" v-if="list.tranTypeKey== '3'&&list.shipType== '集装箱'">箱号{{list.boxNo}}</view>
+				<view class="car-type-item">
+					<view class="left">装</view>
+					<view class="textInfo">{{list.loadingWeight}}吨</view>
+				</view>
+				<view class="car-type-item">
+					<view class="center">卸</view>
+					<view class="textInfo">{{list.unloadingWeight}}吨</view>
+				</view>
+				<view class="car-type-item">
+					<view class="right">结</view>
+					<view class="textInfo">{{list.settlementWeight}}吨</view>
+				</view>
+				<view class="car-type-item">
+					<view class="left">运</view>
+					<view class="textInfo">{{list.transportPrice}}元/吨</view>
+				</view>
+				<view class="car-type-item">
+					<view class="center">扣</view>
+					<view class="textInfo">{{list.deductionAmount}}元</view>
+				</view>
+				<view class="car-type-item">
+					<view class="right">付</view>
+					<view class="textInfo">{{list.amountIngPayable}}元</view>
+				</view>
 			</view>
 		</view>
 		<u-toast ref="uToast" />
@@ -63,11 +63,9 @@
 			return {
 				currentPage: 1,
 				pageSize: 10,
-				list: [
-					{
-						approveStatus:"",
-					}
-				],
+				list: {
+					approveStatus: "",
+				},
 			}
 		},
 		onLoad(options) {
@@ -87,16 +85,16 @@
 							currentPage: this.currentPage,
 							pageSize: this.pageSize,
 							contractNo: this.contractNo,
-							carId:this.carId,
+							carId: this.carId,
 						}).then(res => {
 							if (res.data.code == 200) {
-								this.list= res.data.data.records[0]
+								this.list = res.data.data.records[0]
 							}
 						})
 					}
 				})
 			},
-			fanHui(){
+			fanHui() {
 				uni.navigateBack()
 			}
 		}
@@ -127,11 +125,12 @@
 			text-align: left;
 			margin-bottom: 30rpx;
 		}
-		.car-container{
+
+		.car-container {
 			padding: 10rpx 20rpx;
 			border-radius: 20rpx;
 			background: white;
-			margin:30rpx 0 ;
+			margin: 30rpx 0;
 			// border-bottom: 2rpx solid #EEEEEE;
 		}
 
@@ -139,27 +138,32 @@
 			display: inline-flex;
 			// justify-content: center;
 			width: 33.33%;
-			margin-bottom: 40rpx ;
+			margin-bottom: 40rpx;
 		}
-		.title{
+
+		.title {
 			font-size: 36rpx;
 		}
 	}
+
 	.bottom-btn {
 		width: 100%;
 		position: fixed;
-		bottom:0;
+		bottom: 0;
 		display: flex;
 		z-index: 2;
 		left: 0;
 		background-color: #f8f8f8;
 		flex-direction: column;
-		.btn1,.btn2{
+
+		.btn1,
+		.btn2 {
 			width: 100%;
 			margin-bottom: 26rpx;
 			border-radius: 90rpx;
 		}
-		.btn1{
+
+		.btn1 {
 			background: white;
 			color: #00C265;
 		}
@@ -170,51 +174,59 @@
 		background: #22C572;
 		border-radius: 10rpx;
 	}
-	.left{
+
+	.left {
 		background: #FEECE6;
 		color: #FE6430;
 	}
-	.center{
+
+	.center {
 		background: #EBEEFA;
 		color: #5C76DF;
 	}
-	.right{
-		background: #E9F8F0 ;
-		color: #22C572 ;
+
+	.right {
+		background: #E9F8F0;
+		color: #22C572;
 	}
-	.left,.center,.right{
+
+	.left,
+	.center,
+	.right {
 		width: 50rpx;
 		height: 50rpx;
 		text-align: center;
 		line-height: 50rpx;
 		border-radius: 10rpx;
 	}
-	.textInfo{
+
+	.textInfo {
 		margin: 6rpx 0 0 10rpx;
 	}
+
 	.topInfo {
 		height: 210rpx;
 		background: linear-gradient(270deg, #22C572 0%, #34DE8A 100%);
 		padding: 30rpx;
-	
+
 		.topInfo-item {
 			height: 158rpx;
 			background-color: #FFFFFF;
 			border-radius: 20rpx;
 			padding: 40rpx;
-	
+
 			.logo {
 				width: 40rpx;
 				height: 40rpx;
 				margin-top: 8rpx;
 			}
-	
+
 			.infoText {
 				font-size: 36rpx;
 				font-weight: 600;
 				margin-left: 20rpx;
 			}
-	
+
 			.infoData {
 				color: #878C9C;
 				font-size: 26rpx;
@@ -222,6 +234,7 @@
 			}
 		}
 	}
+
 	.rejectInfoCss {
 		border: 1px solid #ccc;
 		border-radius: 10rpx;
@@ -230,11 +243,12 @@
 		overflow-y: auto;
 		margin: 30rpx;
 	}
+
 	.rejectText {
 		text-align: center;
 	}
-	/deep/.u-input__textarea{
-		height: 300rpx!important;
+
+	/deep/.u-input__textarea {
+		height: 300rpx !important;
 	}
 </style>
-

+ 125 - 99
pages/task/audit/purchase_settlement_approval.vue

@@ -8,8 +8,9 @@
 							style="height: 40rpx;"></image><!-- 驳回 -->
 						<image src="../../../static/img/tongguo.png" mode="" v-if="list[0].status == '已通过'"
 							style="height: 40rpx;"></image><!-- 通过 -->
-						<image src="../../../static/img/daishenhe.png" mode="" v-if="list[0].status == '审核中'||list[0].status == '未审核'"
-							style="height: 40rpx;"></image><!-- 待审核 -->
+						<image src="../../../static/img/daishenhe.png" mode=""
+							v-if="list[0].status == '审核中'||list[0].status == '未审核'" style="height: 40rpx;"></image>
+						<!-- 待审核 -->
 					</view>
 					<view class="infoText">{{list[0].status}}</view>
 				</view>
@@ -34,7 +35,8 @@
 					</view>
 					<view class="row">
 						<view class="left car-type-item">扣款</view>
-						<view class="right weightInfoCss">¥{{item.deductionAmountchange?item.deductionAmountchange:"0"}}/吨</view>
+						<view class="right weightInfoCss">
+							¥{{item.deductionAmountchange?item.deductionAmountchange:"0"}}/吨</view>
 					</view>
 					<view class="row ">
 						<view class="left money">应付</view>
@@ -46,8 +48,8 @@
 		<u-popup v-model="show1" mode="center">
 			<view style="width: 300px;padding: 30rpx 10rpx;border-radius: 20rpx;">
 				<view class="rejectText">审核意见(驳回)</view>
-				<u-input v-model="rejectInfo" type="textarea" :border="border" :height="height" :auto-height="autoHeight"  class="rejectInfoCss"
-					placeholder="请输入审核意见" />
+				<u-input v-model="rejectInfo" type="textarea" :border="border" :height="height"
+					:auto-height="autoHeight" class="rejectInfoCss" placeholder="请输入审核意见" />
 				<view class="flex">
 					<u-button @click="show1 = false" type="error" hover-class='none'>取消</u-button>
 					<u-button @click="rejectSubmit()" type="success">确定</u-button>
@@ -57,8 +59,8 @@
 		<u-popup v-model="show2" mode="center">
 			<view style="width: 300px;padding: 30rpx 10rpx;border-radius: 20rpx;">
 				<view class="rejectText">审核意见(通过)</view>
-				<u-input v-model="rejectInfo1" type="textarea" :border="border" :height="height" :auto-height="autoHeight"  class="rejectInfoCss"
-					placeholder="请输入审核意见" />
+				<u-input v-model="rejectInfo1" type="textarea" :border="border" :height="height"
+					:auto-height="autoHeight" class="rejectInfoCss" placeholder="请输入审核意见" />
 				<view class="flex">
 					<u-button @click="show2 = false" type="error" hover-class='none'>取消</u-button>
 					<u-button @click="passSubmit()" type="success">确定</u-button>
@@ -66,40 +68,49 @@
 			</view>
 		</u-popup>
 		<u-toast ref="uToast" />
-		
+
 		<view style='padding:10px;' class='flex bottom-btn'>
-			<u-button  @click='show1 = true' type="error" class="btn1" hover-class='none'>驳回</u-button>
-			<u-button  @click='show2 = true' type="success" class="btn2">通过</u-button>
+			<u-button v-if='isSHowBtn' @click='show1 = true' type="error" class="btn1" hover-class='none'>驳回</u-button>
+			<u-button v-if='isSHowBtn' @click='show2 = true' type="success" class="btn2">通过</u-button>
 		</view>
 	</view>
 </template>
 
 <script>
+	import helper from '@/common/helper.js';
 	export default {
 		data() {
 			return {
+				isSHowBtn: true,
+				everyCheck: '',
 				id: "",
 				currentPage: 1,
 				pageSize: 10,
-				list: [
-					{
-						status:"",
-					}
-				],
+				list: [{
+					status: "",
+				}],
 				contractNo: "",
 				rejectInfo: "",
 				rejectInfo1: "",
-				show1:false,
-				show2:false,
+				show1: false,
+				show2: false,
 				height: 200,
 				autoHeight: true,
 				border: false,
-				unitPrice:"",
-				goodsName:"",
+				unitPrice: "",
+				goodsName: "",
 			}
 		},
+		onBackPress(e) {
+			uni.navigateTo({
+				url: "/pages/task/my_task"
+			})
+			return true;
+		},
 		onLoad(options) {
+			this.everyCheck = uni.getStorageSync("everyTask")
 			this.id = options.id
+			this.isSHowBtn = options.isShowbtn
 			this.getList()
 		},
 		methods: {
@@ -132,18 +143,18 @@
 				} else {
 					if (!this.rejectInfo) {
 						this.$api.msg('驳回原因不能为空!')
-					}else{
+					} else {
 						that.show1 = false
-					uni.showModal({
-						content: "是否确定驳回?",
-						showCancel: true,
-						confirmText: '确定',
-						success: function(res) {
-							if (res.confirm) {
-								that.audit(that.list[0], 0, false, true, '已驳回')
+						uni.showModal({
+							content: "是否确定驳回?",
+							showCancel: true,
+							confirmText: '确定',
+							success: function(res) {
+								if (res.confirm) {
+									that.audit(that.list[0], 0, false, true, '已驳回')
+								}
 							}
-						}
-					})
+						})
 					}
 				}
 			},
@@ -153,25 +164,28 @@
 				if (this.list.length == 0) {
 					that.$api.msg('没有要审核的条目!')
 				} else {
-				if (!this.rejectInfo1) {
-					this.$api.msg('审核意见不能为空!')
-				}else{
-					that.show2 = false
-					uni.showModal({
-						content: "是否确定通过?",
-						showCancel: true,
-						confirmText: '确定',
-						success: function(res) {
-							if (res.confirm) {
-								that.audit(that.list[0], 0, true, 2)
+					if (!this.rejectInfo1) {
+						this.$api.msg('审核意见不能为空!')
+					} else {
+						that.show2 = false
+						uni.showModal({
+							content: "是否确定通过?",
+							showCancel: true,
+							confirmText: '确定',
+							success: function(res) {
+								if (res.confirm) {
+									that.audit(that.list[0], 0, true, 2)
+								}
 							}
-						}
-					})
+						})
 					}
 				}
 			},
 			//审核方法
 			audit(item, index, status, status2, reason) {
+				uni.showLoading({
+					title: "审核中"
+				})
 				if (index < this.list.length) {
 					this.$api.doRequest('post', '/workflow/api/handle', {
 						taskId: item.taskId,
@@ -183,16 +197,18 @@
 					})
 				} else {
 					if (status == true) {
-						this.$api.msg('通过成功')
-						// setTimeout(function() {
-						// 		uni.navigateBack()
-						// }, 1000);
+						that.$api.msg('通过成功')
 					} else if (status == false) {
-						this.$api.msg('驳回成功')
-						setTimeout(function() {
-								uni.navigateBack()
-						}, 1000);
+						that.$api.msg('驳回成功')
 					}
+					setTimeout(function() {
+						if (that.everyCheck) {
+							helper.setAudit(that.list)
+						} else {
+							uni.navigateBack()
+						}
+						uni.hideLoading()
+					}, 1000);
 				}
 			},
 		}
@@ -206,6 +222,7 @@
 
 	.content {
 		margin-top: 30rpx;
+
 		.top {
 			display: flex;
 			justify-content: space-between;
@@ -225,7 +242,8 @@
 			text-align: left;
 			margin: 20rpx 0;
 		}
-		.car-container{
+
+		.car-container {
 			border-bottom: 2rpx solid #EEEEEE;
 		}
 
@@ -254,7 +272,7 @@
 		.money {
 			font-size: 32rpx;
 			font-weight: 500;
-			margin-bottom: 30rpx ;
+			margin-bottom: 30rpx;
 		}
 
 		.moneyInfo {
@@ -262,67 +280,75 @@
 			font-size: 32rpx;
 		}
 	}
-.bottom-btn {
+
+	.bottom-btn {
 		width: 100%;
 		position: fixed;
-		bottom:0;
+		bottom: 0;
 		display: flex;
 		z-index: 2;
 		left: 0;
 		background-color: #f8f8f8;
 		flex-direction: column;
-		.btn1,.btn2{
+
+		.btn1,
+		.btn2 {
 			width: 100%;
 			margin-bottom: 26rpx;
 			border-radius: 90rpx;
 		}
-		.btn1{
+
+		.btn1 {
 			background: white;
 			color: #00C265;
 		}
-		}
-		.topInfo {
-			height: 210rpx;
-			background: linear-gradient(270deg, #22C572 0%, #34DE8A 100%);
-			padding: 30rpx;
-		
-			.topInfo-item {
-				height: 150rpx;
-				background-color: #FFFFFF;
-				border-radius: 20rpx;
-				padding: 40rpx;
-		
-				.logo {
-					width: 40rpx;
-					height: 40rpx;
-					margin-top: 8rpx;
-				}
-		
-				.infoText {
-					font-size: 36rpx;
-					font-weight: 600;
-					margin-left: 20rpx;
-				}
-		
-				.infoData {
-					color: #878C9C;
-					font-size: 26rpx;
-					margin-top: 10rpx;
-				}
+	}
+
+	.topInfo {
+		height: 210rpx;
+		background: linear-gradient(270deg, #22C572 0%, #34DE8A 100%);
+		padding: 30rpx;
+
+		.topInfo-item {
+			height: 150rpx;
+			background-color: #FFFFFF;
+			border-radius: 20rpx;
+			padding: 40rpx;
+
+			.logo {
+				width: 40rpx;
+				height: 40rpx;
+				margin-top: 8rpx;
+			}
+
+			.infoText {
+				font-size: 36rpx;
+				font-weight: 600;
+				margin-left: 20rpx;
+			}
+
+			.infoData {
+				color: #878C9C;
+				font-size: 26rpx;
+				margin-top: 10rpx;
 			}
 		}
-		.rejectInfoCss {
-			border: 1px solid #ccc;
-			border-radius: 10rpx;
-			background-color: #F9F9FA;
-			// height: 100px;
-			overflow-y: auto;
-			margin: 30rpx;
-		}
-		.rejectText {
-			text-align: center;
-		}
-		/deep/.u-input__textarea{
-			height: 300rpx!important;
-		}
+	}
+
+	.rejectInfoCss {
+		border: 1px solid #ccc;
+		border-radius: 10rpx;
+		background-color: #F9F9FA;
+		// height: 100px;
+		overflow-y: auto;
+		margin: 30rpx;
+	}
+
+	.rejectText {
+		text-align: center;
+	}
+
+	/deep/.u-input__textarea {
+		height: 300rpx !important;
+	}
 </style>

+ 52 - 24
pages/task/audit/purchasecontract.vue

@@ -118,7 +118,7 @@
 			</u-form-item>
 			<u-form-item label-width='260' label="备注信息">
 			</u-form-item>
-			<u-form-item >
+			<u-form-item>
 				<textarea class='textarea' v-model="list.remarks" input-align="right" placeholder="" disabled />
 			</u-form-item>
 			<u-form-item label-width='260' label="附件">
@@ -136,9 +136,10 @@
 			</u-form-item>
 		</u-form>
 		<view style='padding:10px;' class='flex bottom-btn'>
-			<u-button v-if='list.approveStatus' @click='reject' type="error" class="btn1" hover-class='none'>驳回
+			<u-button v-if='list.approveStatus||isSHowBtn' @click='reject' type="error" class="btn1" hover-class='none'>
+				驳回
 			</u-button>
-			<u-button v-if='list.approveStatus' @click='pass' type="success" class="btn2">通过</u-button>
+			<u-button v-if='list.approveStatus||isSHowBtn' @click='pass' type="success" class="btn2">通过</u-button>
 		</view>
 		<view v-if='show' class="shade">
 			<view class="wrap">
@@ -163,19 +164,22 @@
 
 <script>
 	import upload from '@/components/upload.vue';
+	import helper from '@/common/helper.js';
 	export default {
 		components: {
 			upload
 		},
 		data() {
 			return {
+				isSHowBtn: true,
 				id: "",
 				currentPage: 1,
 				pageSize: 10,
-				list: [{
+				list: {
 					status: "",
 					contractGoodsInfo: {},
-				}],
+					contractProcessInfo: {}
+				},
 				imglist: [],
 				auditMind: '',
 				show: false,
@@ -184,18 +188,28 @@
 				action: this.$uploadUrl,
 				maxSize: 50 * 1024 * 1024, //限制文件大小 50M
 				isAdd: true,
-				imgShow:false,
-				url:"",
+				imgShow: false,
+				url: "",
+				everyCheck: ''
 			}
 		},
+		onBackPress(e) {
+			uni.navigateTo({
+				url: "/pages/task/my_task"
+			})
+			return true;
+		},
 		onLoad(options) {
 			this.id = options.id
 			this.getList()
+			this.everyCheck = uni.getStorageSync("everyTask")
+			this.isSHowBtn = options.isShowbtn
+
 		},
 		methods: {
-			shadeshow(url){
-				this.imgShow=true
-				this.url=url
+			shadeshow(url) {
+				this.imgShow = true
+				this.url = url
 			},
 			getList(id) {
 				var that = this
@@ -244,11 +258,15 @@
 					auditMind: this.auditMind,
 					needReapply: true,
 				}).then(res => {
-					uni.hideLoading()
 					that.$api.msg('驳回成功')
 					that.show = false
 					setTimeout(function() {
-						uni.navigateBack()
+						if (that.everyCheck) {
+							helper.setAudit(that.list)
+						} else {
+							uni.navigateBack()
+						}
+						uni.hideLoading()
 					}, 1000);
 				})
 			},
@@ -279,11 +297,15 @@
 						auditMind: this.auditMind,
 						needReapply: true,
 					}).then(res => {
-						uni.hideLoading()
 						that.$api.msg('通过成功')
 						that.show = false
 						setTimeout(function() {
-							uni.navigateBack()
+							if (that.everyCheck) {
+								helper.setAudit(that.list)
+							} else {
+								uni.navigateBack()
+							}
+							uni.hideLoading()
 						}, 1000);
 					})
 				}
@@ -291,6 +313,7 @@
 			},
 			//审核方法
 			audit(item, index, status, status2, reason) {
+
 				if (index < this.list.length) {
 					this.$api.doRequest('post', '/workflow/api/handle', {
 						taskId: item.taskId,
@@ -493,19 +516,24 @@
 		width: 100%;
 		text-align: right;
 	}
-	.shade{
-		background:#000;
-		position:fixed;
-		top:0;left:0;
-	   width:100%;height:100%;
-	   z-index:10000;
+
+	.shade {
+		background: #000;
+		position: fixed;
+		top: 0;
+		left: 0;
+		width: 100%;
+		height: 100%;
+		z-index: 10000;
 	}
-	.textarea{
-		margin:0 auto;
+
+	.textarea {
+		margin: 20px auto;
+		width: 100%;
 		background: #F9F9FA;
 		border-radius: 10px;
 		border: 1px solid #EEEEEE;
-		font-size:28rpx;
-		padding:10px;
+		font-size: 28rpx;
+		padding: 10px;
 	}
 </style>

+ 110 - 33
pages/task/audit/salecontract.vue

@@ -55,7 +55,7 @@
 				</view>
 			</u-form-item>
 			<u-form-item label-width='260' label="货源详细地址">
-				<u-input v-model="list.sourceGoods" input-align="right" placeholder="" disabled/>
+				<u-input v-model="list.sourceGoods" input-align="right" placeholder="" disabled />
 			</u-form-item>
 			<u-form-item label-width='260' label="交货地所在地区">
 				<view class="textCss">
@@ -63,7 +63,7 @@
 				</view>
 			</u-form-item>
 			<u-form-item label-width='260' label="交货地详细地址">
-				<u-input v-model="list.placeDelivery" input-align="right" placeholder="" disabled/>
+				<u-input v-model="list.placeDelivery" input-align="right" placeholder="" disabled />
 			</u-form-item>
 			<u-form-item label-width='260' label="签订日期">
 				<u-input v-model="list.signingDate" input-align="right" placeholder="" disabled />
@@ -83,8 +83,8 @@
 			<u-form-item label-width='260' label="杂质(%)<=">
 				<u-input v-model="list.contractGoodsInfo.impurity" input-align="right" placeholder="" disabled />
 			</u-form-item>
-			<u-form-item  label-width='260' label="容重(克/升)>=">
-				<u-input v-model="list.contractGoodsInfo.bulkDensity" input-align="right" placeholder="" disabled/>
+			<u-form-item label-width='260' label="容重(克/升)>=">
+				<u-input v-model="list.contractGoodsInfo.bulkDensity" input-align="right" placeholder="" disabled />
 			</u-form-item>
 			<u-form-item label-width='260' label="霉变粒(%)<=">
 				<u-input v-model="list.contractGoodsInfo.mildewGrain" input-align="right" placeholder="" disabled />
@@ -101,8 +101,6 @@
 			<u-form-item label-width='260' label="已开发票(元)">
 				<u-input v-model="list.contractProcessInfo.goodsName" input-align="right" placeholder="" disabled />
 			</u-form-item>
-
-
 			<u-form-item label-width='260' label="费用支出(元)">
 				<u-input v-model="list.contractProcessInfo.waterContent" input-align="right" placeholder="" disabled />
 			</u-form-item>
@@ -117,7 +115,7 @@
 			</u-form-item>
 			<u-form-item label-width='260' label="备注信息">
 			</u-form-item>
-			<u-form-item >
+			<u-form-item>
 				<textarea class='textarea' v-model="list.remarks" input-align="right" placeholder="" disabled />
 			</u-form-item>
 			<u-form-item label-width='260' label="附件">
@@ -139,11 +137,13 @@
 			</u-form-item>
 		</u-form>
 		<view style='padding:10px;' class='flex bottom-btn'>
-			<u-button v-if='list.approveStatus' @click='reject' type="error" class="btn1" hover-class='none'>驳回
+			<u-button v-if='list.approveStatus||isSHowBtn' @click='show1 = true' type="error" class="btn1"
+				hover-class='none'>驳回
+			</u-button>
+			<u-button v-if='list.approveStatus||isSHowBtn' @click='show2 = true' type="success" class="btn2">通过
 			</u-button>
-			<u-button v-if='list.approveStatus' @click='pass' type="success" class="btn2">通过</u-button>
 		</view>
-		<view v-if='show' class="shade">
+		<!-- <view v-if='show' class="shade">
 			<view class="wrap">
 				<view style='border-bottom:1px solid #eee;padding:10px;display:flex;justify-content:space-between;'>
 					{{title}}
@@ -155,7 +155,30 @@
 				<view @click='passSubmit()' class="cancel">取消</view>
 				<view @click='passSubmit()' class="confirm">确定</view>
 			</view>
-		</view>
+		</view> -->
+		<u-popup v-model="show1" mode="center">
+			<view style="width: 300px;padding: 30rpx 10rpx;border-radius: 20rpx;">
+				<view class="rejectText">审核意见(驳回)</view>
+				<u-input v-model="rejectInfo" type="textarea" :border="border" :height="height"
+					:auto-height="autoHeight" class="rejectInfoCss" placeholder="请输入审核意见" />
+				<view class="flex">
+					<u-button @click="show1 = false" type="error" hover-class='none'>取消</u-button>
+					<u-button @click="rejectSubmit()" type="success">确定</u-button>
+				</view>
+			</view>
+		</u-popup>
+		<u-popup v-model="show2" mode="center">
+			<view style="width: 300px;padding: 30rpx 10rpx;border-radius: 20rpx;">
+				<view class="rejectText">审核意见(通过)</view>
+				<u-input v-model="rejectInfo1" type="textarea" :border="border" :height="height"
+					:auto-height="autoHeight" class="rejectInfoCss" placeholder="请输入审核意见" />
+				<view class="flex">
+					<u-button @click="show2 = false" type="error" hover-class='none'>取消</u-button>
+					<u-button @click="passSubmit()" type="success">确定</u-button>
+				</view>
+			</view>
+		</u-popup>
+
 		<view @click='imgShow=false' v-if="imgShow" class="shade">
 			<image style='position:absolute;top:0;left:0;right:0;bottom:0;margin:auto;' :src="url" mode=""></image>
 		</view>
@@ -164,38 +187,58 @@
 
 <script>
 	import upload from '@/components/upload.vue';
+	import helper from '@/common/helper.js';
 	export default {
 		components: {
 			upload
 		},
 		data() {
 			return {
+				everyCheck: '',
 				id: "",
 				currentPage: 1,
 				pageSize: 10,
-				list: [{
+				list: {
 					status: "",
-				}],
+					contractGoodsInfo: {},
+					contractProcessInfo: {}
+				},
 				imglist: [],
 				auditMind: '',
 				show: false,
+				show1: false,
+				show2: false,
 				title: '',
 				contractNo: "",
 				action: this.$uploadUrl,
 				maxSize: 50 * 1024 * 1024, //限制文件大小 50M
 				isAdd: true,
-				url:"",
-				imgShow:false
+				url: "",
+				imgShow: false,
+				height: 200,
+				autoHeight: true,
+				border: false,
+				rejectInfo: "",
+				rejectInfo1: "",
+				isSHowBtn: true,
 			}
 		},
+		onBackPress(e) {
+			uni.navigateTo({
+				url: "/pages/task/my_task"
+			})
+			return true;
+		},
 		onLoad(options) {
 			this.id = options.id
+			this.everyCheck = uni.getStorageSync("everyTask")
+			this.isSHowBtn = options.isShowbtn
 			this.getList()
 		},
 		methods: {
-			shadeshow(url){
-				this.imgShow=true
-				this.url=url
+			shadeshow(url) {
+				this.imgShow = true
+				this.url = url
 			},
 			getList(id) {
 				var that = this
@@ -247,12 +290,20 @@
 				that.$api.doRequest('post', '/workflow/api/handle', {
 					taskId: that.list.taskId,
 					approved: false,
-					auditMind: this.auditMind,
+					auditMind: this.rejectInfo,
 					needReapply: true,
 				}).then(res => {
-					uni.hideLoading()
 					that.$api.msg('驳回成功')
 					that.show = false
+					setTimeout(function() {
+						if (that.everyCheck) {
+							helper.setAudit(that.list)
+						} else {
+							uni.navigateBack()
+						}
+
+						uni.hideLoading()
+					}, 1000);
 				})
 			},
 			pass() {
@@ -273,14 +324,18 @@
 				that.$api.doRequest('post', '/workflow/api/handle', {
 					taskId: that.list.taskId,
 					approved: true,
-					auditMind: this.auditMind,
+					auditMind: this.rejectInfo1,
 					needReapply: true,
 				}).then(res => {
-					uni.hideLoading()
 					that.$api.msg('通过成功')
 					that.show = false
 					setTimeout(function() {
-						uni.navigateBack()
+						if (that.everyCheck) {
+							helper.setAudit(that.list)
+						} else {
+							uni.navigateBack()
+						}
+						uni.hideLoading()
 					}, 1000);
 				})
 			},
@@ -487,19 +542,41 @@
 		justify-content: flex-end;
 		width: 100%;
 	}
-	.shade{
-		background:#000;
-		position:fixed;
-		top:0;left:0;
-	   width:100%;height:100%;
-	   z-index:10000;
+
+	.shade {
+		background: #000;
+		position: fixed;
+		top: 0;
+		left: 0;
+		width: 100%;
+		height: 100%;
+		z-index: 10000;
 	}
-	.textarea{
-		margin:0 auto;
+
+	.textarea {
+		margin: 20px auto;
+		width: 100%;
 		background: #F9F9FA;
 		border-radius: 10px;
 		border: 1px solid #EEEEEE;
-		font-size:28rpx;
-		padding:10px;
+		font-size: 28rpx;
+		padding: 10px;
+	}
+
+	.rejectInfoCss {
+		border: 1px solid #ccc;
+		border-radius: 10rpx;
+		background-color: #F9F9FA;
+		// height: 100px;
+		overflow-y: auto;
+		margin: 30rpx;
+	}
+
+	.rejectText {
+		text-align: center;
+	}
+
+	/deep/.u-input__textarea {
+		height: 300rpx !important;
 	}
 </style>

+ 79 - 44
pages/task/audit/warehouse_approval.vue

@@ -62,8 +62,10 @@
 					<view class="left">基准单价(元/公斤)</view>
 					<view class="right">{{item.basePrice}}</view>
 				</view>
-				<view  class="row" v-for="(item1,index1) in item.modelList" :key="index1" :class="index1==item.modelList.length-1?'boder':''">
-					<view v-if="list.paramType == '2'" class="left">{{item1.startWater}}-{{item1.endWater}}降幅(元/0.1%)</view>
+				<view class="row" v-for="(item1,index1) in item.modelList" :key="index1"
+					:class="index1==item.modelList.length-1?'boder':''">
+					<view v-if="list.paramType == '2'" class="left">{{item1.startWater}}-{{item1.endWater}}降幅(元/0.1%)
+					</view>
 					<view v-else class="left">{{item1.startWater}}-{{item1.endWater}}扣重比</view>
 					<view class="right">{{item1.price}}</view>
 				</view>
@@ -83,8 +85,8 @@
 		<u-popup v-model="show2" mode="center">
 			<view style="width: 300px;padding: 30rpx 10rpx;border-radius: 20rpx;">
 				<view class="rejectText">审核意见(通过)</view>
-				<u-input v-model="rejectInfo1" type="textarea" :border="border" :height="height" :auto-height="autoHeight"  class="rejectInfoCss"
-					placeholder="请输入审核意见" />
+				<u-input v-model="rejectInfo1" type="textarea" :border="border" :height="height"
+					:auto-height="autoHeight" class="rejectInfoCss" placeholder="请输入审核意见" />
 				<view class="flex">
 					<u-button @click="show2 = false" type="error" hover-class='none'>取消</u-button>
 					<u-button @click="audit()" type="success">确定</u-button>
@@ -93,13 +95,14 @@
 		</u-popup>
 		<u-toast ref="uToast" />
 		<view style='padding:10px;' class='flex bottom-btn'>
-			<u-button  @click='show1 = true' type="error" class="btn1" hover-class='none'>驳回</u-button>
-			<u-button  @click='show2 = true' type="success" class="btn2">通过</u-button>
+			<u-button v-if='isSHowBtn' @click='show1 = true' type="error" class="btn1" hover-class='none'>驳回</u-button>
+			<u-button v-if='isSHowBtn' @click='show2 = true' type="success" class="btn2">通过</u-button>
 		</view>
 	</view>
 </template>
 
 <script>
+	import helper from '@/common/helper.js';
 	import {
 		mapState
 	} from 'vuex';
@@ -107,14 +110,16 @@
 		name: "task",
 		data() {
 			return {
+				everyCheck: '',
+				isSHowBtn: true,
 				show: false,
 				height: 200,
 				autoHeight: true,
 				border: false,
-				show2:false,
-				show1:false,
-				rejectInfo:"",
-				rejectInfo1:"",
+				show2: false,
+				show1: false,
+				rejectInfo: "",
+				rejectInfo1: "",
 				id: 0,
 				list: {},
 				pcUserInfo: uni.getStorageSync('pcUserInfo'),
@@ -125,8 +130,16 @@
 		computed: {
 			...mapState(['hasLogin', 'userInfo'])
 		},
+		onBackPress(e) {
+			uni.navigateTo({
+				url: "/pages/task/my_task"
+			})
+			return true;
+		},
 		onLoad(options) {
+			this.everyCheck = uni.getStorageSync("everyTask")
 			this.id = options.id
+			this.isSHowBtn = options.isShowbtn
 		},
 		onShow() {
 			var that = this
@@ -151,7 +164,7 @@
 			audit() {
 				if (!this.rejectInfo1) {
 					this.$api.msg('审核意见不能为空!')
-				}else{
+				} else {
 					var that = this
 					that.show2 = false
 					uni.showModal({
@@ -160,27 +173,36 @@
 						confirmText: '确定',
 						success: function(res) {
 							if (res.confirm) {
-								that.$api.doRequest('post', '/purchasePrice/purchasePriceEdit',that.list ).then(res => {
-									if (res.data.code == 200) {
-										that.$api.doRequest('post', '/workflow/api/handle', {
-											approved: true,
-											auditMind: that.rejectInfo1,
-											needReapply: true,
-											taskId:  that.list.taskId,
-										}).then(res1 => {
-											if (res1.data.code == 200) {
-												that.$api.msg('审核成功');
-												setTimeout(function() {
-														uni.navigateBack()
-												}, 1000);
-											} else {
-												that.$api.msg(res1.data.message);
-											}
-										})
-									} else {
-										that.$api.msg('系统异常,请联系管理员');
-									}
+								uni.showLoading({
+									title: "审核中"
 								})
+								that.$api.doRequest('post', '/purchasePrice/purchasePriceEdit', that.list)
+									.then(res => {
+										if (res.data.code == 200) {
+											that.$api.doRequest('post', '/workflow/api/handle', {
+												approved: true,
+												auditMind: that.rejectInfo1,
+												needReapply: true,
+												taskId: that.list.taskId,
+											}).then(res1 => {
+												if (res1.data.code == 200) {
+													that.$api.msg('审核成功');
+													setTimeout(function() {
+														if (this.everyCheck) {
+															helper.setAudit(that.list)
+														} else {
+															uni.navigateBack()
+														}
+														uni.hideLoading()
+													}, 1000);
+												} else {
+													that.$api.msg(res1.data.message);
+												}
+											})
+										} else {
+											that.$api.msg('系统异常,请联系管理员');
+										}
+									})
 							}
 						}
 					})
@@ -189,7 +211,7 @@
 			reject() {
 				if (!this.rejectInfo) {
 					this.$api.msg('驳回原因不能为空!')
-				}else{
+				} else {
 					var that = this
 					that.show1 = false
 					uni.showModal({
@@ -207,7 +229,12 @@
 									if (res1.data.code == 200) {
 										that.$api.msg('驳回成功');
 										setTimeout(function() {
+											if (that.everyCheck) {
+												helper.setAudit(that.list)
+											} else {
 												uni.navigateBack()
+											}
+											uni.hideLoading()
 										}, 1000);
 									} else {
 										that.$api.msg(res1.data.message);
@@ -262,18 +289,21 @@
 	.bottom-btn {
 		width: 100%;
 		position: fixed;
-		bottom:0;
+		bottom: 0;
 		display: flex;
 		z-index: 2;
 		left: 0;
 		background-color: #f8f8f8;
 		flex-direction: column;
-		.btn1,.btn2{
+
+		.btn1,
+		.btn2 {
 			width: 100%;
 			margin-bottom: 26rpx;
 			border-radius: 90rpx;
 		}
-		.btn1{
+
+		.btn1 {
 			background: white;
 			color: #00C265;
 		}
@@ -284,33 +314,35 @@
 		background: #22C572;
 		border-radius: 10rpx;
 	}
-	.boder{
-		border:0;
-		border-bottom: 0!important;
+
+	.boder {
+		border: 0;
+		border-bottom: 0 !important;
 	}
+
 	.topInfo {
 		height: 210rpx;
 		background: linear-gradient(270deg, #22C572 0%, #34DE8A 100%);
 		padding: 30rpx;
-	
+
 		.topInfo-item {
 			height: 150rpx;
 			background-color: #FFFFFF;
 			border-radius: 20rpx;
 			padding: 40rpx;
-	
+
 			.logo {
 				width: 40rpx;
 				height: 40rpx;
 				margin-top: 8rpx;
 			}
-	
+
 			.infoText {
 				font-size: 36rpx;
 				font-weight: 600;
 				margin-left: 20rpx;
 			}
-	
+
 			.infoData {
 				color: #878C9C;
 				font-size: 26rpx;
@@ -318,6 +350,7 @@
 			}
 		}
 	}
+
 	.rejectInfoCss {
 		border: 1px solid #ccc;
 		border-radius: 10rpx;
@@ -326,10 +359,12 @@
 		overflow-y: auto;
 		margin: 30rpx;
 	}
+
 	.rejectText {
 		text-align: center;
 	}
-	/deep/.u-input__textarea{
-		height: 300rpx!important;
+
+	/deep/.u-input__textarea {
+		height: 300rpx !important;
 	}
 </style>

+ 185 - 61
pages/task/my_task.vue

@@ -5,10 +5,17 @@
 				<u-search placeholder="请输入合同编号、车牌号或派车编号" v-model="keyword" @search="searchKeyWord()"
 					@custom="searchKeyWord()"></u-search>
 			</view>
-			<view>
-				<view @click='tabcarchange(1)' class='line' :class='statusFlag==1?"active":""'>未完成</view>
-				<view @click='tabcarchange(3)' class='line' :class='statusFlag==3?"active":""'>已完成</view>
+			<view class="top2">
+				<view class="left">
+					<view @click='tabcarchange(1)' class='line' :class='statusFlag==1?"active":""'>未完成</view>
+					<view @click='tabcarchange(3)' class='line' :class='statusFlag==3?"active":""'>已完成</view>
+				</view>
+				<view class="right">
+					<view class="right-contrent1">逐条审核</view>
+					<u-switch v-model="checked" active-color="#22C572" inactive-color="#eee" size='40'></u-switch>
+				</view>
 			</view>
+
 		</view>
 		<view class="introduce-section">
 			<view v-for="(item, index) in taskInfo" :key="index" @click="navToDetailPage(item)">
@@ -49,6 +56,7 @@
 			return {
 				PageCur: "task",
 				taskInfo: [],
+				checked: false,
 				pages: 1, //页数
 				limit: 10, //每次取条目数
 				loadStatus: 'loading', //加载样式:more-加载前样式,loading-加载中样式,nomore-没有数据样式
@@ -68,13 +76,102 @@
 					pageSize: 10,
 					currentPage: 1
 				},
-				keyword: ""
+				keyword: "",
+				copyTaskInfo: []
 			};
 		},
+		watch: {
+			checked(val) {
+				uni.setStorageSync("everyTask", this.checked)
+			},
+			taskInfo: function(val) {
+				this.copyTaskInfo = this.$u.deepClone(this.taskInfo);
+				//添加跳转链接
+				for (let i = 0; i < this.copyTaskInfo.length; i++) {
+					let item = this.copyTaskInfo[i]
+					if (item.businessCode == 'PROCUREMENT-ORDER-APPROVE') {
+						item.itemUrl = '/pages/task/procurement_details?id=' + item.businessId
+					} else if (item.businessCode == 'SALE-ORDER-APPROVE') {
+						item.itemUrl = '/pages/task/sale_details?id=' + item.businessId
+					} else if (item.businessCode == 'SALE-CONTRACT-APPROVE') {
+						item.itemUrl = '/pages/task/audit/salecontract?id=' + item.businessId
+					} else if (item.businessCode == 'BUY-CONTRACT-APPROVE') {
+						item.itemUrl = '/pages/task/audit/purchasecontract?id=' + item.businessId
+					} else if (item.businessCode == 'PROCUREMENT-RECEIPT-REPORT') {
+						item.itemUrl = '/pages/task/procurement_report_details?id=' + item.businessId
+					} else if (item.businessCode == 'PROCUREMENT-CLOSE-REPORT') {
+						item.itemUrl = '/pages/task/procurement_close_details?id=' + item.businessId
+					} else if (item.businessCode == 'SALE-RECEIPT-REPORT') {
+						item.itemUrl = '/pages/task/sale_report_details?id=' + item.businessId
+					} else if (item.businessCode == 'SALE-CLOSE-REPORT') {
+						item.itemUrl = '/pages/task/sale_close_details?id=' + item.businessId
+					} else if (item.businessCode == 'PROCUREMENT-PRICE-APPROVE') {
+						if (this.statusFlag == 1) {
+							item.itemUrl = `/pages/task/audit/warehouse_approval?id=${item.businessId}`
+						} else {
+							item.itemUrl = '/pages/task/audit/warehouse_details/?id=' + item.businessId
+						}
+					} else if (item.businessCode == 'PAYMENT-MANAGEMENT-APPROVE') {
+						if (this.statusFlag == 1) {
+							item.itemUrl = `/pages/task/audit/acquisition_settlement_approval?id=${item.businessId}`
+						} else {
+							item.itemUrl = '/pages/task/audit/acquisition_settlement_details/?id=' + item.businessId
+						}
+					} else if (item.businessCode == 'INOUTTASK-TASK-APPROVE') {
+						if (this.statusFlag == 1) {
+							item.itemUrl = `/pages/task/audit/Issueandreceipt_task_approval?id=` + item.businessId
+						} else {
+							item.itemUrl = `/pages/task/audit/Issueandreceipt_task_details?id=` + item.businessId
+						}
+
+					} else if (item.businessCode == 'STOCK-PROCUREMENT-RECEIPT-REPORT') {
+						if (this.statusFlag == 1) {
+							item.itemUrl = `/pages/task/audit/purchase_settlement_approval?id=` + item.businessId
+						} else {
+							item.itemUrl = `/pages/task/audit/purchase_settlement_details?id=` + item.businessId
+						}
+					} else if (item.businessCode == 'TRANSPORTATION-SETTLEMENT-REPORT') {
+						if (this.statusFlag == 1) {
+							item.itemUrl = `/pages/task/audit/freight_settlement_approval?id=` + item.businessId
+						} else {
+							item.itemUrl = `/pages/task/audit/freight_settlement_details?id=` + item.businessId +
+								'&compId=' + this
+								.pcUserInfo.compId
+						}
+					} else if (item.businessCode == 'TRAN-TASK-APPROVE') {
+						if (this.statusFlag == 1) {
+							item.itemUrl = `/pages/task/audit/freight_setting_approval?id=` + item.businessId
+						} else {
+							item.itemUrl = `/pages/task/audit/freight_setting_details?id=` + item.businessId
+						}
+					}
+					if (item.taskType == "入库任务") {
+
+						if (item.statusFlag == 3) {
+							item.itemUrl = `/pageD/warehousings/warehousingDetails?id=${item.id}`
+						} else {
+							item.itemUrl =
+								`/pageD/warehousings/warehousings?id=${item.id}&goodsName=${item.goodsName}&contractNo=${item.contractNo}&startWeight=${item.startWeight}&carNo=${item.carNo}&tranCarNo=${item.tranCarNo}&warehouseName=${item.warehouseName}&addressUrl=${item.addressUrl}&inOutDate=${item.inOutDate}&binNumber=${item.binNumber}`
+						}
+					} else if (item.taskType == "出库任务") {
+						if (item.statusFlag == 3) {
+							item.itemUrl = `/pageD/warehousings/ex_warehouse_detail?id=${item.id}`
+						} else {
+							item.itemUrl =
+								`/pageD/warehousings/ex_warehouse?id=${item.id}&goodsName=${item.goodsName}&contractNo=${item.contractNo}&consignee=${item.consignee}&carNo=${item.carNo}&tranCarNo=${item.tranCarNo}&boxNo=${item.boxNo}&titleNo=${item.titleNo}`
+						}
+					}
+
+				}
+				console.log('监听列表数据', this.copyTaskInfo)
+				uni.setStorageSync("copyTaskInfo", this.copyTaskInfo)
+			}
+		},
 		computed: {
 			...mapState(['hasLogin', 'userInfo'])
 		},
 		onShow() {
+			this.checked = uni.getStorageSync("everyTask")
 			this.warehouseInOutInfo.currentPage = 1
 			this.data.currentPage = 1
 			this.taskInfo = []
@@ -104,7 +201,7 @@
 		},
 		onReachBottom() { //上拉触底函数
 			if (!this.isLoadMore) { //此处判断,上锁,防止重复请求
-				this.pages+=1
+				this.pages += 1
 				if (this.statusFlag == 1) {
 					this.warehouseInOutInfo.currentPage += 1
 				} else {
@@ -170,6 +267,9 @@
 			// 	}
 			// 	return false
 			// },
+			change(status) {
+				console.log(status);
+			},
 			searchKeyWord() {
 				if (!this.keyword) {
 					this.$api.msg('关键字不能为空')
@@ -188,7 +288,7 @@
 								icon: 'none',
 								duration: 2000
 							})
-							uni.hideLoading(this.taskInfo,"信息")
+							uni.hideLoading(this.taskInfo, "信息")
 						}
 						console.log()
 					}).catch(res => {
@@ -218,7 +318,7 @@
 				}
 				data.currentPage = pages
 				data.pageSize = limit
-				
+
 				//this.warehouseInOutInfo.status = this.status
 				this.$api.doRequest('get', url, data).then(res => {
 					if (res.data.code == 200) {
@@ -241,12 +341,12 @@
 						for (var i = 0; i < this.taskInfo.length; i++) {
 							let _str = this.taskInfo[i]
 							// let a = this.getRoles()
-							if(_str.messageContent.indexOf("您发起")>-1){
+							if (_str.messageContent.indexOf("您发起") > -1) {
 								_str.showRow = false
-							}else{
+							} else {
 								_str.showRow = true;
 							}
-							this.taskInfo[i].department=this.taskInfo[i].messageContent.split(' ')[0]
+							this.taskInfo[i].department = this.taskInfo[i].messageContent.split(' ')[0]
 							if (this.taskInfo[i].businessType == 'WAREHOUSE') {
 								if (this.taskInfo[i].businessCode == 'INOUTTASK-TASK-APPROVE') {
 									this.taskInfo[i].messageTitle = '出入库任务'
@@ -255,7 +355,7 @@
 								if (this.taskInfo[i].businessCode == 'PAYMENT-MANAGEMENT-APPROVE') {
 									this.taskInfo[i].messageTitle = '付款管理'
 								}
-								
+
 							} else if (this.taskInfo[i].businessType == 'REPORT') {
 								if (this.taskInfo[i].businessCode == 'PROCUREMENT-CLOSE-REPORT') {
 									this.taskInfo[i].messageTitle = '采购平仓统计'
@@ -328,105 +428,106 @@
 			navToDetailPage(item) {
 				if (item.businessCode == 'PROCUREMENT-ORDER-APPROVE') {
 					uni.navigateTo({
-						url: '/pages/task/procurement_details?id=' + item.businessId
+						url: '/pages/task/procurement_details?id=' + item.businessId + "&isShowbtn=true"
 					})
 				} else if (item.businessCode == 'SALE-ORDER-APPROVE') {
 					uni.navigateTo({
-						url: '/pages/task/sale_details?id=' + item.businessId
+						url: '/pages/task/sale_details?id=' + item.businessId + "&isShowbtn=true"
 					})
-				} 
-				else if (item.businessCode == 'SALE-CONTRACT-APPROVE') {
+				} else if (item.businessCode == 'SALE-CONTRACT-APPROVE') {
 					uni.navigateTo({
-						url: '/pages/task/audit/salecontract?id=' + item.businessId
+						url: '/pages/task/audit/salecontract?id=' + item.businessId + "&isShowbtn=true"
 					})
-				}else if (item.businessCode == 'BUY-CONTRACT-APPROVE') {
+				} else if (item.businessCode == 'BUY-CONTRACT-APPROVE') {
 					uni.navigateTo({
-						url: '/pages/task/audit/purchasecontract?id=' + item.businessId
+						url: '/pages/task/audit/purchasecontract?id=' + item.businessId + "&isShowbtn=true"
 					})
 				} else if (item.businessCode == 'PROCUREMENT-RECEIPT-REPORT') {
 					uni.navigateTo({
-						url: '/pages/task/procurement_report_details?id=' + item.businessId
+						url: '/pages/task/procurement_report_details?id=' + item.businessId + "&isShowbtn=true"
 					})
 				} else if (item.businessCode == 'PROCUREMENT-CLOSE-REPORT') {
 					uni.navigateTo({
-						url: '/pages/task/procurement_close_details?id=' + item.businessId
+						url: '/pages/task/procurement_close_details?id=' + item.businessId + "&isShowbtn=true"
 					})
 				} else if (item.businessCode == 'SALE-RECEIPT-REPORT') {
 					uni.navigateTo({
-						url: '/pages/task/sale_report_details?id=' + item.businessId
+						url: '/pages/task/sale_report_details?id=' + item.businessId + "&isShowbtn=true"
 					})
 				} else if (item.businessCode == 'SALE-CLOSE-REPORT') {
 					uni.navigateTo({
-						url: '/pages/task/sale_close_details?id=' + item.businessId
+						url: '/pages/task/sale_close_details?id=' + item.businessId + "&isShowbtn=true"
 					})
 				} else if (item.businessCode == 'PROCUREMENT-PRICE-APPROVE') {
-					if(this.statusFlag==1){
+					if (this.statusFlag == 1) {
 						uni.navigateTo({
-							url: `/pages/task/audit/warehouse_approval?id=${item.businessId}`
+							url: `/pages/task/audit/warehouse_approval?id=${item.businessId}&isShowbtn=true`
 						})
-					}else{
+					} else {
 						uni.navigateTo({
-							url: '/pages/task/audit/warehouse_details/?id=' + item.businessId
+							url: '/pages/task/audit/warehouse_details/?id=' + item.businessId + "&isShowbtn=true"
 						})
 					}
 				} else if (item.businessCode == 'PAYMENT-MANAGEMENT-APPROVE') {
-					if(this.statusFlag==1){
+					if (this.statusFlag == 1) {
 						uni.navigateTo({
-							url: `/pages/task/audit/acquisition_settlement_approval?id=${item.businessId}`
+							url: `/pages/task/audit/acquisition_settlement_approval?id=${item.businessId}&isShowbtn=true`
 						})
-					}else{
+
+					} else {
 						uni.navigateTo({
-							url: '/pages/task/audit/acquisition_settlement_details/?id=' + item.businessId
+							url: '/pages/task/audit/acquisition_settlement_details/?id=' + item.businessId +
+								"&isShowbtn=true"
 						})
 					}
-				}else if (item.businessCode == 'INOUTTASK-TASK-APPROVE') {
+				} else if (item.businessCode == 'INOUTTASK-TASK-APPROVE') {
 					if (this.statusFlag == 1) {
 						uni.navigateTo({
-							url: `/pages/task/audit/Issueandreceipt_task_approval?id=` + item.businessId
-							// url: '/pageD/warehousings/warehousingDetails?id='+item.businessId+'&compId='+item.compId
+							url: `/pages/task/audit/Issueandreceipt_task_approval?id=` + item.businessId +
+								"&isShowbtn=true"
 						})
 					} else {
 						uni.navigateTo({
-							// url:'/pageD/warehousings/warehousings?id='+item.businessId+'&compId='+item.compId
-							url: `/pages/task/audit/Issueandreceipt_task_details?id=` + item.businessId
+							url: `/pages/task/audit/Issueandreceipt_task_details?id=` + item.businessId +
+								"&isShowbtn=true"
 						})
 					}
 
-				}else if (item.businessCode == 'STOCK-PROCUREMENT-RECEIPT-REPORT') {
+				} else if (item.businessCode == 'STOCK-PROCUREMENT-RECEIPT-REPORT') {
 					if (this.statusFlag == 1) {
 						uni.navigateTo({
-							url: `/pages/task/audit/purchase_settlement_approval?id=` + item.businessId
-							// url: '/pageD/warehousings/warehousingDetails?id='+item.businessId+'&compId='+item.compId
+							url: `/pages/task/audit/purchase_settlement_approval?id=` + item.businessId +
+								"&isShowbtn=true"
 						})
 					} else {
 						uni.navigateTo({
-							// url:'/pageD/warehousings/warehousings?id='+item.businessId+'&compId='+item.compId
-							url: `/pages/task/audit/purchase_settlement_details?id=` + item.businessId
+							url: `/pages/task/audit/purchase_settlement_details?id=` + item.businessId +
+								"&isShowbtn=true"
 						})
 					}
-				}else if (item.businessCode == 'TRANSPORTATION-SETTLEMENT-REPORT') {
+				} else if (item.businessCode == 'TRANSPORTATION-SETTLEMENT-REPORT') {
 					if (this.statusFlag == 1) {
 						uni.navigateTo({
-							url: `/pages/task/audit/freight_settlement_approval?id=` + item.businessId
-							// url: '/pageD/warehousings/warehousingDetails?id='+item.businessId+'&compId='+item.compId
+							url: `/pages/task/audit/freight_settlement_approval?id=` + item.businessId +
+								"&isShowbtn=true"
 						})
 					} else {
 						uni.navigateTo({
-							// url:'/pageD/warehousings/warehousings?id='+item.businessId+'&compId='+item.compId
-							url: `/pages/task/audit/freight_settlement_details?id=` + item.businessId + '&compId=' + this
-								.pcUserInfo.compId
+							url: `/pages/task/audit/freight_settlement_details?id=` + item.businessId +
+								'&compId=' + this
+								.pcUserInfo.compId + "&isShowbtn=true"
 						})
 					}
-				}else if (item.businessCode == 'TRAN-TASK-APPROVE') {
+				} else if (item.businessCode == 'TRAN-TASK-APPROVE') {
 					if (this.statusFlag == 1) {
 						uni.navigateTo({
-							url: `/pages/task/audit/freight_setting_approval?id=` + item.businessId
-							// url: '/pageD/warehousings/warehousingDetails?id='+item.businessId+'&compId='+item.compId
+							url: `/pages/task/audit/freight_setting_approval?id=` + item.businessId +
+								"&isShowbtn=true"
 						})
 					} else {
 						uni.navigateTo({
-							// url:'/pageD/warehousings/warehousings?id='+item.businessId+'&compId='+item.compId
-							url: `/pages/task/audit/freight_setting_details?id=` + item.businessId
+							url: `/pages/task/audit/freight_setting_details?id=` + item.businessId +
+								"&isShowbtn=true"
 						})
 					}
 				}
@@ -434,21 +535,23 @@
 
 					if (item.statusFlag == 3) {
 						uni.navigateTo({
-							url: `/pageD/warehousings/warehousingDetails?id=${item.id}`
+							url: `/pageD/warehousings/warehousingDetails?id=${item.id}&isShowbtn=true`
 						})
 					} else {
 						uni.navigateTo({
-							url: `/pageD/warehousings/warehousings?id=${item.id}&goodsName=${item.goodsName}&contractNo=${item.contractNo}&startWeight=${item.startWeight}&carNo=${item.carNo}&tranCarNo=${item.tranCarNo}&warehouseName=${item.warehouseName}&addressUrl=${item.addressUrl}&inOutDate=${item.inOutDate}&binNumber=${item.binNumber}`
+							url: `/pageD/warehousings/warehousings?id=${item.id}&goodsName=${item.goodsName}&contractNo=${item.contractNo}&startWeight=${item.startWeight}&carNo=${item.carNo}&tranCarNo=${item.tranCarNo}&warehouseName=${item.warehouseName}&addressUrl=${item.addressUrl}&inOutDate=${item.inOutDate}&binNumber=${item.binNumber}&isShowbtn=true`
 						})
+
 					}
 				} else if (item.taskType == "出库任务") {
 					if (item.statusFlag == 3) {
 						uni.navigateTo({
-							url: `/pageD/warehousings/ex_warehouse_detail?id=${item.id}`
+							url: `/pageD/warehousings/ex_warehouse_detail?id=${item.id}&isShowbtn=true`
 						})
 					} else {
 						uni.navigateTo({
-							url: `/pageD/warehousings/ex_warehouse?id=${item.id}&goodsName=${item.goodsName}&contractNo=${item.contractNo}&consignee=${item.consignee}&carNo=${item.carNo}&tranCarNo=${item.tranCarNo}&boxNo=${item.boxNo}&titleNo=${item.titleNo}`
+							url: `/pageD/warehousings/ex_warehouse?id=${item.id}&goodsName=${item.goodsName}&contractNo=${item.contractNo}&consignee=${item.consignee}&carNo=${item.carNo}&tranCarNo=${item.tranCarNo}&boxNo=${item.boxNo}&titleNo=${item.titleNo}&isShowbtn=true`
+
 						})
 					}
 				}
@@ -467,9 +570,11 @@
 		border-radius: 3px;
 		margin: 3px;
 	}
-	.introduce-section{
+
+	.introduce-section {
 		// background: red;
 	}
+
 	.introduce-section .title_b .title-tip {
 		font-size: 13px;
 		height: 40px;
@@ -508,7 +613,7 @@
 		height: 50px;
 		line-height: 50px;
 		border-bottom: 1px solid #EEEEEE;
-		
+
 	}
 
 	.introduce-section .title .title-tip-a {
@@ -554,18 +659,37 @@
 	/deep/.u-action-active {
 		margin-right: 6px;
 	}
-	.content1-top{
+
+	.content1-top {
 		background: white;
 		padding: 20rpx;
 		border-radius: 0 0 30rpx 30rpx;
 	}
-	.search-form{
+
+	.search-form {
 		margin-bottom: 20rpx;
 	}
-	.title-row1{
+
+	.title-row1 {
 		font-size: 34rpx;
 	}
-	.row2{
+
+	.row2 {
 		margin-top: 55rpx;
 	}
+
+	.top2 {
+		display: flex;
+		align-items: center;
+		justify-content: space-between;
+
+		.right {
+			display: flex;
+			align-items: center;
+
+			.right-contrent1 {
+				margin: 20rpx;
+			}
+		}
+	}
 </style>

+ 94 - 81
pages/tran/car_detail.vue

@@ -4,19 +4,19 @@
 			<view class="d-header">
 				<text>基本信息</text>
 			</view>
-			 <view class="c-list">
-				 <view class="c-row b-b">
-				 	<text class="tit">承运人</text>
-				 	<view class="con-list">
-				 		<text>{{car.driver}}</text>
-				 	</view>
-				 </view>
-				 <view class="c-row b-b">
-				 	<text class="tit">承运人电话</text>
-				 	<view class="con-list">
-				 		<text>{{car.driverPhone}}</text>
-				 	</view>
-				 </view>
+			<view class="c-list">
+				<view class="c-row b-b">
+					<text class="tit">承运人</text>
+					<view class="con-list">
+						<text>{{car.driver}}</text>
+					</view>
+				</view>
+				<view class="c-row b-b">
+					<text class="tit">承运人电话</text>
+					<view class="con-list">
+						<text>{{car.driverPhone}}</text>
+					</view>
+				</view>
 				<view class="c-row b-b">
 					<text class="tit">车牌号</text>
 					<view class="con-list">
@@ -79,48 +79,52 @@
 				<button v-else type="primary" class=" action-btn no-border add-cart-btn" >正在承运</button>
 			</view>
 		</view> -->
+		<u-modal v-model="isShowAlert" :title-style="{fontSize: '18px',fontWeight:'500'}"
+			:content-style="{fontSize: '14px',fontWeight:'400'}" confirm-color='#22C572' confirm-text='确定' title='登录提示'
+			showCancelButton='false' :content="content" @confirm="alertBtn" @cancel="cancelClick"></u-modal>
 	</view>
 </template>
 
 <script>
 	import uniNumberBox from '@/components/uni-number-box.vue';
-	import {  
-        mapState 
-    } from 'vuex';
+	import {
+		mapState
+	} from 'vuex';
 	export default {
 		components: {
 			uniNumberBox
 		},
 		data() {
 			return {
+				isShowAlert: false,
+				content: '您尚未登录,是否立即登录?',
 				car: {
-					id:'',
-					tranNo:'',
+					id: '',
+					tranNo: '',
 					tranCount: 0,
-					price:0,
-					driverPhone:'',
+					price: 0,
+					driverPhone: '',
 				},
-				tranInfo:{},
-				driver:'',
-				driverPhone:'',
-				price:0,
-				carNo:'',
+				tranInfo: {},
+				driver: '',
+				driverPhone: '',
+				price: 0,
+				carNo: '',
 				tranCount: 0,
-				sendText:'获取验证码',
+				sendText: '获取验证码',
 				sendDisabled: false,
-				verifyCode:'',
+				verifyCode: '',
 				modalName: null,
 				tranNo: '请选择货源单号',
-				exsitCount:0
+				exsitCount: 0
 			};
 		},
-		onShow() {
-		},
+		onShow() {},
 		onLoad(options) {
 			const that = this
 			uni.showLoading({
 				title: '正在加载',
-				mask:true
+				mask: true
 			})
 			that.$api.request('tran', 'getCarDetailInfo', {
 				id: options.id
@@ -133,7 +137,7 @@
 			})
 		},
 		computed: {
-			...mapState(['hasLogin','userInfo'])
+			...mapState(['hasLogin', 'userInfo'])
 		},
 		methods: {
 			RadioChange(e) {
@@ -169,65 +173,73 @@
 				// 	})
 				// }
 				// else{
-					let that = this
-					this.modalName = e.currentTarget.dataset.target
-					this.$api.request('tran', 'getTranNoList',{
-						senderPhone: that.userInfo.phone,
-					}, failres => {
-						that.$api.msg(failres.errmsg)
-						uni.hideLoading()
-					}).then(res => {
-						let data = res.data
-						console.log(data.tranInfo)
-						//销售信息
-						if(data.tranInfo){
-							that.tranInfo = data.tranInfo
-						}
-						uni.hideLoading()
-					})
+				let that = this
+				this.modalName = e.currentTarget.dataset.target
+				this.$api.request('tran', 'getTranNoList', {
+					senderPhone: that.userInfo.phone,
+				}, failres => {
+					that.$api.msg(failres.errmsg)
+					uni.hideLoading()
+				}).then(res => {
+					let data = res.data
+					console.log(data.tranInfo)
+					//销售信息
+					if (data.tranInfo) {
+						that.tranInfo = data.tranInfo
+					}
+					uni.hideLoading()
+				})
 				// }
-				
-				
+
+
 			},
 			contactUs() {
 				const that = this
 				uni.makePhoneCall({
-				 	// 手机号
-				    phoneNumber: that.car.driverPhone, 
-				
+					// 手机号
+					phoneNumber: that.car.driverPhone,
+
 					// 成功回调
 					success: (res) => {
-						console.log('调用成功!')	
+						console.log('调用成功!')
 					},
-				
+
 					// 失败回调
 					fail: (res) => {
 						console.log('调用失败!')
 					}
-					
-				  });
+
+				});
+			},
+			alertBtn() {
+				uni.navigateTo({
+					url: '/pages/public/login'
+				})
+			},
+			cancelClick() {
+				this.isShowAlert = false
 			},
-			tranNow(){
+			tranNow() {
 				let that = this
 				if (!this.hasLogin) {
-					uni.showModal({
-						title: '登录提示',
-						content: '您尚未登录,是否立即登录?',
-						showCancel: true,
-						confirmText: '登录',
-						success: (e) => {
-							if (e.confirm) {
-								uni.navigateTo({
-									url: '/pages/public/login'
-								})
-							}
-						},
-						fail: () => {},
-						complete: () => {}
-					})
-				}
-				else{
-					if(!that.tranNo){
+					this.isShowAlert = true;
+					// uni.showModal({
+					// 	title: '登录提示',
+					// 	content: '您尚未登录,是否立即登录?',
+					// 	showCancel: true,
+					// 	confirmText: '登录',
+					// 	success: (e) => {
+					// 		if (e.confirm) {
+					// 			uni.navigateTo({
+					// 				url: '/pages/public/login'
+					// 			})
+					// 		}
+					// 	},
+					// 	fail: () => {},
+					// 	complete: () => {}
+					// })
+				} else {
+					if (!that.tranNo) {
 						this.$api.msg('请选择货源单号');
 						return;
 					}
@@ -239,7 +251,7 @@
 						that.$api.msg('请填写承运吨数');
 						return
 					}
-					if(that.tranCount>that.exsitCount){
+					if (that.tranCount > that.exsitCount) {
 						that.$api.msg('承运吨数必须小于等于剩余量');
 						return
 					}
@@ -248,12 +260,12 @@
 					that.car.tranNo = that.tranNo
 					uni.showLoading({
 						title: '正在提交',
-						mask:true
+						mask: true
 					})
-					that.$api.request('tran', 'pipei',that.car, failres => {
+					that.$api.request('tran', 'pipei', that.car, failres => {
 						uni.hideLoading()
 						that.$api.msg(failres.errmsg);
-						
+
 					}).then(res => {
 						uni.hideLoading()
 						uni.showModal({
@@ -270,7 +282,7 @@
 						// that.$api.prePage().refreshList(data, that.manageType);
 					})
 				}
-				
+
 			}
 		},
 
@@ -316,6 +328,7 @@
 		}
 
 	}
+
 	.c-list {
 		font-size: $font-sm + 2upx;
 		color: $font-color-base;

+ 331 - 305
pages/tran/my_tran.vue

@@ -15,62 +15,60 @@
 				<scroll-view class="list-scroll-content" scroll-y @scrolltolower="onReachBottomTmp">
 					<block v-if="TabCur==0">
 						<view class="guess-section">
-							<view 
-								v-for="(item, index) in tranInfo" :key="index"
-								class="guess-item"
-								@click="navToDetailPage(item)"
-							>
-							<view class="flex justify-between padding-xs ">
-							  <view class="flex-sub padding-xs">
-								  <view class="cu-capsule radius">
-								  	<view class="cu-tag bg-blue">
-								  		{{item.startPlace }}
-								  	</view>
-								  	<view class="cu-tag line-blue">
-								  		{{item.endPlace }}
-								  	</view>
-								  </view>
-							  </view>
-							 
-							  <view class=" padding-xs">
-								  <view v-if="item.status == 30" class="cu-capsule radius">
-									<view  class="cu-tag bg-green">
-										可承运
+							<view v-for="(item, index) in tranInfo" :key="index" class="guess-item"
+								@click="navToDetailPage(item)">
+								<view class="flex justify-between padding-xs ">
+									<view class="flex-sub padding-xs">
+										<view class="cu-capsule radius">
+											<view class="cu-tag bg-blue">
+												{{item.startPlace }}
+											</view>
+											<view class="cu-tag line-blue">
+												{{item.endPlace }}
+											</view>
+										</view>
 									</view>
-									<view class="cu-tag line-green">
-										 <text class="text-price">{{item.price }}</text>
-									</view>
-								  </view>
-								  <view v-else class="cu-capsule radius">
-								  	<view  class="cu-tag bg-red">
-								  		已结束
-								  	</view>
-								  	<view class="cu-tag line-red">
-								  		 <text class="text-price">{{item.price }}</text>
-								  	</view>
-								  </view>
-							  </view>
-							</view>
-							<view class="flex justify-between padding-xs">
-								<view class="flex-sub padding-xs">
-								  <view  class="cu-capsule radius">
-									<view class="cu-tag bg-orange">
-										{{item.goodsName}}
-									</view>
-									<view v-if='item.total' class="cu-tag line-orange">
-										{{item.total - item.tranCount }}吨
+
+									<view class=" padding-xs">
+										<view v-if="item.status == 30" class="cu-capsule radius">
+											<view class="cu-tag bg-green">
+												可承运
+											</view>
+											<view class="cu-tag line-green">
+												<text class="text-price">{{item.price }}</text>
+											</view>
+										</view>
+										<view v-else class="cu-capsule radius">
+											<view class="cu-tag bg-red">
+												已结束
+											</view>
+											<view class="cu-tag line-red">
+												<text class="text-price">{{item.price }}</text>
+											</view>
+										</view>
 									</view>
-								  </view>
 								</view>
-								<view class=" text-sm padding-xs">
+								<view class="flex justify-between padding-xs">
+									<view class="flex-sub padding-xs">
+										<view class="cu-capsule radius">
+											<view class="cu-tag bg-orange">
+												{{item.goodsName}}
+											</view>
+											<view v-if='item.total' class="cu-tag line-orange">
+												{{item.total - item.tranCount }}吨
+											</view>
+										</view>
+									</view>
 									<view class=" text-sm padding-xs">
-										<text class="text-gray  text-sm text-right padding-xs-tmp ">{{item.gmtUpdate}}</text>
+										<view class=" text-sm padding-xs">
+											<text
+												class="text-gray  text-sm text-right padding-xs-tmp ">{{item.gmtUpdate}}</text>
+										</view>
 									</view>
 								</view>
 							</view>
-							</view>
 							<view v-show="isLoadMore">
-							    <uni-load-more :status="loadStatus" ></uni-load-more>
+								<uni-load-more :status="loadStatus"></uni-load-more>
 							</view>
 						</view>
 					</block>
@@ -80,60 +78,61 @@
 				<scroll-view class="list-scroll-content" scroll-y @scrolltolower="onReachBottomTmp">
 					<block v-if="TabCur==1">
 						<view class="guess-section">
-							<view 
-								v-for="(item, index) in carInfo" :key="index"
-								class="guess-item"
-								@click="navToDetailPage(item)"
-							>
-							<view class="flex justify-between padding-xs ">
-							  <view class="flex-sub padding-xs">
-								  <view class="cu-capsule radius">
-								  	<view class="cu-tag bg-blue">
-								  		{{item.startPlace }}
-								  	</view>
-								  	<view class="cu-tag line-blue">
-								  		{{item.endPlace }}
-								  	</view>
-								  </view>
-							  </view>
-							 
-							  <view class=" padding-xs">
-								  <view v-if="item.carStatus" class="cu-capsule radius">
-									<view  class="cu-tag bg-green">
-										{{item.carStatus}}
+							<view v-for="(item, index) in carInfo" :key="index" class="guess-item"
+								@click="navToDetailPage(item)">
+								<view class="flex justify-between padding-xs ">
+									<view class="flex-sub padding-xs">
+										<view class="cu-capsule radius">
+											<view class="cu-tag bg-blue">
+												{{item.startPlace }}
+											</view>
+											<view class="cu-tag line-blue">
+												{{item.endPlace }}
+											</view>
+										</view>
 									</view>
-									<view class="cu-tag line-green">
-										 <text class="text-price">{{item.price }}</text>
-									</view>
-								  </view>
-							  </view>
-							</view>
-							<view class="flex justify-between padding-xs">
-								<view class="flex-sub padding-xs">
-								  <view class="cu-capsule radius">
-									<view class="cu-tag bg-orange">
-										{{item.carNo}}
-									</view>
-									<view v-if='item.driver' class="cu-tag  line-orange">
-										{{item.driver}}
+
+									<view class=" padding-xs">
+										<view v-if="item.carStatus" class="cu-capsule radius">
+											<view class="cu-tag bg-green">
+												{{item.carStatus}}
+											</view>
+											<view class="cu-tag line-green">
+												<text class="text-price">{{item.price }}</text>
+											</view>
+										</view>
 									</view>
-								  </view>
 								</view>
-								<view class=" text-sm padding-xs">
+								<view class="flex justify-between padding-xs">
+									<view class="flex-sub padding-xs">
+										<view class="cu-capsule radius">
+											<view class="cu-tag bg-orange">
+												{{item.carNo}}
+											</view>
+											<view v-if='item.driver' class="cu-tag  line-orange">
+												{{item.driver}}
+											</view>
+										</view>
+									</view>
 									<view class=" text-sm padding-xs">
-										<text class="text-gray  text-sm text-right padding-xs-tmp ">{{item.gmtUpdate}}</text>
+										<view class=" text-sm padding-xs">
+											<text
+												class="text-gray  text-sm text-right padding-xs-tmp ">{{item.gmtUpdate}}</text>
+										</view>
 									</view>
 								</view>
 							</view>
-							</view>
 							<view v-show="isLoadMore">
-							    <uni-load-more :status="loadStatus" ></uni-load-more>
+								<uni-load-more :status="loadStatus"></uni-load-more>
 							</view>
 						</view>
 					</block>
 				</scroll-view>
 			</swiper-item>
 		</swiper>
+		<u-modal v-model="isShowAlert" :title-style="{fontSize: '18px',fontWeight:'500'}"
+			:content-style="{fontSize: '14px',fontWeight:'400'}" confirm-color='#22C572' confirm-text='确定' title='登录提示'
+			showCancelButton='false' :content="content" @confirm="alertBtn" @cancel="cancelClick"></u-modal>
 	</view>
 </template>
 
@@ -142,237 +141,253 @@
 		mapState
 	} from 'vuex';
 	export default {
-			name: "my",
-			data() {
-				return {
-					tranInfo: [],
-					carInfo:[],
-					pages:1,//页数
-					limit:10 ,//每次取条目数
-					loadStatus:'loading',  //加载样式:more-加载前样式,loading-加载中样式,nomore-没有数据样式
-					isLoadMore:false  ,//是否加载中
-					PageCur: "tran",
-					TabCur: 0
-				};
-			},
-			computed: {
-				...mapState(['hasLogin','userInfo'])
-			},
-			onShow() {
-				this.PageCur = "my"
-				uni.setStorageSync('PageCur', this.PageCur);
-				this.loadData()
-			},
-			//下拉刷新
-			onPullDownRefresh() {
-				this.pages = 1
-				this.isLoadMore = false
-				this.loadStatus = 'loading'
-				this.loadData()
-			},
-			onLoad(options) {
-				this.TabCur = options.TabCur
-			},
-			// onPageScroll(e) {
-			// 	//兼容iOS端下拉时顶部漂移
-			// 	if (e.scrollTop >= 0) {
-			// 		this.headerPosition = "fixed";
-			// 	} else {
-			// 		this.headerPosition = "absolute";
-			// 	}
-			// },
-			onReachBottom(){  //上拉触底函数
-			  if(!this.isLoadMore){  //此处判断,上锁,防止重复请求
-					this.isLoadMore=true
-					this.pages += 1
-					if(this.TabCur == 0){
-						this.getIndexTranData()
-					}
-					else{
-						this.getIndexCarData()
-					}
-					
-			  }
-			},
-			methods: {
-				async loadData() {
-					const that = this
-					uni.showLoading({
-						title: '正在加载',
-						mask:true
-					})
-					if(this.TabCur == 0){
-						that.$api.request('tran', 'getMyTranListInfo',{
-							page: this.pages,
-							limit:this.limit,
-							phone:this.userInfo.phone
-						}, failres => {
-							that.$api.msg(failres.errmsg)
-							this.isLoadMore = false
-							this.loadStatus = 'nomore'
-							if(this.pages>1){this.pages=1}
-							uni.hideLoading()
-							uni.stopPullDownRefresh()
-						}).then(res => {
-							let data = res.data
-							console.log(data.tranInfo)
-							//销售信息
-							if(data.tranInfo){
-								that.tranInfo = data.tranInfo
-							}
-							uni.hideLoading()
-							uni.stopPullDownRefresh()
-						})
-					}
-					else{
-						that.$api.request('tran', 'getMyCarListInfo',{
-							page: this.pages,
-							limit:this.limit,
-							phone:this.userInfo.phone
-						}, failres => {
-							that.$api.msg(failres.errmsg)
-							this.isLoadMore = false
-							this.loadStatus = 'nomore'
-							if(this.pages>1){this.pages=1}
-							uni.hideLoading()
-							uni.stopPullDownRefresh()
-						}).then(res => {
-							let data = res.data
-							//销售信息
-							if(data.carInfo){
-								that.carInfo = data.carInfo
-							}
-							uni.hideLoading()
-							uni.stopPullDownRefresh()
-						})
-					}
-					if (!this.hasLogin||this.userInfo.phone == undefined) {
-						uni.showModal({
-							title: '登录提示',
-							content: '您尚未登录,是否立即登录?',
-							showCancel: true,
-							confirmText: '登录',
-							success: (e) => {
-								if (e.confirm) {
-									uni.navigateTo({
-										url: '/pages/public/login'
-									})
-								}
-							},
-							fail: () => {},
-							complete: () => {}
-						})
-					}
-				},
-				tabSelect(e) {
-					if(e.currentTarget.dataset.id){
-						this.TabCur = e.currentTarget.dataset.id;
-					}
-					else{
-						this.TabCur = e.target.current;
-					}
-					this.pages = 1
-					this.loadData()
-				},
-				//详情
-				navToDetailPage(item) {
-					let id = item.id;
-					let sendCarNo = item.sendCarNo;
-					if(this.TabCur == 0){
-						uni.navigateTo({
-							url: `/pages/tran/my_tran_detail?id=${id}`
-						})
-					}
-					else{
-						uni.navigateTo({
-							url: `/pages/tran/my_car_detail?sendCarNo=${sendCarNo}`
-						})
-					}
-				},
-				onReachBottomTmp(){  //上拉触底函数
-				  if(!this.isLoadMore){  //此处判断,上锁,防止重复请求
-						this.isLoadMore=true
-						this.pages += 1
-						if(this.TabCur == 0){
-							this.getIndexTranData()
-						}
-						else{
-							this.getIndexCarData()
-						}
-						
-				  }
-				},
-				getIndexTranData(){
-					const that = this
-					var pages=that.pages
-					var limit=that.limit
-				   
-					uni.showLoading({
-						title: '正在加载',
-						mask:true
-					})
+		name: "my",
+		data() {
+			return {
+				tranInfo: [],
+				carInfo: [],
+				pages: 1, //页数
+				limit: 10, //每次取条目数
+				loadStatus: 'loading', //加载样式:more-加载前样式,loading-加载中样式,nomore-没有数据样式
+				isLoadMore: false, //是否加载中
+				PageCur: "tran",
+				TabCur: 0
+			};
+		},
+		computed: {
+			...mapState(['hasLogin', 'userInfo'])
+		},
+		onShow() {
+			this.PageCur = "my"
+			uni.setStorageSync('PageCur', this.PageCur);
+			this.loadData()
+		},
+		//下拉刷新
+		onPullDownRefresh() {
+			this.pages = 1
+			this.isLoadMore = false
+			this.loadStatus = 'loading'
+			this.loadData()
+		},
+		onLoad(options) {
+			this.TabCur = options.TabCur
+		},
+		// onPageScroll(e) {
+		// 	//兼容iOS端下拉时顶部漂移
+		// 	if (e.scrollTop >= 0) {
+		// 		this.headerPosition = "fixed";
+		// 	} else {
+		// 		this.headerPosition = "absolute";
+		// 	}
+		// },
+		onReachBottom() { //上拉触底函数
+			if (!this.isLoadMore) { //此处判断,上锁,防止重复请求
+				this.isLoadMore = true
+				this.pages += 1
+				if (this.TabCur == 0) {
+					this.getIndexTranData()
+				} else {
+					this.getIndexCarData()
+				}
+
+			}
+		},
+		methods: {
+			isShowAlert: false,
+			content: '您尚未登录,是否立即登录?',
+			async loadData() {
+				const that = this
+				uni.showLoading({
+					title: '正在加载',
+					mask: true
+				})
+				if (this.TabCur == 0) {
 					that.$api.request('tran', 'getMyTranListInfo', {
-						page: pages,
-						limit:limit,
-						phone:this.userInfo.phone
-					},failres => {
+						page: this.pages,
+						limit: this.limit,
+						phone: this.userInfo.phone
+					}, failres => {
 						that.$api.msg(failres.errmsg)
-						that.isLoadMore=false
-						that.loadStatus = 'nomore'
-						if(that.pages>1){that.pages-=1}
+						this.isLoadMore = false
+						this.loadStatus = 'nomore'
+						if (this.pages > 1) {
+							this.pages = 1
+						}
 						uni.hideLoading()
+						uni.stopPullDownRefresh()
 					}).then(res => {
 						let data = res.data
+						console.log(data.tranInfo)
 						//销售信息
-						if(data.tranInfo.length > 0){
-							that.tranInfo = that.tranInfo.concat(data.tranInfo)
-							that.isLoadMore=false
-						}
-						else{
-							if(that.pages>1){that.pages-=1}						
-							that.isLoadMore=true
-							that.loadStatus = 'nomore'
+						if (data.tranInfo) {
+							that.tranInfo = data.tranInfo
 						}
 						uni.hideLoading()
+						uni.stopPullDownRefresh()
 					})
-				},
-				getIndexCarData(){
-					const that = this
-					var pages=that.pages
-					var limit=that.limit
-				   
-					uni.showLoading({
-						title: '正在加载',
-						mask:true
-					})
+				} else {
 					that.$api.request('tran', 'getMyCarListInfo', {
-						page: pages,
-						limit:limit,
-						phone:this.userInfo.phone
-					},failres => {
+						page: this.pages,
+						limit: this.limit,
+						phone: this.userInfo.phone
+					}, failres => {
 						that.$api.msg(failres.errmsg)
-						that.isLoadMore=false
-						that.loadStatus = 'nomore'
-						if(that.pages>1){that.pages-=1}
+						this.isLoadMore = false
+						this.loadStatus = 'nomore'
+						if (this.pages > 1) {
+							this.pages = 1
+						}
 						uni.hideLoading()
+						uni.stopPullDownRefresh()
 					}).then(res => {
 						let data = res.data
 						//销售信息
-						if(data.carInfo.length > 0){
-							that.carInfo = that.carInfo.concat(data.carInfo)
-							that.isLoadMore=false
-						}
-						else{
-							if(that.pages>1){that.pages-=1}						
-							that.isLoadMore=true
-							that.loadStatus = 'nomore'
+						if (data.carInfo) {
+							that.carInfo = data.carInfo
 						}
 						uni.hideLoading()
+						uni.stopPullDownRefresh()
+					})
+				}
+				if (!this.hasLogin || this.userInfo.phone == undefined) {
+					this.isShowAlert = true;
+					// uni.showModal({
+					// 	title: '登录提示',
+					// 	content: '您尚未登录,是否立即登录?',
+					// 	showCancel: true,
+					// 	confirmText: '登录',
+					// 	success: (e) => {
+					// 		if (e.confirm) {
+					// 			uni.navigateTo({
+					// 				url: '/pages/public/login'
+					// 			})
+					// 		}
+					// 	},
+					// 	fail: () => {},
+					// 	complete: () => {}
+					// })
+				}
+			},
+			alertBtn() {
+				uni.navigateTo({
+					url: '/pages/public/login'
+				})
+			},
+			cancelClick() {
+				this.isShowAlert = false
+			},
+			tabSelect(e) {
+				if (e.currentTarget.dataset.id) {
+					this.TabCur = e.currentTarget.dataset.id;
+				} else {
+					this.TabCur = e.target.current;
+				}
+				this.pages = 1
+				this.loadData()
+			},
+			//详情
+			navToDetailPage(item) {
+				let id = item.id;
+				let sendCarNo = item.sendCarNo;
+				if (this.TabCur == 0) {
+					uni.navigateTo({
+						url: `/pages/tran/my_tran_detail?id=${id}`
+					})
+				} else {
+					uni.navigateTo({
+						url: `/pages/tran/my_car_detail?sendCarNo=${sendCarNo}`
 					})
 				}
-			
 			},
-		}
+			onReachBottomTmp() { //上拉触底函数
+				if (!this.isLoadMore) { //此处判断,上锁,防止重复请求
+					this.isLoadMore = true
+					this.pages += 1
+					if (this.TabCur == 0) {
+						this.getIndexTranData()
+					} else {
+						this.getIndexCarData()
+					}
+
+				}
+			},
+			getIndexTranData() {
+				const that = this
+				var pages = that.pages
+				var limit = that.limit
+
+				uni.showLoading({
+					title: '正在加载',
+					mask: true
+				})
+				that.$api.request('tran', 'getMyTranListInfo', {
+					page: pages,
+					limit: limit,
+					phone: this.userInfo.phone
+				}, failres => {
+					that.$api.msg(failres.errmsg)
+					that.isLoadMore = false
+					that.loadStatus = 'nomore'
+					if (that.pages > 1) {
+						that.pages -= 1
+					}
+					uni.hideLoading()
+				}).then(res => {
+					let data = res.data
+					//销售信息
+					if (data.tranInfo.length > 0) {
+						that.tranInfo = that.tranInfo.concat(data.tranInfo)
+						that.isLoadMore = false
+					} else {
+						if (that.pages > 1) {
+							that.pages -= 1
+						}
+						that.isLoadMore = true
+						that.loadStatus = 'nomore'
+					}
+					uni.hideLoading()
+				})
+			},
+			getIndexCarData() {
+				const that = this
+				var pages = that.pages
+				var limit = that.limit
+
+				uni.showLoading({
+					title: '正在加载',
+					mask: true
+				})
+				that.$api.request('tran', 'getMyCarListInfo', {
+					page: pages,
+					limit: limit,
+					phone: this.userInfo.phone
+				}, failres => {
+					that.$api.msg(failres.errmsg)
+					that.isLoadMore = false
+					that.loadStatus = 'nomore'
+					if (that.pages > 1) {
+						that.pages -= 1
+					}
+					uni.hideLoading()
+				}).then(res => {
+					let data = res.data
+					//销售信息
+					if (data.carInfo.length > 0) {
+						that.carInfo = that.carInfo.concat(data.carInfo)
+						that.isLoadMore = false
+					} else {
+						if (that.pages > 1) {
+							that.pages -= 1
+						}
+						that.isLoadMore = true
+						that.loadStatus = 'nomore'
+					}
+					uni.hideLoading()
+				})
+			}
+
+		},
+	}
 </script>
 
 <style lang='scss' scoped>
@@ -381,38 +396,49 @@
 		background: $page-color-base;
 		height: 100%;
 	}
-	.container{
+
+	.container {
 		padding-bottom: 100upx;
 	}
+
 	.cu-form-group input {
 		text-align: right;
 	}
+
 	.cu-form-group textarea {
 		text-align: right;
 	}
-	.place{
+
+	.place {
 		font-size: 40rpx;
 		line-height: 1;
 		padding-right: 10upx;
 	}
-	.place-center{
+
+	.place-center {
 		font-size: 28rpx;
 	}
-	.guess-item{
+
+	.guess-item {
 		/* margin-top: 50rpx; */
 	}
-	.btn-size{
+
+	.btn-size {
 		font-size: 28rpx;
 	}
-	.place-bottom{
+
+	.place-bottom {
 		margin-top: 20rpx;
 	}
+
 	.swiper-box {
 		height: 94vh;
 	}
+
 	.list-scroll-content {
 		height: 100%;
 	}
+
 	.uni-swiper-item {
 		height: auto;
 	}

+ 164 - 145
pages/tran/tran_detail.vue

@@ -13,48 +13,48 @@
 				<view class='cu-tag radius line-orange'>{{tran.sender}}</view>
 				<view class='cu-tag radius line-orange'>{{tran.senderPhone}}</view>
 			</view> -->
-			
+
 			<view v-if='tran.total' class="bot-row">
-				<view  class='cu-tag radius line-orange'>剩余量: {{numFilter(tran.total - tran.tranCount)}}吨</view>
-				<view  class='cu-tag radius line-orange'>总量: {{tran.total}}吨</view>
+				<view class='cu-tag radius line-orange'>剩余量: {{numFilter(tran.total - tran.tranCount)}}吨</view>
+				<view class='cu-tag radius line-orange'>总量: {{tran.total}}吨</view>
 			</view>
 		</view>
-		
+
 		<view class="detail-desc">
 			<view class="d-header">
 				<text>基本信息</text>
 			</view>
-			 <view class="c-list">
-				 <view class="c-row b-b">
-				 	<text class="tit">发货人</text>
-				 	<view class="con-list">
-				 		<text>{{tran.sender}}</text>
-				 	</view>
-				 </view>
-				 <view class="c-row b-b">
-				 	<text class="tit">发货人电话</text>
-				 	<view class="con-list">
-				 		<text>{{tran.senderPhone}}</text>
-				 	</view>
-				 </view>
-				 <view v-if="tran.tranPhone" class="c-row b-b">
-				 	<text class="tit">物流部电话</text>
-				 	<view class="con-list">
-				 		<text>{{tran.tranPhone}}</text>
-				 	</view>
-				 </view>
-				 <view class="c-row b-b">
-				 	<text class="tit">收货人</text>
-				 	<view class="con-list">
-				 		<text>{{tran.receiver}}</text>
-				 	</view>
-				 </view>
-				 <view class="c-row b-b">
-				 	<text class="tit">收货人电话</text>
-				 	<view class="con-list">
-				 		<text>{{tran.receiverPhone}}</text>
-				 	</view>
-				 </view>
+			<view class="c-list">
+				<view class="c-row b-b">
+					<text class="tit">发货人</text>
+					<view class="con-list">
+						<text>{{tran.sender}}</text>
+					</view>
+				</view>
+				<view class="c-row b-b">
+					<text class="tit">发货人电话</text>
+					<view class="con-list">
+						<text>{{tran.senderPhone}}</text>
+					</view>
+				</view>
+				<view v-if="tran.tranPhone" class="c-row b-b">
+					<text class="tit">物流部电话</text>
+					<view class="con-list">
+						<text>{{tran.tranPhone}}</text>
+					</view>
+				</view>
+				<view class="c-row b-b">
+					<text class="tit">收货人</text>
+					<view class="con-list">
+						<text>{{tran.receiver}}</text>
+					</view>
+				</view>
+				<view class="c-row b-b">
+					<text class="tit">收货人电话</text>
+					<view class="con-list">
+						<text>{{tran.receiverPhone}}</text>
+					</view>
+				</view>
 				<view v-if='tran.goodsName&&tran.goodsName!="外采"' class="c-row b-b">
 					<text class="tit">货名</text>
 					<view class="con-list">
@@ -80,6 +80,10 @@
 					</view>
 				</view>
 			</view>
+			<u-modal v-model="isShowAlert" :title-style="{fontSize: '18px',fontWeight:'500'}"
+				:content-style="{fontSize: '14px',fontWeight:'400'}" confirm-color='#22C572' confirm-text='确定'
+				title='登录提示' showCancelButton='false' :content="content" @confirm="alertBtn" @cancel="cancelClick">
+			</u-modal>
 			<!-- <view class="d-header">
 				<text>承运信息</text>
 			</view>
@@ -91,7 +95,7 @@
 					</view>
 					<button class='cu-btn bg-green shadow' @click="getHistoryCar">选择车辆</button>
 				</view> -->
-	<!-- 			<view class="cu-bar bg-white">
+			<!-- 			<view class="cu-bar bg-white">
 					<view class="action">
 						司机身份证(正、反面)上传
 					</view>
@@ -115,13 +119,13 @@
 						</view>
 					</view>
 				</view> -->
-				<!-- <view class="c-row b-b">
+			<!-- <view class="c-row b-b">
 					<text class="tit">承运人</text>
 					<view class="con-list">
 						<input placeholder="请填写" name="input" v-model="driver" @input="driverInput"></input>
 					</view>
 				</view> -->
-				<!-- <view class="c-row b-b">
+			<!-- <view class="c-row b-b">
 					<text class="tit">承运人身份证号</text>
 					<view class="con-list">
 						<input placeholder="请填写" name="input" v-model="driverNo" @input="driverNoInput"></input>
@@ -133,7 +137,7 @@
 						<input placeholder="请填写" name="input" v-model="driverAddress" @input="driverAddressInput"></input>
 					</view>
 				</view> -->
-				<!-- <view class="c-row b-b">
+			<!-- <view class="c-row b-b">
 					<text class="tit">承运人微信号</text>
 					<view class="con-list">
 						<input placeholder="请填写" name="input" v-model="wechatNo" @input="wechatNoInput"></input>
@@ -153,15 +157,15 @@
 					</view>
 					<button class='cu-btn bg-green shadow':disabled="sendDisabled" @click="doGetVerify">{{sendText}}</button>
 				</view> -->
-				
-				<!-- <view class="c-row b-b">
+
+			<!-- <view class="c-row b-b">
 					<text class="tit">承运吨数</text>
 					<view class="con-list">
 						<input placeholder="请填写" type="mobile" name="input" @input="tranCountInput"></input>
 					</view>
 				</view> -->
-				
-				
+
+
 			<!-- 	<view class="cu-bar bg-white ">
 					<view class="action">
 						司机驾驶证(主页、副页)上传
@@ -210,7 +214,7 @@
 						</view>
 					</view>
 				</view> -->
-		<!-- 	</view> 
+			<!-- 	</view> 
 		</view>
 		
 		<view class="cu-modal" :class="modalName=='MycarModal'?'show':''" @tap="hideModal">
@@ -224,81 +228,82 @@
 				</view>
 			</scroll-view>
 		</view> -->
-		<!-- 底部操作菜单 -->
-		<!-- <view class="page-bottom">
+			<!-- 底部操作菜单 -->
+			<!-- <view class="page-bottom">
 			<view class="action-btn-group">
 				<button type="primary" class=" action-btn no-border buy-now-btn" @click="contactUs">联系我们</button>
 				<button v-if="tran.status == 30" type="primary" class=" action-btn no-border add-cart-btn" @click="tranNow">立即承运</button>
 				<button v-else type="primary" class=" action-btn no-border add-cart-btn" >承运结束</button>
 			</view>-->
-		</view> 
+		</view>
 	</view>
 </template>
 
 <script>
 	import uploadImage from '@/components/ossutil/uploadFile.js';
 	import uniNumberBox from '@/components/uni-number-box.vue';
-	import {  
-        mapState 
-    } from 'vuex';
+	import {
+		mapState
+	} from 'vuex';
 	export default {
 		components: {
 			uniNumberBox
 		},
-		
+
 		data() {
 			return {
+				isShowAlert: false,
+				content: '您尚未登录,是否立即登录?',
 				tran: {
 					id: undefined,
 					tranCount: 0,
-					tranNo:'',
+					tranNo: '',
 					total: 0,
 					price: 0,
 					startPlace: undefined,
 					endPlace: undefined,
 					goodsName: undefined,
-					sender:'',
-					senderPhone:'',
-					status:0,
-					receiver:'',
-					receiverPhone:'',
-					carNo:'',
-					verifyCode:'',
-					personNoImg:'',
-					personNoImg1:'',
-					driverNoImg:'',
-					driverNoImg1:'',
-					carNoImg:'',
-					carNoImg1:'',
+					sender: '',
+					senderPhone: '',
+					status: 0,
+					receiver: '',
+					receiverPhone: '',
+					carNo: '',
+					verifyCode: '',
+					personNoImg: '',
+					personNoImg1: '',
+					driverNoImg: '',
+					driverNoImg1: '',
+					carNoImg: '',
+					carNoImg1: '',
 				},
-				carInfo:[],
-				driver:'',
-				driverNo:'',
-				driverAddress:'',
-				driverPhone:'',
-				carNo:'',
+				carInfo: [],
+				driver: '',
+				driverNo: '',
+				driverAddress: '',
+				driverPhone: '',
+				carNo: '',
 				tranCount: 0,
-				sendText:'获取验证码',
+				sendText: '获取验证码',
 				sendDisabled: false,
-				verifyCode:'',
-				personNoImg:'',
-				personNoImg1:'',
-				driverNoImg:'',
-				driverNoImg1:'',
-				carNoImg:'',
-				carNoImg1:'',
-				modalName:'',
-				wechatNo:'',
-				mycarStyle:'',
+				verifyCode: '',
+				personNoImg: '',
+				personNoImg1: '',
+				driverNoImg: '',
+				driverNoImg1: '',
+				carNoImg: '',
+				carNoImg1: '',
+				modalName: '',
+				wechatNo: '',
+				mycarStyle: '',
 			};
 		},
-		onShow() {
-		},
+		onShow() {},
 		onLoad(options) {
 			const that = this
 			uni.showLoading({
 				title: '正在加载',
-				mask:true
+				mask: true
 			})
 			that.$api.request('tran', 'getTranDetailInfo', {
 				id: options.id
@@ -307,18 +312,18 @@
 				uni.hideLoading()
 			}).then(res => {
 				that.tran = res.data
-				if(that.tran.tranCount >= that.tran.total){
+				if (that.tran.tranCount >= that.tran.total) {
 					that.tran.status = 1
 				}
 				uni.hideLoading()
 			})
 		},
 		computed: {
-			...mapState(['hasLogin','userInfo'])
+			...mapState(['hasLogin', 'userInfo'])
 		},
 		methods: {
-			numFilter (value) {
-				if(!value){
+			numFilter(value) {
+				if (!value) {
 					return 0
 				}
 				// 截取当前数据到小数点后两位
@@ -416,7 +421,7 @@
 			// 		urls: img
 			// 	});
 			// },
-			
+
 			// DelImg(e) {
 			// 	uni.showModal({
 			// 		title: '提示',
@@ -443,8 +448,8 @@
 			// 				else if(e.currentTarget.dataset.index == 5){
 			// 					this.carNoImg1 = "";
 			// 				}
-							
-							
+
+
 			// 			}
 			// 		}
 			// 	})
@@ -452,20 +457,20 @@
 			contactUs() {
 				const that = this
 				uni.makePhoneCall({
-				 	// 手机号
-				    phoneNumber: that.tran.senderPhone, 
-				
+					// 手机号
+					phoneNumber: that.tran.senderPhone,
+
 					// 成功回调
 					success: (res) => {
-						console.log('调用成功!')	
+						console.log('调用成功!')
 					},
-				
+
 					// 失败回调
 					fail: (res) => {
 						console.log('调用失败!')
 					}
-					
-				  });
+
+				});
 			},
 			driverInput(e) {
 				this.driver = e.detail.value
@@ -488,13 +493,13 @@
 			tranCountInput(e) {
 				this.tranCount = e.detail.value
 			},
-			verifyCodeInput(e){
+			verifyCodeInput(e) {
 				this.verifyCode = e.detail.value
 			},
 			hideModal(e) {
 				this.modalName = null
 			},
-			mycarClick(item){
+			mycarClick(item) {
 				this.modalName = null
 				this.driver = item.driver
 				this.driverPhone = item.driverPhone
@@ -509,37 +514,37 @@
 				this.driverAddress = item.driverAddress
 				this.wechatNo = item.wechatNo
 			},
-			getHistoryCar(){
+			getHistoryCar() {
 				const that = this
 				uni.showLoading({
 					title: '正在加载',
-					mask:true
+					mask: true
 				})
 				that.$api.request('tran', 'getHistoryCar', failres => {
 					that.$api.msg(failres.errmsg)
 					uni.hideLoading()
 				}).then(res => {
 					that.carInfo = res.data
-					if(that.carInfo.length == 0){
+					if (that.carInfo.length == 0) {
 						that.$api.msg('暂无历史车辆');
 						uni.hideLoading()
 						return
 					}
 					var height = that.carInfo.length * 100
 					var width = 500
-					that.mycarStyle = "height:"+height+"rpx;width:" + width+"rpx"
+					that.mycarStyle = "height:" + height + "rpx;width:" + width + "rpx"
 					that.modalName = 'MycarModal'
 					uni.hideLoading()
 				})
-				
+
 			},
 			doGetVerify() {
 				const that = this
 				var phone = this.driverPhone;
 				if (!phone || phone.length != 11) {
 					uni.showToast({
-						title:'请输入正确手机号!',
-						icon:'none'
+						title: '请输入正确手机号!',
+						icon: 'none'
 					})
 					return
 				}
@@ -556,40 +561,48 @@
 							that.sendText = "获取验证码"
 							clearInterval(interval)
 						}
-						
+
 					}, 1000)
 				})
-				
+
+			},
+			alertBtn() {
+				uni.navigateTo({
+					url: '/pages/public/login'
+				})
+			},
+			cancelClick() {
+				this.isShowAlert = false
 			},
-			tranNow(){
+			tranNow() {
 				let that = this
 				if (!this.hasLogin) {
-					uni.showModal({
-						title: '登录提示',
-						content: '您尚未登录,是否立即登录?',
-						showCancel: true,
-						confirmText: '登录',
-						success: (e) => {
-							if (e.confirm) {
-								uni.navigateTo({
-									url: '/pages/public/login'
-								})
-							}
-						},
-						fail: () => {},
-						complete: () => {}
-					})
-				}
-				else{
+					this.isShowAlert = true;
+					// uni.showModal({
+					// 	title: '登录提示',
+					// 	content: '您尚未登录,是否立即登录?',
+					// 	showCancel: true,
+					// 	confirmText: '登录',
+					// 	success: (e) => {
+					// 		if (e.confirm) {
+					// 			uni.navigateTo({
+					// 				url: '/pages/public/login'
+					// 			})
+					// 		}
+					// 	},
+					// 	fail: () => {},
+					// 	complete: () => {}
+					// })
+				} else {
 					// if(!that.driver){
 					// 	this.$api.msg('请填写承运人');
 					// 	return;
 					// }
-					if(!that.driverPhone){
+					if (!that.driverPhone) {
 						this.$api.msg('请填写承运人手机号码');
 						return;
 					}
-					if(!that.verifyCode){
+					if (!that.verifyCode) {
 						this.$api.msg('请填写验证码');
 						return;
 					}
@@ -631,12 +644,12 @@
 					// that.tran.carNoImg = that.carNoImg
 					// that.tran.carNoImg1 = that.carNoImg1
 					that.tran.wechatNo = that.wechatNo
-					
+
 					uni.showLoading({
 						title: '正在提交',
-						mask:true
+						mask: true
 					})
-					that.$api.request('tran', 'addCar',that.tran, failres => {
+					that.$api.request('tran', 'addCar', that.tran, failres => {
 						uni.hideLoading()
 						that.$api.msg(failres.errmsg);
 					}).then(res => {
@@ -655,9 +668,9 @@
 						// that.$api.prePage().refreshList(data, that.manageType);
 					})
 				}
-				
+
 			},
-			
+
 		},
 
 	}
@@ -702,6 +715,7 @@
 		}
 
 	}
+
 	.c-list {
 		font-size: $font-sm + 2upx;
 		color: $font-color-base;
@@ -1087,31 +1101,36 @@
 		padding: 0;
 		line-height: 0px;
 	}
-	
-	
+
+
 	button::after {
 		border: none;
 	}
+
 	/* 销售信息 */
 	.introduce-section {
 		background: #fff;
 		padding: 20upx 30upx;
 		padding-bottom: 100upx;
+
 		.guess-item {
 			padding-bottom: 20upx;
 			border-bottom: 1px solid #ccc;
 		}
+
 		.title {
 			font-size: 28upx;
 			color: $font-color-dark;
-			font-weight:bold;
+			font-weight: bold;
 			height: 50upx;
 			line-height: 50upx;
-			flex:2.5;
+			flex: 2.5;
 		}
+
 		.title-tip {
-			flex:1;
+			flex: 1;
 		}
+
 		.price-box {
 			display: flex;
 			align-items: baseline;
@@ -1120,17 +1139,17 @@
 			font-size: 26upx;
 			color: $uni-color-primary;
 		}
-	
+
 		.price {
 			font-size: $font-lg + 2upx;
 		}
-	
+
 		.m-price {
 			margin: 0 12upx;
 			color: $font-color-light;
 			text-decoration: line-through;
 		}
-	
+
 		.coupon-tip {
 			align-items: center;
 			padding: 4upx 10upx;
@@ -1141,14 +1160,14 @@
 			line-height: 1;
 			transform: translateY(-4upx);
 		}
-	
+
 		.bot-row {
 			display: flex;
 			align-items: center;
 			height: 50upx;
 			font-size: $font-sm;
 			color: $font-color-light;
-	
+
 			view {
 				flex: 1;
 			}

+ 29 - 16
pages/user/depotMonitoring.vue

@@ -32,7 +32,9 @@
 						allow="autoplay; fullscreen; microphone;"></iframe> -->
 			</view>
 		</view>
-	</view>
+		<u-modal v-model="isShowAlert" :title-style="{fontSize: '18px',fontWeight:'500'}"
+			:content-style="{fontSize: '14px',fontWeight:'400'}" confirm-color='#22C572' confirm-text='确定' title='登录提示'
+			showCancelButton='false' :content="content" @confirm="alertBtn" @cancel="cancelClick"></u-modal>
 	</view>
 </template>
 <script>
@@ -46,6 +48,8 @@
 		},
 		data() {
 			return {
+				isShowAlert: false,
+				content: '您尚未登录,是否立即登录?',
 				show1: false,
 				warehouseName: '',
 				warehouseList: [],
@@ -84,21 +88,22 @@
 			this.$api.doRequest('get', '/commonUser/api/checkSession').then(res => {
 				console.log("checkSession", res)
 				if (res.data.data == "INVALID") {
-					uni.showModal({
-						title: '登录提示',
-						content: '当前登入信息验证失败,是否重新登录?',
-						showCancel: true,
-						confirmText: '登录',
-						success: (e) => {
-							if (e.confirm) {
-								uni.navigateTo({
-									url: '/pages/public/login'
-								})
-							}
-						},
-						fail: () => {},
-						complete: () => {}
-					})
+					this.isShowAlert = true;
+					// uni.showModal({
+					// 	title: '登录提示',
+					// 	content: '当前登入信息验证失败,是否重新登录?',
+					// 	showCancel: true,
+					// 	confirmText: '登录',
+					// 	success: (e) => {
+					// 		if (e.confirm) {
+					// 			uni.navigateTo({
+					// 				url: '/pages/public/login'
+					// 			})
+					// 		}
+					// 	},
+					// 	fail: () => {},
+					// 	complete: () => {}
+					// })
 				}
 			})
 			var that = this
@@ -136,6 +141,14 @@
 					url
 				})
 			},
+			alertBtn() {
+				uni.navigateTo({
+					url: '/pages/public/login'
+				})
+			},
+			cancelClick() {
+				this.isShowAlert = false
+			},
 			init(compId) {
 				console.log(this.userInfo)
 				this.$api.doRequest('get', '/warehouseBaseInfo/selectWarehouseSelf', {

+ 10 - 3
pages/user/setUp.vue

@@ -77,11 +77,18 @@
 					index: 3
 				})
 				uni.clearStorageSync();
+				var that=this
+				this.$api.doRequest('post', '/auth/api/logout').then(res => {
+					if (res.data.data) {
+						
+					}
+				})
 				this.$store.commit('logout')
 				this.$api.logout()
-				uni.navigateTo({
-					url: `/pages/public/login`
-				})
+						uni.navigateTo({
+							url: `/pages/public/login`
+						})
+				
 			},
 			getList() {
 				this.userInfo = uni.getStorageSync('userInfo')

+ 164 - 140
pages/user/task_detail_kn.vue

@@ -1,7 +1,7 @@
 <template>
 	<view class="container">
 		<view class="detail-desc">
-			
+
 			<view class="d-header">
 				<text>发运数据</text>
 			</view>
@@ -50,7 +50,7 @@
 				<view class="cu-form-group">
 					<view class="grid col-2 grid-square flex-sub">
 						<view class="bg-img" v-if="poundImg != ''" @tap="ViewImage" :data-url="poundImg">
-						 <image :src="poundImg" mode="aspectFit"></image>
+							<image :src="poundImg" mode="aspectFit"></image>
 							<view class="cu-tag bg-red" @tap.stop="DelImg" :data-index="0">
 								<text class='cuIcon-close'></text>
 							</view>
@@ -60,11 +60,11 @@
 						</view>
 					</view>
 				</view>
-			</view> 
+			</view>
 		</view>
 		<view class="cu-modal" :class="modalName=='userModal'?'show':''" @tap="hideModal">
 			<scroll-view scroll-y class="cu-dialog" :style="userStyle" @tap.stop="">
-				<view class="cu-list menu text-center" >
+				<view class="cu-list menu text-center">
 					<view class="cu-item" v-for="(item,index) in userList" :key="index" @click="mygaipai(item.id)">
 						<label class="flex justify-between align-center flex-sub">
 							<view class="flex-sub">{{item.userName}}</view>
@@ -75,7 +75,7 @@
 		</view>
 		<view class="cu-modal" :class="modalName=='workModal'?'show':''" @tap="hideModal">
 			<scroll-view scroll-y class="cu-dialog" :style="userStyle" @tap.stop="">
-				<view class="cu-list menu text-center" >
+				<view class="cu-list menu text-center">
 					<view class="cu-item" v-for="(item,index) in userList" :key="index" @click="nextPerson(item.id)">
 						<label class="flex justify-between align-center flex-sub">
 							<view class="flex-sub">{{item.userName}}</view>
@@ -90,68 +90,73 @@
 				<button type="primary" class=" action-btn no-border add-cart-btn" @click="finish">完成</button>
 				<button type="primary" class=" action-btn no-border add-cart-btn" @click="gaipai">改派</button>
 			</view>
-		</view> 
+		</view>
+		<u-modal v-model="isShowAlert" :title-style="{fontSize: '18px',fontWeight:'500'}"
+			:content-style="{fontSize: '14px',fontWeight:'400'}" confirm-color='#22C572' confirm-text='确定' title='登录提示'
+			showCancelButton='false' :content="content" @confirm="alertBtn" @cancel="cancelClick"></u-modal>
 	</view>
 </template>
 
 <script>
 	import uploadImage from '@/components/ossutil/uploadFile.js';
-	import {  
-	    mapState 
+	import {
+		mapState
 	} from 'vuex';
 	export default {
 		data() {
 			return {
-				taskInfo:[],
-				poundImg:'',
-				grossWeight:'',
-				skinWeight:'',
-				netWeight:'',
-				taskStatus:'',
-				userStyle:'',
-				modalName:'',
-				userList:[],
-				taskType:'',
-				taskId:'',
-				carNo:''
+				isShowAlert: false,
+				content: '您尚未登录,是否立即登录?',
+				taskInfo: [],
+				poundImg: '',
+				grossWeight: '',
+				skinWeight: '',
+				netWeight: '',
+				taskStatus: '',
+				userStyle: '',
+				modalName: '',
+				userList: [],
+				taskType: '',
+				taskId: '',
+				carNo: ''
 			};
 		},
 		computed: {
-			...mapState(['hasLogin','userInfo'])
-		},
-		onShow() {
+			...mapState(['hasLogin', 'userInfo'])
 		},
+		onShow() {},
 		onLoad(options) {
 			if (!this.hasLogin) {
-				uni.showModal({
-					title: '登录提示',
-					content: '您尚未登录,是否立即登录?',
-					showCancel: true,
-					confirmText: '登录',
-					success: (e) => {
-						if (e.confirm) {
-							uni.navigateTo({
-								url: '/pages/public/login'
-							})
-						}
-					},
-					fail: () => {},
-					complete: () => {}
-				})
+				this.isShowAlert = true;
+				// uni.showModal({
+				// 	title: '登录提示',
+				// 	content: '您尚未登录,是否立即登录?',
+				// 	showCancel: true,
+				// 	confirmText: '登录',
+				// 	success: (e) => {
+				// 		if (e.confirm) {
+				// 			uni.navigateTo({
+				// 				url: '/pages/public/login'
+				// 			})
+				// 		}
+				// 	},
+				// 	fail: () => {},
+				// 	complete: () => {}
+				// })
 			}
 			const that = this
 			this.taskId = options.taskId
 			this.taskStatus = options.taskStatus
 			uni.showLoading({
 				title: '正在加载',
-				mask:true
+				mask: true
 			})
 			that.$api.request('task', 'getTaskInfoKN', {
 				taskId: options.taskId
 			}, failres => {
 				that.$api.msg(failres.errmsg)
 				uni.hideLoading()
-			}).then(res => {			
+			}).then(res => {
 				that.taskInfo = res.data
 				that.carNo = res.data.carNo
 				that.grossWeight = res.data.grossWeight
@@ -161,10 +166,18 @@
 				uni.hideLoading()
 			})
 		},
-		
+
 		methods: {
-			numFilter (value) {
-				if(!value){
+			alertBtn() {
+				uni.navigateTo({
+					url: '/pages/public/login'
+				})
+			},
+			cancelClick() {
+				this.isShowAlert = false
+			},
+			numFilter(value) {
+				if (!value) {
 					return 0
 				}
 				// 截取当前数据到小数点后两位
@@ -178,7 +191,7 @@
 				var img = [];
 				img = e.currentTarget.dataset.url.split(' ')
 				uni.previewImage({
-					current:0,
+					current: 0,
 					urls: img
 				});
 			},
@@ -190,7 +203,7 @@
 					confirmText: '确定',
 					success: res => {
 						if (res.confirm) {
-							if(e.currentTarget.dataset.index == 0){
+							if (e.currentTarget.dataset.index == 0) {
 								this.poundImg = "";
 							}
 						}
@@ -201,7 +214,7 @@
 				uni.chooseImage({
 					count: 1, //默认9
 					sizeType: ['original', 'compressed'], //可以指定是原图还是压缩图,默认二者都有
-					sourceType: ['album','camera'], //从相册选择
+					sourceType: ['album', 'camera'], //从相册选择
 					success: (res) => {
 						//上传图片
 						//图片路径可自行修改
@@ -216,150 +229,150 @@
 			},
 			grossWeightInput(e) {
 				this.grossWeight = e.detail.value
-				if(this.grossWeight && this.skinWeight){
+				if (this.grossWeight && this.skinWeight) {
 					this.netWeight = this.grossWeight - this.skinWeight
 				}
 			},
 			skinWeightInput(e) {
 				this.skinWeight = e.detail.value
-				if(this.grossWeight && this.skinWeight){
+				if (this.grossWeight && this.skinWeight) {
 					this.netWeight = this.grossWeight - this.skinWeight
 				}
 			},
 			carNoInput(e) {
 				this.carNo = e.detail.value
 			},
-			save(){
+			save() {
 				const that = this
 				uni.showLoading({
 					title: '正在加载',
-					mask:true
+					mask: true
 				})
 				that.$api.request('task', 'saveTaskInfoKN', {
 					taskId: that.taskId,
-					grossWeight:!that.grossWeight?'':that.grossWeight,
-					skinWeight:!that.skinWeight?'':that.skinWeight,
-					netWeight:!that.netWeight?'':that.netWeight,
-					poundImg:!that.poundImg?'':that.poundImg,
-					carNo:!that.carNo?'':that.carNo
+					grossWeight: !that.grossWeight ? '' : that.grossWeight,
+					skinWeight: !that.skinWeight ? '' : that.skinWeight,
+					netWeight: !that.netWeight ? '' : that.netWeight,
+					poundImg: !that.poundImg ? '' : that.poundImg,
+					carNo: !that.carNo ? '' : that.carNo
 				}, failres => {
 					that.$api.msg(failres.errmsg)
 					uni.hideLoading()
-				}).then(res => {			
+				}).then(res => {
 					that.$api.msg('保存成功')
 					uni.hideLoading()
 				})
 			},
-			finish(){
+			finish() {
 				const that = this
-				if(!that.grossWeight){
+				if (!that.grossWeight) {
 					this.$api.msg('请填写毛重');
 					return;
 				}
-				if(!that.skinWeight){
+				if (!that.skinWeight) {
 					this.$api.msg('请填写皮重');
 					return;
 				}
-				if(!that.poundImg){
+				if (!that.poundImg) {
 					this.$api.msg('请上传磅单照片');
 					return;
 				}
 				uni.showModal({
-					  title: '温馨提示',
-					  content: '是否指派外勤继续完成库内销售发运任务',
-					  confirmText:"是",
-					  cancelText:"否",
-					  success: function (res) {
-						  if (res.confirm) {
-							 uni.showLoading({
-							 	title: '正在加载',
-								mask:true
-							 })
-							 that.$api.request('user', 'getUserList', {
-							 	role:'外勤'
-							 }, failres => {
-							  	that.$api.msg(failres.errmsg)
-							  	uni.hideLoading()
-							  }).then(res => {
-							 	that.userList = res.data
-							 	if(that.userList.length == 0){
-							 		that.$api.msg('暂无外勤信息')
-							 	}
-							 	else{
-							 		var height = that.userList.length * 100
-							 		var width = 500
-							 		that.userStyle = "height:"+height+"rpx;width:" + width+"rpx"
-							 		that.modalName = 'workModal'
-							 	}
-							 	uni.hideLoading()
-							 })
-						  } else if (res.cancel) {
+					title: '温馨提示',
+					content: '是否指派外勤继续完成库内销售发运任务',
+					confirmText: "是",
+					cancelText: "否",
+					success: function(res) {
+						if (res.confirm) {
 							uni.showLoading({
 								title: '正在加载',
-								mask:true
+								mask: true
+							})
+							that.$api.request('user', 'getUserList', {
+								role: '外勤'
+							}, failres => {
+								that.$api.msg(failres.errmsg)
+								uni.hideLoading()
+							}).then(res => {
+								that.userList = res.data
+								if (that.userList.length == 0) {
+									that.$api.msg('暂无外勤信息')
+								} else {
+									var height = that.userList.length * 100
+									var width = 500
+									that.userStyle = "height:" + height + "rpx;width:" + width + "rpx"
+									that.modalName = 'workModal'
+								}
+								uni.hideLoading()
+							})
+						} else if (res.cancel) {
+							uni.showLoading({
+								title: '正在加载',
+								mask: true
 							})
 							that.$api.request('task', 'finishTaskInfoKN', {
 								taskId: that.taskId,
-								grossWeight:!that.grossWeight?'':that.grossWeight,
-								skinWeight:!that.skinWeight?'':that.skinWeight,
-								netWeight:!that.netWeight?'':that.netWeight,
-								poundImg:!that.poundImg?'':that.poundImg,
-								carNo:!that.carNo?'':that.carNo,
+								grossWeight: !that.grossWeight ? '' : that.grossWeight,
+								skinWeight: !that.skinWeight ? '' : that.skinWeight,
+								netWeight: !that.netWeight ? '' : that.netWeight,
+								poundImg: !that.poundImg ? '' : that.poundImg,
+								carNo: !that.carNo ? '' : that.carNo,
 								nextUserId: -1
 							}, failres => {
 								that.$api.msg(failres.errmsg)
 								uni.hideLoading()
-							}).then(res => {			
+							}).then(res => {
 								uni.hideLoading()
 								that.$api.msg('完成成功')
-								setTimeout(()=>{uni.navigateBack({})},1000);
+								setTimeout(() => {
+									uni.navigateBack({})
+								}, 1000);
 							})
-						  }
-					  }
+						}
+					}
 				});
-				
-				
+
+
 			},
-			gaipai(){
+			gaipai() {
 				const that = this
 				uni.showLoading({
 					title: '正在加载',
-					mask:true
+					mask: true
 				})
 				that.$api.request('user', 'getUserList', {
-					role:'外勤'
+					role: '外勤'
 				}, failres => {
-				 	that.$api.msg(failres.errmsg)
-				 	uni.hideLoading()
-				 }).then(res => {
+					that.$api.msg(failres.errmsg)
+					uni.hideLoading()
+				}).then(res => {
 					that.userList = res.data
-					if(that.userList.length == 0){
+					if (that.userList.length == 0) {
 						that.$api.msg('暂无外勤信息')
-					}
-					else{
+					} else {
 						var height = that.userList.length * 100
 						var width = 500
-						that.userStyle = "height:"+height+"rpx;width:" + width+"rpx"
+						that.userStyle = "height:" + height + "rpx;width:" + width + "rpx"
 						that.modalName = 'userModal'
 					}
-					
+
 					uni.hideLoading()
 				})
 			},
-			mygaipai(id){
+			mygaipai(id) {
 				var that = this
 				uni.showLoading({
 					title: '正在加载',
-					mask:true
+					mask: true
 				})
-				that.$api.request('task', 'gaipai',{
+				that.$api.request('task', 'gaipai', {
 					taskId: that.taskId,
-					outPersonId:id
-				},failres => {
+					outPersonId: id
+				}, failres => {
 					that.$api.msg(failres.errmsg)
 					that.modalName = null
 					uni.hideLoading()
-				}).then(res => {		
+				}).then(res => {
 					that.modalName = null
 					uni.navigateBack({
 						delta: 2
@@ -367,27 +380,29 @@
 					uni.hideLoading()
 				})
 			},
-			nextPerson(id){
+			nextPerson(id) {
 				var that = this
 				uni.showLoading({
 					title: '正在加载',
-					mask:true
+					mask: true
 				})
 				that.$api.request('task', 'finishTaskInfoKN', {
 					taskId: that.taskId,
-					grossWeight:!that.grossWeight?'':that.grossWeight,
-					skinWeight:!that.skinWeight?'':that.skinWeight,
-					netWeight:!that.netWeight?'':that.netWeight,
-					poundImg:!that.poundImg?'':that.poundImg,
-					carNo:!that.carNo?'':that.carNo,
+					grossWeight: !that.grossWeight ? '' : that.grossWeight,
+					skinWeight: !that.skinWeight ? '' : that.skinWeight,
+					netWeight: !that.netWeight ? '' : that.netWeight,
+					poundImg: !that.poundImg ? '' : that.poundImg,
+					carNo: !that.carNo ? '' : that.carNo,
 					nextUserId: id
 				}, failres => {
 					that.$api.msg(failres.errmsg)
 					uni.hideLoading()
-				}).then(res => {			
+				}).then(res => {
 					uni.hideLoading()
 					that.$api.msg('完成成功')
-					setTimeout(()=>{uni.navigateBack({})},1000);
+					setTimeout(() => {
+						uni.navigateBack({})
+					}, 1000);
 				})
 			},
 		},
@@ -395,14 +410,15 @@
 </script>
 
 <style lang='scss'>
-	.container{
+	.container {
 		padding-bottom: 160upx;
 	}
+
 	.detail-desc {
 		background: #fff;
 		margin-top: 16upx;
 		width: 750upx;
-	
+
 		.d-header {
 			display: flex;
 			justify-content: center;
@@ -411,14 +427,14 @@
 			font-size: $font-base + 2upx;
 			color: $font-color-dark;
 			position: relative;
-	
+
 			text {
 				padding: 0 20upx;
 				background: #fff;
 				position: relative;
 				z-index: 1;
 			}
-	
+
 			&:after {
 				position: absolute;
 				left: 50%;
@@ -431,42 +447,43 @@
 			}
 		}
 	}
+
 	.c-list {
 		font-size: $font-sm + 2upx;
 		color: $font-color-base;
 		background: #fff;
-	
+
 		.c-row {
 			display: flex;
 			align-items: center;
 			padding: 20upx 30upx;
 			position: relative;
 		}
-	
+
 		.tit {
 			width: 220upx;
 		}
-	
+
 		.con {
 			flex: 1;
 			color: $font-color-dark;
-	
+
 			.selected-text {
 				margin-right: 10upx;
 			}
 		}
-	
+
 		.bz-list {
 			height: 40upx;
 			font-size: $font-sm+2upx;
 			color: $font-color-dark;
-	
+
 			text {
 				display: inline-block;
 				margin-right: 30upx;
 			}
 		}
-	
+
 		.con-list {
 			flex: 1;
 			display: flex;
@@ -476,11 +493,12 @@
 			text-align: right;
 			padding-right: 20upx;
 		}
-	
+
 		.red {
 			color: $uni-color-primary;
 		}
 	}
+
 	/* 底部操作菜单 */
 	.page-bottom {
 		.action-btn-group {
@@ -489,11 +507,13 @@
 			}
 		}
 	}
+
 	@mixin playcenter {
 		display: flex;
 		align-items: center;
 		justify-content: center;
 	}
+
 	.xsh-start {
 		width: 105rpx;
 		height: 105rpx;
@@ -504,8 +524,10 @@
 		@include playcenter;
 		flex-wrap: wrap;
 	}
+
 	.x-modal {
 		width: 100%;
+
 		.x-m-title {
 			width: 100%;
 			height: 90rpx;
@@ -516,10 +538,12 @@
 			border-bottom: 1px dashed #999;
 			@include playcenter;
 			justify-content: space-between;
+
 			.xm-t-clear {
 				font-size: 25rpx;
 				color: #341DB7;
 				@include playcenter;
+
 				>image {
 					width: 28rpx;
 					height: 28rpx;
@@ -528,6 +552,7 @@
 				}
 			}
 		}
+
 		.x-m-con {
 			width: 100%;
 			padding: 0 31rpx 18rpx;
@@ -535,5 +560,4 @@
 			box-sizing: border-box;
 		}
 	}
-	
 </style>

+ 121 - 115
pages/user/user.vue

@@ -12,8 +12,12 @@
 					<view @click="toLogin" class="information">{{hasLogin? username : '立即登录' }}</view>
 					<view style='font-size:13px;color:#8F97AB;' class="information">{{starUserphone}}</view>
 					<view v-if="haveCompany">
-						<view v-if='hasLogin' @click='show=true' class="company"><image class='icon' style='width:19px;height:19px;' src="../../static/img/icon_qiye@3x.png" mode=""></image> {{compName}}></view>
-						<u-picker @confirm='compconfirm' mode="selector" v-model="show"   :range="companyList" range-key="compName"></u-picker>
+						<view v-if='hasLogin' @click='show=true' class="company">
+							<image class='icon' style='width:19px;height:19px;' src="../../static/img/icon_qiye@3x.png"
+								mode=""></image> {{compName}}>
+						</view>
+						<u-picker @confirm='compconfirm' mode="selector" v-model="show" :range="companyList"
+							range-key="compName"></u-picker>
 					</view>
 				</view>
 			</view>
@@ -46,13 +50,13 @@
 			</view>
 		</view>
 		<u-modal v-model="isShowAlert" :title-style="{fontSize: '18px',fontWeight:'500'}"
-			:content-style="{fontSize: '14px',fontWeight:'400'}" confirm-color='#22C572' confirm-text='确定' title='温馨提示'
-			showCancelButton='false' :content="content" @confirm="goOpenService" @cancel="cancelClick"></u-modal>
-		</view>
-		<!-- <view style="margin-top: 10rpx;">
+			:content-style="{fontSize: '14px',fontWeight:'400'}" confirm-color='#22C572' confirm-text='确定' title='登录提示'
+			showCancelButton='false' :content="content" @confirm="alertBtn" @cancel="cancelClick"></u-modal>
+	</view>
+	<!-- <view style="margin-top: 10rpx;">
 			<web-view src="https://datav.aliyuncs.com/share/01de6913a5761ab4d3171b1f0b3e0704"></web-view>
 		</view> -->
-		<!-- <view style='text-align:center;'>
+	<!-- <view style='text-align:center;'>
 				<navigator
 					url="/pages/sale/webview?can_share=false&url=https://liangxin.zthymaoyi.com/userAgreement.html"
 					class="path" hover-class="navigator-hover">《服务协议》</navigator>
@@ -60,7 +64,7 @@
 					url="/pages/sale/webview?can_share=false&url=https://liangxin.zthymaoyi.com/screctAgreement.html"
 					class="path" hover-class="navigator-hover">《隐私政策》</navigator>
 			</view> -->
-		<!-- <view class="guess-section-wrap">
+	<!-- <view class="guess-section-wrap">
 			<view class='flex justify-between'>
 				<view class='title Medium'>工厂价格</view>
 			</view>
@@ -84,7 +88,7 @@
 	</view>
 </template>
 <script>
-	import helper from '@/common/helper.js'; 
+	import helper from '@/common/helper.js';
 	import dragButton from "@/components/drag-button/drag-button.vue";
 	import {
 		mapState
@@ -99,14 +103,14 @@
 		data() {
 			return {
 				isShowAlert: false,
-				content: '您确定要退出吗?',
-				haveCompany:false,
+				content: '您尚未登录,是否立即登录?',
+				haveCompany: false,
 				scrollTop: 0,
 				inputShow: false,
 				modalName: '',
-				compName:'',
+				compName: '',
 				mycarStyle: '',
-				show:false,
+				show: false,
 				feild: undefined,
 				inputContent: '',
 				coverTransform: 'translateY(0px)',
@@ -123,7 +127,7 @@
 				gridCol: 4,
 				gridBorder: false,
 				username: "请更改昵称",
-				companyList:[],
+				companyList: [],
 				gridList: [{
 						num: 0,
 						name: '认证',
@@ -273,10 +277,10 @@
 			this.scrollTop = e.scrollTop;
 		},
 		onShow() {
-			if(uni.getStorageSync('compName')){
-				this.haveCompany =true
-			}else{
-				this.haveCompany =false
+			if (uni.getStorageSync('compName')) {
+				this.haveCompany = true
+			} else {
+				this.haveCompany = false
 			}
 			this.isShow();
 			uni.hideKeyboard()
@@ -324,24 +328,23 @@
 						// });
 					}
 				})
-				// debugger
-				if(!uni.getStorageSync('compName')){
+				if (!uni.getStorageSync('compName')) {
 					this.$api.doRequest('get', '/commonUser/getCompOwn', {
-				phone: this.userInfo.phone
-			}).then(res => {
+						phone: this.userInfo.phone
+					}).then(res => {
 						if (res.data.data) {
-							this.companyList=res.data.data
-							if(this.companyList.length>0){
-								this.compName=this.companyList[0].compName
+							this.companyList = res.data.data
+							if (this.companyList.length > 0) {
+								this.compName = this.companyList[0].compName
 								uni.setStorageSync('compName', this.companyList[0].compName)
 								this.haveCompany = true
 							}
 						}
 					})
-				}else{
-					this.compName=uni.getStorageSync('compName')
+				} else {
+					this.compName = uni.getStorageSync('compName')
 				}
-				
+
 			} else {
 				this.headUrl = "../../static/img/myimg/YongHu@3x.png"
 				this.username = "立即登录"
@@ -349,81 +352,80 @@
 			console.log("this.userInfo", this.userInfo)
 		},
 		methods: {
-			cancelClick() {
-				this.isShowAlert = false
-			},
-			goOpenService() {
-				uni.hideTabBarRedDot({
-					index: 3
-				})
-				uni.clearStorageSync();
-				this.$store.commit('logout')
-				this.$api.logout()
+			alertBtn() {
 				uni.navigateTo({
-					url: `/pages/public/login`
+					url: '/pages/public/login'
 				})
 			},
-			compconfirm(e){
-				
+			cancelClick() {
+				this.isShowAlert = false
+			},
+			compconfirm(e) {
+
 				var that = this
-				this.$api.doRequest('post','/commonUser/api/loginQuickly',{mobilePhone: this.userInfo.phone,companyName:this.companyList[e[0]].compName,
-				veriCode: "123456",}).then(res1 => {
-					if(res1.data.code==200){
+				this.$api.doRequest('post', '/commonUser/api/loginQuickly', {
+					mobilePhone: this.userInfo.phone,
+					companyName: this.companyList[e[0]].compName,
+					veriCode: "123456",
+				}).then(res1 => {
+					if (res1.data.code == 200) {
 						uni.setStorageSync('pcUserInfo', res1.data.data)
 						uni.setStorageSync('compName', that.companyList[e[0]].compName)
-						that.compName=that.companyList[e[0]].compName
+						that.compName = that.companyList[e[0]].compName
 						helper.getListByUserId()
 						that.$api.msg('切换成功')
-					}
-					else{
-						that.$api.doRequest('post','/commonUser/api/loginQuickly',{mobilePhone: '13333333333',companyName:this.companyList[e[0]].compName,
-						veriCode: "123456",}).then(res2 => {
+					} else {
+						that.$api.doRequest('post', '/commonUser/api/loginQuickly', {
+							mobilePhone: '13333333333',
+							companyName: this.companyList[e[0]].compName,
+							veriCode: "123456",
+						}).then(res2 => {
 							uni.setStorageSync('pcUserInfo', res2.data.data)
 							uni.setStorageSync('compName', that.companyList[e[0]].compName)
-							that.compName=that.companyList[e[0]].compName
+							that.compName = that.companyList[e[0]].compName
 							helper.getListByUserId()
 							that.$api.msg('切换成功')
 						})
 					}
-					
+
 				})
 			},
 			getRoles: function(role) {
 				let _roles = uni.getStorageSync('rolesList')
 				for (let i = 0; i < _roles.length; i++) {
 					if (_roles[i] == role) {
-						 return true
-					} 
+						return true
+					}
 				}
 				return false
 			},
-			isShow(){
-				for(let k = 0;k<this.gridList1.length;k++){
-					if(k==6){
+			isShow() {
+				for (let k = 0; k < this.gridList1.length; k++) {
+					if (k == 6) {
 						this.gridList1[k].show = this.getRoles('reportData.view')
-					}else if (k==7){
+					} else if (k == 7) {
 						this.gridList1[k].show = this.getRoles('monitoring.view')
 					}
 				}
 			},
 			smBtnClick() {
-				console.log(2)
 				if (!this.hasLogin) {
-					uni.showModal({
-						title: '登录提示',
-						content: '您尚未登录,是否立即登录?',
-						showCancel: true,
-						confirmText: '登录',
-						success: (e) => {
-							if (e.confirm) {
-								uni.navigateTo({
-									url: '/pages/public/login'
-								})
-							}
-						},
-						fail: () => {},
-						complete: () => {}
-					})
+					this.isShowAlert = true;
+					// uni.showModal({
+					// 	title: '登录提示',
+					// 	content: '您尚未登录,是否立即登录?',
+					// 	showCancel: true,
+					// 	confirmText: '登录',
+					// 	success: (e) => {
+					// 		if (e.confirm) {
+					// 			uni.navigateTo({
+					// 				url: '/pages/public/login'
+					// 			})
+					// 		}
+					// 	},
+					// 	fail: () => {},
+					// 	complete: () => {}
+					// })
 				} else {
 					uni.scanCode({
 						success: function(res) {
@@ -549,21 +551,22 @@
 					return;
 				}
 				if (!this.hasLogin) {
-					uni.showModal({
-						title: '登录提示',
-						content: '您尚未登录,是否立即登录?',
-						showCancel: true,
-						confirmText: '登录',
-						success: (e) => {
-							if (e.confirm) {
-								uni.navigateTo({
-									url: '/pages/public/login'
-								})
-							}
-						},
-						fail: () => {},
-						complete: () => {}
-					})
+					this.isShowAlert = true;
+					// uni.showModal({
+					// 	title: '登录提示',
+					// 	content: '您尚未登录,是否立即登录?',
+					// 	showCancel: true,
+					// 	confirmText: '登录',
+					// 	success: (e) => {
+					// 		if (e.confirm) {
+					// 			uni.navigateTo({
+					// 				url: '/pages/public/login'
+					// 			})
+					// 		}
+					// 	},
+					// 	fail: () => {},
+					// 	complete: () => {}
+					// })
 				} else {
 					if (item.url) {
 						uni.navigateTo({
@@ -574,21 +577,22 @@
 			},
 			setting() {
 				if (!this.hasLogin) {
-					uni.showModal({
-						title: '登录提示',
-						content: '您尚未登录,是否立即登录?',
-						showCancel: true,
-						confirmText: '登录',
-						success: (e) => {
-							if (e.confirm) {
-								uni.navigateTo({
-									url: '/pages/public/login'
-								})
-							}
-						},
-						fail: () => {},
-						complete: () => {}
-					})
+					this.isShowAlert = true;
+					// uni.showModal({
+					// 	title: '登录提示',
+					// 	content: '您尚未登录,是否立即登录?',
+					// 	showCancel: true,
+					// 	confirmText: '登录',
+					// 	success: (e) => {
+					// 		if (e.confirm) {
+					// 			uni.navigateTo({
+					// 				url: '/pages/public/login'
+					// 			})
+					// 		}
+					// 	},
+					// 	fail: () => {},
+					// 	complete: () => {}
+					// })
 				} else {
 					uni.navigateTo({
 						url: '/pages/user/setUp'
@@ -700,20 +704,22 @@
 	}
 </script>
 <style lang='scss' scoped>
-	.company{
-		position:fixed;
-		right:0;
-		top:13%;
-		background:url('../../static/img/qiyebeijing.png');
-		background-size:100%;
-		font-size:11px;
-		padding-bottom:5px;
-		padding-left:10px;
+	.company {
+		position: fixed;
+		right: 0;
+		top: 13%;
+		background: url('../../static/img/qiyebeijing.png');
+		background-size: 100%;
+		font-size: 11px;
+		padding-bottom: 5px;
+		padding-left: 10px;
 	}
-	.company .icon{
-		position:relative;
-		top:4px;
+
+	.company .icon {
+		position: relative;
+		top: 4px;
 	}
+
 	page {
 		background: #F8F9FC;
 	}

+ 1 - 0
store/index.js

@@ -121,6 +121,7 @@ const store = new Vuex.Store({
 			state.hasLogin = false;
 			state.userInfo = {};
 			uni.removeStorageSync('userInfo')
+			uni.removeStorageSync('pcUserInfo')
 		},
 		configfreightTransport(state,flag){
 			state.isConfigfreightTransport = flag

部分文件因为文件数量过多而无法显示