linweizeng il y a 3 ans
Parent
commit
26a97983c7

+ 27 - 18
pages/fileView/reportList.vue

@@ -8,19 +8,24 @@
 			<view class="sinList" v-for="(item,index) in reportList" :key="index">
 				<view class="title">报告编号:{{item.bao_gao_bian_hao_}}</view>
 				<view class="title">样品编号:{{item.yang_pin_bian_hao}}</view>
+				<view class="title">报告名称:<text style="color: #7349ff;">{{item.FILE_NAME_ || ''}}</text></view>
 				<view class="title">样品名称:{{item.yang_pin_ming_che}}</view>
 				<!-- <view class="title">联系人:{{item.wei_tuo_lian_xi_r}}</view> -->
 				<view class="title">报告状态:<text style="color: #7349ff;">{{item.zhuang_tai_}}</text></view>
+				<view class="title" style="color: #ff9900;" v-if="item.zhuang_tai_ == '待审核' && item.EXT_ == 'docx'">
+					<u-icon name="question-circle-fill" class="u-m-r-5"></u-icon>该报告是docx格式,需要下载才能预览
+				</view>
 				<view class="btn">
 					<view>
 						<u-button type="warning" size="mini" @click="goDe(item.id_)" style="margin-right: 10rpx;"
-							v-if="item.zhuang_tai_ == '待编制' || item.zhuang_tai_ == '报告待审核'">修改信息</u-button>
+							v-if="item.zhuang_tai_ == '待编制' || item.zhuang_tai_ == '待审核'">修改信息</u-button>
 						<u-button type="warning" size="mini" @click="goto(item.id_,'1')"
-							v-if="item.zhuang_tai_ == '报告待审核'">预览报告</u-button>
+							v-if="item.zhuang_tai_ == '待审核' && item.EXT_ != 'docx'">预览报告</u-button>
 						<u-button type="warning" size="mini" @click="goto(item.id_,'2')" style="margin-right: 10rpx;"
 							v-if="item.zhuang_tai_ == '已完成'">查看报告</u-button>
-						<u-button type="primary" size="mini" v-if="item.zhuang_tai_ == '已完成'"
-							@click="getDe(item.id_,item)">
+						<u-button type="primary" size="mini"
+							v-if="(item.zhuang_tai_ == '已完成') || (item.shi_fou_guo_shen_ == '已编制' && item.EXT_ == 'docx')"
+							@click="geDownload(item.bao_gao_pdf_,item.FILE_NAME_, item.EXT_)">
 							下载报告</u-button>
 					</view>
 				</view>
@@ -90,7 +95,7 @@
 				});
 				//'${id}'
 				let sql =
-					`select * from t_lhjcbgb where yang_pin_bian_hao = '${id}' ORDER BY create_time_ desc`
+					`select a.*,b.FILE_NAME_,b.EXT_ from t_lhjcbgb a left join ibps_file_attachment b on a.bao_gao_pdf_ = b.id_  where a.yang_pin_bian_hao = '${id}' ORDER BY a.create_time_ desc`
 				let requestData = this.$sig(sql)
 				this.$http.post("/ibps/business/v3/sys/universal/inputSqlSelectData", requestData).then(res => {
 					if (res.data.state == 200) {
@@ -109,22 +114,26 @@
 				})
 			},
 			//下载
