Browse Source

Merge branch 'dev' of http://git.zthymaoyi.com/gdc/yiliangyiyun-app into dev

gjy 3 years ago
parent
commit
3323a3a65b

+ 15 - 0
common/helper.js

@@ -0,0 +1,15 @@
+const selectContractNo = {}
+const detailData = {}
+const now = Date.now || function () {  
+    return new Date().getTime();  
+};  
+const isArray = Array.isArray || function (obj) {  
+    return obj instanceof Array;  
+};  
+
+export default {  
+	detailData,
+	selectContractNo,
+    now,  
+    isArray  
+}

+ 72 - 0
pages.json

@@ -756,6 +756,78 @@
             }
             
         }
+        ,{
+            "path" : "pages/erpbusiness/acquisitionInspection/acquisitionInspection",
+            "style" :                                                                                    
+            {
+                "navigationBarTitleText": "收购检斤",
+                "enablePullDownRefresh": false
+            }
+            
+        },
+		{
+		    "path" : "pages/erpbusiness/acquisitionInspection/warehouseWeighing",
+		    "style" :                                                                                    
+		    {
+		        "navigationBarTitleText": "出库检斤",
+		        "enablePullDownRefresh": false
+		    }
+		    
+		},
+		{
+		    "path" : "pages/erpbusiness/acquisitionInspection/grossWeightDetail",
+		    "style" :                                                                                    
+		    {
+		        "navigationBarTitleText": "毛重检斤",
+		        "enablePullDownRefresh": false
+		    }
+		    
+		},
+		{
+		    "path" : "pages/erpbusiness/acquisitionInspection/grossWeightDetail1",
+		    "style" :                                                                                    
+		    {
+		        "navigationBarTitleText": "毛重检斤",
+		        "enablePullDownRefresh": false
+		    }
+		    
+		},
+		{
+		    "path" : "pages/erpbusiness/acquisitionInspection/tareDetail",
+		    "style" :                                                                                    
+		    {
+		        "navigationBarTitleText": "皮重检斤",
+		        "enablePullDownRefresh": false
+		    }
+		    
+		},
+		{
+		    "path" : "pages/erpbusiness/acquisitionInspection/tareDetail1",
+		    "style" :                                                                                    
+		    {
+		        "navigationBarTitleText": "皮重检斤",
+		        "enablePullDownRefresh": false
+		    }
+		    
+		},
+		{
+		    "path" : "pages/erpbusiness/acquisitionInspection/tareDetail2",
+		    "style" :                                                                                    
+		    {
+		        "navigationBarTitleText": "检斤详情",
+		        "enablePullDownRefresh": false
+		    }
+		    
+		},
+		{
+		    "path" : "pages/erpbusiness/acquisitionInspection/selectContractNo",
+		    "style" :                                                                                    
+		    {
+		        "navigationBarTitleText": "选择合同",
+		        "enablePullDownRefresh": false
+		    }
+		    
+		}
     ],
 	"subpackages": [{
 			"root": "pageA",

+ 91 - 35
pages/erpbusiness/QRCode/QRCode.vue

@@ -1,7 +1,8 @@
 <template>
-	<view class="content">
+	<view class="content" @click="maskClick">
 		<view class="qrcode">
-			<uqrcode ref="uqrcode"></uqrcode>
+			<!-- <uqrcode ref="uqrcode"></uqrcode> -->
+			<img :src="imgSrc" alt="" class="img">
 			<view class="qrcode-text">客户扫码</view>
 		</view>
 	</view>
@@ -14,49 +15,104 @@
 	export default {
 		data() {
 			return {
-
+				imgSrc: ""
 			};
 		},
 		onReady() {
-			console.log(this.userInfo)
-			this.$refs
-				.uqrcode
-				.make({
-					size: 300,
-					margin:50,
-					text: JSON.stringify(this.userInfo.userName)
-				})
-				.then(res => {
-					// 返回的res与uni.canvasToTempFilePath返回一致
-					console.log(res)
+			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'
+									})
+								}
+							}
+						})
+					} else {
+						this.getQRCode()
+					}
 				})
+				.catch(res => {
+					if (res.message) {
+						uni.showToast({
+							title: res.message,
+							icon: 'none',
+							duration: 2000
+						})
+					}
+				});
+			// console.log(this.userInfo)
+			// this.$refs
+			// 	.uqrcode
+			// 	.make({
+			// 		size: 300,
+			// 		margin:50,
+			// 		text: JSON.stringify({
+			// 			userName:this.userInfo.userName,
+			// 		})
+			// 	})
+			// 	.then(res => {
+			// 		// 返回的res与uni.canvasToTempFilePath返回一致
+			// 		console.log(res)
+			// 	})
 		},
 		computed: {
 			...mapState(['hasLogin', 'userInfo'])
 		},
-		methods: {}
+		methods: {
+			maskClick() {
+				uni.navigateBack(-1)
+			},
+			getQRCode() {
+				this.$api.doRequest('get', '/identityAuthenticationInfo/generateQRCodeImage').then(res => {
+						console.log(res)
+						this.imgSrc = res.data.data
+					})
+					.catch(res => {
+						if (res.message) {
+							uni.showToast({
+								title: res.message,
+								icon: 'none',
+								duration: 2000
+							})
+						}
+					});
+			}
+		}
 	}
 </script>
 
 <style lang="scss">
-.content{
-	background: rgba(0, 0, 0, 0.4);
-	height: 100vh;
-	display: flex;
-	justify-content: center;
-	align-items: center;
-}
-.qrcode-text{
-	text-align: center;
-	position: relative;
-	font-size: 24rpx;
-	font-weight: 400;
-	color: #878C9C;
-	top: -60rpx;
-}
-// .qrcode{
-// 	position: absolute;
-// 	top: 0;
-	
-// }
+	.content {
+		background: rgba(0, 0, 0, 0.4);
+		height: 100vh;
+		display: flex;
+		justify-content: center;
+		align-items: center;
+	}
+
+	.qrcode-text {
+		text-align: center;
+		position: relative;
+		font-size: 24rpx;
+		font-weight: 400;
+		color: #878C9C;
+		top: -60rpx;
+	}
+
+	.qrcode {
+		position: fixed;
+		top: 30%;
+		margin: auto;
+	}
+
+	.img {
+		width: 400rpx;
+	}
 </style>

+ 283 - 0
pages/erpbusiness/acquisitionInspection/acquisitionInspection.vue

