浏览代码

前端入库管理

gjy 3 年之前
父节点
当前提交
799bf55694

+ 2 - 2
config/index.js

@@ -1,10 +1,10 @@
 const dev = {
 	baseUrl: 'https://www.zthymaoyi.com',
 	// baseUrl: 'http://localhost:8080/',
-	// baseUrlNew: 'http://192.168.1.117:8090/',
+	baseUrlNew: 'http://192.168.1.122:8090/',
 	// baseUrlNew: 'http://api1.eliangeyun.com/',
 	// baseUrlNew: 'http://192.168.1.119:9100/',
-	baseUrlNew: 'http://api1.eliangeyun.com/',
+	// baseUrlNew: 'http://api1.eliangeyun.com/',
 	h5Appid: 'wxb66b599f7f61b46f',
 	debug: false
 }

+ 3 - 3
pages.json

@@ -414,8 +414,8 @@
 		{
 			"path": "pages/erpbusiness/index",
 			"style": {
-				// "navigationBarTitleText": "入库管理"
-				"navigationBarTitleText": "收购业务"
+				"navigationBarTitleText": "入库管理"
+				// "navigationBarTitleText": "收购业务"
 			}
 		},
 		{
@@ -862,7 +862,7 @@
 		}, {
 			"path": "pages/erpbusiness/acquisitionInspection/acquisitionInspection",
 			"style": {
-				"navigationBarTitleText": "收购检斤",
+				"navigationBarTitleText": "入库检斤",
 				"enablePullDownRefresh": true
 			}
 

+ 6 - 1
pages/erpbusiness/acquisitionInspection/acquisitionInspection.vue

@@ -91,7 +91,8 @@
 				dataList: [],
 				pageSize: 10,
 				currentPage: 1,
-				cangid: ''
+				cangid: '',
+				warehouseType:'',
 			}
 		},
 		onShow() {
@@ -197,12 +198,14 @@
 						if (that.cangid && that.cangid == _resData[i].id) {
 							that.warehouseName = _resData[i].warehouseName
 							that.warehouseId = _resData[i].id
+							that.warehouseType = _resData[i].warehouseType
 						}
 					}
 					if (that.warehouseList.length > 0 && !that.cangid) {
 						that.warehouseName = that.warehouseList[0].label
 						that.warehouseId = that.warehouseList[0].value
 						that.cangid = that.warehouseList[0].value
+						that.warehouseType =that.warehouseList[0].warehouseType
 					}
 					this.getList(true)
 				})
@@ -262,6 +265,7 @@
 				console.log(e)
 				this.warehouseName = e[0].label
 				this.dataList.warehouseName = e[0].label;
+				this.warehouseType== e[0].warehouseType
 				this.cangid = e[0].value
 				uni.setStorageSync("cangid", this.cangid)
 				this.getList(true)
@@ -278,6 +282,7 @@
 			tareClick(val) {
 				val.warehouseName = this.warehouseName
 				val.warehouseId = this.warehouseId
+				val.warehouseType = this.warehouseType
 				uni.navigateTo({
 					url: './tareDetail?detailData=' + JSON.stringify(val)
 				})

+ 111 - 41
pages/erpbusiness/acquisitionInspection/grossWeightDetail.vue

@@ -4,6 +4,11 @@
 			基本信息
 		</view>
 		<view class="content">
+			<view class="row">
+				<view class="left">入库类型</view>
+				<view class="right" v-if='detailData.serviceManagementType==3'>收购入库</view>
+				<view class="right" v-if='detailData.serviceManagementType==1'>贸易入库</view>
+			</view>
 			<view class="row">
 				<view class="left">仓库</view>
 				<view class="right">{{detailData.warehouseName}}</view>
@@ -32,6 +37,26 @@
 				<view class="left">货名</view>
 				<view class="right">{{detailData.goodsName}}</view>
 			</view>
+			<view class="row">
+				<view class="left">运输方式</view>
+				<view class="right">{{detailData.outType}}</view>
+			</view>
+			<view class="row">
+				<view class="left">箱号-1</view>
+				<view class="right">{{detailData.qualityInspectionManagement.boxNo}}</view>
+			</view>
+			<view class="row">
+				<view class="left">箱号-2</view>
+				<view class="right">{{detailData.qualityInspectionManagement.boxNoOther}}</view>
+			</view>
+			<view class="row">
+				<view class="left">封号-1</view>
+				<view class="right">{{detailData.qualityInspectionManagement.titleNo}}</view>
+			</view>
+			<view class="row">
+				<view class="left">封号-2</view>
+				<view class="right">{{detailData.qualityInspectionManagement.titleNoOther}}</view>
+			</view>
 			<view class="row row-bottom">
 				<view class="left">毛重(公斤)</view>
 				<input class="right-bottom" placeholder="输入毛重" v-model="detailData.grossWeight"></input>
@@ -72,6 +97,7 @@
 				}
 			})
 			this.detailData = JSON.parse(options.detailData)
