Преглед изворни кода

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

gjy пре 3 година
родитељ
комит
6e26129ee4
2 измењених фајлова са 86 додато и 62 уклоњено
  1. 1 0
      pages/task/my_task.vue
  2. 85 62
      pages/user/depotAcquisition/grainDeliveryRegistration.vue

+ 1 - 0
pages/task/my_task.vue

@@ -85,6 +85,7 @@
 				uni.switchTab({
 				    url: '/pages/user/user'
 				});
+				return true
 			}
 		},
 		watch: {

+ 85 - 62
pages/user/depotAcquisition/grainDeliveryRegistration.vue

@@ -18,15 +18,15 @@
 				<view class="left">货名</view>
 				<view class="flex" @click='showgoodsName'>
 					<view>{{goodsName}}</view>
-					<u-picker @confirm="goodsnameConfirm" range-key='goodsName' mode="selector"
-						v-model="goodsNameshow" :range="goodsnameList"></u-picker>
+					<u-picker @confirm="goodsnameConfirm" range-key='goodsName' mode="selector" v-model="goodsNameshow"
+						:range="goodsnameList"></u-picker>
 					<u-icon name="arrow-right"></u-icon>
 				</view>
 			</view>
 		</view>
 		<view class="content2">
 			<view v-if='!status'>
-				<view  class="wrap wrap1" v-for="(item,index) in dataList.shippingInformationList" :key='index'>
+				<view class="wrap wrap1" v-for="(item,index) in dataList.shippingInformationList" :key='index'>
 					<view class="row1 row">
 						<!-- -{{item.customerName}} -->
 						<view class="customerName">货主-{{index+1}}</view>
@@ -52,32 +52,37 @@
 							车牌号-{{index1+1}}
 						</view>
 						<view class="right">
-							<input v-model='item1.carNo' @click.stop="handleShowKeyboard(index,index1)":disabled="true" placeholder="输入7位车牌号" name="input"></input>
-							
+							<input class="car-uumber" 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'
-										src="https://taohaoliang.oss-cn-beijing.aliyuncs.com/app/tmp/jia%402x.png"></image>
+										src="https://taohaoliang.oss-cn-beijing.aliyuncs.com/app/tmp/jia%402x.png">
+									</image>
 								</view>
 								<view @click="delCarNumber(item.carNumberList,index1)">
 									<image class='row4-img'
-										src="https://taohaoliang.oss-cn-beijing.aliyuncs.com/app/tmp/jian%402x.png"></image>
+										src="https://taohaoliang.oss-cn-beijing.aliyuncs.com/app/tmp/jian%402x.png">
+									</image>
 								</view>
 							</view>
 						</view>
-				
+
 					</view>
-					
+
 				</view>
 			</view>
-			<view  v-if='!status' class='add-good-people' @click='addGoodPeople'>
+			<view v-if='!status' class='add-good-people' @click='addGoodPeople'>
 				<image class="img"
 					src="https://taohaoliang.oss-cn-beijing.aliyuncs.com/app/tmp/ic_join_dialing_norm%402x.png"
 					@click="reduceBtn(index)"></image>增加货主
 			</view>
 		</view>
-		<master-keyboard ref="keyboard" keyboardtype="car" :randomNumber="true" :newCar="false" :defaultValue="carNo" @keyboardClick="handleClick"></master-keyboard>
+		<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='提示'
@@ -101,8 +106,8 @@
 			return {
 				isShowAlert: false,
 				isShowAlert1: false,
-				index:0,
-				index1:0,
+				index: 0,
+				index1: 0,
 				content: '当前登入信息验证失败,是否重新登录?',
 				content1: '确定提交送粮信息?',
 				// show: false,
@@ -111,11 +116,11 @@
 					name: '123'
 				}],
 				nameList: [],
-				carNo:'',
+				carNo: '',
 				warehouseNameAddress: '',
 				startDate: "",
-				goodsName:'',
-				status:false,
+				goodsName: '',
+				status: false,
 				dataList: {
 					warehouseName: "",
 					validityDate: '',
@@ -131,17 +136,17 @@
 						}]
 					}]
 				},
-				goodsnameList:[],
+				goodsnameList: [],
 				selectObj: {},
