linweizeng %!s(int64=3) %!d(string=hai) anos
pai
achega
e0f3c104c4

+ 1 - 0
.gitignore

@@ -2,3 +2,4 @@
 /.idea/
 node_modules
 package-lock.json
+.history

+ 7 - 0
common/router/modules/routes.js

@@ -202,6 +202,13 @@ const routes = [{
 		meta: {
 			title: '样品标签',
 		},
+	},
+	{
+		path: "/pages/hold/hold",
+		name: 'hold',
+		meta: {
+			title: '委托暂存',
+		},
 	}
 ]
 export default routes

+ 0 - 9
common/service/config.service.js

@@ -4,19 +4,10 @@ let BASE_URL = ''
 
 
 if (process.env.NODE_ENV == 'development') {
-	// BASE_URL = 'http://127.0.0.1:8080/jeecg-boot' // 开发环境
-	//BASE_URL = 'http://127.0.0.1:5100/ibps/business/v3/mobile' // 开发环境
-	//BASE_URL = 'http://127.0.0.1:5100' // 开发环境
 	BASE_URL = http.apiHosp // 生产环境
 
-	// BASE_URL = 'https://www.szjyxt.com/' // 生产环境
-
 } else {
-	//BASE_URL = 'http://127.0.0.1:5100/ibps/business/v3/mobile' // 生产环境
-	//BASE_URL = 'http://127.0.0.1:5100' // 生产环境
-	// BASE_URL = 'https://www.mingjianlims.com/'
 	BASE_URL = http.apiHosp // 生产环境
-	// BASE_URL = 'https://www.szjyxt.com/' // 生产环境
 }
 let staticDomainURL = BASE_URL + '/sys/common/static';
 

+ 144 - 133
common/util/work.js

@@ -2,36 +2,43 @@
  * 常用服务
  * useful server
  */
-const  icon_prefix="/static/home/128/"
+const icon_prefix = "/static/home/128/"
 
 export const us = {
-  data:[
-    {
-      title:"检测委托",
-      icon:icon_prefix+"richang.png",
-      description:"记录每天的工作经验和心得",
-      useCount:1000,
-	  page:'order'
-    }/* ,{
-      title:"历史委托单",
-      icon:icon_prefix+"zhoubao.png",
-      description:"总结每周的工作情况和下周计划",
-      useCount:10000,
-	  page:'list'
-    } */ ,{
-      title:"委托查询",
-      icon:icon_prefix+"kaoqin.png",
-      description:"工作考勤",
-      useCount:10000,
-	  page:'jindu'
-    },{
-      title:"我的样品",
-      icon:icon_prefix+"richeng.png",
-      description:"建立和查看个人工作安排",
-      useCount:10000,
-	  page:'list'
-    }, 
-	/**
+	data: [{
+			title: "检测委托",
+			icon: icon_prefix + "richang.png",
+			description: "记录每天的工作经验和心得",
+			useCount: 1000,
+			page: 'order'
+		}
+		/* ,{
+		      title:"历史委托单",
+		      icon:icon_prefix+"zhoubao.png",
+		      description:"总结每周的工作情况和下周计划",
+		      useCount:10000,
+			  page:'list'
+		    } */
+		, {
+			title: "委托查询",
+			icon: icon_prefix + "kaoqin.png",
+			description: "工作考勤",
+			useCount: 10000,
+			page: 'jindu'
+		}, {
+			title: "我的样品",
+			icon: icon_prefix + "richeng.png",
+			description: "建立和查看个人工作安排",
+			useCount: 10000,
+			page: 'list'
+		}, {
+			title: "委托暂存",
+			icon: icon_prefix + "wendang.png",
+			description: "委托暂存",
+			useCount: 10000,
+			page: 'hold'
+		}
+		/**
 	{
       title:"请假申请",
       icon:icon_prefix+"qingjia1.png",
@@ -71,8 +78,8 @@ export const us = {
 	  page:'levelAddressBook'
     },
 	*/
-	
-  ]
+
+	]
 }
 
 
@@ -80,61 +87,63 @@ export const us = {
  * other server 其他服务
  */
 export const os = {
-  data:[
-/*    {
-      title:"委托进度查询",
-      icon:icon_prefix+"xinwen.png",
-      description:"新闻中心",
-      useCount:10000,
-	  page:'helloWorld'
-    }
-	
-	, */{
-      title:"个人信息",
-      icon:icon_prefix+"toupiao.png",
-      description:"投票中心",
-      useCount:10000,
-	  page:'userdetail'
-    },
-	{
-	      title:"修改密码",
-	      icon:icon_prefix+"xinwen.png",
-	      description:"新闻中心",
-	      useCount:10000,
-		  page:'editpassword'
-	},
-	{
-      title:"退出登录",
-      icon:icon_prefix+"renwu.png",
-      description:"任务中心",
-      useCount:10000,
-	  page:'userexit'
-    },/* {
-      title:"文档中心",
-      icon:icon_prefix+"wendang.png",
-      description:"文档中心",
-      useCount:10000,
-	  page:'helloWorld'
-    },{
-      title:"合同",
-      icon:icon_prefix+"hetong.png",
-      description:"合同",
-      useCount:10000,
-	  page:'helloWorld'
-    },{
-      title:"会议",
-      icon:icon_prefix+"huiyi.png",
-      description:"会议",
-      useCount:10000,
-	  page:'helloWorld'
-    },{
-      title:"客户关系",
-      icon:icon_prefix+"tongzhi.png",
-      description:"客户关系",
-      useCount:10000,
-	  page:'helloWorld'
-    } */
-  ]
+	data: [
+		/*    {
+		      title:"委托进度查询",
+		      icon:icon_prefix+"xinwen.png",
+		      description:"新闻中心",
+		      useCount:10000,
+			  page:'helloWorld'
+		    }
+			
+			, */
+		{
+			title: "个人信息",
+			icon: icon_prefix + "toupiao.png",
+			description: "投票中心",
+			useCount: 10000,
+			page: 'userdetail'
+		},
+		{
+			title: "修改密码",
+			icon: icon_prefix + "xinwen.png",
+			description: "新闻中心",
+			useCount: 10000,
+			page: 'editpassword'
+		},
+		{
+			title: "退出登录",
+			icon: icon_prefix + "renwu.png",
+			description: "任务中心",
+			useCount: 10000,
+			page: 'userexit'
+		},
+		/* {
+		      title:"文档中心",
+		      icon:icon_prefix+"wendang.png",
+		      description:"文档中心",
+		      useCount:10000,
+			  page:'helloWorld'
+		    },{
+		      title:"合同",
+		      icon:icon_prefix+"hetong.png",
+		      description:"合同",
+		      useCount:10000,
+			  page:'helloWorld'
+		    },{
+		      title:"会议",
+		      icon:icon_prefix+"huiyi.png",
+		      description:"会议",
+		      useCount:10000,
+			  page:'helloWorld'
+		    },{
+		      title:"客户关系",
+		      icon:icon_prefix+"tongzhi.png",
+		      description:"客户关系",
+		      useCount:10000,
+			  page:'helloWorld'
+		    } */
+	]
 }
 
 
@@ -142,51 +151,53 @@ export const os = {
  * other server 售后服务
  */
 export const sh = {
-  data:[
-/*    {
-      title:"委托进度查询",
-      icon:icon_prefix+"xinwen.png",
-      description:"新闻中心",
-      useCount:10000,
-	  page:'helloWorld'
-    }
-	
-	, */{
-      title:"满意度调查",
-      icon:icon_prefix+"toupiao.png",
-      description:"投票中心",
-      useCount:10000,
-	  page:'manyi'
-    },{
-      title:"投诉",
-      icon:icon_prefix+"renwu.png",
-      description:"任务中心",
-      useCount:10000,
-	  page:'tousu'
-    },/* {
-      title:"文档中心",
-      icon:icon_prefix+"wendang.png",
-      description:"文档中心",
-      useCount:10000,
-	  page:'helloWorld'
-    },{
-      title:"合同",
-      icon:icon_prefix+"hetong.png",
-      description:"合同",
-      useCount:10000,
-	  page:'helloWorld'
-    },{
-      title:"会议",
-      icon:icon_prefix+"huiyi.png",
-      description:"会议",
-      useCount:10000,
-	  page:'helloWorld'
-    },{
-      title:"客户关系",
-      icon:icon_prefix+"tongzhi.png",
-      description:"客户关系",
-      useCount:10000,
-	  page:'helloWorld'
-    } */
-  ]
-}
+	data: [
+		/*    {
+		      title:"委托进度查询",
+		      icon:icon_prefix+"xinwen.png",
+		      description:"新闻中心",
+		      useCount:10000,
+			  page:'helloWorld'
+		    }
+			
+			, */
+		{
+			title: "满意度调查",
+			icon: icon_prefix + "toupiao.png",
+			description: "投票中心",
+			useCount: 10000,
+			page: 'manyi'
+		}, {
+			title: "投诉",
+			icon: icon_prefix + "renwu.png",
+			description: "任务中心",
+			useCount: 10000,
+			page: 'tousu'
+		},
+		/* {
+		      title:"文档中心",
+		      icon:icon_prefix+"wendang.png",
+		      description:"文档中心",
+		      useCount:10000,
+			  page:'helloWorld'
+		    },{
+		      title:"合同",
+		      icon:icon_prefix+"hetong.png",
+		      description:"合同",
+		      useCount:10000,
+			  page:'helloWorld'
+		    },{
+		      title:"会议",
+		      icon:icon_prefix+"huiyi.png",
+		      description:"会议",
+		      useCount:10000,
+			  page:'helloWorld'
+		    },{
+		      title:"客户关系",
+		      icon:icon_prefix+"tongzhi.png",
+		      description:"客户关系",
+		      useCount:10000,
+			  page:'helloWorld'
+		    } */
+	]
+}

+ 15 - 10
pages.json

@@ -226,17 +226,22 @@
 				"enablePullDownRefresh": false
 			}
 
