فهرست منبع

修改完善入库

wangchao 3 سال پیش
والد
کامیت
59760a21f0

+ 79 - 68
pages/erp/improvedWrehousing/improvedWrehousing.vue

@@ -1,112 +1,123 @@
 <template>
 	<view class="wrap">
 		<view class="dropdown content1">
-			<view class="left"  @click='show1=true'>
+			<view class="left" @click='show1=true'>
 				<view>{{warehouseName}}</view>
-				<u-icon name="arrow-right" color=""></u-icon>
-				<u-select v-model="show1" :default-value='[0]' :list="warehouseList" @confirm="confirmWarehouse">
-				</u-select>
+				<u-icon name="arrow-right"></u-icon>
+				<u-picker @confirm="warehousechange" range-key='warehouseName' mode="selector" v-model="show1"
+					:range="warehouseList"></u-picker>
 			</view>
-			<view class="right"  @click='show2=true'>
-				<view>{{positionName}}</view>
-				<u-icon name="arrow-right" color=""></u-icon>
-				<u-select v-model="show2" :default-value='[0]' :list="positionList" @confirm="confirmPositon">
-				</u-select>
+			<view class="right" @click='show2=true'>
+				<view>{{binNumber}}仓位</view>
+				<u-icon name="arrow-right"></u-icon>
+				<u-picker @confirm="warehouseCWchange" range-key='binNumber' mode="selector" v-model="show2"
+					:range="warehouseCWList"></u-picker>
 			</view>
 		</view>
 		<view class="content2">
 			<view class="content2-item" v-for="(item,index) in dataList" @click="goDetail(item)">
-				<view class="item-style">{{item.val1}}</view>
-				<view class="item-style">{{item.val2}}</view>
-				<view class="item-style">{{item.val3}}</view>
-				<view class="item-style">{{item.val4}}</view>
+				<view class="item-style">{{item.contractNo}}</view>
+				<view class="item-style">{{item.carNo}}</view>
+				<view class="item-style">{{item.inOutDate}}</view>
+				<view class="item-style">{{item.backOffice}}</view>
 			</view>
 		</view>
 	</view>
 </template>
 
 <script>
