wangchao 3 år sedan
förälder
incheckning
7df59b7434

+ 3 - 0
pages/erp/improvedWrehousing/improvedWrehousing.vue

@@ -107,6 +107,9 @@
 				this.getList()
 				this.getList()
 			},
 			},
 			goDetail(val) {
 			goDetail(val) {
+				 // uni.setStorageSync('erpContractNoList',val)
+				  uni.setStorageSync('erpContractNo',val.contractNo)
+				  uni.setStorageSync('ContractNoCar',val.carNo)
 				uni.navigateTo({
 				uni.navigateTo({
 					url: '/pages/erp/improvedWrehousing/improvedWrehousingDetail?data=' + JSON.stringify(val),
 					url: '/pages/erp/improvedWrehousing/improvedWrehousingDetail?data=' + JSON.stringify(val),
 				})
 				})

+ 55 - 27
pages/erp/improvedWrehousing/improvedWrehousingDetail.vue

@@ -241,11 +241,12 @@
 			}
 			}
 		},
 		},
 		onLoad(options) {
 		onLoad(options) {
-			this.detailData = JSON.parse(options.data)
+			this.detailData =JSON.parse(options.data)
 			this.netWeight = this.detailData.netWeight
 			this.netWeight = this.detailData.netWeight
 			this.binNumber = this.detailData.binNumber
 			this.binNumber = this.detailData.binNumber
 			this.warehouseName = this.detailData.warehouseName
 			this.warehouseName = this.detailData.warehouseName
 			this.compId = helper.erpWarehouse.compId
 			this.compId = helper.erpWarehouse.compId
+			console.log(this.detailData.addressUrl)
 			if(this.detailData.addressUrl){
 			if(this.detailData.addressUrl){
 				this.imgUrl.push({
 				this.imgUrl.push({
 					url: this.detailData.addressUrl.split(",")[0]
 					url: this.detailData.addressUrl.split(",")[0]
@@ -256,28 +257,26 @@
 			...mapState(['hasLogin', 'userInfo']),
 			...mapState(['hasLogin', 'userInfo']),
 		},
 		},
 		onShow() {
 		onShow() {
+			this.getContractNoList();
 			if (this.detailData.inOutType == '采购入库'&&this.detailData.status!='已暂存') {
 			if (this.detailData.inOutType == '采购入库'&&this.detailData.status!='已暂存') {
 				this.detailData.freight = 0
 				this.detailData.freight = 0
 			}
 			}
-			if (!this.detailData.tranCarInfoList) this.detailData.tranCarInfoList = []
-			if (!this.detailData.contractNo) {
-				this.detailData.contractNo = '请选择合同编号'
-			} else {
-				if (this.detailData.tranCarInfoList.length == 0) {
-					this.isPC = false
-				}
+			// if (!this.detailData.tranCarInfoList) this.detailData.tranCarInfoList = []
+			// if (!this.detailData.contractNo) {
+			// 	this.detailData.contractNo = '请选择合同编号'
+			// } else {
+			// 	if (this.detailData.tranCarInfoList.length == 0) {
+			// 		this.isPC = false
+			// 	}
+			// }
+			// if (!this.detailData.goodsName) {
+			// 	this.detailData.goodsName = '货名'
+			// }
+			let _data = uni.getStorageSync('erpContractNo')
+			if(_data){
+				 this.detailData.contractNo = _data
 			}
 			}
-			if (!this.detailData.goodsName) {
-				this.detailData.goodsName = '货名'
-			}
-			let _data = uni.getStorageSync('erpContractNo')==''?{}:uni.getStorageSync('erpContractNo')
-		     this.detailData.contractNo = _data.contractNo
-			if (!_data.tranCarInfoList){
-				this.isPC = false
-					this.detailData.carNo = ""
-				_data.tranCarInfoList = []
-			} else{
-				this.isPC = true
+				
 				if(uni.getStorageSync('ContractNoCar')){
 				if(uni.getStorageSync('ContractNoCar')){
 					this.detailData.carNo = uni.getStorageSync('ContractNoCar')
 					this.detailData.carNo = uni.getStorageSync('ContractNoCar')
 					this.$api.doRequest('get', '/warehouseBaseInfo/selectCost', {
 					this.$api.doRequest('get', '/warehouseBaseInfo/selectCost', {
@@ -289,15 +288,9 @@
 						}
 						}
 					})
 					})
 				}else{
 				}else{
-					this.detailData.carNo = _data.tranCarInfoList[0].carNo
+					// this.detailData.carNo = uni.setStorageSync('erpContractNoList')[0].carNo
 				}
 				}
-			}
-			if(this.detailData.carNo){
-				for(let i = 0 ; i < uni.getStorageSync('erpContractNo').tranCarInfoList.length ;i++){
-					if(uni.getStorageSync('erpContractNo').tranCarInfoList[i].carNo == this.detailData.carNo)
-					this.detailData.tranCarNo = uni.getStorageSync('erpContractNo').tranCarInfoList[i].tranCarNo
-				}
-			}
+			
 			// 获取入库类型
 			// 获取入库类型
 			this.getrkType()
 			this.getrkType()
 			//获取经办人
 			//获取经办人
@@ -309,6 +302,41 @@
 			},
 			},
 		},
 		},
 		methods: {
 		methods: {
+			getContractNoList() {
+				this.imgUrl = []
+				this.$api.doRequest('get', '/warehouseBaseInfo/selectContractNoList', {
+					compId: this.compId,
+					flag: 7,
+				}).then(res => {
+					if (res.data.code == 200) {debugger
+						console.log(res.data.data)
+						console.log(this.id)
+						for (let i = 0; i < res.data.data.length; i++) {
+							console.log(this.contractNo)
+							if (res.data.data[i].contractNo == this.detailData.contractNo) {
+								if (res.data.data[i].tranCarInfoList) {
+									this.isPC = true
+									uni.setStorageSync('erpContractNoCarList', res.data.data[i].tranCarInfoList);
+									
+									if(this.detailData.carNo){debugger
+									console.log(uni.getStorageSync('erpContractNoCarList'))
+										for(let i = 0 ; i < uni.getStorageSync('erpContractNoCarList').length;i++){
+											console.log(uni.getStorageSync('erpContractNoCarList'))
+											if(uni.getStorageSync('erpContractNoCarList')[i].carNo == this.detailData.carNo)
+											this.detailData.tranCarNo = uni.getStorageSync('erpContractNoCarList')[i].tranCarNo
+										}
+									}
+									// uni.setStorageSync('erpContractNoList', res.data.data[i].tranCarInfoList);
+									// this.detailData.tranCarInfoList = res.data.data[i].tranCarInfoList
+								} else {
+									this.isPC = false
+								}
+							}
+						}
+					}
+				})
+			
+			},
 			//计算纯重
 			//计算纯重
 			pureWeightCount() {
 			pureWeightCount() {
 				if (this.netWeight && this.detailData.buckleWeightRatio && this.detailData.solidGrainWater && this
 				if (this.netWeight && this.detailData.buckleWeightRatio && this.detailData.solidGrainWater && this

+ 3 - 3
pages/erp/warehousing/selectCarNo.vue

@@ -31,9 +31,9 @@
 				contractNo:''
 				contractNo:''
 			}
 			}
 		},
 		},
-		onShow() {
-			this.newList = uni.getStorageSync('erpContractNo').tranCarInfoList
-			this.contractNo = uni.getStorageSync('erpContractNo').contractNo
+		onShow() {debugger
+			this.newList = uni.getStorageSync('erpContractNoCarList')
+			this.contractNo = uni.getStorageSync('erpContractNo')
 		},
 		},
 		onLoad(options) {
 		onLoad(options) {
 			
 			

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

@@ -75,7 +75,7 @@
 					_list.unshift(item).pop(item)
 					_list.unshift(item).pop(item)
 				}
 				}
 				uni.setStorageSync('erpContractNoList', _list);
 				uni.setStorageSync('erpContractNoList', _list);
-				uni.setStorageSync('erpContractNo', item);
+				uni.setStorageSync('erpContractNo', item.contractNo);
 				uni.navigateBack({})
 				uni.navigateBack({})
 			},
 			},
 			getContractNoList() {
 			getContractNoList() {

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

@@ -742,7 +742,6 @@
 					this.detailData.statusFlag = 3
 					this.detailData.statusFlag = 3
 					title = "提交成功"
 					title = "提交成功"
 				}
 				}
-				return
 				let that = this
 				let that = this
 				uni.showModal({
 				uni.showModal({
 					content: "确定提交入库信息?",
 					content: "确定提交入库信息?",

+ 1 - 1
pages/grain_pulse/my_grain_pulse.vue

@@ -180,7 +180,7 @@
 					},
 					},
 				})
 				})
 			},
 			},