+		}, {
+			"path": "pages/tag/sampleTag",
+			"style": {
+				"navigationBarTitleText": "样品标签",
+				"enablePullDownRefresh": false
+			}
+
+		}, {
+			"path": "pages/hold/hold",
+			"style": {
+				"navigationBarTitleText": "委托暂存",
+				"enablePullDownRefresh": true
+			}
+
 		}
-	    ,{
-            "path" : "pages/tag/sampleTag",
-            "style" :                                                                                    
-            {
-                "navigationBarTitleText": "样品标签",
-                "enablePullDownRefresh": false
-            }
-            
-        }
-    ],
+	],
 	"globalStyle": {
 		"mp-alipay": {
 			/* 支付宝小程序特有相关 */

+ 95 - 0
pages/fileView/apply.vue

@@ -0,0 +1,95 @@
+<template>
+	<view>
+		<h3>修改报告请求说明</h3>
+		<view class="centent">
+			<u-input v-model="value" type="textarea" :border="true" height="200" />
+			<u-button type="error" class="btn" @click="getSave">提交申请</u-button>
+		</view>
+	</view>
+</template>
+
+<script>
+	import {
+		ACCESS_TOKEN,
+		USER_NAME,
+		USER_INFO
+	} from "@/common/util/constants"
+	export default {
+		props: {
+			id: {
+				type: String,
+				default: ''
+			}
+		},
+		data() {
+			return {
+				value: '',
+				userid: '',
+				time: ''
+			}
+		},
+		created() {
+			this.getInit()
+		},
+		methods: {
+			getInit() {
+				let info = uni.getStorageSync(USER_INFO);
+				if (info.employee.id) {
+					this.userid = info.employee.id || ''
+				}
+				var nowDate = new Date((new Date).getTime() + 8 * 60 * 60 * 1000)
+				var time = nowDate.toJSON().split('T').join(' ').substr(0, 19)
+				this.time = time
+			},
+			//提交
+			getSave() {
+				let pp = {
+					paramWhere: [{
+						id_: this.id
+					}],
+					tableName: "t_lhjcbgb",
+					paramCond: {
+						xiu_gai_bao_gao_b: this.value,
+						update_time_: this.time,
+						update_by_: this.userid
+					}
+				}
+				let data = this.$sig(pp)
+
+				this.$http.post("ibps/business/v3/sys/universal/updateDatasContextTable", data).then(res => {
+					if (res.data.state == 200) {
+						uni.showToast({
+							title: '提交成功',
+							icon: 'none',
+							duration: 2000
+						})
+						this.$emit('saveSuccees')
+
+					} else {
+						uni.showToast({
+							title: '提交失败',
+							icon: 'none',
+							duration: 2000
+						})
+					}
+				});
+
+			}
+		}
+	}
+</script>
+
+<style lang="scss" scoped>
+	h3 {
+		text-align: center;
+		margin: 30rpx 0;
+	}
+
+	.centent {
+		margin: 30rpx;
+	}
+
+	.btn {
+		margin-top: 30rpx;
+	}
+</style>

+ 45 - 9
pages/fileView/fileView.vue

@@ -17,12 +17,19 @@
 		data() {
 			return {
 				pdfUrl: '',
-				from: 'app'
+				from: 'app',
+				type: '1'
 			}
 		},
 		onLoad(option) {
-			if (option.id) {
+
+			if (option.type) {
+				this.type = option.type
+			}
+			if (this.type == 1) {
 				this.getDe(option.id)
+			} else {
+				this.getDe2(option.id)
 			}
 			/**
 			 * 浏览情景
@@ -37,24 +44,53 @@
 		},
 		methods: {
 			/**
-			 * 根据报告的id查询文档路径
+			 * 根据报告的id查询没有盖章文档路径
 			 */
 			getDe(id) {
 				let access_token = uni.getStorageSync('Access-Token')
 				console.log(access_token)
 
 				let sql =
-					`{"sql":"select FILE_PATH_  from ibps_file_attachment  WHERE id_ = (SELECT  shou_quan_qian_z FROM t_mjjcbg WHERE id_ = '${id}')"}`
+					`{"sql":"select FILE_PATH_  from ibps_file_attachment  WHERE id_ = (SELECT  bao_gao_pdf_ FROM t_lhjcbgb WHERE id_ = '${id}')"}`
+
+				let md5 = this.sig(sql) //加密, 获取md5密文
+				let requestData = sql.slice(0, 1) + '"sig":"' + md5 + '",' + sql.slice(1) //结果拼接
+				this.$http.post("/ibps/business/v3/sys/universal/inputSqlSelectData", requestData).then(res => {
+					if (res.data.state == 200) {
+						const data = res.data.variables.data
+						if (data.length > 0) {
+							let dataItem = data[0]
+							let url =
+								http.apiHosp + dataItem.FILE_PATH_
+							console.log(url)
+							this.pdfUrl = '/hybrid/html/web/viewer.html?file=' + encodeURIComponent(url)
+						}
+
+					}
+				})
+			},
+			/**
+			 * 根据报告的id查询有盖章文档路径
+			 */
+			getDe2(id) {
+				let access_token = uni.getStorageSync('Access-Token')
+				console.log(access_token)
+
+				let sql =
+					`{"sql":"select FILE_PATH_  from ibps_file_attachment  WHERE id_ = (SELECT  gai_zhang_jian_pd FROM t_lhjcbgb WHERE id_ = '${id}')"}`
 
 				let md5 = this.sig(sql) //加密, 获取md5密文
 				let requestData = sql.slice(0, 1) + '"sig":"' + md5 + '",' + sql.slice(1) //结果拼接
 				this.$http.post("/ibps/business/v3/sys/universal/inputSqlSelectData", requestData).then(res => {
 					if (res.data.state == 200) {
-						const data = res.data.variables.data[0]
-						let url =
-							http.apiHosp + data.FILE_PATH_
-						console.log(url)
-						this.pdfUrl = '/hybrid/html/web/viewer.html?file=' + encodeURIComponent(url)
+						const data = res.data.variables.data
+						if (data.length > 0) {
+							let dataItem = data[0]
+							let url =
+								http.apiHosp + dataItem.FILE_PATH_
+							console.log(url)
+							this.pdfUrl = '/hybrid/html/web/viewer.html?file=' + encodeURIComponent(url)
+						}
 					}
 				})
 			},

+ 93 - 11
pages/fileView/reportList.vue

@@ -9,12 +9,20 @@
 				<view class="title">报告编号:{{item.bao_gao_bian_hao_}}</view>
 				<view class="title">样品编号:{{item.yang_pin_bian_hao}}</view>
 				<view class="title">样品名称:{{item.yang_pin_ming_che}}</view>
-				<view class="title">联系人:{{item.lian_xi_ren_}}</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="btn">
-					<button style="margin-right: 15rpx; height: 50rpx;background-color: #7349ff;color: #fff;"
-						@click="goto(item.id_)" size="mini"
-						v-if="item.bao_gao_pdf_ != '' || item.zhuang_tai_ == '完成'">查看报告</button>
+					<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>
+						<u-button type="warning" size="mini" @click="goto(item.id_,'1')"
+							v-if="item.zhuang_tai_ == '待编制' || item.zhuang_tai_ == '待审核'">预览报告</u-button>
+						<u-button type="warning" size="mini" @click="goto(item.id_,'2')" style="margin-right: 10rpx;"
+							v-if="item.zhuang_tai_ == '待发放' || item.zhuang_tai_ == '已完成'">查看报告</u-button>
+						<u-button type="primary" size="mini" v-if="item.zhuang_tai_ == '已完成'"
+							@click="getDe(item.id_,item)">
+							下载报告</u-button>
+					</view>
 				</view>
 			</view>
 		</view>
@@ -23,24 +31,55 @@
 				<text class="">暂无报告</text>
 			</uni-card>
 		</view>
+
+		<u-popup v-model="show" mode="bottom" closeable>
+			<apply ref="apply" :id="id" v-if="show" @saveSuccees='saveSuccees'></apply>
+		</u-popup>
 	</view>
 </template>
 
 <script>
 	import md5 from "@/common/util/md5.js"
+	import http from "@/common/service/http.js"
+	import {
+		ACCESS_TOKEN,
+		USER_NAME,
+		USER_INFO
+	} from "@/common/util/constants"
+	import apply from './apply.vue'
 	export default {
+		components: {
+			apply
+		},
 		data() {
 			return {
-				reportList: []
+				id: '',
+				reportList: [],
+				userid: '',
+				time: '',
+				show: false
 			}
 		},
 		onLoad(option) {
 			console.log(option)
 			if (option.id) {
+				this.id = option.id
 				this.getList(option.id)
 			}
 		},
+		created() {
+			this.getInit()
+		},
 		methods: {
+			getInit() {
+				let info = uni.getStorageSync(USER_INFO);
+				if (info.employee.id) {
+					this.userid = info.employee.id || ''
+				}
+				var nowDate = new Date((new Date).getTime() + 8 * 60 * 60 * 1000)
+				var time = nowDate.toJSON().split('T').join(' ').substr(0, 19)
+				this.time = time
+			},
 			/* 
 			  根据委托单id查询报告礼拜
 			*/
@@ -49,14 +88,13 @@
 					mask: true,
 					title: 'loading'
 				});
+				//'${id}'
 				let sql =
-					`{"sql":"select * from t_mjjcbg where jian_ce_shen_qing= '${id}' ORDER BY CREATE_TIME_ desc"}`
-				let md5 = this.sig(sql) //加密, 获取md5密文
-				let requestData = sql.slice(0, 1) + '"sig":"' + md5 + '",' + sql.slice(1) //结果拼接
+					`select * from t_lhjcbgb where  wei_tuo_id_= '${id}' ORDER BY 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) {
 						const data = res.data.variables.data
-						console.log(data)
 						this.reportList = data
 						uni.hideLoading()
 					}
@@ -65,11 +103,55 @@
 			/*
 			  跳转页面在线查看文档页面
 			*/
-			goto(id) {
+			goto(id, type) {
 				uni.navigateTo({ // 跳转页面
-					url: "/pages/fileView/fileView?id=" + id
+					url: "/pages/fileView/fileView?id=" + id + '&type=' + type
+				})
+			},
+			//下载
+			getDe(id) {
+				let access_token = uni.getStorageSync('Access-Token')
+				console.log(access_token)
+
+				let sql =
+					`select FILE_PATH_  from ibps_file_attachment  WHERE id_ = (SELECT  bao_gao_pdf_ FROM t_lhjcbgb WHERE 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]
+						let url =
+							http.apiHosp + data.FILE_PATH_
+						//电脑下载
+						let a = document.createElement('a')
+						a.target = '_black'
+						a.download = this.time + '检测报告'
+						a.style.display = 'none'
+						// 生成的base64编码
+						a.href = url
+						document.body.appendChild(a)
+						a.click()
+						document.body.removeChild(a)
+
+						//手机下载
+						// var iframe = document.createElement('iframe');
+						// iframe.style.display = '_black';
+						// iframe.src = "javascript: '<script>location.href=\"" + url + "\"<\/script>'";
+						// document.getElementsByTagName('body')[0].appendChild(iframe);
+
+					}
 				})
 			},
