15807800591 2 éve
szülő
commit
aece13814d
6 módosított fájl, 332 hozzáadás és 63 törlés
  1. 8 2
      common/http.js
  2. 7 0
      pages.json
  3. 1 0
      pages/index/index.vue
  4. 262 0
      pages/model/detail.vue
  5. 30 15
      pages/model/index.vue
  6. 24 46
      pages/model/return.vue

+ 8 - 2
common/http.js

@@ -1,5 +1,5 @@
-const ip = 'http://192.168.0.251/obpm';
-//const ip = 'https://tdmtest.liugong.com/obpm';
+//const ip = 'http://192.168.0.251/obpm';
+const ip = 'https://tdmtest.liugong.com/obpm';
 const ip2 = 'http://192.168.0.251/';
 
 /**
@@ -42,6 +42,11 @@ const urls = {
 
 	tool_borrowing_empty: ip +
 		'/runtime/__gAPYBW4YxB3UePM3lqO/forms/__9lR0Vy6jiAmTJTWiM8t/empty?formId=__9lR0Vy6jiAmTJTWiM8t&appId=__gAPYBW4YxB3UePM3lqO', //创建设备借用台账
+return_ghls_empty: ip +
+		'/runtime/__gAPYBW4YxB3UePM3lqO/forms/__9lR0Vy6jiAmTJTWiM8t/empty?formId=__9lR0Vy6jiAmTJTWiM8t&appId=__gAPYBW4YxB3UePM3lqO', //创建设备借用台账
+
+borrowing_list: ip +
+		'/runtime/__gAPYBW4YxB3UePM3lqO/views/__NOtUm3wgeNBBmv8mhK3/documents?lines=10&isQueryButton=false', //获取列表数据、更换viewID
 
    myPending: ip +'/runtime/widget/myPending?pageNo=1&linesPerPage=5&workflowOrder=true',
 
@@ -49,6 +54,7 @@ runViewDialogConfirmScript: ip + '/runtime/views/selectbox/runViewDialogConfirmS
 
 
 	eq_list: ip + '/runtime/__gAPYBW4YxB3UePM3lqO/views/__WLVxKX6e0Pq0cTwdNUQ/documents?',
+	re_list: ip + '/runtime/__gAPYBW4YxB3UePM3lqO/views/__ajlFXbohdIXtn7ErzZq/documents?',
 }
 /**
  * 封装的http请求wt_

+ 7 - 0
pages.json

@@ -47,6 +47,13 @@
 				"enablePullDownRefresh": false
 			}
 		
+		},{
+			"path": "pages/model/detail",
+			"style": {
+				"navigationBarTitleText": "借用台账详情",
+				"enablePullDownRefresh": false
+			}
+		
 		},
 		{
 			"path": "pages/index/index",

+ 1 - 0
pages/index/index.vue

@@ -36,6 +36,7 @@
 						<view class="label">当前审批人:</view>
 						<view class="name">{{ item.items.__hInQ1R0YkMQNrgTq3q0.value }}</view>
 					</view>
+					
 					<view class="tag" v-if="item.items.__oUywWKvn4BhpnBmxqYT.value != ''">{{ item.items.__oUywWKvn4BhpnBmxqYT.value }}</view>
 				</view>
 			</view>

+ 262 - 0
pages/model/detail.vue

@@ -0,0 +1,262 @@
+<template>
+	<view class="pages">
+		<view class="vtitle">设备借用信息</view>
+		<view class="form_group">
+			<view class="lable">内部编号</view>
+			<view class="tag">
+				<text class="span">{{ item.INTNUM }}</text>
+				<text class="icon more">&#xe631;</text>
+			</view>
+		</view>
+		<view class="form_group">
+			<view class="lable">设备ID</view>
+			<view class="tag">
+				<input v-model="item.DEVID" placeholder="设备ID" />
+				<text class="icon more">&#xe631;</text>
+			</view>
+		</view>
+		<view class="form_group">
+			<view class="lable">计量编号</view>
+			<view class="tag">
+				<input v-model="item.EQUNR" placeholder="计量编号" />
+				<text class="icon more">&#xe631;</text>
+			</view>
+		</view>
+		<view class="form_group">
+			<view class="lable">设备名称</view>
+			<view class="tag">
+				<input v-model="item.EQKTX" placeholder="设备名称" />
+				<text class="icon more">&#xe631;</text>
+			</view>
+		</view>
+
+		<view class="form_group">
+			<view class="lable">设备型号</view>
+			<view class="tag">
+				<input v-model="item.TYPBZ" placeholder="设备型号" />
+				<text class="icon more">&#xe631;</text>
+			</view>
+		</view>
+		<view class="form_group">
+			<view class="lable">测量范围</view>
+			<view class="tag">
+				<input v-model="item.CLFW" placeholder="测量范围" />
+				<text class="icon more">&#xe631;</text>
+			</view>
+		</view>
+		<view class="form_group">
+			<view class="lable">准确度等级</view>
+			<view class="tag">
+				<input v-model="item.ZQDDJ" placeholder="准确度等级" />
+				<text class="icon more">&#xe631;</text>
+			</view>
+		</view>
+		<view class="form_group">
+			<view class="lable">分辨力</view>
+			<view class="tag">
+				<input v-model="item.FBL" placeholder="分辨力" />
+				<text class="icon more">&#xe631;</text>
+			</view>
+		</view>
+
+		<view class="form_group">
+			<view class="lable">最大允许误差</view>
+			<view class="tag">
+				<input v-model="item.ZDYXWC" placeholder="最大允许误差" />
+				<text class="icon more">&#xe631;</text>
+			</view>
+		</view>
+<view class="form_group">
+			<view class="lable">计划日期	</view>
+			<view class="tag">
+				<input v-model="item.NPLDA" placeholder="计划日期	" />
+				<text class="icon more">&#xe631;</text>
+			</view>
+		</view>
+		<view class="form_group">
+			<view class="lable">数量</view>
+			<view class="tag">
+				<input v-model="item.NUMBER" placeholder="数量" />
+				<text class="icon more">&#xe631;</text>
+			</view>
+		</view>
+		<view class="form_group">
+			<view class="lable">所在单位	</view>
+			<view class="tag">
+				<input v-model="item.UNIT" placeholder="所在单位	" />
+				<text class="icon more">&#xe631;</text>
+			</view>
+		</view>
+		<view class="form_group">
+			<view class="lable">用户状态	</view>
+			<view class="tag">
+				<input v-model="item.STTXU" placeholder="用户状态	" />
+				<text class="icon more">&#xe631;</text>
+			</view>
+		</view>
+		<view class="form_group">
+			<view class="lable">借用日期	</view>
+			<view class="tag">
+				<input v-model="item.borrowing_date" placeholder="借用日期	" />
+				<text class="icon more">&#xe631;</text>
+			</view>
+		</view>
+		<view class="form_group">
+			<view class="lable">借用者</view>
+			<view class="tag">
+				<input v-model="item.borrower" placeholder="借用者" />
+				<text class="icon more">&#xe631;</text>
+			</view>
+		</view>
+		<view class="form_group">
+			<view class="lable">归还日期	</view>
+			<view class="tag">
+				<input v-model="item.returning_date" placeholder="归还日期	" />
+				<text class="icon more">&#xe631;</text>
+			</view>
+		</view>
+		<view class="form_group">
+			<view class="lable">归还者</view>
+			<view class="tag">
+				<input v-model="item.returninger" placeholder="归还者" />
+				<text class="icon more">&#xe631;</text>
+			</view>
+		</view>
+		<view class="form_group">
+			<view class="lable">归还状态	</view>
+			<view class="tag">
+				<input v-model="item.returning_state" placeholder="归还状态	" />
+				<text class="icon more">&#xe631;</text>
+			</view>
+		</view>
+		<view class="form_group">
+			<view class="lable">制造商系列号	</view>
+			<view class="tag">
+				<input v-model="item.SERGE" placeholder="制造商系列号	" />
+				<text class="icon more">&#xe631;</text>
+			</view>
+		</view>
+		<view class="form_group">
+			<view class="lable">制造商</view>
+			<view class="tag">
+				<input v-model="item.HERST" placeholder="制造商" />
+				<text class="icon more">&#xe631;</text>
+			</view>
+		</view>
+		<view class="form_group">
+			<view class="lable">备注</view>
+			<view class="tag">
+				<input v-model="item.remarks" placeholder="备注" />
+				<text class="icon more">&#xe631;</text>
+			</view>
+		</view>
+		<view class="form_group">
+			<view class="lable">手机号</view>
+			<view class="tag">
+				<input v-model="item.tel" placeholder="手机号" />
+				<text class="icon more">&#xe631;</text>
+			</view>
+		</view>
+		<view class="form_group">
+			<view class="lable">使用单价	</view>
+			<view class="tag">
+				<input v-model="item.Price" placeholder="使用单价	" />
+				<text class="icon more">&#xe631;</text>
+			</view>
+		</view>
+		<view class="form_group">
+			<view class="lable">功能位置	</view>
+			<view class="tag">
+				<input v-model="item.TPLNR" placeholder="功能位置	" />
+				<text class="icon more">&#xe631;</text>
+			</view>
+		</view>
+		<view class="form_group">
+			<view class="lable">状态</view>
+			<view class="tag">
+				<!--<input v-model="item.toolstate" placeholder="状态" />
+				<text class="icon more">&#xe631;</text>-->
+				<view class="tag1" v-if="item.toolstate==0">借用待审</view>
+				<view class="tag1" v-else-if="item.toolstate=1">借用中</view>
+				<view class="tag1" v-else-if="item.toolstate==2">已归还</view>
+				<view class="tag1" v-else-if="item.toolstate==-1">归还待审</view>
+				<view class="tag1" v-else-if="item.toolstate==3">驳回</view>
+				<view class="tag1" v-else-if="item.toolstate==81">终止</view>
+				<view class="tag1" v-else></view>
+			</view>
+		</view>
+
+<!--
+		<view class="footer">
+
+			<view class="confrim-btn"><button class="btn" @click="workflowsback()">确定</button></view> 
+		</view>
+-->
+
+	
+	</view>
+</template>
+
+<script>
+	let qrcode = require('@/common/code.js');
+	export default {
+		data() {
+			return {
+			
+				item: {},
+                id: '',
+
+	
+
+			};
+		},
+		onLoad(e) {
+			this.id = e.id;
+			//传过来的id
+			this.state = e.ste;
+
+			this.getDocuments();
+
+			//选中审批人员监听函数,其它类型的参考这个
+			uni.$on('select', res => {
+				console.log('asd2:' + JSON.stringify(res));
+
+			});
+		},
+		methods: {
+
+			getDocuments() {
+				this.http.request({
+					url: this.http.urls.documents + this.id,
+					data: this.item,
+					success: res => {
+						console.log('asd2:' + JSON.stringify(res));
+						
+						this.item = res.data.data.items;
+
+					}
+				});
+			},
+
+
+
+
+		}
+	};
+</script>
+
+<style lang="scss">
+	.pages {
+		padding-bottom: 85px;
+	}
+	.tag1 {
+				position: absolute;
+				top: 10%;
+				right: 0px;
+				padding: 3px 10px;
+				background-color: #F44336;
+				color: white;
+				font-size: 14px;
+				border-radius: 15px 0px 0px 15px;
+			}
+</style>

+ 30 - 15
pages/model/index.vue

@@ -15,24 +15,36 @@
 		<view class="list">
 			<view class="item" v-for="(item, index) in list" :key="index" @click="detail(item.id)">
 				<view class="title">
-					<text class="tv">便携式储能电源</text>
+					<text class="tv">{{ item.items.__DkLB41tkDZoSeXdzjNd.value }}</text>
 					<text class="icon">&#xe631;</text>
 					<view class="clear"></view>
 				</view>
 				<view class="con">
+					
+					
 					<view class="it">
-						<view class="label">设备型号:</view>
-						<view class="name">PMQ104M10005</view>
+						<view class="label">计量编号:</view>
+						<view class="name">{{ item.items.__To3ldfLqdpnLNUIjGvb.value }}</view>
 					</view>
+					
 					<view class="it">
 						<view class="label">借用人部门:</view>
-						<view class="name">工业设计与操纵环境研究所</view>
+						<view class="name">{{ item.items.__ISOkPJeTwFomTO3JEFR.value }}</view>
 					</view>
 					<view class="it">
 						<view class="label">借用人:</view>
-						<view class="name">腾飞</view>
+						<view class="name">{{ item.items.__UAsr8UEjHBujd7oCVfb.value }}</view>
 					</view>
-					<view class="tag">撰写</view>
+					
+					
+					
+					<view class="tag" v-if="item.items.__2ryB7XjxtrdtU40P48c.value==0">借用待审</view>
+					<view class="tag" v-else-if="item.items.__2ryB7XjxtrdtU40P48c.value==1">借用中</view>
+					<view class="tag" v-else-if="item.items.__2ryB7XjxtrdtU40P48c.value==2">已归还</view>
+					<view class="tag" v-else-if="item.items.__2ryB7XjxtrdtU40P48c.value==-1">归还待审</view>
+					<view class="tag" v-else-if="item.items.__2ryB7XjxtrdtU40P48c.value==3">驳回</view>
+					<view class="tag" v-else-if="item.items.__2ryB7XjxtrdtU40P48c.value==81">终止</view>
+					<view class="tag" v-else></view>
 				</view>
 			</view>
 			<view class="loading" v-if="loadMore"><u-loadmore :status="loadMore ? 'loading' : 'nomore'" /></view>
@@ -51,27 +63,30 @@
 export default {
 	data() {
 		return {
-			param: { appId: '__gAPYBW4YxB3UePM3lqO', containTitle: '设备借还台账', opentarget: 'detail', viewId: '__CR9BgfreRzMvXS0xHsr', _currpage: 1 },
+			param: { appId: '__gAPYBW4YxB3UePM3lqO', containTitle: '设备借还台账', opentarget: 'detail', viewId: '__NOtUm3wgeNBBmv8mhK3', _currpage: 1 },
 			
-			list: [{}, {}, {}, {}, {}],
+			list: [],
 			show: false,
 			loadMore: true
 		};
 	},
 	onLoad(e) {
-		//this.getData();
+		this.getData();
 	},
 	methods: {
 		getData() {
 			this.http.request({
-				url: this.http.urls.user_task_record_list,
+				url: this.http.urls.borrowing_list,
 				data: this.param,
+				method: 'POST',
 				loading: 'false',
 				success: res => {
-					this.loadMore = res.data.pages > this.param.pageNum ? true : false;
-					res.data.rows.forEach(item => {
-						this.list.push(item);
-					});
+				console.log('gfgh===1111' + JSON.stringify(res));
+				let totalPage = res.data.data.row_count < 10 ? 1 : res.data.data.row_count / 10;
+				this.loadMore = totalPage > this.param._currpage ? true : false;
+				res.data.data.data.forEach(item => {
+					this.list.push(item);
+				});
 				}
 			});
 		},
@@ -85,7 +100,7 @@ export default {
 		//跳转到详情
 		detail(id) {
 			uni.navigateTo({
-				url: '/pages/index/detail?id=' + id
+				url: '/pages/model/detail?ste=1&id=' + id
 			});
 		},
 		go(url) {

+ 24 - 46
pages/model/return.vue

@@ -1,6 +1,6 @@
 <template>
 	<view class="page">
-		<view class="vtitle">借用人信息</view>
+		<view class="vtitle">归还信息</view>
 		<view class="form_group">
 			<view class="lable">扫码</view>
 			<view class="tag" @click="qr()">
@@ -19,13 +19,7 @@
 				<text class="icon more">&#xe631;</text>
 			</view>
 		</view>
-		<view class="form_group" v-if="op == '设备借用'">
-			<view class="lable">借用人</view>
-			<view class="tag">
-				<input v-model="item.borrower" placeholder="输入借用人" />
-				<text class="icon more">&#xe631;</text>
-			</view>
-		</view>
+	
 		<view class="form_group" v-if="op == '设备归还'">
 			<view class="lable">归还者</view>
 			<view class="tag">
@@ -33,13 +27,7 @@
 				<text class="icon more">&#xe631;</text>
 			</view>
 		</view>
-		<view class="form_group" v-if="op == '设备借用'">
-			<view class="lable">借用人部门</view>
-			<view class="tag">
-				<text class="span">{{ item.UNIT }}</text>
-				<text class="icon more">&#xe631;</text>
-			</view>
-		</view>
+	
 		<view class="form_group">
 			<view class="lable">手机号</view>
 			<view class="tag">
@@ -47,7 +35,7 @@
 				<text class="icon more">&#xe631;</text>
 			</view>
 		</view>
-		<view class="vtitle">借用设备信息</view>
+		<view class="vtitle">归还设备信息</view>
 		<view v-for="(item, index) in list" :key="index" class="item">
 			<view class="form_group">
 				<view class="lable">序号</view>
@@ -58,37 +46,37 @@
 			<view class="form_group">
 				<view class="lable">计量编号</view>
 				<view class="tag">
-					<text class="span">{{ item.items.__b5UmDDfLaCJJdn5F4JF.value }}</text>
+					<text class="span">{{ item.items.__Q0YnOcfMqiTpVsTiDEh.value }}</text>
 				</view>
 			</view>
 			<view class="form_group">
 				<view class="lable">设备名称</view>
 				<view class="tag">
-					<text class="span">{{ item.items.__FwAgiHdxI4bCZaKNs4A.value }}</text>
+					<text class="span">{{ item.items.__khn9SQnzgWNPt0aHldp.value }}</text>
 				</view>
 			</view>
 			<view class="form_group">
 				<view class="lable">型号规格</view>
 				<view class="tag">
-					<text class="span">{{ item.items.__drInpQcmkMf2iWseaRR.value }}</text>
+					<text class="span">{{ item.items.__fpUc5yOsHgSHeHPFHim.value }}</text>
 				</view>
 			</view>
 			<view class="form_group">
 				<view class="lable">测量范围</view>
 				<view class="tag">
-					<text class="span">{{ item.items.__XcfZD8dzEQb5qURydpP.value }}</text>
+					<text class="span">{{ item.items.__soGLIaAxvM0O0NTVt1c.value }}</text>
 				</view>
 			</view>
 			<view class="form_group">
-				<view class="lable">最大允许误差</view>
+				<view class="lable">制造商</view>
 				<view class="tag">
-					<text class="span">{{ item.items.__ARvSmuzLwNLg6TlB4tV.value }}</text>
+					<text class="span">{{ item.items.__aPTYvYeakxz299A7Thk.value }}</text>
 				</view>
 			</view>
 			<view class="form_group">
 				<view class="lable">内部编号</view>
 				<view class="tag">
-					<text class="span">{{ item.items.__BEViJOuGBdPWSxES5Z5.value }}</text>
+					<text class="span">{{ item.items.__dRIZk7xLPVCO6rqJbs7.value }}</text>
 				</view>
 			</view>
 			<view class="form_group">
@@ -144,7 +132,7 @@
 	export default {
 		data() {
 			return {
-				array1: ['类型1', '类型2', '类型3', '类型4'], //实验类型1
+		
 				bitem: {
 					applicationId: '__gAPYBW4YxB3UePM3lqO',
 					exparams: {},
@@ -170,7 +158,7 @@
 					versions: '0'
 				},
 				geteq: {
-					DEVID: '202209211603170016',
+					DEVID: '',
 					allow: 'false',
 					appId: '__gAPYBW4YxB3UePM3lqO',
 					datetime: '1670485443880',
@@ -182,7 +170,7 @@
 					parentId: '__NYI0rVs0LXbiW21z6Nv',
 					searchForm: 'false',
 					selectOne: 'false',
-					viewId: '__WLVxKX6e0Pq0cTwdNUQ'
+					viewId: '__ajlFXbohdIXtn7ErzZq'
 				},
 				item: {},
 				op: '设备归还',
@@ -216,7 +204,7 @@
 					},
 					fieldId: "__0TQu1UrRbMZVX1UvtBL",
 					formId: "__w9J1gxcIWgXmNw6pE1F",
-					viewId: "__WLVxKX6e0Pq0cTwdNUQ",
+					viewId: "__ajlFXbohdIXtn7ErzZq",
 					_selects: "__sIJiL5GlxEYoL095Vo9",
 				},
 			};
@@ -263,7 +251,7 @@
 							} else {
 								this.list.forEach(item => {
 
-									if (item.items.__2sfNVgOh5Bzq6lXRVuM.value == this.geteq
+									if (item.items.__O1qcaazksjAzDcrvJLk.value == this.geteq
 										.DEVID) {
 										uni.showModal({
 											title: '提示',
@@ -306,7 +294,7 @@
 			},
 			getEq() {
 				this.http.request({
-					url: this.http.urls.eq_list +
+					url: this.http.urls.re_list +
 						'parentId=' +
 						this.geteq.parentid,
 					data: this.geteq,
@@ -316,10 +304,7 @@
 						if (res.data.errcode == 0) {
 
 							res.data.data.data.forEach(item => {
-								//console.log('res2:' + JSON.stringify(res));
-							//	this.runViewDialogConfirmScript.docId=this.bitem.id ;
-								//this.runViewDialogConfirmScript._selects=item.docId;
-								//this.runViewDialogConfirm();
+							
 								this.list.push(item);
 							});
 						}
@@ -327,17 +312,13 @@
 				});
 			},
 			empty() {
-				var url = '';
-				if (this.op == '设备借用') {
-					url = this.http.urls.borr_empty;
-				} else {
-					url = this.http.urls.return_empty;
-				}
+				
 				this.http.request({
-					url: url,
+					url: this.http.urls.return_empty,
 					data: this.item,
 
 					success: res => {
+							console.log('res2:' + JSON.stringify(res));
 						this.item = res.data.data.items;
 						this.bitem.id = res.data.data.id;
 						this.bitem.formId = res.data.data.formid;
@@ -367,7 +348,7 @@
 						this.items.document.subDocuments = [];
 						this.items.document.templateForm = '';
 						this.items.document.versions = '0';
-						//console.log('res2:' + JSON.stringify(res.data.data));
+					
 					}
 				});
 			},
@@ -379,10 +360,7 @@
 			tool_borrowing_empty() {
 				this.list.forEach(item => {
 
-
-
-
-					this.http.request({
+                     this.http.request({
 						url: this.http.urls.tool_borrowing_empty,
 						data: this.item,
 
@@ -415,7 +393,7 @@
 							//this.btitem.items.toolstate=0;//借用日期
 
 
-							this.btitem.items.DEVID = item.items.__2sfNVgOh5Bzq6lXRVuM.value;
+							this.btitem.items.DEVID = item.items.__O1qcaazksjAzDcrvJLk.value;
 							console.log('this.btitem1:' + JSON.stringify(this.btitem));
 							this.validate();