@@ -0,0 +1,283 @@
+<template>
+	<view class="content">
+		<view class="top">
+			<u-search placeholder="输入编号/客户号/车牌号" v-model="inputKeyword" @search="getList()"></u-search>
+			<view class="dropdown">
+				<view class="left" @click="selectWarehouse">
+					<view>{{warehouseName}}</view>
+					<u-icon name="arrow-down" color=""></u-icon>
+				</view>
+				<view class="right">
+					<u-icon name="checkmark-circle-fill" color="#22C572"></u-icon>
+					<view class="default">默认</view>
+				</view>
+			</view>
+			<u-select v-model="isShowWarehouse" :default-value='[0]' :list="warehouseList" @confirm="confirmWarehouse">
+			</u-select>
+		</view>
+		<view class="middle">
+			<view class="item-style" v-for="(item,index) in dataList" :key="index">
+				<view class="row1">
+					<view class="row1-left">
+						<view class="left status1" v-if="item.status=='已质检'">检</view>
+						<view class="left status2" v-if="item.status=='已称皮重'">皮</view>
+						<view class="left status3" v-if="item.status=='已称毛重'">毛</view>
+						<view>
+							<view class="top-title">
+								{{item.number}}
+							</view>
+							<view class="bottom">{{item.updateDate}}</view>
+						</view>
+					</view>
+					<view class="right">{{item.customer}}</view>
+				</view>
+				<view class="row2" v-if="item.paymentManagement">
+					<view>{{item.paymentManagement.customerName}}</view>
+					<view>{{item.paymentManagement.carNo}}</view>
+					<view>{{item.paymentManagement.goodsName}}({{item.waterContent}}水)</view>
+				</view>
+				<view class="row3">
+					<view class="row3-item">
+						<view class="left">毛</view>
+						<view>{{item.grossWeight?item.grossWeight:'未称重'}}</view>
+					</view>
+					<view class="row3-item">
+						<view class="left">皮</view>
+						<view>{{item.tare?item.tare:'未称重'}}</view>
+					</view>
+					<view class="row3-item">
+						<view class="left">净</view>
+						<view>{{item.netWeight?item.netWeight:'未称重'}}</view>
+					</view>
+				</view>
+				<view class="row4">
+					<view v-if="item.status!='已称皮重'" class="right" @click="grossWeightClick(item)">毛重</view>
+					<view v-if="!(item.paymentManagement&&item.paymentManagement.status=='已收款')||
+					!(item.paymentManagement&&item.paymentManagement.status=='部分收款')
+					" class="right" @click="tareClick(item)">皮重</view>
+				</view>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+				inputKeyword: '',
+				warehouseName: '',
+				isShowWarehouse: false,
+				warehouseList: [],
+				dataList: []
+			}
+		},
+		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'
+									})
+								}
+							}
+						})
+					} else {
+						this.compId = uni.getStorageSync('pcUserInfo').compId
+						console.log("compId", this.compId)
+						this.loadData()
+					}
+				})
+				.catch(res => {
+					if (res.message) {
+						uni.showToast({
+							title: res.message,
+							icon: 'none',
+							duration: 2000
+						})
+					}
+				});
+		},
+		methods: {
+			loadData() {
+				this.$api.doRequest('get', '/warehouseBaseInfo/selectWarehouseSelf', {
+					compId: this.compId
+				}).then(res => {
+					console.log("warehouseBaseInfo", res)
+					let _resData = res.data.data
+					for (let i = 0; i < _resData.length; i++) {
+						let _obj = {
+							"label": _resData[i].warehouseName,
+							"value": _resData[i].id,
+						}
+						this.warehouseList.push(_obj)
+					}
+					this.warehouseName = this.warehouseList[0].label
+					this.getList()
+				})
+			},
+			//获取列表
+			getList() {
+				this.$api.doRequest('get', '/weighingManagement/selectWeighingManagement', {
+					compId: this.compId,
+					currentPage: 1,
+					pageSize: 10,
+					searchKeyWord: this.inputKeyword,
+					warehouseName: this.warehouseName,
+					managementType: 1,
+				}).then(res => {
+					this.dataList = res.data.data.records
+					console.log(res.data.data.records)
+					console.log("--------------------------------")
+					console.log("this.dataList",this.dataList)
+				})
+			},
+			selectWarehouse() {
+				this.isShowWarehouse = true
+			},
+			confirmWarehouse(e) {
+				console.log(e)
+				this.warehouseName = e[0].label
+				this.dataList.warehouseName = e[0].label;
+				this.getList()
+			},
+			//毛重
+			grossWeightClick(val) {
+				console.log(val)
+				uni.navigateTo({
+					url: './grossWeightDetail?detailData=' + JSON.stringify(val)
+				})
+			},
+			tareClick(val) {
+				uni.navigateTo({
+					url: './tareDetail?detailData=' + JSON.stringify(val)
+				})
+			}
+		}
+	}
+</script>
+
+<style scoped lang="scss">
+	.top {
+		background: white;
+		padding: 20rpx;
+		border-radius: 0 0 20rpx 40rpx;
+	}
+
+	.dropdown {
+		display: flex;
+		justify-content: space-between;
+		align-items: center;
+		position: relative;
+		margin: 20rpx 0;
+		padding: 0 13rpx;
+
+		.right,
+		.left {
+			display: flex;
+			align-items: center;
+		}
+	}
+
+	.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;
+			border-radius: 10rpx;
+			padding: 10rpx 0;
+			justify-content: space-evenly;
+			margin: 20rpx;
+			color: #878C9C;
+		}
+
+		.row3 {
+			display: flex;
+			margin-top: 30rpx;
+			.row3-item {
+				display: flex;
+				margin-right: 40rpx;
+
+				.left {
+					background: #22C572;
+					border-radius: 10rpx;
+					padding: 2rpx 10rpx;
+					box-sizing: border-box;
+					color: white;
+					font-size: 12px;
+					margin-right: 15rpx;
+				}
+			}
+		}
+
+		.row4 {
+			display: flex;
+			justify-content: flex-end;
+			margin-top: 10px;
+
+			.right {
+				border: 1px solid #CDCDCD;
+				border-radius: 45rpx;
+				padding: 10rpx 30rpx;
+				margin-left: 20rpx;
+			}
+		}
+
+	}
+	.status1,.status2,.status3{
+		padding: 8rpx 12rpx;
+		border-radius: 50%;
+		color: white;
+	}
+	.status1{
+		background: #FD714F;
+	}
+	.status2{
+		background: #22C572;
+	}
+	.status3{
+		background: #3296FA;
+	}
+</style>

+ 135 - 0
pages/erpbusiness/acquisitionInspection/grossWeightDetail.vue