+			goDe(id) {
+				this.id = id
+				this.show = true
+			},
+			saveSuccees() {
+				this.reportList = []
+				this.getDe(this.id)
+			},
+
+
 			/*
 			   md5加密	  
 			*/

+ 133 - 0
pages/hold/hold.vue

@@ -0,0 +1,133 @@
+<template>
+	<view>
+		<cu-custom bgColor="bg-gradual-pink" :isBack="true">
+			<block slot="backText">返回</block>
+			<block slot="content">委托暂存</block>
+		</cu-custom>
+
+		<block v-if="list.length > 0">
+			<view class="list" v-for="(item,index) in list" :key="index">
+				<uni-section :title="item.wei_tuo_dan_hao_" type="line" padding>
+					<view class="content">
+						<text>暂存类型:{{item.bao_cun_biao_ti_}}</text>
+						<text></text>
+					</view>
+					<view class="content">
+						<text>暂存时间:{{item.bian_zhi_shi_jian}}</text>
+						<text></text>
+					</view>
+					<view class="btn">
+						<view>
+							<u-button type="primary" size="mini" @click="goClick(item.id_)">添加</u-button>
+						</view>
+					</view>
+				</uni-section>
+			</view>
+		</block>
+		<block v-else></block>
+	</view>
+</template>
+
+<script>
+	import {
+		ACCESS_TOKEN,
+		USER_NAME,
+		USER_INFO
+	} from "@/common/util/constants" // 拉取登录token,userName,userInfo
+	export default {
+		data() {
+			return {
+				current: 0,
+				list: [],
+				ReachBottomShow: true
+			}
+		},
+		// 下拉刷新
+		onPullDownRefresh() {
+			this.current = 0
+			this.list = []
+			this.getData()
+		},
+		// 上拉加载
+		onReachBottom() {
+			let _self = this
+			uni.showNavigationBarLoading()
+			if (this.ReachBottomShow) {
+				this.getData()
+			}
+
+		},
+		onShow() {
+			this.current = 0
+			this.list = []
+			this.getData()
+		},
+		// watch: {
+		// 	'$route.path'() {
+		// 		console.log(this.$route.path)
+		// 		// 	this.current = 0
+		// 		// 	this.list = []
+		// 		// 	this.getData()
+		// 	}
+		// },
+		methods: {
+			//获取暂存列表
+			getData() {
+				uni.showLoading({
+					mask: true,
+					title: 'loading'
+				});
+
+				let info = uni.getStorageSync(USER_INFO);
+				let useId = info.user.id
+
+				var page = 0
+				if (this.current == 0) {
+					page = 0
+				} else {
+					page = this.current * 10
+				}
+				let sql =
+					`select id_,bian_zhi_shi_jian,wei_tuo_dan_hao_,bao_cun_biao_ti_ from t_mjsjdzcb where bian_zhi_ren_ = '${useId}' order by create_time_ desc LIMIT ${page},10`
+
+				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
+						this.list.push(...data)
+						uni.stopPullDownRefresh();
+						if (data.length > 10) {
+							this.ReachBottomShow = false
+						}
+						if (data.length != 0) {
+							this.current++
+						}
+						uni.hideLoading()
+					}
+				})
+			},
+
+			//跳转到委托单添加页面
+			goClick(id) {
+				uni.navigateTo({ // 跳转页面
+					url: '/pages/jiance/order?saveId=' + id
+				})
+			}
+		}
+	}
+</script>
+
+<style lang="scss" scoped>
+	.list {
+		padding: 0 20rpx;
+
+		.content {
+			line-height: 45rpx;
+		}
+
+		.btn {
+			display: flex;
+			justify-content: flex-end;
+		}
+	}
+</style>

+ 4 - 5
pages/jiance/jindu.vue

@@ -19,7 +19,7 @@
 			:style="[{top:'calc('+ CustomBar + 'px + 20rpx)'}]">
 			<!-- 新增 -->
 			<view>
-				检测委托单位:{{item.ke_hu_dang_wei}}
+				检测委托单位:{{item.wei_tuo_dan_wei_}}
 			</view>
 
 			<uni-section :title="'合同编号:'+item.he_tong_ming_cheng_" :subTitle="'检测委托单号:'+item.wei_tuo_bian_hao_"
@@ -207,10 +207,9 @@
 						if (data.length > 10) {
 							this.ReachBottomShow = false
 						}
-						if(data.length != 0){
+						if (data.length != 0) {
 							this.current++
 						}
-						console.log(this.current)
 						uni.hideLoading()
 					}
 				})
