浏览代码

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

gjy 3 年之前
父节点
当前提交
77a3330a59

+ 72 - 76
pages/erp/exWarehousing/exWarehousing.vue

@@ -29,33 +29,28 @@
 			</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"
+				<input @input='calculate' v-model='detailData.netWeight' class="right-bottom"
 					placeholder="不可编辑,自动计算"></input>
 			</view>
 			<view class="row row-bottom" v-if="detailData.type == '潮粮'">
 				<view class="left">扣重比</view>
-				<input  v-model='detailData.grossWeight' class="right-bottom"
-					placeholder="输入扣重比"></input>
+				<input v-model='detailData.deductWeight' class="right-bottom" placeholder="输入扣重比"></input>
 			</view>
 			<view class="row row-bottom" v-if="detailData.type == '潮粮'">
 				<view class="left">干粮水分(%)</view>
-				<input  v-model='detailData.grossWeight' class="right-bottom"
-					placeholder="输入干粮水分占比"></input>
+				<input v-model='detailData.waterMin' class="right-bottom" placeholder="输入干粮水分占比"></input>
 			</view>
 			<view class="row row-bottom" v-if="detailData.type == '潮粮'">
 				<view class="left">潮粮水分(%)</view>
-				<input  v-model='detailData.grossWeight' class="right-bottom"
-					placeholder="输入潮粮水分占比"></input>
+				<input v-model='detailData.waterContent' class="right-bottom" placeholder="输入潮粮水分占比"></input>
 			</view>
 			<view class="row row-bottom" v-if="detailData.type == '潮粮'">
 				<view class="left">纯重(吨)</view>
-				<input 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>
@@ -66,7 +61,7 @@
 			<view class="row">
 				<view class="left">经办人</view>
 				<view @click='show6=true'>{{detailData.agent}}</view>
-				<u-picker :range="handlerList" range-key="name" @confirm='handlerPicker($event)' v-model="show6"
+				<u-picker :range="handlerList" range-key="staffName" @confirm='handlerPicker($event)' v-model="show6"
 					mode="selector">
 				</u-picker>
 			</view>
@@ -74,33 +69,19 @@
 				<view class="left">出库日期</view>
 				<view @click='show7=true'>{{detailData.inOutDate}}</view>
 				<u-picker v-model="show7" 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'>请选择入库类型</view>
-				<u-picker :range="warehousingTypeList" range-key="type" @confirm='warehousingTypePicker($event)'
+				<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>
+				<input v-model='detailData.carNumber' class="right-bottom" placeholder="请输入车牌号"></input>
 			</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>
-			</view> -->
 		</view>
 		<view class="content2">
 			<view class="left">上传磅单</view>
@@ -114,49 +95,44 @@
 			</view>
 			<view class="row row-bottom">
 				<view class="left">质检员</view>
-				<input v-model='detailData.grossWeight' class="right-bottom"
-					placeholder="输入质检员姓名"></input>
+				<input v-model='detailData.qualityInspector' class="right-bottom" placeholder="输入质检员姓名"></input>
 			</view>
 			<view class="row row-bottom">
 				<view class="left">水分(%)</view>
-				<input  v-model='detailData.grossWeight' class="right-bottom"
-					placeholder="输入水分占比"></input>
+				<input v-model='detailData.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.bulkDensity' class="right-bottom"  placeholder="输入容重"></input>
 			</view>
 			<view class="row row-bottom">
 				<view class="left">热损伤(%)</view>
-				<input v-model='detailData.grossWeight' class="right-bottom"
-					placeholder="输入热损伤占比"></input>
+				<input v-model='detailData.jiaorenli' class="right-bottom" placeholder="输入热损伤占比"></input>
 			</view>
 			<view class="row row-bottom">
 				<view class="left">杂质(%)</view>
-				<input v-model='detailData.grossWeight' class="right-bottom"
-					placeholder="输入杂质占比"></input>
+				<input v-model='detailData.impurity' class="right-bottom" placeholder="输入杂质占比"></input>
 			</view>
 			<view class="row row-bottom">
 				<view class="left">霉变粒(%)</view>
-				<input v-model='detailData.grossWeight' class="right-bottom"
-					placeholder="输入霉变粒占比"></input>
+				<input v-model='detailData.mildewGrain' class="right-bottom" placeholder="输入霉变粒占比"></input>
 			</view>
 			<view class="row row-bottom">
 				<view class="left">不完善粒(%)</view>