@@ -0,0 +1,135 @@
+<template>
+	<view class="warp">
+		<view class="title">
+			基本信息
+		</view>
+		<view class="content">
+			<view class="row">
+				<view class="left">仓库</view>
+				<view class="right">{{detailData.warehouseName}}</view>
+			</view>
+			<view class="row">
+				<view class="left">编号</view>
+				<view class="right">{{detailData.number}}</view>
+			</view>
+			<view class="row">
+				<view class="left">客户</view>
+				<view class="right">{{detailData.customer}}</view>
+			</view>
+			<view class="row">
+				<view class="left">车牌号</view>
+				<view class="right">{{detailData.carNumber}}</view>
+			</view>
+			<view class="row">
+				<view class="left">仓位号</view>
+				<view class="right">{{detailData.binNumber}}</view>
+			</view>
+			<view class="row">
+				<view class="left">囤位号</view>
+				<view class="right">{{detailData.storageNumber}}</view>
+			</view>
+			<view class="row">
+				<view class="left">货名</view>
+				<view class="right">{{detailData.goodsName}}</view>
+			</view>
+			<view class="row row-bottom">
+				<view class="left">毛重</view>
+				<input class="right-bottom" placeholder="输入毛重" v-model="detailData.grossWeight"></input>
+			</view>
+		</view>
+		<u-button type="primary" class="submit" @click="submit">提交</u-button>
+		<u-toast ref="uToast" />
+	</view>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+				detailData: {
+					grossWeight:''
+				}
+			}
+		},
+		onShow() {},
+		onLoad(options) {
+			this.detailData = JSON.parse(options.detailData)
+			console.log(this.detailData)
+		},
+		methods: {
+			submit(){
+				let that = this
+				uni.showModal({
+					content:"确定提交检斤信息?",
+					success:function(res) {
+						   if (res.confirm) {
+						           that.$api.doRequest('post', '/weighingManagement/api/editGrossWeight',that.detailData).then(res => {
+						           	if(res.data.code==200){
+						           		that.$refs.uToast.show({
+						           			title: '提交成功',
+						           			type: 'success',
+						           			url: '/pages/erpbusiness/acquisitionInspection/acquisitionInspection'
+						           		})
+						           	}else{
+						           		that.$refs.uToast.show({
+						           			title: '提交失败',
+						           			type: 'error',
+						           		})
+						           	}
+						           })
+						        } else if (res.cancel) {
+						            console.log('用户点击取消');
+						        }
+						console.log(that.detailData)
+				
+					}
+				})
+			}
+		}
+	}
+</script>
+
+<style scoped lang="scss">
+	uni-page-body{
+		overflow: hidden;
+	}
+	.warp{
+		background: white;
+		margin: 20rpx;
+		padding: 20rpx;
+		border-radius: 20rpx;
+		.title{
+			font-size: 28rpx;
+			font-weight: 500;
+			color: #333333;
+		}
+	}
+.content{
+	.row{
+		display: flex;
+		justify-content: space-between;
+		border-bottom: 1px solid #EEEEEE;
+		padding:31rpx 0;
+		.right{
+			font-size: 28rpx;
+			font-weight: 600;
+			color: #333333;
+		}
+	}
+	.row-bottom{
+		border: 0;
+		.right-bottom{
+			width: 300rpx;
+			text-align: right;
+		}
+	}
+}
+.submit{
+		position: fixed;
+		bottom:40rpx;
+		width: 90%;
+		background: #22C572;
+		border-radius: 50rpx;
+		
+	}
+</style>

+ 196 - 0
pages/erpbusiness/acquisitionInspection/grossWeightDetail1.vue

@@ -0,0 +1,196 @@
+<template>
+	<view class="warp">
+		<view class="content">
+				<view class="title">
+					基本信息
+				</view>
+			<view class="row">
+				<view class="left">仓库</view>
+				<view class="right">仓库仓库仓库仓库仓库1</view>
+			</view>
+			<view class="row">
+				<view class="left">合同编号</view>
+				<view class="right">仓库仓库仓库仓库仓库1</view>
+			</view>
+			<view class="row">
+				<view class="left">货名</view>
+				<view class="right">仓库仓库仓库仓库仓库1</view>
+			</view>
+			<view class="row">
+				<view class="left">车牌号</view>
+				<view class="right">仓库仓库仓库仓库仓库1</view>
+			</view>
+			<view class="row">
+				<view class="left">仓位号</view>
+				<view class="right">仓库仓库仓库仓库仓库1</view>
+			</view>
+			<view class="row">
+				<view class="left">囤位号</view>
+				<view class="right">仓库仓库仓库仓库仓库1</view>
+			</view>
+			<view class="row">
+				<view class="left">出库类型</view>
+				<view class="right">仓库仓库仓库仓库仓库1</view>
+			</view>
+			<view class="row">
+				<view class="left">货名</view>
+				<view class="right">仓库仓库仓库仓库仓库1</view>
+			</view>
+		</view>
+		<view class="content1">
+			<view class="title">
+				检斤信息
+			</view>
+			<view class="row row-bottom">
+				<view class="left">皮重(公斤)</view>
+				<input class="right-bottom" placeholder="输入皮重"></input>
+			</view>
+			<view class="row row-bottom">
+				<view class="left">毛重(公斤)</view>
+				<input class="right-bottom" placeholder="输入毛重"></input>
+			</view>
+			<view class="row row-bottom" style="border: 0;">
+				<view class="left">净重(公斤)</view>
+				<input 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>
+		<u-toast ref="uToast"/>
+		<u-button type="primary" class="submit" @click="submit">提交</u-button>
+
+	</view>
+</template>
+
+<script>
+	import upload from '@/components/upload.vue';
+	export default {
+		components: {
+			upload
+		},
+		data() {
+			return {
+				action: this.$uploadUrl,
+				maxSize: 50 * 1024 * 1024, //限制文件大小 50M
+				btnLoading: false, //防止重复点击
+				isAdd: true,
+				detailData: {
+					name: ""
+				}
+			}
+		},
+		onShow() {},
+		onLoad(options) {
+			// this.detailData = JSON.parse(options.detailData)
+		},
+		methods: {
+			filterFileType(index, lists) {
+				if (lists[index].fileType != 'jpg' && lists[index].fileType != 'png' && lists[index].fileType != 'gif') {
+					lists.splice(index, 1);
+					// 当前文件不支持
+					uni.showModal({
+						title: '暂不支持当前图片类型',
+						showCancel: false
+					});
+				} else {
+					this.isAdd = false;
+				}
+			},
+			getImgUrl(res) {
+				console.log(res)
+				console.log('------------res-----------')
+			},
+			onError(error) {
+				alert(error)
+				console.log('------------error-----------')
+				console.log(error)
+			},
+			onProgress(e) {
+				console.log(e)
+			},
+			onRemove(index) {},
+			submit(){
+				let that = this
+				uni.showModal({
+					content:"确定提交检斤信息?",
+					success() {
+						that.$refs.uToast.show({
+						title: '提交成功',
+						type: 'success',
+					})
+					}
+				})
+			}
+		}
+	}
+</script>
+
+<style scoped lang="scss">
+	uni-page-body {
+		overflow: hidden;
+	}
+
+	.warp {
+		margin: 10rpx;
+		padding: 20rpx 20rpx 140rpx 20rpx;
+	}
+
+	.content,
+	.content1,
+	.content2
+	{
+		border-radius: 20rpx;
+		background: white;
+		padding: 20rpx;
+		.title{
+			font-size: 28rpx;
+			font-weight: 600;
+			color: #333333;
+		}
+		.row {
+			display: flex;
+			justify-content: space-between;
+			border-bottom: 1px solid #EEEEEE;
+			padding: 21rpx 0;
+
+			.right {
+				font-size: 28rpx;
+				font-weight: 600;
+				color: #333333;
+			}
+		}
+
+		.row-bottom {
+
+			// border: 0;
+			.right-bottom {
+				width: 300rpx;
+				text-align: right;
+			}
+		}
+	}
+	.content1{
+		margin-top: 20rpx;
+	}
+	.content2{
+		margin-top: 10px;
+		display: flex;
+		align-items: center;
+		.left{
+			margin-right: 20px;
+		}
+	}
+
+	.submit {
+		position: fixed;
+		bottom: 40rpx;
+		width: 90%;
+		background: #22C572;
+		border-radius: 50rpx;
+
+	}
+</style>

