gjy 3 年之前
父节点
当前提交
9e367817d6

+ 10 - 4
pages/erpbusiness/add_quality_testing.vue

@@ -1,6 +1,6 @@
 <template>
 	<view>
-		<view class='wrap'>
+		<view @click='hidden' class='wrap'>
 			<view class='title_b'>基本信息</view>
 			<view class="c-row ">
 				<view class="title">仓库</view>
@@ -28,7 +28,7 @@
 			<view class="c-row ">
 				<view class="title">车牌号</view>
 				<view class="con-list">
-					<input v-model='gridList.carNumber' @click="handleShowKeyboard":disabled="true" placeholder="请输入车牌号" name="input"></input>
+					<input v-model='gridList.carNumber' @click.stop="handleShowKeyboard":disabled="true" placeholder="请输入车牌号" name="input"></input>
 					<master-keyboard ref="keyboard" keyboardtype="car" :randomNumber="true" :newCar="false" :defaultValue="gridList.carNumber" @keyboardClick="handleClick"></master-keyboard>
 				</view>
 			</view>
@@ -369,9 +369,15 @@
 			})
 		},
 		methods: {
+			hidden(){
+				this.$refs.keyboard.open(false)
+			},
 			handleShowKeyboard(){
-				console.log(this.$refs)
-				this.$refs.keyboard.open(true)//true 键盘显示 false 键盘隐藏
+				if(this.$refs.keyboard.open){
+					this.$refs.keyboard.open(true)//true 键盘显示 false 键盘隐藏
+				}else{
+					this.$refs.keyboard[0].open(true)
+				}
 			},
 			handleClick(e){
 				this.gridList.carNumber = e.value //键盘输入值

+ 24 - 4
pages/erpbusiness/edit_quality_testing.vue

@@ -1,6 +1,6 @@
 <template>
 	<view>
-		<view class='wrap'>
+		<view @click='hidden' class='wrap'>
 			<view class='title_b'>基本信息</view>
 			<view class="c-row ">
 				<view class="title">仓库</view>
@@ -23,7 +23,9 @@
 			<view class="c-row ">
 				<view class="title">车牌号</view>
 				<view class="con-list">
-					<input :disabled='flag==1' v-model='gridList.carNumber' placeholder="请输入车牌号" name="input"></input>
+					<input v-model='gridList.carNumber' @click.stop="handleShowKeyboard":disabled="true" placeholder="请输入车牌号" name="input"></input>
+					<master-keyboard ref="keyboard" keyboardtype="car" :randomNumber="true" :newCar="false" :defaultValue="gridList.carNumber" @keyboardClick="handleClick"></master-keyboard>
+					<!-- <input :disabled='flag==1' v-model='gridList.carNumber' placeholder="请输入车牌号" name="input"></input> -->
 				</view>
 			</view>
 			<view v-if="gridList.paramType != '1'" class="c-row ">
@@ -181,6 +183,7 @@
 
 <script>
 	import dragButton from "@/components/drag-button/drag-button.vue";
+	import keyboard from "@/components/master-keyboard/master-keyboard.vue";
 	import {
 		mapState
 	} from 'vuex';
@@ -189,7 +192,8 @@
 		pageAtTop = true;
 	export default {
 		components: {
-			dragButton
+			dragButton,
+			keyboard
 		},
 		data() {
 			return {
@@ -224,7 +228,8 @@
 					natureOfGrainPurchase: '贸易粮',
 					type: '潮粮',
 					tidalGrainPrice: '',
-					dryGrainPrice: ''
+					dryGrainPrice: '',
+					carNumber:''
 				},
 				managementType: '',
 				warehouseName: '',
@@ -326,6 +331,21 @@
 			this.gridList.gradeKey = this.gradeList[0].key
 		},
 		methods: {
+			hidden(){
+				this.$refs.keyboard.open(false)
+			},
+			handleShowKeyboard(){
+				if(this.flag==0){
+					if(this.$refs.keyboard.open){
+						this.$refs.keyboard.open(true)//true 键盘显示 false 键盘隐藏
+					}else{
+						this.$refs.keyboard[0].open(true)
+					}
+				}
+			},
+			handleClick(e){
+				this.gridList.carNumber = e.value //键盘输入值
+			},
 			change(e){
 				if(e){
 					this.gridList.supplementaryRecording=1

+ 86 - 4
pages/user/depotAcquisition/grainDeliveryRegistration.vue

@@ -1,5 +1,5 @@
 <template>
-	<view class="content">
+	<view @click='hidden' class="content">
 		<view class="content1">
 			<view class="row1">
 				<view class="title">{{dataList.warehouseName}}</view>
@@ -42,7 +42,9 @@
 						车牌号-{{index1+1}}
 					</view>
 					<view class="right">
-						<u-input v-model="item1.carNo" placeholder="输入7位车牌号" />
+						<input v-model='item1.carNo' @click.stop="handleShowKeyboard(index,index1)":disabled="true" placeholder="输入7位车牌号" name="input"></input>
+						
+						<!-- <u-input v-model="item1.carNo" placeholder="输入7位车牌号" /> -->
 						<view class="btn">
 							<view @click="addCarNumber(item.carNumberList)" style="margin-right: 20rpx;">
 								<image class='row4-img'
@@ -56,6 +58,7 @@
 					</view>
 
 				</view>
+				
 			</view>
 			<view class='add-good-people' @click='addGoodPeople'>
 				<image class="img"
@@ -63,6 +66,7 @@
 					@click="reduceBtn(index)"></image>增加货主
 			</view>
 		</view>
+		<master-keyboard ref="keyboard" keyboardtype="car" :randomNumber="true" :newCar="false" :defaultValue="carNo" @keyboardClick="handleClick"></master-keyboard>
 		<u-button class='submit' @click='submit'>提交</u-button>
 		<u-modal v-model="isShowAlert" :title-style="{fontSize: '18px',fontWeight:'500'}"
 			:content-style="{fontSize: '14px',fontWeight:'400'}" confirm-color='#22C572' confirm-text='确定' title='提示'
@@ -77,15 +81,17 @@
 	import {
 		mapState
 	} from 'vuex';
-
+	import keyboard from "@/components/master-keyboard/master-keyboard.vue";
 	export default {
 		components: {
-
+			keyboard
 		},
 		data() {
 			return {
 				isShowAlert: false,
 				isShowAlert1: false,
+				index:0,
+				index1:0,
 				content: '当前登入信息验证失败,是否重新登录?',
 				content1: '确定提交送粮信息?',
 				// show: false,
@@ -94,6 +100,7 @@
 					name: '123'
 				}],
 				nameList: [],
+				carNo:'',
 				warehouseNameAddress: '',
 				startDate: "",
 				dataList: {
@@ -138,10 +145,85 @@
 			console.log("hasLogin", this.hasLogin)
 		},
 		methods: {
+			hidden(){
+				this.carNo=''
+				if(this.$refs.keyboard.open){
+					this.$refs.keyboard.open(false)//true 键盘显示 false 键盘隐藏
+				}else{
+					this.$refs.keyboard[0].open(false)
+				}
+			},
+			handleShowKeyboard(index,index1){
+				if(this.dataList.shippingInformationList[this.index].carNumberList[this.index1].carNo==''){
+					this.carNo=''
+					
+				}else{
+					this.carNo=this.dataList.shippingInformationList[this.index].carNumberList[this.index1].carNo
+				}
+				if(this.$refs.keyboard.open){
+						this.$refs.keyboard.open(false)//true 键盘显示 false 键盘隐藏
+					}else{
+						this.$refs.keyboard[0].open(false)
+					}
+				this.index=index
+				this.index1=index1
+				if(this.$refs.keyboard.open){
+					this.$refs.keyboard.open(true)//true 键盘显示 false 键盘隐藏
+				}else{
+					this.$refs.keyboard[0].open(true)
+				}
+				
+			},
+			handleClick(e){
+				this.carNo=e.value
+				this.dataList.shippingInformationList[this.index].carNumberList[this.index1].carNo = e.value //键盘输入值
+			},
 			showCustomerName(value, index) {
 				this.selectObj = value
 				this.selectObj.index = index
 				value.showCustomerName = true
+				that.$api.doRequest('get', '/paymentManagement/cumulant', {
+					compId: JSON.parse(localStorage.getItem('pcUserInfo')).data.compId,
+					customerNumberCard: that.detailData.customerNumberCard,
+					goodsName: that.detailData.goodsName,
+				}).then(res => {
+					if (res.data.code == 200) {
+						for (let i = 0; i < that.purchasePriceList.length; i++) {
+							if (
+								that.detailData.goodsName == that.purchasePriceList[i]
+								.goodsName
+							) {
+								let count = (that.purchasePriceList[i].saleLimit -
+									res.data.data / 1000).toFixed(2)
+								if (Number(count) - that.detailData.grossWeight / 1000 <= 0) {
+									that.$api.msg('该客户累计销售' + that.detailData.goodsName + (
+											res.data.data / 1000).toFixed(2) +
+										'吨,还可售粮' +
+										count + '吨', )
+				
+								} else {
+									that.$api.doRequest('post',
+										'/weighingManagement/api/editGrossWeight', that
+										.detailData).then(res => {
+										if (res.data.code == 200) {
+											that.$refs.uToast.show({
+												title: '提交成功',
+												type: 'success'
+											})
+											uni.navigateBack({})
+										} else {
+											that.$refs.uToast.show({
+												title: '提交失败',
+												type: 'error',
+											})
+										}
+									})
+				
+								}
+							}
+						}
+					}
+				})
 			},
 			getCustomer() {
 				let _data = {