Browse Source

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

zhongtianhaoyuan 3 years ago
parent
commit
7c2623048c

+ 2 - 2
config/index.js

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

+ 2 - 1
pages.json

@@ -326,7 +326,8 @@
 		{
 		{
 			"path": "pages/bill/index",
 			"path": "pages/bill/index",
 			"style": {
 			"style": {
-				"navigationBarTitleText": "我的票据"
+				"navigationBarTitleText": "我的票据",
+				"enablePullDownRefresh": true
 			}
 			}
 		},
 		},
 		{
 		{

+ 14 - 6
pages/attestation/indexTwo.vue

@@ -79,9 +79,9 @@
 					</view>
 					</view>
 					<text style="color:#AFB3BF;font-size: 14px;">验证码已发送至+86 {{price}}</text>
 					<text style="color:#AFB3BF;font-size: 14px;">验证码已发送至+86 {{price}}</text>
 					<view class="cancel" @click='pricestatusTwo=false,pricestatus=false'>×</view>
 					<view class="cancel" @click='pricestatusTwo=false,pricestatus=false'>×</view>
-					<view class='shade-content-item flex'>
+					<view class='shade-content-item1 flex'>
 						<input v-model='verifyCode' placeholder="填写验证码" type="number" class="tainput1" maxlength="6">
 						<input v-model='verifyCode' placeholder="填写验证码" type="number" class="tainput1" maxlength="6">
-						<text style="color:#AFB3BF;font-size: 14px;" @click="resend">{{sendText}}</text>
+						<text style="color:#22C572;font-size: 14px;padding-right: 40rpx;" @click="resend">{{sendText}}</text>
 					</view>
 					</view>
 					<view>
 					<view>
 						<view class="flex">
 						<view class="flex">
@@ -123,6 +123,8 @@
 			...mapState(['hasLogin', 'userInfo'])
 			...mapState(['hasLogin', 'userInfo'])
 		},
 		},
 		onShow() {
 		onShow() {
+			this.pricestatus = false
+			this.pricestatusTwo = false
 			this.getList()
 			this.getList()
 		},
 		},
 		onPullDownRefresh() {
 		onPullDownRefresh() {
@@ -359,6 +361,7 @@
 					})
 					})
 					return
 					return
 				}
 				}
+				this.pricestatus = false
 				this.pricestatusTwo = true
 				this.pricestatusTwo = true
 				// this.pricestatusTwo = !this.pricestatusTwo
 				// this.pricestatusTwo = !this.pricestatusTwo
 				var that = this
 				var that = this
@@ -597,7 +600,12 @@
 		height: 160rpx;
 		height: 160rpx;
 		padding: 35px 10px;
 		padding: 35px 10px;
 	}
 	}