-			getDe(id, item) {
+			// getDe(id, item) {
+			// 	uni.showLoading({
+			// 		title: '下载中',
+			// 		mask: true
+			// 	})
+			// 	let sql =
+			// 		`select a.bao_gao_pdf_,b.FILE_NAME_,b.EXT_ FROM t_lhjcbgb a left join ibps_file_attachment b on a.bao_gao_pdf_ = b.id_ WHERE a.id_ = '${id}'`
+			// 	let requestData = this.$sig(sql)
+			// 	this.$http.post("/ibps/business/v3/sys/universal/inputSqlSelectData", requestData).then(res => {
+			// 		if (res.data.state == 200) {
+			// 			const data = res.data.variables.data[0]
+			// 			this.geDownload(data.bao_gao_pdf_, data.FILE_NAME_, data.EXT_)
+			// 		}
+			// 	})
+			// },
+			geDownload(id, item, type) {
 				uni.showLoading({
 					title: '下载中',
 					mask: true
 				})
-				let sql =
-					`select a.bao_gao_pdf_,b.FILE_NAME_ FROM t_lhjcbgb a left join ibps_file_attachment b on a.bao_gao_pdf_ = b.id_ WHERE a.id_ = '${id}'`
-				let requestData = this.$sig(sql)
-				this.$http.post("/ibps/business/v3/sys/universal/inputSqlSelectData", requestData).then(res => {
-					if (res.data.state == 200) {
-						const data = res.data.variables.data[0]
-						this.geDownload(data.bao_gao_pdf_, data.FILE_NAME_)
-					}
-				})
-			},
-			geDownload(id, item) {
 				let requestData = {
 					attachmentId: id
 				}
@@ -140,7 +149,7 @@
 					const link = document.createElement('a')
 					link.style.display = 'none'
 					link.href = url
-					link.setAttribute('download', item + '.pdf')
+					link.setAttribute('download', item + '.' + type)
 					document.body.appendChild(link)
 					link.click()
 					window.URL.revokeObjectURL(link.href)

+ 23 - 46
pages/jiance/order.vue

@@ -184,7 +184,8 @@
 		<u-popup v-model="lhypbShow" mode="bottom" height="80%" border-radius="20">
 			<view>
 				<lhypb-message ref="lhypbMessage" :type="lhypbIndexData" :jianCeTypeList="jianCeTypeList"
-					:taoCanShow="taoCanShow" :heTongId="form.heTongId" :itemType="itemType" @deletClick="deletClick"
+					:taoCanShow="taoCanShow" :heTongId="form.heTongId" :itemType="itemType"
+					:chuJuBaoGaoYaoQiu="form.chuJuBaoGaoYaoQiu" @deletClick="deletClick"
 					@sumbitSingClick="sumbitSingClick" @getParentContent="getJianXiangData">
 				</lhypb-message>
 			</view>
@@ -727,11 +728,7 @@
 								this.getYangPin(weiTouId)
 							}
 						} else {
-							uni.showToast({
-								title: '该合同没有检测项目',
-								icon: 'none',
-								duration: 2000
-							})
+							meth.getPrompt('该合同没有检测项目')
 						}
 					}
 				});
@@ -765,11 +762,7 @@
 							this.taoCanList = datas
 						} else {
 							setTimeout(function() {
-								uni.showToast({
-									title: '该合同没有套餐检测项目',
-									icon: 'none',
-									duration: 1000
-								})
+								meth.getPrompt('该合同没有套餐检测项目', 'none', 1000)
 							}, 500);
 							this.taoCanShow = false
 							this.taoCanList = []
@@ -805,24 +798,29 @@
 						total += parseFloat(it.zhe_hou_jia_ge_ || 0)
 						itemTotal += parseFloat(it.zhe_hou_jia_ge_ || 0)
 					})
-					item.yangPinZongJia = (itemTotal).toFixed(2)
+					if (this.form.chuJuBaoGaoYaoQiu == '特急') {
+						itemTotal = itemTotal * 1.5
+					} else if (this.form.chuJuBaoGaoYaoQiu == '加急') {
+						itemTotal = itemTotal * 1.2
+					} else {
+						itemTotal = itemTotal
+					}
+					item.yangPinZongJia = itemTotal
 				})
 
-
-				this.form.zongJia = total
 				this.total = total
-				this.getMultiple()
-			},
-			//特急 加急 常规
-			getMultiple() {
 				if (this.form.chuJuBaoGaoYaoQiu == '特急') {
-					this.form.zongJia = (this.total * 1.5).toFixed(2)
+					this.form.zongJia = total * 1.5
 				} else if (this.form.chuJuBaoGaoYaoQiu == '加急') {
-					this.form.zongJia = (this.total * 1.2).toFixed(2)
+					this.form.zongJia = total * 1.2
 				} else {
-					this.form.zongJia = (this.total * 1).toFixed(2)
+					this.form.zongJia = total
 				}
 			},
