소스 검색

前端小程序 sdy

zhongtianhaoyuan 3 년 전
부모
커밋
33e93a5bec

+ 2 - 0
main.js

@@ -29,6 +29,7 @@ Vue.prototype.$socket = webim;
 App.mpType = 'app'
 import * as filters from './filters' 
 import * as config from './config'
+import utils from '@/util/util.js'
 
 let urlAddress = 'liangxin.zthymaoyi.com'
 
@@ -36,6 +37,7 @@ Vue.prototype.$url = 'https://'+urlAddress+'/upload/'
 Vue.prototype.$uploadUrl = 'https://'+urlAddress+'/file/upload'
 Vue.prototype.$ws = 'wss://'+urlAddress+'/chat'
 Vue.prototype.$ossUrl = 'https://taohaoliang.oss-cn-beijing.aliyuncs.com/appData'
+Vue.prototype.utils = utils
 
 // let urlAddress = 'localhost'
 // Vue.prototype.$url = 'https://liangxin.zthymaoyi.com/upload/'

+ 24 - 23
pageA/product/business_buy.vue

@@ -55,7 +55,7 @@
 			<view   class="title">采购单价(元/吨)</view>
 			<view class="con-list">
 				<view class="picker">
-					<text>{{purchaseOrder.unitPrice}}</text>
+					<text>{{purchaseOrder.procurementPrice}}</text>
 				</view>
 				</view>
 		</view>
@@ -135,7 +135,7 @@
 						memo:'',
 						buyer:'',
 						buyerPhone:'',
-						unitPrice:0,
+						procurementPrice:0,
 						address:'',
 						count:0,
 						province:'',
@@ -175,7 +175,7 @@
 					memo:'',
 					buyer:'',
 					buyerPhone:'',
-					unitPrice:0,
+					procurementPrice:0,
 					address:'',
 					count:0,
 					id:0,
@@ -217,7 +217,7 @@
 				this.purchaseOrder.buyer = options.buyer
 				this.purchaseOrder.customer = options.customerName
 				this.purchaseOrder.basis = options.basisPrice
-				this.purchaseOrder.unitPrice = options.unitPrice
+				this.purchaseOrder.procurementPrice = options.procurementPrice
 				this.purchaseOrder.receiveWarehouse = options.receiveWarehouse
 				this.purchaseOrder.settlementPrice = options.basisPrice
 				this.purchaseOrder.procurementPlanType = options.procurementPlanType