-
+	.shade-content-item1 {
+		width: 277px;
+		text-align: center;
+		height: 160rpx;
+		padding: 15px 10px;
+	}
 	.shade {
 	.shade {
 		position: fixed;
 		position: fixed;
 		top: 0;
 		top: 0;
@@ -627,8 +635,8 @@
 	}
 	}
 
 
 	.tainput {
 	.tainput {
-		width: 90%;
-		padding-bottom: 15rpx;
+		width: 70%;
+		// padding-bottom: 15rpx;
 		margin: 0 auto;
 		margin: 0 auto;
 		text-align: left;
 		text-align: left;
 		border-bottom: 1px solid #AFB3BF;
 		border-bottom: 1px solid #AFB3BF;
@@ -636,7 +644,7 @@
 	}
 	}
 
 
 	.tainput1 {
 	.tainput1 {
-		width: 70%;
+		width: 50%;
 		padding-left: 10px;
 		padding-left: 10px;
 		margin: 0 auto;
 		margin: 0 auto;
 		text-align: left;
 		text-align: left;

+ 24 - 20
pages/bill/index.vue

@@ -4,7 +4,7 @@
 			<view style='background:#fff;display:flex;' class="cu-bar search">
 			<view style='background:#fff;display:flex;' class="cu-bar search">
 				<view style='flex:6;' class="search-form round Medium">
 				<view style='flex:6;' class="search-form round Medium">
 					<text style='color: #ccc;text-indent:6px;' class="cuIcon-search"></text>
 					<text style='color: #ccc;text-indent:6px;' class="cuIcon-search"></text>
-					<input type="text" maxlength="20" :focus="true" v-model="searchKeyWord" @confirm="doSearch()"
+					<input type="text" maxlength="20"  v-model="searchKeyWord" @confirm="doSearch()"
 						 placeholder="请输入买方名称或编号" confirm-type="search"></input>
 						 placeholder="请输入买方名称或编号" confirm-type="search"></input>
 				</view>
 				</view>
 				<view @click='doSearch()' class="Regular" style="width:4%;flex:1;">搜索</view>
 				<view @click='doSearch()' class="Regular" style="width:4%;flex:1;">搜索</view>
@@ -20,15 +20,19 @@
 		<view class='wrap' v-for='item in dataInfo'>
 		<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 style='color:#878C9C;'>{{item.paymentNo}}</view>
-				<view class='not' v-if='item.status=="待结算"'>待付款</view>
-				<view class='already' v-else>已付款</view>
+				<view class='already'  v-if='item.status=="全部付款"'>已付款</view>
+				<view class='not' v-else>待付款</view>
 			</view>
 			</view>
 			<view style='line-height:30px;'>
 			<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>
 			<view style='line-height:30px;'>
 			<view style='line-height:30px;'>
-				<view class='seller'>卖方</view><view style='font-size:14px;display:inline-block;'>{{item.customerName}}</view>
-				
+				<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>{{item.carNo}}</view>
+				</view>
 			</view>
 			</view>
 			<view class='flex justify-between align-item-center'>
 			<view class='flex justify-between align-item-center'>
 				<view style="color:#878C9C;padding:5px;">{{item.goodsName}}</view>
 				<view style="color:#878C9C;padding:5px;">{{item.goodsName}}</view>
@@ -42,13 +46,13 @@
 				<view>{{item.amountIngPayable}}</view>
 				<view>{{item.amountIngPayable}}</view>
 			</view>
 			</view>
 			<view class='flex justify-between align-item-center'>
 			<view class='flex justify-between align-item-center'>
-				<view style='color:#878C9C;padding:5px;'>单价</view>
+				<view style='color:#878C9C;padding:5px;'>已付</view>
 				<view>{{item.amountEdPayable}}</view>
 				<view>{{item.amountEdPayable}}</view>
 			</view>
 			</view>
 			<view style='flex-direction:row-reverse;' class='flex'>
 			<view style='flex-direction:row-reverse;' class='flex'>
-				<view @click='showImage(3,item)' class='button'>结算单</view>
-				<view @click='showImage(2,item)' class='button'>检斤单</view>
-				<view @click='showImage(1,item)' class='button'>质检单</view>
+				<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>
 			</view>
 		</view>
 		</view>
 		<view v-show="isContent">
 		<view v-show="isContent">
@@ -56,7 +60,7 @@
 		</view>
 		</view>
 		<view @click='closepop' class='popup' v-if='show'>
 		<view @click='closepop' class='popup' v-if='show'>
 			<view class='imagewrap' style='text-align:center;'>
 			<view class='imagewrap' style='text-align:center;'>
-				<image :src="img" mode=""></image>
+				<image :src="img" mode="aspectFit"></image>
 			</view>
 			</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>
 		</view>
@@ -139,16 +143,14 @@
 							});
 							});
 				
 				
 			},
 			},