-				<input  v-model='detailData.grossWeight' class="right-bottom"
-					placeholder="输入不完善粒占比"></input>
+				<input v-model='detailData.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'; 
 	export default {
 		components: {
 			upload
@@ -207,19 +183,7 @@
 						name: "等外"
 					}
 				],
-				warehousingTypeList: [{
-						type: "采购入库"
-					},
-					{
-						type: "采购入库"
-					},
-					{
-						type: "采购入库"
-					},
-					{
-						type: "采购入库"
-					}
-				],
+				warehousingTypeList: [],
 				action: this.$uploadUrl,
 				maxSize: 50 * 1024 * 1024, //限制文件大小 50M
 				btnLoading: false, //防止重复点击
@@ -232,6 +196,7 @@
 					grade: "请输入品级",
 					agent: "请选择经办人",
 					inOutDate: "请选择出库日期",
+					inOutType: "请选择出库类型",
 					qualityInspectionManagement: {}
 				},
 				params: {
@@ -242,18 +207,38 @@
 					minute: true,
 					second: true
 				},
+				inOutDate1: "",
 			}
-		
 		},
 		onLoad(options) {
 			this.id = options.id
 			this.cangId = options.cangId
 		},
 		onShow() {
-			// this.getWeighingManagement()
+			//出库类型
+			this.outWarehouse()
+			//经办人
+			this.handler()
 		},
 		methods: {
-			contractNopicker(e) {},
+			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) {
 				this.detailData.type = this.typeList[e].type
 			},
@@ -261,13 +246,14 @@
 				this.detailData.grade = this.pjList[e].type
 			},
 			handlerPicker(e) {
-				this.detailData.agent = this.handlerList[e].name
+				this.detailData.agent = this.handlerList[e].staffName
 			},
 			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') {
@@ -282,7 +268,9 @@
 				}
 			},
 			calculate() {
-				this.detailData.netWeight = this.detailData.grossWeight - this.detailData.tare
+				if (this.detailData.grossWeight && this.detailData.tare) {
+					this.detailData.netWeight = this.detailData.grossWeight - this.detailData.tare
+				}
 			},
 			getImgUrl(res) {
 				this.detailData.addressUrl = res
@@ -294,10 +282,6 @@
 				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
 			},
@@ -306,7 +290,6 @@
 					id: this.id
 				}).then(res => {
 					if (res.data.code == 200) {
-						console.log(res)
 						this.detailData = res.data.data
 					}
 				})
@@ -330,7 +313,8 @@
 				console.log(e)
 			},
 			onRemove(index) {},
-			submit() {
+			submit(num) {
+				
 				if (!this.detailData.grossWeight) {
 					this.$api.msg('毛重不能为空')
 					return
@@ -346,20 +330,32 @@
 					this.$api.msg('毛重输入错误!')
 					return
 				}
+				this.detailData.compId = helper.erpWarehouse.compId
+				let title = ""
+				if(num == 1 ){
+					this.detailData.inOutFlag = 1
+					this.detailData.statusFlag = 1
+					title = "暂存成功"
+				}else if(num == 2){
+					this.detailData.inOutFlag = 1
+					this.detailData.statusFlag = 3
+					title = "提交成功"
+				}
 				let that = this
+				console.log(this.detailData,"提交对象")
+				return
 				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()
 								}
 							})
 						}
-
 					}
 				})
 			},
