15807800591 2 years ago
parent
commit
a3f62cd4b7
5 changed files with 157 additions and 145 deletions
  1. 5 4
      common/http.js
  2. 15 12
      pages/index/detail.vue
  3. 5 2
      pages/index/select.vue
  4. 4 1
      pages/model/borrowing.vue
  5. 128 126
      pages/model/return.vue

+ 5 - 4
common/http.js

@@ -1,8 +1,8 @@
-const ip = 'http://192.168.0.251/obpm';
+//const ip = 'http://192.168.0.251/obpm';
 //const ip = 'http://106.55.241.82:8888/obpm';
-//const ip = 'https://tdm.liugong.com/obpm';
+const ip = 'https://tdm.liugong.com/obpm';
 //const ip2 = 'https://tdm.liugong.com';
-const ip2 = 'http://192.168.0.251';
+const ip2 = 'http://192.168.0.251/liug';
 
 /**
  * 全部接口
@@ -13,10 +13,11 @@ const urls = {
 	home: ip + '/app/home/index', //首页数据
 
 	login: ip + '/runtime/login/loginWithCiphertext2', //用户登陆
+	//login:  'http://192.168.0.251/signon/runtime/login/checkin', //用户登陆
 	myprofile: ip + '/runtime/users/myprofile', //用户登陆
 	upload: ip + '/runtime/upload?applicationId=__gAPYBW4YxB3UePM3lqO&allowedTypes=00', //文件上传
 	user_list: ip2 + '/app/getUser', //获取全部联系人
-
+    update_parent: ip2 + '/app?', //获取全部联系人
 	myPending: ip + '/runtime/widget/myPending?pageNo=1&linesPerPage=5&workflowOrder=true',
 	navspendings: ip + '/runtime/flowcenters/navs/pendings?',
 	flowcenters_pendings: ip + '/runtime/__gAPYBW4YxB3UePM3lqO/flowcenters/pendings?status=all&isMyWorkFlow=false',

+ 15 - 12
pages/index/detail.vue

@@ -33,7 +33,7 @@
 		<view class="form_group">
 			<view class="lable">申请人</view>
 			<view class="tag">
-				<input v-model="item.applicant" placeholder="输入申请人" />
+				<input v-model="item.applicant_name" placeholder="输入申请人" />
 				<text class="icon more">&#xe631;</text>
 			</view>
 		</view>
@@ -62,11 +62,11 @@
 			<view class="lable">试验类型</view>
 			<view class="tag">
 				<view class="span">
-					<picker @change="bindChange($event, 'experiment_type')" :range="array2">
-						<view class="picks">{{ item.experiment_type ? item.experiment_type : '选择2' }}</view>
+					<picker @change="bindChange($event, 'experiment_type')" :range="array1">
+						<view class="picks">{{ item.experiment_type ? item.experiment_type : '选择试验类型' }}</view>
 					</picker>
-					<picker @change="bindChange($event, 'product')" :range="array1">
-						<view class="picks">{{ item.product ? item.product : '选择1' }}</view>
+					<picker @change="bindChange($event, 'product')" :range="array2">
+						<view class="picks">{{ item.product ? item.product : '选择产品线' }}</view>
 					</picker>
 				</view>
 				<text class="icon more">&#xe631;</text>
@@ -247,8 +247,8 @@ export default {
 				}
 			},
 			users: [],
-			array1: ['类型1', '类型2', '类型3', '类型4'], //实验类型1
-			array2: ['类型2', '类型12', '类型13', '类型14'], //实验类型2
+			array1: ['整机性能', '系统性能', '台架', '可靠性','部件'], //实验类型1
+			array2: ['装载机', '平地机', '叉车', '推土机','小型机','挖掘机','压缩机','起重机','压路机','农机','高空作业平台','其他'], //实验类型2
 			show: false,
 			bshow: false,
 			dshow: false,
@@ -297,15 +297,15 @@ export default {
 		uni.$on('select', res => {
 			console.log('asd2:' + JSON.stringify(res));
 			if (res.ste == 1) {
-				this.item.WTXQSH = res.items.__L5a8n9ZH5gJC0CL1s6X.value;
+				this.item.WTXQSH = res.items.__psLiBtymgDqatneDeJM.value;
 			} else if (res.ste == 2) {
-				this.item.WTSYSH = res.items.__0ils0bIBD7Vf90TjVb3.value;
+				this.item.WTSYSH = res.items.__d9UDIcG9cd9TPsauffQ.value;
 			} else if (res.ste == 3) {
-				this.item.WTXQPZ = res.items.__uiMgMPHg9jmqTXzwdzl.value;
+				this.item.WTXQPZ = res.items.__EaOA4o6je5WFAGSDelj.value;
 			} else if (res.ste == 4) {
-				this.item.WTSYPZ = res.items.__WSh3KXD8wfeyU3FbipN.value;
+				this.item.WTSYPZ = res.items.__cDWoqYpeJkPwLjignVY.value;
 			} else if (res.ste == 5) {
-				this.item.WTRWFP = res.items.__IzBqxyYJhOYJntHpmEv.value;
+				this.item.WTRWFP = res.items.__vhLhnW6B7JBtaxiXkQ3.value;
 			}
 			this.convert();
 		});
@@ -465,6 +465,9 @@ export default {
 				if (this.item.WTRWFP == item.ID) {
 					this.item.WTRWFP_NAME = item.NAME;
 				}
+				if (this.item.applicant == item.ID) {
+					this.item.applicant_name = item.NAME;
+				}
 			});
 			this.$forceUpdate();
 		},

+ 5 - 2
pages/index/select.vue

@@ -1,6 +1,6 @@
 <template>
 	<view class="list">
-		<view class="search"><u-search placeholder="输入姓名按回车搜索" :animation="true" v-model="param.keyword" @search="search()"></u-search></view>
+		<view class="search"><u-search placeholder="输入姓名按回车搜索" :animation="true" v-model="param.name" @search="search()"></u-search></view>
 		<view class="item" v-for="(item, index) in list" :key="index" @click="select(item)">
 			<view class="icon select check" v-if="item.check">&#xe600;</view>
 			<view class="icon select" v-else>&#xe8bb;</view>
@@ -78,7 +78,10 @@ export default {
 		},
 		//搜索
 		search() {
-			console.log("asd:"+this.param.keyword);
+			//console.log("asd:"+this.param.keyword);
+			//this.param.name=this.param.keyword;
+			this.list=[];
+			this.getData();
 		},
 		//选择
 		select(item) {

+ 4 - 1
pages/model/borrowing.vue

@@ -321,6 +321,9 @@
 						qrcode.callback = r => {
 							var r1 = r.split('*')[1]
 							this.code = r1;
+							if(!this.code){
+								return;
+							}
 							this.geteq.DEVID = this.code;
 							if (this.list.length == 0) {
 								this.getEq();
@@ -561,7 +564,7 @@
 
 
 				this.http.request({
-					url: this.http.urls.ip2 + '/liug/app?parent=' + parent + '&id=' + id +
+					url: this.http.urls.update_parent + 'parent=' + parent + '&id=' + id +
 						'&table=tlk_tool_borrowing',
 
 					method: 'POST',

+ 128 - 126
pages/model/return.vue

@@ -36,110 +36,110 @@
 			</view>
 		</view>
 		<view class="vtitle">归还设备信息</view>
-		
-		<view  v-if="id">
-		<view v-for="(item, index) in list" :key="index" class="item">
-			
-			<view class="form_group">
-				<view class="lable">序号</view>
-				<view class="tag">
-					<text class="span">{{ index + 1 }}</text>
+
+		<view v-if="id">
+			<view v-for="(item, index) in list" :key="index" class="item">
+
+				<view class="form_group">
+					<view class="lable">序号</view>
+					<view class="tag">
+						<text class="span">{{ index + 1 }}</text>
+					</view>
 				</view>
-			</view>
-			<view class="form_group">
-				<view class="lable">计量编号</view>
-				<view class="tag">
-					<text class="span">{{ item.items.__1JzPv6GIMZUCGKYm2gx.value }}</text>
+				<view class="form_group">
+					<view class="lable">计量编号</view>
+					<view class="tag">
+						<text class="span">{{ item.items.__1JzPv6GIMZUCGKYm2gx.value }}</text>
+					</view>
 				</view>
-			</view>
-			<view class="form_group">
-				<view class="lable">设备名称</view>
-				<view class="tag">
-					<text class="span">{{ item.items.__ngDKJEL3uIYQyjjFJMh.value }}</text>
+				<view class="form_group">
+					<view class="lable">设备名称</view>
+					<view class="tag">
+						<text class="span">{{ item.items.__ngDKJEL3uIYQyjjFJMh.value }}</text>
+					</view>
 				</view>
-			</view>
-			<view class="form_group">
-				<view class="lable">型号规格</view>
-				<view class="tag">
-					<text class="span">{{ item.items.__apS4rWwLmvscx5ZUkLQ.value }}</text>
+				<view class="form_group">
+					<view class="lable">型号规格</view>
+					<view class="tag">
+						<text class="span">{{ item.items.__apS4rWwLmvscx5ZUkLQ.value }}</text>
+					</view>
 				</view>
-			</view>
-			<view class="form_group">
-				<view class="lable">测量范围</view>
-				<view class="tag">
-					<text class="span">{{ item.items.__DjZGdE1GZEj1OUWhWuK.value }}</text>
+				<view class="form_group">
+					<view class="lable">测量范围</view>
+					<view class="tag">
+						<text class="span">{{ item.items.__DjZGdE1GZEj1OUWhWuK.value }}</text>
+					</view>
 				</view>
-			</view>
-			<view class="form_group">
-				<view class="lable">制造商</view>
-				<view class="tag">
-					<text class="span">{{ item.items.__1yBwYFItXGQo6CoGTZs.value }}</text>
+				<view class="form_group">
+					<view class="lable">制造商</view>
+					<view class="tag">
+						<text class="span">{{ item.items.__1yBwYFItXGQo6CoGTZs.value }}</text>
+					</view>
 				</view>
-			</view>
-			<view class="form_group">
-				<view class="lable">内部编号</view>
-				<view class="tag">
-					<text class="span">{{ item.items.__JjSPjH2TqMtxQjHcTY9.value }}</text>
+				<view class="form_group">
+					<view class="lable">内部编号</view>
+					<view class="tag">
+						<text class="span">{{ item.items.__JjSPjH2TqMtxQjHcTY9.value }}</text>
+					</view>
 				</view>
+				<view class="form_group">
+					<!--<button class="btn del" @click="del(item)">移除</button>-->
+				</view>
+
+
 			</view>
-			<view class="form_group">
-				<!--<button class="btn del" @click="del(item)">移除</button>-->
-			</view>
-			
-			
 		</view>
-		</view>
-		
-		
+
+
 		<view v-else>
-		<view v-for="(item, index) in list" :key="index" class="item" >
-			<view class="form_group">
-				<view class="lable">序号</view>
-				<view class="tag">
-					<text class="span">{{ index + 1 }}</text>
+			<view v-for="(item, index) in list" :key="index" class="item">
+				<view class="form_group">
+					<view class="lable">序号</view>
+					<view class="tag">
+						<text class="span">{{ index + 1 }}</text>
+					</view>
 				</view>
-			</view>
-			<view class="form_group">
-				<view class="lable">计量编号</view>
-				<view class="tag">
-					<text class="span">{{ item.items.__Q0YnOcfMqiTpVsTiDEh.value }}</text>
+				<view class="form_group">
+					<view class="lable">计量编号</view>
+					<view class="tag">
+						<text class="span">{{ item.items.__Q0YnOcfMqiTpVsTiDEh.value }}</text>
+					</view>
 				</view>
-			</view>
-			<view class="form_group">
-				<view class="lable">设备名称</view>
-				<view class="tag">
-					<text class="span">{{ item.items.__khn9SQnzgWNPt0aHldp.value }}</text>
+				<view class="form_group">
+					<view class="lable">设备名称</view>
+					<view class="tag">
+						<text class="span">{{ item.items.__khn9SQnzgWNPt0aHldp.value }}</text>
+					</view>
 				</view>
-			</view>
-			<view class="form_group">
-				<view class="lable">型号规格</view>
-				<view class="tag">
-					<text class="span">{{ item.items.__fpUc5yOsHgSHeHPFHim.value }}</text>
+				<view class="form_group">
+					<view class="lable">型号规格</view>
+					<view class="tag">
+						<text class="span">{{ item.items.__fpUc5yOsHgSHeHPFHim.value }}</text>
+					</view>
 				</view>
-			</view>
-			<view class="form_group">
-				<view class="lable">测量范围</view>
-				<view class="tag">
-					<text class="span">{{ item.items.__soGLIaAxvM0O0NTVt1c.value }}</text>
+				<view class="form_group">
+					<view class="lable">测量范围</view>
+					<view class="tag">
+						<text class="span">{{ item.items.__soGLIaAxvM0O0NTVt1c.value }}</text>
+					</view>
 				</view>
-			</view>
-			<view class="form_group">
-				<view class="lable">制造商</view>
-				<view class="tag">
-					<text class="span">{{ item.items.__aPTYvYeakxz299A7Thk.value }}</text>
+				<view class="form_group">
+					<view class="lable">制造商</view>
+					<view class="tag">
+						<text class="span">{{ item.items.__aPTYvYeakxz299A7Thk.value }}</text>
+					</view>
 				</view>
-			</view>
-			<view class="form_group">
-				<view class="lable">内部编号</view>
-				<view class="tag">
-					<text class="span">{{ item.items.__dRIZk7xLPVCO6rqJbs7.value }}</text>
+				<view class="form_group">
+					<view class="lable">内部编号</view>
+					<view class="tag">
+						<text class="span">{{ item.items.__dRIZk7xLPVCO6rqJbs7.value }}</text>
+					</view>
 				</view>
+				<view class="form_group">
+					<button class="btn del" @click="del(item)">移除</button>
+				</view>
+
 			</view>
-			<view class="form_group">
-				<button class="btn del" @click="del(item)">移除</button>
-			</view>
-			
-		</view>
 		</view>
 		<u-empty v-if="list.length == 0"></u-empty>
 		<view class="footer">
@@ -279,7 +279,7 @@
 						}
 					}); */
 				this.getDocuments();