-			showImage(status,item){
-				console.log(1111)
-				if(status==1){
-					this.img=item.qualityInspectionPictureAddress
-				}else if(status==2){
-					this.img=item.weighingPictureAddress
-				}else if(status==3){
-					this.img=item.pictureAddress
-				}
-				this.show=true
+			showImage(url){
+				var img = [];
+				img.push(url)
+				uni.previewImage({
+					current:0,
+					urls: img
+				});
+				
 			},
 			},
 			tabcarchange(status){
 			tabcarchange(status){
 				this.TabCur=status
 				this.TabCur=status
@@ -243,6 +245,8 @@
 						}
 						}
 						if(data.length==0){
 						if(data.length==0){
 							this.isContent=true
 							this.isContent=true
+							this.isLoadMore = false
+							this.loadStatus = 'nomore'
 						}
 						}
 					})
 					})
 					.catch(res => {
 					.catch(res => {

+ 34 - 13
pages/erp/improvedWrehousing/improvedWrehousing.vue

@@ -26,7 +26,7 @@
 				</view>
 				</view>
 				<view class="row">
 				<view class="row">
 					<view class="left">暂存时间</view>
 					<view class="left">暂存时间</view>
-					<view>{{item.inOutDate}}</view>
+					<view>{{item.updateDate}}</view>
 				</view>
 				</view>
 				<view class="row no-boder">
 				<view class="row no-boder">
 					<view class="left">提交人</view>
 					<view class="left">提交人</view>
@@ -53,7 +53,8 @@
 				warehouseList: [],
 				warehouseList: [],
 				warehouseCWList: [],
 				warehouseCWList: [],
 				dataList: [],
 				dataList: [],
-				allWarehouse: []
+				allWarehouse: [],
+				showTime:''
 			}
 			}
 		},
 		},
 		onLoad() {
 		onLoad() {
@@ -67,13 +68,14 @@
 			this.warehouseCWList = _data.warehouseCWList
 			this.warehouseCWList = _data.warehouseCWList
 			this.binNumber = _data.binNumber
 			this.binNumber = _data.binNumber
 			this.positionId = _data.positionId
 			this.positionId = _data.positionId
+			this.warehouseId = _data.warehouseId
 			this.getList()
 			this.getList()
 		},
 		},
 		methods: {
 		methods: {
 			getList() {
 			getList() {
 				this.$api.doRequest('get', '/warehouseInOutInfo/selectWarehouseInOutInfo', {
 				this.$api.doRequest('get', '/warehouseInOutInfo/selectWarehouseInOutInfo', {
-					positionId: helper.erpWarehouse.positionId,
-					baseId: helper.erpWarehouse.warehouseId,
+					positionId: this.positionId,
+					baseId: this.warehouseId,
 					currentPage: this.currentPage,
 					currentPage: this.currentPage,
 					pageSize: this.pageSize,
 					pageSize: this.pageSize,
 					inOutFlag: 2
 					inOutFlag: 2
@@ -84,10 +86,26 @@
 				})
 				})
 			},
 			},
 			warehousechange(e) {
 			warehousechange(e) {
-				 this.warehouseName = this.warehouseList[e[0]].warehouseName
+				this.warehouseName = this.warehouseList[e[0]].warehouseName
+				this.warehouseId = this.warehouseList[e[0]].id
+				this.warehouseCWList = this.warehouseList[e[0]].positionInfos
+				this.warehouseCWchange([0])
+				this.currentPage = 1
+				this.pageSize = 9999
+
 			},
 			},
 			warehouseCWchange(e) {
 			warehouseCWchange(e) {
-				 this.binNumber = this.warehouseCWList[e[0]].binNumber
+				debugger
+				this.binNumber = this.warehouseCWList[e[0]].binNumber
+				this.warehouseId = this.warehouseCWList[e[0]].baseId
+				this.positionId = this.warehouseCWList[e[0]].id
+				this.binNumber = this.warehouseCWList[e[0]].binNumber
+				helper.erpWarehouse.positionId =  this.positionId
+				helper.erpWarehouse.warehouseId = this.warehouseId 
+				helper.erpWarehouse.binNumber = this.binNumber 
+				this.currentPage = 1
+				this.pageSize = 9999
+				this.getList()
 			},
 			},
 			goDetail(val) {
 			goDetail(val) {
 				uni.navigateTo({
 				uni.navigateTo({
@@ -108,6 +126,7 @@
 		.left,
 		.left,
 		.right {
 		.right {
 			display: flex;
 			display: flex;
+			align-items: center;
 		}
 		}
 	}
 	}
 
 
@@ -117,21 +136,21 @@
 		border-radius: 10rpx;
 		border-radius: 10rpx;
 		background: #FFFFFF;
 		background: #FFFFFF;
 	}
 	}
-	
+
 	.content2 {
 	.content2 {
 		.row {
 		.row {
 			display: flex;
 			display: flex;
 			justify-content: space-between;
 			justify-content: space-between;
 			border-bottom: 1px solid #EEEEEE;
 			border-bottom: 1px solid #EEEEEE;
 			padding: 21rpx 0;
 			padding: 21rpx 0;
-	
+
 			.right,
 			.right,
 			input {
 			input {
 				font-size: 28rpx;
 				font-size: 28rpx;
 				color: #333333;
 				color: #333333;
 			}
 			}
 		}
 		}
-	
+
 		.row-bottom {
 		.row-bottom {
 			.right-bottom {
 			.right-bottom {
 				width: 300rpx;
 				width: 300rpx;
@@ -139,13 +158,15 @@
 			}
 			}
 		}
 		}
 	}
 	}
-	.content2-item{
+
+	.content2-item {
 		background: white;
 		background: white;
-		margin:0 20rpx 20rpx 20rpx;
+		margin: 0 20rpx 20rpx 20rpx;
 		padding: 10rpx;
 		padding: 10rpx;
 		border-radius: 15rpx;
 		border-radius: 15rpx;
 	}
 	}
-	.no-boder{
-		    border-bottom: none!important;
+
+	.no-boder {
+		border-bottom: none !important;
 	}
 	}
 </style>
 </style>

+ 12 - 8
pages/erp/improvedWrehousing/improvedWrehousingDetail.vue

@@ -100,7 +100,7 @@
 			</view>
 			</view>
 			<view class="row row-bottom has-btn">
 			<view class="row row-bottom has-btn">
 				<view class="left">成本(元/吨)</view>
 				<view class="left">成本(元/吨)</view>
-				<input v-if="detailData.inOutType=='采购入库'" v-model='detailData.unitContractPrice' class="right-bottom"
+				<input v-if="detailData.inOutType=='采购入库'" v-model='detailData.cost' class="right-bottom"
 					placeholder="自动获取" :disabled="isEditCB"></input>
 					placeholder="自动获取" :disabled="isEditCB"></input>
 				<input v-if="detailData.inOutType!='采购入库'" v-model='detailData.cost' class="right-bottom"
 				<input v-if="detailData.inOutType!='采购入库'" v-model='detailData.cost' class="right-bottom"
 					placeholder="自动获取" :disabled="isEditCB"></input>
 					placeholder="自动获取" :disabled="isEditCB"></input>
@@ -108,6 +108,7 @@
 			</view>
 			</view>
 			<view class="row row-bottom has-btn">
 			<view class="row row-bottom has-btn">
 				<view class="left">运费(元/吨)</view>
 				<view class="left">运费(元/吨)</view>
+				{{detailData.freight}}
 				<input @input='' v-model='detailData.freight' :disabled="isEditYF" class="right-bottom"
 				<input @input='' v-model='detailData.freight' :disabled="isEditYF" class="right-bottom"
 					placeholder="自动获取"></input>
 					placeholder="自动获取"></input>
 				<u-button class="edit-btn" hover-class="none" @click="editYF">编辑</u-button>
 				<u-button class="edit-btn" hover-class="none" @click="editYF">编辑</u-button>
@@ -261,10 +262,10 @@
 				imgUrl: []
 				imgUrl: []
 			}
 			}
 		},
 		},