+ 119 - 0
pages/erpbusiness/acquisitionInspection/selectContractNo.vue

@@ -0,0 +1,119 @@
+<template>
+	<view class="warp">
+		<view class="content1">
+			<u-search placeholder="输入合同编号" :show-action="false" v-model="inputKeyword"></u-search>
+		</view>
+		<view class="content2" v-if="!inputKeyword">
+			<view class="title">最新合同</view>
+			<view class="item-contnet">
+				<view class="item-list" v-for="(item,index) in newList" :key="index" @click="confirm(item)">
+					{{item.contractNo}}
+				</view>
+			</view>
+		</view>
+		<view class="content3" v-if="inputKeyword">
+			<view class="search-item-list" v-for="(item,index) in filterNewList" :key="index" @click="confirm(item)">
+				{{item.contractNo}}
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	 import helper from '@/common/helper.js'; 
+	export default {
+		data() {
+			return {
+				inputKeyword: '',
+				newList: [],
+				filterNewList: [],
+				compId: ''
+			}
+		},
+		onShow() {},
+		onLoad(options) {
+			this.compId = options.compId
+			console.log(helper.selectContractNo); 
+			this.getContractNoList()
+		},
+		watch: {
+			inputKeyword(val) {
+				this.filterNewList = this.newList.filter(function(item) {
+					if (item.contractNo.indexOf(val) > -1) {
+						return item
+					}
+				})
+			}
+		},
+		methods: {
+			confirm(item){
+				uni.navigateTo({
+					url:'tareDetail1',
+					  success: function(res) {
+					   helper.selectContractNo = item
+					  }
+				})
+			},
+			getContractNoList() {
+				this.$api.doRequest('get', '/warehouseBaseInfo/selectContractNoList', {
+					compId: this.compId,
+					flag: 5,
+				}).then(res => {
+					if (res.data.code == 200) {
+						console.log(res)
+						this.newList = res.data.data
+					}
+				})
+			},
+		}
+	}
+</script>
+
+<style scoped lang="scss">
+	.content1 {
+		background: white;
+		padding: 20rpx;
+		border-radius: 0 0 20rpx 20rpx;
+	}
+
+	.content2 {
+		background: white;
+		margin-top: 20rpx;
+		padding: 20rpx;
+		border-radius: 20rpx 20rpx 0 0;
+
+		.title {
+			font-size: 28rpx;
+			font-weight: 400;
+			color: #AFB3BF;
+		}
+
+		.item-contnet {
+			display: flex;
+			flex-wrap: wrap;
+			justify-content: space-between;
+		}
+
+		.item-list {
+			width: 45%;
+			background: #F5F6F9;
+			margin: 20rpx 0;
+			padding: 10rpx 15rpx;
+			border-radius: 30rpx;
+			text-align: center;
+		}
+	}
+
+	.content3 {
+		height: calc(100vh - 192rpx);
+		background: white;
+		padding: 20rpx;
+		box-sizing: border-box;
+	}
+
+	.search-item-list {
+		margin: 20rpx;
+		border-bottom: 1px solid #EEEEEE;
+		padding-bottom: 20rpx;
+	}
+</style>

+ 153 - 0
pages/erpbusiness/acquisitionInspection/tareDetail.vue

@@ -0,0 +1,153 @@
+<template>
+	<view class="warp">
+		<view class="title">
+			基本信息
+		</view>
+		<view class="content">
+			<view class="row">
+				<view class="left">仓库</view>
+				<view class="right">{{detailData.warehouseName}}</view>
+			</view>
+			<view class="row">
+				<view class="left">编号</view>
+				<view class="right">{{detailData.number}}</view>
+			</view>
+			<view class="row">
+				<view class="left">客户</view>
+				<view class="right">{{detailData.customer}}</view>
+			</view>
+			<view class="row">
+				<view class="left">车牌号</view>
+				<view class="right">{{detailData.carNumber}}</view>
+			</view>
+			<view class="row">
+				<view class="left">仓位号</view>
+				<view class="right">{{detailData.binNumber}}</view>
+			</view>
+			<view class="row">
+				<view class="left">囤位号</view>
+				<view class="right">{{detailData.storageNumber}}</view>
+			</view>
+			<view class="row">
+				<view class="left">货名</view>
+				<view class="right">{{detailData.goodsName}}</view>
+			</view>
+			<view class="row row-bottom">
+				<view class="left">毛重(公斤)</view>
+				<view class="right">{{detailData.grossWeight}}</view>
+			</view>
+			<view class="row row-bottom">
+				<view class="left">皮重(公斤)</view>
+				<input class="right-bottom" placeholder="输入皮重" v-model="tare"></input>
+			</view>
+			<view class="row row-bottom">
+				<view class="left">扣杂(公斤)</view>
+				<input class="right-bottom" placeholder="输入扣杂" v-model="buckleMiscellaneous"></input>
+			</view>
+			<view class="row row-bottom" style="border: 0;">
+				<view class="left">净重(公斤)</view>
+				<input class="right-bottom" disabled placeholder="自动计算" v-model="detailData.netWeight"></input>
+			</view>
+		</view>
+		<u-button type="primary" class="submit" @click="submit">提交</u-button>
+		<u-toast ref="uToast" />
+	</view>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+				detailData: {},
+				tare:0,
+				buckleMiscellaneous:0
+			}
+		},
+		onShow() {},
+		onLoad(options) {
+			this.detailData = JSON.parse(options.detailData)
+		},
+		watch:{
+			tare(val){
+				console.log(val)
+				this.detailData.tare = val
+				this.detailData.netWeight = parseFloat(this.detailData.grossWeight)-parseFloat(this.detailData.tare)-parseFloat(this.detailData.buckleMiscellaneous)
+			},
+			buckleMiscellaneous(val){
+				this.detailData.buckleMiscellaneous = val
+				this.detailData.netWeight = parseFloat(this.detailData.grossWeight)-parseFloat(this.detailData.tare)-parseFloat(this.detailData.buckleMiscellaneous)
+			}
+		},
+		methods: {
+			submit(){
+				let that = this;
+				uni.showModal({
+					content:"确定提交检斤信息?",
+					success() {
+						debugger
+						console.log(that.detailData)
+						that.$api.doRequest('post', '/weighingManagement/api/editTare',that.detailData).then(res => {
+							if(res.data.code==200){
+								that.$refs.uToast.show({
+									title: '提交成功',
+									type: 'success',
+									url: '/pages/erpbusiness/acquisitionInspection/acquisitionInspection'
+								})
+							}else{
+								that.$refs.uToast.show({
+									title: '提交失败',
+									type: 'error',
+								})
+							}
+						})
+					}
+				})
+			}
+		}
+	}
+</script>
+
+<style scoped lang="scss">
+	uni-page-body{
+		overflow: hidden;
+	}
+	.warp{
+		background: white;
+		margin: 20rpx;
+		padding: 20rpx;
+		border-radius: 20rpx;
+		.title{
+			font-size: 28rpx;
+			font-weight: 500;
+			color: #333333;
+		}
+	}
+.content{
+	.row{
+		display: flex;
+		justify-content: space-between;
+		border-bottom: 1px solid #EEEEEE;
+		padding:21rpx 0;
+		.right{
+			font-size: 28rpx;
+			font-weight: 600;
+			color: #333333;
+		}
+	}
+	.row-bottom{
+		// border: 0;
+		.right-bottom{
+			width: 300rpx;
+			text-align: right;
+		}
+	}
+}
+.submit{
+		position: fixed;
+		bottom:40rpx;
+		width: 90%;
+		background: #22C572;
+		border-radius: 50rpx;
+		
+	}
+</style>