@@ -438,7 +434,7 @@
 
 	.content2 {
 		margin-top: 10px;
-		display: flex;
+		// display: flex;
 		align-items: center;
 
 		.left {

+ 45 - 22
pages/erp/index.vue

@@ -1,5 +1,11 @@
 <template>
 	<view class="wrap">
+		<view class="comp" @click='show0=true'>
+			<view>{{compName}}</view>
+			<u-icon name="arrow-right" color=""></u-icon>
+			<u-picker @confirm="compChange" range-key='compName' mode="selector" v-model="show0"
+				:range="compList"></u-picker>
+		</view>
 		<view class='title'>仓库管理</view>
 		<view class="dropdown">
 			<view class="left" @click='show1=true'>
@@ -9,7 +15,7 @@
 					:range="warehouseList"></u-picker>
 			</view>
 			<view class="right" @click='show2=true'>
-				<view>{{binNumber}}</view>
+				<view>{{binNumber}}仓位</view>
 				<u-icon name="arrow-right" color=""></u-icon>
 				<u-picker @confirm="warehouseCWchange" range-key='binNumber' mode="selector" v-model="show2"
 					:range="warehouseCWList"></u-picker>
@@ -41,13 +47,20 @@ import helper from '@/common/helper.js';
 		},
 		data() {
 			return {
+				show0: false,
 				show1: false,
 				show2: false,
 				isShowAlert: false,
+				compName:'黑龙江中天昊元贸易有限公司',
+				compList:[{
+						compName:'黑龙江中天昊元贸易有限公司'
+				}
+				],
 				content: '易粮易运ERP系统包含合同管理、仓库管理、运输管理、结算管理等多个模块,可为粮企提供粮食贸易的全流程服务,平台诚邀您的加入。',
 				warehouseName: '暂无仓库',
 				binNumber: '暂无',
 				compId:'',
+				warehouseId:"",
 				warehouseList: [],
 				warehouseCWList:[],
 				gridCol: 4,
@@ -88,24 +101,24 @@ import helper from '@/common/helper.js';
 						url: `/pages/erp/improvedExWaehousing/improvedExWaehousing`,
 						show: true
 					},
-					{
-						num: 4,
-						name: '开通业务',
-						// icon: 'cuIcon-edit',
-						src: '../../static/img/erp/shougouzhijian@3x.png',
-						tips: 0,
-						url: `/pages/erp/openService/openService`,
-						show: true
-					},
-					{
-						num: 5,
-						name: '联系客服',
-						// icon: 'cuIcon-edit',
-						src: '../../static/img/erp/shougouzhijian@3x.png',
-						tips: 0,
-						url: `/pages/erp/contactCustomerService/contactCustomerService`,
-						show: true
-					}
+					// {
+					// 	num: 4,
+					// 	name: '开通业务',
+					// 	// icon: 'cuIcon-edit',
+					// 	src: '../../static/img/erp/shougouzhijian@3x.png',
+					// 	tips: 0,
+					// 	url: `/pages/erp/openService/openService`,
+					// 	show: true
+					// },
+					// {
+					// 	num: 5,
+					// 	name: '联系客服',
+					// 	// icon: 'cuIcon-edit',
+					// 	src: '../../static/img/erp/shougouzhijian@3x.png',
+					// 	tips: 0,
+					// 	url: `/pages/erp/contactCustomerService/contactCustomerService`,
+					// 	show: true
+					// }
 				],
 			}
 		},