-		onLoad(options) {
+		onLoad(options) {debugger
 			this.detailData = JSON.parse(options.data)
 			this.detailData = JSON.parse(options.data)
-			this.binNumber = helper.erpWarehouse.binNumber
-			this.warehouseName = helper.erpWarehouse.warehouseName
+			this.binNumber = this.detailData.binNumber
+			this.warehouseName = this.detailData.warehouseName
 			this.compId = helper.erpWarehouse.compId
 			this.compId = helper.erpWarehouse.compId
 			if(this.detailData.addressUrl){
 			if(this.detailData.addressUrl){
 				this.imgUrl.push({
 				this.imgUrl.push({
@@ -278,7 +279,9 @@
 			...mapState(['hasLogin', 'userInfo']),
 			...mapState(['hasLogin', 'userInfo']),
 		},
 		},
 		onShow() {
 		onShow() {
-			if (this.detailData.inOutType == '采购入库') {
+			
+			console.log('详情数据',this.detailData)
+			if (this.detailData.inOutType == '采购入库'&&this.detailData.status!='已暂存') {
 				this.detailData.freight = 0
 				this.detailData.freight = 0
 			}
 			}
 			if (!this.detailData.tranCarInfoList) this.detailData.tranCarInfoList = []
 			if (!this.detailData.tranCarInfoList) this.detailData.tranCarInfoList = []
@@ -342,8 +345,7 @@
 			},
 			},
 			dateChange(e) {
 			dateChange(e) {
 				console.log(e)
 				console.log(e)
-				this.detailData.inOutDate = e.year + "-" + e.month + "-" + e.day
-				this.inOutDate1 = e.year + "-" + e.month + "-" + e.day + " " + e.hour + ":" + e.minute 
+				this.detailData.inOutDate = e.year + "-" + e.month + "-" + e.day + " " + e.hour + ":" + e.minute + ":" + e.second 
 			},
 			},
 			warehousingTypePicker(e) {
 			warehousingTypePicker(e) {
 				this.detailData.inOutType = this.warehousingTypeList[e].constValue
 				this.detailData.inOutType = this.warehousingTypeList[e].constValue
@@ -490,7 +492,9 @@
 		.top {
 		.top {
 			display: flex;
 			display: flex;
 			margin-bottom: 20rpx;
 			margin-bottom: 20rpx;
-
+			border-radius: 20rpx;
+			background: white;
+			padding: 20rpx;
 			.top-left {
 			.top-left {
 				margin-right: 20rpx;
 				margin-right: 20rpx;
 			}
 			}

+ 2 - 1
pages/erp/index.vue

@@ -284,7 +284,7 @@ import helper from '@/common/helper.js';
 			makeBinNumber(){
 			makeBinNumber(){
 			
 			
 			},
 			},
-			warehousechange(e) {
+			warehousechange(e) {debugger
 				this.warehouseName = this.warehouseList[e[0]].warehouseName
 				this.warehouseName = this.warehouseList[e[0]].warehouseName
 				this.compId = this.warehouseList[e[0]].compId
 				this.compId = this.warehouseList[e[0]].compId
 				this.agent = this.warehouseList[e[0]].agent
 				this.agent = this.warehouseList[e[0]].agent
@@ -403,6 +403,7 @@ import helper from '@/common/helper.js';
 		.left,
 		.left,
 		.right {
 		.right {
 			display: flex;
 			display: flex;
+			align-items: center;
 		}
 		}
 	}
 	}
 	.comp{
 	.comp{

+ 13 - 6
pages/erp/warehousing/warehousing.vue

@@ -66,8 +66,7 @@
 			<view class="row">
 			<view class="row">
 				<view class="left">品级</view>
 				<view class="left">品级</view>
 				<view @click='show3=true'>{{detailData.grade}}</view>
 				<view @click='show3=true'>{{detailData.grade}}</view>
-				<u-picker :range="pjList" range-key="grade" @confirm='pjPicker($event)' v-model="show3"
-					mode="selector">
+				<u-picker :range="pjList" range-key="grade" @confirm='pjPicker($event)' v-model="show3" mode="selector">
 				</u-picker>
 				</u-picker>
 			</view>
 			</view>
 			<view class="row">
 			<view class="row">
@@ -191,9 +190,9 @@
 					year: true,
 					year: true,
 					month: true,
 					month: true,
 					day: true,
 					day: true,
-					hour: true,
-					minute: true,
-					second: true
+					// hour: true,
+					// minute: true,
+					// second: true
 				},
 				},
 				isEditCB: 'false',
 				isEditCB: 'false',
 				isEditYF: 'false',
 				isEditYF: 'false',
@@ -275,6 +274,9 @@
 			this.detailData.contractNo = _data.contractNo;
 			this.detailData.contractNo = _data.contractNo;
 			this.detailData.goodsNameKey = _data.goodsNameKey;
 			this.detailData.goodsNameKey = _data.goodsNameKey;
 			this.detailData.unitContractPrice = _data.unitContractPrice
 			this.detailData.unitContractPrice = _data.unitContractPrice
+			let _day = new Date();
+			_day.setTime(_day.getTime());
+			this.detailData.inOutDate = _day.getFullYear() + "-" + (_day.getMonth() + 1) + "-" + _day.getDate();
 			if (_data.inOutType == '采购入库') {
 			if (_data.inOutType == '采购入库') {
 				this.detailData.freight = 0
 				this.detailData.freight = 0
 			}
 			}
@@ -337,7 +339,7 @@
 			pjPicker(e) {
 			pjPicker(e) {
 				console.log(e)
 				console.log(e)
 				this.detailData.gradeKey = e[0]
 				this.detailData.gradeKey = e[0]
-				    this.detailData.grade = this.pjList[e].grade
+				this.detailData.grade = this.pjList[e].grade
 			},
 			},
 			handlerPicker(e) {
 			handlerPicker(e) {
 				console.log(e)
 				console.log(e)
@@ -419,6 +421,7 @@
 				this.isEditYF = false
 				this.isEditYF = false
 			},
 			},
 			submit(num) {
 			submit(num) {
+				debugger
 				if (isNaN(this.detailData.grossWeight) ||
 				if (isNaN(this.detailData.grossWeight) ||
 					(String(this.detailData.grossWeight).indexOf('.') != -1 &&
 					(String(this.detailData.grossWeight).indexOf('.') != -1 &&
 						String(this.detailData.grossWeight).length -
 						String(this.detailData.grossWeight).length -
@@ -491,8 +494,12 @@
 		padding: 20rpx 20rpx 140rpx 20rpx;
 		padding: 20rpx 20rpx 140rpx 20rpx;
 
 
 		.top {
 		.top {
+			border-radius: 20rpx;
+			background: white;
+			padding: 20rpx;
 			display: flex;
 			display: flex;
 			margin-bottom: 20rpx;
 			margin-bottom: 20rpx;
+			align-items: center;
 
 
 			.top-left {
 			.top-left {
 				margin-right: 20rpx;
 				margin-right: 20rpx;

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

@@ -139,6 +139,7 @@
 				}).then(res => {
 				}).then(res => {
 					console.log("warehouseBaseInfo", res)
 					console.log("warehouseBaseInfo", res)
 					let _resData = res.data.data
 					let _resData = res.data.data
+					this.warehouseList = []
 					for (let i = 0; i < _resData.length; i++) {
 					for (let i = 0; i < _resData.length; i++) {
 						let _obj = {
 						let _obj = {
 							"label": _resData[i].warehouseName,
 							"label": _resData[i].warehouseName,

+ 6 - 5
pages/erpbusiness/add_quality_testing.vue

@@ -80,7 +80,8 @@
 			<view v-if="gridList.type == '潮粮'" class="c-row">
 			<view v-if="gridList.type == '潮粮'" class="c-row">
 				<view class="title">净重单价(元/公斤)</view>
 				<view class="title">净重单价(元/公斤)</view>
 				<view class="con-list">
 				<view class="con-list">
-					{{gridList.tidalGrainPrice}}
+					<input v-model='gridList.tidalGrainPrice' disabled placeholder="自动获取,不可编辑"
+						 name="input"></input>
 				</view>
 				</view>
 			</view>
 			</view>
 			<view v-if="gridList.type == '干粮'" class="c-row">
 			<view v-if="gridList.type == '干粮'" class="c-row">
@@ -91,7 +92,7 @@
 				</view>
 				</view>
 			</view>
 			</view>
 		</view>
 		</view>
-		<view style='margin-bottom:100px;' class='wrap'>
+		<view style='margin-bottom:300rpx;' class='wrap'>
 			<view class='title_b'>化验信息</view>
 			<view class='title_b'>化验信息</view>
 
 
 			<view class="c-row ">
 			<view class="c-row ">
@@ -250,11 +251,11 @@
 		onLoad(options){
 		onLoad(options){
 			
 			
 			this.commonWarehouseNo=options.commonWarehouseNo
 			this.commonWarehouseNo=options.commonWarehouseNo
-			this.warehouseCount=options.warehouseCount
+			this.warehouseCount=Number(options.warehouseCount) + 1
 			 let number = '000' + this.warehouseCount
 			 let number = '000' + this.warehouseCount
 			 number = number.substring(number.length - 4, number.length)
 			 number = number.substring(number.length - 4, number.length)
 			this.gridList.warehouseName=options.warehouseName
 			this.gridList.warehouseName=options.warehouseName
-			this.gridList.qualityNo='ZCRK' + this.getdate() + this.commonWarehouseNo + number
+			this.gridList.qualityNo='SGRK' + this.getdate() + this.commonWarehouseNo + number
 			this.purchasePriceList=uni.getStorageSync('purchasePriceList')
 			this.purchasePriceList=uni.getStorageSync('purchasePriceList')
 			this.cangid=options.cangid
 			this.cangid=options.cangid
 			this.managementType=options.managementType
 			this.managementType=options.managementType
@@ -377,7 +378,7 @@
 					this.$api.msg('车牌号不能为空')
 					this.$api.msg('车牌号不能为空')
 					return
 					return
 				}
 				}
-				if (this.gridList.carNumber.length > 7) {
+				if (this.gridList.carNumber.length != 7) {
 					this.$api.msg('车牌号输入错误')
 					this.$api.msg('车牌号输入错误')
 					return
 					return
 				}
 				}

+ 2 - 1
pages/erpbusiness/edit_quality_testing.vue

@@ -71,7 +71,8 @@
 			<view class="c-row">
 			<view class="c-row">
 				<view class="title">净重单价(元/公斤)</view>
 				<view class="title">净重单价(元/公斤)</view>
 				<view class="con-list">
 				<view class="con-list">
-					{{gridList.tidalGrainPrice}}
+					<input v-model='gridList.tidalGrainPrice' disabled placeholder="自动获取,不可编辑"
+						 name="input"></input>
 				</view>
 				</view>
 			</view>
 			</view>
 		</view>
 		</view>

+ 1 - 7
pages/erpbusiness/examine_quality_testing.vue

@@ -117,7 +117,7 @@
 			<view class="c-row ">
 			<view class="c-row ">
 				<view class="title">霉变粒(%)</view>
 				<view class="title">霉变粒(%)</view>
 				<view class="con-list">
 				<view class="con-list">
-					{{gridList.impurity}}
+					{{gridList.mildewGrain}}
 				</view>
 				</view>
 			</view>
 			</view>
 			<view class="c-row ">
 			<view class="c-row ">
@@ -126,12 +126,6 @@
 					{{gridList.jiaorenli}}
 					{{gridList.jiaorenli}}
 				</view>
 				</view>
 			</view>
 			</view>
-			<view class="c-row ">
-				<view class="title">不完善粒(%)<=</view>
-				<view class="con-list">
-					{{gridList.imperfectGrain}}
-				</view>
-			</view>
 		</view>
 		</view>
 	</view>
 	</view>
 </template>
 </template>

+ 29 - 8
pages/erpbusiness/quality_testing.vue

@@ -1,5 +1,5 @@
 <template>
 <template>
-	<view>
+	<view class="center">
 		<view class='navbar' style='position:fixed;background:#fff;top:0;width:100%;z-index:3;'>
 		<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="back-btn cuIcon-back" @click="navBack"></view>
 				<view class='header-content' v-if='managementType==3'>出库质检</view>
 				<view class='header-content' v-if='managementType==3'>出库质检</view>
@@ -194,18 +194,37 @@
 			this.managementType=options.managementType
 			this.managementType=options.managementType
 		},
 		},
 		onShow() {
 		onShow() {
+			var that = this
+			if(this.cangid){
+				uni.setStorageSync("cangid",this.cangid)
+			}
+			else{
+				this.cangid = uni.getStorageSync("cangid")
+			}
 			this.gridList=[]
 			this.gridList=[]
 			this.$api.doRequest('get', '/warehouseBaseInfo/selectWarehouseSelf',{
 			this.$api.doRequest('get', '/warehouseBaseInfo/selectWarehouseSelf',{
 				compId:'',
 				compId:'',
 				personCharge:this.userInfo.phone
 				personCharge:this.userInfo.phone
 			}).then(res => {
 			}).then(res => {
 				if(res.data.data){
 				if(res.data.data){
-					this.warehouseName=res.data.data[0].warehouseName
-					this.cangid=res.data.data[0].id
-					this.warehouseCount = res.data.data[0].count
-					this.commonWarehouseNo=res.data.data[0].commonWarehouseNo
-					uni.setStorageSync('purchasePriceList',res.data.data[0].purchasePriceList)
-					this.selector=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
+						} 
+					}
+					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
+						uni.setStorageSync('purchasePriceList',that.selector[0].purchasePriceList)
+					}
 					this.getList(true)
 					this.getList(true)
 				}
 				}
 			})
 			})
@@ -235,6 +254,7 @@
 			warehousechange(e){
 			warehousechange(e){
 				this.warehouseName=this.selector[e[0]].warehouseName
 				this.warehouseName=this.selector[e[0]].warehouseName
 				this.cangid=this.selector[e[0]].id
 				this.cangid=this.selector[e[0]].id
+				uni.setStorageSync("cangid",this.cangid)
 				this.warehouseCount = this.selector[e[0]].count
 				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)
 				uni.setStorageSync('purchasePriceList',this.selector[e[0]].purchasePriceList)
@@ -410,7 +430,8 @@
 </script>
 </script>
 <style scoped lang='scss' >
 <style scoped lang='scss' >
 	page{
 	page{
-		background:#F5F6FA;
+		background:#F5F6FA;		
+		margin-bottom:160rpx;
 	}
 	}
 	
 	
 	.container {
 	.container {

+ 2 - 0
pages/grain_pulse/home.vue

@@ -139,6 +139,7 @@
 		    this.getList()
 		    this.getList()
 			this.isLoadMore = false
 			this.isLoadMore = false
 			this.loadStatus = 'loading'
 			this.loadStatus = 'loading'
+			this.currentPage = 1
 		     setTimeout(function () {
 		     setTimeout(function () {
 		         uni.stopPullDownRefresh();  //关闭下拉刷新
 		         uni.stopPullDownRefresh();  //关闭下拉刷新
 		     }, 1000);
 		     }, 1000);
@@ -186,6 +187,7 @@
 					},
 					},
 					fail:function(req){
 					fail:function(req){
 						console.log(req)
 						console.log(req)
+						that.getList()
 					}
 					}
 				});
 				});
 			}
 			}

+ 1 - 1
pages/grain_pulse/record.vue

@@ -165,7 +165,7 @@
 		},
 		},
 		methods: {
 		methods: {
 			navBack() {
 			navBack() {
-				uni.navigateBack(1)
+				uni.navigateBack()
 			},
 			},
 			releaseclick() {
 			releaseclick() {
 				this.$api.doRequest('get', '/settledCompanyInfo/companyList', {loginPhone:this.userInfo.phone})
 				this.$api.doRequest('get', '/settledCompanyInfo/companyList', {loginPhone:this.userInfo.phone})

+ 1 - 1
pages/public/login.vue

@@ -122,7 +122,7 @@
 				})
 				})
 			},
 			},
 			gocode(){
 			gocode(){
-				if(this.phone.length==11){
+				if(this.phone.length==11 && /^0?1[3|4|5|6|7|8][0-9]\d{8}$/.test(this.phone)){
 					uni.navigateTo({
 					uni.navigateTo({
 						url:'/pages/public/code?phone='+this.phone
 						url:'/pages/public/code?phone='+this.phone
 					})
 					})

+ 1 - 1
pages/user/user.vue

@@ -33,7 +33,7 @@
 					<view class="cu-item" style='text-align:center;' v-for="(item,index) in gridList1" :key="index"
 					<view class="cu-item" style='text-align:center;' v-for="(item,index) in gridList1" :key="index"
 						@click="gridClick(item, index)" v-if="index<gridCol*2">
 						@click="gridClick(item, index)" v-if="index<gridCol*2">
 						<view :class="['cuIcon-' + item.cuIcon,'text-' + item.color]">
 						<view :class="['cuIcon-' + item.cuIcon,'text-' + item.color]">
-							<text v-if='item.num==1&&taskTip' class='badge_user'>{{taskTip}}</text>
+							<text v-if='item.num==4&&taskTip' class='badge_user'>{{taskTip}}</text>
 							<image :src="item.src" class="sign1"></image>
 							<image :src="item.src" class="sign1"></image>
 						</view>
 						</view>
 						<text>{{item.name}}</text>
 						<text>{{item.name}}</text>

+ 7 - 4
util/util.js

@@ -313,12 +313,15 @@ const utils = {
 				Math.sin(b / 2), 2)));
 				Math.sin(b / 2), 2)));
 		s = s * 6378.137;
 		s = s * 6378.137;
 		s = Math.round(s * 10000) / 10000;
 		s = Math.round(s * 10000) / 10000;
-		if(s > 1){
-			s = s.toFixed(2) + 'km' //保留两位小数
+		if(s >= 1 && s < 20){
+			s = s.toFixed(1) + 'km' 
 		}
 		}
-		else{
+		else if(s < 1){
 			s = s*1000
 			s = s*1000
-			s = s.toFixed(0) + 'm' //保留两位小数
+			s = s.toFixed(0) + 'm' 
+		}
+		else{
+			s = s.toFixed(0) + 'km'
 		}
 		}
 		return s
 		return s
 	},
 	},