@@ -221,7 +220,7 @@
 			getZhuangtai(id, callback) {
 				let sql =
 					`select * from t_lhwtzsb where wei_tuo_bian_hao_ = '${id}'`
-					let requestData = this.$sig(sql)
+				let requestData = this.$sig(sql)
 
 
 				this.$http.post("/ibps/business/v3/sys/universal/inputSqlSelectData", requestData).then(res => {
@@ -281,7 +280,7 @@
 			/**
 			 * 样品标签页
 			 */
-			getTag(id){
+			getTag(id) {
 				uni.navigateTo({ // 跳转页面
 					url: '/pages/tag/sampleTag?id=' + id
 				})

+ 14 - 13
pages/jiance/list.vue

@@ -11,15 +11,15 @@
 				type="line" padding>
 				<view>
 					<view>
-						<view style="display: flex;">
+						<view style="display: flex;line-height: 50rpx;">
 							<view class="title">样品名称:</view>
 							<view> {{item.yang_pin_ming_che}} </view>
 						</view>
-						<view style="display: flex;">
+						<view style="display: flex;line-height: 50rpx;">
 							<view class="title">收样时间:</view>
 							<view> {{item.shou_yang_ri_qi_}} </view>
 						</view>
-						<view style="display: flex;">
+						<view style="display: flex;line-height: 50rpx;">
 							<view>验收状态:</view>
 							<view style="color: #5E00FF;" v-if="item.yan_shou_zhuang_t"> {{item.yan_shou_zhuang_t}}
 							</view>
@@ -27,7 +27,7 @@
 						<!-- 						<view>
 							付款单号: <view style="color: #5E00FF;">{{item.id_}}</view>
 						</view><br> -->
-						<view style="display: flex;">
+						<view style="display: flex;line-height: 50rpx;">
 							<view>付款状态:</view>
 							<view v-if="item.fu_kuan_zhuang_ta=='已结清'">
 								<view style="color: #7349ff;"> 已结清 </view>
@@ -36,14 +36,14 @@
 								<view style="color: #7349ff;"> 未结清 </view>
 							</view>
 						</view>
-						<view style="display: flex;">
+						<view style="display: flex;line-height: 50rpx;">
 							<view>样品接收备注:</view>
-							<view v-if="item.bei_zhu_ && item.bei_zhu_ != ''"> {{item.bei_zhu_}}</view>
-							<view v-else>无</view>
+							<view> {{item.bei_zhu_ || '无'}}</view>
 						</view>
 					</view>
+					<!-- v-if="item.zhuang_tai_ && (item.zhuang_tai_ == '待运营中心审核' || item.zhuang_tai_ == '待检测中心审核' || item.zhuang_tai_ == '待财务审核' || item.zhuang_tai_ == '待样品接收')" -->
 					<view class="btnList"
-						v-if="item.zhuang_tai_ && (item.zhuang_tai_ == '待运营中心审核' || item.zhuang_tai_ == '待检测中心审核' || item.zhuang_tai_ == '待财务审核' || item.zhuang_tai_ == '待样品接收')">
+						v-if="item.wei_tuo_zhuang_ta && (item.wei_tuo_zhuang_ta == '待审核' ||item.wei_tuo_zhuang_ta == '已编制' || item.wei_tuo_zhuang_ta == '待财务审核' || item.wei_tuo_zhuang_ta == '待签订' || item.wei_tuo_zhuang_ta == '待样品接收')">
 						<u-button type="warning" size="mini" @click="goto(item.id_)">样品确定</u-button>
 					</view>
 				</view>
@@ -144,12 +144,13 @@
 				// 	` left join t_mjypdjb b on a.yang_pin_bian_hao = b.yang_pin_bian_hao ` +
 				// 	` left join t_mjjcbg d on a.yang_pin_bian_hao = d.yang_pin_bian_hao ORDER BY a.create_time_ desc limit ${page},10`
 
+				//select a.id_,a.create_time_,a.yang_pin_ming_che,a.yang_pin_bian_hao,c.fu_kuan_zhuang_ta,c.wei_tuo_bian_hao_,c.wei_tuo_zhuang_ta,b.fan_yang_ri_qi_,b.bei_zhu_ from t_lhypb a inner join t_lhwtsqb c on a.parent_id_ = c.id_ left join t_lhypdjb b on a.yang_pin_bian_hao = b.yang_ben_bian_hao
 				//明鉴
 				let sql =
-					`select a.id_,a.bei_zhu_,a.create_time_,a.yang_pin_ming_che,a.yang_pin_bian_hao,b.shou_yang_ri_qi_,b.yan_shou_zhuang_t,c.wei_tuo_bian_hao_,c.fu_kuan_zhuang_ta,c.zhuang_tai_ ` +
-					` from t_mjypb a ` +
-					` inner join t_mjwtsqb c on a.wai_jian_ = c.id_ and a.create_by_= '${useId}' ` +
-					` left join t_mjypdjb b on a.yang_pin_bian_hao = b.yang_pin_bian_hao ORDER BY a.create_time_ desc limit ${page},10`
+					`select a.id_,a.create_time_,a.yang_pin_ming_che,a.yang_pin_bian_hao,c.fu_kuan_zhuang_ta,c.wei_tuo_bian_hao_,c.wei_tuo_zhuang_ta,b.shou_yang_ri_qi_,b.bei_zhu_` +
+					` from t_lhypb a` +
+					` inner join t_lhwtsqb c on a.parent_id_ = c.id_ and a.create_by_= '${useId}' ` +
+					` left join t_lhypdjb b on a.yang_pin_bian_hao = b.yang_ben_bian_hao ORDER BY a.create_time_ desc limit ${page},10`
 
 				let requestData = this.$sig(sql)
 				this.$http.post("/ibps/business/v3/sys/universal/inputSqlSelectData", requestData).then(res => {
@@ -205,7 +206,7 @@
 	}
 
 	.title {
-		width: 150rpx;
+		width: 140rpx;
 	}
 
 	/deep/ .uni-section__content-sub {

+ 246 - 75
pages/jiance/list/specimen.vue

@@ -5,41 +5,102 @@
 			<block slot="content">样品确定</block>
 		</cu-custom>
 		<view class="m-30 m-t-0 p-b-50">
-			<u-form :model="form" ref="uForm" label-width="180">
+			<u-form :model="form" ref="uForm" label-width="210">
+				<u-form-item label="样品名称">
+					<u-input v-model="form.yang_pin_ming_che" />
+				</u-form-item>
 				<u-form-item label="样品编号">
 					<u-input v-model="form.yang_pin_bian_hao" disabled />
 				</u-form-item>
-				<u-form-item label="样品名称">
-					<u-input v-model="form.yang_pin_ming_che" type="textarea" auto-height height="45" />
-				</u-form-item>
 				<u-form-item label="姓名">
 					<u-input v-model="form.xing_ming_" />
 				</u-form-item>
 				<u-form-item label="性别">
-					<uni-data-checkbox style="flex-wrap: nowrap;" v-model="form.xing_bie_" :localdata="xingbeiMap">
-					</uni-data-checkbox>
+					<u-radio-group v-model="form.xing_bie_">
+						<u-radio v-for="(it, index) in sexList" :key="index" :name="it.name">
+							{{it.name}}
+						</u-radio>
+					</u-radio-group>
 				</u-form-item>
 				<u-form-item label="年龄">
 					<u-input v-model="form.nian_ling_" />
 				</u-form-item>
-				<u-form-item label="样品类型">
-					<u-input v-model="form.yang_pin_lei_xing" type="select" @click="yangPinLeiXingShow = true" />
+				<u-form-item label="送检批号/编号">
+					<u-input v-model="form.song_jian_pi_hao_" />
+				</u-form-item>
+
+				<u-form-item label="样本状态">
+					<u-input type="select" v-model="form.yang_pin_zhuang_t" @click="sheetClick('state')" />
+				</u-form-item>
+				<u-form-item label="送检时间">
+					<u-input type="select" v-model="form.song_jian_shi_jia" @click="dateClick('inspect')" />
+				</u-form-item>
+
+				<u-form-item label="样本类型一">
+					<u-input type="select" v-model="form.yang_pin_lei_xing" @click="sheetClick('yangpinType1')" />
+				</u-form-item>
+				<u-form-item label="样本运输条件一">
+					<u-input type="select" v-model="form.yang_ben_yun_shu_" @click="sheetClick('transportType1')" />
+				</u-form-item>
+				<u-form-item label="数量一">
+					<u-number-box v-model="form.shu_liang_"></u-number-box>
+				</u-form-item>
+				<u-form-item label="样品规格一">
+					<u-input v-model="form.yang_pin_gui_ge_" />
+					<u-button slot="right" type="success" size="mini" @click="sheetClick('specification1')">规格
+					</u-button>
 				</u-form-item>
-				<u-form-item label="批号">
-					<u-input v-model="form.pi_hao_" />
+
+
+				<u-form-item label="样本类型二">
+					<u-input type="select" v-model="form.yang_pin_lei_er_" @click="sheetClick('yangpinType2')" />
 				</u-form-item>
-				<u-form-item label="数量">
-					<u-input v-model="form.shu_liang_" />
+				<u-form-item label="样本运输条件二">
+					<u-input type="select" v-model="form.yang_pin_yun_shu_" @click="sheetClick('transportType2')" />
 				</u-form-item>
-				<u-form-item label="供限值">
-					<u-input v-model="form.yang_pin_lei_xin" />
+				<u-form-item label="数量二">
+					<u-number-box v-model="form.shu_liang_er_"> </u-number-box>
 				</u-form-item>
-				<u-form-item label="存储要求">
-					<u-input v-model="form.cun_chu_yao_qiu_" type="select" @click="cunChuYaoQiuShow = true" />
+				<u-form-item label="样品规格二">
+					<u-input v-model="form.yang_pin_gui_ge_e" />
+					<u-button slot="right" type="success" size="mini" @click="sheetClick('specification2')">规格
+					</u-button>
+				</u-form-item>
+
+				<u-form-item label="样本类型三">
+					<u-input type="select" v-model="form.yang_pin_lei_san_" @click="sheetClick('yangpinType3')" />
 				</u-form-item>
-				<u-form-item label="样品处置">
-					<u-input v-model="form.yang_pin_chu_zhi_" type="select" @click="yangPinChuZhiShow = true" />
+				<u-form-item label="样本运输条件三">
+					<u-input type="select" v-model="form.yang_pin_yun_san" @click="sheetClick('transportType3')" />
 				</u-form-item>
+				<u-form-item label="数量三">
+					<u-number-box v-model="form.shu_liang_san_"></u-number-box>
+				</u-form-item>
+				<u-form-item label="样品规格三">
+					<u-input v-model="form.yang_pin_gui_ge_s" />
+					<u-button slot="right" type="success" size="mini" @click="sheetClick('specification3')">规格
+					</u-button>
+				</u-form-item>
+
+				<u-form-item label="样本类型四">
+					<u-input type="select" v-model="form.yang_pin_lei_si_" @click="sheetClick('yangpinType4')" />
+				</u-form-item>
+				<u-form-item label="样本运输条件四" required>
+					<u-input type="select" v-model="form.yang_pin_yun_si_" @click="sheetClick('transportType4')" />
+				</u-form-item>
+				<u-form-item label="数量四">
+					<u-number-box v-model="form.shu_liang_si_"></u-number-box>
+				</u-form-item>
+				<u-form-item label="样品规格四">
+					<u-input v-model="form.yang_pin_gui_si_" />
+					<u-button slot="right" type="success" size="mini" @click="sheetClick('specification4')">规格
+					</u-button>
+				</u-form-item>
+				<u-form-item label="项目名称" v-if="form.xiang_mu_ming_che != ''">
+					<u-input v-model="form.xiang_mu_ming_che" />
+				</u-form-item>
+
+
 				<u-form-item label="检测项目" label-position="top">
 					<view>
 						<view v-for="(it, x) in jianCeList" :key="x">
@@ -54,12 +115,9 @@
 			<u-button type="error" @click="getSave">提交</u-button>
 		</view>
 
-		<u-select v-model="cunChuYaoQiuShow" :list="chuCunYaoQiuMap" title="存储要求" @confirm="selecConfirm1">
-		</u-select>
-		<u-select v-model="yangPinLeiXingShow" :list="yangPinLeiXingMap" title="样品类型" @confirm="selecConfirm2">
-		</u-select>
-		<u-select v-model="yangPinChuZhiShow" :list="chuZhiList" title="样品处置" @confirm="selecConfirm3">
-		</u-select>
+		<u-calendar v-model="dateShow" :mode="mode" max-date="2050-01-01" @change="dateChange"></u-calendar>
+		<u-action-sheet :list="list" v-model="sheetShow" @click="actionSheetCallback"></u-action-sheet>
+
 	</view>
 </template>
 
@@ -70,45 +128,61 @@
 		USER_NAME,
 		USER_INFO
 	} from "@/common/util/constants"
+	import order from '../order/test.json'
 	export default {
 		data() {
 			return {
 				userid: '',
 				id: '',
 				form: {
-					yang_pin_bian_hao: "",
-					yang_pin_ming_che: "",
-					yang_pin_lei_xing: "",
-					shu_liang_: "",
-					xing_ming_: "",
-					xing_bie_: "",
-					nian_ling_: "",
-					pi_hao_: "",
-					cun_chu_yao_qiu_: "",
-					yang_pin_lei_xin: "",
-					yang_pin_chu_zhi_: "",
-					update_by_: '',
-					update_time_: ''
+					yang_pin_ming_che: '',
+					yang_pin_bian_hao: '',
+					xing_bie_: '',
+					xing_ming_: '',
+					nian_ling_: '',
+					song_jian_pi_hao_: '',
+					yang_pin_zhuang_t: '',
+					song_jian_shi_jia: '',
+					yang_pin_lei_xing: '',
+					yang_ben_yun_shu_: '',
+					shu_liang_: 0,
+					yang_pin_gui_ge_: '',
+					yang_pin_lei_er_: '',
+					yang_pin_yun_shu_: '',
+					yang_pin_gui_ge_e: '',
+					shu_liang_er_: 0,
+					yang_pin_gui_ge_s: '',
+					shu_liang_san_: 0,
+					yang_pin_yun_san: '',
+					yang_pin_lei_san_: '',
+					yang_pin_gui_si_: '',
+					shu_liang_si_: 0,
+					yang_pin_yun_si_: '',
+					yang_pin_lei_si_: '',
+					xiang_mu_ming_che: ''
 				},
-				//性别数组
-				xingbeiMap: [{
-					text: '男',
-					value: '男'
-				}, {
-					text: '女',
-					value: '女'
-				}],
-				//样品类型数组
-				yangPinLeiXingMap: test.yangPinLeiXingMap,
-				yangPinLeiXingShow: false,
-				//存储要求列表
-				chuCunYaoQiuMap: test.chuCunYaoQiuMap,
-				cunChuYaoQiuShow: false,
-				//样品处置
-				chuZhiList: test.chuZhiList,
-				yangPinChuZhiShow: false,
-
-				jianCeList: []
+				jianCeList: [],
+				//日期
+				dateType: 'inspect',
+				dateShow: false,
+				mode: 'date',
+				//下拉框
+				sheetShow: false,
+				list: [],
+
+				//样本类型
+				sampleTypeList: order.sampleType,
+				//样本状态
+				sampleStateList: order.sampleState,
+				//样本运输条件
+				transportTypeList: order.transportType,
+				//样本规格
+				specificationList: order.specification,
+				//样品处理
+				dispositionList: order.disposition,
+				//性别
+				sexList: order.sex,
+				listType: ''
 			}
 		},
 		onLoad(option) {
@@ -125,7 +199,7 @@
 		methods: {
 			//样品详情
 			getDe(id) {
-				let sql = `select  * from  t_mjypb  where id_ = '${id}'`
+				let sql = `select  * from  t_lhypb  where id_ = '${id}'`
 
 				let requestData = this.$sig(sql)
 
@@ -137,14 +211,29 @@
 						this.form.xing_bie_ = result.xing_bie_
 						this.form.xing_ming_ = result.xing_ming_
 						this.form.nian_ling_ = result.nian_ling_
+						this.form.song_jian_pi_hao_ = result.song_jian_pi_hao_
+						this.form.yang_pin_zhuang_t = result.yang_pin_zhuang_t
+						this.form.song_jian_shi_jia = result.song_jian_shi_jia
 						this.form.yang_pin_lei_xing = result.yang_pin_lei_xing
-						this.form.pi_hao_ = result.pi_hao_
-						this.form.shu_liang_ = result.shu_liang_
-						this.form.yang_pin_lei_xin = result.yang_pin_lei_xin
-						this.form.cun_chu_yao_qiu_ = result.cun_chu_yao_qiu_
-						this.form.yang_pin_chu_zhi_ = result.yang_pin_chu_zhi_
-						if (result.jian_ce_xiang_mu2 && result.jian_ce_xiang_mu2 != '') {
-							this.getJiangCeDe(result.jian_ce_xiang_mu2)
+						this.form.yang_ben_yun_shu_ = result.yang_ben_yun_shu_
+						this.form.shu_liang_ = parseInt(result.shu_liang_)
+						this.form.yang_pin_gui_ge_ = result.yang_pin_gui_ge_
+						this.form.yang_pin_lei_er_ = result.yang_pin_lei_er_
+						this.form.yang_pin_yun_shu_ = result.yang_pin_yun_shu_
+						this.form.yang_pin_gui_ge_e = result.yang_pin_gui_ge_e
+						this.form.shu_liang_er_ = parseInt(result.shu_liang_er_)
+						this.form.yang_pin_gui_ge_s = result.yang_pin_gui_ge_s
+						this.form.shu_liang_san_ = parseInt(result.shu_liang_san_)
+						this.form.yang_pin_yun_san = result.yang_pin_yun_san
+						this.form.yang_pin_lei_san_ = result.yang_pin_lei_san_
+						this.form.yang_pin_gui_si_ = result.yang_pin_gui_si_
+						this.form.shu_liang_si_ = parseInt(result.shu_liang_si_)
+						this.form.yang_pin_yun_si_ = result.yang_pin_yun_si_
+						this.form.yang_pin_lei_si_ = result.yang_pin_lei_si_
+						this.form.xiang_mu_ming_che = result.xiang_mu_ming_che
+
+						if (result.jian_ce_xiang_mu_ && result.jian_ce_xiang_mu_ != '') {
+							this.getJiangCeDe(result.jian_ce_xiang_mu_)
 						}
 
 					}
@@ -176,7 +265,7 @@
 					paramWhere: [{
 						id_: this.id
 					}],
-					tableName: "t_mjypb",
+					tableName: "t_lhypb",
 					paramCond: this.form
 				}
 				let data = this.$sig(pp)
@@ -199,18 +288,100 @@
 
 			},
 
-			//存储要求
-			selecConfirm1(e) {
-				this.form.cun_chu_yao_qiu_ = e[0].value
+			sheetClick(type) {
+				this.listType = type
+				this.sheetShow = true
+				if (type == 'state') {
+					this.list = this.sampleStateList
+				}
+
+				//1
+				if (type.includes('yangpinType')) {
+					this.list = this.sampleTypeList
+				}
+				if (type.includes('transportType')) {
+					this.list = this.transportTypeList
+				}
+				if (type.includes('specification')) {
+					this.list = this.specificationList
+				}
+				if (type == 'disposition') {
+					this.list = this.dispositionList
+				}
+
+				if (type == 'jianCeType') {
+					this.list = this.jianCeTypeList
+				}
 			},
-			//样品类型
-			selecConfirm2(e) {
-				this.form.yang_pin_lei_xing = e[0].value
+			//日期回调
+			dateChange(e) {
+				if (this.type == 'inspect') {
+					this.form.songJianShiJian = e.result
+				}
+				if (this.type == 'report') {
+					this.form.chuBaoGaoShiJian = e.result
+				}
+				if (this.type == 'weiTuo') {
+					this.form.weiTuoRiQi = e.result
+				}
+			},
+			//下拉框回调
+			actionSheetCallback(e) {
+				let that = this
+				let lists = that.form
+
+				if (this.listType == 'state') {
+					lists.yang_pin_zhuang_t = this.list[e].text
+				}
+
+				//1
+				if (this.listType == 'yangpinType1') {
+					lists.yang_pin_lei_xing = that.list[e].text
+				}
+				if (this.listType == 'transportType1') {
+					lists.yang_ben_yun_shu_ = that.list[e].text
+				}
+				if (this.listType == 'specification1') {
+					lists.yang_pin_gui_ge_ = that.list[e].text
+				}
+
+				//2
+				if (this.listType == 'yangpinType2') {
+					lists.yang_pin_lei_er_ = that.list[e].text
+				}
+				if (this.listType == 'transportType2') {
+					lists.yang_pin_yun_shu_ = that.list[e].text
+				}
+				if (this.listType == 'specification2') {
+					lists.yang_pin_gui_ge_e = that.list[e].text
+				}
+
+				//3
+				if (this.listType == 'yangpinType3') {
+					lists.yang_pin_lei_san_ = that.list[e].text
+				}
+				if (this.listType == 'transportType3') {
+					lists.yang_pin_yun_san = that.list[e].text
+				}
+				if (this.listType == 'specification3') {
+					lists.yang_pin_gui_ge_s = that.list[e].text
+				}
+
+				//4
+				if (this.listType == 'yangpinType4') {
+					lists.yang_pin_lei_si_ = that.list[e].text
+				}
+				if (this.listType == 'transportType4') {
+					lists.yang_pin_yun_si_ = that.list[e].text
+				}
+				if (this.listType == 'specification4') {
+					lists.yang_pin_gui_si_ = that.list[e].text
+				}
+
+				if (this.listType == 'disposition') {
+					this.form.yangBenChuLi = this.list[e].text
+				}
 			},
-			//样品处置
-			selecConfirm3(e) {
-				this.form.yang_pin_chu_zhi_ = e[0].value
-			}
 		}
 	}
 </script>

+ 238 - 77
pages/jiance/order.vue

@@ -13,9 +13,10 @@
 					<u-input v-model="form.weiTuoBianHao" disabled />
 				</u-form-item>
 				<u-form-item label="合同选择" prop="heTongId" required>
-					<uni-data-select v-model="form.heTongId" :localdata="hetong" @change="hetongChange" v-if="type != 'detail'">
+					<uni-data-select v-model="form.heTongId" :localdata="hetong" @change="hetongChange"
+						v-if="type != 'detail'">
 					</uni-data-select>
-					
+
 					<text v-else>{{getButtChange(form.heTongId,hetong)}}</text>
 				</u-form-item>
 				<u-form-item label="委托来源">
@@ -35,7 +36,7 @@
 
 			<uni-group mode="card" :title="'记录' + (index+1)" v-for="(item,index) in form.lhypb" :key="index">
 				<u-form-item label="样品名称" prop="yangPinMingCheng" required>
-					<u-input v-model="item.yangPinMingCheng" :disabled="type == 'detail'?true :false"/>
+					<u-input v-model="item.yangPinMingCheng" :disabled="type == 'detail'?true :false" />
 				</u-form-item>
 				<u-form-item label="样品编号">
 					<u-input v-model="item.yangPinBianHao" disabled />
@@ -55,66 +56,73 @@
 					<u-input v-model="item.nianLing" />
 				</u-form-item>
 				<u-form-item label="送检批号/编号" prop="songJianPiHao" required>
-					<u-input v-model="item.songJianPiHao" :disabled="type == 'detail'?true :false"/>
+					<u-input v-model="item.songJianPiHao" :disabled="type == 'detail'?true :false" />
 				</u-form-item>
-				<u-form-item label="样本状态" prop="yangBenZhuangTai" required>
-					<u-input type="select" v-model="item.yangBenZhuangTai" @click="sheetClick('state',index)" v-if="type != 'detail'"/>
-					
-					<text v-else>{{item.yangBenZhuangTai}}</text>
+				<u-form-item label="样本状态" prop="yangPinZhuangTai" required>
+					<u-input type="select" v-model="item.yangPinZhuangTai" @click="sheetClick('state',index)"
+						v-if="type != 'detail'" />
+
+					<text v-else>{{item.yangPinZhuangTai}}</text>
 				</u-form-item>
 				<u-form-item label="送检时间" prop="songJianShiJian" required>
-					<u-input type="select" v-model="item.songJianShiJian" @click="dateClick('inspect',index)" v-if="type != 'detail'"/>
+					<u-input type="select" v-model="item.songJianShiJian" @click="dateClick('inspect',index)"
+						v-if="type != 'detail'" />
 					<text v-else>{{item.songJianShiJian}}</text>
 				</u-form-item>
 
 				<u-form-item label="样本类型一">
-					<u-input type="select" v-model="item.yangPinLeiXing" @click="sheetClick('yangpinType1',index)"  v-if="type != 'detail'" />
+					<u-input type="select" v-model="item.yangPinLeiXing" @click="sheetClick('yangpinType1',index)"
+						v-if="type != 'detail'" />
 					<text v-else>{{item.yangPinLeiXing}}</text>
 				</u-form-item>
 				<u-form-item label="样本运输条件一">
-					<u-input type="select" v-model="item.yangBenYunShuTiao"
-						@click="sheetClick('transportType1',index)" v-if="type != 'detail'"/>
-						<text v-else>{{item.yangBenYunShuTiao}}</text>
+					<u-input type="select" v-model="item.yangBenYunShuTiao" @click="sheetClick('transportType1',index)"
+						v-if="type != 'detail'" />
+					<text v-else>{{item.yangBenYunShuTiao}}</text>
 				</u-form-item>
 				<u-form-item label="数量一">
 					<u-number-box v-model="item.shuLiang" v-if="type != 'detail'"></u-number-box>
 					<text v-else>{{item.shuLiang}}</text>
 				</u-form-item>
 				<u-form-item label="样品规格一">
-					<u-input v-model="item.yangPinGuiGe" v-if="type != 'detail'"/>
-					<u-button slot="right" type="success" size="mini" @click="sheetClick('specification1',index)" v-if="type != 'detail'">规格
+					<u-input v-model="item.yangPinGuiGe" v-if="type != 'detail'" />
+					<u-button slot="right" type="success" size="mini" @click="sheetClick('specification1',index)"
+						v-if="type != 'detail'">规格
 					</u-button>
 					<text v-else>{{item.yangPinGuiGe}}</text>
 				</u-form-item>
 
 
 				<u-form-item label="样本类型二">
-					<u-input type="select" v-model="item.yangPinLeiXingEr" @click="sheetClick('yangpinType2',index)" v-if="type != 'detail'"/>
+					<u-input type="select" v-model="item.yangPinLeiXingEr" @click="sheetClick('yangpinType2',index)"
+						v-if="type != 'detail'" />
 					<text v-else>{{item.yangPinLeiXingEr}}</text>
 				</u-form-item>
 				<u-form-item label="样本运输条件二">
-					<u-input type="select" v-model="item.yangPinYunShuTiao"
-						@click="sheetClick('transportType2',index)" v-if="type != 'detail'"/>
-						<text v-else>{{item.yangPinYunShuTiao}}</text>
+					<u-input type="select" v-model="item.yangPinYunShuTiao" @click="sheetClick('transportType2',index)"
+						v-if="type != 'detail'" />
+					<text v-else>{{item.yangPinYunShuTiao}}</text>
 				</u-form-item>
 				<u-form-item label="数量二">
 					<u-number-box v-model="item.shuLiangEr" v-if="type != 'detail'"></u-number-box>
 					<text v-else>{{item.shuLiangEr}}</text>
 				</u-form-item>
 				<u-form-item label="样品规格二">
-					<u-input v-model="item.yangPinGuiGeEr" v-if="type != 'detail'"/>
-					<u-button slot="right" type="success" size="mini" @click="sheetClick('specification2',index)" v-if="type != 'detail'">规格
+					<u-input v-model="item.yangPinGuiGeEr" v-if="type != 'detail'" />
+					<u-button slot="right" type="success" size="mini" @click="sheetClick('specification2',index)"
+						v-if="type != 'detail'">规格
 					</u-button>
 					<text v-else>{{item.yangPinGuiGeEr}}</text>
 				</u-form-item>
 
 				<u-form-item label="样本类型三">
-					<u-input type="select" v-model="item.yangPinLeiXingSan" @click="sheetClick('yangpinType3',index)" v-if="type != 'detail'"/>
+					<u-input type="select" v-model="item.yangPinLeiXingSan" @click="sheetClick('yangpinType3',index)"
+						v-if="type != 'detail'" />
 					<text v-else>{{item.yangPinLeiXingSan}}</text>
 				</u-form-item>
 				<u-form-item label="样本运输条件三">
-					<u-input type="select" v-model="item.yangPinYunShuSan"
-						@click="sheetClick('transportType3',index)" v-if="type != 'detail'"/>
+					<u-input type="select" v-model="item.yangPinYunShuSan" @click="sheetClick('transportType3',index)"
+						v-if="type != 'detail'" />
 					<text v-else>{{item.yangPinLeiXingSan}}</text>
 				</u-form-item>
 				<u-form-item label="数量三">
@@ -122,18 +130,21 @@
 					<text v-else>{{item.shuLiangSan}}</text>
 				</u-form-item>
 				<u-form-item label="样品规格三">
-					<u-input v-model="item.yangPinGuiGeSan" v-if="type != 'detail'"/>
-					<u-button slot="right" type="success" size="mini" @click="sheetClick('specification3',index)" v-if="type != 'detail'">规格
+					<u-input v-model="item.yangPinGuiGeSan" v-if="type != 'detail'" />
+					<u-button slot="right" type="success" size="mini" @click="sheetClick('specification3',index)"
+						v-if="type != 'detail'">规格
 					</u-button>
 					<text v-else>{{item.yangPinGuiGeSan}}</text>
 				</u-form-item>
 
 				<u-form-item label="样本类型四">
-					<u-input type="select" v-model="item.yangPinLeiXingSi" @click="sheetClick('yangpinType4',index)" v-if="type != 'detail'"/>
+					<u-input type="select" v-model="item.yangPinLeiXingSi" @click="sheetClick('yangpinType4',index)"
+						v-if="type != 'detail'" />
 					<text v-else>{{item.yangPinLeiXingSi}}</text>
 				</u-form-item>
 				<u-form-item label="样本运输条件四" required>
-					<u-input type="select" v-model="item.yangPinYunShuSi" @click="sheetClick('transportType4',index)" v-if="type != 'detail'"/>
+					<u-input type="select" v-model="item.yangPinYunShuSi" @click="sheetClick('transportType4',index)"
+						v-if="type != 'detail'" />
 					<text v-else>{{item.yangPinYunShuSi}}</text>
 				</u-form-item>
 				<u-form-item label="数量四">
@@ -141,13 +152,14 @@
 					<text v-else>{{item.shuLiangSi}}</text>
 				</u-form-item>
 				<u-form-item label="样品规格四">
-					<u-input v-model="item.yangPinGuiGeSi" v-if="type != 'detail'"/>
-					<u-button slot="right" type="success" size="mini" @click="sheetClick('specification4',index)" v-if="type != 'detail'">规格
+					<u-input v-model="item.yangPinGuiGeSi" v-if="type != 'detail'" />
+					<u-button slot="right" type="success" size="mini" @click="sheetClick('specification4',index)"
+						v-if="type != 'detail'">规格
 					</u-button>
 					<text v-else>{{item.yangPinGuiGeSi}}</text>
 				</u-form-item>
 				<u-form-item label="项目名称" prop="xiangMuMingCheng" v-if="form.weiTuoHeTong == '技术服务协议'">
-					<u-input v-model="item.xiangMuMingCheng" :disabled="type == 'detail'?true :false"/>
+					<u-input v-model="item.xiangMuMingCheng" :disabled="type == 'detail'?true :false" />
 				</u-form-item>
 
 				<u-form-item label="检测类型" v-if="type != 'detail'">
@@ -155,7 +167,8 @@
 				</u-form-item>
 
 				<u-form-item label="检测项目" prop="name" label-position="top">
-					<checkbox-group v-for="(it, x) in item.jianCeList" :key="x" @click="changeIndex(it,index,x)" v-if="type != 'detail'">
+					<checkbox-group v-for="(it, x) in item.jianCeList" :key="x" @click="changeIndex(it,index,x)"
+						v-if="type != 'detail'">
 						<label class=" uni-list-cell uni-list-cell-pd" v-show="it.jian_ce_lei_bie_==item.jianCeType"
 							style="display: flex;margin: 15rpx 10rpx;font-size: 20rpx;line-height: 40rpx;">
 							<view>
@@ -167,18 +180,20 @@
 							</view>
 						</label>
 					</checkbox-group>
-					<view v-for="(it, x) in item.jianCeList" :key="x" v-if="it.checked && type=='detail'" >
+					<view v-for="(it, x) in item.jianCeList" :key="x" v-if="it.checked && type=='detail'">
 						<view class="uni-list-cell uni-list-cell-pd">
-							<view style="margin-left: 10rpx;font-size: 20rpx;line-height: 40rpx;background: #eee;padding: 10rpx;">
+							<view
+								style="margin-left: 10rpx;font-size: 20rpx;line-height: 40rpx;background: #eee;padding: 10rpx;">
 								<view>{{it.jian_ce_lei_bie_}}-{{it.jian_ce_xiang_mu_}}</view>
 								<view>{{it.yi_ju_de_biao_zhu}}</view>
 							</view>
 						</view>
 					</view>
-					
+
 				</u-form-item>
 
-				<u-button type="error" class="btn" @click="deletSing(index)" v-if="type != 'detail'">删除记录{{index+1}}</u-button>
+				<u-button type="error" class="btn" @click="deletSing(index)" v-if="type != 'detail'">删除记录{{index+1}}
+				</u-button>
 			</uni-group>
 
 			<u-button type="success" class="btn" @click="getSing()" v-if="type != 'detail'">添加记录</u-button>
@@ -196,7 +211,7 @@
 					<text v-else>{{getButtChange(form.baoGaoLeiXing,reportTypeList)}}</text>
 				</u-form-item>
 				<u-form-item label="出报告要求" prop="name">
-					<u-radio-group v-model="form.chuJuBaoGaoYaoQiu" v-if="type != 'detail'">
+					<u-radio-group v-model="form.chuJuBaoGaoYaoQiu" v-if="type != 'detail'" @change="getMultiple()">
 						<u-radio v-for="(item, index) in reportRequireList" :key="index" :name="item.name">
 							{{item.name}}
 						</u-radio>
@@ -204,11 +219,13 @@
 					<text v-else>{{getButtChange(form.chuJuBaoGaoYaoQiu,reportRequireList)}}</text>
 				</u-form-item>
 				<u-form-item label="出报告时间">
-					<u-input type="select" v-model="form.chuBaoGaoShiJian" @click="dateClick('report')" v-if="type != 'detail'"/>
+					<u-input type="select" v-model="form.chuBaoGaoShiJian" @click="dateClick('report')"
+						v-if="type != 'detail'" />
 					<text v-else>{{form.chuBaoGaoShiJian}}</text>
 				</u-form-item>
 				<u-form-item label="样本处理" prop="yangBenChuLi" required>
-					<u-input type="select" v-model="form.yangBenChuLi" @click="sheetClick('disposition')" v-if="type != 'detail'"/>
+					<u-input type="select" v-model="form.yangBenChuLi" @click="sheetClick('disposition')"
+						v-if="type != 'detail'" />
 					<text v-else>{{form.yangBenChuLi}}</text>
 				</u-form-item>
 				<u-form-item label="总价">
@@ -218,16 +235,17 @@
 
 			<uni-group mode="card" title="委托人信息">
 				<u-form-item label="委托方">
-					<u-input v-model="form.weiTuoFangMingChe" :disabled="type == 'detail'?true :false"/>
+					<u-input v-model="form.weiTuoFangMingChe" :disabled="type == 'detail'?true :false" />
 				</u-form-item>
 				<u-form-item label="联系人">
-					<u-input v-model="form.weiTuoFangLianXiR" :disabled="type == 'detail'?true :false"/>
+					<u-input v-model="form.weiTuoFangLianXiR" :disabled="type == 'detail'?true :false" />
 				</u-form-item>
 				<u-form-item label="联系电话">
-					<u-input v-model="form.weiTuoFangLianXiD" :disabled="type == 'detail'?true :false"/>
+					<u-input v-model="form.weiTuoFangLianXiD" :disabled="type == 'detail'?true :false" />
 				</u-form-item>
 				<u-form-item label="委托日期" prop="weiTuoRiQi">
-					<u-input type="select" v-model="form.weiTuoRiQi" @click="dateClick('weiTuo')" v-if="type != 'detail'"/>
+					<u-input type="select" v-model="form.weiTuoRiQi" @click="dateClick('weiTuo')"
+						v-if="type != 'detail'" />
 					<text v-else>{{form.weiTuoRiQi}}</text>
 				</u-form-item>
 				<u-form-item label="委托签名" label-position="top">
@@ -250,6 +268,10 @@
 
 				</u-form-item>
 			</uni-group>
+			<u-button type="error" @click="sumbit('beingTime')" class="btn" style="margin-bottom: 15rpx;"
+				v-if="type != 'detail'">
+				暂存
+			</u-button>
 			<u-button type="primary" class="btn" @click="sumbit" v-if="type != 'detail'">提交</u-button>
 		</u-form>
 
@@ -372,28 +394,37 @@
 
 				type: '', //判断哪个功能
 				id: '', //委托单id
-				taskId: ''
+				taskId: '',
+				total: 0
 
 
 			}
 		},
 		onLoad(options) {
 			this.getInit()
-			if (options.type && options.type != '') {
+			if (options.saveId) { //是不是暂存信息
+				console.log("1")
+				this.saveId = options.saveId
+				this.getSaveData(options.saveId)
+			} else if (options.type && options.type != '') { //是不是修改信息
+				console.log("2")
 				this.type = options.type
 			} else {
+				console.log("3")
 				this.getLhwtdh()
 			}
-			if (options.id) {
+			if (options.id) { //是不是修改信息
+				console.log("4")
 				this.id = options.id
 				this.getDe(options.id)
-				
+
 				if (options.type == 'edit') {
 					this.getTaskId(options.id)
 				}
 			}
 
 
+
 		},
 		onReady() {
 			this.$refs.form.setRules(this.rules);
@@ -403,9 +434,9 @@
 			getTaskId(id) {
 				let sql =
 					`select TASK_ID_ from ibps_bpm_tasks where NAME_ = '编制' and NODE_ID_ = 'Activity_1n1jgcs' and PROC_DEF_KEY_ = 'Process_1589cp3' and EXEC_ID_ = (select PROC_INST_ID_ from act_ru_execution where ACT_ID_ = 'Activity_1n1jgcs' and BUSINESS_KEY_ = '${id}') ORDER BY 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) {
 						let result = res.data.variables.data[0]
@@ -433,6 +464,43 @@
 
 				this.form.weiTuoLeiXing = '客户委托'
 			},
+			//根据暂存id获取暂存详情信息
+			getSaveData(id) {
+				uni.showLoading({
+					mask: true,
+					title: '加载中'
+				});
+				let sql =
+					`select  * from  t_mjsjdzcb  where 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]
+						const result = JSON.parse(data.bao_cun_nei_rong_)
+
+						this.form = result
+						this.jianCeTypeList = result.jianCeTypeList
+						this.total = result.originalTotal
+						this.getBeingTimeCount(result.weiTuoBianHao)
+						uni.hideLoading()
+					}
+				})
+			},
+			//判断委托单编号是否在委托表上
+			getBeingTimeCount(bianHao) {
+				let sql =
+					`select count(*) as count from t_lhwtsqb where wei_tuo_bian_hao_ = '${bianHao}'`
+				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]
+						if (data.count > 0) {
+							this.getLhwtdh()
+						}
+					}
+				})
+			},
+
 			//获取委托编号
 			getLhwtdh() {
 				let smsParams = {
@@ -470,7 +538,15 @@
 						let form = service.getForm(result)
 						this.form = form
 
-						this.getJiance(result.he_tong_id_, this.type,id)
+						if (result.chu_ju_bao_gao_ya == '特急') {
+							this.total = parseInt(result.zong_jia_) / 1.5
+						} else if (result.chu_ju_bao_gao_ya == '加急') {
+							this.total = parseInt(result.zong_jia_) / 1.2
+						} else {
+							this.total = parseInt(result.zong_jia_)
+						}
+
+						this.getJiance(result.he_tong_id_, this.type, id)
 					}
 				})
 			},
