Forráskód Böngészése

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

# Conflicts:
#	pages/erp/index.vue
wangchao 3 éve
szülő
commit
767c257090

+ 35 - 26
pages/erp/exWarehousing/exWarehousing.vue

@@ -132,6 +132,9 @@
 <script>
 	import upload from '@/components/upload.vue';
 	import helper from '@/common/helper.js'; 
+		import {
+			mapState
+		} from 'vuex';
 	export default {
 		components: {
 			upload
@@ -147,7 +150,7 @@
 				show6: false,
 				show7: false,
 				contractNoList: [{
-					contractNo: "123"
+					contractNo: ""
 				}],
 				typeList: [{
 						type: "干粮"
@@ -211,6 +214,9 @@
 				netWeight:""
 			}
 		},
+		computed: {
+			...mapState(['hasLogin', 'userInfo'])
+		},
 		watch:{
 			netWeight:function(v){
 				this.pureWeightCount()
@@ -312,30 +318,30 @@
 			binNumberpicker(e) {
 				this.detailData.binNumber = this.positionList[e[0]].binNumber
 			},
-			getWeighingManagement() {
-				this.$api.doRequest('get', '/weighingManagement/getWeighingManagement', {
-					id: this.id
-				}).then(res => {
-					if (res.data.code == 200) {
-						this.detailData = res.data.data
-					}
-				})
-				this.$api.doRequest('get', '/warehouseBaseInfo/getWarehouse', {
-					id: this.cangId
-				}).then(res => {
-					if (res.data.code == 200) {
-						this.positionList = res.data.data.warehousePositionInfoList
-					}
-				})
-				this.$api.doRequest('get', '/warehouseBaseInfo/selectContractNoList', {
-					compId: '',
-					flag: 5
-				}).then(res => {
-					if (res.data.code == 200) {
-						this.contractNoList = res.data.data
-					}
-				})
-			},
+			// getWeighingManagement() {
+			// 	this.$api.doRequest('get', '/weighingManagement/getWeighingManagement', {
+			// 		id: this.id
+			// 	}).then(res => {
+			// 		if (res.data.code == 200) {
+			// 			this.detailData = res.data.data
+			// 		}
+			// 	})
+			// 	this.$api.doRequest('get', '/warehouseBaseInfo/getWarehouse', {
+			// 		id: this.cangId
+			// 	}).then(res => {
+			// 		if (res.data.code == 200) {
+			// 			this.positionList = res.data.data.warehousePositionInfoList
+			// 		}
+			// 	})
+			// 	this.$api.doRequest('get', '/warehouseBaseInfo/selectContractNoList', {
+			// 		compId: '',
+			// 		flag: 5
+			// 	}).then(res => {
+			// 		if (res.data.code == 200) {
+			// 			this.contractNoList = res.data.data
+			// 		}
+			// 	})
+			// },
 			onProgress(e) {
 			},
 			onRemove(index) {},
@@ -357,7 +363,7 @@
 				}
 				this.detailData.baseId = helper.erpWarehouse.warehouseId
 				this.detailData.warehouseName = helper.erpWarehouse.warehouseName
-				this.detailData.positionId = helper.erpWarehouse.baseId
+				this.detailData.positionId = helper.erpWarehouse.positionId
 				this.detailData.binNumber = this.binNumber
 				this.detailData.goodsNameKey = uni.getStorageSync('erpContractNo').goodsNameKey;
 				this.detailData.compId = helper.erpWarehouse.compId
@@ -369,12 +375,15 @@
 				if(num == 1 ){
 					this.detailData.statusFlag = 1
 					this.detailData.inOutDate = this.inOutDate1
+					this.detailData.backOffice =  this.userInfo.userName
+					this.detailData.backOfficeId =  this.userInfo.id
 					title = "暂存成功"
 				}else if(num == 2){
 					this.detailData.statusFlag = 3
 					title = "提交成功"
 				}
 				let that = this
+				console.log(this.detailData,"dsadsk")
 				uni.showModal({
 					content: "确定提交出库信息?",
 					success(res) {

+ 61 - 67
pages/erp/improvedExWaehousing/improvedExWaehousing.vue

@@ -1,130 +1,124 @@
 <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" ></u-icon>
+				<u-icon name="arrow-right"></u-icon>
 				<!-- <u-select v-model="show1" :default-value='[0]' :list="warehouseList" @confirm="confirmWarehouse">
 				</u-select> -->
 			</view>
-			<view class="right"  @click='show2=true'>
+			<view class="right" @click='show2=true'>
 				<view>{{positionName}}</view>
-				<u-icon name="arrow-right" ></u-icon>
+				<u-icon name="arrow-right"></u-icon>
 				<u-select v-model="show2" :default-value='[0]' :list="positionList" @confirm="confirmPositon">
 				</u-select>
 			</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'; 
+	import helper from '@/common/helper.js';
 	export default {
 		data() {
 			return {
-				show1:false,
-				show2:false,
+				show1: false,
+				show2: false,
 				currentPage: 1,
 				pageSize: 10,
-				positionId:"",
-				binNumber:"",
+				positionId: "",
+				binNumber: "",
 				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:'我是提交人姓名'
-					},
-					]
+				warehouseList: [{
+					"label": '1',
+					"value": '1'
+				}],
+				positionList: [{
+					"label": '102仓位',
+					"value": '1'
+				}],
+				dataList: []
 			}
 		},
 		onLoad() {
-			console.log(helper.erpWarehouse.baseId,"仓库id")
+			this.positionId = helper.erpWarehouse.positionId
 			this.getList()
 		},
+		onShow() {
+			this.positionId = helper.erpWarehouse.positionId
+		},
 		methods: {
-			getList(){
-				this.$api.doRequest('get', '/warehouseInOutInfo/selectWarehouseInOutInfo',
-					{positionId:helper.erpWarehouse.baseId,binNumber:helper.erpWarehouse.binNumber,currentPage:this.currentPage,pageSize:this.pageSize}).then(res => {
+			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.$api.msg(title)
-						// uni.navigateBack()
+						this.dataList = res.data.data.records
 					}
 				})
 			},
-			confirmWarehouse(){},
-			confirmPositon(){},
-			goDetail(val){
+			confirmWarehouse() {},
+			confirmPositon() {},
+			goDetail(val) {
+				debugger
+				
 				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{
-		padding: 20rpx;
+
+	.content1 {
+		padding: 40rpx 20rpx;
 		margin: 20rpx;
 		border-radius: 10rpx;
+		background: #FFFFFF;
 	}
-	.content2{
+
+	.content2 {
 		// padding: 20rpx;
 		margin: 20rpx;
 		// border-bottom: 1px solid #ccc;
-		.content2-item{
+		background: #FFFFFF;
+		border-radius: 10rpx;
+
+		.content2-item {
 			padding: 20rpx;
 			margin-bottom: 10rpx;
-			// border-bottom:1px solid #ccc ;
-			background: #FFFFFF;
-			border-radius: 10rpx;
+			border-bottom: 1px solid #ccc;
 			// padding-bottom: 10px;
 		}
-		.item-style{
+
+		.item-style {
 			display: inline-block;
 			width: 50%;
 		}

+ 212 - 128
pages/erp/improvedExWaehousing/improvedExWaehousingDetail.vue

@@ -1,8 +1,8 @@
 <template>
 	<view class="warp">
 		<view class="top">
-			<view class="top-left">鲅鱼圈一号库</view>
-			<view>102仓位</view>
+			<view class="top-left">{{warehouseName}}</view>
+			<view>{{binNumber}}仓位</view>
 		</view>
 		<view class="content">
 			<view class="row">
@@ -11,13 +11,15 @@
 			</view>
 			<view class="row">
 				<view class="left">货名</view>
-				<view class="right">{{detailData.goodsName}}</view>
+				<view class="right">{{detailData.goodsName ? detailData.goodsName : "选择合同,自动获取"}}
+				</view>
 			</view>
 			<view class="row">
 				<view class="left">类型</view>
-				<view @click='show1=true'>请选择类型</view>
+				<view @click='show1=true'>{{detailData.type}}</view>
 				<u-picker :range="typeList" range-key="type" @confirm='typePicker($event)' v-model="show1"
 					mode="selector">
+					<view class="">{{detailData.type}}</view>
 				</u-picker>
 			</view>
 			<view class="row row-bottom">
@@ -27,74 +29,65 @@
 			</view>
 			<view class="row row-bottom">
 				<view class="left">皮重(吨)</view>
-				<input @input='calculate' v-model='detailData.grossWeight' 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.grossWeight' class="right-bottom"
-					placeholder="不可编辑,自动计算"></input>
+				<input v-model='netWeight' disabled class="right-bottom" placeholder="不可编辑,自动计算"></input>
 			</view>
-			<view class="row row-bottom">
+			<view class="row row-bottom" v-if="detailData.type == '潮粮'">
 				<view class="left">扣重比</view>
-				<input @input='calculate' v-model='detailData.grossWeight' class="right-bottom" placeholder="输入扣重比"></input>
+				<input v-model='detailData.buckleWeightRatio' class="right-bottom" placeholder="输入扣重比"
+					@input="pureWeightCount"></input>
 			</view>
-			<view class="row row-bottom">
+			<view class="row row-bottom" v-if="detailData.type == '潮粮'">
 				<view class="left">干粮水分(%)</view>
-				<input @input='calculate' v-model='detailData.grossWeight' class="right-bottom" placeholder="输入干粮水分占比"></input>
+				<input v-model='detailData.solidGrainWater' class="right-bottom" placeholder="输入干粮水分占比"
+					@input="pureWeightCount"></input>
 			</view>
-			<view class="row row-bottom">
+			<view class="row row-bottom" v-if="detailData.type == '潮粮'">
 				<view class="left">潮粮水分(%)</view>
-				<input @input='calculate' v-model='detailData.grossWeight' class="right-bottom" placeholder="输入潮粮水分占比"></input>
+				<input v-model='detailData.tidalGrainWater' class="right-bottom" placeholder="输入潮粮水分占比"
+					@input="pureWeightCount"></input>
 			</view>
-			<view class="row row-bottom">
+			<view class="row row-bottom" v-if="detailData.type == '潮粮'">
 				<view class="left">纯重(吨)</view>
-				<input @input='calculate' v-model='detailData.grossWeight' class="right-bottom"
-					placeholder="不可编辑,自动计算"></input>
+				<input v-model='detailData.pureWeight' class="right-bottom" placeholder="不可编辑,自动计算"></input>
 			</view>
 			<view class="row">
 				<view class="left">品级</view>
-				<view @click='show3=true'>请选择品级</view>
-				<u-picker :range="pjList" range-key="name" @confirm='handlerPicker($event)' v-model="show3" mode="selector">
+				<view @click='show3=true'>{{detailData.grade}}</view>
+				<u-picker :range="pjList" range-key="type" @confirm='pjPicker($event)' v-model="show3" mode="selector">
 				</u-picker>
 			</view>
 			<view class="row">
 				<view class="left">经办人</view>
-				<view @click='show6=true'>请选择经办人</view>
-				<u-picker :range="handlerList" range-key="name" @confirm='handlerPicker($event)' v-model="show6" mode="selector">
+				<view @click='show6=true'>{{detailData.agent}}</view>
+				<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'>请选择日期</view>
-				<u-calendar v-model="show4" mode="date" @change='dateChange'></u-calendar>
+				<view @click='show7=true'>{{detailData.inOutDate}}</view>
+				<u-picker v-model="show7" mode="time" @confirm='dateChange($event)' :params="params">
+				</u-picker>
 			</view>
 			<view class="row">
 				<view class="left">出库类型</view>
-				<view @click='show5=true'>请选择入库类型</view>
-				<u-picker :range="warehousingTypeList" range-key="type" @confirm='warehousingTypePicker($event)' v-model="show5" mode="selector">
+				<view @click='show5=true'>{{detailData.inOutType}}</view>
+				<u-picker :range="warehousingTypeList" range-key="constValue" @confirm='warehousingTypePicker($event)'
+					v-model="show5" mode="selector">
 				</u-picker>
 			</view>
-			<view class="row">
+			<view class="row row-bottom">
 				<view class="left">车牌号</view>
-				<view @click='slectCarNo'>{{detailData.carNo}}</view>
-			</view>
-			<view class="row row-bottom has-btn">
-				<view class="left">成本(元/吨)</view>
-				<input @input='calculate' v-model='detailData.grossWeight' class="right-bottom"
-					placeholder="自动获取"></input>
-					<u-button class="edit-btn">编辑</u-button>
-			</view>
-			<view class="row row-bottom has-btn">
-				<view class="left">运费(元/吨)</view>
-				<input @input='calculate' v-model='detailData.grossWeight' class="right-bottom"
-					placeholder="自动获取"></input>
-					<u-button class="edit-btn">编辑</u-button>
+				<input v-model='detailData.carNo' class="right-bottom" placeholder="请输入车牌号"></input>
 			</view>
 		</view>
 		<view class="content2">
 			<view class="left">上传磅单</view>
-			<upload class="upload" ref="upload" :action="action" :max-size="maxSize" :max-count="1"
+			<upload class="upload" ref="upload" :action="action" :max-size="maxSize" :max-count="1" :file-list="imgUrl"
 				:size-type="['compressed']" @on-success="getImgUrl" @on-error="onError" @on-remove="onRemove"
 				@on-uploaded="isAdd = true" :before-upload="filterFileType" @on-progress="onProgress"></upload>
 		</view>
@@ -104,49 +97,54 @@
 			</view>
 			<view class="row row-bottom">
 				<view class="left">质检员</view>
-				<input @input='calculate' v-model='detailData.grossWeight' class="right-bottom"
+				<input v-model='detailData.warehouseInOutDetail.qualityInspector' class="right-bottom"
 					placeholder="输入质检员姓名"></input>
 			</view>
 			<view class="row row-bottom">
 				<view class="left">水分(%)</view>
-				<input @input='calculate' v-model='detailData.grossWeight' class="right-bottom"
+				<input v-model='detailData.warehouseInOutDetail.waterContent' class="right-bottom"
 					placeholder="输入水分占比"></input>
 			</view>
-			<view class="row row-bottom" style="border: 0;">
+			<view class="row row-bottom">
 				<view class="left">容重(克/升)</view>
-				<input v-model='detailData.netWeight' 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='calculate' v-model='detailData.grossWeight' class="right-bottom"
+				<input v-model='detailData.warehouseInOutDetail.jiaorenli' class="right-bottom"
 					placeholder="输入热损伤占比"></input>
 			</view>
 			<view class="row row-bottom">
 				<view class="left">杂质(%)</view>
-				<input @input='calculate' v-model='detailData.grossWeight' class="right-bottom"
+				<input v-model='detailData.warehouseInOutDetail.impurity' class="right-bottom"
 					placeholder="输入杂质占比"></input>
 			</view>
 			<view class="row row-bottom">
 				<view class="left">霉变粒(%)</view>
-				<input @input='calculate' v-model='detailData.grossWeight' class="right-bottom"
+				<input v-model='detailData.warehouseInOutDetail.mildewGrain' class="right-bottom"
 					placeholder="输入霉变粒占比"></input>
 			</view>
 			<view class="row row-bottom">
 				<view class="left">不完善粒(%)</view>
-				<input @input='calculate' v-model='detailData.grossWeight' class="right-bottom"
+				<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 upload from '@/components/upload.vue';
+	import helper from '@/common/helper.js';
+	import {
+		mapState
+	} from 'vuex';
 	export default {
 		components: {
 			upload
@@ -160,8 +158,9 @@
 				show4: false,
 				show5: false,
 				show6: false,
+				show7: false,
 				contractNoList: [{
-					contractNo: "123"
+					contractNo: ""
 				}],
 				typeList: [{
 						type: "干粮"
@@ -171,13 +170,13 @@
 					}
 				],
 				pjList: [{
-						type: "一等"
+						type: "一等"
 					},
 					{
-						type: "二等"
+						type: "二等"
 					},
 					{
-						type: "三等"
+						type: "三等"
 					},
 					{
 						type: "等外"
@@ -196,55 +195,122 @@
 						name: "等外"
 					}
 				],
-				warehousingTypeList: [{
-						type: "采购入库"
-					},
-					{
-						type: "采购入库"
-					},
-					{
-						type: "采购入库"
-					},
-					{
-						type: "采购入库"
-					}
-				],
+				warehousingTypeList: [],
 				action: this.$uploadUrl,
 				maxSize: 50 * 1024 * 1024, //限制文件大小 50M
 				btnLoading: false, //防止重复点击
 				isAdd: true,
+				warehouseName: '',
+				binNumber: '',
 				detailData: {
-					contractNo: "123",
-					carNo:'辽H12345',
-					name: "",
-					goodsName: "123",
-					qualityInspectionManagement: {}
-				}
+					contractNo: "请选择合同编号或移库任务编号",
+					type: "请选择类型",
+					grade: "请输入品级",
+					agent: "请选择经办人",
+					inOutDate: "请选择出库日期",
+					inOutType: "请选择出库类型",
+					warehouseInOutDetail: {},
+					gradeKey: "",
+				},
+				params: {
+					year: true,
+					month: true,
+					day: true,
+					hour: true,
+					minute: true,
+					second: true
+				},
+				inOutDate1: "",
+				netWeight: "",
+				imgUrl: [], //图片展示
 			}
 		},
+		computed: {
+			...mapState(['hasLogin', 'userInfo'])
+		},
+		watch: {
+			netWeight: function(v) {
+				this.pureWeightCount()
+			},
+		},
 		onLoad(options) {
-			this.id = options.id
+			this.detailData = JSON.parse(options.data)
+			this.netWeight = this.detailData.netWeight
+			console.log(this.detailData, "dmksj")
+
+			// this.imgUrl = this.detailData.addressUrl.split(",")
+
+			for (let i = 0; i < this.detailData.addressUrl.split(",").length; i++) {
+				this.imgUrl.push({
+						url:this.detailData.addressUrl.split(",")[i]
+					})
+			}
+			console.log(this.imgUrl)
 			this.cangId = options.cangId
 		},
 		onShow() {
-			// this.getWeighingManagement()
+			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;
+			if (!this.detailData.contractNo) {
+				this.detailData.contractNo = '请选择合同编号'
+			}
+			if (!this.detailData.goodsName) {
+				this.detailData.goodsName = '货名'
+			}
+			//出库类型
+			this.outWarehouse()
+			//经办人
+			this.handler()
 		},
 		methods: {
-			contractNopicker(e) {},
+			//计算纯重
+			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)
+				}
+			},
+			outWarehouse() {
+				this.$api.doRequest('get', '/commonSysParameter/getInfo', {
+					constId: 'CON6'
+				}).then(res => {
+					this.warehousingTypeList = res.data.data
+				})
+			},
+			handler() {
+				this.$api.doRequest('get', '/staff/query/getStaffListByCompIdAndWarehouseId', {
+					compId: helper.erpWarehouse.compId,
+					warehouseId: helper.erpWarehouse.warehouseId
+				}).then(res => {
+					this.handlerList = res.data.data
+				})
+			},
+			contractNopicker(e) {
+
+			},
 			typePicker(e) {
-				console.log(e)
+				this.detailData.type = this.typeList[e].type
 			},
 			pjPicker(e) {
-				console.log(e)
+				this.detailData.gradeKey = e[0]
+				this.detailData.grade = this.pjList[e].type
 			},
 			handlerPicker(e) {
-				console.log(e)
+				this.detailData.agentKey = e[0]
+				this.detailData.agent = this.handlerList[e].staffName
 			},
-			dateChange(e){
-				console.log(e)
+			dateChange(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') {
@@ -259,7 +325,9 @@
 				}
 			},
 			calculate() {
-				this.detailData.netWeight = this.detailData.grossWeight - this.detailData.tare
+				if (this.detailData.grossWeight && this.detailData.tare) {
+					this.netWeight = this.detailData.grossWeight - this.detailData.tare
+				}
 			},
 			getImgUrl(res) {
 				this.detailData.addressUrl = res
@@ -271,43 +339,36 @@
 				console.log('------------error-----------')
 				console.log(error)
 			},
-			contractNopicker(e) {
-				// this.detailData.goodsName=this.contractNoList[e[0]].goodsName
-				// this.detailData.contractNo=this.contractNoList[e[0]].contractNo
-			},
 			binNumberpicker(e) {
 				this.detailData.binNumber = this.positionList[e[0]].binNumber
 			},
-			getWeighingManagement() {
-				this.$api.doRequest('get', '/weighingManagement/getWeighingManagement', {
-					id: this.id
-				}).then(res => {
-					if (res.data.code == 200) {
-						console.log(res)
-						this.detailData = res.data.data
-					}
-				})
-				this.$api.doRequest('get', '/warehouseBaseInfo/getWarehouse', {
-					id: this.cangId
-				}).then(res => {
-					if (res.data.code == 200) {
-						this.positionList = res.data.data.warehousePositionInfoList
-					}
-				})
-				this.$api.doRequest('get', '/warehouseBaseInfo/selectContractNoList', {
-					compId: '',
-					flag: 5
-				}).then(res => {
-					if (res.data.code == 200) {
-						this.contractNoList = res.data.data
-					}
-				})
-			},
-			onProgress(e) {
-				console.log(e)
-			},
+			// getWeighingManagement() {
+			// 	this.$api.doRequest('get', '/weighingManagement/getWeighingManagement', {
+			// 		id: this.id
+			// 	}).then(res => {
+			// 		if (res.data.code == 200) {
+			// 			this.detailData = res.data.data
+			// 		}
+			// 	})
+			// 	this.$api.doRequest('get', '/warehouseBaseInfo/getWarehouse', {
+			// 		id: this.cangId
+			// 	}).then(res => {
+			// 		if (res.data.code == 200) {
+			// 			this.positionList = res.data.data.warehousePositionInfoList
+			// 		}
+			// 	})
+			// 	this.$api.doRequest('get', '/warehouseBaseInfo/selectContractNoList', {
+			// 		compId: '',
+			// 		flag: 5
+			// 	}).then(res => {
+			// 		if (res.data.code == 200) {
+			// 			this.contractNoList = res.data.data
+			// 		}
+			// 	})
+			// },
+			onProgress(e) {},
 			onRemove(index) {},
-			submit() {
+			submit(num) {
 				if (!this.detailData.grossWeight) {
 					this.$api.msg('毛重不能为空')
 					return
@@ -323,31 +384,51 @@
 					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.inOutFlag = 1
+				this.detailData.taskType = "出库任务"
+				this.detailData.pcFlag = 0
+				let title = ""
+				if (num == 1) {
+					this.detailData.statusFlag = 1
+					this.detailData.inOutDate = this.inOutDate1
+					this.detailData.backOffice = this.userInfo.userName
+					this.detailData.backOfficeId = this.userInfo.id
+					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()
 								}
 							})
 						}
-
 					}
 				})
 			},
-			slectcontractNo(){
+			slectcontractNo() {
 				uni.navigateTo({
-					url:'/pages/erp/exWarehousing/selectContractNo'
+					url: '/pages/erp/warehousing/selectContractNo?flag=' + 5
 				})
 			},
-			slectCarNo(){
+			slectCarNo() {
 				uni.navigateTo({
-					url:'/pages/erp/exWarehousing/selectCarNo'
+					url: '/pages/erp/exWarehousing/selectCarNo'
 				})
 			},
 		}
@@ -415,7 +496,7 @@
 
 	.content2 {
 		margin-top: 10px;
-		display: flex;
+		// display: flex;
 		align-items: center;
 
 		.left {
@@ -428,17 +509,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;

+ 0 - 1
pages/erp/improvedWrehousing/improvedWrehousingDetail.vue

@@ -344,7 +344,6 @@
 								}
 							})
 						}
-
 					}
 				})
 			},

