gjy 2 anni fa
parent
commit
6d1489a081

+ 2 - 2
config/index.js

@@ -6,11 +6,11 @@ const dev = {
 	// baseUrlNew: 'http://192.168.110.9:9888/',
 	// baseUrlNew: 'http://192.168.110.138:8090/',
 	// baseUrlNew: 'http://192.168.110.67:9888/',
-	baseUrlNew: 'http://192.168.110.138:8090/',
+	// baseUrlNew: 'http://192.168.110.138:8090/',
 	// baseUrlNew: 'http://192.168.110.9:9888/',
 	// baseUrlNew: 'http://192.168.110.82:8090/',
 	// baseUrlNew: 'http://192.168.110.82:8090/',
-	// baseUrlNew: 'http://192.168.110.202:8090/',
+	baseUrlNew: 'http://192.168.110.202:8090/',
 	// baseUrlNew: 'http://192.168.110.138:8090/',
 	// 上传图片的
 	// baseUrlNew: 'https://api2.eliangeyun.com/',

+ 51 - 3
pages/reimbursement/the_reimbursement.vue

@@ -35,9 +35,11 @@
 				<view class="c-row1">
 					<view class="title1"> {{item.amountMoney}} 元</view>
 				</view>
-				<view style="display: flex;justify-content: flex-end;margin-top: 30rpx;">
+				<view style="display: flex;justify-content: flex-end;margin-top: 30rpx;flex-wrap: wrap;">
 					<!-- v-if="item.status == '已驳回'" -->
 					<!-- v-if="item.status == '已驳回'" -->
+					<!-- <view class="wenzi1 audit" v-if="!item.approveStatus && item.status =='已驳回' "  @click="rejecttext(item)">驳回原因</view> -->
+					<view class="wenzi1 audit"v-if="item.approveStatus && item.approveStatus !='发起人撤回' " @click="withdraw(item)">撤回</view>
 					<view class="wenzi1 audit" @click="deleExpense(item)"
 						v-if="item.status=='已驳回'">删除</view>
 					<view class="wenzi1 audit" @click="requestFunds(3,item)"
@@ -50,7 +52,11 @@
 				<uni-load-more :status="loadStatus"></uni-load-more>
 			</view>
 		</view>
-
+		<u-modal v-model="show" title="驳回原因">
+			<view class="slot-content">
+				<rich-text :nodes="rejectcontent"></rich-text>
+			</view>
+		</u-modal>
 		<u-toast ref="uToast" />
 		<view class="bottom-btn">
 			<view class="btn" @click="requestFunds(1)">收款</view>
@@ -68,11 +74,14 @@
 				tableData: [],
 				reType: '',
 				flag: '',
+				rejectcontent:'',
+				show:false,
 				isLoadMore: false, //是否加载中
 				loadStatus: 'loading', //加载样式:more-加载前样式,loading-加载中样式,nomore-没有数据样式
 			}
 		},
 		onShow() {
+			this.tableData=[]
 			this.getList()
 		},
 		//下拉刷新
