杜迪迪 1 mesiac pred
rodič
commit
bc40ed0acf

+ 2 - 3
pages/assay/deptList.vue

@@ -216,8 +216,7 @@
 								a: 'one'
 							})
 							uni.navigateBack()
-
-						}, 1000)
+						}, 500)
 					})
 				}
 			},
@@ -349,4 +348,4 @@
 			color: rgb(146, 146, 146);
 		}
 	}
-</style>
+</style>

+ 37 - 6
pages/assay/detailsList.vue

@@ -107,10 +107,13 @@
 			}).then((res) => {
 				this.ledgerList = res.rows;
 				this.total = res.total;
+				if (this.ledgerList[0].miInstrument.fillingStatus == '7') {
+					this.showChehui = false
+				}
 			})
-			if (this.ledgerList[0].miInstrument.fillingStatus == '7') {
-				this.showChehui = false
-			}
+			console.log('this.ledgerList[0].miInstrument.fillingStatus', this.ledgerList)
+			// for(let i=0;i<this.ledgerList)
+
 		},
 		computed: {
 			// //检定状态
@@ -146,12 +149,40 @@
 						icon: "none",
 						duration: 1000,
 					});
-					setTimeout(() => {
-						uni.navigateBack()
+					getMiAuditApplyRoobtList({
+						...this.queryParams
+					}).then((res) => {
+						this.ledgerList = res.rows;
+						this.total = res.total;
+						if (this.ledgerList[0].miInstrument.fillingStatus == '7') {
+							this.showChehui = false
+						}
+						this.show = false
 					})
+
+					// setTimeout(() => {
+					// 	uni.navigateBack()
+					// })
 				})
 			},
-			downLoadPDF() {},
+			downLoadPDF() {
+				downLoad(path) {
+					console.log('’', path)
+					uni.downloadFile({
+						url: path,
+						success: (res) => {
+							var filePath = res.tempFilePath;
+							uni.openDocument({
+								filePath: filePath,
+								showMenu: true,
+								success: function(res) {
+									console.log('打开文档成功');
+								}
+							});
+						}
+					})
+				},
+			},
 			onReachBottom() {
 				//触底事件
 				if (this.queryParams.pageNum * this.queryParams.pageSize >= this.total) {

+ 16 - 8
pages/assay/index.vue

@@ -8,7 +8,7 @@
 
 		<view style="margin: 15rpx 0" v-if="activeContent == '我的申请'">
 			<view style="background: #fff; padding: 10rpx 0; margin-bottom: 15rpx">
-				<u-search @search='sousuo' shape="square" placeholder="请输入备案单编号"
+				<u-search @custom='sousuo' shape="square" placeholder="请输入备案单编号"
 					style="width: 95%; margin: 0rpx auto"></u-search>
 			</view>
 			<view class="contentItems" @click="handleDetails(item)" v-for="item in ledgerList">
@@ -164,18 +164,24 @@
 			uni.startPullDownRefresh();
 		},
 		onPullDownRefresh() {
+			this.getList()
 			console.log('refresh');
 			setTimeout(function() {
 				uni.stopPullDownRefresh();
-			}, 1000);
+			}, 800);
 		},
 		onShow() {
-			uni.$once('query', (query) => {
+			uni.$on('query', (query) => {
 				if (query.a == 'one') {
-					this.queryParams.pageNum = 1
-					this.queryParams.pageSize = 10
-					this.getList()
+					console.log('query', query)
+					console.log('11111111111111111111111')
 					uni.startPullDownRefresh();
+					setTimeout(() => {
+						this.queryParams.pageNum = 1
+						this.queryParams.pageSize = 10
+						this.getList()
+					}, 1500)
+
 				}
 			})
 
@@ -267,8 +273,10 @@
 			handleCurrentForm() {},
 			handleDetails(item) {
 				uni.navigateTo({
-					url: "/pages/assay/details?id=" + item.id + '&danwei=' + item.useOrgName + '&applypeople=' +
-						item.userName + '&userMobile=' + item.userMobile + '&createTime=' + item.createTime,
+					url: "/pages/assay/details?id=" + item.id + '&danwei=' + item.useOrgName +
+						'&applypeople=' +
+						item.userName + '&userMobile=' + item.userMobile + '&createTime=' + item
+						.createTime,
 					success: (res) => {},
 					fail: () => {},
 					complete: () => {},