+ 5 - 1
pages/erp/index.vue

@@ -64,6 +64,7 @@ import helper from '@/common/helper.js';
 				binNumber: '暂无',
 				compId:'',
 				warehouseId:"",
+				positionId:"",
 				warehouseList: [],
 				warehouseCWList:[],
 				allWarehouse:[],
@@ -237,7 +238,8 @@ import helper from '@/common/helper.js';
 							warehouseId:this.warehouseId,
 							baseId:this.baseId,
 							allWarehouse:this.allWarehouse,
-							warehouseCWList:this.warehouseCWList
+							warehouseCWList:this.warehouseCWList,
+							positionId: this.positionId
 						}
 						uni.navigateTo({
 							url: item.url
@@ -267,6 +269,7 @@ import helper from '@/common/helper.js';
 							this.warehouseCWList = res.data.data[0].positionInfos
 							this.warehouseId = res.data.data[0].id
 							this.baseId = res.data.data[0].positionInfos[0].baseId
+							this.positionId = res.data.data[0].positionInfos[0].id
 							console.log('this.warehouseCWList',this.warehouseCWList)
 							// this.makeBinNumber()
 						
@@ -292,6 +295,7 @@ import helper from '@/common/helper.js';
 			warehouseCWchange(e){
 				this.binNumber = this.warehouseCWList[e[0]].binNumber
 				this.baseId = this.warehouseCWList[e[0]].baseId
+				this.positionId = this.warehouseCWList[e[0]].positionId
 			}
 
 		}

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

@@ -82,7 +82,6 @@
 				}
 				uni.setStorageSync('erpContractNoList', _list);
 				uni.setStorageSync('erpContractNo', item);
-				console.log(item)
 				uni.navigateBack({})
 			},
 			getContractNoList() {
@@ -92,6 +91,7 @@
 						flag: 5,
 					}).then(res => {
 						if (res.data.code == 200) {
+							this.moreList = res.data.data
 							this.newList = res.data.data
 						}
 					})