@@ -482,7 +558,7 @@
 				this.$http.post("/ibps/business/v3/sys/universal/inputSqlSelectData", requestData).then(res => {
 					if (res.data.state == 200) {
 						let result = res.data.variables.data
-						let list = service.getListForm(result,this.jianCeList)
+						let list = service.getListForm(result, this.jianCeList)
 						this.form.lhypb = list
 					}
 				})
@@ -538,7 +614,7 @@
 				}
 			},
 			//根据合同id选择检测项目
-			getJiance(id,type,weiTouId) {
+			getJiance(id, type, weiTouId) {
 				let sql =
 					`select tw.*,tb.zhe_hou_jia_ge_,tb.xiang_mu_dan_jia_ from t_htjcxmjmb tb left join t_mjjcnlfw tw on tb.jian_ce_xiang_mu_ = tw.id_  where parent_id_ = '${id}'`
 				let requestData = this.$sig(sql)
@@ -568,8 +644,8 @@
 								this.$set(item, 'checked', false)
 							})
 							this.jianCeList = result
-							
-							if(type != ""){
+
+							if (type != "") {
 								this.getYangPin(weiTouId)
 							}
 						} else {
@@ -597,6 +673,18 @@
 					})
 				})
 				this.form.zongJia = total
+				this.total = total
+				this.getMultiple()
+			},
+			//特急 加急 常规
+			getMultiple() {
+				if (this.form.chuJuBaoGaoYaoQiu == '特急') {
+					this.form.zongJia = this.total * 1.5
+				} else if (this.form.chuJuBaoGaoYaoQiu == '加急') {
+					this.form.zongJia = this.total * 1.2
+				} else {
+					this.form.zongJia = this.total * 1
+				}
 			},
 
 
