twt 2 years ago
parent
commit
81b19dbd1f

+ 2 - 2
operatingCompany/common/request.js

@@ -1,6 +1,6 @@
-  const baseUrl = 'http://api.dms.66km.com.cn/' 
+//const baseUrl = 'http://api.dms.66km.com.cn/' 
 //const baseUrl = 'https://api.dms.66km.com/'
-//const baseUrl = 'https://crm.eurorepar.cn/'
+const baseUrl = 'https://crm.eurorepar.cn/'
 
 import md5 from './MD5.js'
 

+ 28 - 4
operatingCompany/pages/entryReport/opinion.vue

@@ -51,7 +51,7 @@
 			</view>
 		</view>
 
-		<view class="approve">
+		<view class="approve" v-if="approverNum==1">
 			<view class="liuc">流程</view>
 			<view style="display: flex; justify-content: space-between;">
 				<view class="approveLeft">
@@ -107,6 +107,7 @@
 				pickerItem: '',
 				shopId:'',
 				Approver:'',
+				approverNum:'',
 			}
 		},
 		onLoad(opt) {
@@ -118,13 +119,24 @@
 			this.shopId = opt.shopId;
 			if (opt.type == 3) {
 				this.suggestList = this.$store.state.suggestList;
+				console.log(this.suggestList)
 				//this.addOp()
 			}
+			this.getIsReportApprover()
 			this.getTime();
 			this.getqueryCheckCategory();
 			this.getqueryApprover();
 		},
-		methods: {
+		methods: {
+			//获取是否审批
+			getIsReportApprover(){
+				this.$http('accompany/superCheckSheet/approve/getIsReportApprover', {
+					shopId: this.shopId,
+							
+				}, 'GET').then(res => {
+					this.approverNum=res.data
+				})
+			},
 			//获取审批人
 			getqueryApprover() {
 				this.$http('accompany/superCheckSheet/approve/queryApprover', {
@@ -315,7 +327,7 @@
 					});
 					return false;
 				}
-				if (!this.Approver.approverId) {
+				if (!this.Approver.approverId&&this.approverNum==1) {
 					uni.showToast({
 						title: '请联系管理员,设置审批人',
 						icon: 'none',
@@ -349,6 +361,9 @@
 						duration: 2000,
 					});
 					setTimeout(function() {
+						// if(that.approverNum==2){
+						// 	that.approveAgree()
+						// }
 						uni.navigateTo({
 							url: 'shopEvaStar?id=' + res.data + '&sheetID=' + that.sheetID +
 								'&shopName=' + that.shopName + '&Contactor=' + that.Contactor
@@ -364,6 +379,7 @@
 							}) */
 						}
 					}, 1000)
+					
 					}
 					else  {
 						uni.showToast({
@@ -375,10 +391,18 @@
 
 				})
 			},
+			approveAgree(){  // 自动审核
+				this.$http('accompany/superCheckSheet/approve/approveAgree', {
+					sheetId: this.sheetID,
+				    approvalComment:'',
+				}, 'POST').then(res => {
+					
+				})
+			},
 			getqueryCheckCategory() {
 				this.$http('accompany/SuperCheckSheet/queryCheckCategory', {
 					sheetID: this.sheetID,
-
+               
 				}, 'GET').then(res => {
 					res.data.forEach(item => {
 						item.title = item.categoryName

+ 2 - 1
operatingCompany/pages/reportManage/reportDetail.vue

@@ -657,9 +657,10 @@
 						})
 					})
 				})
-				//console.log(this.info.categoryList)
+				console.log(this.info.suggestList)
 				this.$store.commit('mutationsCategoryList', this.info.categoryList);
 				this.$store.commit('mutationssuggestList', this.info.suggestList)
+				console.log(this.$store.state.suggestList)
 				console.log('reportDetail', this.info.shopID);
 				uni.navigateTo({
 					url: '../entryReport/entered?type=3&sheetID=' + this.id + '&shopId=' + this.info.shopID +