15807800591 1 rok pred
rodič
commit
789d748987

+ 14 - 6
common/http.js

@@ -1,9 +1,11 @@
-const ip = 'http://192.168.0.251/obpm';
-const ip2 = 'http://192.168.0.251/liug';
+//const ip = 'http://192.168.0.251/obpm';
+//const ip2 = 'http://192.168.0.251/liug';
 //const ip = 'http://106.55.241.82:8888/obpm';
 //const ip2 = 'http://106.55.241.82:8888/liug';
 //const ip = 'https://tdm.liugong.com/obpm';
 //const ip2 = 'https://tdm.liugong.com/liug';
+const ip = 'https://tdmtest.liugong.com/obpm';
+const ip2 = 'https://tdmtest.liugong.com/liug';
 
 
 /**
@@ -15,7 +17,7 @@ const urls = {
 	home: ip + '/app/home/index', //首页数据
 
 	login: ip + '/runtime/login/loginWithCiphertext2', //用户登陆
-	//login:  'http://192.168.0.251/signon/runtime/login/checkin', //用户登陆
+	//login:  'https://tdmtest.liugong.com/signon/runtime/login/checkin', //用户登陆
 	myprofile: ip + '/runtime/users/myprofile', //用户登陆
 	upload: ip + '/runtime/upload?applicationId=__gAPYBW4YxB3UePM3lqO&allowedTypes=00', //文件上传
 	user_list: ip2 + '/app/getUser', //获取全部联系人
@@ -46,6 +48,10 @@ const urls = {
 		'/runtime/__gAPYBW4YxB3UePM3lqO/forms/__0FLGNncOS1lz0T9jsFn/empty?formId=__0FLGNncOS1lz0T9jsFn&appId=__gAPYBW4YxB3UePM3lqO', //创建委托单文档
 	//validate: ip + '/runtime/__gAPYBW4YxB3UePM3lqO/documents/validate', //保存文档documents
 	validate: ip + '/runtime/__gAPYBW4YxB3UePM3lqO/documents', //保存文档documents
+	yj_list: ip + '/runtime/__gAPYBW4YxB3UePM3lqO/views/__IAtGp6MmqoS9Fj0z8tO/documents?lines=9999&&sortCol=&sortStatus=&_currpage=1&treedocid=&parentNodeId=&_docid=&_fieldid=&isRelate=true&startDate=&endDate=&parentParam=&isQueryButton=false&', //设备借用列表子表
+	
+	
+	
 	borr_empty: ip +
 		'/runtime/__gAPYBW4YxB3UePM3lqO/forms/__w9J1gxcIWgXmNw6pE1F/empty?formId=__w9J1gxcIWgXmNw6pE1F&appId=__gAPYBW4YxB3UePM3lqO', //创建设备借用
 	return_empty: ip +
@@ -68,8 +74,8 @@ const urls = {
 
 	eq_list: ip + '/runtime/__gAPYBW4YxB3UePM3lqO/views/__WLVxKX6e0Pq0cTwdNUQ/documents?', //借用选择列表
 	re_list: ip + '/runtime/__gAPYBW4YxB3UePM3lqO/views/__ajlFXbohdIXtn7ErzZq/documents?', //归还选择列表
-	boor_list: ip + '/runtime/__gAPYBW4YxB3UePM3lqO/views/__xjFSxNZjnkBHIWEYKar/documents?', //设备借用列表子表
-	ghlis_list: ip + '/runtime/__gAPYBW4YxB3UePM3lqO/views/__X1qStasuORL3244AFFq/documents?', //设备借用列表子表
+	boor_list: ip + '/runtime/__gAPYBW4YxB3UePM3lqO/views/__xjFSxNZjnkBHIWEYKar/documents?lines=9999&', //设备借用列表子表
+	ghlis_list: ip + '/runtime/__gAPYBW4YxB3UePM3lqO/views/__X1qStasuORL3244AFFq/documents?lines=9999&', //设备借用列表子表
 
 }
 /**
@@ -85,11 +91,12 @@ const request = (opt) => {
 		"Content-Type": opt.contentType,
 		//"Authorization": getUser().token ? getUser().token : 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpYXQiOjE2NzAxMzYzMjEsInN1YiI6IkFpNmhsbGhOalMydWxsOVRLR2IiLCJleHAiOjE2NzAxMzk5MjEsIm5iZiI6MTY3MDEzNjMyMX0.cNQpCWUwVjA2jkrKCnybIfxl6iQQJ-xj3S8dmQSmQ3A',
 		"accessToken": getUser().accessToken || ''
+		//"accessToken": getUser().checkInToken || ''
 	};
 	opt.loading = opt.loading || 'true';
 	opt.success = opt.success || function() {};
 	console.log("**************************************参数调式***************************************************");
-	console.log("请求地址:" + opt.url + " 请求参数:" + JSON.stringify(opt.data));
+	console.log("请求地址:" + opt.url + " 请求参数:" + JSON.stringify(opt.data)+JSON.stringify(opt.header));
 	console.log("************************************************************************************************");
 	if (opt.loading == 'true') {
 		uni.showLoading({
@@ -104,6 +111,7 @@ const request = (opt) => {
 		header: opt.header,
 		dataType: 'json',
 		success: res => {
+			//console.log(" 请求结果:" + JSON.stringify(res));
 			setTimeout(() => {
 				uni.hideLoading();
 			}, 500)

+ 32 - 6
pages/index/detail.vue

@@ -153,20 +153,21 @@
 			</view>
 		</view>
 		<view class="vtitle">样机</view>
-		<view class="form_group">
-			<view class="lable">GH560</view>
+		<view class="form_group" v-for="(item, index) in list" :key="index">
+			<view class="lable">{{item.items.__df3EGbLwLuQbY18mt6a.value}}</view>
 			<view class="tag">
-				<text class="span">XH890656565556</text>
+				<text class="span">{{item.items.__Y8VlxrNmQKyOx0qZWl3.value}}</text>
 				<text class="icon more">&#xe631;</text>
 			</view>
 		</view>
+		<!--
 		<view class="form_group">
 			<view class="lable">GH560</view>
 			<view class="tag">
 				<text class="span">XH890656565556</text>
 				<text class="icon more">&#xe631;</text>
 			</view>
-		</view>
+		</view>-->
 		<view class="footer" v-if="btnshow">
 			<view class="flex">
 				<view class="f"><button class="btn br" @click="validate()">保存</button></view>
@@ -194,7 +195,7 @@
 		<u-popup :show="show" mode="bottom" @close="show = false" closeable round="15">
 			<view class="popup">
 				<u-divider text="提交流程面板"></u-divider>
-				<scroll-view scroll-y="true" style="height: 300rpx;">
+				<scroll-view scroll-y="true" style="height: 450rpx;">
 					<view v-for="(item, index) in nextNodes" :key="index" class="bitem" @click="bselect(item, 'nextNodes')">
 						<view class="icon select check" v-if="item.check">&#xe600;</view>
 						<view class="icon select" v-else>&#xe8bb;</view>
@@ -206,6 +207,8 @@
 							<view class="icon" @click.stop="selectApprovers()">&#xeb25;</view>
 						</view>
 					</view>
+					<textarea placeholder="意见" style="height: 120px;" maxlength="200" v-model="itemt.attitude" />
+						
 				</scroll-view>
 				<view class="confrim-btn"><button class="btn" @click="submit()">确定</button></view>
 			</view>
@@ -268,6 +271,7 @@ export default {
 				isToPerson: true,
 				userids: '__jFFZYvLIG6uFc7CdBMg'
 			},
+			list: [],
 			btnshow: false,
 			state: 0,
 			btitem: {
@@ -331,6 +335,7 @@ export default {
 			} else if (res.ste == 5) {
 				this.item.WTRWFP = res.items.__vhLhnW6B7JBtaxiXkQ3.value;
 			}
+			console.log('item2:' + JSON.stringify(this.item));
 			this.convert();
 		});
 	},
@@ -369,7 +374,8 @@ export default {
 					this.item = res.data.data.items;
 					this.p = res.data.data;
 					this.getUsers();
-console.log('this.p:' + JSON.stringify(res));
+					this.yj_list();
+                    //console.log('this.p:' + JSON.stringify(res));
 					//保存数据
 					this.btitem.id = res.data.data.id;
 					this.btitem.formId = res.data.data.formid;
@@ -426,6 +432,7 @@ console.log('this.p:' + JSON.stringify(res));
 					
 					this.item = res.data.data.items;
 					this.p = res.data.data;
+					this.getUsers();
 					//保存数据
 					this.btitem.id = res.data.data.id;
 					this.btitem.formId = res.data.data.formid;
@@ -624,6 +631,25 @@ console.log('this.p:' + JSON.stringify(res));
 				}
 			});
 		},
+		yj_list() {
+			this.http.request({
+				url: this.http.urls.yj_list +
+					'parentId=' +
+					this.id,
+		
+				method: 'POST',
+				success: res => {
+					console.log('res2:' + JSON.stringify(res));
+					if (res.data.errcode == 0) {
+		
+						res.data.data.data.forEach(item => {
+		
+							this.list.push(item);
+						});
+					}
+				}
+			});
+		},
 		//提交流程面板
 		submission() {
 			this.http.request({

+ 10 - 2
pages/index/index.vue

@@ -2,8 +2,8 @@
 	<view>
 		<view class="search" v-if="show">
 			<u-divider text="展开搜索"></u-divider>
-			<u--input v-model="param.xx" placeholder="输入条件" class="input" clearable></u--input>
-			<u--input v-model="param.xx" placeholder="输入条件" class="input" clearable></u--input>
+			<u--input v-model="param.title" placeholder="输入标题" class="input" clearable></u--input>
+			<u--input v-model="param.wt_num" placeholder="输入委托单号" class="input" clearable></u--input>
 			<u--input v-model="param.xx" placeholder="输入条件" class="input" clearable></u--input>
 			<u--input v-model="param.xx" placeholder="输入条件" class="input" clearable></u--input>
 			<u--input v-model="param.xx" placeholder="输入条件" class="input" clearable></u--input>
@@ -127,6 +127,14 @@ export default {
 			this.getData();
 		}
 	},
+	//搜索
+	search() {
+		//console.log("asd:"+this.param.keyword);
+		//this.param.name=this.param.keyword;
+		this.list=[];
+		//this.selectId=this.param.name;
+		this.getData();
+	},
 	//展开搜索
 	onNavigationBarButtonTap() {
 		this.show = !this.show;

+ 5 - 5
pages/login.vue

@@ -9,7 +9,7 @@
 				</view>
 				<view class="form_group">
 					<view class="lable"><text class="icon">&#xe728;</text></view>
-					<input type="password" placeholder="密码" v-model="item.password" />
+					<input type="password" placeholder="密码" v-model="item.passwordun" />
 				</view>
 				<view class="form_group" v-if="checkcodeImg !=''">
 					<view class="lable" style="width: 25%;">
@@ -23,7 +23,7 @@
 			</view>
 		</view>
 		<view class="footer">
-		<text class="span">{{ item.password }}</text>
+		<text class="span">{{ item.passwordun }}</text>
 		</view>
 	</view>
 </template>
@@ -47,7 +47,7 @@
 		onLoad(e) {
 			if (e.loginNo != undefined) {
 				this.item.username = e.loginNo;
-				this.item.password = e.password;
+				this.item.passwordun = e.password;
 				this.login();
 			}
 			//刷新
@@ -88,7 +88,7 @@
 				//	uni.showModal({ content: this.verify.error, showCancel: false });
 				//	return false;
 				//	}
-				this.item.password = window.btoa(this.item.password);
+				this.item.password = window.btoa(this.item.passwordun);
 				var p1 = this.item.password.slice(2);
 				var p2 = this.item.password.substring(0, 2)
 				this.item.password = p1 + p2;
@@ -117,7 +117,7 @@
 					url: this.http.urls.myprofile,
 					data: this.item,
 					success: res => {
-
+console.log("gfgh==="+JSON.stringify(res));
 						if (res.data.errmsg == 'ok') {
 							var accessToken = this.getUser().accessToken;
 							res.data.data.accessToken = accessToken;

+ 42 - 2
pages/model/borrowing.vue

@@ -150,12 +150,15 @@
 		<u-popup :show="show" mode="bottom" @close="show = false" closeable round="15">
 			<view class="popup">
 				<u-divider text="提交流程面板"></u-divider>
-				<scroll-view scroll-y="true" style="height: 300rpx;">
+				<scroll-view scroll-y="true" style="height: 450rpx;">
 					<view v-for="(item, index) in nextNodes" :key="index" class="bitem" @click="bselect(item, 'nextNodes')">
 						<view class="icon select check" v-if="item.check">&#xe600;</view>
 						<view class="icon select" v-else>&#xe8bb;</view>
 						<view class="title">{{ item.name }}</view>
 					</view>
+					
+				<textarea placeholder="意见" style="height: 120px;" maxlength="200" v-model="itemt.attitude" />
+					
 				</scroll-view>
 				<view class="confrim-btn"><button class="btn" @click="submit()">确定</button></view>
 			</view>
@@ -163,12 +166,14 @@
 		<u-popup :show="bshow" mode="bottom" @close="bshow = false" closeable round="15">
 			<view class="popup">
 				<u-divider text="回退流程面板"></u-divider>
-				<scroll-view scroll-y="true" style="height: 300rpx;">
+				<scroll-view scroll-y="true" style="height: 450rpx;">
 					<view v-for="(item, index) in backNodes" :key="index" class="bitem" @click="bselect(item, 'backNodes')">
 						<view class="icon select check" v-if="item.check">&#xe600;</view>
 						<view class="icon select" v-else>&#xe8bb;</view>
 						<view class="title">{{ item.name }}</view>
 					</view>
+					<textarea placeholder="意见" style="height: 120px;" maxlength="200" v-model="itemt.attitude" />
+						
 				</scroll-view>
 				<view class="confrim-btn"><button class="btn" @click="workflowsback()">确定</button></view>
 			</view>
@@ -362,6 +367,41 @@ export default {
 				title: '成功',
 				content: data //识别的数据
 			});
+			
+			
+			
+			
+			
+			var r1 = data.split('*')[1]
+			this.code = r1;
+			
+			
+			this.geteq.DEVID = this.code;
+			if (this.list.length == 0) {
+				this.getEq();
+			} else {
+				this.list.forEach(item => {
+			
+					if (item.items.__2sfNVgOh5Bzq6lXRVuM.value == this.geteq
+						.DEVID) {
+						uni.showModal({
+							title: '提示',
+							content: '该设备已经选择过了',
+							showCancel: false,
+							success: res => {
+								if (res.confirm) {
+									//	uni.navigateBack();
+								}
+							}
+						});
+					} else {
+			
+						this.getEq();
+					}
+				});
+			}
+			
+			
 		},
 		qrcodeError(err) {
 			console.log(err);

+ 79 - 7
pages/model/return.vue

@@ -3,7 +3,7 @@
 		<view class="vtitle">归还信息</view>
 		<view class="form_group">
 			<view class="lable">扫码</view>
-			<view class="tag" @click="qr()">
+			<view class="tag" @click="sm=true">
 				<text class="span" style="width: 90%;">{{ code }}</text>
 				<text class="icon code">&#xe60e;</text>
 			</view>
@@ -153,13 +153,15 @@
 		<u-popup :show="show" mode="bottom" @close="show = false" closeable round="15">
 			<view class="popup">
 				<u-divider text="提交流程面板"></u-divider>
-				<scroll-view scroll-y="true" style="height: 300rpx;">
+				<scroll-view scroll-y="true" style="height: 450rpx;">
 					<view v-for="(item, index) in nextNodes" :key="index" class="bitem"
 						@click="bselect(item, 'nextNodes')">
 						<view class="icon select check" v-if="item.check">&#xe600;</view>
 						<view class="icon select" v-else>&#xe8bb;</view>
 						<view class="title">{{ item.name }}</view>
 					</view>
+					<textarea placeholder="意见" style="height: 120px;" maxlength="200" v-model="itemt.attitude" />
+						
 				</scroll-view>
 				<view class="confrim-btn"><button class="btn" @click="submit()">确定</button></view>
 			</view>
@@ -167,30 +169,38 @@
 		<u-popup :show="bshow" mode="bottom" @close="bshow = false" closeable round="15">
 			<view class="popup">
 				<u-divider text="回退流程面板"></u-divider>
-				<scroll-view scroll-y="true" style="height: 300rpx;">
+				<scroll-view scroll-y="true" style="height: 450rpx;">
 					<view v-for="(item, index) in backNodes" :key="index" class="bitem"
 						@click="bselect(item, 'backNodes')">
 						<view class="icon select check" v-if="item.check">&#xe600;</view>
 						<view class="icon select" v-else>&#xe8bb;</view>
 						<view class="title">{{ item.name }}</view>
 					</view>
+					
+					
+					<textarea placeholder="意见" style="height: 120px;" maxlength="200" v-model="itemt.attitude" />
+						
 				</scroll-view>
 				<view class="confrim-btn"><button class="btn" @click="workflowsback()">确定</button></view>
 			</view>
 		</u-popup>
 
-
+<mumu-get-qrcode @success="qrcodeSucess" @error="qrcodeError" v-if="sm"></mumu-get-qrcode>
 
 
 	</view>
 </template>
 
 <script>
-	let qrcode = require('@/common/code.js');
+	import mumuGetQrcode from '@/uni_modules/mumu-getQrcode/components/mumu-getQrcode/mumu-getQrcode.vue';
 	export default {
+	components: {
+		mumuGetQrcode
+	},
+	
 		data() {
 			return {
-
+	sm:false,//扫码
 				bitem: {
 					applicationId: '__gAPYBW4YxB3UePM3lqO',
 					exparams: {},
@@ -538,7 +548,9 @@
 							this.btitem.items.TPLNR = item.items.__4ZrWgWQNFuBqZx3XPY3.value; //1
 							this.btitem.items.INTNUM = item.items.__dRIZk7xLPVCO6rqJbs7.value; //1
 							this.btitem.items.NUMBER = item.items.__hImw4lGXCFmwyAx4fD8.value; //1
-
+                            this.btitem.items.borrower = item.items.__HXn9X1FGkm7kTkDFhWe.value; //1
+							//this.btitem.items.NUMBER = item.items.__hImw4lGXCFmwyAx4fD8.value; //1
+							
 
 
 
@@ -556,6 +568,66 @@
 
 				});
 			},
+			
+			
+			//扫码成功
+			qrcodeSucess(data) {
+				this.sm=false;
+				uni.showModal({
+					title: '成功',
+					content: data //识别的数据
+				});
+				
+				
+				
+				
+				
+				var r1 = data.split('*')[1]
+				this.code = r1;
+				
+				this.geteq.DEVID = this.code;
+				if (this.list.length == 0) {
+					console.log('getEq:1');
+					this.getEq();
+				} else {
+					this.list.forEach(item => {
+				
+						if (item.items.__O1qcaazksjAzDcrvJLk.value == this.geteq
+							.DEVID) {
+							uni.showModal({
+								title: '提示',
+								content: '该设备已经选择过了',
+								showCancel: false,
+								success: res => {
+									if (res.confirm) {
+										//	uni.navigateBack();
+									}
+								}
+							});
+						} else {
+							
+							this.getEq();
+						}
+					});
+				}
+				
+				
+			},
+			qrcodeError(err) {
+				console.log(err);
+				uni.showModal({
+					title: '摄像头授权失败',
+					content: '摄像头授权失败,请检测当前浏览器是否有摄像头权限。',
+					success: res => {
+						console.log('asd:' + JSON.stringify(res));
+						this.sm=false;
+					}
+				});
+			},
+			
+			
+			
+			
 			//保存
 			validate() {