@@ -248,14 +248,14 @@
 						url: `/pageA/product/Identity_switching?goodsName=${this.purchaseOrder.goodsName}
 						&receivePrivate=${this.purchaseOrder.receivePrivate}&receiveCity=${this.purchaseOrder.receiveCity}
 						&receiveArea=${this.purchaseOrder.receiveArea}&minimumVolume=${this.purchaseOrder.minimumVolume}
-						&buyer=${this.purchaseOrder.buyer}&basisPrice=${this.purchaseOrder.basis}&unitPrice=${this.purchaseOrder.unitPrice}
+						&buyer=${this.purchaseOrder.buyer}&basisPrice=${this.purchaseOrder.basis}&procurementPrice=${this.purchaseOrder.procurementPrice}
 						&receiveWarehouse=${this.purchaseOrder.receiveWarehouse}&procurementPlanType=${this.purchaseOrder.procurementPlanType}
 						&procurementPlanNo=${this.purchaseOrder.procurementPlan}`
 					})
 				},
 				commit(){
 					if(!this.purchaseOrder.transactionsNumber){
-						this.$api.msg('出售价格不能为空')
+						this.$api.msg('出售数量不能为空')
 						return
 					}
 					if(this.purchaseOrder.transactionsNumber>10000||this.purchaseOrder.transactionsNumber<1){
@@ -309,27 +309,27 @@
 							if (res.confirm) {
 								that.$api.doRequest('post','/purchaseOrder/api/insertPurchaseOrder', that.purchaseOrder).then(res => {
 									if(res.data.code==200){
-										// that.$api.doRequest('post','/purchaseOrder/api/submitPurchaseOrder', {id:res.data.data}).then(res1 => {
-										// 	if(res1.data.code==200){
+										that.$api.doRequest('post','/purchaseOrder/api/submitPurchaseOrder', {id:res.data.data}).then(res1 => {
+											if(res1.data.code==200){
 												uni.showToast({
 													title: '提交成功,等待买方回复',
 													icon: 'none',
 													duration: 2000
 												})
-										// 	}else{
-										// 		uni.showToast({
-										// 			title: res.data.message,
-										// 			icon: 'none',
-										// 			duration: 2000
-										// 		})
-										// 	}
-										// }).catch(res => {
-										// 	uni.showToast({
-										// 		title: res.data.message,
-										// 		icon: 'none',
-										// 		duration: 2000
-										// 	})
-										// })
+											}else{
+												uni.showToast({
+													title: res.data.message,
+													icon: 'none',
+													duration: 2000
+												})
+											}
+										}).catch(res => {
+											uni.showToast({
+												title: res.data.message,
+												icon: 'none',
+												duration: 2000
+											})
+										})
 										// uni.navigateBack();
 									}else{
 										uni.showToast({
@@ -339,8 +339,9 @@
 										})
 									}
 								}).catch(res => {
+									console.log(res)
 									uni.showToast({
-										title: res.data.message,
+										title: res.errMsg,
 										icon: 'none',
 										duration: 2000
 									})

+ 2 - 2
pageA/product/detail.vue

@@ -77,7 +77,7 @@
 				<view v-if='goods.procurementPlanType=="现货"' class="c-row">
 					<text class="tit">采购价格(元/吨)</text>
 					<view class="con-list">
-						<text>{{goods.unitPrice}}</text>
+						<text>{{goods.procurementPrice}}</text>
 					</view>
 				</view>
 				<view v-else class="c-row">
@@ -392,7 +392,7 @@
 							uni.navigateTo({
 								url: `/pageA/product/business_buy?id=${this.goods.id}&receiveArea=${this.goods.receiveArea}&minimumVolume=${this.goods.minimumVolume}
 										&goodsName=${this.goods.goodsName}&receiveCity=${this.goods.receiveCity}&receivePrivate=${this.goods.receivePrivate}&buyer=${this.goods.buyer}
-										&basisPrice=${this.goods.basisPrice}&unitPrice=${this.goods.unitPrice}&receiveWarehouse=${this.goods.receiveWarehouse}
+										&basisPrice=${this.goods.basisPrice}&procurementPrice=${this.goods.procurementPrice}&receiveWarehouse=${this.goods.receiveWarehouse}
 										&procurementPlanType=${this.goods.procurementPlanType}&procurementPlan=${this.goods.procurementPlanNo}&compId=${this.goods.compId}`
 							// 	url: `/pageA/product/business_buy?id=${this.goods.id}&packing=${this.goods.packing}}&province=${this.goods.province}
 							// 	&city=${this.goods.city}&area=${this.goods.area}&storeName=${this.goods.storeName}&seller=${this.goods.seller}

+ 118 - 73
pageA/product/lookup.vue

@@ -4,10 +4,10 @@
 			<view style='background:#fff;display:flex;' class="cu-bar search">
 			<view style='flex:6;' class="search-form round" >
 				<text style='color: #ccc;text-indent:6px;' class="cuIcon-search"></text>
-				<input type="text" v-model="searchKeyWord" @input="doSearch" placeholder="请输入货名或标题" confirm-type="search"></input>
+				<input type="text" v-model="searchKeyWord" @input='search' placeholder="请输入货名或标题" confirm-type="search"></input>
 				
 			</view>
-			<view @click='emptysearch1' style="width:4%;flex:1;">{{content}}</view>
+			<view @click='doSearch()' style="width:4%;flex:1;">搜索</view>
 			<text @click='emptysearch' v-if='searchKeyWord.length>0' class='tip_text cuIcon-roundclosefill'></text>
 			</view>
 			<!-- mSearch组件 如果使用原样式,删除组件元素-->
@@ -177,18 +177,63 @@
 				this.loadHotKeyword();
 
 			},
+			search(e){
+				if(e.detail.value.length==0){
+					this.isShowKeywordList=false
+					this.loadOldKeyword()
+					this.loadHotKeyword()
+				}
+			},
 			blur(){
 				uni.hideKeyboard()
 			},
-			emptysearch1(){
-				if(this.content=='取消'){
-					this.searchKeyWord=''
-					this.content='搜索'
+			doSearch(keyword){
+				console.log(keyword)
+				if(keyword){
+					this.searchKeyWord=keyword.searchContent
+
+				}
+				if(this.searchKeyWord.length>0){
+						this.isShowKeywordList=true
+						this.$api.doRequest('post', '/searchRecordsInfo/api/addInfo',{commonId:this.userInfo.id,searchContent:this.searchKeyWord}).then(res => {
+						})
+						.catch(res => {
+							
+						});
+					}else{
+						this.isShowKeywordList=false
+						this.loadOldKeyword()
+						this.loadHotKeyword()
+					}
+				uni.showLoading({
+					title: '正在加载',
+					mask:true
+				})
+				var param1=''
+				if (this.TabCur == 0) {
+					param1 = '/procurementPlanInfo/selectProcurementPlanInfo'
+				} else {
+					param1 = '/salePlanInfo/selectSalePlanInfo'
 				}
+				this.$api.doRequest('get', param1,{pageSize:this.pageSize,
+				currentPage:this.currentPage,searchKeyWord:this.searchKeyWord}).then(res => {
+					uni.hideLoading()
+					this.keywordList=res.data.data.records
+				})
+				.catch(res => {
+					uni.hideLoading()
+					uni.showToast({
+						title: res.errmsg,
+						icon:'none',
+						duration: 2000
+					})
+				});
 			},
 			emptysearch(){
 				this.searchKeyWord=''
-				this.content='搜索'
+				this.isShowKeywordList=false
+				this.loadOldKeyword()
+				this.loadHotKeyword()
 			},
 			loadHotKeyword(){
 				this.$api.doRequest('get', '/searchRecordsInfo/selectRecommendedSearchRecordsInfo',{pageSize:this.pageSize,
@@ -323,74 +368,74 @@
 			hotToggle() {
 				this.forbid = this.forbid ? '' : '_forbid';
 			},
-			//执行搜索
-			doSearch(e) {
-				if(e.detail){
-					if(e.detail.value.length>0){
-						this.content='取消'
-						this.isShowKeywordList=true
-						this.$api.doRequest('post', '/searchRecordsInfo/api/addInfo',{commonId:this.userInfo.id,searchContent:e.detail.value}).then(res => {
-						})
-						.catch(res => {
+			// //执行搜索
+			// doSearch(e) {
+			// 	if(e.detail){
+			// 		if(e.detail.value.length>0){
+			// 			this.content='取消'
+			// 			this.isShowKeywordList=true
+			// 			this.$api.doRequest('post', '/searchRecordsInfo/api/addInfo',{commonId:this.userInfo.id,searchContent:e.detail.value}).then(res => {
+			// 			})
+			// 			.catch(res => {
 							
-						});
-					}else{
-						this.content='搜索'
-						this.isShowKeywordList=false
-						this.loadOldKeyword()
-						this.loadHotKeyword()
-					}
-				}
-				else if(e){
-					if(e.length>0){
-						this.isShowKeywordList=true
-						this.content='取消'
-						this.searchKeyWord = e
-						this.$api.doRequest('post', '/searchRecordsInfo/api/addInfo',{commonId:this.userInfo.id,searchContent:e}).then(res => {
-						})
-						.catch(res => {
+			// 			});
+			// 		}else{
+			// 			this.content='搜索'
+			// 			this.isShowKeywordList=false
+			// 			this.loadOldKeyword()
+			// 			this.loadHotKeyword()
+			// 		}
+			// 	}
+			// 	else if(e){
+			// 		if(e.length>0){
+			// 			this.isShowKeywordList=true
+			// 			this.content='取消'
+			// 			this.searchKeyWord = e
+			// 			this.$api.doRequest('post', '/searchRecordsInfo/api/addInfo',{commonId:this.userInfo.id,searchContent:e}).then(res => {
+			// 			})
+			// 			.catch(res => {
 							
-						})
-					}else{
-						this.content='搜索'
-						this.isShowKeywordList=false
-						this.loadOldKeyword()
-						this.loadHotKeyword()
-					}
-				}
-				uni.showLoading({
-					title: '正在加载',
-					mask:true
-				})
-				var param1=''
-				if (this.TabCur == 0) {
-					param1 = '/procurementPlanInfo/selectProcurementPlanInfo'
-				} else {
-					param1 = '/salePlanInfo/selectSalePlanInfo'
-				}
-				this.$api.doRequest('get', param1,{pageSize:this.pageSize,
-				currentPage:this.currentPage,searchKeyWord:this.searchKeyWord}).then(res => {
-					uni.hideLoading()
-					this.keywordList=res.data.data.records
-				})
-				.catch(res => {
-					uni.hideLoading()
-					uni.showToast({
-						title: res.errmsg,
-						icon:'none',
-						duration: 2000
-					})
-				});
-				// console.log(key)
-				// console.log(this.keyword)
-				// key = key ? key : this.keyword ? this.keyword : this.defaultKeyword;
-				// this.keyword = key;
-				// this.saveKeyword(key); //保存为历史 
-				// var TabCur = this.TabCur
-				// uni.navigateTo({
-				// 	url: `/pageA/product/querylist?keywords=${key}&TabCur=${TabCur}`
-				// })
-			},
+			// 			})
+			// 		}else{
+			// 			this.content='搜索'
+			// 			this.isShowKeywordList=false
+			// 			this.loadOldKeyword()
+			// 			this.loadHotKeyword()
+			// 		}
+			// 	}
+			// 	uni.showLoading({
+			// 		title: '正在加载',
+			// 		mask:true
+			// 	})
+			// 	var param1=''
+			// 	if (this.TabCur == 0) {
+			// 		param1 = '/procurementPlanInfo/selectProcurementPlanInfo'
+			// 	} else {
+			// 		param1 = '/salePlanInfo/selectSalePlanInfo'
+			// 	}
+			// 	this.$api.doRequest('get', param1,{pageSize:this.pageSize,
+			// 	currentPage:this.currentPage,searchKeyWord:this.searchKeyWord}).then(res => {
+			// 		uni.hideLoading()
+			// 		this.keywordList=res.data.data.records
+			// 	})
+			// 	.catch(res => {
+			// 		uni.hideLoading()
+			// 		uni.showToast({
+			// 			title: res.errmsg,
+			// 			icon:'none',
+			// 			duration: 2000
+			// 		})
+			// 	});
+			// 	// console.log(key)
+			// 	// console.log(this.keyword)
+			// 	// key = key ? key : this.keyword ? this.keyword : this.defaultKeyword;
+			// 	// this.keyword = key;
+			// 	// this.saveKeyword(key); //保存为历史 
+			// 	// var TabCur = this.TabCur
+			// 	// uni.navigateTo({
+			// 	// 	url: `/pageA/product/querylist?keywords=${key}&TabCur=${TabCur}`
+			// 	// })
+			// },
 			tabcarchange(status){
 				this.TabCur=status
 				var param1 = ''

+ 15 - 8
pageB/contract/look.vue

@@ -49,7 +49,7 @@
 						<text>{{item.deductionAmount}}</text>
 					</view>
 				</view>
-				<view class="c-row b-b" v-if=" item.deductionItems == null && item.confirmFlag == 1">
+				<view class="c-row b-b" v-if=" item.deductionItems != null">
 					<text class="tit">扣款原因</text>
 					<view class="con-list">
 						<text>{{item.deductionItems}}</text>
@@ -62,22 +62,20 @@
 					</view>
 				</view>
 				<view  v-if='item.unloadPoundImg'>
-					<view class="poundtitle">货磅单</view>
+					<view class="poundtitle">货磅单</view>
 					<view class="poundlists">
-						<image :src="item.loadPoundImg" mode="" class="poundlist"></image>
+						<image :src="item.unloadPoundImg" mode="" class="poundlist"></image>
 					</view>
 				</view>
-
+				<button v-if='item.confirmFlag!=3' class=" btn btns unload" style="background-color: #22C572; color: #FFFFFF ;width:80%;"
+					@click="confirmunload(item)" >确认卸货</button>
 			</view>
 		</view>
 		<view class="c-list">
-				<button class=" btn btns" style="background-color: #FFFFFF; "
+				<button class=" btn btns" style="background-color: #FFFFFF;"
 					@click="commit1(goods)">
 					<image src="../../static/img/jiaoyi/ic_fabu@2x.png" style="width: 24px; height: 24px;top: 7px;"></image>
 					添加发车信息</button>
-				<button class=" btn btns" style="background-color: #22C572; color: #FFFFFF ; "
-					@click="confirmunload(item)" >确认卸货</button>
-			
 		</view>
 		<view v-if='imgstatus' class='shade'>
 			<view class='shade-content'>
@@ -198,6 +196,11 @@
 						id: item.id
 					}).then(res => {
 						if (res.data.code == 200) {
+							uni.showToast({
+								title: '卸货成功',
+								icon: 'none',
+								duration: 2000
+							})
 							item.confirmFlag = 3
 						}
 					})
@@ -980,6 +983,7 @@
 		background-color: #FFFFFF;
 		margin-top: 20px;
 		border-radius: 20px;
+		padding-bottom:20px;
 		/* 	padding: 5px 10px; */
 	}
 
@@ -1032,4 +1036,7 @@
 		margin-left: 14px;
 		margin-top: 10px;
 	}
+	.unload{
+		
+	}
 </style>

+ 12 - 10
pageD/identity/companyIdentityThree.vue

@@ -66,13 +66,13 @@
 		<view class="c-row b-b">
 			<text class="tit">手机号</text>
 			<view class="con-list">
-				<input placeholder="请填写手机号" v-model="identityAuthenticationInfo.customerPhone"></input>
+				<input placeholder="请填写手机号" @input='phoneinput' v-model="identityAuthenticationInfo.customerPhone"></input>
 			</view>
 		</view>
-		<view style='width:100%;border-bottom:1px solid #E8E9ED;position:relative;padding:10px;' class="flex">
+		<view style='width:100%;border-bottom:1px solid #E8E9ED;padding:10px;' class="flex">
 			<button :class='codestatus&&!sendDisabled?"active":""' @click='obtain' class='getcode'>{{sendText}}</button>
-			<view style='width:70%;position:relative;margin-left: 200px;'>
-				<input v-model='verifyCode' placeholder="请输入验证码" type="number">
+			<view  class="con-list" style='position:relative;'>
+				<input style='text-align:right;' v-model='verifyCode' placeholder="请输入验证码" type="number">
 			</view>
 		</view>
 		<view class="c-row b-b" v-if="identityAuthenticationInfo.customerTypeFlag == 2">
@@ -133,8 +133,10 @@
 		},
 		methods: {
 			obtain() {
-				if (this.sendText == "获取验证码")
+				console.log(1111)
+				if (this.sendText == "获取验证码"){
 					this.getcode()
+				}
 			},
 			bankUp() {
 				var that = this
@@ -324,6 +326,7 @@
 
 			},
 			phoneinput(e) {
+				console.log(e.detail.value.length)
 				if (e.detail.value.length == 11) {
 					this.codestatus = true
 				}
@@ -490,6 +493,7 @@
 		align-items: center;
 		padding: 20rpx 30rpx;
 		position: relative;
+		font-size:14px;
 	}
 
 	.con-list {
@@ -507,7 +511,7 @@
 		line-height: 40rpx;
 		text-align: right;
 		padding-right: 20rpx;
-		font-size: 14px;
+		font-size: 12px;
 	}
 
 	.btn {
@@ -530,9 +534,6 @@
 
 	.getcode {
 		font-size: 14px;
-		position: absolute;
-		top: 50%;
-		transform: translateY(-50%);
 		color: #AFB3BF;
 		background: #F5F6F9;
 		height: 30px;
@@ -540,7 +541,8 @@
 	}
 
 	.getcode.active {
-		border: none;
+		background:#22C572;
+		color:#fff;
 	}
 
 	.words {

+ 8 - 18
pageD/identity/driverIdentity.vue

@@ -39,17 +39,15 @@
 			<view class="c-row b-b">
 				<text class="tit">手机号</text>
 				<view class="con-list">
-					<input placeholder="请填写手机号" maxlength = "11"  name="input" v-model="DriverViewInfo.driverPhone"></input>
+					<input placeholder="请填写手机号" maxlength = "11" @input='phoneinput' name="input" v-model="DriverViewInfo.driverPhone"></input>
 				</view>
 			</view>
-			<view style='width:100%;border-bottom:1px solid #E8E9ED;position:relative;padding:10px;' class="flex">
+			<view style='padding:10px;' class="c-row b-b">
 				<button :class='codestatus&&!sendDisabled?"active":""' @click='getcode'
 					class='getcode'>{{sendText}}</button>
-				<view style='width:70%;position:relative;margin-left: 200px;'>
 					<view class="con-list">
 						<input v-model='verifyCode' maxlength = "6"  placeholder="请输入验证码" type="text">
 					</view>
-				</view>
 			</view>
 			<view class="c-row ">
 				<text class="tit">常驻城市</text>
@@ -115,11 +113,11 @@
 			...mapState(['hasLogin', 'userInfo'])
 		},
 		methods: {
-			// phoneinput(e) {
-			// 	if (e.detail.value.length == 11) {
-			// 		this.codestatus = true
-			// 	}
-			// },
+			phoneinput(e) {
+				if (e.detail.value.length == 11) {
+					this.codestatus = true
+				}
+			},
 			regionchange() {
 				this.show = true
 			},
@@ -391,14 +389,10 @@
 		line-height: 40rpx;
 		text-align: right;
 		padding-right: 20rpx;
-		font-size: 14px;
+		font-size: 12px;
 	}
-
 	.getcode {
 		font-size: 14px;
-		position: absolute;
-		top: 50%;
-		transform: translateY(-50%);
 		color: #AFB3BF;
 		background: #F5F6F9;
 		height: 30px;
@@ -473,10 +467,6 @@
 
 	.getcode {
 		font-size: 14px;
-		position: absolute;
-		/*  right:0; */
-		top: 50%;
-		transform: translateY(-50%);
 		color: #AFB3BF;
 		background: #F5F6F9;
 		height: 30px;

+ 22 - 5
pageD/myRelease/sellGrain.vue

@@ -76,7 +76,7 @@
 			<view class="c-row b-b">
 				<text class="tit">卖方手机号</text>
 				<view class="con-list">
-					<input placeholder="请输入卖方手机号" name="input" v-model="deptList.sellerPhone"></input>
+					<input placeholder="请输入卖方手机号" @input='phoneinput' name="input" v-model="deptList.sellerPhone"></input>
 				</view>
 			</view>
 			<view style='width:100%;position:relative;padding:10px;' class="flex">
@@ -276,7 +276,15 @@
 			})
 		},
 		methods: {
+			phoneinput(e){
+				console.log(e)
+				if(e.detail.value.length==11){
+					
+				}
+			},
+
 			getcode() {
+				console.log(1111)
 				var that = this
 				if (/^0?1[3|4|5|6|7|8][0-9]\d{8}$/.test(that.deptList.sellerPhone)) {
 					this.$api.doRequest('get', '/commonUser/sendVerifyCode', {
@@ -548,9 +556,14 @@
 				this.insertSalePlanInfo.commonId = this.userInfo.id
 				this.insertSalePlanInfo.salePlanNo = 'XSJH' + this.getdate() + this.verifyinit()
 				this.insertSalePlanInfo.compId = "2710b21efc1e4393930c5dc800010dc4"
-				this.$api.doRequest('get', '/commonUser/loginVerifyCode', {
-						phone: this.deptList.sellerPhone,
-						verifyCode: this.verifyCode
+				uni.showModal({ 
+					title: '提示',
+				    content: '确定发布交易信息?',
+				    success: function (res) {
+						if (res.confirm) {
+							that.$api.doRequest('get', '/commonUser/loginVerifyCode', {
+						phone: that.deptList.sellerPhone,
+						verifyCode: that.verifyCode
 					}).then(res => {
 						if (res.data.code == 200) {
 							that.$api.doRequest('post', '/salePlanInfo/api/insertSalePlanInfo', that
@@ -599,6 +612,11 @@
 						})
 						return
 					});
+						} else if (res.cancel) {
+						
+						}
+					}});
+				
 				// this.insertProcurementPlanInfo = this.deptList
 				// this.insertProcurementPlanInfo.basisPrice = -this.insertProcurementPlanInfo.basisPrice
 				// this.insertProcurementPlanInfo.commonId = this.userInfo.id
@@ -693,7 +711,6 @@
 		-webkit-box-direction: normal;
 		-webkit-flex-direction: column;
 		flex-direction: column;
-		color: #AFB3BF;
 		line-height: 40rpx;
 		text-align: right;
 		padding-right: 20rpx;

+ 10 - 10
pageD/warehousings/warehousings.vue

@@ -85,13 +85,13 @@
 				<view class="c-row b-b">
 					<view class="title">扣款金额</view>
 					<view class="con-list">
-						<input placeholder-style="font-size:14px" placeholder="请输入扣款金额" name="input" v-model="WarehouseInOutInfo.deductionAmount"></input>
+						<input style="font-size:14px" placeholder="请输入扣款金额" name="input" v-model="WarehouseInOutInfo.deductionAmount"></input>
 					</view>
 				</view>
 				<view class="c-row b-b">
 					<view class="title">扣款项</view>
 					<view class="con-list">
-						<input maxlength='16' placeholder="请输入扣款项" name="input" v-model="WarehouseInOutInfo.deductionItems"></input>
+						<input style="font-size:14px" maxlength='16' placeholder="请输入扣款项" name="input" v-model="WarehouseInOutInfo.deductionItems"></input>
 					</view>
 				</view>
 				<view class="c-row b-b">
@@ -128,49 +128,49 @@
 				<view class="c-row b-b">
 					<view class="title">质检员</view>
 					<view class="con-list">
-						<input maxlength='10' minlength='2' placeholder-style="font-size:14px" placeholder="请输入质检员姓名" name="input" v-model="list.qualityInspector"></input>
+						<input maxlength='10' minlength='2' style="font-size:14px" placeholder="请输入质检员姓名" name="input" v-model="list.qualityInspector"></input>
 					</view>
 				</view>
 				<view class="c-row b-b">
 					<view class="title">蛋白(%)>=</view>
 					<view class="con-list">
-						<input placeholder-style="font-size:14px" placeholder="请输入蛋白占比" name="input" v-model="list.protein"></input>
+						<input style="font-size:14px" placeholder="请输入蛋白占比" name="input" v-model="list.protein"></input>
 					</view>
 				</view>
 				<view class="c-row b-b">
 					<view class="title">水分(%)<= </view>
 					<view class="con-list">
-						<input placeholder-style="font-size:14px" placeholder="请输入水分占比" name="input" v-model="list.waterContent"></input>
+						<input style="font-size:14px" placeholder="请输入水分占比" name="input" v-model="list.waterContent"></input>
 					</view>
 				</view>
 				<view class="c-row b-b">
 					<view class="title">容重(克/升)>= </view>
 					<view class="con-list">
-						<input placeholder-style="font-size:14px" placeholder="请输入容重" name="input" v-model="list.bulkDensity"></input>
+						<input style="font-size:14px" placeholder="请输入容重" name="input" v-model="list.bulkDensity"></input>
 					</view>
 				</view>
 				<view class="c-row b-b">
 					<view class="title">热损伤(%)<= </view>
 					<view class="con-list">
-						<input placeholder-style="font-size:14px" placeholder="请输入热损伤占比" name="input" v-model="list.jiaorenli"></input>
+						<input style="font-size:14px" placeholder="请输入热损伤占比" name="input" v-model="list.jiaorenli"></input>
 					</view>
 				</view>
 				<view class="c-row b-b">
 					<view class="title">杂质(%)<= </view>
 					<view class="con-list">
-						<input placeholder-style="font-size:14px" placeholder="请输入杂质占比" name="input" v-model="list.impurity"></input>
+						<input style="font-size:14px" placeholder="请输入杂质占比" name="input" v-model="list.impurity"></input>
 					</view>
 				</view>
 				<view class="c-row b-b">
 					<view class="title">霉变粒(%)<= </view>
 					<view class="con-list">
-						<input placeholder-style="font-size:14px" placeholder="请输入霉变粒占比" name="input" v-model="list.mildewGrain"></input>
+						<input style="font-size:14px" placeholder="请输入霉变粒占比" name="input" v-model="list.mildewGrain"></input>
 					</view>
 				</view>
 				<view class="c-row b-b">
 					<view class="title">不完整粒(%)<= </view>
 					<view class="con-list">
-						<input placeholder-style="font-size:14px" placeholder="请输入不完整粒占比" name="input"
+						<input style="font-size:14px" placeholder="请输入不完整粒占比" name="input"
 							v-model="list.imperfectGrain"></input>
 					</view>
 				</view>

+ 17 - 0
util/util.js

@@ -380,6 +380,22 @@ const utils = {
 			return false;
 		}
 	},
+	//判断保留两位小数
+	isTwoPoint: function(str) {
+	if(str.indexOf('.')>-1){
+		let _str = str.split('.')
+		if(_str[1].length>2) return true
+		return false
+	}else{
+		return false
+	}
+
+		// if (str === '' || str === undefined || str === null) {
+		// 	return true;
+		// } else {
+		// 	return false;
+		// }
+	},
 	expireTime: function(str) {
 		if (!str) {
 			return;
@@ -518,6 +534,7 @@ module.exports = {
 	transDate: utils.transDate,
 	isNumber: utils.isNumber,
 	isEmpty: utils.isEmpty,
+	isTwoPoint:utils.isTwoPoint,
 	expireTime: utils.expireTime,
 	payOrder: utils.payOrder,
 	login: utils.login