@@ -191,12 +204,13 @@ import helper from '@/common/helper.js';
 					})
 				} else {
 					if (item.url) {
+						console.log(this.warehouseId,"id")
 						helper.erpWarehouse = {
 							warehouseName:this.warehouseName,
 							binNumber:this.binNumber,
 							compId:this.compId,
-							agent:this.agent
-							
+							agent:this.agent,
+							warehouseId:this.warehouseId
 						}
 						uni.navigateTo({
 							url: item.url
@@ -206,6 +220,7 @@ import helper from '@/common/helper.js';
 			},
 			confirmWarehouse() {},
 			confirmPositon() {},
+			compChange(){},
 			init() {
 				console.log(this.userInfo)
 				this.$api.doRequest('get', '/warehouseBaseInfo/selectWarehouseSelf', {
@@ -222,6 +237,7 @@ import helper from '@/common/helper.js';
 							this.agent = res.data.data[0].agent
 							this.binNumber = res.data.data[0].positionInfos[0].binNumber
 							this.warehouseCWList = res.data.data[0].positionInfos
+							this.warehouseId = res.data.data[0].id
 							console.log('this.warehouseCWList',this.warehouseCWList)
 							// this.makeBinNumber()
 						}
@@ -235,8 +251,8 @@ import helper from '@/common/helper.js';
 				this.warehouseName = this.warehouseList[e[0]].warehouseName
 				this.compId = this.warehouseList[e[0]].compId
 				this.agent = this.warehouseList[e[0]].agent
+				this.warehouseId =this.warehouseList[e[0]].id
 				this.warehouseCWList = this.warehouseList[e[0]].positionInfos
-				console.log(e)
 			},
 			warehouseCWchange(e){
 				this.binNumber = this.warehouseCWList[e[0]].binNumber
@@ -347,4 +363,11 @@ import helper from '@/common/helper.js';
 			display: flex;
 		}
 	}
+	.comp{
+		display: flex;
+		font-size: 36rpx;
+		font-weight: 500;
+		color: #333333;
+		margin-bottom: 20rpx;
+	}
 </style>

+ 29 - 16
pages/erp/warehousing/selectContractNo.vue

@@ -40,16 +40,23 @@
 				compId: ''
 			}
 		},
-		onShow() {},
-		onLoad(options) {debugger
+
+		// onShow() {},
+		// onLoad(options) {
+
+		onShow() {
+			this.newSelectList =  uni.getStorageSync('erpContractNoList');
+		},
+		onLoad(options) {
 			this.compId = options.compId
 			console.log(helper.selectContractNo); 
 			this.getContractNoList()
 		},
 		watch: {
 			inputKeyword(val) {
+				console.log(this.newList)
 				this.filterNewList = this.newList.filter(function(item) {
-					if (item.contractNo.indexOf(val) > -1&&item.flag==7) {
+					if (item.contractNo.indexOf(val) > -1) {
 						return item
 					}
 				})
@@ -57,36 +64,42 @@
 		},
 		methods: {
 			confirm(item){
-				let _list = uni.setStorageSync('erpContractNoList');
+				let _list = uni.getStorageSync('erpContractNoList');
+				if(_list==''){
+					_list=[]
+				}
 				if(_list.length<=20){
-					_list.unshift()
+					_list.unshift(item)
 				}else{
-					_list.unshift().pop()
+					_list.unshift(item).pop(item)
 				}
 				uni.setStorageSync('erpContractNoList', _list);
 				uni.setStorageSync('erpContractNo', item);
 				uni.navigateBack({})
 			},
-			makeMoreList(){
-				let _data = this.newList
-				for(let i=0;i<_data;i++){
-					if(_data[i].status=='执行中'&&_data[i].flag==6){
-						this.moreList.push(_data[i])
-					}
-				}
-			},
 			getContractNoList() {
 				this.$api.doRequest('get', '/warehouseBaseInfo/selectContractNoList', {
 					compId: this.compId,
-					flag: 5,
+					flag: 7,
 				}).then(res => {
 					if (res.data.code == 200) {
 						console.log(res)
 						this.newList = res.data.data
-						this.makeMoreList()
+						// this.makeMoreList()
+					}
+				})
+				this.$api.doRequest('get', '/warehouseBaseInfo/selectContractNoList', {
+					compId: this.compId,
+					flag: 6,
+				}).then(res => {
+					if (res.data.code == 200) {
+						console.log(res)
+						this.moreList = res.data.data
+						// this.makeMoreList()
 					}
 				})
 			},
+		
 		}
 	}
 </script>

+ 45 - 34
pages/erp/warehousing/warehousing.vue

@@ -37,28 +37,28 @@
 			<view class="row row-bottom">
 				<view class="left">净重(吨)</view>
 				<input @input='calculate' v-model='detailData.netWeight' class="right-bottom"
-					placeholder="不可编辑,自动计算"></input>
+					placeholder="不可编辑,自动计算" :disabled="true"></input>
 			</view>
 			<view class="row row-bottom">
 				<view class="left">扣款(元/吨)</view>
 				<input @input='calculate' v-model='detailData.deductionAmount' class="right-bottom" placeholder="0"></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.buckleWeightRatio' 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.solidGrainWater' 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.tidalGrainWater' 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.pureWeight' class="right-bottom"
-					placeholder="不可编辑,自动计算"></input>
+					placeholder="不可编辑,自动计算" :disabled="true"></input>
 			</view>
 			<view class="row">
 				<view class="left">品级</view>
@@ -82,23 +82,24 @@
 			   </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>
+				<input v-if="true" @input='' v-model='detailData.carNo' class="right-bottom" placeholder="请输入车牌号"></input>
+				<view @click='slectCarNo' v-if="false">{{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>
+				<input @input='' v-model='detailData.grossWeight' class="right-bottom"
+					placeholder="自动获取" disabled="isEditCB"></input>
+					<u-button class="edit-btn" @click="edit">编辑</u-button>
 			</view>
 			<view class="row row-bottom has-btn">
 				<view class="left">运费(元/吨)</view>
-				<input @input='calculate' v-model='detailData.grossWeight' class="right-bottom"
+				<input @input='' v-model='detailData.grossWeight' disabled="isEditYF" class="right-bottom"
 					placeholder="自动获取"></input>
 					<u-button class="edit-btn">编辑</u-button>
 			</view>
@@ -180,6 +181,8 @@
 				     minute: true,
 				     second: true
 				    },
+					isEditCB:'false',
+					isEditYF:'false',
 				warehouseName:'',
 				binNumber:'',
 				contractNoList: [{
@@ -202,35 +205,23 @@
 						grade: "三等品"
 					},
 					{
-						grade: "等外"
+						grade: "等外"
 					}
 				],
 				handlerList: [{
-						name: "张三"
+						agent: "张三"
 					},
 					{
-						name: "二等"
+						agent: "二等"
 					},
 					{
-						name: "三等"
+						agent: "三等"
 					},
 					{
-						name: "等外"
-					}
-				],
-				warehousingTypeList: [{
-						type: "采购入库"
-					},
-					{
-						type: "采购入库"
-					},
-					{
-						type: "采购入库"
-					},
-					{
-						type: "采购入库"
+						agent: "等外"
 					}
 				],
+				warehousingTypeList: [],
 				action: this.$uploadUrl,
 				maxSize: 50 * 1024 * 1024, //限制文件大小 50M
 				btnLoading: false, //防止重复点击
@@ -242,6 +233,8 @@
 					goodsName: "123",
 					inOutDate:'请输入入库日期',
 					grade:"一等品",
+					agent:'张三',
+					inOutType:'请选择入库类型',
 					qualityInspectionManagement: {}
 				}
 			}
@@ -250,17 +243,36 @@
 			this.binNumber = helper.erpWarehouse.binNumber
 			this.warehouseName = helper.erpWarehouse.warehouseName
 			this.compId = helper.erpWarehouse.compId
-			this.detailData.agent = helper.erpWarehouse.agent
+			//获取经办人
+			// this.detailData.agent = helper.erpWarehouse.agent
 			console.log(helper.erpWarehouse)
 		},
 		onShow() {
 			this.detailData.goodsName = uni.getStorageSync('erpContractNo').goodsName;
+			this.detailData.contractNo = uni.getStorageSync('erpContractNo').contractNo;
+			if(!this.detailData.contractNo){
+				this.detailData.contractNo = '请选择合同编号'
+			}
+			if(!this.detailData.goodsName){
+				this.detailData.goodsName = '货名'
+			}
+			// 获取入库类型
+			this.getrkType()
 			
 		},
 		methods: {
+			getrkType(){
+				this.$api.doRequest('get', '/commonSysParameter/getInfo', {
+				    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) {
@@ -366,7 +378,6 @@
 								}
 							})
 						}
-
 					}
 				})
 			},