@@ -93,6 +102,42 @@
 			}
 		},
 		methods: {
+			rejecttext(val){
+				this.$api.doRequest('get', '/commonUser/getReason', {
+					id: val.id,
+				}).then(res => {
+					if (res.data.code == 200) {
+						this.show=true
+						this.rejectcontent=res.data.data
+						that.getList()
+					} else {
+					}
+				})
+				
+			},
+			withdraw(val){
+				var that = this
+				uni.showModal({
+					content: "撤回成功后,可再次提交,确定撤回吗?",
+					showCancel: true,
+					confirmText: '确定',
+					success: function(res) {
+						if (res.confirm) {
+							that.$api.doRequest('post', '/newWorkflow/api/stopInstance', {
+								businessKey: val.id,
+								workflowId: val.workflowId,
+							}).then(res => {
+								if (res.data.code == 200) {
+									that.$api.msg('撤回成功')
+									that.getList()
+								} else {
+									that.$api.msg('撤回成功')
+								}
+							})
+						}
+					}
+				})
+			},
 			gofujian(val){
 				uni.navigateTo({
 					url: '/pages/reimbursement/addaccessory?id=' + val.id + "&expensesType=" + val
@@ -225,7 +270,7 @@
 	}
 
 	.wenzi1 {
-		margin-right: 40rpx;
+		margin:10rpx 40rpx 10rpx 0;
 		/* margin-top: 10rpx; */
 		/* height: 50rpx;
 		width: 100rpx; */
@@ -298,4 +343,7 @@
 			box-sizing: border-box;
 		}
 	}
+	.slot-content{
+		text-align: center;
+	}
 </style>

+ 38 - 10
pages/task/audit/universalityAudit.vue

@@ -51,6 +51,7 @@
 								</view>
 								<view class="" style="width: 70%;">
 									<view class="char_css">{{item.appendixName}}</view>
+									<u-line-progress v-if='item.progressstatus' :striped="true" :percent="item.progress" :striped-active="true"></u-line-progress>
 									<view class="img_size">{{item.appendixSize}}</view>
 								</view>
 								<view style="color: #22C572;" class="img_dowload" @click="openDownload(item)">
@@ -213,19 +214,39 @@
 		},
 		methods: {
 			openDownload(item) {
-				uni.downloadFile({
+				const downloadTask =uni.downloadFile({
 					url: item.appendixPath,
 					success: function(res) {
 						var filePath = res.tempFilePath;
-						uni.openDocument({
-							filePath: filePath,
-							showMenu: true,
-							success: function(res) {
-								console.log('打开文档成功');
-							}
-						});
+						if(item.type=='pdf'||item.type == 'xls'||item.type == 'xlsx'||item.type == 'doc'||item.type == 'docx'){
+							uni.openDocument({
+								filePath: filePath,
+								showMenu: true,
+								success: function(res) {
+									console.log('打开文档成功');
+								}
+							});
+						}else{
+							uni.previewImage({
+								current: 0, //预览图片的下标
+								urls: [item.appendixPath]
+							})
+						}
+						
 					}
 				});
+				downloadTask.onProgressUpdate((res) => {
+					item.progressstatus=true
+					item.progress=res.progress
+					console.log('下载进度' + res.progress);
+					console.log('已经下载的数据长度' + res.totalBytesWritten);
+					console.log('预期需要下载的数据总长度' + res.totalBytesExpectedToWrite);
+				
+					// 满足测试条件,取消下载任务。
+					// if (res.progress > 50) {
+					// 	downloadTask.abort();
+					// }
+				});
 			},
 			filterFileType(index, lists) {
 				if (lists[index].fileType != 'jpg' && lists[index].fileType != 'png' && lists[index].fileType != 'gif') {
@@ -240,7 +261,7 @@
 				}
 			},
 			auditFile(src) {
-				uni.downloadFile({
+				 uni.downloadFile({
 					url: src,
 					success: function(res) {
 						var filePath = res.tempFilePath;
@@ -248,11 +269,16 @@
 							filePath: filePath,
 							showMenu: true,
 							success: function(res) {
+								
 								console.log('打开文档成功');
 							}
 						});
-					}
+					},
+					fail: function(res) {
+						
+					},
 				});
+				
 			},
 			getImgUrl(res) {
 				this.fileUrl.push(res)
@@ -359,6 +385,8 @@
 					}).then(res1 => {
 						that.imglist = res1.data.data
 						for (let i = 0; i < that.imglist.length; i++) { //获取后缀
+						that.imglist[i].progressstatus=false
+						that.imglist[i].progress=0
 							if (that.imglist[i].appendixName) {
 								let index = that.imglist[i].appendixName.lastIndexOf(".")
 								that.imglist[i].type = that.imglist[i].appendixName.substring(index + 1)