+ 189 - 0
pages/erpbusiness/acquisitionInspection/tareDetail1.vue

@@ -0,0 +1,189 @@
+<template>
+	<view class="warp">
+		<view class="content">
+			<view class="title">
+				基本信息
+			</view>
+			<view class="row">
+				<view class="left">仓库</view>
+				<view class="right">{{detailData.warehouseName}}</view>
+			</view>
+			<view class="row" @click="contractNoClick">
+				<view class="left">合同编号</view>
+				<view class="right">仓库仓库仓库仓库仓库1></view>
+			</view>
+			<view class="row">
+				<view class="left">货名</view>
+				<view class="right">仓库仓库仓库仓库仓库1</view>
+			</view>
+			<view class="row" style="text-align: right;">
+				<view class="left">车牌号</view>
+				<input class="right-bottom" placeholder="输入车牌号"></input>
+			</view>
+			<view class="row" @click="binNoClick">
+				<view class="left">仓位号</view>
+				<view class="right">仓库仓库仓库仓库仓库1></view>
+			</view>
+			<view class="row">
+				<view class="left">囤位号</view>
+				<view class="right">仓库仓库仓库仓库仓库1</view>
+			</view>
+			<view class="row row-bottom" @click="issueTypeClick">
+				<view class="left">出库类型</view>
+				<view class="right">{{issueTypeVal}}></view>
+			</view>
+		</view>
+		<div class="content1">
+			<view class="title">
+				检斤信息
+			</view>
+			<view class="row row-bottom">
+				<view class="left">皮重(公斤)</view>
+				<input class="right-bottom" placeholder="输入毛重"></input>
+			</view>
+		</div>
+		<!-- <u-select v-model="isShowContractNo" :list="contractNoList" @confirm="confirmContractNo"></u-select> -->
+		<u-select v-model="isShowBinNo" :list="binNoList" @confirm="confirmBinNo"></u-select>
+		<u-select v-model="isShowIssueType" :list="issueTypeList" @confirm="confirmIssueTypeNo"></u-select>
+		<u-button type="primary" class="submit" @click="submit">提交</u-button>
+
+	</view>
+</template>
+
+<script>
+	import helper from '@/common/helper.js'; 
+	export default {
+		data() {
+			return {
+				// isShowContractNo: false,
+				isShowBinNo: false,
+				isShowIssueType: false,
+				issueTypeVal: "销售出库",
+				detailData: {},
+				id:'',
+				contractNoList: [],
+				binNoList: [],
+				issueTypeList: [{
+						value: '1',
+						label: '销售出库'
+					},
+					{
+						value: '2',
+						label: '移库出库'
+					},
+					{
+						value: '3',
+						label: '暂存出库'
+					},
+					{
+						value: '4',
+						label: '贸易服务出库'
+					},
+				]
+			}
+		},
+		onShow() {},
+		onLoad(options) {
+			console.log(helper.detailData); 
+			if(helper.selectContractNo){
+				
+			}
+			this.id = helper.detailData.id
+			this.getWeighingManagement()
+		},
+		methods: {
+			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
+						}
+					})
+			},
+			contractNoClick() {
+				uni.navigateTo({
+					url:"selectContractNo?compId="+this.detailData.compId
+				})
+			},
+			binNoClick() {
+				this.isShowBinNo = true
+			},
+			issueTypeClick() {
+				this.isShowIssueType = true
+			},
+			confirmContractNo(e) {},
+			confirmBinNo(e) {},
+			confirmIssueTypeNo(e) {
+				console.log(e)
+				this.issueTypeVal = e[0].label
+			},
+			submit(){
+				uni.showModal({
+					content:"确定提交检斤信息?",
+					success() {
+						console.log("提交")
+					}
+				})
+			}
+		},
+	}
+</script>
+
+<style scoped lang="scss">
+	uni-page-body {
+		overflow: hidden;
+	}
+
+	.warp {
+		margin: 20rpx;
+	}
+
+	.content,
+	.content1 {
+		border-radius: 20rpx;
+		background: white;
+		padding: 20rpx;
+
+		.title {
+			font-size: 28rpx;
+			font-weight: 600;
+			color: #333333;
+		}
+
+		.row {
+			display: flex;
+			justify-content: space-between;
+			border-bottom: 1px solid #EEEEEE;
+			padding: 31rpx 0;
+
+			.right {
+				font-size: 28rpx;
+				font-weight: 600;
+				color: #333333;
+			}
+		}
+
+		.row-bottom {
+			border: 0;
+
+			.right-bottom {
+				width: 300rpx;
+				text-align: right;
+			}
+		}
+	}
+
+	.content1 {
+		margin-top: 20rpx;
+	}
+
+	.submit {
+		position: fixed;
+		bottom: 40rpx;
+		width: 90%;
+		background: #22C572;
+		border-radius: 50rpx;
+
+	}
+</style>

