15807800591 2 роки тому
батько
коміт
064408f323
3 змінених файлів з 215 додано та 6 видалено
  1. 208 3
      pages/index/detail.vue
  2. 4 0
      pages/index/index.vue
  3. 3 3
      pages/login.vue

+ 208 - 3
pages/index/detail.vue

@@ -133,7 +133,70 @@
 				<text class="span">W000003496</text>
 			</view>
 		</view>
+		
+		
+		
+		
+		<view>
+			<u-popup :show="show" mode="bottom">
+				<view class="content">
+					<scroll-view scroll-y="true" style="height: 300rpx;">
+						<view>
+							<view>提交流程面板</view>
+							<view v-for="(item, index) in nextNodes" :key="index" style="float: left;">
+								{{item.name}}:
+							</view>
+							<u-radio-group @change="radioGroupChange">
+								<u-radio v-for="(item, index) in nextNodes" :key="index" :name="item.id">
+		
+								</u-radio>
+							</u-radio-group>
+		
+						</view>
+					</scroll-view>
+					<view class="confrim-btn">
+						<u-button @click="submit()">确定</u-button>
+					</view>
+				</view>
+			</u-popup>
+			<u-popup :show="bshow" mode="bottom">
+				<view class="content">
+					<scroll-view scroll-y="true" style="height: 300rpx;">
+						<view>
+							<view>回退流程面板</view>
+							<view v-for="(item, index) in backNodes" :key="index" style="float: left;">
+								{{item.name}}:
+							</view>
+							<u-radio-group @change="radioGroupChange">
+								<u-radio v-for="(item, index) in backNodes" :key="index" :name="item.id">
+			
+								</u-radio>
+							</u-radio-group>
+			
+						</view>
+					</scroll-view>
+					<view class="confrim-btn">
+						<u-button @click="workflowsback()">确定</u-button>
+					</view>
+				</view>
+			</u-popup>
+			
+		</view>
+		<view class="footer">
+			
+			<button class="btn ws" @click="submission()" v-if="p.istmp">{{p.istmp}}提交</button>
+				<button class="btn ws" @click="back()">回退</button>
+		</view>
+		
+		
+		
 	</view>
+	
+	
+	
+	
+
+	
 </template>
 
 <script>
