Browse Source

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

zhongtianhaoyuan 2 years ago
parent
commit
00bd38bb8e

+ 1 - 1
config/index.js

@@ -10,7 +10,7 @@ const dev = {
 	// baseUrlNew: 'http://192.168.110.202:8090/',
 	// baseUrlNew: 'http://192.168.110.138:8090/',
 	// 上传图片的
-	// baseUrlNew: 'https://api2.eliangeyun.com/',
+	baseUrlNew: 'https://api2.eliangeyun.com/',
 	h5Appid: 'wxb66b599f7f61b46f',
 	debug: false
 }

+ 57 - 91
pages/erpbusiness/add_quality_testing.vue

@@ -294,7 +294,7 @@
 				</view>
 				<button class='cu-btn bg-green shadow' @click="changeprice">{{pricetext}}</button>
 			</view>
-			<!-- <view v-show="gridList.type == '潮粮'&&utils.getCurrectRoles('acquisitionQuality.initial')&&typevalue==1"
+			<view v-show="gridList.type == '潮粮'&&utils.getCurrectRoles('acquisitionQuality.initial')&&typevalue==1"
 				class="c-row">
 				<view class="title">水分增价(元/公斤)</view>
 				<view class="con-list">
@@ -327,7 +327,7 @@
 						placeholder="自动获取,不可编辑" name="input" type="digit"></input>
 				</view>
 			</view>
-			 -->
+			
 			<view v-show="gridList.type == '潮粮'&&utils.getCurrectRoles('acquisitionQuality.initial')&&typevalue==1"
 				class="c-row">
 				<view class="title">净重单价(元/公斤)</view>
@@ -796,18 +796,9 @@
 						that.purchasePriceList = uni.getStorageSync('purchasePriceList')
 					}
 
-					// for (let i = 0; i < res.data.data.length; i++) {
-					// 	this.goodsList.push(res.data.data[i].goodsName)
-					// }
-					// if(this.goodsList.some(item=>{return item.goodsName=='玉米'})){
-					// 	this.gridList.goodsName='玉米'
-					// 	uni.setStorageSync('goodsName',this.gridList.goodsName)
-					// }else{
-					// 	this.gridList.goodsName=this.goodsList[0].goodsName
-					// 	uni.setStorageSync('goodsName',this.gridList.goodsName)
-					// }
 				}
 			})