+ 133 - 0
pages/erpbusiness/acquisitionInspection/tareDetail2.vue

@@ -0,0 +1,133 @@
+<template>
+	<view class="warp">
+		<view class="content">
+				<view class="title">
+					基本信息
+				</view>
+			<view class="row">
+				<view class="left">仓库</view>
+				<view class="right">仓库仓库仓库仓库仓库1</view>
+			</view>
+			<view class="row">
+				<view class="left">合同编号</view>
+				<view class="right">仓库仓库仓库仓库仓库1</view>
+			</view>
+			<view class="row">
+				<view class="left">货名</view>
+				<view class="right">仓库仓库仓库仓库仓库1</view>
+			</view>
+			<view class="row">
+				<view class="left">车牌号</view>
+				<view class="right">仓库仓库仓库仓库仓库1</view>
+			</view>
+			<view class="row">
+				<view class="left">仓位号</view>
+				<view class="right">仓库仓库仓库仓库仓库1</view>
+			</view>
+			<view class="row">
+				<view class="left">囤位号</view>
+				<view class="right">仓库仓库仓库仓库仓库1</view>
+			</view>
+			<view class="row row-bottom">
+				<view class="left">出库类型</view>
+				<view class="right-bottom">仓库仓库仓库仓库仓库1</view>
+			</view>
+		</view>
+		<view class="content1">
+			<view class="title">
+				检斤信息
+			</view>
+			<view class="row">
+				<view class="left">毛重(公斤)</view>
+				<view class="right">仓库仓库仓库仓库仓库1</view>
+			</view>
+			<view class="row">
+				<view class="left">皮重(公斤)</view>
+				<view class="right">仓库仓库仓库仓库仓库1</view>
+			</view>
+			<view class="row row-bottom" style="border: 0;">
+				<view class="left">净重(公斤)</view>
+				<view class="right">仓库仓库仓库仓库仓库1</view>
+			</view>
+		</view>
+		<view class="content2">
+			<view class="title">
+				磅单照片
+			</view>
+			<view>
+				<image class="img" src="../../../static/img/authentication/cert-personal@3x.png" mode=""></image>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+				detailData: {
+					name: ""
+				}
+			}
+		},
+		onShow() {},
+		onLoad(options) {
+			// this.detailData = JSON.parse(options.detailData)
+		},
+		methods: {
+
+		}
+	}
+</script>
+
+<style scoped lang="scss">
+	uni-page-body{
+		overflow: hidden;
+	}
+	.warp{
+		margin: 20rpx;
+	}
+.content,.content1,.content2{
+	border-radius: 20rpx;
+	background: white;
+	padding: 20rpx;
+	.title{
+		font-size: 28rpx;
+		font-weight: 600;
+		color: #333333;
+	}
+	.row{
+		display: flex;
+		justify-content: space-between;
+		border-bottom: 1px solid #EEEEEE;
+		padding:21rpx 0;
+		.right{
+			font-size: 28rpx;
+			font-weight: 600;
+			color: #333333;
+		}
+	}
+	.row-bottom{
+		border: 0;
+		.right-bottom{
+			width: 300rpx;
+			text-align: right;
+		}
+	}
+}
+.content1,.content2{
+	margin-top: 10rpx;
+}
+.img{
+	width: 282rpx;
+	height: 282rpx;
+}
+.submit{
+		position: fixed;
+		bottom:40rpx;
+		width: 90%;
+		background: #22C572;
+		border-radius: 50rpx;
+		
+	}
+</style>

+ 332 - 0
pages/erpbusiness/acquisitionInspection/warehouseWeighing.vue

