소스 검색

修改app出入库

wangchao 3 년 전
부모
커밋
2a3aeb4a70

+ 23 - 4
pages/erp/exWarehousing/exWarehousing.vue

@@ -107,10 +107,11 @@
 				<view @click='slectCarNo' v-if="isPC">{{detailData.carNo}}</view> -->
 				<view class="left">车牌号</view>
 				<!-- 他运合同车牌号输入 -->
-				<input v-model='detailData.carNo' class="right-bottom" placeholder="请输入车牌号" v-if="!showCar"></input>
+				<input v-model='detailData.carNo' @click.stop="handleShowKeyboard":disabled="true"  class="right-bottom" placeholder="请输入车牌号" v-if="!showCar"></input>
+				<master-keyboard ref="keyboard" keyboardtype="car" :randomNumber="true" :newCar="false" :defaultValue="detailData.carNo" @keyboardClick="handleClick"></master-keyboard>
 				<!-- <view @click='slectCarNo' v-if="isPC">{{detailData.carNo}}</view> -->
 				<!-- 自运合同车牌号需下拉 -->
-				<view v-if="!carno" v-show="showCar" @click="carno = true">
+				<view v-show="showCar" @click="carno = true">
 					{{detailData.carNo?detailData.carNo :"请选择车牌号"}}
 				</view>
 				<u-picker :range="carList" range-key="carNo" @confirm='carPicker($event)' v-model="carno"
@@ -211,12 +212,14 @@
 <script>
 	import upload from '@/components/upload.vue';
 	import helper from '@/common/helper.js';