+	import helper from '@/common/helper.js';
 	export default {
 		data() {
 			return {
-				show1:false,
-				show2:false,
-				warehouseName: '鲅鱼圈一号库',
-				positionName: '102仓位',
-					warehouseList: [
-						{
-						"label": '1',
-						"value": '1'
-						}
-					],
-					positionList: [
-						{
-						"label": '102仓位',
-						"value": '1'
-						}
-					],
-					dataList:[
-						{
-						val1:'我是合同编号',
-						val2:'我是车牌号',
-						val3:'我是暂存时间',
-						val4:'我是提交人姓名'
-					},
-					{
-						val1:'我是合同编号',
-						val2:'我是车牌号',
-						val3:'我是暂存时间',
-						val4:'我是提交人姓名'
-					},
-					{
-						val1:'我是合同编号',
-						val2:'我是车牌号',
-						val3:'我是暂存时间',
-						val4:'我是提交人姓名'
-					},
-					]
+				show1: false,
+				show2: false,
+				currentPage: 1,
+				pageSize: 9999,
+				positionId: "",
+				binNumber: "",
+				warehouseName: '',
+				positionName: '',
+				warehouseList: [],
+				warehouseCWList: [],
+				dataList: [],
+				allWarehouse: []
 			}
 		},
+		onLoad() {
+
+		},
+		onShow() {
+			console.log("完善入库-仓库信息", helper.erpWarehouse)
+			let _data = helper.erpWarehouse
+			this.warehouseName = _data.warehouseName
+			this.warehouseList = _data.allWarehouse
+			this.warehouseCWList = _data.warehouseCWList
+			this.binNumber = _data.binNumber
+			this.positionId = _data.positionId
+			this.getList()
+		},
 		methods: {
-			confirmWarehouse(){},
-			confirmPositon(){},
-			goDetail(val){
+			getList() {
+				this.$api.doRequest('get', '/warehouseInOutInfo/selectWarehouseInOutInfo', {
+					positionId: this.positionId,
+					baseId: helper.erpWarehouse.warehouseId,
+					currentPage: this.currentPage,
+					pageSize: this.pageSize,
+					inOutFlag: 1
+				}).then(res => {
+					if (res.data.code == 200) {
+						this.dataList = res.data.data.records
+					}
+				})
+			},
+			confirmWarehouse() {},
+			confirmPositon() {},
+			goDetail(val) {
 				uni.navigateTo({
-					url:'improvedWrehousingDetail?data='+val,
-					
+					// /pages/erp/warehousing/selectContractNo
+					url: '/pages/erp/improvedExWaehousing/improvedExWaehousingDetail?data=' + JSON.stringify(val),
 				})
 			}
-			
+
 		}
 	}
 </script>
 
 <style scoped lang="scss">
-	.dropdown{
+	.dropdown {
 		display: flex;
-		margin:20rpx 0;
+		margin: 20rpx 0;
 		justify-content: space-between;
-		.left,.right{
+
+		.left,
+		.right {
 			display: flex;
 		}
 	}
-	.content1{
-		background: red;
-		padding: 20rpx;
+
+	.content1 {
+		padding: 40rpx 20rpx;
 		margin: 20rpx;
 		border-radius: 10rpx;
+		background: #FFFFFF;
 	}
-	.content2{
-		padding: 20rpx;
+
+	.content2 {
+		// padding: 20rpx;
 		margin: 20rpx;
-		border-bottom: 1px solid #ccc;
-		background: yellow;
-		.content2-item{
+		// border-bottom: 1px solid #ccc;
+		background: #FFFFFF;
+		border-radius: 10rpx;
+
+		.content2-item {
+			padding: 20rpx;
 			margin-bottom: 10rpx;
-			border-bottom:1px solid #ccc ;
+			border-bottom: 1px solid #ccc;
 			// padding-bottom: 10px;
 		}
-		.item-style{
+
+		.item-style {
 			display: inline-block;
 			width: 50%;
 		}

+ 7 - 3
pages/erp/index.vue

@@ -66,6 +66,7 @@ import helper from '@/common/helper.js';
 				warehouseId:"",
 				warehouseList: [],
 				warehouseCWList:[],
+				allWarehouse:[],
 				gridCol: 4,
 				gridBorder: false,
 				gridList: [{
@@ -234,7 +235,9 @@ import helper from '@/common/helper.js';
 							binNumber:this.binNumber,
 							compId:this.compId,
 							warehouseId:this.warehouseId,
-							baseId:this.baseId
+							baseId:this.baseId,
+							allWarehouse:this.allWarehouse,
+							warehouseCWList:this.warehouseCWList
 						}
 						uni.navigateTo({
 							url: item.url
@@ -244,7 +247,7 @@ import helper from '@/common/helper.js';
 			},
 			confirmWarehouse() {},
 			confirmPositon() {},
-			compChange(e){debugger
+			compChange(e){
 				this.compName = this.compList[e[0]].compName
 				this.init(this.compList[e[0]].compId)
 			},
@@ -252,9 +255,10 @@ import helper from '@/common/helper.js';
 				console.log(this.userInfo)
 				this.$api.doRequest('get', '/warehouseBaseInfo/selectWarehouseSelf', {
 					compId: compId,
-				}).then(res => {debugger
+				}).then(res => {
 					if (res.data.data.length!=0) {
 						console.log('res',res.data.data)
+							this.allWarehouse = res.data.data
 							this.warehouseName = res.data.data[0].warehouseName
 							this.warehouseList = res.data.data;
 							this.compId = res.data.data[0].compId

+ 13 - 21
pages/erp/warehousing/selectCarNo.vue

@@ -4,16 +4,16 @@
 			<u-search placeholder="输入车牌号" :show-action="false" v-model="inputKeyword"></u-search>
 		</view>
 		<view class="content2" v-if="!inputKeyword">
-			<view class="title">编号123456789可选车牌号如下:</view>
+			<view class="title">编号{{contractNo}}可选车牌号如下:</view>
 			<view class="item-contnet">
 				<view class="item-list" v-for="(item,index) in newList" :key="index" @click="confirm(item)">
-					{{item.contractNo}}
+					{{item.carNo}}({{item.tranCarNo}})
 				</view>
 			</view>
 		</view>
 		<view class="content3" v-if="inputKeyword">
 			<view class="search-item-list" v-for="(item,index) in filterNewList" :key="index" @click="confirm(item)">
-				{{item.contractNo}}
+				{{item.carNo}}
 			</view>
 		</view>
 	</view>
@@ -27,19 +27,22 @@
 				inputKeyword: '',
 				newList: [],
 				filterNewList: [],
-				compId: ''
+				compId: '',
+				contractNo:''
 			}
 		},
-		onShow() {},
+		onShow() {
+			debugger
+			this.newList = uni.getStorageSync('erpContractNo').tranCarInfoList
+			this.contractNo = uni.getStorageSync('erpContractNo').contractNo
+		},
 		onLoad(options) {
-			this.compId = options.compId
-			console.log(helper.selectContractNo); 
-			this.getContractNoList()
+			
 		},
 		watch: {
 			inputKeyword(val) {
 				this.filterNewList = this.newList.filter(function(item) {
-					if (item.contractNo.indexOf(val) > -1) {
+					if (item.carNo.indexOf(val) > -1) {
 						return item
 					}
 				})
@@ -47,20 +50,9 @@
 		},
 		methods: {
 			confirm(item){
-				uni.setStorageSync('ContractNo', item);
+				uni.setStorageSync('erpcarNo', item);
 				uni.navigateBack({})
 			},
-			getContractNoList() {
-				this.$api.doRequest('get', '/warehouseBaseInfo/selectContractNoList', {
-					compId: this.compId,
-					flag: 5,
-				}).then(res => {
-					if (res.data.code == 200) {
-						console.log(res)
-						this.newList = res.data.data
-					}
-				})
-			},
 		}
 	}
 </script>

+ 2 - 2
pages/erp/warehousing/selectContractNo.vue

@@ -65,14 +65,14 @@
 			}
 		},
 		methods: {
-			confirm(item){
+			confirm(item){debugger
 				let _list = uni.getStorageSync('erpContractNoList');
 				if(_list==''){
 					_list=[]
 				}
 				if(_list.length<=20){
 					_list = _list.filter(function(val) {
-						if (val.contractNo.indexOf(item) > -1) {
+						if (val.contractNo!=item.contractNo) {
 							return val
 						}
 					})

+ 163 - 97
pages/erp/warehousing/warehousing.vue

@@ -27,17 +27,17 @@
 			</view>
 			<view class="row row-bottom">
 				<view class="left">皮重(吨)</view>
-				<input @input='calculate' v-model='detailData.tare' class="right-bottom"
-					placeholder="输入皮重"></input>
+				<input @input='calculate' v-model='detailData.tare' class="right-bottom" placeholder="输入皮重"></input>
 			</view>
 			<view class="row row-bottom">
 				<view class="left">扣重(吨)</view>
-				<input @input='calculate' v-model='detailData.deductionWeight' class="right-bottom" placeholder="输入扣重"></input>
+				<input @input='calculate' v-model='detailData.deductionWeight' class="right-bottom"
+					placeholder="输入扣重"></input>
 			</view>
 			<view class="row row-bottom">
 				<view class="left">净重(吨)</view>
-				<input @input='' v-model='detailData.netWeight' class="right-bottom"
-					placeholder="不可编辑,自动计算" :disabled="true"></input>
+				<input @input='' v-model='netWeight' class="right-bottom" placeholder="不可编辑,自动计算"
+					:disabled="true"></input>
 			</view>
 			<view class="row row-bottom">
 				<view class="left">扣款(元/吨)</view>
@@ -45,63 +45,72 @@
 			</view>
 			<view class="row row-bottom" v-if="detailData.type=='潮粮'">
 				<view class="left">扣重比</view>
-				<input @input='' v-model='detailData.buckleWeightRatio' class="right-bottom" placeholder="输入扣重比"></input>
+				<input @input='' v-model='detailData.buckleWeightRatio' class="right-bottom" placeholder="输入扣重比"
+					@input="pureWeightCount"></input>
 			</view>
 			<view class="row row-bottom" v-if="detailData.type=='潮粮'">
 				<view class="left">干粮水分(%)</view>
-				<input @input='' v-model='detailData.solidGrainWater' class="right-bottom" placeholder="输入干粮水分占比"></input>
+				<input @input='' v-model='detailData.solidGrainWater' class="right-bottom" placeholder="输入干粮水分占比"
+					@input="pureWeightCount"></input>
 			</view>
 			<view class="row row-bottom" v-if="detailData.type=='潮粮'">
 				<view class="left">潮粮水分(%)</view>
-				<input @input='' v-model='detailData.tidalGrainWater' class="right-bottom" placeholder="输入潮粮水分占比"></input>
+				<input @input='' v-model='detailData.tidalGrainWater' class="right-bottom" placeholder="输入潮粮水分占比"
+					@input="pureWeightCount"></input>
 			</view>
 			<view class="row row-bottom" v-if="detailData.type=='潮粮'">
 				<view class="left">纯重(吨)</view>
-				<input @input='calculate' v-model='detailData.pureWeight' class="right-bottom"
-					placeholder="不可编辑,自动计算" :disabled="true"></input>
+				<input @input='calculate' v-model='detailData.pureWeight' class="right-bottom" placeholder="不可编辑,自动计算"
+					:disabled="true"></input>
 			</view>
 			<view class="row">
 				<view class="left">品级</view>
 				<view @click='show3=true'>{{detailData.grade}}</view>
-				<u-picker :range="pjList" range-key="grade" @confirm='handlerPicker($event)' v-model="show3" mode="selector">
+				<u-picker :range="pjList" range-key="grade" @confirm='handlerPicker($event)' v-model="show3"
+					mode="selector">
 				</u-picker>
 			</view>
 			<view class="row">
 				<view class="left">经办人</view>
 				<view @click='show6=true'>{{detailData.agent}}</view>
-				<u-picker :range="handlerList" range-key="staffName" @confirm='handlerPicker($event)' v-model="show6" mode="selector">
+				<u-picker :range="handlerList" range-key="staffName" @confirm='handlerPicker($event)' v-model="show6"
+					mode="selector">
 				</u-picker>
 			</view>
 			<view class="row">
-			    <view class="left">入库日期</view>
-			    <view @click='show4=true'>{{detailData.inOutDate}}</view>
-			    <u-picker v-model="show4" mode="time" @confirm='dateChange($event)' :params="params">
-			     <!-- <view >{{detailData.inOutDate ? detailData.inOutDate:"请选择日期" }}</view> -->
-			    </u-picker>
-			    <!-- <u-calendar v-model="show4" mode="date" @change='dateChange'></u-calendar> -->
-			   </view>
+				<view class="left">入库日期</view>
+				<view @click='show4=true'>{{detailData.inOutDate}}</view>
+				<u-picker v-model="show4" mode="time" @confirm='dateChange($event)' :params="params">
+					<!-- <view >{{detailData.inOutDate ? detailData.inOutDate:"请选择日期" }}</view> -->
+				</u-picker>
+				<!-- <u-calendar v-model="show4" mode="date" @change='dateChange'></u-calendar> -->
+			</view>
 			<view class="row">
 				<view class="left">入库类型</view>
 				<view @click='show5=true'>{{detailData.inOutType}}</view>
-				<u-picker :range="warehousingTypeList" range-key="constValue" @confirm='warehousingTypePicker($event)' v-model="show5" mode="selector">
+				<u-picker :range="warehousingTypeList" range-key="constValue" @confirm='warehousingTypePicker($event)'
+					v-model="show5" mode="selector">
 				</u-picker>
 			</view>
 			<view class="row row-bottom">
 				<view class="left">车牌号</view>
-				<input v-if="true" @input='' v-model='detailData.carNo' class="right-bottom" placeholder="请输入车牌号"></input>
-				<view @click='slectCarNo' v-if="false">{{detailData.carNo}}</view>
+				<input v-if="!isPC" @input='' v-model='detailData.carNo' class="right-bottom"
+					placeholder="请输入车牌号"></input>
+				<view @click='slectCarNo' v-if="isPC">{{detailData.carNo}}</view>
 			</view>
 			<view class="row row-bottom has-btn">
 				<view class="left">成本(元/吨)</view>
-				<input @input='' v-model='detailData.cost' class="right-bottom"
+				<input v-if="detailData.inOutType=='采购入库'" v-model='detailData.unitContractPrice' class="right-bottom"
 					placeholder="自动获取" :disabled="isEditCB"></input>
-					<u-button class="edit-btn" hover-class="none" @click="editCB">编辑</u-button>
+				<input v-if="detailData.inOutType!='采购入库'" v-model='detailData.cost' class="right-bottom"
+					placeholder="自动获取" :disabled="isEditCB"></input>
+				<u-button class="edit-btn" hover-class="none" @click="editCB">编辑</u-button>
 			</view>
 			<view class="row row-bottom has-btn">
 				<view class="left">运费(元/吨)</view>
 				<input @input='' v-model='detailData.freight' :disabled="isEditYF" class="right-bottom"
 					placeholder="自动获取"></input>
-					<u-button class="edit-btn" hover-class="none" @click="editYF">编辑</u-button>
+				<u-button class="edit-btn" hover-class="none" @click="editYF">编辑</u-button>
 			</view>
 		</view>
 		<view class="content2">
@@ -116,50 +125,54 @@
 			</view>
 			<view class="row row-bottom">
 				<view class="left">质检员</view>
-				<input @input='' v-model='detailData.qualityInspector' class="right-bottom"
+				<input @input='' v-model='detailData.warehouseInOutDetail.qualityInspector' class="right-bottom"
 					placeholder="输入质检员姓名"></input>
 			</view>
 			<view class="row row-bottom">
 				<view class="left">水分(%)</view>
-				<input @input='' v-model='detailData.waterContent' class="right-bottom"
+				<input @input='' v-model='detailData.warehouseInOutDetail.waterContent' class="right-bottom"
 					placeholder="输入水分占比"></input>
 			</view>
 			<view class="row row-bottom" style="border: 0;">
 				<view class="left">容重(克/升)</view>
-				<input v-model='detailData.bulkDensity' class="right-bottom" disabled placeholder="输入容重"></input>
+				<input v-model='detailData.warehouseInOutDetail.bulkDensity' class="right-bottom"
+					placeholder="输入容重"></input>
 			</view>
 			<view class="row row-bottom">
 				<view class="left">热损伤(%)</view>
-				<input @input='' v-model='detailData.jiaorenli' class="right-bottom"
+				<input @input='' v-model='detailData.warehouseInOutDetail.jiaorenli' class="right-bottom"
 					placeholder="输入热损伤占比"></input>
 			</view>
 			<view class="row row-bottom">
 				<view class="left">杂质(%)</view>
-				<input @input='' v-model='detailData.impurity' class="right-bottom"
+				<input @input='' v-model='detailData.warehouseInOutDetail.impurity' class="right-bottom"
 					placeholder="输入杂质占比"></input>
 			</view>
 			<view class="row row-bottom">
 				<view class="left">霉变粒(%)</view>
-				<input @input='' v-model='detailData.mildewGrain' class="right-bottom"
+				<input @input='' v-model='detailData.warehouseInOutDetail.mildewGrain' class="right-bottom"
 					placeholder="输入霉变粒占比"></input>
 			</view>
 			<view class="row row-bottom">
 				<view class="left">不完善粒(%)</view>
-				<input @input='' v-model='detailData.imperfectGrain' class="right-bottom"
+				<input @input='' v-model='detailData.warehouseInOutDetail.imperfectGrain' class="right-bottom"
 					placeholder="输入不完善粒占比"></input>
 			</view>
 		</view>
 		<u-toast ref="uToast" />
 		<view class="bottom-btn">
-			<u-button type="primary" class="submit" hover-class="none" @click="submit">暂存</u-button>
-			<u-button type="primary" class="submit" hover-class="none" @click="submit">提交</u-button>
+			<u-button type="primary" class="submit" hover-class="none" @click="submit(1)">暂存</u-button>
+			<u-button type="primary" class="submit" hover-class="none" @click="submit(2)">提交</u-button>
 		</view>
 	</view>
 </template>
 
 <script>
+	import {
+		mapState
+	} from 'vuex';
 	import upload from '@/components/upload.vue';
-	import helper from '@/common/helper.js'; 
+	import helper from '@/common/helper.js';
 	export default {
 		components: {
 			upload
@@ -173,18 +186,19 @@
 				show4: false,
 				show5: false,
 				show6: false,
+				isPC: true,
 				params: {
-				     year: true,
-				     month: true,
-				     day: true,
-				     hour: true,
-				     minute: true,
-				     second: true
-				    },
-					isEditCB:'false',
-					isEditYF:'false',
-				warehouseName:'',
-				binNumber:'',
+					year: true,
+					month: true,
+					day: true,
+					hour: true,
+					minute: true,
+					second: true
+				},
+				isEditCB: 'false',
+				isEditYF: 'false',
+				warehouseName: '',
+				binNumber: '',
 				contractNoList: [{
 					contractNo: "123"
 				}],
@@ -226,20 +240,23 @@
 				maxSize: 50 * 1024 * 1024, //限制文件大小 50M
 				btnLoading: false, //防止重复点击
 				isAdd: true,
+				netWeight: 0,
+				inOutDate1: "",
 				detailData: {
 					contractNo: "请选择合同编号",
-					carNo:'辽H12345',
+					carNo: '辽H12345',
 					type: "干粮",
 					goodsName: "123",
-					inOutDate:'请输入入库日期',
-					grade:"一等品",
-					agent:'请选择经办人',
-					inOutType:'请选择入库类型',
-					deductionWeight:0,
-					grossWeight:0,
-					tare:0,
-					deductionAmount:0,
-					qualityInspectionManagement: {}
+					inOutDate: '请输入入库日期',
+					grade: "一等品",
+					agent: '请选择经办人',
+					inOutType: '请选择入库类型',
+					deductionWeight: 0,
+					grossWeight: 0,
+					tare: 0,
+					deductionAmount: 0,
+					netWeight: 0,
+					warehouseInOutDetail: {}
 				}
 			}
 		},
@@ -249,44 +266,73 @@
 			this.compId = helper.erpWarehouse.compId
 			console.log(helper.erpWarehouse)
 		},
+		computed: {
+			...mapState(['hasLogin', 'userInfo']),
+		},
 		onShow() {
-			this.detailData.goodsName = uni.getStorageSync('erpContractNo').goodsName;
-			this.detailData.contractNo = uni.getStorageSync('erpContractNo').contractNo;
-			this.detailData.goodsNameKey = uni.getStorageSync('erpContractNo').goodsNameKey;
-			if(!this.detailData.contractNo){
+			let _data = uni.getStorageSync('erpContractNo')
+			this.detailData.goodsName = _data.goodsName;
+			this.detailData.contractNo = _data.contractNo;
+			this.detailData.goodsNameKey = _data.goodsNameKey;
+			this.detailData.unitContractPrice = _data.unitContractPrice
+			if (_data.inOutType == '采购入库') {
+				this.detailData.freight = 0
+			}
+			this.detailData.carNo = uni.getStorageSync('erpcarNo')
+			if (!_data.tranCarInfoList) _data.tranCarInfoList = []
+			if (!this.detailData.contractNo) {
 				this.detailData.contractNo = '请选择合同编号'
+			} else {
+				if (_data.tranCarInfoList.length == 0) {
+					this.isPC = false
+				}
 			}
-			if(!this.detailData.goodsName){
+			if (!this.detailData.goodsName) {
 				this.detailData.goodsName = '货名'
 			}
-			console.log('当前合同',uni.getStorageSync('erpContractNo'))
+			console.log('当前合同', _data)
 			// 获取入库类型
 			this.getrkType()
 			//获取经办人
 			this.getPerson()
-			
+
+		},
+		watch: {
+			netWeight: function(v) {
+				this.pureWeightCount()
+			},
 		},
 		methods: {
-			getPerson(){
+			//计算纯重
+			pureWeightCount() {
+				if (this.netWeight && this.detailData.buckleWeightRatio && this.detailData.solidGrainWater && this
+					.detailData.tidalGrainWater) {
+					// 纯重=净重x[100-(潮粮水分-干粮水分)x扣重比]/100
+					this.detailData.pureWeight = 100 - (this.detailData.tidalGrainWater - this.detailData
+						.solidGrainWater) * this.netWeight * this.detailData.buckleWeightRatio / 100
+					this.detailData.pureWeight = this.detailData.pureWeight.toFixed(3)
+				}
+			},
+			getPerson() {
 				this.$api.doRequest('get', '/staff/query/getStaffListByCompId', {
-				    compId: this.compId
-				   }).then(res => {
-				    this.handlerList = res.data.data
-				   })
+					compId: this.compId
+				}).then(res => {
+					this.handlerList = res.data.data
+				})
 			},
-			getrkType(){
+			getrkType() {
 				this.$api.doRequest('get', '/commonSysParameter/getInfo', {
-				    constId: 'CON5'
-				   }).then(res => {
-				    this.warehousingTypeList = res.data.data
-				   })
+					constId: 'CON5'
+				}).then(res => {
+					this.warehousingTypeList = res.data.data
+				})
 			},
 			contractNopicker(e) {},
 			typePicker(e) {
 				console.log(e)
 				this.detailData.type = this.typeList[e].type
-				
-				
+
+
 			},
 			pjPicker(e) {
 				console.log(e)
@@ -295,12 +341,13 @@
 				console.log(e)
 				this.detailData.agent = this.handlerList[e].staffName
 			},
-			dateChange(e){
+			dateChange(e) {
 				console.log(e)
 				this.detailData.inOutDate = e.year + "-" + e.month + "-" + e.day
+				this.inOutDate1 = e.year + "-" + e.month + "-" + e.day + "-" + e.hour + "-" + e.minute + "-" + e.second
 			},
 			warehousingTypePicker(e) {
-				console.log(e)
+				this.detailData.inOutType = this.warehousingTypeList[e].constValue
 			},
 			filterFileType(index, lists) {
 				if (lists[index].fileType != 'jpg' && lists[index].fileType != 'png' && lists[index].fileType != 'gif') {
@@ -315,7 +362,7 @@
 				}
 			},
 			calculate() {
-				this.detailData.netWeight = this.detailData.grossWeight - this.detailData.tare -this.detailData.deductionWeight 
+				this.netWeight = this.detailData.grossWeight - this.detailData.tare - this.detailData.deductionWeight
 			},
 			getImgUrl(res) {
 				this.detailData.addressUrl = res
@@ -363,19 +410,14 @@
 				console.log(e)
 			},
 			onRemove(index) {},
-			editCB(){
+			editCB() {
 				this.isEditCB = false
 			},
-			editYF(){
+			editYF() {
 				this.isEditYF = false
 			},
-			submit() {
-				this.detailData.taskType = "入库任务"
-				this.detailData.pcFlag = 0 
-				if (!this.detailData.grossWeight) {
-					this.$api.msg('毛重不能为空')
-					return
-				}
+			submit(num) {
+				debugger
 				if (isNaN(this.detailData.grossWeight) ||
 					(String(this.detailData.grossWeight).indexOf('.') != -1 &&
 						String(this.detailData.grossWeight).length -
@@ -387,15 +429,36 @@
 					this.$api.msg('毛重输入错误!')
 					return
 				}
+				this.detailData.baseId = helper.erpWarehouse.warehouseId
+				this.detailData.warehouseName = helper.erpWarehouse.warehouseName
+				this.detailData.positionId = helper.erpWarehouse.baseId
+				this.detailData.binNumber = this.binNumber
+				this.detailData.goodsNameKey = uni.getStorageSync('erpContractNo').goodsNameKey;
+				this.detailData.compId = helper.erpWarehouse.compId
+				this.detailData.netWeight = this.netWeight
+				this.detailData.backOffice = this.userInfo.userName
+				this.detailData.backOfficeId = this.userInfo.id
+				this.detailData.inOutFlag = 2
+				this.detailData.taskType = "入库任务"
+				this.detailData.pcFlag = 0
+				let title = ""
+				if (num == 1) {
+					this.detailData.statusFlag = 1
+					this.detailData.inOutDate = this.inOutDate1
+					title = "暂存成功"
+				} else if (num == 2) {
+					this.detailData.statusFlag = 3
+					title = "提交成功"
+				}
 				let that = this
 				uni.showModal({
-					content: "确定提交检斤信息?",
+					content: "确定提交入库库信息?",
 					success(res) {
 						if (res.confirm) {
-							that.$api.doRequest('post', '/weighingManagement/api/editGrossWeight',
+							that.$api.doRequest('post', '/warehouseInOutInfo/InOutWarehouse',
 								that.detailData).then(res => {
 								if (res.data.code == 200) {
-									that.$api.msg('提交成功')
+									that.$api.msg(title)
 									uni.navigateBack()
 								}
 							})
@@ -403,14 +466,14 @@
 					}
 				})
 			},
-			slectcontractNo(){
+			slectcontractNo() {
 				uni.navigateTo({
-					url:'/pages/erp/warehousing/selectContractNo?compId='+this.compId
+					url: '/pages/erp/warehousing/selectContractNo?compId=' + this.compId
 				})
 			},
-			slectCarNo(){
+			slectCarNo() {
 				uni.navigateTo({
-					url:'/pages/erp/warehousing/selectCarNo'
+					url: '/pages/erp/warehousing/selectCarNo'
 				})
 			},
 		}
@@ -491,17 +554,20 @@
 		background: #22C572;
 		border-radius: 10rpx;
 	}
-	.edit-btn{
+
+	.edit-btn {
 		background: #22C572;
 		width: 100rpx;
 		height: 50rpx;
 		margin: 0;
 		color: white;
 	}
-	.has-btn{
+
+	.has-btn {
 		align-items: center;
 	}
-	.bottom-btn{
+
+	.bottom-btn {
 		width: 92%;
 		position: fixed;
 		bottom: 40rpx;