@@ -0,0 +1,332 @@
+<template>
+	<view class="content">
+		<view class="top">
+			<u-search placeholder="输入编号/客户号/车牌号" v-model="inputKeyword" @search="getList()"></u-search>
+			<view class="dropdown">
+				<view class="left" @click="selectWarehouse">
+					<view>{{warehouseName}}</view>
+					<u-icon name="arrow-down" color=""></u-icon>
+				</view>
+				<view class="right">
+					<u-icon name="checkmark-circle-fill" color="#22C572"></u-icon>
+					<view class="default">默认</view>
+				</view>
+			</view>
+			<u-select v-model="isShowWarehouse" :list="warehouseList" @confirm="confirmWarehouse"></u-select>
+		</view>
+		<view class="middle">
+			<view class="item-style" v-for="(item,index) in dataList" :key="index" @click="toDetail">
+				<view class="row1">
+					<view class="row1-left">
+						<view class="left status1" v-if="item.status=='已质检'">检</view>
+						<view class="left status2" v-if="item.status=='已称皮重'">皮</view>
+						<view class="left status3" v-if="item.status=='已称毛重'">毛</view>
+						<view>
+							<view class="top-title">
+								{{item.contractNo}}
+							</view>
+							<view class="bottom">{{item.updateDate}}</view>
+						</view>
+					</view>
+					<view class="right">{{item.customer}}</view>
+				</view>
+				<view class="row2" v-if="item.paymentManagement">
+					<view>{{item.paymentManagement.customerName}}</view>
+					<view>{{item.paymentManagement.carNo}}</view>
+					<view>{{item.paymentManagement.goodsName}}({{item.waterContent}}水)</view>
+				</view>
+				<view class="row3">
+					<view class="row3-item">
+						<view class="left">皮</view>
+						<view>{{item.tare?item.tare:'未称重'}}</view>
+					</view>
+					<view class="row3-item">
+						<view class="left">毛</view>
+						<view>{{item.grossWeight?item.grossWeight:'未称重'}}</view>
+					</view>
+					<view class="row3-item">
+						<view class="left">净</view>
+						<view>{{item.netWeight?item.netWeight:'未称重'}}</view>
+					</view>
+				</view>
+				<view class="row4">
+					<view v-if="item.status!='已称毛重'" class="right" @click.stop="tareClick(item)">皮重</view>
+					<view v-if="!(item.paymentManagement&&item.paymentManagement.status=='已收款')||
+					!(item.paymentManagement&&item.paymentManagement.status=='部分收款')
+					" class="right" :class="item.status=='已质检'?'gray':''" @click.stop="grossWeightClick(item)">毛重</view>
+					<view class="right" @click.stop="delClick(item)">删除</view>
+				</view>
+			</view>
+		</view>
+		<u-toast ref="uToast" />
+	</view>
+</template>
+
+<script>
+	import helper from '@/common/helper.js'; 
+	export default {
+		data() {
+			return {
+				inputKeyword: '',
+				warehouseName: '',
+				isShowWarehouse: false,
+				warehouseList: [],
+				dataList: []
+			}
+		},
+		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'
+									})
+								}
+							}
+						})
+					} else {
+						this.compId = uni.getStorageSync('pcUserInfo').compId
+						console.log("compId", this.compId)
+						this.loadData()
+					}
+				})
+				.catch(res => {
+					if (res.message) {
+						uni.showToast({
+							title: res.message,
+							icon: 'none',
+							duration: 2000
+						})
+					}
+				});
+		},
+		methods: {
+			loadData() {
+				this.$api.doRequest('get', '/warehouseBaseInfo/selectWarehouseSelf', {
+					compId: this.compId
+				}).then(res => {
+					console.log("warehouseBaseInfo", res)
+					let _resData = res.data.data
+					for (let i = 0; i < _resData.length; i++) {
+						let _obj = {
+							"label": _resData[i].warehouseName,
+							"value": _resData[i].id,
+						}
+						this.warehouseList.push(_obj)
+					}
+					this.warehouseName = this.warehouseList[0].label
+					this.getList()
+				})
+			},
+			//获取列表
+			getList() {
+				this.$api.doRequest('get', '/weighingManagement/selectWeighingManagement', {
+					compId: this.compId,
+					currentPage: 1,
+					pageSize: 10,
+					searchKeyWord: this.inputKeyword,
+					warehouseName: this.warehouseName,
+					managementType: 3,
+				}).then(res => {
+					this.dataList = res.data.data.records
+					console.log(res.data.data.records)
+					// console.log("--------------------------------")
+					// console.log("this.dataList",this.dataList)
+				})
+			},
+			selectWarehouse() {
+				this.isShowWarehouse = true
+			},
+			confirmWarehouse(e) {
+				console.log(e)
+				this.warehouseName = e[0].label
+			},
+			//毛重
+			grossWeightClick(val) {
+				if (val.status == "已质检") return;
+				console.log(val)
+				uni.navigateTo({
+					url: './grossWeightDetail1?detailData=' + JSON.stringify(val)
+				})
+			},
+			tareClick(val) {debugger
+				helper.detailData = val
+				uni.navigateTo({
+					url: './tareDetail1?detailData=' + JSON.stringify(val)
+				})
+			},
+			delClick(val) {
+				console.log(val)
+				let that = this;
+				uni.showModal({
+					content: "确定删除检斤信息?",
+					success: function(res) {
+						if (res.confirm) {
+							console.log(that.detailData)
+							that.$api.doRequest('post', '/weighingManagement/api/deleteWeightcheck', {
+								id: val.id
+							}).then(res => {
+								if (res.data.code == 200) {
+									that.$refs.uToast.show({
+										title: '删除成功',
+										type: 'success',
+										url: '/pages/erpbusiness/acquisitionInspection/warehouseWeighing'
+									})
+								} else {
+									that.$refs.uToast.show({
+										title: '删除失败',
+										type: 'error',
+									})
+								}
+							})
+						} else if (res.cancel) {
+							console.log('用户点击取消');
+						}
+						debugger
+
+					}
+				})
+
+			},
+			toDetail(val) {
+				uni.navigateTo({
+					url: './tareDetail2?detailData=' + JSON.stringify(val)
+				})
+			}
+		}
+	}
+</script>
+
+<style scoped lang="scss">
+	.top {
+		background: white;
+		padding: 20rpx;
+		border-radius: 0 0 20rpx 40rpx;
+	}
+
+	.dropdown {
+		display: flex;
+		justify-content: space-between;
+		align-items: center;
+		position: relative;
+		margin: 20rpx 0;
+		padding: 0 13rpx;
+
+		.right,
+		.left {
+			display: flex;
+			align-items: center;
+		}
+	}
+
+	.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;
+			border-radius: 10rpx;
+			padding: 10rpx 0;
+			justify-content: space-evenly;
+			margin: 20rpx;
+			color: #878C9C;
+		}
+
+		.row3 {
+			display: flex;
+			margin-top: 20rpx;
+
+			.row3-item {
+				display: flex;
+				margin-right: 40rpx;
+
+				.left {
+					background: #22C572;
+					border-radius: 10rpx;
+					padding: 2rpx 10rpx;
+					box-sizing: border-box;
+					color: white;
+					font-size: 12px;
+					margin-right: 15rpx;
+				}
+			}
+		}
+
+		.row4 {
+			margin-top: 10px;
+			display: flex;
+			justify-content: flex-end;
+
+			.right {
+				border: 1px solid #CDCDCD;
+				border-radius: 45rpx;
+				padding: 10rpx 30rpx;
+				margin-left: 20rpx;
+			}
+		}
+
+	}
+
+	.status1,
+	.status2,
+	.status3 {
+		padding: 8rpx 12rpx;
+		border-radius: 50%;
+		color: white;
+	}
+
+	.status1 {
+		background: #FD714F;
+	}
+
+	.status2 {
+		background: #22C572;
+	}
+
+	.status3 {
+		background: #3296FA;
+	}
+
+	.gray {}
+</style>

+ 2 - 2
pages/erpbusiness/index.vue

@@ -83,7 +83,7 @@
 						// icon: 'cuIcon-copy',
 						src:'../../static/img/erp/shougoujianjin@3x.png',
 						tips: 0,
-						url: '/pages/task/my_task',
+						url: '/pages/erpbusiness/acquisitionInspection/acquisitionInspection',
 						show: true
 					}
 					// {
@@ -103,7 +103,7 @@
 						// icon: 'cuIcon-apps',
 						src:'../../static/img/erp/chukujianjin@3x.png',
 						tips: 0,