+	import keyboard from "@/components/master-keyboard/master-keyboard.vue";
 	import {
 		mapState
 	} from 'vuex';
 	export default {
 		components: {
-			upload
+			upload,
+			keyboard
 		},
 		data() {
 			return {
@@ -313,7 +316,8 @@
 					gradeKey: "",
 					grossWeight: "",
 					tare: "",
-					tips: ''
+					tips: '',
+					carNo:''
 				},
 				params: {
 					year: true,
@@ -414,6 +418,19 @@
 				this.isShowPrint = false
 				uni.navigateBack({})
 			},
+			hidden(){
+				this.$refs.keyboard.open(false)
+			},
+			handleShowKeyboard(){
+				if(this.$refs.keyboard.open){
+					this.$refs.keyboard.open(true)//true 键盘显示 false 键盘隐藏
+				}else{
+					this.$refs.keyboard[0].open(true)
+				}
+			},
+			handleClick(e){
+				this.detailData.carNo = e.value //键盘输入值
+			},
 			inOutNo() {
 				this.$api.doRequest('get', '/inOutWarehouseTask/selectInOutWarehouseNo', {
 					flag: 1,
@@ -459,11 +476,13 @@
 										this.detailData.tips = '入货库' + this.inOutNoList[0].warehouseName
 									}
 									//如果查到该合同
+									res.data.data[i].deliverType  = !res.data.data[i].deliverType?'1':res.data.data[i].deliverType  
 									if (res.data.data[i].deliverType == '1') { //判断自运1,他运2合同
 										this.showCar = true
 									} else {
 										this.showCar = false
 									}
+									
 									if (res.data.data[i].tranCarInfoList) {
 										this.carList = res.data.data[i].tranCarInfoList //车牌号下拉列表
 									}

+ 25 - 9
pages/erp/improvedExWaehousing/improvedExWaehousingDetail.vue

@@ -97,7 +97,8 @@
 			<view class="row row-bottom">
 				<view class="left">车牌号</view>
 				<!-- 他运合同车牌号输入 -->
-				<input v-model='detailData.carNo' class="right-bottom" placeholder="请输入车牌号" v-if="!showCar"></input>
+				<input v-model='detailData.carNo' @click.stop="handleShowKeyboard":disabled="true"  class="right-bottom" placeholder="请输入车牌号" v-if="!showCar"></input>
+				<master-keyboard ref="keyboard" keyboardtype="car" :randomNumber="true" :newCar="false" :defaultValue="detailData.carNo" @keyboardClick="handleClick"></master-keyboard>
 				<!-- <view @click='slectCarNo' v-if="isPC">{{detailData.carNo}}</view> -->
 				<!-- 自运合同车牌号需下拉 -->
 				<view v-if="!carno" v-show="showCar" @click="carno = true">{{detailData.carNo?detailData.carNo :"请选择车牌号"}}</view>
@@ -194,12 +195,14 @@
 <script>
 	import upload from '@/components/upload.vue';
 	import helper from '@/common/helper.js';
+	import keyboard from "@/components/master-keyboard/master-keyboard.vue";
 	import {
 		mapState
 	} from 'vuex';
 	export default {
 		components: {
-			upload
+			upload,
+			keyboard
 		},
 		data() {
 			return {
@@ -211,7 +214,7 @@
 				show5: false,
 				show6: false,
 				show7: false,
-				isPC: true,
+				// isPC: true,
 				typeList: [{
 						type: "干粮"
 					},
@@ -268,6 +271,7 @@
 					inOutType: "请选择出库类型",
 					warehouseInOutDetail: {},
 					gradeKey: "",
+					carNo:''
 				},
 				params: {
 					year: true,
@@ -300,14 +304,13 @@
 					url: this.detailData.addressUrl.split(",")[0]
 				})
 			}
-			this.cangId = options.cangId
 		},
 		onShow() {
 			this.binNumber = helper.erpWarehouse.binNumber
 			this.warehouseName = helper.erpWarehouse.warehouseName
 			// this.detailData.goodsName = uni.getStorageSync('erpContractNo').goodsName;
 			// this.detailData.contractNo = uni.getStorageSync('erpContractNo').contractNo;
-			this.detailData.goodsNameKey = uni.getStorageSync('erpContractNo').goodsNameKey;
+			// this.detailData.goodsNameKey = uni.getStorageSync('erpContractNo').goodsNameKey;
 			if (this.detailData.inOutType == '销售出库') {
 				this.detailData.inOutTypeKey = 1
 			} else if (this.detailData.inOutType == '移库出库') {
@@ -327,7 +330,7 @@
 			}
 			let _data = uni.getStorageSync('erpContractNoCK') == '' ? {} : uni.getStorageSync('erpContractNoCK')
 			if (!_data.tranCarInfoList) {
-				this.isPC = false
+				// this.isPC = false
 				_data.tranCarInfoList = []
 			} else {
 				this.isPC = true
@@ -338,9 +341,9 @@
 				}
 			}
 			if (this.detailData.carNo) {
-				for (let i = 0; i < uni.getStorageSync('erpContractNoCK').tranCarInfoList.length; i++) {
-					if (uni.getStorageSync('erpContractNoCK').tranCarInfoList[i].carNo == this.detailData.carNo)
-						this.detailData.tranCarNo = uni.getStorageSync('erpContractNoCK').tranCarInfoList[i].tranCarNo
+				for (let i = 0; i < _data.tranCarInfoList.length; i++) {
+					if (_data.tranCarInfoList[i].carNo == this.detailData.carNo)
+						this.detailData.tranCarNo = _data.tranCarInfoList[i].tranCarNo
 				}
 			}
 			//出库类型
@@ -351,6 +354,19 @@
 			this.handler()
 		},
 		methods: {
+			hidden(){
+				this.$refs.keyboard.open(false)
+			},
+			handleShowKeyboard(){
+				if(this.$refs.keyboard.open){
+					this.$refs.keyboard.open(true)//true 键盘显示 false 键盘隐藏
+				}else{
+					this.$refs.keyboard[0].open(true)
+				}
+			},
+			handleClick(e){
+				this.detailData.carNo = e.value //键盘输入值
+			},
 			inOutNo() {
 				this.$api.doRequest('get', '/inOutWarehouseTask/selectInOutWarehouseNo', {
 					flag: 1,

+ 1 - 0
pages/erp/index.vue

@@ -221,6 +221,7 @@
 			})
 			this.$api.doRequest('get', '/commonUser/api/checkSession').then(res => {
 				if (res.data.data == "INVALID") {
+					uni.hideLoading()
 					this.isShowAlert1 = true;
 					// uni.showModal({
 					// 	title: '提示',

+ 20 - 3
pages/erp/warehousing/warehousing.vue

@@ -114,7 +114,8 @@
 			<view class="row row-bottom" v-if="detailData.outType!='火运'&&detailData.outType!='散船'">
 				<view class="left">车牌号</view>
 				<!-- 他运合同车牌号输入 -->
-				<input v-model='detailData.carNo' class="right-bottom" placeholder="请输入车牌号" v-if="!showCar"></input>
+				<input v-model='detailData.carNo' @click.stop="handleShowKeyboard":disabled="true" class="right-bottom" placeholder="请输入车牌号" v-if="!showCar"></input>
+				<master-keyboard ref="keyboard" keyboardtype="car" :randomNumber="true" :newCar="false" :defaultValue="detailData.carNo" @keyboardClick="handleClick"></master-keyboard>
 				<!-- <view @click='slectCarNo' v-if="isPC">{{detailData.carNo}}</view> -->
 				<!-- 自运合同车牌号需下拉 -->
 				<view v-show="showCar" @click="carno = true">{{detailData.carNo? detailData.carNo:"请选择车牌号"}}</view>
@@ -228,9 +229,11 @@
 	} from 'vuex';
 	import upload from '@/components/upload.vue';
 	import helper from '@/common/helper.js';
+	import keyboard from "@/components/master-keyboard/master-keyboard.vue";
 	export default {
 		components: {
-			upload
+			upload,
+			keyboard
 		},
 		data() {
 			return {
@@ -323,7 +326,8 @@
 					netWeight: 0,
 					cost: 0,
 					warehouseInOutDetail: {},
-					tips: ''
+					tips: '',
+					carNo:''
 				},
 				carList: [], //车牌号下拉
 				showCar: false,
@@ -423,6 +427,19 @@
 			...mapState(['hasLogin', 'userInfo']),
 		},
 		methods: {
+			hidden(){
+				this.$refs.keyboard.open(false)
+			},
+			handleShowKeyboard(){
+				if(this.$refs.keyboard.open){
+					this.$refs.keyboard.open(true)//true 键盘显示 false 键盘隐藏
+				}else{
+					this.$refs.keyboard[0].open(true)
+				}
+			},
+			handleClick(e){
+				this.detailData.carNo = e.value //键盘输入值
+			},
 			inOutNo() {
 				let that = this
 				this.$api.doRequest('get', '/inOutWarehouseTask/selectInOutWarehouseNo', {