-				goodsNameshow:false,
+				goodsNameshow: false,
 				nameListCopy: []
 			}
 		},
 
 		onLoad(options) {
-			
+
 			let _pageToData = JSON.parse(options.itemValue)
-			this.warehouseId=_pageToData.warehouseId
+			this.warehouseId = _pageToData.warehouseId
 			this.dataList.warehouseName = _pageToData.warehouseName
 			this.startDate = this.getTime()[0]
 			this.dataList.validityDate = this.getTime()[1]
@@ -163,51 +168,51 @@
 				warehouseId: this.warehouseId
 			}).then(res => {
 				if (res.data.code == 200) {
-					this.goodsName=res.data.data[0].goodsName
+					this.goodsName = res.data.data[0].goodsName
 					this.goodsnameList = res.data.data
 				}
 			})
 			console.log("hasLogin", this.hasLogin)
 		},
 		methods: {
-			goodsnameConfirm(e){
-				this.goodsName=this.goodsnameList[e[0]].goodsName
+			goodsnameConfirm(e) {
+				this.goodsName = this.goodsnameList[e[0]].goodsName
 				this.getCustomer()
 			},
-			showgoodsName(){
-				this.goodsNameshow=true
+			showgoodsName() {
+				this.goodsNameshow = true
 			},
-			hidden(){
-				this.carNo=''
-				if(this.$refs.keyboard.open){
-					this.$refs.keyboard.open(false)//true 键盘显示 false 键盘隐藏
-				}else{
+			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
+			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{
+				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
+			handleClick(e) {
+				this.carNo = e.value
 				this.dataList.shippingInformationList[this.index].carNumberList[this.index1].carNo = e.value //键盘输入值
 			},
 			showCustomerName(value, index) {
@@ -216,25 +221,26 @@
 				value.showCustomerName = true
 			},
 			getCustomer() {
-				var that=this
+				var that = this
 				let _data = {
 					commonId: uni.getStorageSync("userInfo").id,
-					warehouseId:this.warehouseId,
-					goodsName:this.goodsName
+					warehouseId: this.warehouseId,
+					goodsName: this.goodsName
 				}
 				this.$api.doRequest('get', '/identityAuthenticationInfo/identityAuthenticationInfoUser', _data).then(
 					res => {
 						if (res.data.code == 200) {
 							this.nameList = res.data.data
-							if(res.data.data.length>0){
-							that.status=false
+							if (res.data.data.length > 0) {
+								that.status = false
 								this.dataList.shippingInformationList[0].identityId = res.data.data[0].id
 								this.dataList.shippingInformationList[0].shipperName = res.data.data[0].customerName
-								this.dataList.shippingInformationList[0].supplier = res.data.data[0].supplier ? res.data
+								this.dataList.shippingInformationList[0].supplier = res.data.data[0].supplier ? res
+									.data
 									.data[0].supplier : '无'
-							}else{
-								that.status=true
-								this.$api.msg('当前客户的'+this.goodsName+'送粮量达到上限')
+							} else {
+								that.status = true
+								this.$api.msg('当前客户的' + this.goodsName + '送粮量达到上限')
 							}
 						}
 					})
@@ -339,8 +345,8 @@
 				this.isShowAlert1 = false
 			},
 			addGoodPeople() {
-				if(this.status==true){
-					this.$api.msg('当前客户的'+this.goodsName+'送粮量达到上限')
+				if (this.status == true) {
+					this.$api.msg('当前客户的' + this.goodsName + '送粮量达到上限')
 					return
 				}
 				// 判断是否还有剩余的货主
@@ -437,25 +443,33 @@
 			.start-time {
 				font-size: 24rpx;
 				color: #878C9C;
-				margin: 6rpx 0;
+				margin: 10rpx 0;
 			}
 		}
+
+		.row3 {
+			margin-bottom: 10rpx;
+		}
 	}
 
 	.content2 {
 		.row {
-			margin: 20rpx 0;
+			padding: 28rpx 0;
+			border-bottom: 1px solid #EEEEEE;
 		}
 
 		.row1 {
 			display: flex;
 			justify-content: space-between;
+			padding-top: 0rpx;
 
 			image {
 				width: 32rpx;
 				height: 32rpx;
 			}
 
+			border: none;
+
 			.customerName {
 				font-size: 28rpx;
 				font-weight: 700;
@@ -473,6 +487,11 @@
 				display: flex;
 			}
 		}
+
+		.row4:last-child {
+			padding-bottom: 0;
+			border: none;
+		}
 	}
 
 	.row4 {
@@ -528,4 +547,8 @@
 	.content {
 		padding-bottom: 200rpx;
 	}
+
+	.car-uumber {
+		font-size: 28rpx;
+	}
 </style>