-						url: '/pages/attestation/index?',
+						url: '/pages/erpbusiness/acquisitionInspection/warehouseWeighing',
 						show: true
 					},
 					{

+ 91 - 39
pages/erpbusiness/sm/sm.vue

@@ -7,7 +7,7 @@
 			</view>
 			<view class="top-content-2">
 				<view>来自</view>
-				<view class="top-content-green">{{title}}</view>
+				<view class="top-content-green">{{user.title}}</view>
 				<view>的邀请。</view>
 			</view>
 			<view class="top-content-3">
@@ -18,7 +18,7 @@
 				<view v-if="grainMerchantList.length>0">
 					<view v-for="(item,index) in grainMerchantList" :key="index">
 						<view v-if="item.cover!=1" :class="item.check?'item-select':'item'" @click="selectItem(item)">
-							<img v-if="item.check" class="img" src="../../../static/img/select.png" alt="">
+							<image v-if="item.check" class="img" :src="img1" alt=""></image>
 							<view class="name">{{item.customerName}}</view>
 							<view class="phone">
 								<view class="number">{{item.customerPhone}}</view>
@@ -29,11 +29,11 @@
 				</view>
 
 				<view class="nolist" v-if="grainMerchantList.length==0">
-					<img class="img" src="../../../static/img/nolist.png" alt="">
+					<image class="img" :src="img2" alt=""></image>
 					<view class="text">您还未认证个人粮商身份</view>
 				</view>
-				<button v-if="grainMerchantList.length>0" class="custom-style" @click="submit">接受邀请</button>
-				<button v-if="grainMerchantList.length==0" class="custom-style" @click="attestation">接受并去认证</button>
+				<button v-if="grainMerchantList.length>0" :class="isAllselect?'':'custom-style'" @click="submit">{{btnVal}}</button>
+				<button v-if="grainMerchantList.length==0" class="custom-style" @click="toGrainMerchantCertification()">接受并去认证</button>
 			</div>
 		</u-popup>
 	</view>
@@ -46,23 +46,18 @@
 	export default {
 		data() {
 			return {
+				img1:require("../../../static/img/select.png"),
+				img2:require("../../../static/img/nolist.png"),
 				show: true,
 				identityAuthenticationInfo: {},
-				title: "黑龙江中天昊元贸易有限公司",
-				grainMerchantList: []
-				// grainMerchantList: [{
-				// 		name: "张三",
-				// 		phone: "189****9999",
-				// 		state: "已认证",
-				// 		check: false
-				// 	},
-				// 	{
-				// 		name: "李四",
-				// 		phone: "189****9999",
-				// 		state: "审核中",
-				// 		check: false
-				// 	}
-				// ]
+				grainMerchantList: [],
+				selectID: "",
+				btnVal: "接受邀请",
+				user: {
+					title: '',
+					companyId: ''
+				},
+				isAllselect:false
 			}
 		},
 		computed: {
@@ -71,14 +66,31 @@
 		methods: {
 			selectItem(item) {
 				console.log("item", item)
-				item.check = !item.check
+				if(item.authenticationStatus=="已接受") return
+				for (let i = 0; i < this.grainMerchantList.length; i++) {
+					if (this.grainMerchantList[i].id == item.id) {
+						this.grainMerchantList[i].check = !this.grainMerchantList[i].check
+						if (this.grainMerchantList[i].check) {
+							this.selectID = this.grainMerchantList[i].id
+						}
+					} 
+				}
 			},
 			//查询粮商身份
 			selectGrainMerchantList() {
 				//
 			},
-			onLoad(e) {
-				this.title = e.name
+			//粮商认证
+			toGrainMerchantCertification(){
+				uni.navigateTo({
+					url:'/pages/attestation/indexTwo'
+				})
+			},
+			onLoad(options) {
+				  //#ifdef APP-PLUS
+				  this.user.title = options.data.split(',')[2]
+				  this.user.companyId = options.data.split(',')[1]
+				  //#endif
 			},
 			onShow() {
 				this.getList()
@@ -90,7 +102,8 @@
 						pageSize: 100,
 						currentPage: 1,
 						commonId: this.userInfo.id,
-						flag: 0
+						compId:this.user.companyId,
+						flag: 3
 					}, 'application/json;charset=UTF-8').then(res => {
 						for (var i = 0; i < res.data.data.records.length; i++) {
 							res.data.data.records[i].basis = "false"
@@ -105,6 +118,16 @@
 									data[i].compName = data[i].compName.substring(0, 10) + "..."
 								}
 							}
+							if (data[i].authenticationStatus == "已接受") {
+								data[i].check = true
+								this.isAllselect = true
+							} else {
+								data[i].check = false
+								this.isAllselect = false
+							}
+						}
+						if(this.isAllselect){
+							this.btnVal = "已接受"
 						}
 						this.grainMerchantList = res.data.data.records
 						console.log(this.grainMerchantList)
@@ -127,22 +150,51 @@
 					});
 			},
 			submit() {
-				let _isAllCheck = false
-				for (let i = 0; i < this.grainMerchantList.length; i++) {
-					if (this.grainMerchantList[i].check) {
-						_isAllCheck = true
-					}
-				}
-				if (!_isAllCheck) {
-					this.$refs.uToast.show({
-						title: '至少选择一个身份',
-						type: "error",
-						icon: false
+				if(this.isAllselect) return
+				// let _isAllCheck = false
+				// for (let i = 0; i < this.grainMerchantList.length; i++) {
+				// 	if (this.grainMerchantList[i].check) {
+				// 		_isAllCheck = true
+				// 	}
+				// }
+				// if (!_isAllCheck) {
+				// 	this.$refs.uToast.show({
+				// 		title: '至少选择一个身份',
+				// 		type: "error",
+				// 		icon: false
+				// 	})
+				// }
+				console.log("this.user.compId",this.user.companyId)
+				this.$api.doRequest('get', '/identityAuthenticationInfo/saveCompanyIdentity', {
+						id: this.selectID,
+						compId:this.user.companyId,
+					}, 'application/json;charset=UTF-8').then(res => {
+						console.log(res);
+						if (res.statusCode == 200) {
+							
+							this.getList()
+							
+						}
+
+
 					})
-				}
+					.catch(res => {
+						if (res.message) {
+							uni.showToast({
+								title: res.message,
+								icon: 'none',
+								duration: 2000
+							})
+						} else {
+							uni.showToast({
+								title: "接受邀请失败,请稍后再试。",
+								icon: 'none',
+								duration: 2000
+							})
+						}
+					});
+
 			},
-			//接受并认证
-			attestation() {},
 			close() {
 				uni.navigateBack(-1)
 			}
@@ -164,7 +216,7 @@
 	}
 
 	.content-bottom {
-		padding: 50rpx 50rpx 0 50rpx;
+		padding: 50rpx 50rpx 50rpx 50rpx;
 
 		.title {
 			font-size: 32rpx;

+ 1 - 1
pages/grain_pulse/distribution/distribution.vue

@@ -111,7 +111,7 @@
 					detailedAddress:detailedAddress
 				}).then(res => {
 						console.log('res',res)
-					if (res.data.code == 200) {debugger
+					if (res.data.code == 200) {
 						this.datalist = res.data.data.records
 						let lat1 = this.nowLocation.latitude
 						let lng1 = this.nowLocation.longitude

+ 1 - 2
pages/user/user.vue

@@ -1,6 +1,5 @@
 <template>
 	<view class="container">
-
 		<!-- <view class="user-section">
 			<view class="bg">
 				<image class="bg_ware" src="https://moyv.top/wechat/images/bg_wave.gif"></image>
@@ -296,7 +295,7 @@
 				    success: function (res) {
 				        console.log('条码内容:' + res.result);
 						uni.navigateTo({
-							url:"/pages/erpbusiness/sm/sm?name="+res.result
+							url:"/pages/erpbusiness/sm/sm?data="+res.result
 						})
 				    }
 				});