+ 16 - 15
pages/erpbusiness/sm/sm.vue

@@ -158,21 +158,21 @@
 						}
 					});
 			},
-			submit() {
+			submit() {debugger
 				if(this.flag) return
-				// let _isAllCheck = false
-				// for (let i = 0; i < this.grainMerchantList.length; i++) {
-				// 	if (this.grainMerchantList[i].check) {
-				// 		_isAllCheck = true
-				// 	}
-				// }
-				// if (!_isAllCheck) {
-				// 	this.$refs.uToast.show({
-				// 		title: '至少选择一个身份',
-				// 		type: "error",
-				// 		icon: false
-				// 	})
-				// }
+				let _isAllCheck = false
+				for (let i = 0; i < this.grainMerchantList.length; i++) {
+					if (this.grainMerchantList[i].check) {
+						_isAllCheck = true
+					}
+				}
+				if (!_isAllCheck) {
+					this.$refs.uToast.show({
+						title: '至少选择一个身份',
+						type: "error",
+						icon: false
+					})
+				}
 				console.log("this.user.compId",this.user.companyId,this.selectID)
 				this.$api.doRequest('get', '/identityAuthenticationInfo/saveCompanyIdentity', {
 						id: this.selectID,
@@ -180,7 +180,8 @@
 					}, 'application/json;charset=UTF-8').then(res => {
 						console.log(res);
 						if (res.data.code == 200) {
-							this.getList()
+							// this.getList()
+							uni.navigateBack(-1)
 							
 						}