+			console.log(this.gridList)
 			this.gridListInit = this.gridList
 		},
 		onShow() {
@@ -843,6 +834,7 @@
 			this.$api.doRequest('get', '/inOutWarehouseTask/getContractNo', {
 				warehouseName: this.gridList.warehouseName
 			}).then(res => {
+				uni.hideLoading();
 				// console.log(res)
 				if (res.data.data.contractManagementInfoList) {
 					for (let i = 0; i < res.data.data.contractManagementInfoList.length; i++) {
@@ -859,17 +851,6 @@
 				}
 				// this.taskNolist=res.data.data
 			})
-			this.$api.doRequest('get', '/warehouseBaseInfo/selectContractNoList', {
-				flag: this.contractFlag,
-
-			}).then(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')
@@ -948,37 +929,22 @@
 				}
 			},
 			groupChange(e) {
-				console.log(e)
-				this.gridList = JSON.parse(JSON.stringify(this.gridListInit))
+				console.log(e,this.gridListInit)
+				this.gridListInit.warehouseName=this.gridList.warehouseName
+				// this.gridList = JSON.parse(JSON.stringify(this.gridListInit))
+				this.gridList = this.$u.deepClone(this.gridListInit)
 				this.gridList.serviceManagementType = e
 				if (e == 1) {
 					this.gridList.qualityNo = ''
 					this.flag = 2
-					this.contractFlag = 7
+					// this.contractFlag = 7
 				} else {
 					this.flag = 3
-					this.contractFlag = 10
-					let number = '000' + this.warehouseCount
-					number = number.substring(number.length - 4, number.length)
-					this.gridList.qualityNo = 'SGRK' + this.getdate() + this.commonWarehouseNo + number
+					// this.contractFlag = 10
+					// let number = '000' + this.warehouseCount
+					// number = number.substring(number.length - 4, number.length)
+					// this.gridList.qualityNo = 'SGRK' + this.getdate() + this.commonWarehouseNo + number
 				}
-				uni.showLoading({
-					title: '加载中',
-					mask: true
-				});
-				this.$api.doRequest('get', '/warehouseBaseInfo/selectContractNoList', {
-					flag: this.contractFlag,
-				}).then(res => {
-					
-					if (res.data.data) {
-						this.contractNolist = res.data.data
-						uni.hideLoading()
-					}
-					
-				}).catch(error => {
-				    uni.hideLoading()
-					// this.$emit('on-error', error);
-				});
 				this.$api.doRequest('get', '/inOutWarehouseTask/selectInOutWarehouseNo', {
 					flag: this.flag,
 					warehouseName: this.gridList.warehouseName
@@ -1060,21 +1026,22 @@
 				} else {
 					this.gridList.contractNo = this.taskNolist[e[0]].moveTaskNo
 				}
-				for (let i = 0; i < this.contractNolist.length; i++) {
-
-					if (this.gridList.contractNo == this.contractNolist[i].contractNo) {
+				this.$api.doRequest('get', '/contractManagementInfo/getInContract', {
+					contractNo:this.gridList.contractNo,compId:uni.getStorageSync('pcUserInfo').compId
+				}).then(res => {
+					this.contractNolist=res.data.data
 						if (this.typevalue == 3) {
 							var gooddata = this.goodsList.filter((item) => {
-								return item.goodsName == this.contractNolist[i].goodsName
+								return item.goodsName == this.contractNolist.goodsName
 							})
-							 if(this.contractNolist[i].priceType == "定价收购" && this.inType == "收购入库"){
-							    this.gridList.dryGrainPrice = Number(this.contractNolist[i].unitContractPrice/1000).toFixed(2)
+							 if(this.contractNolist.priceType == "定价收购" && this.inType == "收购入库"){
+							    this.gridList.dryGrainPrice = Number(this.contractNolist.unitContractPrice/1000).toFixed(2)
 							}
 							if (gooddata.length > 0) {
 								// 收购入库
 								for (let q = 0; q < this.goodsList.length; q++) {
-									if (this.goodsList[q].goodsName == this.contractNolist[i].goodsName) {
-										this.gridList.goodsName = this.contractNolist[i].goodsName
+									if (this.goodsList[q].goodsName == this.contractNolist.goodsName) {
+										this.gridList.goodsName = this.contractNolist.goodsName
 										this.setGoodName([q])
 									}
 								}
@@ -1097,38 +1064,39 @@
 								
 							}
 						} else {
-							this.gridList.goodsName = this.contractNolist[i].goodsName
+							this.gridList.goodsName = this.contractNolist.goodsName
 							if (this.gridList.goodsName == '玉米') {
 								this.gridList.type = '干粮'
-								if (this.contractNolist[i].priceType != '随行就市') {
-									this.gridList.dryGrainPrice = this.contractNolist[i].contractPrice
+								if (this.contractNolist.priceType != '随行就市') {
+									this.gridList.dryGrainPrice = this.contractNolist.contractPrice
 								}
 								this.edit = true
 							} else if (this.gridList.goodsName == '玉米(潮粮)') {
 								this.gridList.type = '潮粮'
 								this.edit = true
-								if (this.contractNolist[i].priceType != '随行就市') {
-									this.gridList.tidalGrainPrice = this.contractNolist[i].contractPrice
+								if (this.contractNolist.priceType != '随行就市') {
+									this.gridList.tidalGrainPrice = this.contractNolist.contractPrice
 								}
 
 							} else {
 								this.gridList.type = '干粮'
 								this.edit = false
-								if (this.contractNolist[i].priceType != '随行就市') {
-									this.gridList.dryGrainPrice = this.contractNolist[i].contractPrice
+								if (this.contractNolist.priceType != '随行就市') {
+									this.gridList.dryGrainPrice = this.contractNolist.contractPrice
 								}
 							}
 						}
-						this.gridList.goodsNameKey = this.contractNolist[i].goodsNameKey
-						this.gridList.grade = this.contractNolist[i].grade
-						this.gridList.inOutType = this.contractNolist[i].inOutType
+						this.gridList.goodsNameKey = this.contractNolist.goodsNameKey
+						this.gridList.grade = this.contractNolist.grade
+						this.gridList.inOutType = this.contractNolist.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
+							if (!this.contractNolist.unitContractPrice) {
+								this.gridList.tips = '卖方' + this.contractNolist.seller
 							} else {
-								this.gridList.tips = '卖方' + this.contractNolist[i].seller + '( ' + this.contractNolist[i]
+								this.gridList.tips = '卖方' + this.contractNolist.seller + '( ' + this.contractNolist[i]
 									.unitContractPrice + '元/吨)'
 							}
 
@@ -1136,32 +1104,32 @@
 						} 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]
+							if (this.contractNolist.unitContractPrice) {
+								this.gridList.tips = '出货库' + data.sendWarehouse + ' (' + this.contractNolist
 									.unitContractPrice + '元/吨)'
 							} else {
 								this.gridList.tips = '出货库' + data.sendWarehouse
 							}
 							this.gridList.inOutTypeKey = 3
-						} else if (this.contractNolist[i].inOutType == '移库出库') {
+						} else if (this.contractNolist.inOutType == '移库出库') {
 							this.gridList.tips = '入货库' + data.receiveWarehouse
-						} else if (this.contractNolist[i].inOutType == '暂存入库') {
+						} else if (this.contractNolist.inOutType == '暂存入库') {
 							this.gridList.inOutTypeKey = 4
-						} else if (this.contractNolist[i].inOutType == '贸易服务入库') {
+						} else if (this.contractNolist.inOutType == '贸易服务入库') {
 							this.gridList.inOutTypeKey = 5
-						} else if (this.contractNolist[i].inOutType == '退库') {
+						} else if (this.contractNolist.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].contractNo) {
-								this.gridList.tips = '买方' + this.contractNolist[i].buyer
+							if (this.contractNolist.contractNo) {
+								this.gridList.tips = '买方' + this.contractNolist.buyer
 							} else {
 								this.gridList.tips = '出货库' + data.sendWarehouse
 							}
 							this.gridList.inOutTypeKey = 6
 						}
-						this.cost = this.contractNolist[i].contractPrice
+						this.cost = this.contractNolist.contractPrice
 						if (this.cost) {
 							this.isGetCost = true
 							this.gridList.cost = this.cost - this.gridList.deductionAmount
@@ -1169,40 +1137,38 @@
 							this.isGetCost = false
 							this.gridList.cost = this.gridList.cost
 						}
-						if (this.contractNolist[i].inOutType == '移库入库') {
+						if (this.contractNolist.inOutType == '移库入库') {
 							this.isSelectType = false
 						} else {
 							this.isSelectType = true
 						}
-						if (this.contractNolist[i].priceType == '随行就市') {
+						if (this.contractNolist.priceType == '随行就市') {
 							this.disabled1 = true
 						} else {
 							this.disabled1 = false
 						}
-						if (this.contractNolist[i].deliverType == '1') {
+						if (this.contractNolist.deliverType == '1') {
 							this.carstatus = true
 						} else {
 							this.carstatus = false
 						}
 						this.tranCarInfoList = []
-						if (this.contractNolist[i].tranCarInfoList) {
-							for (var q = 0; q < this.contractNolist[i].tranCarInfoList.length; q++) {
-								this.contractNolist[i].tranCarInfoList[q].carNo1 = this.contractNolist[i].tranCarInfoList[q].carNo
-								if(this.contractNolist[i].tranCarInfoList[q].tranCarNo){
-									this.contractNolist[i].tranCarInfoList[q].carNo1=this.contractNolist[i].tranCarInfoList[q].carNo+'('+this.contractNolist[i].tranCarInfoList[q].tranCarNo+')'
+						if (this.contractNolist.tranCarInfoList) {
+							for (var q = 0; q < this.contractNolist.tranCarInfoList.length; q++) {
+								this.contractNolist.tranCarInfoList[q].carNo1 = this.contractNolist.tranCarInfoList[q].carNo
+								if(this.contractNolist.tranCarInfoList[q].tranCarNo){
+									this.contractNolist.tranCarInfoList[q].carNo1=this.contractNolist.tranCarInfoList[q].carNo+'('+this.contractNolist.tranCarInfoList[q].tranCarNo+')'
 								}else{
-									this.contractNolist[i].tranCarInfoList[q].carNo1=this.contractNolist[i].tranCarInfoList.carNo	
+									this.contractNolist.tranCarInfoList[q].carNo1=this.contractNolist.tranCarInfoList.carNo	
 								}
 							}
-							this.tranCarInfoList = this.contractNolist[i].tranCarInfoList
+							this.tranCarInfoList = this.contractNolist.tranCarInfoList
 							// this.carstatus = true
 						} else {
 							this.tranCarInfoList = []
 						}
-						this.fleetNameList = this.contractNolist[i].tranCarInfoList1
-					}
-
-				}
+						this.fleetNameList = this.contractNolist.tranCarInfoList1
+				})
 				this.$forceUpdate()
 				console.log(this.gridList)
 			},

+ 8 - 0
pages/universalityAudit/addaduit.vue

@@ -45,6 +45,9 @@
 </template>
 
 <script>
+	import {
+		mapState
+	} from 'vuex';
 	import * as config from '../../config'
 	export default {
 		data() {
@@ -59,6 +62,9 @@
 		onShow(){
 			this.getList()
 		},
+		computed: {
+			...mapState(['hasLogin', 'userInfo']),
+		},
 		watch: {
 			imglist: {
 				handler: function() {
@@ -140,6 +146,8 @@
 				}
 				
 				var that = this
+				this.dataobj.compId=uni.getStorageSync('pcUserInfo').compId
+				this.dataobj.sponsor=this.userInfo.userName
 				
 				uni.showModal({
 					content: '确定发起申请?',

+ 4 - 4
pages/universalityAudit/list.vue

@@ -1,17 +1,17 @@
 <template>
 	<view>
 		<view class='wrap' v-for='item in datalist' @click='lookdetails(item)'>
-			<view>
+			<view style='display:flex;justify-content: space-between;'>
 				<view class='title'>
 					{{item.businessType}}
 				</view>
-				<view style='color:#FD714F;'>
+				<view v-if='item.approveStatus' style='color:#FD714F;'>
 					{{item.approveStatus?item.approveStatus:item.status}}
 				</view>
-				<view style='color:#FF4E4E;'>
+				<view v-if='item.status=="已驳回"' style='color:#FF4E4E;'>
 					{{item.approveStatus?item.approveStatus:item.status}}
 				</view>
-				<view style='color:#22C572;'>
+				<view v-if='item.status=="已通过"' style='color:#22C572;'>
 					{{item.approveStatus?item.approveStatus:item.status}}
 				</view>
 			</view>

+ 2 - 2
pages/universalityAudit/look.vue

@@ -156,13 +156,13 @@
 					})
 					// 查流程
 					this.$api.doRequest('get', '/workflow/query/workflowDefinitions', {
-						businessCode: 'SHOU-CONTRACT-APPROVE',
+						businessCode: 'GENERAL-AUDIT-APPROVE',
 						tmpCompId: uni.getStorageSync('pcUserInfo').compId
 					}).then(res1 => {
 						this.$api.doRequest('get', '/commonUser/getHis', {
 							workflowId: res1.data.data[0].id,
 							businessKey: this.id,
-							branch:that.list.jointVentureParties?that.list.jointVentureParties:'zt'
+							branch:that.dataobj.businessType?that.dataobj.businessType:'zt'
 						}).then(response => {
 							uni.hideLoading()
 							for (let i = 0; i < response.data.data.length; i++) {