+			//特急 加急 常规
+			getMultiple() {
+				this.getTotal()
+			},
 			//调用日期组件
 			dateClick(type, index) {
 				this.listType = type
@@ -1061,25 +1059,15 @@
 					for (let index in this.form.lhypb) {
 						let item = this.form.lhypb[index]
 						if (item.yangPinMingCheng == '') {
-							uni.showToast({
-								title: `请输入样品信息${parseInt(index)+1}的样品名称`,
-								icon: 'none',
-								duration: 2000
-							})
+							meth.getPrompt(`请输入样品信息${parseInt(index)+1}的样品名称`)
 							return
 						}
 					}
-
-
 					let showIndex = this.form.lhypb.findIndex(item => item.jianCeXiangMu == '' && item.taoCanXiangMuList
 						.length ==
 						0)
 					if (showIndex >= 0) {
-						uni.showToast({
-							title: `请在样品信息${showIndex+1}选择委托单需要检测项目`,
-							icon: 'none',
-							duration: 2000
-						})
+						meth.getPrompt(`请在样品信息${showIndex+1}选择委托单需要检测项目`)
 						return
 					}
 				}
@@ -1272,21 +1260,11 @@
 							this.$http.post("ibps/business/v3/sys/universal/addDataContextTable", data)
 								.then(res => {
 									if (res.data.state == 200) {
-										uni.showToast({
-											title: '暂存成功',
-											icon: 'none',
-											duration: 2000
-										})
-
+										meth.getPrompt('暂存成功')
 									} else {
-										uni.showToast({
-											title: '暂存失败',
-											icon: 'none',
-											duration: 2000
-										})
+										meth.getPrompt('暂存失败')
 									}
 								});
-
 						} else if (res.cancel) {}
 					}
 				});
@@ -1511,7 +1489,6 @@
 		z-index: 999;
 	}
 
-
 	/deep/ .uni-group__content {
 		padding: 15rpx 25rpx;
 	}

+ 4 - 3
pages/jiance/order/lhypbCom.vue

@@ -36,12 +36,13 @@
 				</view>
 			</view>
 			<view class="u-body-footer" slot="foot">
-				<u-icon name="setting" size="34" color="" label="详情" class="u-m-r-20"
+				<u-icon name="setting" size="34" color="#3396d1" label="详情" class="u-m-r-20"
 					@click="updateClick(index,'detail')"></u-icon>
-				<u-icon name="edit-pen" size="34" color="" label="编辑" class="u-m-r-20"
+				<u-icon name="edit-pen" size="34" color="#99cc66" label="编辑" class="u-m-r-20"
 					@click="updateClick(index,'edit')" v-if="type != 'detail'">
 				</u-icon>
-				<u-icon name=" trash" size="34" color="" label="删除" @click="deleteClick(index)" v-if="type != 'detail'">
+				<u-icon name="trash" size="34" color="red" label="删除" @click="deleteClick(index)"
+					v-if="type != 'detail'">
 				</u-icon>
 			</view>
 		</u-card>

+ 14 - 1
pages/jiance/order/lhypbMessage.vue

@@ -173,7 +173,7 @@
 							<view class="jiancexiangm">
 								<view>
 									{{it.jian_ce_lei_bie_ || ''}}-{{it.jian_ce_xiang_mu_ || ''}}
-									<text style="color: red;">[{{it.zhe_hou_jia_ge_ || ''}}元]</text>
+									<text style="color: red;">[{{it.zhe_hou_jia_ge_ || '0'}}元]</text>
 								</view>
 								<view>{{it.yi_ju_de_biao_zhu || ''}}</view>
 							</view>
@@ -410,6 +410,10 @@
 				type: String,
 				default: 'add'
 			},
+			chuJuBaoGaoYaoQiu: {
+				type: String,
+				default: '常规'
+			},
 		},
 		data() {
 			return {
@@ -575,6 +579,15 @@
 				this.form.taoCanXiangMuList.forEach((it, x) => {
 					itemTotal += parseFloat(it.zhe_hou_jia_ge_ || 0)
 				})
+
+				if (this.chuJuBaoGaoYaoQiu == '加急') {
+					itemTotal = itemTotal * 1.2
+				} else if (this.chuJuBaoGaoYaoQiu == '特急') {
+					itemTotal = itemTotal * 1.5
+				} else {
+					itemTotal = itemTotal
+				}
+
 				this.form.yangPinZongJia = (itemTotal).toFixed(2)
 
 				if (!this.itemType) {

+ 1 - 1
uni_modules/uni-data-select/components/uni-data-select/uni-data-select.vue

@@ -332,7 +332,7 @@
 		border: 1px solid #EBEEF5;
 		border-radius: 6px;
 		box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
-		z-index: 2;
+		z-index: 100;
 		padding: 4px 0;
 	}