@@ -667,7 +755,7 @@
 				let lists = that.form.lhypb[this.listIndex]
 
 				if (this.listType == 'state') {
-					lists.yangBenZhuangTai = this.list[e].text
+					lists.yangPinZhuangTai = this.list[e].text
 				}
 
 				//1
@@ -724,11 +812,22 @@
 			},
 
 			//提交
-			sumbit() {
-				uni.showLoading({
-					mask: true,
-					title: '加载中'
-				});
+			sumbit(valueType) {
+				if (valueType != 'beingTime') {
+					if (this.form.lhypb.length == 0) {
+						uni.showToast({
+							title: '请填写该委托单需要检测的样品信息',
+							icon: 'none',
+							duration: 2000
+						})
+						return
+					}
+					uni.showLoading({
+						mask: true,
+						title: '加载中'
+					});
+				}
+
 				let para = {
 					"parameters": [{
 							"key": "defId",
@@ -750,7 +849,10 @@
 				this.form.bianZhiShiJian = this.time
 				this.form.bianZhiBuMen = this.orgId
 				this.form.weiTuoZhuangTai = '已编制'
-				
+				this.form.fuKuanZhuangTai = '未结清'
+
+
+
 
 				this.form.lhypb.forEach((item, index) => {
 					item.jianCeList.forEach((it, x) => {
@@ -760,9 +862,18 @@
 					})
 					item.jianCeXiangMu = item.jianCeXiangMu2.join(",")
 				})
-				
+
+				if (valueType == 'beingTime') {
+					this.form.jianCeTypeList = this.jianCeTypeList
+					this.form.originalTotal = this.total
+					this.getBeingSave(this.form)
+					return
+				}
+
+
+				//驳回同意数据封装
 				var editData = {}
-				if(this.type == 'edit'){
+				if (this.type == 'edit' && valueType != 'beingTime') {
 					this.form.id = this.id
 					editData = {
 						data: JSON.stringify(this.form),
@@ -770,11 +881,13 @@
 						taskId: this.taskId
 					}
 				}
+				//end
 
 				para.parameters[2].value = JSON.stringify(this.form)
-				
+
+				//数据添加到展示表上
 				var lhwt = []
-				if(this.type != 'edit' && this.type != 'detail'){
+				if (this.type != 'edit' && this.type != 'detail') {
 					this.form.lhypb.forEach((item, index) => {
 						let bit = {
 							he_tong_bian_hao_: this.form.heTongId,
@@ -796,13 +909,11 @@
 
 				this.$refs.form.validate(valid => {
 					if (valid) {
-						if(this.type == 'edit'){
+						if (this.type == 'edit') {
 							this.getArgee(editData)
-						}else{
-							this.getSave(para,lhwt)
+						} else {
+							this.getSave(para, lhwt)
 						}
-						
-						
 					} else {
 						uni.showToast({
 							title: '必选项没有填写',
@@ -813,7 +924,8 @@
 					}
 				});
 			},
-			getSave(data,params){
+			//保存
+			getSave(data, params) {
 				let pp = {
 					paramWhere: [],
 					tableName: "t_lhwtzsb"
@@ -822,11 +934,11 @@
 				let dataPP = this.$sig(pp)
 				this.$http.post("/ibps/business/v3/sys/universal/addDataContextTable", dataPP).then(res => {
 					if (res.data.state == 200) {
-				
+
 					}
 				});
-				
-				
+
+
 				this.$http.post("ibps/business/v3/bpm/instance/start", data).then(res => {
 					if (res.data.state == 200) {
 						this.$tip.success('提交成功!')
@@ -842,7 +954,8 @@
 					}
 				});
 			},
-			getArgee(data){
+			//驳回同意数据请求
+			getArgee(data) {
 				this.$http.post("/ibps/business/v3/bpm/task/agree", data).then(res => {
 					if (res.data.state == 200) {
 						this.$tip.success('提交成功!')
@@ -858,6 +971,54 @@
 					}
 				});
 			},
+			getBeingSave(dataCom) {
+				uni.showModal({
+					title: '提示',
+					content: '是否把现有信息保存?',
+					success: res => {
+						if (res.confirm) {
+							let dataContent = JSON.stringify(dataCom)
+							let list = []
+							let obj = {
+								wei_tuo_dan_hao_: dataCom.weiTuoBianHao,
+								bao_cun_nei_rong_: dataContent,
+								dui_ying_shu_ju_b: 't_lhwtsqb',
+								bao_cun_biao_ti_: '委托单',
+								zhuang_tai_: '未完成',
+								bian_zhi_shi_jian: this.time,
+								bian_zhi_ren_: this.userid
+							}
+							list.push(obj)
+							const params2 = {
+								tableName: 't_mjsjdzcb',
+								paramWhere: list
+							}
+							let data = this.$sig(params2)
+
+							this.$http.post("ibps/business/v3/sys/universal/addDataContextTable", data)
+								.then(res => {
+									if (res.data.state == 200) {
+										uni.showToast({
+											title: '暂存成功',
+											icon: 'none',
+											duration: 2000
+										})
+
+									} else {
+										uni.showToast({
+											title: '暂存失败',
+											icon: 'none',
+											duration: 2000
+										})
+									}
+								});
+
+						} else if (res.cancel) {
+							console.log('用户点击取消');
+						}
+					}
+				});
+			},
 
 
 			//添加样品记录
@@ -880,7 +1041,7 @@
 						xingBie: '',
 						nianLing: '',
 						songJianPiHao: '',
-						yangBenZhuangTai: '',
+						yangPinZhuangTai: '',
 						songJianShiJian: '',
 
 						yangPinLeiXing: '',
@@ -960,7 +1121,7 @@
 						return data
 					}
 				}
-			
+
 			},
 			/**
 			 * 生成唯一id

+ 14 - 14
pages/jiance/order/meth.js

@@ -24,15 +24,15 @@ export default {
 		}
 		return form
 	},
-	getListForm(list,jianCeList){
+	getListForm(list, jianCeList) {
 		let TList = []
-		list.forEach((item,index)=>{
+		list.forEach((item, index) => {
 			let jian_ce_xiang_mu2_ = item.jian_ce_xiang_mu_.split(",")
 			let jiancLis = JSON.parse(JSON.stringify(jianCeList))
-			
-			jiancLis.forEach(it =>{
+
+			jiancLis.forEach(it => {
 				let jianSin = jian_ce_xiang_mu2_.findIndex(itg => itg == it.id_)
-				if(jianSin >= 0){
+				if (jianSin >= 0) {
 					it.checked = true
 				}
 			})
@@ -45,32 +45,32 @@ export default {
 				xingMing: item.xing_ming_,
 				xingBie: item.xing_bie_,
 				nianLing: item.nian_ling_,
-				songJianPiHao: item.song_jian_shi_jia,
-				yangBenZhuangTai: item.song_jian_pi_hao_,
+				songJianPiHao: item.song_jian_pi_hao_,
+				yangPinZhuangTai: item.yang_pin_zhuang_t,
 				songJianShiJian: item.song_jian_shi_jia,
-			
+
 				yangPinLeiXing: item.yang_pin_lei_xing,
 				yangBenYunShuTiao: item.yang_ben_yun_shu_,
 				shuLiang: parseInt(item.shu_liang_),
 				yangPinGuiGe: item.yang_pin_gui_ge_,
-			
+
 				yangPinLeiXingEr: item.yang_pin_lei_er_,
 				yangPinYunShuTiao: item.yang_pin_yun_shu_,
 				yangPinGuiGeEr: item.yang_pin_gui_ge_e,
 				shuLiangEr: parseInt(item.shu_liang_er_),
-			
+
 				yangPinLeiXingSan: item.yang_pin_lei_san_,
 				yangPinGuiGeSan: item.yang_pin_gui_ge_s,
 				shuLiangSan: parseInt(item.shu_liang_san_),
 				yangPinYunShuSan: item.yang_pin_yun_san,
-			
+
 				yangPinLeiXingSi: item.yang_pin_lei_si_,
 				yangPinGuiGeSi: item.yang_pin_gui_si_,
-				yangPinYunShuSi:item.yang_pin_yun_si_,
-				shuLiangSi:  parseInt(item.shu_liang_si_),
+				yangPinYunShuSi: item.yang_pin_yun_si_,
+				shuLiangSi: parseInt(item.shu_liang_si_),
 				jianCeList: jiancLis,
 				jianCeType: '',
-			
+
 				xiangMuMingCheng: item.xiang_mu_ming_che
 			}
 			TList.push(obj)

+ 16 - 10
pages/tag/sampleTag.vue

@@ -23,6 +23,10 @@
 								<view></view>
 							</view>
 						</view>
+						<view class="lh">
+							<view>样品类型:</view>
+							<view>{{item1.type}}</view>
+						</view>
 						<view class="lh">
 							<view>存储条件:</view>
 							<view>{{item1.condition}}</view>
@@ -37,14 +41,15 @@
 							<view>{{index2+1}}/{{item1.num}}支</view>
 						</view>
 						<view>
-							<vue-barcode :value="item1.serial" :width="2" :height="45"></vue-barcode>
+							<vue-barcode :value="item1.serial" :width="2" :height="40"></vue-barcode>
 						</view>
 					</view>
 				</view>
 			</view>
 		</view>
 
-		<u-button type="primary" class="btn" @click="getAction()" style="margin: 20rpx;" v-if="imgSrc != ''">操作</u-button>
+		<u-button type="primary" class="btn" @click="getAction()" style="margin: 20rpx;" v-if="imgSrc != ''">操作
+		</u-button>
 
 	</view>
 </template>
@@ -127,7 +132,7 @@
 									serial: item.yang_pin_bian_hao,
 									type: item.yang_pin_lei_san_,
 									num: item.shu_liang_san_,
-									condition: item.yang_pin_gui_ge_s
+									condition: item.yang_pin_yun_san
 								}
 								list.push(obj)
 							}
@@ -137,7 +142,7 @@
 									serial: item.yang_pin_bian_hao,
 									type: item.yang_pin_lei_si_,
 									num: item.shu_liang_si_,
-									condition: item.yang_pin_gui_si_
+									condition: item.yang_pin_yun_si_
 								}
 								list.push(obj)
 							}
@@ -145,10 +150,12 @@
 						})
 						this.list = list
 
-						this.$nextTick(() => {
+						if (list.length > 0) {
+							this.$nextTick(() => {
+								this.getBtn()
+							})
+						}
 
-							this.getBtn()
-						})
 					}
 				})
 			},
@@ -162,7 +169,7 @@
 					const dataURL = canvas.toDataURL()
 					this.imgSrc = dataURL
 					uni.showToast({
-						title:'标签图片已生成,可以保存或者下载',
+						title: '标签图片已生成,可以保存或者下载',
 						icon: 'none',
 						duration: 2000
 					})
@@ -183,8 +190,7 @@
 								break;
 						}
 					},
-					fail: function(res) {
-					}
+					fail: function(res) {}
 				});
 			},
 			downloadImage() {