+			console.log(this.detailData)
 			uni.getSystemInfo({
 				success: (res) => {
 					this.windowHeight = res.windowHeight;
@@ -90,50 +116,93 @@
 					content: "确定提交检斤信息?",
 					success: function(res) {
 						if (res.confirm) {
-							that.$api.doRequest('get', '/paymentManagement/cumulant', {
-								// compId: JSON.parse(localStorage.getItem('pcUserInfo')).data.compId,
-								compId: uni.getStorageSync('pcUserInfo').compId,
-								customerNumberCard: that.detailData.customerNumberCard,
-								goodsName: that.detailData.goodsName,
-							}).then(res => {
-								if (res.data.code == 200) {
-									for (let i = 0; i < that.purchasePriceList.length; i++) {
-										if (
-											that.detailData.goodsName == that.purchasePriceList[i]
-											.goodsName
-										) {
-											
-											let count = (that.purchasePriceList[i].saleLimit -
-												res.data.data / 1000).toFixed(2)
-											if (Number(count) - that.detailData.grossWeight / 1000 <= 0) {
-												that.$api.msg('该客户累计销售' + that.detailData.goodsName + (
-														res.data.data / 1000).toFixed(2) +
-													'吨,还可售粮' +
-													count + '吨', )
-
-											} else {
-												that.$api.doRequest('post',
-													'/weighingManagement/api/editGrossWeight', that
-													.detailData).then(res => {
-													if (res.data.code == 200) {
-														that.$refs.uToast.show({
-															title: '提交成功',
-															type: 'success'
-														})
-														uni.navigateBack({})
-													} else {
-														that.$refs.uToast.show({
-															title: '提交失败',
-															type: 'error',
-														})
-													}
-												})
-
+		
+							if(that.detailData.serviceManagementType==1){
+								that.$api.doRequest('post',
+									'/weighingManagement/api/editGrossWeight', that
+									.detailData).then(res => {
+								that.detailData.inOutFlag = 2
+								that.detailData.statusFlag=1
+								that.detailData.grossWeight=that.detailData.grossWeight/1000
+								that.detailData.warehouseInOutDetail={
+									id:that.detailData.inOutDetailId,
+									grade:that.detailData.qualityInspectionManagement.grade,
+									reGrade:that.detailData.qualityInspectionManagement.reGrade,
+									imperfectGrain:that.detailData.qualityInspectionManagement.imperfectGrain,
+									reImperfectGrain:that.detailData.qualityInspectionManagement.reImperfectGrain,
+									impurity:that.detailData.qualityInspectionManagement.impurity,
+									reImpurity:that.detailData.qualityInspectionManagement.reImpurity,
+									jiaorenli:that.detailData.qualityInspectionManagement.jiaorenli,
+									reJiaorenli:that.detailData.qualityInspectionManagement.reJiaorenli,
+									bulkDensity:that.detailData.qualityInspectionManagement.bulkDensity,
+									reBulkDensity:that.detailData.qualityInspectionManagement.reBulkDensity,
+									mildewGrain:that.detailData.qualityInspectionManagement.mildewGrain,
+									reMildewGrain:that.detailData.qualityInspectionManagement.reMildewGrain,
+								},
+								that.$api.doRequest('post',
+									'/warehouseInOutInfo/InOutWarehouse', that
+									.detailData).then(res => {
+										if (res.data.code == 200) {
+											that.$refs.uToast.show({
+												title: '提交成功',
+												type: 'success'
+											})
+											uni.navigateBack({})
+										} else {
+											that.$refs.uToast.show({
+												title: '提交失败',
+												type: 'error',
+											})
+										}
+										})
+									})
+							}else{
+								that.$api.doRequest('get', '/paymentManagement/cumulant', {
+									// compId: JSON.parse(localStorage.getItem('pcUserInfo')).data.compId,
+									compId: uni.getStorageSync('pcUserInfo').compId,
+									customerNumberCard: that.detailData.customerNumberCard,
+									goodsName: that.detailData.goodsName,
+								}).then(res => {
+									if (res.data.code == 200) {
+										for (let i = 0; i < that.purchasePriceList.length; i++) {
+											if (
+												that.detailData.goodsName == that.purchasePriceList[i]
+												.goodsName
+											) {
+												
+												let count = (that.purchasePriceList[i].saleLimit -
+													res.data.data / 1000).toFixed(2)
+												if (Number(count) - that.detailData.grossWeight / 1000 <= 0) {
+													that.$api.msg('该客户累计销售' + that.detailData.goodsName + (
+															res.data.data / 1000).toFixed(2) +
+														'吨,还可售粮' +
+														count + '吨', )
+								
+												} else {
+													that.$api.doRequest('post',
+														'/weighingManagement/api/editGrossWeight', that
+														.detailData).then(res => {
+															if (res.data.code == 200) {
+																that.$refs.uToast.show({
+																	title: '提交成功',
+																	type: 'success'
+																})
+																uni.navigateBack({})
+															} else {
+																that.$refs.uToast.show({
+																	title: '提交失败',
+																	type: 'error',
+																})
+															}
+													})
+								
+												}
 											}
 										}
 									}
-								}
-							})
+								})
+							}
+							
 						} else if (res.cancel) {
 							console.log('用户点击取消');
 						}
@@ -163,6 +232,7 @@
 	}
 
 	.content {
+		margin-bottom:50px;
 		.row {
 			display: flex;
 			justify-content: space-between;

+ 216 - 38
pages/erpbusiness/acquisitionInspection/tareDetail.vue

@@ -12,7 +12,7 @@
 				<view class="left">编号</view>
 				<view class="right">{{detailData.number}}</view>
 			</view>
-			<view class="row">
+			<view v-if='detailData.serviceManagementType==3' class="row">
 				<view class="left">客户</view>
 				<view class="right">{{detailData.customer}}</view>
 			</view>
@@ -32,6 +32,26 @@
 				<view class="left">货名</view>
 				<view class="right">{{detailData.goodsName}}</view>
 			</view>
+			<view class="row">
+				<view class="left">运输方式</view>
+				<view class="right">{{detailData.outType}}</view>
+			</view>
+			<view class="row">
+				<view class="left">箱号-1</view>
+				<view class="right">{{detailData.qualityInspectionManagement.boxNo}}</view>
+			</view>
+			<view class="row">
+				<view class="left">箱号-2</view>
+				<view class="right">{{detailData.qualityInspectionManagement.boxNoOther}}</view>
+			</view>
+			<view class="row">
+				<view class="left">封号-1</view>
+				<view class="right">{{detailData.qualityInspectionManagement.titleNo}}</view>
+			</view>
+			<view class="row">
+				<view class="left">封号-2</view>
+				<view class="right">{{detailData.qualityInspectionManagement.titleNoOther}}</view>
+			</view>
 			<view class="row row-bottom">
 				<view class="left">毛重(公斤)</view>
 				<view class="right">{{detailData.grossWeight}}</view>
@@ -89,6 +109,123 @@
 		},
 		onLoad(options) {
 			this.detailData = JSON.parse(options.detailData)
+			console.log(this.detailData)
+			if(this.detailData.qualityInspectionManagement.carModel=='单拖小柜'){
+				this.detailData.receivableWeighingFee=80
+				this.detailData.actualWeighingFee=80
+			}else if(this.detailData.qualityInspectionManagement.carModel=='双拖小柜'){
+				this.detailData.receivableWeighingFee=160
+				this.detailData.actualWeighingFee=160
+			}else if(this.detailData.qualityInspectionManagement.carModel=='大柜'){
+				if((this.detailData.grossWeight/1000)<50){
+					this.$set(this.detailData,'receivableWeighingFee',120)
+					this.detailData.actualWeighingFee=120
+				}else if((this.detailData.grossWeight/1000)>50||(this.detailData.grossWeight/1000)<65){
+					this.detailData.receivableWeighingFee=150
+					this.detailData.actualWeighingFee=150
+				}else if((this.detailData.grossWeight/1000)>65||(this.detailData.grossWeight/1000)<75){
+					this.detailData.receivableWeighingFee=170
+					this.detailData.actualWeighingFee=170
+				}else if((this.detailData.grossWeight/1000)>75||(this.detailData.grossWeight/1000)<80){
+					this.detailData.receivableWeighingFee=190
+					this.detailData.actualWeighingFee=190
+				}else if((this.detailData.grossWeight/1000)>80||(this.detailData.grossWeight/1000)<85){
+					this.detailData.receivableWeighingFee=210
+					this.detailData.actualWeighingFee=210
+				}else if((this.detailData.grossWeight/1000)>85||(this.detailData.grossWeight/1000)<95){
+					this.detailData.receivableWeighingFee=240
+					this.detailData.actualWeighingFee=240
+				}else if((this.detailData.grossWeight/1000)>95||(this.detailData.grossWeight/1000)<105){
+					this.detailData.receivableWeighingFee=260
+					this.detailData.actualWeighingFee=260
+				}else if((this.detailData.grossWeight/1000)>105||(this.detailData.grossWeight/1000)<150){
+					this.detailData.receivableWeighingFee=300
+					this.detailData.actualWeighingFee=300
+				}
+			}else if(this.detailData.qualityInspectionManagement.carModel=='挂车'){
+				if((this.detailData.grossWeight/1000)<50){
+					this.detailData.receivableWeighingFee=180
+					this.detailData.actualWeighingFee=180
+				}else if((this.detailData.grossWeight/1000)>50||(this.detailData.grossWeight/1000)<65){
+					this.detailData.receivableWeighingFee=200
+					this.detailData.actualWeighingFee=200
+				}else if((this.detailData.grossWeight/1000)>65||(this.detailData.grossWeight/1000)<75){
+					this.detailData.receivableWeighingFee=250
+					this.detailData.actualWeighingFee=250
+				}else if((this.detailData.grossWeight/1000)>75||(this.detailData.grossWeight/1000)<85){
+					this.detailData.receivableWeighingFee=350
+					this.detailData.actualWeighingFee=350
+				}else if((this.detailData.grossWeight/1000)>85||(this.detailData.grossWeight/1000)<95){
+					this.detailData.receivableWeighingFee=400
+					this.detailData.actualWeighingFee=400
+				}else if((this.detailData.grossWeight/1000)>95||(this.detailData.grossWeight/1000)<105){
+					this.detailData.receivableWeighingFee=450
+					this.detailData.actualWeighingFee=450
+				}else if((this.detailData.grossWeight/1000)>105||(this.detailData.grossWeight/1000)<120){
+					this.detailData.receivableWeighingFee=500
+					this.detailData.actualWeighingFee=500
+				}else if((this.detailData.grossWeight/1000)>120||(this.detailData.grossWeight/1000)<130){
+					this.detailData.receivableWeighingFee=550
+					this.detailData.actualWeighingFee=550
+				}else if((this.detailData.grossWeight/1000)>130||(this.detailData.grossWeight/1000)<150){
+					this.detailData.receivableWeighingFee=700
+					this.detailData.actualWeighingFee=700
+				}
+			}else if(this.detailData.qualityInspectionManagement.carModel=='冷藏箱(不抠箱)'){
+				if((this.detailData.grossWeight/1000)<50){
+					this.detailData.receivableWeighingFee=120
+					this.detailData.actualWeighingFee=120
+				}else if((this.detailData.grossWeight/1000)>50||(this.detailData.grossWeight/1000)<65){
+					this.detailData.receivableWeighingFee=150
+					this.detailData.actualWeighingFee=150
+				}else if((this.detailData.grossWeight/1000)>65||(this.detailData.grossWeight/1000)<75){
+					this.detailData.receivableWeighingFee=170
+					this.detailData.actualWeighingFee=170
+				}else if((this.detailData.grossWeight/1000)>75||(this.detailData.grossWeight/1000)<80){
+					this.detailData.receivableWeighingFee=190
+					this.detailData.actualWeighingFee=190
+				}else if((this.detailData.grossWeight/1000)>80||(this.detailData.grossWeight/1000)<85){
+					this.detailData.receivableWeighingFee=210
+					this.detailData.actualWeighingFee=210
+				}else if((this.detailData.grossWeight/1000)>85||(this.detailData.grossWeight/1000)<95){
+					this.detailData.receivableWeighingFee=240
+					this.detailData.actualWeighingFee=240
+				}else if((this.detailData.grossWeight/1000)>95||(this.detailData.grossWeight/1000)<105){
+					this.detailData.receivableWeighingFee=260
+					this.detailData.actualWeighingFee=260
+				}else if((this.detailData.grossWeight/1000)>105||(this.detailData.grossWeight/1000)<120){
+					this.detailData.receivableWeighingFee=300
+					this.detailData.actualWeighingFee=300
+				}
+			}else if(this.detailData.qualityInspectionManagement.carModel=='冷藏箱(抠箱)'){
+				if((this.detailData.grossWeight/1000)<50){
+					this.detailData.receivableWeighingFee=360
+					this.detailData.actualWeighingFee=360
+				}else if((this.detailData.grossWeight/1000)>50||(this.detailData.grossWeight/1000)<65){
+					this.detailData.receivableWeighingFee=390
+					this.detailData.actualWeighingFee=390
+				}else if((this.detailData.grossWeight/1000)>65||(this.detailData.grossWeight/1000)<75){
+					this.detailData.receivableWeighingFee=410
+					this.detailData.actualWeighingFee=410
+				}else if((this.detailData.grossWeight/1000)>75||(this.detailData.grossWeight/1000)<80){
+					this.detailData.receivableWeighingFee=430
+					this.detailData.actualWeighingFee=430
+				}else if((this.detailData.grossWeight/1000)>80||(this.detailData.grossWeight/1000)<85){
+					this.detailData.receivableWeighingFee=450
+					this.detailData.actualWeighingFee=450
+				}else if((this.detailData.grossWeight/1000)>85||(this.detailData.grossWeight/1000)<95){
+					this.detailData.receivableWeighingFee=480
+					this.detailData.actualWeighingFee=480
+				}else if((this.detailData.grossWeight/1000)>95||(this.detailData.grossWeight/1000)<105){
+					this.detailData.receivableWeighingFee=500
+					this.detailData.actualWeighingFee=500
+				}else if((this.detailData.grossWeight/1000)>105||(this.detailData.grossWeight/1000)<120){
+					this.detailData.receivableWeighingFee=540
+					this.detailData.actualWeighingFee=540
+				}
+			}else {
+				this.detailData.receivableWeighingFee=''
+			}
 			if (!this.detailData.buckleMiscellaneous) {
 				this.detailData.buckleMiscellaneous = 0
 			}
@@ -99,52 +236,93 @@
 					parseFloat(this.detailData.buckleMiscellaneous)).toFixed(3)
 			},
 			submit() {
+				if (this.detailData.qualityInspectionManagement.confirm==0) {
+					this.$refs.uToast.show({
+						title: '该条质检信息未确认',
+						type: 'error'
+					})
+				    return
+				}
 				let that = this;
 				uni.showModal({
 					content: "确定提交检斤信息?",
 					success() {
-						that.$api.doRequest('get', '/paymentManagement/cumulant', {
-							// compId: JSON.parse(localStorage.getItem('pcUserInfo')).data.compId,
-							compId: uni.getStorageSync('pcUserInfo').compId,
-							customerNumberCard: that.detailData.customerNumberCard,
-							goodsName: that.detailData.goodsName,
-						}).then(res => {
-							if (res.data.code == 200) {
-								for (let i = 0; i < that.purchasePriceList.length; i++) {
-									if (
-										that.detailData.goodsName == that.purchasePriceList[i]
-										.goodsName
-									) {
-										let count = (that.purchasePriceList[i].saleLimit -
-											res.data.data / 1000).toFixed(2)
-										if (count <= 0) {
-											count = 0
-											that.$api.msg('该客户累计销售' + this.detailData.goodsName + (
-													res.data.data / 1000).toFixed(2) +
-												'吨,还可售粮' +
-												count + '吨', )
-
+						if(that.detailData.serviceManagementType==1){
+							that.$api.doRequest('post', '/weighingManagement/api/editTare',that.detailData).then(res => {
+								that.$api.doRequest('get', '/warehouseInOutInfo/getInfo',
+								{id:that.detailData.warehouseInOutId}).then(res => {
+									var data=res.data.data
+									data.statusFlag=3
+									data.inOutFlag=2
+									data.warehouseType=that.detailData.warehouseType
+									data.baseId=that.detailData.warehouseInOutId
+									data.grossWeight=that.detailData.grossWeight/1000
+									data.tare=that.detailData.tare/1000
+									data.netWeight=that.detailData.netWeight/1000
+									data.deductionAmount=that.detailData.deductionAmount*1000
+									data.deductionWeight=that.detailData.deductionWeight/1000
+									that.$api.doRequest('post',
+									'/warehouseInOutInfo/InOutWarehouse', data).then(res => {
+										if (res.data.code == 200) {
+											that.$refs.uToast.show({
+												title: '提交成功',
+												type: 'success'
+											})
+											uni.navigateBack({})
 										} else {
-											that.$api.doRequest('post', '/weighingManagement/api/editTare',
-												that.detailData).then(res => {
-												if (res.data.code == 200) {
-													that.$refs.uToast.show({
-														title: '提交成功',
-														type: 'success'
-													})
-													uni.navigateBack({})
-												} else {
-													that.$refs.uToast.show({
-														title: '提交失败',
-														type: 'error',
-													})
-												}
+											that.$refs.uToast.show({
+												title: '提交失败',
+												type: 'error',
 											})
 										}
+										})
+									})
+								})
+						}else{
+							that.$api.doRequest('get', '/paymentManagement/cumulant', {
+								compId: JSON.parse(localStorage.getItem('pcUserInfo')).data.compId,
+								customerNumberCard: that.detailData.customerNumberCard,
+								goodsName: that.detailData.goodsName,
+							}).then(res => {
+								if (res.data.code == 200) {
+									for (let i = 0; i < that.purchasePriceList.length; i++) {
+										if (
+											that.detailData.goodsName == that.purchasePriceList[i]
+											.goodsName
+										) {
+											let count = (that.purchasePriceList[i].saleLimit -
+												res.data.data / 1000).toFixed(2)
+											if (count <= 0) {
+												count = 0
+												that.$api.msg('该客户累计销售' + this.detailData.goodsName + (
+														res.data.data / 1000).toFixed(2) +
+													'吨,还可售粮' +
+													count + '吨', )
+							
+											} else {
+												that.$api.doRequest('post', '/weighingManagement/api/editTare',
+													that.detailData).then(res => {
+													if (res.data.code == 200) {
+														that.$refs.uToast.show({
+															title: '提交成功',
+															type: 'success'
+														})
+														uni.navigateBack({})
+													} else {
+														that.$refs.uToast.show({
+															title: '提交失败',
+															type: 'error',
+														})
+													}
+												})
+											}
+										}
 									}
+									
 								}
-							}
-						})
+							})
+						}
+						
 					}
 				})
 			}

+ 566 - 98
pages/erpbusiness/add_quality_testing.vue

@@ -2,28 +2,163 @@
 	<view>
 		<view @click='hidden' class='wrap'>
 			<view class='title_b'>基本信息</view>
+			<view class="c-row ">
+				<view class="title">类型</view>
+				<view class="con-list">
+					<u-radio-group @change="groupChange" v-model="typevalue">
+						<u-radio key="1" label="贸易入库"  name="1">贸易入库</u-radio>
+						<u-radio key="3" label="收购入库" name="3">收购入库</u-radio>
+					</u-radio-group>
+				</view>
+			</view>
 			<view class="c-row ">
 				<view class="title">仓库</view>
 				<view class="con-list">
 					{{gridList.warehouseName}}
 				</view>
 			</view>
+			<view v-if='typevalue==1' class="c-row ">
+				<view class="title">任务编号</view>
+				<view class="con-list">
+					<view @click='show4=true'>{{gridList.inOutTaskNo?gridList.inOutTaskNo:'请选择任务编号'}}</view>
+					<u-picker :range="taskNolist" range-key="inOutTaskNo" @confirm='tasknopicker($event)' v-model="show4"
+						mode="selector">
+					</u-picker>
+				</view>
+			</view>
+			<view v-if='typevalue==1&&gridList.inOutType!="移库入库"' class="c-row ">
+				<view class="title">合同编号</view>
+				<view class="con-list">
+					{{gridList.contractNo?gridList.contractNo:'自动获取,不可编辑'}}
+				</view>
+			</view>
+			<view v-if='typevalue==1&&gridList.inOutType=="移库入库"' class="c-row ">
+				<view class="title">移库编号</view>
+				<view class="con-list">
+					{{gridList.contractNo?gridList.contractNo:'自动获取,不可编辑'}}
+				</view>
+			</view>
 			<view class="c-row ">
-				<view class="title">编号</view>
+				<view class="title">业务编号</view>
 				<view class="con-list">
 					{{gridList.qualityNo}}
 				</view>
 			</view>
+			<view v-if='typevalue==1' style=' align-items: flex-start;' class="c-row ">
+				<view class="title">提示</view>
+				<view class="con-list">
+					{{gridList.tips?gridList.tips:'自动获取,不可编辑'}}
+				</view>
+			</view>
+			<view v-if='typevalue==1' class="c-row ">
+				<view class="title">成本</view>
+				<view class="con-list">
+					<view v-if='!coststatus'>{{gridList.cost?gridList.cost:'自动获取,不可编辑'}}</view> 
+					<view v-if='coststatus'>
+						<input v-model='gridList.cost' placeholder="请输入成本" name="input" type="digit"></input>
+					</view>
+				</view>
+				<button class='cu-btn bg-green shadow' @click="changecost">{{costtext}}</button>
+			</view>
+			<view v-if='typevalue==1' class="c-row ">
+				<view class="title">运费</view>
+				<view class="con-list flex">
+					<view v-if='!freightstatus'>{{gridList.freight?gridList.freight:'自动获取,不可编辑'}}</view>
+					<view v-if='freightstatus'>
+						<input v-model='gridList.freight' placeholder="请输入运费" name="input" type="digit"></input>
+					</view>
+				</view>
+				<button class='cu-btn bg-green shadow' @click="changefreight">{{freighttext}}</button>
+			</view>
+			<view v-if='typevalue==1' class="c-row ">
+				<view class="title">扣款</view>
+				<view class="con-list">
+					<input v-model='gridList.deductionAmount' placeholder="请输入扣款" name="input" type="digit"></input>
+				</view>
+			</view>
+			<view v-if='typevalue==1' class="c-row ">
+				<view class="title">入库类型</view>
+				<view class="con-list">
+					{{gridList.inOutType?gridList.inOutType:'自动获取,不可编辑'}}
+				</view>
+			</view>
+			<view v-if='typevalue==1' class="c-row ">
+				<view class="title">入库日期</view>
+				<view class="con-list">
+					<view @click='show5=true'>{{gridList.inOutDate?gridList.inOutDate:'请选择入库日期'}}</view>
+					<u-picker  @confirm='inOutDatepicker($event)' :params="params" v-model="show5"
+						mode="time">
+					</u-picker>
+				</view>
+			</view>
+			<view v-if='typevalue==1||typevalue==3&&gridList.outType=="自运"' class="c-row ">
+				<view class="title">车队</view>
+				<view class="con-list">
+					<view @click='show6=true'>{{gridList.fleet?ridList.fleet:'非车队车辆'}}</view>
+					<u-picker  @confirm='fleetpicker($event)' :range="fleetNameList" range-key="fleetName" v-model="show5"
+						mode="selector">
+					</u-picker>
+				</view>
+			</view>
+			<view v-if='typevalue==1' class="c-row ">
+				<view class="title">运输方式</view>
+				<view class="con-list">
+					<view @click='show7=true'>{{gridList.outType?gridList.outType:'请选择运输方式'}}</view>
+					<u-picker :range="multiSelector" range-key="name" @confirm='outtypepicker($event,0)' v-model="show7"
+						mode="selector">
+					</u-picker>
+				</view>
+			</view>
+			<view v-if='typevalue==3' class="c-row ">
+				<view class="title">运输方式</view>
+				<view class="con-list">
+					<view @click='show8=true'>{{outType?outType:'请选择运输方式'}}</view>
+					<u-picker :range="multiSelector1" range-key="name" @confirm='outtypepicker($event,1)' v-model="show8"
+						mode="selector">
+					</u-picker>
+				</view>
+			</view>
+			<view v-if="gridList.outType=='汽运'&&typevalue==1 ||gridList.outType == '集装箱船'&&typevalue==1" class="c-row ">
+				<view class="title">箱号-1</view>
+				<view class="con-list">
+					<input v-model='gridList.boxNo' placeholder="请输入箱号" name="input" type="digit"></input>
+				</view>
+			</view>
+			<view v-if="gridList.outType== '汽运'&&typevalue==1 ||gridList.outType == '集装箱船'&&typevalue==1" class="c-row ">
+				<view class="title">封号-1</view>
+				<view class="con-list">
+					<input v-model='gridList.titleNo' placeholder="请输入封号" name="input" type="digit"></input>
+				</view>
+			</view>
+			<view v-if="gridList.outType=='汽运'&&typevalue==1 ||gridList.outType == '集装箱船'&&typevalue==1" class="c-row ">
+				<view class="title">箱号-2</view>
+				<view class="con-list">
+					<input v-model='gridList.boxNoOther' placeholder="请输入箱号" name="input" type="digit"></input>
+				</view>
+			</view>
+			<view v-if="gridList.outType== '汽运'&&typevalue==1 ||gridList.outType == '集装箱船'&&typevalue==1" class="c-row ">
+				<view class="title">封号-2</view>
+				<view class="con-list">
+					<input v-model='gridList.titleNoOther' placeholder="请输入封号" name="input" type="digit"></input>
+				</view>
+			</view>
+			<view v-if="gridList.paramType != '1'" class="c-row ">
+				<view class="title">扣重比</view>
+				<view class="con-list">
+					<input v-model='gridList.buckleWeightRatio' placeholder="请输入扣重比" name="input" type="digit"></input>
+				</view>
+			</view>
 			<view class="c-row ">
 				<view class="title">货名</view>
 				<view class="con-list">
-					<view @click='show2=true'>{{gridList.goodsName}}</view>
+					<view v-if='goodsdisabled'>{{gridList.goodsName}}</view>
+					<view v-if='!goodsdisabled' @click='show2=true'>{{gridList.goodsName}}</view>
 					<u-picker :range="goodsList" range-key="goodsName" @confirm='goodspicker($event)' v-model="show2"
 						mode="selector">
 					</u-picker>
 				</view>
 			</view>
-			<view class="c-row ">
+			<view  v-if='typevalue==3' class="c-row ">
 				<view class="title">客户</view>
 				<view class="con-list">
 					<view @click='gocustomer' v-if='gridList.customerName'>
@@ -47,7 +182,7 @@
 					<input v-model='gridList.buckleWeightRatio' placeholder="请输入扣重比" name="input" type="digit"></input>
 				</view>
 			</view>
-			<view v-else class="c-row ">
+			<!-- <view v-else class="c-row ">
 				<view class="title">扣杂</view>
 				<view class="con-list">
 					<input v-model='gridList.buckleMiscellaneous' placeholder="初检扣杂" @input="waterContentChange"
@@ -55,8 +190,8 @@
 					<input v-model='gridList.reBuckleMiscellaneous' placeholder="复检扣杂" @input="waterContentChange"
 						name="input" type="digit"></input>
 				</view>
-			</view>
-			<view class="c-row ">
+			</view> -->
+			<view v-if='typevalue==3'  class="c-row ">
 				<view class="title">购粮性质</view>
 				<view class="con-list">
 					<input v-model='gridList.natureOfGrainPurchase' placeholder="请输入购粮性质" name="input"></input>
@@ -90,10 +225,9 @@
 				<view class="title">净重单价(元/公斤)</view>
 				<view class="con-list">
 					<input v-model='gridList.tidalGrainPrice' :disabled='pricedisabled' @blur='inputprice' placeholder="自动获取,不可编辑" name="input"
-						type="digit"></input>
+									type="digit"></input>
 				</view>
 				<button class='cu-btn bg-green shadow' @click="changeprice">{{pricetext}}</button>
-
 			</view>
 			<view v-if="gridList.type == '干粮'" class="c-row">
 				<view class="title">干粮单价(元/公斤)</view>
@@ -101,7 +235,30 @@
 					<input v-model='gridList.dryGrainPrice' :disabled='pricedisabled'  @blur='inputprice' placeholder="请输入干粮单价" name="input" type="digit"></input>
 				</view>
 				<button class='cu-btn bg-green shadow' @click="changeprice">{{pricetext}}</button>
-
+			</view>
+			<view v-if="typevalue==3" class="c-row">
+				<view class="title">箱号-1</view>
+				<view class="con-list">
+					<input v-model='gridList.boxNo' placeholder="请输入箱号" name="input" type="digit"></input>
+				</view>
+			</view>
+			<view v-if="typevalue==3" class="c-row">
+				<view class="title">封号-1</view>
+				<view class="con-list">
+					<input v-model='gridList.titleNo' placeholder="请输入封号" name="input" type="digit"></input>
+				</view>
+			</view>
+			<view v-if="typevalue==3" class="c-row">
+				<view class="title">箱号-2</view>
+				<view class="con-list">
+					<input v-model='gridList.boxNoOther' placeholder="请输入箱号" name="input" type="digit"></input>
+				</view>
+			</view>
+			<view v-if="typevalue==3" class="c-row">
+				<view class="title">封号-2</view>
+				<view class="con-list">
+					<input v-model='gridList.titleNoOther' placeholder="请输入封号" name="input" type="digit"></input>
+				</view>
 			</view>
 		</view>
 		<view style='padding-bottom:300rpx;'>
@@ -199,15 +356,31 @@
 				isShowAlert: false,
 				content: '确认初检信息后,初检员不需要再次确认质检信息,是否确定提交?',
 				inputShow: false,
+				params:{year: true,
+					month: true,
+					day: true,},
 				modalName: '',
+				pricetext:'锁定',
+				pricedisabled:false,
+				show8:false,
 				mycarStyle: '',
 				feild: undefined,
 				id: 0,
+				outType:'他运',
 				show: false,
+				show4:false,
+				show5:false,
+				show6:false,
+				show7:false,
 				edit: true,
+				goodsdisabled:false,
+				freighttext:'手动填写',
+				costtext:'手动填写',
 				selector: [],
 				show1: false,
 				inputContent: '',
+				multiSelector1:[{name:'他运',value:'他运'}],
+				typevalue:'3',
 				coverTransform: 'translateY(0px)',
 				coverTransition: '0s',
 				moving: false,
@@ -218,12 +391,13 @@
 				inputStatus: 'none',
 				carInfo: [],
 				gridCol: 4,
+				freightstatus:false,
+				coststatus:false,
 				pageSize: 10,
 				show3: false,
 				show2: false,
 				goodsList: [],
 				currentPage: 1,
-				pricetext:'锁定',
 				value:false,
 				gridBorder: false,
 				headUrl: "../../static/img/myimg/YongHu@3x.png",
@@ -245,7 +419,58 @@
 					impurity:"",
 					mildewGrain:"",
 					compName:"",
-					
+					type: '',
+					freight: 0,
+					cost: '',
+					addressUrl: '',
+					tidalGrainPrice: 0,
+					buckleWeightRatio: 0,
+					buckleMiscellaneous: 0,
+					paramType: 1,
+					warehouseInOutDetail: {
+					    grade:'',
+					    reGrade:'',
+					    imperfectGrain:'',
+					    reImperfectGrain:'',
+					    impurity:'',
+					    reImpurity:'',
+					    jiaorenli:'',
+					    reJiaorenli:'',
+					    bulkDensity:'',
+						reBulkDensity:'',
+					    mildewGrain:'',
+					    reMildewGrain:'',
+					},
+					disablednotarize:false,
+					deductionAmount: 0,
+					deductionWeight: 0,
+					grossWeight: 0,
+					tare: 0,
+					grade:'',
+					inOutDate: new Date().toISOString().slice(0, 10),
+					netWeight:0,
+					pureWeight:0,
+					deductionWeight:0,
+					waterContent:'',
+					reWaterContent:'',
+					reGrade:'',
+					imperfectGrain:'',
+					reImperfectGrain:'',
+					impurity:'',
+					reImpurity:'',
+					jiaorenli:'',
+					reJiaorenli:'',
+					bulkDensity:'',
+					reBulkDensity:'',
+					reMemo:'',
+					storageTagNo:'',
+					mildewGrain:'',
+					reMildewGrain:'',
+					boxNo:'',
+					boxNoOther:'',
+					titleNo:'',
+					titleNoOther:'',
+					statusFlag:1
 				},
 				typeList: ['潮粮', '干粮'],
 				managementType: '',
@@ -253,11 +478,30 @@
 				warehouseList: [],
 				warehouseCount: '',
 				commonWarehouseNo: '',
+				tranCarInfoList:[],
+				warehouseTradeCount:0,
 				showTran: true,
 				companyId: 1,
-				current: 4,
-				pricedisabled:false,
-				
+				contractNolist:[],
+				current: 4,taskNolist:[],
+				fleetNameList:[],
+				multiSelector: [{
+				            name: '汽运',
+				            value: '0',
+				          },
+				          {
+				            name: '火运',
+				            value: '1',
+				          },
+				          {
+				            name: '集装箱船',
+				            value: '2',
+				          },
+				          {
+				            name: '散船',
+				            value: '3',
+				          },
+				],
 				gradeList: [{
 						key: 1,
 						value: '一等品'
@@ -311,6 +555,7 @@
 		onLoad(options) {
 			this.commonWarehouseNo = options.commonWarehouseNo
 			this.warehouseCount = Number(options.warehouseCount) + 1
+			this.warehouseTradeCount = Number(options.warehouseTradeCount) + 1
 			let number = '000' + this.warehouseCount
 			number = number.substring(number.length - 4, number.length)
 			this.gridList.warehouseName = options.warehouseName
@@ -381,6 +626,41 @@
 			})
 		},
 		onShow(){
+			uni.showLoading({title: '加载中',mask:true})
+			this.$api.doRequest('get', '/inOutWarehouseTask/selectInOutWarehouseNo', {
+				flag: 2,
+				warehouseName:this.gridList.warehouseName
+			}).then(res => {
+				console.log(res)
+				this.taskNolist=res.data.data
+			})
+			this.multiSelector1=[]
+			this.$api.doRequest('get', '/inOutWarehouseTask/getContractNo', {
+				warehouseName:this.gridList.warehouseName
+			}).then(res => {
+				// console.log(res)
+				if(res.data.data.contractManagementInfoList){
+					for (let i = 0; i < res.data.data.contractManagementInfoList.length; i++) {
+						res.data.data.contractMangementInfoList[i].name='自运 ('+
+						res.data.data.contractMangementInfoList[i].contractNo+' '+res.data.data.contractMangementInfoList[i].seller+')'
+						this.multiSelector1.push(res.data.data.contractManagementInfoList[i])
+					}
+				}
+				// this.taskNolist=res.data.data
+			})
+			this.$api.doRequest('get', '/warehouseBaseInfo/selectContractNoList', {
+				flag: 7,
+				
+			}).then(res => {
+				console.log(res)
+				
+				if(res.data.data){
+					console.log(res.data.data)
+					uni.hideLoading();
+				}
+				this.contractNolist=res.data.data
+			})
+			
 			if (uni.getStorageSync('checkcustomer')) {
 			
 				let _customerInfo = uni.getStorageSync('checkcustomer')
@@ -400,14 +680,6 @@
 			}
 		},
 		methods: {
-			change(e){
-				if(e){
-					this.gridList.supplementaryRecording=1
-				}else{
-					this.gridList.supplementaryRecording=0
-				}
-				
-			},
 			changeprice(){
 				if(this.pricetext='解锁'){
 					this.pricedisabled=false
@@ -420,9 +692,157 @@
 			inputprice(){
 				if(this.pricetext='锁定'){
 					this.pricedisabled=true
+					
 					this.pricetext='解锁'
 				}
 			},
+			groupChange(e){
+				console.log(e)
+				this.gridList.serviceManagementType=e
+				if(e==1){
+					this.gridList.qualityNo=''
+				}else{
+					let number = '000' + this.warehouseCount
+					number = number.substring(number.length - 4, number.length)
+					this.gridList.qualityNo = 'SGRK' + this.getdate() + this.commonWarehouseNo + number
+				}
+			},
+			outtypepicker(e,status){
+				if(status==0){
+					this.gridList.outType=this.multiSelector[e[0]].name
+				}else{
+					if(this.multiSelector[e[0]].name=='他运'){
+						this.goodsdisabled=false
+						this.gridList.outType=this.multiSelector1[e[0]].name
+					}else{
+						this.gridList.outType='自运'
+						this.goodsdisabled=true
+						this.outType=this.multiSelector[e[0]].name
+						this.gridList.contractNo=this.multiSelector1[i].contractNo
+						 for (let i = 0; i < this.contractNolist.length; i++) {
+							if(this.gridList.contractNo==this.contractNolist[i].contractNo){
+								this.gridList.goodsName=this.outContractNo[q].goodsName
+								this.gridList.goodsNameKey=this.outContractNo[q].goodsNameKey
+							}
+						}
+						this.waterContentChange()
+					}
+				}
+				
+				console.log(this.gridList.outType)
+			},
+			changefreight(){
+				this.freightstatus=!this.freightstatus
+				if(this.freightstatus){
+					this.freighttext='自动获取'
+				}else{
+					this.freighttext='手动填写'
+				}
+			},
+			changecost(){
+				this.coststatus=!this.coststatus
+				if(this.coststatus){
+					this.costtext='自动获取'
+				}else{
+					this.costtext='手动填写'
+				}
+			},
+			inOutDatepicker(e){
+				this.gridList.inOutDate=e.year+'-'+e.month+'-'+e.day
+				console.log(e)
+			},
+			fleetpicker(e){
+				this.gridList.fleet=this.fleetNameList[e[0]].fleetName
+			},
+			change(e){
+				if(e){
+					this.gridList.supplementaryRecording=1
+				}else{
+					this.gridList.supplementaryRecording=0
+				}
+				
+			},
+			tasknopicker(e){
+				console.log(e)
+				this.gridList.inOutTaskNo=this.taskNolist[e[0]].inOutTaskNo
+				var data = this.taskNolist[e[0]]
+				if (this.taskNolist[e[0]].contractNo) {
+					this.gridList.contractNo = this.taskNolist[e[0]].contractNo
+				}else {
+					this.gridList.contractNo = this.taskNolist[e[0]].moveTaskNo
+				}
+				for (let i = 0; i < this.contractNolist.length; i++) {
+					console.log(this.gridList.contractNo,this.contractNolist[i].contractNo,this.gridList.contractNo==this.contractNolist[i].contractNo)
+					if(this.gridList.contractNo==this.contractNolist[i].contractNo){
+						this.gridList.goodsName = this.contractNolist[i].goodsName
+						this.gridList.goodsNameKey = this.contractNolist[i].goodsNameKey
+						this.gridList.grade = this.contractNolist[i].grade
+						this.gridList.inOutType = this.contractNolist[i].inOutType
+						if(this.gridList.inOutType=='采购入库'){
+							this.warehouseTradeCount = '000' + this.warehouseTradeCount
+							this.gridList.qualityNo='CGRK'+this.getdate()+this.commonWarehouseNo+this.warehouseTradeCount.substring(this.warehouseTradeCount.length - 4)
+							if (!this.contractNolist[i].unitContractPrice) {
+								this.gridList.tips = '卖方' + this.contractNolist[i].seller
+							} else {
+								this.gridList.tips ='卖方' +this.contractNolist[i].seller +'( ' + this.contractNolist[i].unitContractPrice +'元/吨)'
+							}
+							this.gridList.inOutTypeKey = 1
+						}else if(this.gridList.inOutType=='移库入库'){
+							this.warehouseTradeCount = '000' + this.warehouseTradeCount
+							this.gridList.qualityNo='YKRK'+this.getdate()+this.commonWarehouseNo+this.warehouseTradeCount.substring(this.warehouseTradeCount.length - 4)
+							if (this.contractNolist[i].unitContractPrice) {
+								this.gridList.tips ='出货库' +data.sendWarehouse +' (' +this.contractNolist[i].unitContractPrice +'元/吨)'
+							} else {
+								this.gridList.tips = '出货库' + data.sendWarehouse
+							}
+							this.gridList.inOutTypeKey = 3
+						}else if (this.contractNolist[i].inOutType == '移库出库') {
+							this.gridList.tips = '入货库' + data.receiveWarehouse
+						} else if (this.contractNolist[i].inOutType == '暂存入库') {
+							this.gridList.inOutTypeKey = 4
+						} else if (this.contractNolist[i].inOutType == '贸易服务入库') {
+							this.gridList.inOutTypeKey = 5
+						} else if (this.contractNolist[i].inOutType == '退库') {
+						  if (this.contractNolist[i].contractNo) {
+							this.gridList.tips = '买方' + this.contractNolist[i].buyer
+						  } else {
+							this.gridList.tips = '出货库' + data.sendWarehouse
+						  }
+						  this.gridList.inOutTypeKey = 6
+						}
+						 this.cost = this.contractNolist[i].contractPrice
+						if (this.cost) {
+							this.isGetCost = true
+							this.gridList.cost =this.cost - this.gridList.deductionAmount
+						} else {
+							this.isGetCost = false
+							this.gridList.cost = this.gridList.cost
+						}
+						if (this.contractNolist[i].inOutType == '移库入库') {
+							this.isSelectType = false
+						} else {
+							this.isSelectType = true
+						}
+						if (this.contractNolist[i].priceType == '随行就市') {
+							this.disabled1 = !this.disabled1
+						}
+						if (this.contractNolist[i].deliverType == '1') {
+							this.carstatus = true
+						} else {
+							this.carstatus = false
+						}
+						if (this.contractNolist[i].tranCarInfoList) {
+							this.tranCarInfoList = this.contractNolist[i].tranCarInfoList
+						              // this.carstatus = true
+						}else{
+							this.options2 =[]
+						}
+						this.fleetNameList=this.contractNolist[i].tranCarInfoList1
+					}
+					
+				}
+				console.log(this.gridList)
+			},
 			print(){
 				uni.navigateTo({
 					url: '/pages/erpbusiness/bleConnect'
@@ -465,58 +885,59 @@
 			},
 			waterContentChange() {
 				var that = this
-				if(!this.pricedisabled){
-					if (this.gridList.goodsName && this.cangid) {
-							this.$api.doRequest('get', '/purchasePrice/dryGrainPrice', {
-								warehouseId: this.cangid,
-								goodsName: this.gridList.goodsName
-							}).then(res => {
-								that.gridList.dryGrainPrice = res.data.data
-							})
-					}
-					
-					if (this.gridList.goodsName) {
-						for (var i = 0; i < this.purchasePriceList.length; i++) {
-							if (this.purchasePriceList[i].goodsName == this.gridList.goodsName) {
-								this.gridList.buckleWeightRatio = this.purchasePriceList[i].deductWeight
-								this.gridList.paramType = this.purchasePriceList[i].paramType
-							}
-						}
-					}
-					var numReg = /^[0-9]*$/
-					var numRe = new RegExp(numReg)
-					//潮粮单价改变事件
-					if (
-						this.gridList.goodsName &&
-						this.gridList.waterContent &&
-						this.gridList.grade &&
-						numRe.test(this.gridList.waterContent)
-					) {
-						this.$api.doRequest('get', '/purchasePrice/tidalGrainPrice', {
+				if (this.gridList.goodsName && this.cangid) {
+					if (!this.gridList.dryGrainPrice || this.gridList.dryGrainPrice == 0) {
+						this.$api.doRequest('get', '/purchasePrice/dryGrainPrice', {
 							warehouseId: this.cangid,
-							goodsName: this.gridList.goodsName,
-							waterContent: this.gridList.waterContent,
-							grade: this.gridList.grade,
+							goodsName: this.gridList.goodsName
 						}).then(res => {
-							if (that.gridList.paramType == '1') {
-								that.gridList.tidalGrainPrice = parseFloat(parseFloat(res.data.data) - parseFloat(that
-									.gridList.buckleMiscellaneous) / 100 * parseFloat(that.gridList
-									.dryGrainPrice)).toFixed(4)
-								if (!that.gridList.tidalGrainPrice) {
-									that.gridList.tidalGrainPrice = ''
-								}
-							} else {
-								if(that.gridList.type == '干粮'){
-									that.gridList.dryGrainPrice = res.data.data
-								}
-								else{
-									that.gridList.tidalGrainPrice = res.data.data
-								}
-							}
+							that.gridList.dryGrainPrice = res.data.data
 						})
 					}
+
+				}
+
+				if (this.gridList.goodsName) {
+					for (var i = 0; i < this.purchasePriceList.length; i++) {
+						if (this.purchasePriceList[i].goodsName == this.gridList.goodsName) {
+							this.gridList.buckleWeightRatio = this.purchasePriceList[i].deductWeight
+							this.gridList.paramType = this.purchasePriceList[i].paramType
+						}
+					}
+				}
+				var numReg = /^[0-9]*$/
+				var numRe = new RegExp(numReg)
+				//潮粮单价改变事件
+				if (
+					this.gridList.goodsName &&
+					this.gridList.waterContent &&
+					this.gridList.grade &&
+					numRe.test(this.gridList.waterContent)
+				) {
+					this.$api.doRequest('get', '/purchasePrice/tidalGrainPrice', {
+						warehouseId: this.cangid,
+						goodsName: this.gridList.goodsName,
+						waterContent: this.gridList.waterContent,
+						grade: this.gridList.grade,
+					}).then(res => {
+						if (that.gridList.paramType == '1') {
+							that.gridList.tidalGrainPrice = parseFloat(parseFloat(res.data.data) - parseFloat(that
+								.gridList.buckleMiscellaneous) / 100 * parseFloat(that.gridList
+								.dryGrainPrice)).toFixed(4)
+							if (!that.gridList.tidalGrainPrice) {
+								that.gridList.tidalGrainPrice = ''
+							}
+						} else {
+							if(that.gridList.type == '干粮'){
+								
+								that.gridList.dryGrainPrice = res.data.data
+							}
+							else{
+								that.gridList.tidalGrainPrice = res.data.data
+							}
+						}
+					})
 				}
-				
 			},
 			gocustomer() {
 				uni.navigateTo({
@@ -537,7 +958,14 @@
 				return year + '' + mouth + '' + datetime
 			},
 			submit() {
+				if(this.typevalue==3){
+					if(this.outType){
+						this.gridList.outType=this.outType
+					}
+				}
 				var that = this
+				this.gridList.baseId=this.cangid
+				this.gridList.warehouseId=this.cangid
 				if (!this.gridList.qualityNo) {
 					this.$api.msg('编号不能为空')
 					return
@@ -546,15 +974,22 @@
 					this.$api.msg('仓位不能为空')
 					return
 				}
-				if (!this.gridList.customerName) {
-					this.$api.msg('客户不能为空')
-					return
-				}
-				if (!this.gridList.storageTagNo) {
-					this.$api.msg('囤位号不能为空')
-					return
+				if(this.typevalue==3){
+					if (!this.gridList.customerName) {
+						this.$api.msg('客户不能为空')
+						return
+					}
+					if (!this.gridList.natureOfGrainPurchase) {
+						this.$api.msg('购粮性质不能为空')
+						return
+					}
 				}
-				if (this.gridList.storageTagNo.length > 10) {
+				
+				// if (!this.gridList.storageTagNo) {
+				// 	this.$api.msg('囤位号不能为空')
+				// 	return
+				// }
+				if (this.gridList.storageTagNo&&this.gridList.storageTagNo.length > 10) {
 					this.$api.msg('囤位号不能为空')
 					return
 				}
@@ -570,25 +1005,22 @@
 					this.$api.msg('货名不能为空')
 					return
 				}
-				if (this.gridList.buckleWeightRatio < 0 || this.gridList.buckleWeightRatio > 2) {
-					this.$api.msg('扣重比输入错误')
-					return
-				}
-				if (
-					String(this.gridList.buckleWeightRatio).indexOf('.') != -1 &&
-					String(this.gridList.buckleWeightRatio).length -
-					(String(this.gridList.buckleWeightRatio).indexOf('.') + 1) > 2) {
-					this.$api.msg('扣重比输入错误')
-					return
-				}
+				// if (this.gridList.buckleWeightRatio < 0 || this.gridList.buckleWeightRatio > 2) {
+				// 	this.$api.msg('扣重比输入错误')
+				// 	return
+				// }
+				// if (
+				// 	String(this.gridList.buckleWeightRatio).indexOf('.') != -1 &&
+				// 	String(this.gridList.buckleWeightRatio).length -
+				// 	(String(this.gridList.buckleWeightRatio).indexOf('.') + 1) > 2) {
+				// 	this.$api.msg('扣重比输入错误')
+				// 	return
+				// }
 				if (!this.gridList.type) {
 					this.$api.msg('类型不能为空')
 					return
 				}
-				if (!this.gridList.natureOfGrainPurchase) {
-					this.$api.msg('购粮性质不能为空')
-					return
-				}
+				
 				if(this.value==false){
 					if (!this.gridList.grade) {
 						this.$api.msg('等级不能为空')
@@ -629,7 +1061,9 @@
 					confirmText: '提交',
 					success: function(res) {
 						if (res.confirm) {
-							that.$api.doRequest('get', '/paymentManagement/cumulant', {
+							that.gridList.serviceManagementType=that.typevalue
+							if(that.typevalue==3){
+								that.$api.doRequest('get', '/paymentManagement/cumulant', {
 									compId: uni.getStorageSync('pcUserInfo').compId,
 									customerNumberCard: that.gridList.customerNumberCard,
 									goodsName: that.gridList.goodsName,
@@ -654,6 +1088,11 @@
 														count + '吨', )
 
 												} else {
+													that.$api.doRequest('post',
+															'/warehouseInOutInfo/InOutWarehouse',
+															that.gridList)
+														.then(res => {
+															that.gridList.warehouseInOutId=res.data.data
 													that.$api.doRequest('post',
 															'/qualityInspectionManagement/api/addQualityInspection',
 															that.gridList)
@@ -667,14 +1106,40 @@
 																console.log('that.gridList',that.gridList)
 																// uni.navigateBack({})
 															} else {
-																hat.$api.msg('提交失败')
+																that.$api.msg('提交失败')
 															}
 														})
+													})
 												}
 											}
 										}
 									}
 								})
+							}else{
+								that.$api.doRequest('post',
+										'/warehouseInOutInfo/InOutWarehouse',
+										that.gridList)
+									.then(res => {
+										that.gridList.warehouseInOutId=res.data.data
+										that.$api.doRequest('post',
+												'/qualityInspectionManagement/api/addQualityInspection',
+												that.gridList)
+											.then(res => {
+												if (res.data.code == 200) {
+													that.$api.msg('提交成功')
+													that.isShowPrint = true
+													that.gridList.warehouseId = that.cangid
+													that.gridList.compId = uni.getStorageSync('pcUserInfo').compId
+													uni.setStorageSync("quality_print",that.gridList)
+													console.log('that.gridList',that.gridList)
+													// uni.navigateBack({})
+												} else {
+													hat.$api.msg('提交失败')
+												}
+											})
+									})
+							}
+							
 						}
 					}
 				})
@@ -684,9 +1149,7 @@
 				// this.$set(this.gradeList,'grade',this.gradeList[e[0]].value)
 				this.gridList.grade = this.gradeList[e[0]].value
 				this.gridList.gradeKey = this.gradeList[e[0]].key
-				if(!this.pricedisabled){
-					this.waterContentChange()
-				}
+				this.waterContentChange()
 			},
 			setGoodName(e) {
 				// 
@@ -745,7 +1208,9 @@
 				}
 			},
 			binNumberpicker(e) {
+				console.log(this.warehouseList[e[0]])
 				this.gridList.binNumber = this.warehouseList[e[0]].binNumber
+				this.gridList.positionId = this.warehouseList[e[0]].id
 			},
 			del(item) {
 				this.$api.doRequest('get', '/qualityInspectionManagement/api/deleteQualityInspection', {
@@ -941,4 +1406,7 @@
 		text-align: center;
 		border-radius: 20rpx;
 	}
-</style>
+	/deep/.u-radio-group{
+		flex-direction: row-reverse;
+	}
+</style>

+ 293 - 15
pages/erpbusiness/edit_quality_testing.vue

@@ -2,19 +2,86 @@
 	<view ref="all-input">
 		<view @click='hidden' class='wrap'>
 			<view class='title_b'>基本信息</view>
+			<view class="c-row ">
+				<view class="title">入库类型</view>
+				<view class="con-list">
+					<view v-if='gridList.serviceManagementType==1'>贸易入库</view>
+					<view v-if='gridList.serviceManagementType==3'>收购入库</view>
+				</view>
+			</view>
 			<view class="c-row ">
 				<view class="title">仓库</view>
 				<view class="con-list">
 					{{gridList.warehouseName}}
 				</view>
 			</view>
+			<view v-if='gridList.serviceManagementType==1' class="c-row ">
+				<view class="title">任务编号</view>
+				<view class="con-list">
+					<view >{{gridList.inOutTaskNo}}</view>
+				</view>
+			</view>
+			<view v-if='gridList.serviceManagementType==1&&gridList.inOutType!="移库入库"' class="c-row ">
+				<view class="title">合同编号</view>
+				<view class="con-list">
+					{{gridList.contractNo}}
+				</view>
+			</view>
+			<view v-if='gridList.serviceManagementType==1&&gridList.inOutType=="移库入库"' class="c-row ">
+				<view class="title">移库编号</view>
+				<view class="con-list">
+					{{gridList.contractNo}}
+				</view>
+			</view>
 			<view class="c-row ">
-				<view class="title">编号</view>
+				<view class="title">业务编号</view>
 				<view class="con-list">
 					{{gridList.qualityNo}}
 				</view>
 			</view>
-			<view class="c-row ">
+			<view v-if='gridList.serviceManagementType==1' class="c-row ">
+				<view class="title">成本</view>
+				<view class="con-list">
+					<view v-if='!coststatus'>{{gridList.cost?gridList.cost:'自动获取,不可编辑'}}</view> 
+					<view v-if='coststatus'>
+						<input v-model='gridList.cost' placeholder="请输入成本" name="input" type="digit"></input>
+					</view>
+				</view>
+				<button class='cu-btn bg-green shadow' @click="changecost">{{costtext}}</button>
+			</view>
+			<view v-if='gridList.serviceManagementType==1' class="c-row ">
+				<view class="title">运费</view>
+				<view class="con-list flex">
+					<view v-if='!freightstatus'>{{gridList.freight?gridList.freight:'自动获取,不可编辑'}}</view>
+					<view v-if='freightstatus'>
+						<input v-model='gridList.freight' placeholder="请输入运费" name="input" type="digit"></input>
+					</view>
+				</view>
+				<button class='cu-btn bg-green shadow' @click="changefreight">{{freighttext}}</button>
+			</view>
+			<view v-if='gridList.serviceManagementType==1' class="c-row ">
+				<view class="title">扣款</view>
+				<view class="con-list">
+					<input v-model='gridList.deductionAmount' placeholder="请输入扣款" name="input" type="digit"></input>
+				</view>
+			</view>
+			<view v-if='gridList.serviceManagementType==1' class="c-row ">
+				<view class="title">入库类型</view>
+				<view class="con-list">
+					{{gridList.inOutType?gridList.inOutType:'自动获取,不可编辑'}}
+				</view>
+			</view>
+			<view v-if='gridList.serviceManagementType==1' class="c-row ">
+				<view class="title">入库日期</view>
+				<view class="con-list">
+					<view @click='show5=true'>{{gridList.inOutDate?gridList.inOutDate:'请选择入库日期'}}</view>
+					<u-picker  @confirm='inOutDatepicker($event)' :params="params" v-model="show5"
+						mode="time">
+					</u-picker>
+				</view>
+			</view>
+			
+			<view v-if='gridList.serviceManagementType==3' class="c-row ">
 				<view class="title">客户</view>
 				<view class="con-list">
 					<view @click='gocustomer'>
@@ -32,7 +99,7 @@
 					<!-- <input :disabled='flag==1' v-model='gridList.carNumber' placeholder="请输入车牌号" name="input"></input> -->
 				</view>
 			</view>
-			<view v-if="gridList.paramType != '1'" class="c-row ">
+			<!-- <view v-if="gridList.paramType != '1'" class="c-row ">
 				<view class="title">扣重比</view>
 				<view class="con-list">
 					<input :disabled='flag==1' v-model='gridList.buckleWeightRatio' placeholder="请输入扣重比"
@@ -48,8 +115,8 @@
 					<input v-else :disabled='flag!=1' v-model='gridList.reBuckleMiscellaneous' placeholder="复检扣杂"
 						name="input"></input>
 				</view>
-			</view>
-			<view class="c-row ">
+			</view> -->
+			<view  v-if='gridList.serviceManagementType==3' class="c-row ">
 				<view class="title">购粮性质</view>
 				<view class="con-list">
 					<input :disabled='flag==1' v-model='gridList.natureOfGrainPurchase' placeholder="请输入购粮性质"
@@ -90,14 +157,89 @@
 					{{gridList.type}}
 				</view>
 			</view>
-			<view v-if="gridList.type == '潮粮'" class="c-row">
+			<view v-if='gridList.serviceManagementType==1' class="c-row ">
+				<view class="title">运输方式</view>
+				<view class="con-list">
+					<view @click='show7=true'>{{gridList.outType?gridList.outType:'请选择运输方式'}}</view>
+					<u-picker :range="multiSelector" range-key="name" @confirm='outtypepicker($event,0)' v-model="show7"
+						mode="selector">
+					</u-picker>
+				</view>
+			</view>
+			<view v-if='gridList.serviceManagementType==3' class="c-row ">
+				<view class="title">运输方式</view>
+				<view class="con-list">
+					<view @click='show8=true'>{{outType?outType:'请选择运输方式'}}</view>
+					<u-picker :range="multiSelector1" range-key="name" @confirm='outtypepicker($event,1)' v-model="show8"
+						mode="selector">
+					</u-picker>
+				</view>
+			</view>
+			<view v-if='gridList.serviceManagementType==1||gridList.serviceManagementType==3&&gridList.outType=="自运"' class="c-row ">
+				<view class="title">车队</view>
+				<view class="con-list">
+					<view @click='show6=true'>{{gridList.fleet?ridList.fleet:'非车队车辆'}}</view>
+					<u-picker  @confirm='fleetpicker($event)' :range="fleetNameList" range-key="fleetName" v-model="show5"
+						mode="selector">
+					</u-picker>
+				</view>
+			</view>
+			<view v-if="gridList.outType=='汽运'&&gridList.serviceManagementType==1 ||gridList.outType == '集装箱船'&&gridList.serviceManagementType==1" class="c-row ">
+				<view class="title">箱号-1</view>
+				<view class="con-list">
+					<input v-model='gridList.boxNo' placeholder="请输入箱号" name="input" type="digit"></input>
+				</view>
+			</view>
+			<view v-if="gridList.outType== '汽运'&&gridList.serviceManagementType==1 ||gridList.outType == '集装箱船'&&gridList.serviceManagementType==1" class="c-row ">
+				<view class="title">封号-1</view>
+				<view class="con-list">
+					<input v-model='gridList.titleNo' placeholder="请输入封号" name="input" type="digit"></input>
+				</view>
+			</view>
+			<view v-if="gridList.outType=='汽运'&&gridList.serviceManagementType==1 ||gridList.outType == '集装箱船'&&gridList.serviceManagementType==1" class="c-row ">
+				<view class="title">箱号-2</view>
+				<view class="con-list">
+					<input v-model='gridList.boxNoOther' placeholder="请输入箱号" name="input" type="digit"></input>
+				</view>
+			</view>
+			<view v-if="gridList.outType== '汽运'&&gridList.serviceManagementType==1 ||gridList.outType == '集装箱船'&&gridList.serviceManagementType==1" class="c-row ">
+				<view class="title">封号-2</view>
+				<view class="con-list">
+					<input v-model='gridList.titleNoOther' placeholder="请输入封号" name="input" type="digit"></input>
+				</view>
+			</view>
+			<view v-if="gridList.serviceManagementType==3" class="c-row">
+				<view class="title">箱号-1</view>
+				<view class="con-list">
+					<input v-model='gridList.boxNo' placeholder="请输入箱号" name="input" type="digit"></input>
+				</view>
+			</view>
+			<view v-if="gridList.serviceManagementType==3" class="c-row">
+				<view class="title">封号-1</view>
+				<view class="con-list">
+					<input v-model='gridList.titleNo' placeholder="请输入封号" name="input" type="digit"></input>
+				</view>
+			</view>
+			<view v-if="gridList.serviceManagementType==3" class="c-row">
+				<view class="title">箱号-2</view>
+				<view class="con-list">
+					<input v-model='gridList.boxNoOther' placeholder="请输入箱号" name="input" type="digit"></input>
+				</view>
+			</view>
+			<view v-if="gridList.serviceManagementType==3" class="c-row">
+				<view class="title">封号-2</view>
+				<view class="con-list">
+					<input v-model='gridList.titleNoOther' placeholder="请输入封号" name="input" type="digit"></input>
+				</view>
+			</view>
+			<view v-if="gridList.type == '潮粮'&&gridList.serviceManagementType==3" class="c-row">
 				<view class="title">净重单价(元/公斤)</view>
 				<view class="con-list">
 					<input :disabled='flag==1' v-model='gridList.tidalGrainPrice' disabled placeholder="自动获取,不可编辑"
 						name="input"></input>
 				</view>
 			</view>
-			<view v-if="gridList.type == '干粮'" class="c-row">
+			<view v-if="gridList.type == '干粮'&&gridList.serviceManagementType==3" class="c-row">
 				<view class="title">干粮单价(元/公斤)</view>
 				<view class="con-list">
 					<input v-model='gridList.dryGrainPrice' placeholder="请输入干粮单价" name="input"></input>
@@ -135,6 +277,11 @@
 						</u-picker>
 						<view v-if='flag!=1' @click='show1=true'>{{gridList.grade?gridList.grade:'请选择等级'}}</view>
 						<view v-else>{{gridList.grade}}</view>
+						<u-picker :range="gradeList" range-key="value" @confirm='gradepicker1($event)' v-model="show2"
+							mode="selector">
+						</u-picker>
+						<view v-if='flag==1' @click='show2=true'>{{gridList.reGrade?gridList.reGrade:'请选择等级'}}</view>
+						<view v-else>{{gridList.reGrade}}</view>
 					</view>
 				</view>
 				<view class="c-row ">
@@ -152,6 +299,8 @@
 					<view class="con-list">
 						<input :disabled='flag==1' v-model='gridList.bulkDensity' placeholder="请输入容重"
 							name="input"></input>
+							<input :disabled='flag!=1' v-model='gridList.reBulkDensity' placeholder="请输入容重"
+								name="input"></input>
 					</view>
 				</view>
 				<view class="c-row ">
@@ -159,6 +308,8 @@
 					<view class="con-list">
 						<input :disabled='flag==1' v-model='gridList.imperfectGrain' placeholder="请输入不完整粒占比"
 							name="input"></input>
+							<input :disabled='flag!=1' v-model='gridList.reImperfectGrain' placeholder="请输入不完整粒占比"
+								name="input"></input>
 					</view>
 				</view>
 				<view class="c-row ">
@@ -166,6 +317,8 @@
 					<view class="con-list">
 						<input :disabled='flag==1' v-model='gridList.impurity' placeholder="请输入杂质占比"
 							name="input"></input>
+						<input :disabled='flag!=1' v-model='gridList.reImpurity' placeholder="请输入杂质占比"
+							name="input"></input>
 					</view>
 				</view>
 				<view class="c-row ">
@@ -173,6 +326,8 @@
 					<view class="con-list">
 						<input :disabled='flag==1' v-model='gridList.mildewGrain' placeholder="请输入霉变粒占比"
 							name="input"></input>
+						<input :disabled='flag!=1' v-model='gridList.reMildewGrain' placeholder="请输入霉变粒占比"
+							name="input"></input>
 					</view>
 				</view>
 				<view class="c-row ">
@@ -180,6 +335,8 @@
 					<view class="con-list">
 						<input :disabled='flag==1' v-model='gridList.jiaorenli' placeholder="请输入热损伤占比"
 							name="input"></input>
+						<input :disabled='flag!=1' v-model='gridList.reJiaorenli' placeholder="请输入热损伤占比"
+							name="input"></input>
 						<!-- <input v-model='gridList.jiaorenli' @click.stop="handleShowKeyboard1":disabled="true" placeholder="请输入热损伤占比" name="input"></input> -->
 					</view>
 				</view>
@@ -225,11 +382,38 @@
 				feild: undefined,
 				id: 0,
 				show: false,
+				show2:false,
+				show4:false,
+				show5:false,
+				show7:false,
+				show8:false,
+				multiSelector1:[{name:'他运',value:'他运'}],
+				outType:'',
 				selector: [],
 				show1: false,
 				goodsName: false,
 				carstatus: false,
+				params:{year: true,
+					month: true,
+					day: true,},
 				inputContent: '',
+				multiSelector: [{
+				            name: '汽运',
+				            value: '0',
+				          },
+				          {
+				            name: '火运',
+				            value: '1',
+				          },
+				          {
+				            name: '集装箱船',
+				            value: '2',
+				          },
+				          {
+				            name: '散船',
+				            value: '3',
+				          },
+				],
 				coverTransform: 'translateY(0px)',
 				coverTransition: '0s',
 				moving: false,
@@ -237,6 +421,10 @@
 				searchKeyWord: '',
 				isVip: false,
 				flag: 0,
+				freightstatus:false,
+				coststatus:false,
+				freighttext:'手动填写',
+				costtext:'手动填写',
 				userInfoTmp: [],
 				inputStatus: 'none',
 				carInfo: [],
@@ -263,6 +451,7 @@
 				current: 4,
 				value: false,
 				carModeList: [],
+				fleetNameList:[],
 				gradeList: [{
 						key: 1,
 						value: '一等品'
@@ -282,6 +471,7 @@
 				],
 				cangid: '',
 				goodsList: [],
+				taskNolist:[],
 				isShowAlert: false,
 				content: '确认初检信息后,初检员不需要再次确认质检信息,是否确定提交?',
 			}
@@ -320,6 +510,7 @@
 			this.id = options.id
 			this.flag = options.flag
 			this.cangid = options.cangid
+			this.warehouseName=options.warehouseName
 			this.managementType = options.managementType
 			console.log(this.flag)
 			var that = this
@@ -334,6 +525,14 @@
 						that.value = false
 					}
 					that.gridList = data
+					
+					that.gridList.reGrade=that.gridList.grade
+					that.gridList.reWaterContent=that.gridList.waterContent
+					that.gridList.reBulkDensity=that.gridList.bulkDensity
+					that.gridList.reImperfectGrain=that.gridList.imperfectGrain
+					that.gridList.reImpurity=that.gridList.impurity
+					that.gridList.reMildewGrain=that.gridList.mildewGrain
+					that.gridList.reJiaorenli=that.gridList.jiaorenli
 					that.$api.doRequest('get', '/warehouseBaseInfo/getWarehouse', {
 						id: this.cangid
 					}).then(res => {
@@ -361,6 +560,29 @@
 			this.gridList.gradeKey = this.gradeList[0].key
 		},
 		onShow() {
+			this.multiSelector1=[]
+			this.$api.doRequest('get', '/inOutWarehouseTask/getContractNo', {
+				warehouseName:this.warehouseName
+			}).then(res => {
+				// console.log(res)
+				if(res.data.data.contractManagementInfoList){
+					for (let i = 0; i < res.data.data.contractManagementInfoList.length; i++) {
+						res.data.data.contractMangementInfoList[i].name='自运 ('+
+						res.data.data.contractMangementInfoList[i].contractNo+' '+res.data.data.contractMangementInfoList[i].seller+')'
+						this.multiSelector1.push(res.data.data.contractManagementInfoList[i])
+					}
+				}
+				// this.taskNolist=res.data.data
+			})
+			// uni.showLoading({title: '加载中'})
+			// this.$api.doRequest('get', '/inOutWarehouseTask/selectInOutWarehouseNo', {
+			// 	flag: 2,
+			// 	warehouseName:this.warehouseName
+			// }).then(res => {
+			// 	console.log(res)
+			// 	uni.hideLoading();
+			// 	this.taskNolist=res.data.data
+			// })
 			let _kh = uni.getStorageSync('isClick')
 			if (uni.getStorageSync('checkcustomer') && _kh) {
 
@@ -381,6 +603,29 @@
 			}
 		},
 		methods: {
+			inOutDatepicker(e){
+				this.gridList.inOutDate=e.year+'-'+e.month+'-'+e.day
+				console.log(e)
+			},
+			fleetpicker(e){
+				this.gridList.fleet=this.fleetNameList[e[0]].fleetName
+			},
+			changefreight(){
+				this.freightstatus=!this.freightstatus
+				if(this.freightstatus){
+					this.freighttext='自动获取'
+				}else{
+					this.freighttext='手动填写'
+				}
+			},
+			changecost(){
+				this.coststatus=!this.coststatus
+				if(this.coststatus){
+					this.costtext='自动获取'
+				}else{
+					this.costtext='手动填写'
+				}
+			},
 			gocustomer() {
 				uni.navigateTo({
 					url: '/pages/erpbusiness/customer?cangid=' + this.cangid + '&warehouseName=' + this.gridList
@@ -525,6 +770,12 @@
 				this.gridList.goodsName = this.goodsList[e[0]].goodsName
 			},
 			submit() {
+				this.gridList.statusFlag=1
+				if(this.gridList.serviceManagementType==3){
+					if(this.outType){
+						this.gridList.outType=this.outType
+					}
+				}
 				this.gridList.flag = this.flag
 				// if(this.flag==2){
 				// 	this.gridList.reInspector=this.userInfo.userName
@@ -538,10 +789,13 @@
 					this.$api.msg('仓位不能为空')
 					return
 				}
-				if (!this.gridList.customerName) {
-					this.$api.msg('客户不能为空')
-					return
+				if(this.gridList.s==3){
+					if (!this.gridList.customerName) {
+						this.$api.msg('客户不能为空')
+						return
+					}
 				}
+				
 				if (!this.gridList.storageTagNo) {
 					this.$api.msg('囤位号不能为空')
 					return
@@ -588,10 +842,6 @@
 					this.$api.msg('类型不能为空')
 					return
 				}
-				if (!this.gridList.natureOfGrainPurchase) {
-					this.$api.msg('购粮性质不能为空')
-					return
-				}
 				if (this.value == false || this.flag == 2) {
 					if (!this.gridList.grade) {
 						this.$api.msg('等级不能为空')
@@ -627,15 +877,36 @@
 					}
 				}
 				this.gridList.storageNumber = this.gridList.storageTagNo
+				that.gridList.warehouseInOutDetail={
+					id:that.gridList.warehouseInOutId,
+					grade:that.gridList.grade,
+					reGrade:that.gridList.grade,
+					waterContent:that.gridList.waterContent,
+					reWaterContent:that.gridList.reWaterContent,
+					imperfectGrain:that.gridList.imperfectGrain,
+					reImperfectGrain:that.gridList.reImperfectGrain,
+					impurity:that.gridList.impurity,
+					reImpurity:that.gridList.reImpurity,
+					jiaorenli:that.gridList.jiaorenli,
+					reJiaorenli:that.gridList.reJiaorenli,
+					bulkDensity:that.gridList.bulkDensity,
+					reBulkDensity:that.gridList.reBulkDensity,
+					mildewGrain:that.gridList.mildewGrain,
+					reMildewGrain:that.gridList.reMildewGrain,
+				}
 				uni.showModal({
 					content: "确定提交质检信息?",
 					showCancel: true,
 					confirmText: '提交',
 					success: function(res) {
 						if (res.confirm) {
-							that.$api.doRequest('post',
+								that.$api.doRequest('post',
 									'/qualityInspectionManagement/api/editQualityInspection', that.gridList)
 								.then(res => {
+									that.$api.doRequest('post',
+											'/warehouseInOutInfo/InOutWarehouse',
+											that.gridList)
+										.then(res => {
 									if (res.data.code == 200) {
 										that.$api.msg('编辑质检成功')
 										that.gridList.warehouseId = that.cangid
@@ -646,6 +917,7 @@
 										// uni.navigateBack({})
 									}
 								})
+							})
 						}
 					}
 				})
@@ -657,6 +929,12 @@
 				this.gridList.gradeKey = this.gradeList[e[0]].key
 				this.waterContentChange()
 			},
+			gradepicker1(e) {
+				console.log(e)
+				// this.$set(this.gradeList,'grade',this.gradeList[e[0]].value)
+				this.gridList.reGrade = this.gradeList[e[0]].value
+				this.gridList.reGradeKey = this.gradeList[e[0]].key
+			},
 			binNumberpicker(e) {
 				this.gridList.binNumber = this.warehouseList[e[0]].binNumber
 			},

+ 5 - 5
pages/erpbusiness/index.vue

@@ -1,7 +1,7 @@
 <template>
 	<view>
 		<view class="wrap">
-			<view class='title'>收购业务管理</view>
+			<!-- <view class='title'>收购业务管理</view> -->
 			<view class="cu-list grid" :class="['col-' + gridCol,gridBorder?'':'no-border']">
 				<view class="cu-item" v-for="(item,index) in gridList" :key="index" @click="gridClick(item, index)"
 					v-if="index<gridCol*2 && item.show">
@@ -92,8 +92,8 @@
 					},
 					{
 						num: 1,
-						name: '收购质检',
-						// name: '入库质检',
+						// name: '收购质检',
+						name: '入库质检',
 						// icon: 'cuIcon-calendar',
 						src: '../../static/img/erp/shougouzhijian@3x.png',
 						tips: 0,
@@ -103,8 +103,8 @@
 
 					{
 						num: 2,
-						// name: '入库检斤',
-						name: '收购检斤',
+						name: '入库检斤',
+						// name: '收购检斤',
 						// icon: 'cuIcon-copy',
 						src: '../../static/img/erp/shougoujianjin@3x.png',
 						tips: 0,

+ 33 - 11
pages/erpbusiness/quality_testing.vue

@@ -3,7 +3,7 @@
 		<view class='navbar' style='position:fixed;background:#fff;top:0;width:100%;z-index:3;'>
 			<view class="back-btn cuIcon-back" @click="navBack"></view>
 			<view class='header-content' v-if='managementType==3'>出库质检</view>
-			<view class='header-content' v-if='managementType==1'>收购质检</view>
+			<view class='header-content' v-if='managementType==1'>入库质检</view>
 		</view>
 		<view class="header">
 			<view style='background:#fff;display:flex;' class="cu-bar search">
@@ -27,9 +27,9 @@
 		</view>
 		<view class="content">
 			<view style='background:#fff;' class="flex">
-				<view class='status' :class="{'active':statusType==''}" @click='clickstatus("")'>全部</view>
-				<view class='status' :class="{'active':statusType=='1'}" @click='clickstatus("1")'>待复检</view>
-				<view class='status' :class="{'active':statusType=='2'}" @click='clickstatus("2")'>待确认</view>
+				<view class='line' :class='statusType==""?"active":""' @click='clickstatus("")'>全部</view>
+				<view class='line' :class='statusType=="1"?"active":""' @click='clickstatus("1")'>待复检</view>
+				<view class='line' :class='statusType=="2"?"active":""' @click='clickstatus("2")'>待确认</view>
 			</view>
 			<view class="item-style" v-for='item in gridList' @click='examine(item)'>
 				<view class="row1">
@@ -252,7 +252,7 @@
 							that.warehouse = list[i]
 							that.warehouseName = list[i].warehouseName
 							that.warehouseCount = list[i].count
-							that.warehouseTradeCount = list[i].count
+							that.warehouseTradeCount = list[i].tradeCount
 							that.commonWarehouseNo = list[i].commonWarehouseNo
 							// uni.setStorageSync('purchasePriceList',list[i].purchasePriceList)
 							break
@@ -263,7 +263,7 @@
 						that.warehouse = that.selector[0]
 						that.warehouseName = that.selector[0].warehouseName
 						that.warehouseCount = that.selector[0].count
-						that.warehouseTradeCount = that.selector[0].count
+						that.warehouseTradeCount = that.selector[0].tradeCount
 						that.commonWarehouseNo = that.selector[0].commonWarehouseNo
 						that.cangid = that.selector[0].id
 						// uni.setStorageSync('purchasePriceList',that.selector[0].purchasePriceList)
@@ -316,7 +316,7 @@
 				this.cangid = this.selector[e[0]].id
 				uni.setStorageSync("cangid", this.cangid)
 				this.warehouseCount = this.selector[e[0]].count
-				this.warehouseTradeCount = this.selector[e[0]].count
+				this.warehouseTradeCount = this.selector[e[0]].tradeCount
 				this.commonWarehouseNo = this.selector[e[0]].commonWarehouseNo
 				// uni.setStorageSync('purchasePriceList',this.selector[e[0]].purchasePriceList)
 				this.getList(true)
@@ -366,7 +366,7 @@
 			edit(item, status) {
 				uni.navigateTo({
 					url: '/pages/erpbusiness/edit_quality_testing?id=' + item.id + '&managementType=' + this
-						.managementType + '&cangid=' + this.cangid + '&flag=' + status
+						.managementType + '&cangid=' + this.cangid + '&flag=' + status+'&warehouseName='+this.warehouseName
 				})
 			},
 			add() {
@@ -825,9 +825,31 @@
 	.search-form {
 		background: #F5F6F9;
 	}
-.active{
-	color:red;
-}
+.line {
+		display: inline-block;
+		padding: 5px;
+		position: relative;
+		font-size: 17px;
+		margin-right: 10rpx;
+	}
+
+	.line.active {
+		font-size: 38rpx;
+		font-weight: 900;
+	}
+
+	.line.active:after {
+		content: '';
+		display: block;
+		position: absolute;
+		width: 36rpx;
+		height: 6rpx;
+		left: 50%;
+		transform: translateX(-50%);
+		bottom: 0;
+		background: #22C572;
+		/* border-bottom: 1px solid #22C572; */
+	}
 	.search-box {
 		width: 100%;
 		background-color: rgb(242, 242, 242);

+ 2 - 2
pages/user/user.vue

@@ -177,8 +177,8 @@
 					},
 					{
 						num: 1,
-						// name: '入库管理',
-						name: '收购业务',
+						name: '入库管理',
+						// name: '收购业务',
 						// icon: 'cuIcon-copy',
 						src: '../../static/img/myimg/sg.png',
 						tips: 0,