-			} else{
+			} else {
 				this.empty();
 			}
 			//选中审批人员监听函数,其它类型的参考这个
@@ -313,9 +313,11 @@
 						const tempFilePaths = res.tempFilePaths[0]; // 获取到二维码图片的链接
 						qrcode.decode(tempFilePaths); // 解析二维码图片
 						qrcode.callback = r => {
-						var r1=r.split('*')[1]
-						this.code = r1;
-
+							var r1 = r.split('*')[1]
+							this.code = r1;
+							if (!this.code) {
+								return;
+							}
 							this.geteq.DEVID = this.code;
 							if (this.list.length == 0) {
 								console.log('getEq:1');
@@ -429,38 +431,38 @@
 				this.list.splice(this.list.indexOf(item), 1);
 			},
 			//详情
-		getDocuments() {
-			this.http.request({
-				url: this.http.urls.documents + this.id,
-				data: this.item,
-				success: res => {
-					this.item = res.data.data.items;
-					//this.p = res.data.data;
-	this.ghlis_list();
-					this.iteml = res.data.data;
-
-					this.items.applicationId = '__gAPYBW4YxB3UePM3lqO';
-					this.items.docId = this.iteml.id;
-					this.items.id = this.iteml.id;
-					this.items.formId = this.iteml.formid;
-					this.items.parentId = '';
-					this.items.subSelects = [];
-					this.items.templateForm = '';
-					this.items.viewId = '';
-					this.items.document.items = this.item;
-					this.items.document.applicationId = '__gAPYBW4YxB3UePM3lqO';
-					this.items.document.exparams = {};
-					this.items.document.formId = this.iteml.formid;
-					this.items.document.id = this.iteml.id;
-					this.items.document.parentId = '';
-					this.items.document.sign = '';
-					this.items.document.stateId = this.iteml.stateid;
-					this.items.document.subDocuments = [];
-					this.items.document.templateForm = '';
-					this.items.document.versions = '0';
-				}
-			});
-		},
+			getDocuments() {
+				this.http.request({
+					url: this.http.urls.documents + this.id,
+					data: this.item,
+					success: res => {
+						this.item = res.data.data.items;
+						//this.p = res.data.data;
+						this.ghlis_list();
+						this.iteml = res.data.data;
+
+						this.items.applicationId = '__gAPYBW4YxB3UePM3lqO';
+						this.items.docId = this.iteml.id;
+						this.items.id = this.iteml.id;
+						this.items.formId = this.iteml.formid;
+						this.items.parentId = '';
+						this.items.subSelects = [];
+						this.items.templateForm = '';
+						this.items.viewId = '';
+						this.items.document.items = this.item;
+						this.items.document.applicationId = '__gAPYBW4YxB3UePM3lqO';
+						this.items.document.exparams = {};
+						this.items.document.formId = this.iteml.formid;
+						this.items.document.id = this.iteml.id;
+						this.items.document.parentId = '';
+						this.items.document.sign = '';
+						this.items.document.stateId = this.iteml.stateid;
+						this.items.document.subDocuments = [];
+						this.items.document.templateForm = '';
+						this.items.document.versions = '0';
+					}
+				});
+			},
 
 
 			ghlis_list() {
@@ -490,7 +492,7 @@
 						data: this.item,
 
 						success: res => {
-							
+
 							//this.item = res.data.data.items;
 							console.log('this.bitem:' + JSON.stringify(this.bitem));
 							this.btitem.id = res.data.data.id;
@@ -499,7 +501,7 @@
 							this.btitem.parentId = this.bitem.id;
 							//this.btitem.parent=this.bitem.id;
 							this.btitem.items = res.data.data.items;
-							this.btitem.items.DEVID = item.items.__O1qcaazksjAzDcrvJLk.value;//1
+							this.btitem.items.DEVID = item.items.__O1qcaazksjAzDcrvJLk.value; //1
 							this.btitem.items.EQUNR = item.items.__Q0YnOcfMqiTpVsTiDEh.value; //1
 							this.btitem.items.EQKTX = item.items.__khn9SQnzgWNPt0aHldp.value; //1
 							this.btitem.items.TYPBZ = item.items.__fpUc5yOsHgSHeHPFHim.value; //1
@@ -511,7 +513,7 @@
 							this.btitem.items.returning_state = ""; //归还状态
 							this.btitem.items.TPLNR = item.items.__8BoEUIvmeOIjLiAwO9R.value; //1
 							this.btitem.items.INTNUM = item.items.__dRIZk7xLPVCO6rqJbs7.value; //1
-							this.btitem.items.NUMBER = item.items.__hImw4lGXCFmwyAx4fD8.value;//1
+							this.btitem.items.NUMBER = item.items.__hImw4lGXCFmwyAx4fD8.value; //1
 
 
 
@@ -550,7 +552,7 @@
 
 
 				this.http.request({
-					url: this.http.urls.ip2 + '/liug/app?parent=' + parent + '&id=' + id + '&table=tlk_ghlsb',
+					url: this.http.urls.update_parent + 'parent=' + parent + '&id=' + id + '&table=tlk_ghlsb',
 
 					method: 'POST',
 					success: res => {