Sfoglia il codice sorgente

前端 小程序sdy

zhongtianhaoyuan 3 anni fa
parent
commit
2a3b4809b3

+ 1 - 0
pageD/identity/companyIdentityThree.vue

@@ -252,6 +252,7 @@
 			
 				this.identityAuthenticationInfo.commonId = this.userInfo.id
 				this.identityAuthenticationInfo.payeeAddressUrl = this.bankid.toString()
+				this.identityAuthenticationInfo.compId = "2710b21efc1e4393930c5dc800010dc4"
 				this.amendprice()
 				if(this.verification == false){
 					return

+ 373 - 296
pageD/warehousings/ex_warehouse.vue

@@ -23,19 +23,19 @@
 			<view class="c-row ">
 				<text class="tit">车牌号</text>
 				<view class="con-list">
-					<text>{{WarehouseInOutInfo1.carNo}}</text>
+					<text>{{WarehouseInOutInfo.carNo}} ({{WarehouseInOutInfo.tranCarNo}})</text>
 				</view>
 			</view>
 			<view class="c-row ">
 				<text class="tit">箱号</text>
 				<view class="con-list">
-					<text>{{WarehouseInOutInfo1.boxNo}}</text>
+					<text>{{WarehouseInOutInfo.boxNo}}</text>
 				</view>
 			</view>
 			<view class="c-row ">
 				<text class="tit">封号</text>
 				<view class="con-list">
-					<text>{{WarehouseInOutInfo1.titleNo}}</text>
+					<text>{{WarehouseInOutInfo.titleNo}}</text>
 				</view>
 			</view>
 		</view>
@@ -46,15 +46,16 @@
 					<text class="tit">毛重(吨)</text>
 					<view style="color: #ff0000; padding-left: 10rpx;">*</view>
 					<view class="con-list">
-						<input placeholder-style="font-size:14px" placeholder="请输入毛重" name="input" v-model="WarehouseInOutInfo.grossWeight" @input="grossWeightInput"></input>
+						<input placeholder-style="font-size:14px" placeholder="请输入毛重" name="input"
+							v-model="WarehouseInOutInfo.grossWeight" @input="grossWeightInput"></input>
 					</view>
 				</view>
 				<view class="c-row b-b">
 					<view class="tit">皮重(吨)</view>
 					<view style="color: #ff0000; padding-left: 10rpx;">*</view>
 					<view class="con-list">
-						<input placeholder-style="font-size:14px" placeholder="请输入皮重" name="input" v-model="WarehouseInOutInfo.tare"
-							@input="tareInput"></input>
+						<input placeholder-style="font-size:14px" placeholder="请输入皮重" name="input"
+							v-model="WarehouseInOutInfo.tare" @input="tareInput"></input>
 					</view>
 				</view>
 				<view class="c-row b-b">
@@ -67,127 +68,134 @@
 					<text class="tit">仓库</text>
 					<view style="color: #ff0000; padding-left: 10rpx;">*</view>
 					<view class="con-list">
-						<text @click=''>{{WarehouseInOutInfo.warehouseName}}</text>
+						<picker @change="warehouseChange" :value="warehouseIndex" :range="warehouse" class="con-list">
+							<view>
+								{{warehouseIndex>-1?warehouse[warehouseIndex]:'请选择仓库'}}
+							</view>
+						</picker>
 					</view>
 				</view>
 				<view class="c-row b-b">
 					<view class="title">仓位号</view>
 					<view style="color: #ff0000; padding-left: 10rpx;">*</view>
-					<view class="con-list">
-						<input placeholder-style="font-size:14px" placeholder="请输入仓位号" name="input" v-model="WarehouseInOutInfo.binNumber"></input>
-					</view>
+					<picker @change="warehouseChange1" :value="warehouseIndex1" :range="warehouse1" class="con-list">
+						<view>
+							{{warehouseIndex1>-1?warehouse1[warehouseIndex1]:'请选择仓位号'}}
+						</view>
+					</picker>
 				</view>
-			
+
 				<view class="c-row b-b">
 					<text class="tit">出库类型 </text>
 					<picker @change="ruChange" :value="ruIndex" :range="ruType" class="con-list">
-						<view >
+						<view>
 							{{ruIndex>-1?ruType[ruIndex]:'请选择出库类型'}}
 						</view>
 					</picker>
 				</view>
 				<view class="c-row b-b">
 					<text class="tit">出库日期</text>
-					
-					<view class="con-list" @click="show = true">{{WarehouseInOutInfo.inOutDate!=''?WarehouseInOutInfo.inOutDate:time}}</view>
-					<u-picker  :params='params' :default-time='time' @confirm="DateChange" v-model="show" mode="time"></u-picker>
-					
+
+					<view class="con-list" @click="show = true">
+						{{WarehouseInOutInfo.inOutDate!=''?WarehouseInOutInfo.inOutDate:time}}
+					</view>
+					<u-picker :params='params' :default-time='time' @confirm="DateChange" v-model="show" mode="time">
+					</u-picker>
+
 				</view>
 				<view class="c-row ">
 					<text class="tit">上传磅单照片</text>
 				</view>
-				<upload
-					class="upload"
-					ref="upload"
-					:action="action"
-					:max-size="maxSize"
-					:max-count="1"
-					:size-type="['compressed']"
-					@on-success="getImgUrl"
-					@on-remove="onRemove"
-					@on-uploaded="isAdd = true"
-					:before-upload="filterFileType"
-				></upload>
+				<upload class="upload" ref="upload" :action="action" :max-size="maxSize" :max-count="1"
+					:size-type="['compressed']" @on-success="getImgUrl" @on-remove="onRemove"
+					@on-uploaded="isAdd = true" :before-upload="filterFileType"></upload>
 			</view>
 		</view>
-			
-
 		<view class="center">
 			<view class="title_c ">化验信息</view>
 			<view class="c-list">
 				<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' placeholder-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 placeholder-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>
-					</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>
-					</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>
-					</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>
-					</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>
+							<view class="con-list">
+								<input placeholder-style="font-size:14px" placeholder="请输入水分占比" name="input"
+									v-model="list.waterContent"></input>
+							</view>
 					</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.imperfectGrain"></input>
+					<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>
+						</view>
 					</view>
-				</view>
-				<view class="c-row b-b">
-					<text class="tit">品级 </text>
-					<picker @change="pinChange" :value="pinIndex" :range="pinType" class="con-list">
-						<view >
-							{{pinIndex>-1?pinType[pinIndex]:'请选择品级'}}
+					<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>
+								</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>
+									</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>
+										</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.imperfectGrain"></input>
+											</view>
+									</view>
+									<view class="c-row b-b">
+										<text class="tit">品级 </text>
+										<picker @change="pinChange" :value="pinIndex" :range="pinType" class="con-list">
+											<view>
+												{{pinIndex>-1?pinType[pinIndex]:'请选择品级'}}
+											</view>
+										</picker>
+									</view>
+								</view>
+							</view>
+							<!-- 底部操作菜单 -->
+							<view class="page-bottom1">
+								<view>
+									<button type="primary" @click="commit1">暂 存</button>
+									<button @click="commit" type="primary" class=" action-btn no-border add-cart-btn">提
+										交</button>
+								</view>
+							</view>
 						</view>
-					</picker>
-				</view>
-			</view>
-		</view>
-	<!-- 底部操作菜单 -->
-	<view class="page-bottom1">
-		<view>
-			<button type="primary" @click="commit1">暂 存</button>
-			<button  @click="commit"  type="primary" class=" action-btn no-border add-cart-btn" >提 交</button>
-		</view>
-	</view>
-</view>
-
 </template>
 <script>
-import upload from '@/components/upload.vue';
+	import upload from '@/components/upload.vue';
 	export default {
-	components:{upload},
+		components: {
+			upload
+		},
 		data() {
 			return {
 				packingType: [],
@@ -195,7 +203,7 @@ import upload from '@/components/upload.vue';
 				goods: {},
 				list: {},
 				WarehouseInOutInfo: {
-					inOutDate:'',
+					inOutDate: '',
 					warehouseInOutDetail: {},
 					pcFlag: 0,
 					contractNo: {},
@@ -212,70 +220,117 @@ import upload from '@/components/upload.vue';
 				rutypes: '',
 				ruType: ['销售出库', '移库出库', '暂存出库', '贸易服务出库', '采购出库'],
 				action: this.$uploadUrl,
-				maxSize: 5 * 1024 * 1024,//限制文件大小 5M
+				maxSize: 5 * 1024 * 1024, //限制文件大小 5M
 				btnLoading: false, //防止重复点击
 				imgUrls: [],
+				warehouse:[],
+				warehouseIndex:-1,
+				warehouse1:[],
+				warehouseIndex1:-1,
+				warehouselist: [],
 				isAdd: true,
-				params:{
+				params: {
 					year: true,
 					month: true,
 					day: true,
 				},
-				show:false
+				show: false
 			}
 		},
 		computed: {
-				time() {
-					var date=new Date()
-					var year=date.getFullYear()
-					var month=date.getMonth()
-					var date1=date.getDate()
-					if(month+1<10){
-						month="0"+(month+1)
-					}
-					if(date1+1<10){
-						date1="0"+date1
-					}
-					return year+'-'+month+"-"+date1
-				},
-				startDate() {
+			time() {
+				var date = new Date()
+				var year = date.getFullYear()
+				var month = date.getMonth()
+				var date1 = date.getDate()
+				if (month + 1 < 10) {
+					month = "0" + (month + 1)
+				}
+				if (date1 + 1 < 10) {
+					date1 = "0" + date1
+				}
+				return year + '-' + month + "-" + date1
+			},
+			startDate() {
 				//限制开始时间;
 				//也可以直接限定为当天日期 var date= new Date(); return date
-					return new Date(new Date(new Date().toLocaleDateString()).getTime()-(1*60*60*1000))
-				},
-				endDate() {
-					return new Date()
-				}
+				return new Date(new Date(new Date().toLocaleDateString()).getTime() - (1 * 60 * 60 * 1000))
 			},
-			onShow(){
-				this.$api.doRequest('get', '/warehouseBaseInfo/selectWarehouse', {compId:'2710b21efc1e4393930c5dc800010dc4',warehouseType:1,}).then(res => {
-			console.log(res)
-			})
-			this.$api.doRequest('get', '/warehouseBaseInfo/getWarehouse', {compId:'',warehouseType:1,}).then(res => {
-			console.log(res)
+			endDate() {
+				return new Date()
+			}
+		},
+		onShow() {
+			this.$api.doRequest('get', '/warehouseBaseInfo/selectWarehouse', {
+				compId: '2710b21efc1e4393930c5dc800010dc4',
+				warehouseType: 1,
+			}).then(res => {
+				if (res.data.code == 200) {
+					var arr = []
+					for (var i = 0; i < res.data.data.length; i++) {
+						if (res.data.data[i].warehouseName == this.WarehouseInOutInfo.warehouseName) {
+							this.warehouseIndex = i
+						}
+						arr.push(res.data.data[i].warehouseName)
+					}
+					this.warehouselist = res.data.data
+					this.warehouse = arr
+				}
+
 			})
-			},
+			this.$api.doRequest('get', '/warehouseBaseInfo/getWarehouse', {
+				compId: '',
+				warehouseType: 1,
+			}).then(res => {})
+		},
 		onLoad(option) {
 			this.WarehouseInOutInfo.contractNo = option.contractNo
 			this.WarehouseInOutInfo.goodsName = option.goodsName
-			this.WarehouseInOutInfo.startWeight = option.startWeight
-			this.WarehouseInOutInfo1.carNo = option.carNo + '(' + option.tranCarNo + ')'
-			this.WarehouseInOutInfo.warehouseName = option.warehouseName
+			this.WarehouseInOutInfo.consignee = option.consignee
+			this.WarehouseInOutInfo.boxNo = option.boxNo
+			this.WarehouseInOutInfo.tranCarNo = option.tranCarNo
+			this.WarehouseInOutInfo.titleNo = option.titleNo
 			this.WarehouseInOutInfo.id = option.id
 			this.WarehouseInOutInfo.carNo = option.carNo
-			var date=new Date()
-			var year=date.getFullYear()
-			var month=date.getMonth()
-			var date1=date.getDate()
-			if(month+1<10){
-				month="0"+(month+1)
+			var date = new Date()
+			var year = date.getFullYear()
+			var month = date.getMonth()
+			var date1 = date.getDate()
+			if (month + 1 < 10) {
+				month = "0" + (month + 1)
 			}
-			this.time = year+'-'+month+"-"+date1
+			this.time = year + '-' + month + "-" + date1
 		},
 		methods: {
-			
+			warehouseChange(e) {
+				var id = ''
+				this.warehouseIndex = e.detail.value
+				this.WarehouseInOutInfo.warehouseName = this.warehouse[this.warehouseIndex]
+				for (var i = 0; i < this.warehouselist.length; i++) {
+					if (this.warehouselist[i].warehouseName == this.WarehouseInOutInfo.warehouseName) {
+						id = this.warehouselist[i].id
+					}
+				}
+				this.$api.doRequest('get', '/warehouseBaseInfo/getWarehouse', {
+					id: id,
+				}).then(res => {
+					var arr = []
+					for (var i = 0; i < res.data.data.warehousePositionInfoList.length; i++) {
+						console.log(res.data.data.warehousePositionInfoList[i])
+						arr.push(res.data.data.warehousePositionInfoList[i].binNumber)
+					}
+					this.warehouse1 = arr
+					this.warehouselist11 = res.data.data
+				})
+			},
+			warehouseChange1(e) {
+				var id = ''
+				this.warehouseIndex1 = e.detail.value
+				this.WarehouseInOutInfo.binNumber = this.warehouse1[this.warehouseIndex1]
+			},
+
 			DateChange(e) {
-				this.WarehouseInOutInfo.inOutDate=e.year+'-'+e.month+'-'+e.day
+				this.WarehouseInOutInfo.inOutDate = e.year + '-' + e.month + '-' + e.day
 			},
 			filterFileType(index, lists) {
 				if (lists[index].fileType != 'jpg' && lists[index].fileType != 'png' && lists[index].fileType != 'gif') {
@@ -296,118 +351,125 @@ import upload from '@/components/upload.vue';
 				this.imgUrls.splice(index, 1);
 			},
 			commit1() {
-				if(this.WarehouseInOutInfo.grossWeight>100||this.WarehouseInOutInfo.grossWeight<1){
-					this.$api.msg('毛重输入错误')
-					return
-				}
-				if(this.WarehouseInOutInfo.grossWeight.indexOf('.')!=-1){
-					if(this.WarehouseInOutInfo.grossWeight.split('.')[1].length>2){
-						this.$api.msg('毛重输入错误')
-						return
-					}
-				}
-				if(this.WarehouseInOutInfo.tare>50||this.WarehouseInOutInfo.tare<1){
-					this.$api.msg('皮重输入错误')
-					return
-				}
-				if(this.WarehouseInOutInfo.tare.indexOf('.')!=-1){
-					if(this.WarehouseInOutInfo.tare.split('.')[1].length>2){
-						this.$api.msg('皮重输入错误')
-						return
-					}
-				}
-				if(this.list.qualityInspector&&this.list.qualityInspector<2||this.list.qualityInspector&&this.list.qualityInspector>10){
-					this.$api.msg('质检员姓名输入错误')
-					return
-				}
-				if(this.list.protein&&this.list.protein<1||this.list.protein&&this.list.protein>80){
-					this.$api.msg('蛋白占比输入错误')
-					return
-				}
-				if(this.list.protein&&this.list.protein.indexOf('.')!=-1){
-					if(this.list.protein.split('.')[1].length>2){
-						this.$api.msg('蛋白占比输入错误')
-						return
-					}
-				}
-				if(this.list.waterContent&&this.list.waterContent<1||this.list.waterContent&&this.list.waterContent>40){
-					this.$api.msg('水分输入错误')
-					return
-				}
-				if(this.list.waterContent&&this.list.waterContent.indexOf('.')!=-1){
-					if(this.list.waterContent.split('.')[1].length>2){
-						this.$api.msg('水分输入错误')
-						return
-					}
-				}
-				if(this.list.bulkDensity&&this.list.bulkDensity<1||this.list.bulkDensity&&this.list.bulkDensity>40){
-					this.$api.msg('容重输入错误')
-					return
-				}
-				if(this.list.bulkDensity&&this.list.bulkDensity.indexOf('.')!=-1){
-					if(this.list.bulkDensity.split('.')[1].length>2){
-						this.$api.msg('容重输入错误')
-						return
-					}
-				}
-				if(this.list.jiaorenli&&this.list.jiaorenli<1||this.list.jiaorenli&&this.list.jiaorenli>40){
-					this.$api.msg('热损伤输入错误')
-					return
-				}
-				if(this.list.jiaorenli&&this.list.jiaorenli.indexOf('.')!=-1){
-					if(this.list.jiaorenli.split('.')[1].length>2){
-						this.$api.msg('热损伤输入错误')
-						return
-					}
-				}
-				if(this.list.impurity&&this.list.impurity<1||this.list.impurity&&this.list.impurity>40){
-					this.$api.msg('杂质输入错误')
-					return
-				}
-				if(this.list.impurity&&this.list.impurity.indexOf('.')!=-1){
-					if(this.list.impurity.split('.')[1].length>2){
-						this.$api.msg('杂质输入错误')
-						return
-					}
-				}
-				if(this.list.mildewGrain&&this.list.mildewGrain<1||this.list.mildewGrain&&this.list.mildewGrain>40){
-					this.$api.msg('霉变粒输入错误')
-					return
-				}
-				if(this.list.mildewGrain&&this.list.mildewGrain.indexOf('.')!=-1){
-					if(this.list.mildewGrain.split('.')[1].length>2){
-						this.$api.msg('霉变粒输入错误')
-						return
-					}
-				}
-				if(this.list.imperfectGrain&&this.list.imperfectGrain<1||this.list.imperfectGrain&&this.list.imperfectGrain>40){
-					this.$api.msg('不完整粒输入错误')
-					return
-				}
-				if(this.list.imperfectGrain&&this.list.imperfectGrain.indexOf('.')!=-1){
-					if(this.list.imperfectGrain.split('.')[1].length>2){
-						this.$api.msg('不完整粒输入错误')
-						return
-					}
-				}
-				uni.showLoading({
-					title:"正在暂存"
-				})
-				this.WarehouseInOutInfo.deductionAmount=-this.WarehouseInOutInfo.deductionAmount
+				// if (this.WarehouseInOutInfo.grossWeight > 100 || this.WarehouseInOutInfo.grossWeight < 1) {
+				// 	this.$api.msg('毛重输入错误')
+				// 	return
+				// }
+				// if (this.WarehouseInOutInfo.grossWeight.indexOf('.') != -1) {
+				// 	if (this.WarehouseInOutInfo.grossWeight.split('.')[1].length > 2) {
+				// 		this.$api.msg('毛重输入错误')
+				// 		return
+				// 	}
+				// }
+				// if (this.WarehouseInOutInfo.tare > 50 || this.WarehouseInOutInfo.tare < 1) {
+				// 	this.$api.msg('皮重输入错误')
+				// 	return
+				// }
+				// if (this.WarehouseInOutInfo.tare.indexOf('.') != -1) {
+				// 	if (this.WarehouseInOutInfo.tare.split('.')[1].length > 2) {
+				// 		this.$api.msg('皮重输入错误')
+				// 		return
+				// 	}
+				// }
+				// if (this.list.qualityInspector && this.list.qualityInspector < 2 || this.list.qualityInspector && this.list
+				// 	.qualityInspector > 10) {
+				// 	this.$api.msg('质检员姓名输入错误')
+				// 	return
+				// }
+				// if (this.list.protein && this.list.protein < 1 || this.list.protein && this.list.protein > 80) {
+				// 	this.$api.msg('蛋白占比输入错误')
+				// 	return
+				// }
+				// if (this.list.protein && this.list.protein.indexOf('.') != -1) {
+				// 	if (this.list.protein.split('.')[1].length > 2) {
+				// 		this.$api.msg('蛋白占比输入错误')
+				// 		return
+				// 	}
+				// }
+				// if (this.list.waterContent && this.list.waterContent < 1 || this.list.waterContent && this.list
+				// 	.waterContent > 40) {
+				// 	this.$api.msg('水分输入错误')
+				// 	return
+				// }
+				// if (this.list.waterContent && this.list.waterContent.indexOf('.') != -1) {
+				// 	if (this.list.waterContent.split('.')[1].length > 2) {
+				// 		this.$api.msg('水分输入错误')
+				// 		return
+				// 	}
+				// }
+				// if (this.list.bulkDensity && this.list.bulkDensity < 1 || this.list.bulkDensity && this.list.bulkDensity >
+				// 	40) {
+				// 	this.$api.msg('容重输入错误')
+				// 	return
+				// }
+				// if (this.list.bulkDensity && this.list.bulkDensity.indexOf('.') != -1) {
+				// 	if (this.list.bulkDensity.split('.')[1].length > 2) {
+				// 		this.$api.msg('容重输入错误')
+				// 		return
+				// 	}
+				// }
+				// if (this.list.jiaorenli && this.list.jiaorenli < 1 || this.list.jiaorenli && this.list.jiaorenli > 40) {
+				// 	this.$api.msg('热损伤输入错误')
+				// 	return
+				// }
+				// if (this.list.jiaorenli && this.list.jiaorenli.indexOf('.') != -1) {
+				// 	if (this.list.jiaorenli.split('.')[1].length > 2) {
+				// 		this.$api.msg('热损伤输入错误')
+				// 		return
+				// 	}
+				// }
+				// if (this.list.impurity && this.list.impurity < 1 || this.list.impurity && this.list.impurity > 40) {
+				// 	this.$api.msg('杂质输入错误')
+				// 	return
+				// }
+				// if (this.list.impurity && this.list.impurity.indexOf('.') != -1) {
+				// 	if (this.list.impurity.split('.')[1].length > 2) {
+				// 		this.$api.msg('杂质输入错误')
+				// 		return
+				// 	}
+				// }
+				// if (this.list.mildewGrain && this.list.mildewGrain < 1 || this.list.mildewGrain && this.list.mildewGrain >
+				// 	40) {
+				// 	this.$api.msg('霉变粒输入错误')
+				// 	return
+				// }
+				// if (this.list.mildewGrain && this.list.mildewGrain.indexOf('.') != -1) {
+				// 	if (this.list.mildewGrain.split('.')[1].length > 2) {
+				// 		this.$api.msg('霉变粒输入错误')
+				// 		return
+				// 	}
+				// }
+				// if (this.list.imperfectGrain && this.list.imperfectGrain < 1 || this.list.imperfectGrain && this.list
+				// 	.imperfectGrain > 40) {
+				// 	this.$api.msg('不完整粒输入错误')
+				// 	return
+				// }
+				// if (this.list.imperfectGrain && this.list.imperfectGrain.indexOf('.') != -1) {
+				// 	if (this.list.imperfectGrain.split('.')[1].length > 2) {
+				// 		this.$api.msg('不完整粒输入错误')
+				// 		return
+				// 	}
+				// }
+				// uni.showLoading({
+				// 	title: "正在暂存"
+				// })
+				this.WarehouseInOutInfo.deductionAmount = -this.WarehouseInOutInfo.deductionAmount
 				this.WarehouseInOutInfo.warehouseInOutDetail = this.list
 				this.WarehouseInOutInfo.statusFlag = 1
-				if(this.imgUrls.length > 0){
+				if (this.imgUrls.length > 0) {
 					this.WarehouseInOutInfo.addressUrl = this.imgUrls[0]
 				}
+				console.log(this.WarehouseInOutInfo,"卖粮对象")
+				return
 				this.$api.doRequest('post', '/warehouseInOutInfo/InOutWarehouse', this.WarehouseInOutInfo).then(res => {
-					if(res.data.code==200){
+					if (res.data.code == 200) {
 						uni.showToast({
 							title: '暂存成功',
 							icon: 'none',
 							duration: 2000
 						})
 						uni.navigateBack({})
-					}else{
+					} else {
 						uni.showToast({
 							title: res.data.message,
 							icon: 'none',
@@ -415,7 +477,7 @@ import upload from '@/components/upload.vue';
 						})
 					}
 					uni.hideLoading()
-					
+
 				}).catch(res => {
 					uni.showToast({
 						title: res.data.message,
@@ -426,128 +488,133 @@ import upload from '@/components/upload.vue';
 				})
 			},
 			commit() {
-				if(!this.WarehouseInOutInfo.grossWeight){
+				if (!this.WarehouseInOutInfo.grossWeight) {
 					this.$api.msg('毛重不能为空')
 					return
 				}
-				if(!this.WarehouseInOutInfo.tare){
+				if (!this.WarehouseInOutInfo.tare) {
 					this.$api.msg('皮重不能为空')
 					return
 				}
-				if(!this.WarehouseInOutInfo.warehouseName){
+				if (!this.WarehouseInOutInfo.warehouseName) {
 					this.$api.msg('仓库不能为空')
 					return
 				}
-				if(!this.WarehouseInOutInfo.binNumber){
+				if (!this.WarehouseInOutInfo.binNumber) {
 					this.$api.msg('仓库不能为空')
 					return
 				}
-				if(this.WarehouseInOutInfo.grossWeight>100||this.WarehouseInOutInfo.grossWeight<1){
+				if (this.WarehouseInOutInfo.grossWeight > 100 || this.WarehouseInOutInfo.grossWeight < 1) {
 					this.$api.msg('毛重输入错误')
 					return
 				}
-				if(this.WarehouseInOutInfo.grossWeight.indexOf('.')!=-1){
-					if(this.WarehouseInOutInfo.grossWeight.split('.')[1].length>2){
+				if (this.WarehouseInOutInfo.grossWeight.indexOf('.') != -1) {
+					if (this.WarehouseInOutInfo.grossWeight.split('.')[1].length > 2) {
 						this.$api.msg('毛重输入错误')
 						return
 					}
 				}
-				if(this.WarehouseInOutInfo.tare>50||this.WarehouseInOutInfo.tare<1){
+				if (this.WarehouseInOutInfo.tare > 50 || this.WarehouseInOutInfo.tare < 1) {
 					this.$api.msg('皮重输入错误')
 					return
 				}
-				if(this.WarehouseInOutInfo.tare.indexOf('.')!=-1){
-					if(this.WarehouseInOutInfo.tare.split('.')[1].length>2){
+				if (this.WarehouseInOutInfo.tare.indexOf('.') != -1) {
+					if (this.WarehouseInOutInfo.tare.split('.')[1].length > 2) {
 						this.$api.msg('皮重输入错误')
 						return
 					}
 				}
-				if(this.list.qualityInspector&&this.list.qualityInspector<2||this.list.qualityInspector&&this.list.qualityInspector>10){
+				if (this.list.qualityInspector && this.list.qualityInspector < 2 || this.list.qualityInspector && this.list
+					.qualityInspector > 10) {
 					this.$api.msg('质检员姓名输入错误')
 					return
 				}
-				if(this.list.protein&&this.list.protein<1||this.list.protein&&this.list.protein>80){
+				if (this.list.protein && this.list.protein < 1 || this.list.protein && this.list.protein > 80) {
 					this.$api.msg('蛋白占比输入错误')
 					return
 				}
-				if(this.list.protein&&this.list.protein.indexOf('.')!=-1){
-					if(this.list.protein.split('.')[1].length>2){
+				if (this.list.protein && this.list.protein.indexOf('.') != -1) {
+					if (this.list.protein.split('.')[1].length > 2) {
 						this.$api.msg('蛋白占比输入错误')
 						return
 					}
 				}
-				if(this.list.waterContent&&this.list.waterContent<1||this.list.waterContent&&this.list.waterContent>40){
+				if (this.list.waterContent && this.list.waterContent < 1 || this.list.waterContent && this.list
+					.waterContent > 40) {
 					this.$api.msg('水分输入错误')
 					return
 				}
-				if(this.list.waterContent&&this.list.waterContent.indexOf('.')!=-1){
-					if(this.list.waterContent.split('.')[1].length>2){
+				if (this.list.waterContent && this.list.waterContent.indexOf('.') != -1) {
+					if (this.list.waterContent.split('.')[1].length > 2) {
 						this.$api.msg('水分输入错误')
 						return
 					}
 				}
-				if(this.list.bulkDensity&&this.list.bulkDensity<1||this.list.bulkDensity&&this.list.bulkDensity>40){
+				if (this.list.bulkDensity && this.list.bulkDensity < 1 || this.list.bulkDensity && this.list.bulkDensity >
+					40) {
 					this.$api.msg('容重输入错误')
 					return
 				}
-				if(this.list.bulkDensity&&this.list.bulkDensity.indexOf('.')!=-1){
-					if(this.list.bulkDensity.split('.')[1].length>2){
+				if (this.list.bulkDensity && this.list.bulkDensity.indexOf('.') != -1) {
+					if (this.list.bulkDensity.split('.')[1].length > 2) {
 						this.$api.msg('容重输入错误')
 						return
 					}
 				}
-				if(this.list.jiaorenli&&this.list.jiaorenli<1||this.list.jiaorenli&&this.list.jiaorenli>40){
+				if (this.list.jiaorenli && this.list.jiaorenli < 1 || this.list.jiaorenli && this.list.jiaorenli > 40) {
 					this.$api.msg('热损伤输入错误')
 					return
 				}
-				if(this.list.jiaorenli&&this.list.jiaorenli.indexOf('.')!=-1){
-					if(this.list.jiaorenli.split('.')[1].length>2){
+				if (this.list.jiaorenli && this.list.jiaorenli.indexOf('.') != -1) {
+					if (this.list.jiaorenli.split('.')[1].length > 2) {
 						this.$api.msg('热损伤输入错误')
 						return
 					}
 				}
-				if(this.list.impurity&&this.list.impurity<1||this.list.impurity&&this.list.impurity>40){
+				if (this.list.impurity && this.list.impurity < 1 || this.list.impurity && this.list.impurity > 40) {
 					this.$api.msg('杂质输入错误')
 					return
 				}
-				if(this.list.impurity&&this.list.impurity.indexOf('.')!=-1){
-					if(this.list.impurity.split('.')[1].length>2){
+				if (this.list.impurity && this.list.impurity.indexOf('.') != -1) {
+					if (this.list.impurity.split('.')[1].length > 2) {
 						this.$api.msg('杂质输入错误')
 						return
 					}
 				}
-				if(this.list.mildewGrain&&this.list.mildewGrain<1||this.list.mildewGrain&&this.list.mildewGrain>40){
+				if (this.list.mildewGrain && this.list.mildewGrain < 1 || this.list.mildewGrain && this.list.mildewGrain >
+					40) {
 					this.$api.msg('霉变粒输入错误')
 					return
 				}
-				if(this.list.mildewGrain&&this.list.mildewGrain.indexOf('.')!=-1){
-					if(this.list.mildewGrain.split('.')[1].length>2){
+				if (this.list.mildewGrain && this.list.mildewGrain.indexOf('.') != -1) {
+					if (this.list.mildewGrain.split('.')[1].length > 2) {
 						this.$api.msg('霉变粒输入错误')
 						return
 					}
 				}
-				if(this.list.imperfectGrain&&this.list.imperfectGrain<1||this.list.imperfectGrain&&this.list.imperfectGrain>40){
+				if (this.list.imperfectGrain && this.list.imperfectGrain < 1 || this.list.imperfectGrain && this.list
+					.imperfectGrain > 40) {
 					this.$api.msg('不完整粒输入错误')
 					return
 				}
-				if(this.list.imperfectGrain&&this.list.imperfectGrain.indexOf('.')!=-1){
-					if(this.list.imperfectGrain.split('.')[1].length>2){
+				if (this.list.imperfectGrain && this.list.imperfectGrain.indexOf('.') != -1) {
+					if (this.list.imperfectGrain.split('.')[1].length > 2) {
 						this.$api.msg('不完整粒输入错误')
 						return
 					}
 				}
-				this.WarehouseInOutInfo.deductionAmount=-this.WarehouseInOutInfo.deductionAmount
-				if(this.imgUrls.length > 0){
+				this.WarehouseInOutInfo.deductionAmount = -this.WarehouseInOutInfo.deductionAmount
+				if (this.imgUrls.length > 0) {
 					this.WarehouseInOutInfo.addressUrl = this.imgUrls[0]
 				}
 				this.WarehouseInOutInfo.warehouseInOutDetail = this.list
 				this.WarehouseInOutInfo.statusFlag = 3
 				uni.showLoading({
-					title:"正在提交"
+					title: "正在提交"
 				})
-				
+
 				this.$api.doRequest('post', '/warehouseInOutInfo/InOutWarehouse', this.WarehouseInOutInfo).then(res => {
-					if(res.data.code==200){
+					if (res.data.code == 200) {
 						uni.showToast({
 							title: '提交成功',
 							icon: 'none'
@@ -555,7 +622,7 @@ import upload from '@/components/upload.vue';
 						setTimeout(() => {
 							uni.navigateBack({})
 						}, 200)
-					}else{
+					} else {
 						uni.showToast({
 							title: res.data.message,
 							icon: 'none',
@@ -563,7 +630,7 @@ import upload from '@/components/upload.vue';
 						})
 					}
 					uni.hideLoading()
-					
+
 				}).catch(res => {
 					uni.showToast({
 						title: res.data.message,
@@ -607,30 +674,35 @@ import upload from '@/components/upload.vue';
 </script>
 <style scoped lang='scss'>
 	.upload {
+
 		/deep/.u-list-item,
 		.u-add-wrap {
 			background-color: #eceae8;
 		}
 	}
-	.center{
+
+	.center {
 		margin: 15rpx 15rpx 10rpx 15rpx;
-		padding:0rpx 10rpx 30rpx 10rpx;
+		padding: 0rpx 10rpx 30rpx 10rpx;
 		background-color: #FFFFFF;
 		border-radius: 15px;
 	}
-	.title_b{
+
+	.title_b {
 		margin: 20rpx 20rpx 0rpx 20rpx;
-		padding:20rpx 10rpx 20rpx 10rpx;
+		padding: 20rpx 10rpx 20rpx 10rpx;
 		font-size: 18px;
 		font-weight: 550;
 		border-bottom: 1px solid #d6d6d6;
 	}
-	.title_c{
+
+	.title_c {
 		margin: 20rpx 20rpx 0rpx 20rpx;
-		padding:20rpx 10rpx 20rpx 10rpx;
+		padding: 20rpx 10rpx 20rpx 10rpx;
 		font-size: 18px;
 		font-weight: 550;
 	}
+
 	.c-row {
 		display: -webkit-box;
 		display: -webkit-flex;
@@ -686,33 +758,38 @@ import upload from '@/components/upload.vue';
 			border-bottom: 1px solid #ccc;
 		}
 	}
+
 	/* 底部操作菜单 */
 	.page-bottom1 {
 		position: fixed;
 		left: 0;
 		bottom: 0;
 		z-index: 95;
-		width:100%;
+		width: 100%;
 		height: 70px;
 		background: rgba(255, 255, 255, .9);
-		padding:15px;
+		padding: 15px;
 		border-radius: 0;
-		text-align:right;
-		button{
-			display:inline-block;
-			border-radius:18px;
-			margin:0 10px;
-			font-size:14px;background:#fff;
-			color:#333;
-			border:1px solid #333;
+		text-align: right;
+
+		button {
+			display: inline-block;
+			border-radius: 18px;
+			margin: 0 10px;
+			font-size: 14px;
+			background: #fff;
+			color: #333;
+			border: 1px solid #333;
 			padding-left: 50rpx;
 			padding-right: 50rpx;
 		}
-		.action-btn{
-			background:#22C572;
-			color:#fff;
-			border:1px solid #22C572;
+
+		.action-btn {
+			background: #22C572;
+			color: #fff;
+			border: 1px solid #22C572;
 		}
+
 		.p-b-btn {
 			display: flex;
 			flex-direction: column;
@@ -722,32 +799,32 @@ import upload from '@/components/upload.vue';
 			color: $font-color-base;
 			width: 96upx;
 			height: 80upx;
-	
+
 			.yticon {
 				font-size: 40upx;
 				line-height: 48upx;
 				color: $font-color-light;
 			}
-	
+
 			&.active,
 			&.active .yticon {
 				color: $uni-color-primary;
 			}
-	
+
 			.icon-fenxiang2 {
 				font-size: 42upx;
 				transform: translateY(-2upx);
 			}
-	
+
 			.icon-shoucang {
 				font-size: 46upx;
 			}
 		}
-	
-		
+
+
 	}
-	.container{
+
+	.container {
 		padding-bottom: 160upx;
 	}
 </style>
-

+ 14 - 4
pages/task/my_task.vue

@@ -26,9 +26,9 @@
 						{{item.contractNo}}
 					</view>
 					<view class="title-tip-b">{{item.inOutDate}}</view>
-					<!-- <view class="title-tip-b">2021-07-30</view> -->
 				</view>
 				<u-tag :text="item.taskType" type="success"/>
+				<!-- <u-tag :text="item.taskType" type=""/> -->
 				<!-- <u-tag text="入库任务" type="primary" /> -->
 			</view>
 			<view v-show="isLoadMore">
@@ -102,9 +102,6 @@
 			  'Y': date.getFullYear(),
 			  'M+': date.getMonth() + 1,
 			  'd+': date.getDate(),
-			  // 'H+': date.getHours(),
-			  // 'm+': date.getMinutes(),
-			  // 's+': date.getSeconds()
 			 }
 			},
 		},
@@ -187,6 +184,8 @@
 				this.getIndexBuyData()
 			},
 			navToDetailPage(item) {
+				if(item.taskType == "入库任务"){
+					
 				if(item.statusFlag == 3){
 				uni.navigateTo({
 					url: `/pageD/warehousings/warehousingDetails?id=${item.id}`
@@ -196,6 +195,17 @@
 						url: `/pageD/warehousings/warehousings?id=${item.id}&goodsName=${item.goodsName}&contractNo=${item.contractNo}&startWeight=${item.startWeight}&carNo=${item.carNo}&tranCarNo=${item.tranCarNo}&warehouseName=${item.warehouseName}`
 					})
 				}
+			}else if(item.taskType == "出库任务"){
+				if(item.statusFlag == 3){
+				uni.navigateTo({
+					url: `/pageD/warehousings/ex_warehouse_detail?id=${item.id}`
+				})
+				}else{
+					uni.navigateTo({
+						url: `/pageD/warehousings/ex_warehouse?id=${item.id}&goodsName=${item.goodsName}&contractNo=${item.contractNo}&consignee=${item.consignee}&carNo=${item.carNo}&tranCarNo=${item.tranCarNo}&boxNo=${item.boxNo}&titleNo=${item.titleNo}`
+					})
+				}
+			}
 			}
 
 		}