zhengkaixin 1 year ago
parent
commit
4c7890da11

+ 20 - 0
apis/pagejs/oa.js

@@ -34,6 +34,26 @@ export function processNext(data) {
 	
 	})
 }
+
+export function processReturn(data) {
+	return request({
+		url: '/mobile/oa/processReturn',
+		data: data,
+		method: 'post',	
+	
+	})
+}
+
+export function processRefuse(data) {
+	return request({
+		url: '/mobile/oa/processRefuse',
+		data: data,
+		method: 'post',	
+	
+	})
+}
+
+
 export function processRevoke(data) {
 	return request({
 		url: '/mobile/oa/processRevoke',

+ 11 - 9
components/ApproveInfo.vue

@@ -78,20 +78,21 @@
 		
 								<template v-if="item.type.indexOf('selecttime')>-1">
 		
-									<u-calendar max-date="2060-01-01" v-model="showCalendar" mode="date"
+									<!-- <u-calendar max-date="2060-01-01" v-model="showCalendar" mode="date"
 										@change="changeCalendar"></u-calendar>
 									<view @click="showCalendar = true,keyCalendar=item">
-										{{formData[item.key]?formData[item.key]:getViewItem(item)}}</view>
-		
+										{{formData[item.key]?formData[item.key]:getViewItem(item)}}</view> -->
+										{{formData[item.key]?formData[item.key]:getViewItem(item)}}
 								</template>
 								<template v-if="item.type.indexOf('selecttime2')>-1">
 		
-									<u-calendar max-date="2060-01-01" v-model="showCalendar" mode="range"
+									<!-- <u-calendar max-date="2060-01-01" v-model="showCalendar" mode="range"
 										@change="changeCalendar2"></u-calendar>
 									<view @click="showCalendar = true,keyCalendar=item">
 										{{formData[item.key]?formData[item.key]:createTime}}至{{formData[item.key2]?formData[item.key2]:createTime}}
 									</view>
-		
+									 -->
+									{{formData[item.key]?formData[item.key]:createTime}}至{{formData[item.key2]?formData[item.key2]:createTime}}
 								</template>
 							</template>
 		
@@ -116,8 +117,8 @@
 						<template v-if="item.type.indexOf('upload')>-1">
 							<view class="upload">
 		
-								<u-upload-file-all ref="uUpload"  :max-size="50 * 1024 * 1024"
-									:file-max-size="50 * 1024 * 1024" :maxCount="0" 
+								<u-upload-file-all  :isedit="0" ref="uUpload"  :max-size="50 * 1024 * 1024"
+									:file-max-size="50 * 1024 * 1024" 
 									 :file-list="fileList"></u-upload-file-all>
 							</view>
 						</template>
@@ -334,7 +335,7 @@
 		.oawork-item {
 			padding: 4rpx 16rpx 4rpx 16rpx;
 			width: 100%;
-
+			
 			.oawork-item1 {
 				display: flex;
 				align-items: center;
@@ -406,7 +407,8 @@
 			.oawork-item1_a {}
 		}
 
-		/deep/.oawork-width49 {
+		/deep/.oawork-width49 {
+			    display: flex;
 			padding: 4rpx 0px 4rpx 20rpx;
 			width: 49%;
 

+ 3 - 1
components/ApproveView.vue

@@ -138,7 +138,9 @@
 	
 			.approveItem_a1 {
 	
-				.approveItem_a1_text1 {
+				.approveItem_a1_text1 {
+					    display: flex;
+					    align-items: center;
 					color: rgba(16, 16, 16, 1);
 					font-size: 32rpx;
 					.approveItem_a1_text1or{

+ 1 - 1
config/.env.dev.js

@@ -4,7 +4,7 @@ const UNI_APP = {
 	//BASE_URL: 'http://192.168.33.220:8086/',
 	IMG_URL:"http://www.jsrailway.com.cn/",
 	
-	//BASE_URL:'http://192.168.77.162:8086/railroad-server/',
+	BASE_URL:'http://192.168.77.162:8086/railroad-server/',
 	//BASE_URL:'http://192.168.77.222:8086/railroad-server/',
 
 	

+ 12 - 12
pages.json

@@ -322,7 +322,7 @@
 		}, {
 			"path": "pages/staffHome/filesonicInfo",
 			"style": {
-				"navigationBarTitleText": "",
+				
 				"enablePullDownRefresh": false
 			}
 
@@ -349,56 +349,56 @@
 		{
 			"path": "pages/oawork/index",
 			"style": {
-				"navigationBarTitleText": "",
+				 
 				"enablePullDownRefresh": false
 			}
 
 		}, {
 			"path": "pages/oawork/data1",
 			"style": {
-				"navigationBarTitleText": "",
+				 
 				"enablePullDownRefresh": false
 			}
 
 		}, {
 			"path": "pages/oawork/business/list",
 			"style": {
-				"navigationBarTitleText": "",
+				 
 				"enablePullDownRefresh": false
 			}
 
 		}, {
 			"path": "pages/oawork/business/add",
 			"style": {
-				"navigationBarTitleText": "",
+				 
 				"enablePullDownRefresh": false
 			}
 
 		}, {
 			"path": "pages/oawork/business/info",
 			"style": {
-				"navigationBarTitleText": "",
+			 
 				"enablePullDownRefresh": false
 			}
 
 		}, {
 			"path": "pages/oawork/business/select",
 			"style": {
-				"navigationBarTitleText": "",
+				 
 				"enablePullDownRefresh": false
 			}
 
 		}, {
 			"path": "pages/oawork/approve/list",
 			"style": {
-				"navigationBarTitleText": "",
+			 
 				"enablePullDownRefresh": false
 			}
 
 		}, {
 			"path": "pages/oawork/approve/info",
 			"style": {
-				"navigationBarTitleText": "",
+			 
 				"enablePullDownRefresh": false
 			}
 
@@ -406,7 +406,7 @@
 		{
 			"path": "pages/oawork/approve/view",
 			"style": {
-				"navigationBarTitleText": "",
+			 
 				"enablePullDownRefresh": false
 			}
 		},
@@ -414,7 +414,7 @@
 			"path" : "pages/videofile/index",
 			"style" : 
 			{
-				"navigationBarTitleText" : "",
+			 
 				"enablePullDownRefresh" : false
 			}
 		},
@@ -422,7 +422,7 @@
 			"path" : "pages/videofile/list",
 			"style" : 
 			{
-				"navigationBarTitleText" : "",
+			 
 				"enablePullDownRefresh" : false
 			}
 		}

+ 51 - 30
pages/oawork/approve/info.vue

@@ -7,22 +7,22 @@
 		:fieldInfo="fieldInfo" :formData="formData" :fileList="fileList" ></approve-info>
 		
 		<view class="submitBtn" v-if="isApproveUser">
-			<u-button type="info" class="submitBtn30" @click="submit(0)">退回</u-button>
-			<u-button type="primary" class="submitBtn60" @click="submit(1)" >通过</u-button>
+			<u-button type="info" class="submitBtn30" @click="submit(0)">拒绝</u-button>
+			<u-button type="primary" class="submitBtn60" @click="submit(1)" >同意</u-button>
 		</view>
 		<approve-view  :activityList="activityList"></approve-view>
 			<u-popup  v-model="spPopup"  mode="bottom"
 			border-radius="14"
 			:closeable="true"  >
 				<view class="spPopupView" >
-					<view class="spPopupViewTitle" >{{sp?'确认通过':'确认退回'}}</view>
+					<view class="spPopupViewTitle" >{{sp?'确认通过':'确认拒绝'}}</view>
 					<view class="spPopupViewBtn" >
-						<u-input v-model="spText" type="textarea" height="300" :border="true" :auto-height="true" />
+						<u-input v-model="spText" type="textarea" :placeholder="sp?'可填写审批意见...':'可填写拒绝理由'" height="300" :border="true" :auto-height="true" />
 					</view>
 					<view class=" submitBtn" >
 						<u-button type="info" class="submitBtn30" @click="spPopup=false">关闭</u-button>
 						
-						<u-button type="primary"   class="submitBtn60" @click="submitApi(sp)">{{sp?'确认通过':'确认退回'}}</u-button>
+						<u-button type="primary"   class="submitBtn60" @click="submitApi(sp)">{{sp?'确认通过':'确认拒绝'}}</u-button>
 					</view>
 				</view>
 				
@@ -116,37 +116,58 @@
 
 		},
 		methods: {
-			
+			submitCb(){
+				const eventChannel = this.getOpenerEventChannel();
+				eventChannel.emit('refreshData');
+				this.spPopup=false;
+				uni.showModal({
+					title:"提示",
+					showCancel:false,
+					content:"操作成功!",
+					success() {
+						uni.navigateBack()
+					}
+				})
+			},
 			submitApi(sp) {
 				uni.showLoading({
 					title: "加载中",
 					mask: true,
 				})
+				
+				if(sp==1){
+					API.processNext({
+						 opinion:this.spText,
+						  action:this.sp,
+						procinstId: this.pid
+					}).then((res) => {
+						uni.hideLoading();
+						
+						this.submitCb()
+					}).catch(error => {
+						uni.showToast({
+							title: error,
+							icon: "none"
+						})
+					})
+				}
+				if(sp==0){
+					API.processRefuse({
+						 opinion:this.spText,
+						  action:this.sp,
+						procinstId: this.pid
+					}).then((res) => {
+						uni.hideLoading();
+						
+						this.submitCb()
+					}).catch(error => {
+						uni.showToast({
+							title: error,
+							icon: "none"
+						})
+					})
+				}
 				
-				API.processNext({
-					 opinion:this.spText,
-					  action:this.sp,
-					procinstId: this.pid
-				}).then((res) => {
-					uni.hideLoading();
-					const eventChannel = this.getOpenerEventChannel();
-					eventChannel.emit('refreshData');
-					this.spPopup=false;
-					uni.showModal({
-						title:"提示",
-						showCancel:false,
-						content:"操作成功!",
-						success() {
-							uni.navigateBack()
-						}
-					})
-					
-				}).catch(error => {
-					uni.showToast({
-						title: error,
-						icon: "none"
-					})
-				})
 			},
 			submit(sp) {
 				var _this=this;

+ 72 - 7
pages/oawork/business/info.vue

@@ -1,7 +1,12 @@
 <template>
 	<view>
 		<u-navbar title="详情查看">
-
+			<view slot="right"  
+				style="margin-right: 20px;  ">
+			
+				<u-button type="error"  v-if="processRevokeShow"
+				  @click="processRevokeBtn()" size="mini">撤回</u-button>
+			</view>
 		</u-navbar>
 	
 		<approve-info  v-if="viewApproveBl"
@@ -74,8 +79,9 @@
 				},
 				viewApproveBl:false,
 				id: "",
-				placeholder: '开始输入...'
-
+				placeholder: '开始输入...',
+				processRevokeShow:false,
+				
 			}
 		},
 		onLoad(op) {
@@ -91,11 +97,62 @@
 			this.getProcessDetails();
 
 		},
-		methods: {
+		methods: {
+			processRevokeApi(){
+				uni.showLoading({
+					title: "加载中",
+					mask: true,
+				})
+				
+				API.processRevoke({
+				
+					procinstId: this.id
+				}).then((res) => {
+					this.viewApproveBl=false
+					this.formData={}
+					this.getProcessDetails(true);
+					uni.showModal({
+						title:"提示",
+						showCancel:false,
+						content:"操作成功!",
+						
+						success() {
+							
+						}
+					})
+					const eventChannel = this.getOpenerEventChannel();
+					eventChannel.emit('refreshData');
+					
+						
+					
+					
+				}).catch(error => {
+					uni.showToast({
+						title: error,
+						icon: "none"
+					})
+				})
+			},
+			processRevokeBtn(){
+				
+				uni.showModal({
+					title: '提示',
+					content: '确认是否撤回本表单?',
+					success: res=> {
+						if (res.confirm) {
+						   
+						   this.processRevokeApi();
+						   
+						} else if (res.cancel) {
+							console.log('用户点击取消');
+						}
+					}
+				});
+			},
 			submit(draftStatus) {
 				
 			},
-			getProcessDetails() {
+			getProcessDetails(bl) {
 				uni.showLoading({
 					title: "加载中",
 					mask: true,
@@ -109,7 +166,13 @@
 					this.activityList = res.data.activityList
 					var applyContent = res.data.applyContent
 					this.init()
-					if(applyContent){
+					if(applyContent){
+						var personInfo=this.carhelp.getPersonInfo()
+						if(applyContent.applyPersonId==personInfo.id&&applyContent.status=="0"){
+							this.processRevokeShow=true
+						}else{
+							this.processRevokeShow=false
+						}
 						this.formData={
 							...applyContent,
 							...this.formData
@@ -140,7 +203,9 @@
 						}
 					}
 					this.viewApproveBl=true
-
+					if(bl){
+						this.$forceUpdate();
+					}
 					console.log("formData",this.formData)
 				}).catch(error => {
 					uni.showToast({

+ 5 - 6
pages/oawork/index.vue

@@ -55,13 +55,12 @@
 							{
 								name:"发文申请",
 								type:"2",
-								show:1
 							
 							},
 							{
 								name:"合同审核表",
 								type:"3",
-								show:1
+							
 							},
 							{
 								name:"收文处理专门笺",
@@ -80,21 +79,21 @@
 							{
 								name:"打印机维护",
 								type:"1",
-								show:1
+							
 							},
 							{
 								name:"计算机维护",
 								type:"4",
-								show:1
+							
 							},
 							{
 								name:"公司申请单",
 								type:"5",
-								show:1
+							
 							},
 							{
 								name:"外出登记单",
-								type:"6"
+								type:"7"
 							},
 							{
 								name:"网络信息发布",

+ 41 - 5
uni_modules/uview-ui/components/u-upload-file-all/u-upload-file-all.vue

@@ -11,7 +11,7 @@
 			}"
 		>
 			<view
-				v-if="deletable"
+				v-if="deletable&&isedit"
 				class="u-delete-icon"
 				@tap.stop="deleteItem(index)"
 				:style="{
@@ -20,6 +20,14 @@
 			>
 				<u-icon class="u-icon" :name="delIcon" size="20" :color="delColor"></u-icon>
 			</view>
+			<view
+				v-if="!isedit"
+				class="u-download-icon"
+				@tap.stop="viewItem(index)"
+				
+			>
+				<u-icon class="u-icon" name="download" size="20" :color="delColor"></u-icon>
+			</view>
 			<u-line-progress
 				v-if="showProgress && item.progress > 0 && item.progress != 100 && !item.error"
 				:show-percent="false"
@@ -27,14 +35,17 @@
 				class="u-progress"
 				
 			></u-line-progress>
+		<template v-if="isedit">
+			
 			<view @tap.stop="retry(index)" v-if="item.error" class="u-error-btn2 u-error-btn">点<br/>击<br/>重<br/>试</view>
-		<view  v-else-if="item.view||item.progress==100&&item.response&&item.response.result" class="u-error-btn2 u-primary-btn">上<br/>传<br/>成<br/>功<br/></view>
-		<view  v-else-if="!item.error" class="u-error-btn2 u-warning-btn">上<br/>传<br/>中</view>
+			<view  v-else-if="item.view||item.progress==100&&item.response&&item.response.result" class="u-error-btn2 u-primary-btn">上<br/>传<br/>成<br/>功<br/></view>
+			<view  v-else-if="!item.error" class="u-error-btn2 u-warning-btn">上<br/>传<br/>中</view>
+		</template>
 		<view class="file">{{item.file?item.file.name:item.name}}</view>
 		
 		</view>
 		<slot name="file" :file="lists"></slot>
-		<view style="display: inline-block;" @tap="selectFile" v-if="maxCount > lists.length">
+		<view style="display: inline-block;" @tap="selectFile" v-if="maxCount > lists.length&&isedit">
 			<slot name="addBtn"></slot>
 			<view
 				v-if="!customBtn"
@@ -261,7 +272,11 @@ export default {
 		index: {
 			type: [Number, String],
 			default: ''
-		}
+		},
+		isedit:{
+			type: [Number, String],
+			default: 1
+		},
 	},
 	mounted() {},
 	data() {
@@ -472,6 +487,11 @@ export default {
 			this.$emit('on-error', err, index, this.lists, this.index);
 			this.showToast('上传失败,请重试');
 		},
+		viewItem(item){
+			
+			window.location.href=item.url;
+		},
+		
 		// 删除一个图片
 		deleteItem(index) {
 			uni.showModal({
@@ -642,6 +662,22 @@ export default {
 	justify-content: center;
 }
 
+
+.u-download-icon {
+	position: absolute;
+	top: 10rpx;
+	right: 10rpx;
+	z-index: 10;
+	background-color: #4CAF50;
+	border-radius: 100rpx;
+	width: 44rpx;
+	height: 44rpx;
+	@include vue-flex;
+	align-items: center;
+	justify-content: center;
+}
+
+
 .u-icon {
 	@include vue-flex;
 	align-items: center;