-			edit(item){debugger
+			edit(item){
 				if(item.status=='已驳回'||item.status=='待审核'){
 				if(item.status=='已驳回'||item.status=='待审核'){
 					uni.navigateTo({
 					uni.navigateTo({
 						url:'/pages/grain_pulse/editcompany?id='+item.id
 						url:'/pages/grain_pulse/editcompany?id='+item.id

+ 0 - 1
pages/task/audit/warehouse_approval.vue

@@ -101,7 +101,6 @@
 		},
 		},
 		methods: {
 		methods: {
 			getData() {
 			getData() {
-				debugger
 				var data = []
 				var data = []
 				this.$api.doRequest('get', '/purchasePrice/purchasePriceLook', {
 				this.$api.doRequest('get', '/purchasePrice/purchasePriceLook', {
 					id: this.id
 					id: this.id

+ 0 - 2
pages/task/my_task.vue

@@ -70,7 +70,6 @@
 			...mapState(['hasLogin', 'userInfo'])
 			...mapState(['hasLogin', 'userInfo'])
 		},
 		},
 		onShow() {
 		onShow() {
-			debugger
 			this.warehouseInOutInfo.currentPage = 1
 			this.warehouseInOutInfo.currentPage = 1
 			this.data.currentPage = 1
 			this.data.currentPage = 1
 			this.taskInfo = []
 			this.taskInfo = []
@@ -298,7 +297,6 @@
 				this.getIndexBuyData(1)
 				this.getIndexBuyData(1)
 			},
 			},
 			navToDetailPage(item) {
 			navToDetailPage(item) {
-				debugger
 				if (item.businessCode == 'PROCUREMENT-ORDER-APPROVE') {
 				if (item.businessCode == 'PROCUREMENT-ORDER-APPROVE') {
 					uni.navigateTo({
 					uni.navigateTo({
 						url: '/pages/task/procurement_details?id=' + item.businessId
 						url: '/pages/task/procurement_details?id=' + item.businessId