@@ -141,6 +204,7 @@ let qrcode = require('@/common/code.js');
 export default {
 	data() {
 		return {
+			p:{},
 			item: {},
 			current: 0,
 			radio: [{ name: '正式报告' }, { name: '仅原始数据' }, { name: '协助试验' }],
@@ -150,6 +214,15 @@ export default {
 					items: {}
 				}
 			},
+			show: false,
+			bshow: false,
+			itemt: {},
+			up: {},
+			content: '标题',
+			nextNodes: [],
+			backNodes: [],
+			touser: {nodeid: "1649917385058", isToPerson: true, userids: "__jFFZYvLIG6uFc7CdBMg"},
+			
 		};
 	},
 	onLoad(e) {
@@ -186,7 +259,13 @@ export default {
 		});
 	},
 	methods: {
-		//详情
+		
+		// 选中任一radio时,由radio-group触发
+		radioGroupChange(e) {
+			// console.log(e);
+			this.itemt.nextNodeIds = [];
+			this.itemt.nextNodeIds.push(e);
+		},//详情
 		getDocuments() {
 		
 		
@@ -196,6 +275,8 @@ export default {
 				loading: 'false',
 				success: res => {
 					this.item = res.data.data.items;
+					this.p = res.data.data;
+					console.log('this.p:' + JSON.stringify(this.p));
 					//this.current=res.data.data.items.report_type;
 					if(this.item.report_type=='正式报告'){
 						this.current=0;
@@ -205,7 +286,7 @@ export default {
 					this.current=2;
 					}
 					this.iteml = res.data.data;
-					console.log('zx:' + JSON.stringify(res));
+					
 					this.items.applicationId = "__gAPYBW4YxB3UePM3lqO";
 					this.items.docId = this.iteml.id;
 					this.items.id = this.iteml.id;
@@ -259,7 +340,131 @@ export default {
 					});
 				}
 			});
-		}
+		},
+			//提交流程面板
+			submission() {
+
+
+				this.http.request({
+					url: this.http.urls.documents + this.id+"/panels/submission",
+					data: this.items,
+
+					method: 'POST',
+					success: res => {
+						//this.item=res.data.data;
+						console.log('zx22:' + JSON.stringify(res));
+						this.show = true;
+
+						this.title = res.data.data.name;
+						this.nextNodes = res.data.data.nextNodes;
+						this.itemt.flowId = res.data.data.flowId;
+						this.itemt.flowType = "80";
+						this.itemt.currentNodeId = res.data.data.currentNodeId;
+						this.itemt.attitude = "";
+						this.itemt.signature = "";
+						this.itemt.submitTo = "";
+						this.itemt.circulatorInfo = "";
+						this.itemt.subFlowApproverInfo = "";
+						this.itemt.subFlowApproverInfoAll = "";
+						this.itemt.document = this.items.document;
+						//this.content=res.data.data.formname;
+					}
+				});
+			}, //提交流程
+			submit() {
+//this.itemt.document.items.purpose="试验目的111";
+				this.itemt.applicationId = "__gAPYBW4YxB3UePM3lqO";
+				this.itemt.docId = this.iteml.id;
+				this.itemt.id = this.iteml.id;
+				this.itemt.formId = this.iteml.formid;
+				this.itemt.parentId = "";
+				this.itemt.subFlowApprover = [];
+				this.itemt.subSelects = [];
+				this.itemt.submitTo = [];
+				this.itemt.templateForm = "";
+				this.itemt.viewId = "";
+				this.http.request({
+					url: this.http.urls.documents + this.id+"/workflows/submit",
+					data: this.itemt,
+
+					method: 'PUT',
+					success: res => {
+						//this.item=res.data.data;
+						console.log('zx22:' + JSON.stringify(res));
+						this.show = false;
+
+						this.title = res.data.data.name;
+						this.nextNodes = res.data.data.nextNodes;
+						uni.$emit('index');
+						uni.redirectTo({ url: '/pages/index/index' ,
+						
+						});
+						//this.content=res.data.data.formname;
+					}
+				});
+			}, //刷新数据
+			//回退流程面板
+			back() {
+			
+			
+				this.http.request({
+					url: this.http.urls.documents +this.id+"/panels/back",
+					data: this.items,
+			
+					method: 'POST',
+					success: res => {
+						//this.item=res.data.data;
+						console.log('zx22:' + JSON.stringify(res.data.data));
+						this.bshow = true;
+			
+						this.title = res.data.data.name;
+						this.backNodes = res.data.data.backNodes;
+						this.itemt.flowId = res.data.data.flowId;
+						this.itemt.flowType = "81";
+						this.itemt.currentNodeId = res.data.data.currentNodeId;
+						this.itemt.attitude = "";
+						this.itemt.signature = "";
+						this.itemt.submitTo = "";
+						this.itemt.circulatorInfo = "";
+						this.itemt.subFlowApproverInfo = "";
+						this.itemt.subFlowApproverInfoAll = "";
+						this.itemt.document = this.items.document;
+						//this.content=res.data.data.formname;
+					}
+				});
+			},  //提交回退流程
+			workflowsback() {
+//this.itemt.document.items.purpose="试验目的111";
+				this.itemt.applicationId = "__gAPYBW4YxB3UePM3lqO";
+				this.itemt.docId = this.iteml.id;
+				this.itemt.id = this.iteml.id;
+				this.itemt.formId = this.iteml.formid;
+				this.itemt.parentId = "";
+				this.itemt.subFlowApprover = [];
+				this.itemt.subSelects = [];
+				this.itemt.submitTo = [];
+				this.itemt.templateForm = "";
+				this.itemt.viewId = "";
+				this.http.request({
+					url: this.http.urls.documents +this.id+"/workflows/back",
+					data: this.itemt,
+
+					method: 'PUT',
+					success: res => {
+						//this.item=res.data.data;
+						console.log('zx22:' + JSON.stringify(res));
+						this.bshow = false;
+
+						this.title = res.data.data.name;
+						this.nextNodes = res.data.data.nextNodes;
+						uni.$emit('index');
+						uni.redirectTo({ url: '/pages/index/index' ,
+						
+						});
+						//this.content=res.data.data.formname;
+					}
+				});
+			}, 
 	}
 };
 </script>

+ 4 - 0
pages/index/index.vue

@@ -32,6 +32,10 @@
 						<view class="label">试验部门:</view>
 						<view class="name">{{item.items.__DVAKyCmSOS9bvFpome2.value}}</view>
 					</view>
+					<view class="it">
+						<view class="label">当前审批人:</view>
+						<view class="name">{{item.items.__hInQ1R0YkMQNrgTq3q0.value}}</view>
+					</view>
 					<view class="tag">{{item.items.__oUywWKvn4BhpnBmxqYT.value}}</view>
 				</view>
 			</view>

+ 3 - 3
pages/login.vue

@@ -1,6 +1,6 @@
 <template>
 	<view>
-		<view class="l_top"><image src="" mode="aspectFill"></image></view>
+		<!--<view class="l_top"><image src="" mode="aspectFill"></image></view>-->
 		<view class="bg">
 			<view class="login">
 				<view class="form_group">
@@ -44,7 +44,7 @@ export default {
 		//自动登陆
 			
 		if (this.hasLogin()) {
-			uni.switchTab({ url: '/pages/index/index' ,
+			uni.redirectTo({ url: '/pages/index/index' ,
 			
 			
 			});
@@ -92,7 +92,7 @@ export default {
 	padding: 15px;
 	image {
 		width: 100%;
-		height: 170px;
+		height: 10px;
 		border-radius: 5px;
 	}
 	.login {