Przeglądaj źródła

修改二维码

ZZJ 3 lat temu
rodzic
commit
046db936b1

+ 21 - 0
package-lock.json

@@ -76,6 +76,7 @@
         "vue-barcode": "^1.3.0",
         "vue-barcode": "^1.3.0",
         "vue-codemirror": "^4.0.6",
         "vue-codemirror": "^4.0.6",
         "vue-count-to": "^1.0.13",
         "vue-count-to": "^1.0.13",
+        "vue-easy-print": "^0.0.8",
         "vue-echarts": "^5.0.0-beta.0",
         "vue-echarts": "^5.0.0-beta.0",
         "vue-grid-layout": "^2.3.8",
         "vue-grid-layout": "^2.3.8",
         "vue-i18n": "^8.21.0",
         "vue-i18n": "^8.21.0",
@@ -20700,6 +20701,18 @@
       "resolved": "https://registry.npmjs.org/vue-count-to/-/vue-count-to-1.0.13.tgz",
       "resolved": "https://registry.npmjs.org/vue-count-to/-/vue-count-to-1.0.13.tgz",
       "integrity": "sha512-6R4OVBVNtQTlcbXu6SJ8ENR35M2/CdWt3Jmv57jOUM+1ojiFmjVGvZPH8DfHpMDSA+ITs+EW5V6qthADxeyYOQ=="
       "integrity": "sha512-6R4OVBVNtQTlcbXu6SJ8ENR35M2/CdWt3Jmv57jOUM+1ojiFmjVGvZPH8DfHpMDSA+ITs+EW5V6qthADxeyYOQ=="
     },
     },
+    "node_modules/vue-easy-print": {
+      "version": "0.0.8",
+      "resolved": "https://registry.npmmirror.com/vue-easy-print/-/vue-easy-print-0.0.8.tgz",
+      "integrity": "sha512-QF3CJvWkAWP8BSaxdIrmGASkkuNX3bDUXyWx7/rE8DGGShP20Ap2H0P1w5oKqgN7pJcHH8ZywdvhQk7ggp0Z4w==",
+      "dependencies": {
+        "vue": "^2.5.11"
+      },
+      "engines": {
+        "node": ">= 4.0.0",
+        "npm": ">= 3.0.0"
+      }
+    },
     "node_modules/vue-echarts": {
     "node_modules/vue-echarts": {
       "version": "5.0.0-beta.0",
       "version": "5.0.0-beta.0",
       "resolved": "https://registry.npmjs.org/vue-echarts/-/vue-echarts-5.0.0-beta.0.tgz",
       "resolved": "https://registry.npmjs.org/vue-echarts/-/vue-echarts-5.0.0-beta.0.tgz",
@@ -39094,6 +39107,14 @@
       "resolved": "https://registry.npmjs.org/vue-count-to/-/vue-count-to-1.0.13.tgz",
       "resolved": "https://registry.npmjs.org/vue-count-to/-/vue-count-to-1.0.13.tgz",
       "integrity": "sha512-6R4OVBVNtQTlcbXu6SJ8ENR35M2/CdWt3Jmv57jOUM+1ojiFmjVGvZPH8DfHpMDSA+ITs+EW5V6qthADxeyYOQ=="
       "integrity": "sha512-6R4OVBVNtQTlcbXu6SJ8ENR35M2/CdWt3Jmv57jOUM+1ojiFmjVGvZPH8DfHpMDSA+ITs+EW5V6qthADxeyYOQ=="
     },
     },
+    "vue-easy-print": {
+      "version": "0.0.8",
+      "resolved": "https://registry.npmmirror.com/vue-easy-print/-/vue-easy-print-0.0.8.tgz",
+      "integrity": "sha512-QF3CJvWkAWP8BSaxdIrmGASkkuNX3bDUXyWx7/rE8DGGShP20Ap2H0P1w5oKqgN7pJcHH8ZywdvhQk7ggp0Z4w==",
+      "requires": {
+        "vue": "^2.5.11"
+      }
+    },
     "vue-echarts": {
     "vue-echarts": {
       "version": "5.0.0-beta.0",
       "version": "5.0.0-beta.0",
       "resolved": "https://registry.npmjs.org/vue-echarts/-/vue-echarts-5.0.0-beta.0.tgz",
       "resolved": "https://registry.npmjs.org/vue-echarts/-/vue-echarts-5.0.0-beta.0.tgz",

+ 1 - 0
package.json

@@ -89,6 +89,7 @@
     "vue-barcode": "^1.3.0",
     "vue-barcode": "^1.3.0",
     "vue-codemirror": "^4.0.6",
     "vue-codemirror": "^4.0.6",
     "vue-count-to": "^1.0.13",
     "vue-count-to": "^1.0.13",
+    "vue-easy-print": "^0.0.8",
     "vue-echarts": "^5.0.0-beta.0",
     "vue-echarts": "^5.0.0-beta.0",
     "vue-grid-layout": "^2.3.8",
     "vue-grid-layout": "^2.3.8",
     "vue-i18n": "^8.21.0",
     "vue-i18n": "^8.21.0",

+ 8 - 0
src/business/platform/data/templaterender/templates/list.vue

@@ -243,6 +243,7 @@
     <Scan
     <Scan
     :currentScan = "scanName"
     :currentScan = "scanName"
     :scanVisible = "scanVisible"
     :scanVisible = "scanVisible"
+    :obj = "obj"
     v-if="scanVisible"
     v-if="scanVisible"
     @scanOff = "scanOff"
     @scanOff = "scanOff"
     />
     />
@@ -352,6 +353,7 @@ export default {
       defaultFormData: {},
       defaultFormData: {},
       scanVisible:false,
       scanVisible:false,
       scanName:'',
       scanName:'',
+      obj:'',
 
 
       initialization: false,
       initialization: false,
       tableHeight: document.body.clientHeight,
       tableHeight: document.body.clientHeight,
@@ -763,6 +765,12 @@ export default {
       this.scanVisible = true
       this.scanVisible = true
       this.scanName = val
       this.scanName = val
     },
     },
+    /*按钮传参*/
+    scanHandlerObj(val,obj){
+      this.scanVisible = true
+      this.scanName = val
+      this.obj = obj
+    },
     /* 返回关闭*/
     /* 返回关闭*/
     scanOff(val){
     scanOff(val){
       this.scanVisible = false
       this.scanVisible = false

+ 1 - 1
src/router/routes.js

@@ -188,7 +188,7 @@ const frameOut = [
 path: '/ziliao',
 path: '/ziliao',
 name: 'ziliao',
 name: 'ziliao',
 meta: {
 meta: {
- //title: ' '
+ title: ' 罗湖实验室管理平台'
 },
 },
 //component: _import('/system/ziliao'),
 //component: _import('/system/ziliao'),
 component: _import('/component/ziliao'),
 component: _import('/component/ziliao'),

+ 0 - 245
src/views/system/jbdScan/SampleTag.vue

@@ -1,245 +0,0 @@
-
-<template>
-<div></div>
-	<!-- <div class="bg">
-		<div ref="qrcode" id="box">
-			<div v-for="(item1,index1) in list" :key="index1">
-				<div v-for="(item2,index2) in parseInt(item1.num)" :key="index2">
-					<div class="tagBox">
-						<div class="lh">
-							<div>样品名称:</div>
-							<div>{{item1.name}}</div>
-						</div>
-						<div class="la">
-							<div class="lh">
-								<div>样品编号:</div>
-								<div>{{item1.serial}}</div>
-							</div>
-							<div class="lh" style="margin-left: 15rpx">
-								<div>收样时间:</div>
-								<div></div>
-							</div>
-						</div>
-						<div class="lh">
-							<div>样品类型:</div>
-							<div>{{item1.type}}</div>
-						</div>
-						<div class="lh">
-							<div>存储条件:</div>
-							<div>{{item1.condition}}</div>
-						</div>
-
-						<div class="lh">
-							<div>流转状态:</div>
-							<div>▢待检,▢已检,▢留样</div>
-						</div>
-						<div class="lh">
-							<div>样品数量:</div>
-							<div>{{index2+1}}/{{item1.num}}支</div>
-						</div>
-						<div>
-							<vue-barcode :value="item1.serial" :width="2" :height="40"></vue-barcode>
-						</div>
-					</div>
-				</div>
-			</div>
-		</div>
-
-	</div> -->
-</template>
-
-<script>
-	// import html2canvas from "html2canvas";
-	// import VueBarcode from 'vue-barcode';
-
-	// export default {
-	// 	components: {
-	// 		VueBarcode
-	// 	},
-	// 	data() {
-	// 		return {
-	// 			value: '',
-	// 			id: '',
-	// 			list: [],
-	// 			imgSrc: '',
-	// 			userid: '',
-	// 			time: ''
-	// 		}
-	// 	},
-	// 	created() {
-	// 		this.getInit()
-	// 	},
-	// 	onLoad(options) {
-	// 		if (options.id) {
-	// 			this.id = options.id
-	// 			this.getLook(options.id)
-	// 		}
-	// 	},
-	// 	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
-	// 		},
-	// 		getLook(id) {
-	// 			let sql =
-	// 				`select * from t_lhypb where parent_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
-	// 					let list = []
-	// 					data.forEach(item => {
-	// 						if (item.yang_pin_lei_xing != '' && parseInt(item.shu_liang_) > 0) {
-	// 							let obj = {
-	// 								name: item.yang_pin_ming_che,
-	// 								serial: item.yang_pin_bian_hao,
-	// 								type: item.yang_pin_lei_xing,
-	// 								num: item.shu_liang_,
-	// 								condition: item.yang_ben_yun_shu_
-	// 							}
-	// 							list.push(obj)
-	// 						}
-	// 						if (item.yang_pin_lei_er_ != '' && parseInt(item.shu_liang_er_) > 0) {
-	// 							let obj = {
-	// 								name: item.yang_pin_ming_che,
-	// 								serial: item.yang_pin_bian_hao,
-	// 								type: item.yang_pin_lei_er_,
-	// 								num: item.shu_liang_er_,
-	// 								condition: item.yang_pin_yun_shu_
-	// 							}
-	// 							list.push(obj)
-	// 						}
-	// 						if (item.yang_pin_lei_san_ != '' && parseInt(item.shu_liang_san_) > 0) {
-	// 							let obj = {
-	// 								name: item.yang_pin_ming_che,
-	// 								serial: item.yang_pin_bian_hao,
-	// 								type: item.yang_pin_lei_san_,
-	// 								num: item.shu_liang_san_,
-	// 								condition: item.yang_pin_yun_san
-	// 							}
-	// 							list.push(obj)
-	// 						}
-	// 						if (item.yang_pin_lei_si_ != '' && parseInt(item.shu_liang_si_) > 0) {
-	// 							let obj = {
-	// 								name: item.yang_pin_ming_che,
-	// 								serial: item.yang_pin_bian_hao,
-	// 								type: item.yang_pin_lei_si_,
-	// 								num: item.shu_liang_si_,
-	// 								condition: item.yang_pin_yun_si_
-	// 							}
-	// 							list.push(obj)
-	// 						}
-
-	// 					})
-	// 					this.list = list
-
-	// 					if (list.length > 0) {
-	// 						this.$nextTick(() => {
-	// 							this.getBtn()
-	// 						})
-	// 					}
-
-	// 				}
-	// 			})
-	// 		},
-	// 		getBtn() {
-	// 			// document.getElementById("qrcode").appendChild(canvas);
-	// 			//点击生成canvas转换成base64的图片
-	// 			var width = document.getElementById('box').offsetWidth,
-	// 				height = document.getElementById('box').offsetHeight,
-	// 				scale = window.devicePixelRatio; //放大倍数
-	// 			html2canvas(document.getElementById('box'), {}).then(canvas => {
-	// 				const dataURL = canvas.toDataURL()
-	// 				this.imgSrc = dataURL
-	// 				uni.showToast({
-	// 					title: '标签图片已生成,可以保存或者下载',
-	// 					icon: 'none',
-	// 					duration: 2000
-	// 				})
-
-	// 			});
-	// 		},
-	// 		downloadImage() {
-	// 			// const dataURL = canvas.toDataURL('image/png')
-	// 			const creatDom = document.createElement('a')
-	// 			document.body.appendChild(creatDom)
-	// 			creatDom.href = this.imgSrc
-	// 			creatDom.download = this.time + '样品标签图片'
-	// 			creatDom.click()
-	// 		},
-	// 		getSave() {
-	// 			let pp = {
-	// 				paramWhere: [{
-	// 					id_: this.id
-	// 				}],
-	// 				tableName: "t_lhwtsqb",
-	// 				paramCond: {
-	// 					biao_qian_tu_pian: this.imgSrc,
-	// 					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>
-	.bg {
-
-		// height: auto;
-	}
-
-	.tagBox {
-		width: 700rpx;
-		height: 420rpx;
-		border: 1rpx solid #000000;
-		padding: 20rpx;
-		display: flex;
-		justify-content: space-around;
-		flex-direction: column;
-		margin: 20rpx auto;
-		border-radius: 15rpx;
-		background-color: #fff;
-	}
-
-	.la {
-		display: flex;
-		align-items: center;
-	}
-
-	.lh {
-		// line-height: auto;
-		font-size: 28rpx;
-		display: flex;
-		align-items: center;
-
-	}
-</style>

+ 6 - 6
src/views/system/jbdScan/goods/sampleConfirmation.vue

@@ -182,11 +182,11 @@
                              width="200px"
                              width="200px"
                              >
                              >
                               <template slot-scope="scope">
                               <template slot-scope="scope">
-                                <ibps-link-data
+                                <!-- <ibps-link-data
                                   v-model="scope.row.shou_yang_wei_zhi"
                                   v-model="scope.row.shou_yang_wei_zhi"
                                   template-key = "lhypwzztzly"
                                   template-key = "lhypwzztzly"
-                                />
-                                <!-- <weizhiData  v-model="scope.row.shou_yang_wei_zhi"/> -->
+                                /> -->
+                                <weizhiData  v-model="scope.row.shou_yang_wei_zhi"/>
                                </template>
                                </template>
                            </el-table-column>
                            </el-table-column>
                          
                          
@@ -194,11 +194,11 @@
                              label="留样存放位置"
                              label="留样存放位置"
                              width="200px">
                              width="200px">
                               <template slot-scope="scope">
                               <template slot-scope="scope">
-                                <ibps-link-data
+                               <!-- <ibps-link-data
                                   v-model="scope.row.liu_yang_wei_zhi_"
                                   v-model="scope.row.liu_yang_wei_zhi_"
                                   template-key = "lhypwzztzly"
                                   template-key = "lhypwzztzly"
-                                />
-                                <!-- <liuyangData v-model="scope.row.liu_yang_wei_zhi_"/> -->
+                                /> -->
+                                <liuyangData v-model="scope.row.liu_yang_wei_zhi_"/>
                                </template>
                                </template>
                          
                          
                            </el-table-column>
                            </el-table-column>

+ 193 - 0
src/views/system/jbdScan/goods/tag.vue

@@ -0,0 +1,193 @@
+<template>
+	<div class="bg">
+    <el-dialog
+               width="30%"
+               :modal-append-to-body='false'
+               title="样品标签"
+               @close="closeDialog"
+               :before-close = "handleClose"
+               :visible.sync="visible"> <!-- 表单是否显示 -->
+               <div ref="qrcode" id="box">
+
+                <button @click="printDemo">打印标签</button>
+                <vue-easy-print tableShow ref="easyPrint" >
+                    <div v-for="(item1,index1) in list" :key="index1">
+                    <div v-for="(item2,index2) in parseInt(item1.num)" :key="index2">
+                      <div class="tagBox">
+                        <div class="lh">
+                          <div>样品名称:</div>
+                          <div>{{item1.name}}</div>
+                        </div>
+                        <div class="la">
+                          <div class="lh">
+                            <div>样品编号:</div>
+                            <div>{{item1.serial}}</div>
+                          </div>
+                          <div class="lh" style="margin-left: 15px">
+                            <div>收样时间:</div>
+                            <div></div>
+                          </div>
+                        </div>
+                        <div class="lh">
+                          <div>样品类型:</div>
+                          <div>{{item1.type}}</div>
+                        </div>
+                        <div class="lh">
+                          <div>存储条件:</div>
+                          <div>{{item1.condition}}</div>
+                        </div>
+
+                        <div class="lh">
+                          <div>流转状态:</div>
+                          <div>▢待检,▢已检,▢留样</div>
+                        </div>
+                        <div class="lh">
+                          <div>样品数量:</div>
+                          <div>{{index2+1}}/{{item1.num}}支</div>
+                        </div>
+                        <div>
+                          <vue-barcode :value="item1.serial" :width="2" :height="40"></vue-barcode>
+                        </div>
+                      </div>
+                    </div>
+                  </div>
+                </vue-easy-print>
+		</div>
+
+               </el-dialog>
+		
+
+	</div>
+</template>
+
+<script>
+	// import html2canvas from "html2canvas";
+	import VueBarcode from 'vue-barcode';
+  import vueEasyPrint from "vue-easy-print";
+  import repostCurd from '@/business/platform/form/utils/custom/joinCURD.js';
+
+	export default {
+		components: {
+			VueBarcode,
+      vueEasyPrint,
+		},
+		data() {
+			return {
+				value: '',
+				id: '',
+				list: [{
+                  name: 5,
+									serial: 5,
+									type: 5,
+									num: 5,
+									condition: 5
+        }],
+        visible: true
+			}
+		},
+		created() {
+			this.getInit()
+		},
+		methods: {
+      printDemo(){
+        this.$refs.easyPrint.print()
+      },
+			getInit() {
+        console.log(1,this)
+				this.getLook("1045277568393019392")
+        console.log(2)
+			},
+			getLook(id) {
+        console.log(id)
+				let sql =`select * from t_lhypb where find_in_set(parent_id_,'${id}')`
+				console.log(this)
+				repostCurd("sql", sql).then(res => {
+        // console.log(res)
+					if (res.state === 200) {
+						const data = res.variables.data
+            console.log(data)
+						let list = []
+						data.forEach(item => {
+							if (item.yang_pin_lei_xing != '' && parseInt(item.shu_liang_) > 0) {
+								let obj = {
+									name: item.yang_pin_ming_che,
+									serial: item.yang_pin_bian_hao,
+									type: item.yang_pin_lei_xing,
+									num: item.shu_liang_,
+									condition: item.yang_ben_yun_shu_
+								}
+								list.push(obj)
+							}
+							if (item.yang_pin_lei_er_ != '' && parseInt(item.shu_liang_er_) > 0) {
+								let obj = {
+									name: item.yang_pin_ming_che,
+									serial: item.yang_pin_bian_hao,
+									type: item.yang_pin_lei_er_,
+									num: item.shu_liang_er_,
+									condition: item.yang_pin_yun_shu_
+								}
+								list.push(obj)
+							}
+							if (item.yang_pin_lei_san_ != '' && parseInt(item.shu_liang_san_) > 0) {
+								let obj = {
+									name: item.yang_pin_ming_che,
+									serial: item.yang_pin_bian_hao,
+									type: item.yang_pin_lei_san_,
+									num: item.shu_liang_san_,
+									condition: item.yang_pin_yun_san
+								}
+								list.push(obj)
+							}
+							if (item.yang_pin_lei_si_ != '' && parseInt(item.shu_liang_si_) > 0) {
+								let obj = {
+									name: item.yang_pin_ming_che,
+									serial: item.yang_pin_bian_hao,
+									type: item.yang_pin_lei_si_,
+									num: item.shu_liang_si_,
+									condition: item.yang_pin_yun_si_
+								}
+								list.push(obj)
+							}
+
+						})
+						this.list = list
+
+					}
+				})
+			}
+		}
+	}
+</script>
+
+<style lang="scss" scoped>
+	.bg {
+
+		// height: auto;
+	}
+
+	.tagBox {
+		width: 300px;
+		height: 180px;
+		border: 1px solid #000000;
+		padding: 20px;
+		display: flex;
+		justify-content: space-around;
+		flex-direction: column;
+		margin: 20px auto;
+		border-radius: 15px;
+		background-color: #fff;
+	}
+
+	.la {
+		display: flex;
+		align-items: center;
+	}
+
+	.lh {
+		// line-height: auto;
+		font-size: 16px;
+		display: flex;
+		align-items: center;
+
+	}
+</style>

+ 112 - 161
src/views/system/jbdScan/js/manualConfirmationJS.js

@@ -30,6 +30,7 @@ export default {
           for (let i in res.variables.data) {
           for (let i in res.variables.data) {
             res.variables.data[i].jie_yang_shu_lian = 1
             res.variables.data[i].jie_yang_shu_lian = 1
             res.variables.data[i].jie_yang_zhuang_t = '未确认'
             res.variables.data[i].jie_yang_zhuang_t = '未确认'
+            res.variables.data[i].biao_zhi_uuid_ = this.uuid()
             this.listData.push(res.variables.data[i])
             this.listData.push(res.variables.data[i])
           }
           }
         }
         }
@@ -77,7 +78,6 @@ export default {
           let dWhere = []
           let dWhere = []
           let ypbh = []
           let ypbh = []
           let cfwzIdList = [] // 放置 存放位置的ID
           let cfwzIdList = [] // 放置 存放位置的ID
-          let uuidList = [] // 列表的UUID
 
 
           // let ypIdList = [] // 样品id列表,格式转好的
           // let ypIdList = [] // 样品id列表,格式转好的
           // let ypWeiZhi = [] // 样品收样位置
           // let ypWeiZhi = [] // 样品收样位置
@@ -101,12 +101,15 @@ export default {
           let lhypbWJ = []
           let lhypbWJ = []
           // 罗湖委托表主键
           // 罗湖委托表主键
           let lhwtbID = []
           let lhwtbID = []
+          let lhwtbOnlyId = []
           // 罗湖委托表展示表ID
           // 罗湖委托表展示表ID
           let lhwtzsbID = []
           let lhwtzsbID = []
           // 罗湖样品id列表
           // 罗湖样品id列表
           let lhypIdList = []
           let lhypIdList = []
           // 罗湖样品id格式列表
           // 罗湖样品id格式列表
           let lhypIdNewList = []
           let lhypIdNewList = []
+          let uuidList = [] // 列表的UUID
+
 
 
           for (let yp in ypInfoList) { //样品数据
           for (let yp in ypInfoList) { //样品数据
             let cfwz = ''
             let cfwz = ''
@@ -121,6 +124,7 @@ export default {
               this_.$message.error('操作失败,[' + ypInfoList[yp].yang_pin_ming_che + '] 接收确认数量不得大于收样数量。')
               this_.$message.error('操作失败,[' + ypInfoList[yp].yang_pin_ming_che + '] 接收确认数量不得大于收样数量。')
               return;
               return;
             }
             }
+
             if (ypInfoList[yp].jie_yang_zhuang_t == '未确认') {
             if (ypInfoList[yp].jie_yang_zhuang_t == '未确认') {
               this_.$message.error('操作失败,[' + ypInfoList[yp].yang_pin_ming_che + '] 接收确认状态必须为已确认。')
               this_.$message.error('操作失败,[' + ypInfoList[yp].yang_pin_ming_che + '] 接收确认状态必须为已确认。')
               return;
               return;
@@ -134,7 +138,7 @@ export default {
               return;
               return;
             }
             }
 
 
-            if (ypInfoList[yp].bao_gao_bian_zhi_ == undefined || ypInfoList[yp].bao_gao_bian_zhi_ == '') {
+           if (ypInfoList[yp].bao_gao_bian_zhi_ == undefined || ypInfoList[yp].bao_gao_bian_zhi_ == '') {
               this_.$message.error('操作失败,[' + ypInfoList[yp].yang_pin_ming_che + '] 报告编制员不能为空!')
               this_.$message.error('操作失败,[' + ypInfoList[yp].yang_pin_ming_che + '] 报告编制员不能为空!')
               return;
               return;
             }
             }
@@ -172,19 +176,7 @@ export default {
                 this_.$message.error("留样时必须填写销毁日期!")
                 this_.$message.error("留样时必须填写销毁日期!")
                 return;
                 return;
               }
               }
-              // let isLy = ypInfoList[yp].liu_yang_wei_zhi_
-              // // console.log(isLy, "留样");
-              // if (isLy.substr(-2, isLy.length - 1) == "占用" || isLy.substr(-2, isLy.length - 1) == "空余") { //?
-              //   let sql = "select 'id' from MJ_yp_position_status where positionAndStatus = '" + isLy + "' limit 1"
-              //   repostCurd('sql', sql).then(response => {
-              //     cfwz = response.variables.data[0].id
-              //     ypInfoList[yp].liu_yang_wei_zhi_ = cfwz
-              //     // console.log(ypInfoList)
-              //     console.log('?question time留样')
-              //   })
-              // } else {
                 cfwz = ypInfoList[yp].liu_yang_wei_zhi_
                 cfwz = ypInfoList[yp].liu_yang_wei_zhi_
-              // }
 
 
             } else {
             } else {
               if (ypInfoList[yp].shou_yang_wei_zhi == null || ypInfoList[yp].shou_yang_wei_zhi == '') {
               if (ypInfoList[yp].shou_yang_wei_zhi == null || ypInfoList[yp].shou_yang_wei_zhi == '') {
@@ -195,21 +187,11 @@ export default {
                 this_.$message.error("你正常收样的话,就不要选择留样存放位置!")
                 this_.$message.error("你正常收样的话,就不要选择留样存放位置!")
                 return;
                 return;
               }
               }
-              // let isZC = ypInfoList[yp].shou_yang_wei_zhi
-              // if (isZC.substr(-2, isZC.length - 1) == "占用" || isZC.substr(-2, isZC.length - 1) == "空余") { //?
-              //   let sql1 = "select `id` from MJ_yp_position_status where positionAndStatus = '" + isZC + "' limit 1"
-              //   // console.log(sql1)
-              //   repostCurd('sql', sql1).then(response => {
-              //     // console.log(response.variables)
-              //     cfwz = response.variables.data[0].id
-              //     ypInfoList[yp].shou_yang_wei_zhi = cfwz //查询位置状态表 取值位置的id
-              //     console.log('?question time')
-              //   })
-              // } else {
                 cfwz = ypInfoList[yp].shou_yang_wei_zhi //取位置信息
                 cfwz = ypInfoList[yp].shou_yang_wei_zhi //取位置信息
-              // }
             }
             }
-            uuidList.push(ypInfoList[yp].biao_zhi_uuid_)
+
+
+            // uuidList.push(ypInfoList[yp].biao_zhi_uuid_)
             // ypIdList.push('{"id_":"' + ypInfoList[yp].id_ + '"}')
             // ypIdList.push('{"id_":"' + ypInfoList[yp].id_ + '"}')
             // ypWeiZhi.push(ypInfoList[yp].shou_yang_wei_zhi) // 收样存放位置
             // ypWeiZhi.push(ypInfoList[yp].shou_yang_wei_zhi) // 收样存放位置
             // ypLiuYangWeiZhi.push(ypInfoList[yp].liu_yang_wei_zhi_) // 留样存放位置
             // ypLiuYangWeiZhi.push(ypInfoList[yp].liu_yang_wei_zhi_) // 留样存放位置
@@ -227,7 +209,7 @@ export default {
             lhypbWJ.push( ypInfoList[yp].parent_id_ )
             lhypbWJ.push( ypInfoList[yp].parent_id_ )
             lhypIdList.push( ypInfoList[yp].id_ )
             lhypIdList.push( ypInfoList[yp].id_ )
             lhypIdNewList.push('{"id_":"' + ypInfoList[yp].id_ + '"}')
             lhypIdNewList.push('{"id_":"' + ypInfoList[yp].id_ + '"}')
-
+            uuidList.push(ypInfoList[yp].biao_zhi_uuid_)
             ypbh.push(ypInfoList[yp].yang_pin_bian_hao)
             ypbh.push(ypInfoList[yp].yang_pin_bian_hao)
           }
           }
 
 
@@ -236,21 +218,20 @@ export default {
         */
         */
          let value = ''
          let value = ''
          let lhypIdStr = ''
          let lhypIdStr = ''
-         console.log('lhypbWJ :',lhypbWJ)
-         console.log('lhypIdList :',lhypIdList)
+         // console.log('lhypbWJ :',lhypbWJ)
+         // console.log('lhypIdList :',lhypIdList)
          for(let i =0;i<lhypbWJ.length; i++){
          for(let i =0;i<lhypbWJ.length; i++){
            value += lhypbWJ[i] + ','
            value += lhypbWJ[i] + ','
          }
          }
          value = value.substring(0,value.length-1)
          value = value.substring(0,value.length-1)
          value = value.replace(/,/g,"','")
          value = value.replace(/,/g,"','")
-         console.log('value :',value)
          for(let i = 0; i<lhypIdList.length;i++){
          for(let i = 0; i<lhypIdList.length;i++){
            lhypIdStr += lhypIdList[i] + ','
            lhypIdStr += lhypIdList[i] + ','
          }
          }
          lhypIdStr = lhypIdStr.substring(0,lhypIdStr.length-1)
          lhypIdStr = lhypIdStr.substring(0,lhypIdStr.length-1)
          lhypIdStr = lhypIdStr.replace(/,/g,"','")
          lhypIdStr = lhypIdStr.replace(/,/g,"','")
 
 
-         console.log('lhypIdStr :',lhypIdStr)
+         // console.log('lhypIdStr :',lhypIdStr)
          let wtdAndYpb = []
          let wtdAndYpb = []
         // a.bao_gao_bian_zhi_,a.bao_gao_fu_he_yua,
         // a.bao_gao_bian_zhi_,a.bao_gao_fu_he_yua,
          let allSQL = `select a.id_ as wtID,a.zhan_shi_biao_id_,a.wei_tuo_lei_xing_,a.he_tong_id_,a.bao_gao_lei_xing_,a.wei_tuo_bian_hao_, a.wei_tuo_dan_wei_, a.wei_tuo_fang_lian, a.wei_tuo_lian,a.bao_gao_bian_zhi_,a.bao_gao_fu_he_yua,b.* from t_lhwtsqb a inner join t_lhypb b on a.id_ = b.parent_id_ where b.parent_id_ in ('${value}')and b.id_ in ('${lhypIdStr}')`
          let allSQL = `select a.id_ as wtID,a.zhan_shi_biao_id_,a.wei_tuo_lei_xing_,a.he_tong_id_,a.bao_gao_lei_xing_,a.wei_tuo_bian_hao_, a.wei_tuo_dan_wei_, a.wei_tuo_fang_lian, a.wei_tuo_lian,a.bao_gao_bian_zhi_,a.bao_gao_fu_he_yua,b.* from t_lhwtsqb a inner join t_lhypb b on a.id_ = b.parent_id_ where b.parent_id_ in ('${value}')and b.id_ in ('${lhypIdStr}')`
@@ -259,12 +240,12 @@ export default {
               /* 封装样品登记表对象  */
               /* 封装样品登记表对象  */
               let ypdjb = []
               let ypdjb = []
               let res = res1.variables.data
               let res = res1.variables.data
-              console.log('res ! ',res)
-              // wtdAndYpb.push(res)
+              // console.log('res ! ',res)
               wtdAndYpb = res
               wtdAndYpb = res
 
 
               for(let i = 0; i<res.length; i++){
               for(let i = 0; i<res.length; i++){
               lhwtbID.push('{"id_":"' + res[i].wtID + '"}')
               lhwtbID.push('{"id_":"' + res[i].wtID + '"}')
+              lhwtbOnlyId.push(res[i].wtID)
               lhwtzsbID.push('{"shen_qing_id_":"' + res[i].zhan_shi_biao_id_ + '"}')
               lhwtzsbID.push('{"shen_qing_id_":"' + res[i].zhan_shi_biao_id_ + '"}')
                   let count = 0;
                   let count = 0;
                   if(res[i].yang_pin_lei_xing != ''  && res[i].yang_pin_lei_xing != undefined){
                   if(res[i].yang_pin_lei_xing != ''  && res[i].yang_pin_lei_xing != undefined){
@@ -300,7 +281,6 @@ export default {
                     obj["yun_shu_tiao_jian"] =    x==0? res[i].yang_ben_yun_shu_ : x==1? res[i].yang_pin_yun_shu_ : x==2? res[i].yang_pin_yun_san : x==3? res[i].yang_pin_yun_si_ :''
                     obj["yun_shu_tiao_jian"] =    x==0? res[i].yang_ben_yun_shu_ : x==1? res[i].yang_pin_yun_shu_ : x==2? res[i].yang_pin_yun_san : x==3? res[i].yang_pin_yun_si_ :''
                     obj["yang_pin_shu_lian"] =    x==0? res[i].shu_liang_ : x==1? res[i].shu_liang_er_ : x==2? res[i].shu_liang_san_ : x==3? res[i].shu_liang_si_ :''
                     obj["yang_pin_shu_lian"] =    x==0? res[i].shu_liang_ : x==1? res[i].shu_liang_er_ : x==2? res[i].shu_liang_san_ : x==3? res[i].shu_liang_si_ :''
                     obj["yang_ben_gui_ge_s"] =    x==0? res[i].yang_pin_gui_ge_ : x==1? res[i].yang_pin_gui_ge_e : x==2? res[i].yang_pin_gui_ge_s : x==3? res[i].yang_pin_gui_si_ :''
                     obj["yang_ben_gui_ge_s"] =    x==0? res[i].yang_pin_gui_ge_ : x==1? res[i].yang_pin_gui_ge_e : x==2? res[i].yang_pin_gui_ge_s : x==3? res[i].yang_pin_gui_si_ :''
-                    // console.log('nnd ',ypInfoList[i])
                     obj["yan_shou_jie_guo_"] =      ypInfoList[i].yan_shou_jie_guo_
                     obj["yan_shou_jie_guo_"] =      ypInfoList[i].yan_shou_jie_guo_
                     obj["cun_fang_wei_zhi_"] =       ypInfoList[i].shou_yang_wei_zhi
                     obj["cun_fang_wei_zhi_"] =       ypInfoList[i].shou_yang_wei_zhi
                     obj["liu_zhuan_zhuang_"] =       '待检'
                     obj["liu_zhuan_zhuang_"] =       '待检'
@@ -316,17 +296,23 @@ export default {
                     obj["xiao_hui_ri_qi_"]    =         ypInfoList[i].xiao_hui_ri_qi_
                     obj["xiao_hui_ri_qi_"]    =         ypInfoList[i].xiao_hui_ri_qi_
                     obj["fan_yang_ri_qi_"]    =         ypInfoList[i].fan_yang_ri_qi_
                     obj["fan_yang_ri_qi_"]    =         ypInfoList[i].fan_yang_ri_qi_
                     obj["fan_yang_jyr"]       =       ypInfoList[i].fan_yang_jyr
                     obj["fan_yang_jyr"]       =       ypInfoList[i].fan_yang_jyr
+                    obj["biao_zhi_uuid_"]       =       ypInfoList[i].biao_zhi_uuid_
                     changeWeiZhi = ypInfoList[i].shou_yang_wei_zhi ==''?'':ypInfoList[i].shou_yang_wei_zhi
                     changeWeiZhi = ypInfoList[i].shou_yang_wei_zhi ==''?'':ypInfoList[i].shou_yang_wei_zhi
                     changesyWeiZhi = ypInfoList[i].liu_yang_cun_fang ==''?'':ypInfoList[i].liu_yang_cun_fang
                     changesyWeiZhi = ypInfoList[i].liu_yang_cun_fang ==''?'':ypInfoList[i].liu_yang_cun_fang
                     ypdjb.push(obj)
                     ypdjb.push(obj)
                   }
                   }
               }
               }
+              let fbbIdStr = ''
+              for(let i =0;i<lhwtbOnlyId.length; i++){
+                fbbIdStr += lhwtbOnlyId[i] + ','
+              }
+              fbbIdStr = fbbIdStr.substring(0,fbbIdStr.length-1)
+              // fbbIdStr = fbbIdStr.replace(/,/g,"','")
+              // console.log('fbbIdStr :',fbbIdStr)
               // console.log('进入样品登记表...',ypdjb)
               // console.log('进入样品登记表...',ypdjb)
               repostCurd('add', '{"tableName":"t_lhypdjb","paramWhere":' + JSON.stringify(ypdjb) + '}')
               repostCurd('add', '{"tableName":"t_lhypdjb","paramWhere":' + JSON.stringify(ypdjb) + '}')
               repostCurd('updates', '{"tableName":"t_lhypb","paramWhere":[' + lhypIdNewList + '],"paramCond":{"jie_yang_zhuang_t":"已接收"}}')
               repostCurd('updates', '{"tableName":"t_lhypb","paramWhere":[' + lhypIdNewList + '],"paramCond":{"jie_yang_zhuang_t":"已接收"}}')
 
 
-              console.log('接下来样品列表:',ypInfoList)
-              console.log('委托单:',res)
               /*
               /*
                 更新委托单 如果本来没值,就更新 报告编制人和 报告审核员 否则更新
                 更新委托单 如果本来没值,就更新 报告编制人和 报告审核员 否则更新
                 委托单数组 和 样品数组 数量相同,遍历两者 判断委托单是否有编制人,审核员?
                 委托单数组 和 样品数组 数量相同,遍历两者 判断委托单是否有编制人,审核员?
@@ -335,9 +321,6 @@ export default {
               // let finalWtdIdList = []
               // let finalWtdIdList = []
               for(var index = 0; index < ypInfoList.length; index++){
               for(var index = 0; index < ypInfoList.length; index++){
                 if(res[index].bao_gao_bian_zhi_  == '' || res[index].bao_gao_fu_he_yua  == ''){
                 if(res[index].bao_gao_bian_zhi_  == '' || res[index].bao_gao_fu_he_yua  == ''){
-                  // console.log('{"id_":"' + res[index].id_ + '"}')
-                  // console.log(ypInfoList[index].bao_gao_bian_zhi_)
-                  // console.log(ypInfoList[index].bao_gao_shen_he_y)
                  repostCurd('update','{"tableName":"t_lhwtsqb","paramWhere":' + '{"id_":"' + res[index].wtID + '"}' + ',"paramCond":' + '{"bao_gao_bian_zhi_":"'+ypInfoList[index].bao_gao_bian_zhi_+'","bao_gao_fu_he_yua":"' +  ypInfoList[index].bao_gao_shen_he_y + '"}}')
                  repostCurd('update','{"tableName":"t_lhwtsqb","paramWhere":' + '{"id_":"' + res[index].wtID + '"}' + ',"paramCond":' + '{"bao_gao_bian_zhi_":"'+ypInfoList[index].bao_gao_bian_zhi_+'","bao_gao_fu_he_yua":"' +  ypInfoList[index].bao_gao_shen_he_y + '"}}')
               }
               }
             }
             }
@@ -353,10 +336,7 @@ export default {
                       }
                       }
                    }
                    }
                    console.log('finalWtdIdList',finalWtdIdList)
                    console.log('finalWtdIdList',finalWtdIdList)
-               }) */
-
-
-             /*
+               })
                  3、任务分配     【2022/11/23 取消 直接 批量开检测子流程】
                  3、任务分配     【2022/11/23 取消 直接 批量开检测子流程】
                  3-1、根据 wtdAndYpb 的 wtID 更改委托表的 委托状态 wei_tuo_zhuang_ta 变成 已完成
                  3-1、根据 wtdAndYpb 的 wtID 更改委托表的 委托状态 wei_tuo_zhuang_ta 变成 已完成
                  3-2、根据每个样品对应的检测项目,开启一个或多个任务 / 遍历样品表开任务分配流程,一个样品可能对应多个检测
                  3-2、根据每个样品对应的检测项目,开启一个或多个任务 / 遍历样品表开任务分配流程,一个样品可能对应多个检测
@@ -434,88 +414,12 @@ export default {
                  3-2、根据每个样品对应的检测项目,开启一个或多个任务 / 遍历样品表开检测子流程,一个样品可能对应多个检测
                  3-2、根据每个样品对应的检测项目,开启一个或多个任务 / 遍历样品表开检测子流程,一个样品可能对应多个检测
                  3-3、委托表找zhan_shi_biao_id_ 修改  t_lhwtzsb "zhuang_tai_"为"待环境监控"
                  3-3、委托表找zhan_shi_biao_id_ 修改  t_lhwtzsb "zhuang_tai_"为"待环境监控"
                */
                */
-              
-               let fbbIndex = 0;
-               repostCurd('updates', '{"tableName":"t_lhwtsqb","paramWhere":[' + lhwtbID + '],"paramCond":{"wei_tuo_zhuang_ta":"已完成"}}')
-               if(wtdAndYpb.length>0){
-                  for(var i in wtdAndYpb){
-                    let strs = wtdAndYpb[i].jian_ce_xiang_mu_.split(',')
-                        for(var l in strs){
-                          // 循坏一次 分包表索引+1
-                          let jcxm = strs[l]
-                          if(jcxm != null && jcxm != ''){
-                                let sqljc = "select * from t_mjjcnlfw where id_ = '"+ jcxm +"'"
-                                 repostCurd('sql',sqljc).then(response => {
-                                   let contjc = response.variables.data
-                                   if(contjc.length>0){
-                                      let zhu  = []
-                                      let zhus = {}
-                                      // 罗湖
-                                      let yplxz = ''
-                                      if(wtdAndYpb[i].yang_pin_lei_xing != null && wtdAndYpb[i].yang_pin_lei_xing!=''){ //样品类型1
-                                         yplxz = wtdAndYpb[i].yang_pin_lei_xing //样品类型
-                                      }
-                                      if(wtdAndYpb[i].yang_pin_lei_er_ != null && wtdAndYpb[i].yang_pin_lei_er_!=''){ //样品类型2
-                                        if(yplxz==null || yplxz == ''){
-                                          yplxz = wtdAndYpb[i].yang_pin_lei_er_ // 样品类型
-                                        }else{
-                                          yplxz =yplxz+','+ wtdAndYpb[i].yang_pin_lei_er_ //样品类型
-                                        }
-                                      }
-                                      if(wtdAndYpb[i].yang_pin_lei_san_ != null && wtdAndYpb[i].yang_pin_lei_san_!=''){ //样品类型3
-                                        if(yplxz==null || yplxz == ''){
-                                          yplxz = wtdAndYpb[i].yang_pin_lei_san_ //样品类型
-                                        }else{
-                                          yplxz =yplxz+','+ wtdAndYpb[i].yang_pin_lei_san_ //样品类型
-                                        }
-                                      }
-                                      if(wtdAndYpb[i].yang_pin_lei_si_ != null && wtdAndYpb[i].yang_pin_lei_si_!=''){ //样品类型4
-                                        if(yplxz==null || yplxz == ''){
-                                          yplxz = wtdAndYpb[i].yang_pin_lei_si_ //样品类型
-                                        }else{
-                                          yplxz = yplxz+','+ wtdAndYpb[i].yang_pin_lei_si_ //样品类型
-                                        }
-                                      }
-
-                                      zhus["jian_ce_yuan_"] =    //检测员
-                                      zhus["fu_he_yuan_"] =   //校验员
-                                      zhus["yang_pin_ming_che"] = wtdAndYpb[i].yang_pin_ming_che   // 样品名称
-                                      zhus["yang_pin_bian_hao"] = wtdAndYpb[i].yang_pin_bian_hao   // 样品编号
-                                      zhus["jian_ce_xiang_mu_"] = jcxm                             // 任务名称
-                                      zhus["wei_tuo_id_"]       = wtdAndYpb[i].wtID                // 委托id
-                                      zhus["he_tong_id_"]       = wtdAndYpb[i].he_tong_id_         // 合同id
-                                      zhus["bao_gao_bian_zhi_"] = ypInfoList[i].bao_gao_bian_zhi_  // 报告编制员
-                                      zhus["bao_gao_fu_he_yua"] = ypInfoList[i].bao_gao_shen_he_y  // 报告审核员
-                                      zhus["wei_tuo_lei_xing_"] = wtdAndYpb[i].wei_tuo_lei_xing_   // 委托类型
-                                      zhus["yang_pin_lei_xing"] = yplxz                            // 样品类型
-                                      zhus["xin_xiang_mu_ming"] = wtdAndYpb[i].xiang_mu_ming_che   // 新项目名称
-                                      zhus["wan_cheng_shi_jia"] = wtdAndYpb[i].song_jian_shi_jia   // 送检日期
-                                      zhus["zhuang_tai_"] = '待环境监控'
-                                      zhus["zhan_shi_biao_id_"] = wtdAndYpb[i].zhan_shi_biao_id_   // 展示表id
-                                      zhu.push(zhus)
-                                      //根据检测项目查出对应检测项目的actitve的key 以及formKey  拼接参数开启流程
-                                      repostCurd('add', '{"tableName":"t_lhjczb","paramWhere":'+JSON.stringify(zhu)+',"defKey":"'+contjc[0].defkey_+'","formKey":"'+contjc[0].formkey_+'"}')
-                                   }
-                               	 })
-                              }
-
-                            fbbIndex ++;
-                         }
-                   }
-                 }
-
-
-
-              //更新展示表
-              if(lhwtzsbID.length > 0){
-                repostCurd('updates', '{"tableName":"t_lhwtzsb","paramWhere":['+lhwtzsbID+'],"paramCond":{"zhuang_tai_":"检测进行中"}}')
-              }
 
 
-          })
+               repostCurd('updates', '{"tableName":"t_lhwtsqb","paramWhere":[' + lhwtbID + '],"paramCond":{"wei_tuo_zhuang_ta":"已完成"}}')
 
 
-          // console.log('dWhere : ',dWhere)
+// console.log('dWhere : ',dWhere)
 
 
-          /* 2、更新货架位置信息(位置状态、样品编号、入库时间)如果是重复位置,则新增一条位置记录,并增加对应UUID  */
+          /* 2、更新货架位置信息(位置状态、样品编号、入库时间)如果是重复位置,则新增一条位置记录,并增加对应UUID   */
           for (let num in dWhere) {
           for (let num in dWhere) {
               let sql = "select * from t_ypcfwz where id_ = '" + cfwzIdList[num] + "'"
               let sql = "select * from t_ypcfwz where id_ = '" + cfwzIdList[num] + "'"
               repostCurd('sql', sql).then(response => {
               repostCurd('sql', sql).then(response => {
@@ -523,7 +427,7 @@ export default {
                 if (resArr.length == 1) {
                 if (resArr.length == 1) {
                   if (resArr[0].wei_zhi_zhuang_ta == "空余") {
                   if (resArr[0].wei_zhi_zhuang_ta == "空余") {
                     repostCurd('update', '{"tableName":"t_ypcfwz","paramWhere":' + dWhere[num] + ',"paramCond":' + '{"wei_zhi_zhuang_ta":"占用","yang_pin_bian_hao":"' + ypbh[num] +'","ru_ku_shi_jian_":"' + this_.dateFormat() + '"}}').then(res => {
                     repostCurd('update', '{"tableName":"t_ypcfwz","paramWhere":' + dWhere[num] + ',"paramCond":' + '{"wei_zhi_zhuang_ta":"占用","yang_pin_bian_hao":"' + ypbh[num] +'","ru_ku_shi_jian_":"' + this_.dateFormat() + '"}}').then(res => {
-                      console.log("原本位置为空余 ,新位置更新成功")
+                      // console.log("原本位置为空余 ,新位置更新成功")
                     })
                     })
                   } else if (resArr[0].wei_zhi_zhuang_ta == "占用") {
                   } else if (resArr[0].wei_zhi_zhuang_ta == "占用") {
                     // 新增一条新的位置记录,使用旧的位置记录 修改它的样品编号,入库时间,标识UUID
                     // 新增一条新的位置记录,使用旧的位置记录 修改它的样品编号,入库时间,标识UUID
@@ -542,10 +446,10 @@ export default {
                     cfNew["yang_pin_bian_hao"] = ypbh[num]
                     cfNew["yang_pin_bian_hao"] = ypbh[num]
                     // cfNew["yang_pin_bian_hao"] = lhypIdList[num]
                     // cfNew["yang_pin_bian_hao"] = lhypIdList[num]
                     cfNew["ru_ku_shi_jian_"] = this_.dateFormat()
                     cfNew["ru_ku_shi_jian_"] = this_.dateFormat()
-                    cfNew["biao_zhi_uuid_"] = this_.uuid()
+                    cfNew["biao_zhi_uuid_"] = uuidList[num]
                     cfNewList.push(cfNew)
                     cfNewList.push(cfNew)
                     let uuid = cfNew["biao_zhi_uuid_"];
                     let uuid = cfNew["biao_zhi_uuid_"];
-                    console.log('原本位置为占用 ,新位置插入成功')
+                    // console.log('原本位置为占用 ,新位置插入成功')
 
 
                     repostCurd('add', '{"tableName":"t_ypcfwz","paramWhere":' + JSON.stringify(cfNewList) + '}').then(res => {
                     repostCurd('add', '{"tableName":"t_ypcfwz","paramWhere":' + JSON.stringify(cfNewList) + '}').then(res => {
                       let selectsql = "select id_ from t_ypcfwz where biao_zhi_uuid_='" + uuid + "'";
                       let selectsql = "select id_ from t_ypcfwz where biao_zhi_uuid_='" + uuid + "'";
@@ -553,15 +457,14 @@ export default {
                         let dataid = res.variables.data[0].id_;
                         let dataid = res.variables.data[0].id_;
                         let abc = '{"biao_zhi_uuid_":"' + uuid + '"}'
                         let abc = '{"biao_zhi_uuid_":"' + uuid + '"}'
                         // console.log('zzj abc ',abc)
                         // console.log('zzj abc ',abc)
+                        // console.log('zzj dataid ',dataid)
                         if (changeWeiZhi && !changesyWeiZhi) {
                         if (changeWeiZhi && !changesyWeiZhi) {
-                          // alert(1)
-                          repostCurd('update', '{"tableName":"t_lhypdjb","paramWhere":' + abc + ',"paramCond":' + '{"shou_yang_wei_zhi":"' + dataid + '"}}').then(res => {
-                            console.log('回填样品收样位置')
+                          repostCurd('update', '{"tableName":"t_lhypdjb","paramWhere":' + abc + ',"paramCond":' + '{"cun_fang_wei_zhi_":"' + dataid + '"}}').then(res => {
+                            // console.log('回填样品收样位置')
                           })
                           })
                         } else {
                         } else {
-                          // alert(2)
-                          repostCurd('update', '{"tableName":"t_lhypdjb","paramWhere":' + abc + ',"paramCond":' + '{"liu_yang_wei_zhi_":"' + dataid + '"}}').then(res => {
-                            console.log('回填样品留样位置')
+                          repostCurd('update', '{"tableName":"t_lhypdjb","paramWhere":' + abc + ',"paramCond":' + '{"liu_yang_cun_fang":"' + dataid + '"}}').then(res => {
+                            // console.log('回填样品留样位置')
                           })
                           })
                         }
                         }
                       })
                       })
@@ -571,6 +474,82 @@ export default {
                 }
                 }
               })
               })
           }
           }
+
+               let ffbSql = "select * from t_lhfbb where FIND_IN_SET( parent_id_,'"+ fbbIdStr +"')"
+               repostCurd('sql',ffbSql).then(response => {
+                 let ffbList = response.variables.data
+                 if(wtdAndYpb.length>0){
+                   let jcxmArr = []
+                   wtdAndYpb.forEach(item=>{
+                     item.jian_ce_xiang_mu_.split(',').reverse().forEach(temp=>{
+                       jcxmArr.push(temp)
+                     })
+                   })
+
+                   let allProject = []
+                   let finalJCTask = []
+                   let processDefKeyParam = []
+                   let processFormKeyParam = []
+                   let sql111 = `select id_, defkey_, formkey_ from t_mjjcnlfw where defkey_ != '' and find_in_set(id_, '${jcxmArr.join(',')}')`
+                   repostCurd('sql', sql111).then(res => {
+                        allProject = res.variables.data
+                        wtdAndYpb.forEach(item => {
+                          let yblxArr = []
+                          let yblxStr = ''
+                          yblxArr.push(item.yang_pin_lei_xing, item.yang_pin_lei_er_, item.yang_pin_lei_san_, item.yang_pin_lei_si_)
+                          yblxStr = yblxArr.filter(s => s).join(',')
+                          let t = item.jian_ce_xiang_mu_.split(',')
+                          let ypList = ypInfoList.find(k => k.id_ === item.id_)
+                          t.forEach(i => {
+                             let fbbItem = ffbList.find(j => j.jian_ce_xiang_mu_ === i)
+                             let jcxmItem = allProject.find(k => k.id_ === i)
+                             let obj = {
+                                 jian_ce_yuan_: fbbItem.jian_ce_yuan_,
+                                 fu_he_yuan_  : fbbItem.fu_he_yuan_,
+                                 yang_pin_ming_che: item.yang_pin_ming_che,
+                                 yang_pin_bian_hao: item.yang_pin_bian_hao,
+                                 jian_ce_xiang_mu_:jcxmItem.id_,
+                                 wei_tuo_id_:item.wtID,
+                                 he_tong_id_:item.he_tong_id_,
+                                 bao_gao_bian_zhi_:ypList.bao_gao_bian_zhi_,
+                                 bao_gao_fu_he_yua:ypList.bao_gao_shen_he_y,
+                                 wei_tuo_lei_xing_:item.wei_tuo_lei_xing_,
+                                 yang_pin_lei_xing: yblxStr,
+                                 xin_xiang_mu_ming:item.xiang_mu_ming_che,
+                                 wan_cheng_shi_jia:item.song_jian_shi_jia,
+                                 zhuang_tai_:'待环境监控',
+                                 zhan_shi_biao_id_:item.zhan_shi_biao_id_
+                             }
+                             finalJCTask.push(obj)
+                             processDefKeyParam.push(jcxmItem.defkey_)
+                             processFormKeyParam.push(jcxmItem.formkey_)
+                          })
+                        })
+
+
+                       finalJCTask.forEach((item,index )=>{
+                         let obj = {
+                           tableName:"t_lhjczb",
+                           paramWhere:[item],
+                           defKey:processDefKeyParam[index],
+                           formKey:processFormKeyParam[index]
+                         }
+                       repostCurd('add', JSON.stringify(obj))
+                       })
+                   })
+
+                   }
+
+               })
+
+              //更新展示表
+              if(lhwtzsbID.length > 0){
+                repostCurd('updates', '{"tableName":"t_lhwtzsb","paramWhere":['+lhwtzsbID+'],"paramCond":{"zhuang_tai_":"检测进行中"}}')
+              }
+
+          })
+
+
           this.$emit('callback', true)
           this.$emit('callback', true)
           this.visable = false
           this.visable = false
           this.$message({
           this.$message({
@@ -607,34 +586,6 @@ export default {
       var uuid = s.join("");
       var uuid = s.join("");
       return uuid;
       return uuid;
   },
   },
-    /* 根据样品编号 查询所有样品表
-    SearchAllypbEvent(lhypbhList){
-      repostCurd('selects','{"tableName":"t_lhypb","paramWhere":[' + lhypbhList + ']}').then(res =>{
-        return res.variables.data
-      })
-    },
-    */
-    /* 提交数据
-     commitData(val){
-       for(let item of val) {
-              let dataWhere = [] //ajax的修改字段
-              dataWhere.push('{"tableName":"t_gdyrqcyp" + "," + "paramWhere":"id_:'+item.id_ +'" +","+    "shu_liang_":"'+ item.shu_liang_ +'"  +","+  "lingYongRen":"' + item.ling_yong_ren_ + '"  +","+  "cunFangWeiZhi":"' + item.cun_fang_wei_zhi_ + '"  +","+  "sign":"out"}')
-                // dataWhere.push('{"yangPinBianHao":"'+ item.yang_pin_bian_hao +'"  +","+  "lingYongRen":"' + item.ling_yong_ren_ + '"  +","+  "cunFangWeiZhi":"' + item.cun_fang_wei_zhi_ + '"  +","+  "shuLiang":"' + item.shu_liang_ + '"}')
-
-             // repostCurd('updateSample',"{data:'"+JSON.stringify(dataWhere)+"'}").then(response =>{
-             //   console.log(response)
-             // })
-
-             // this.Update('t_gdyrqcyp',{"id_":item.id_},"{data:'"+JSON.stringify(dataWhere)+"'}").then(response => {
-             //            this.$emit('callback', true)
-             //            this.visible = false
-             //            this.$message({
-             //                      message: '样品出库操作成功!',
-             //                      type: 'success'
-             //                    });
-             //          })
-                }
-     },*/
     Update(name, where, cond) {
     Update(name, where, cond) {
       let cont = {}
       let cont = {}
       cont['tableName'] = name
       cont['tableName'] = name
@@ -662,4 +613,4 @@ export default {
     },
     },
 
 
   }
   }
-}
+}

+ 331 - 250
src/views/system/jbdScan/js/sampleConfirmationJS.js

@@ -69,12 +69,11 @@ export default {
 
 
             // 获取样品列表
             // 获取样品列表
             let ypInfoList = this_.listData
             let ypInfoList = this_.listData
-            // console.log(ypInfoList, "样品信息")
 
 
             let dWhere = []
             let dWhere = []
             let ypbh = []
             let ypbh = []
             let cfwzIdList = [] // 放置 存放位置的ID
             let cfwzIdList = [] // 放置 存放位置的ID
-            let uuidList = [] // 列表的UUID
+            // let uuidList = [] // 列表的UUID
             let ypbhList = [] // 样品编号列表
             let ypbhList = [] // 样品编号列表
 
 
             // 罗湖样品编号列表
             // 罗湖样品编号列表
@@ -93,6 +92,7 @@ export default {
             let lhypIdList = []
             let lhypIdList = []
             // 罗湖样品id格式列表
             // 罗湖样品id格式列表
             let lhypIdNewList = []
             let lhypIdNewList = []
+            let uuidList = [] // 列表的UUID
 
 
             for (let yp in ypInfoList) { //样品数据
             for (let yp in ypInfoList) { //样品数据
               let cfwz = ''
               let cfwz = ''
@@ -171,7 +171,6 @@ export default {
                 }
                 }
                   cfwz = ypInfoList[yp].shou_yang_wei_zhi //取位置信息
                   cfwz = ypInfoList[yp].shou_yang_wei_zhi //取位置信息
               }
               }
-              uuidList.push(ypInfoList[yp].biao_zhi_uuid_)
               // ypIdList.push('{"id_":"' + ypInfoList[yp].id_ + '"}')
               // ypIdList.push('{"id_":"' + ypInfoList[yp].id_ + '"}')
               // ypWeiZhi.push(ypInfoList[yp].shou_yang_wei_zhi) // 收样存放位置
               // ypWeiZhi.push(ypInfoList[yp].shou_yang_wei_zhi) // 收样存放位置
               // ypLiuYangWeiZhi.push(ypInfoList[yp].liu_yang_wei_zhi_) // 留样存放位置
               // ypLiuYangWeiZhi.push(ypInfoList[yp].liu_yang_wei_zhi_) // 留样存放位置
@@ -180,246 +179,349 @@ export default {
               ypbhList.push('{"yang_pin_bian_hao":"' + ypInfoList[yp].yang_pin_bian_hao + '"}') // 样品编号列表
               ypbhList.push('{"yang_pin_bian_hao":"' + ypInfoList[yp].yang_pin_bian_hao + '"}') // 样品编号列表
 
 
 
 
-              // 罗湖
-              // lhypbhList.push('{"yang_pin_bian_hao":"' + ypInfoList[yp].yang_pin_bian_hao + '"}')
-              // lhypbWJ.push('{"id_":"' + ypInfoList[yp].parent_id_ + '"}')
-              dWhere.push('{"id_":"' + cfwz + '"}')
-              cfwzIdList.push(cfwz)
-              lhypbhList.push( ypInfoList[yp].yang_pin_bian_hao )
-              lhypbWJ.push( ypInfoList[yp].parent_id_ )
-              lhypIdList.push( ypInfoList[yp].id_ )
-              lhypIdNewList.push('{"id_":"' + ypInfoList[yp].id_ + '"}')
-
-              ypbh.push(ypInfoList[yp].yang_pin_bian_hao)
-            }
+             // 罗湖
+            // lhypbhList.push('{"yang_pin_bian_hao":"' + ypInfoList[yp].yang_pin_bian_hao + '"}')
+            // lhypbWJ.push('{"id_":"' + ypInfoList[yp].parent_id_ + '"}')
+            dWhere.push('{"id_":"' + cfwz + '"}')
+            cfwzIdList.push(cfwz)
+            lhypbhList.push( ypInfoList[yp].yang_pin_bian_hao )
+            lhypbWJ.push( ypInfoList[yp].parent_id_ )
+            lhypIdList.push( ypInfoList[yp].id_ )
+            lhypIdNewList.push('{"id_":"' + ypInfoList[yp].id_ + '"}')
+            uuidList.push(ypInfoList[yp].biao_zhi_uuid_)
+            ypbh.push(ypInfoList[yp].yang_pin_bian_hao)
+          }
 
 
-          /*
-            封装好样品登记表对象,add 样品登记表
-          */
-           let value = ''
-           let lhypIdStr = ''
-           console.log('lhypbWJ :',lhypbWJ)
-           console.log('lhypIdList :',lhypIdList)
-           for(let i =0;i<lhypbWJ.length; i++){
-             value += lhypbWJ[i] + ','
-           }
-           value = value.substring(0,value.length-1)
-           value = value.replace(/,/g,"','")
-           for(let i = 0; i<lhypIdList.length;i++){
-             lhypIdStr += lhypIdList[i] + ','
-           }
-           lhypIdStr = lhypIdStr.substring(0,lhypIdStr.length-1)
-           lhypIdStr = lhypIdStr.replace(/,/g,"','")
-
-           let wtdAndYpb = []
-          // a.bao_gao_bian_zhi_,a.bao_gao_fu_he_yua,
-           let allSQL = `select a.id_ as wtID,a.zhan_shi_biao_id_,a.wei_tuo_lei_xing_,a.he_tong_id_,a.bao_gao_lei_xing_,a.wei_tuo_bian_hao_, a.wei_tuo_dan_wei_, a.wei_tuo_fang_lian, a.wei_tuo_lian,a.bao_gao_bian_zhi_,a.bao_gao_fu_he_yua,b.* from t_lhwtsqb a inner join t_lhypb b on a.id_ = b.parent_id_ where b.parent_id_ in ('${value}')and b.id_ in ('${lhypIdStr}')`
-            repostCurd('sql', allSQL).then(res1 => {
-                /* 封装样品登记表对象  */
-                let ypdjb = []
-                let res = res1.variables.data
-                // wtdAndYpb.push(res)
-                wtdAndYpb = res
-
-                for(let i = 0; i<res.length; i++){
-                lhwtbID.push('{"id_":"' + res[i].wtID + '"}')
-                lhwtzsbID.push('{"shen_qing_id_":"' + res[i].zhan_shi_biao_id_ + '"}')
-                    let count = 0;
-                    if(res[i].yang_pin_lei_xing != ''  && res[i].yang_pin_lei_xing != undefined){
-                      count = 1;
-                      if(res[i].yang_pin_lei_er_ != ''  && res[i].yang_pin_lei_er_ != undefined){
-                         count = 2;
-                         if(res[i].yang_pin_lei_san_ != ''  && res[i].yang_pin_lei_san_ != undefined){
-                           count = 3;
-                           if(res[i].yang_pin_lei_si_ != ''  && res[i].yang_pin_lei_si_ != undefined){
-                             count = 4;
-                           }
+        /*
+          封装好样品登记表对象,add 样品登记表
+        */
+         let value = ''
+         let lhypIdStr = ''
+         for(let i =0;i<lhypbWJ.length; i++){
+           value += lhypbWJ[i] + ','
+         }
+         value = value.substring(0,value.length-1)
+         value = value.replace(/,/g,"','")
+         for(let i = 0; i<lhypIdList.length;i++){
+           lhypIdStr += lhypIdList[i] + ','
+         }
+         lhypIdStr = lhypIdStr.substring(0,lhypIdStr.length-1)
+         lhypIdStr = lhypIdStr.replace(/,/g,"','")
+
+         let wtdAndYpb = []
+        // a.bao_gao_bian_zhi_,a.bao_gao_fu_he_yua,
+         let allSQL = `select a.id_ as wtID,a.zhan_shi_biao_id_,a.wei_tuo_lei_xing_,a.he_tong_id_,a.bao_gao_lei_xing_,a.wei_tuo_bian_hao_, a.wei_tuo_dan_wei_, a.wei_tuo_fang_lian, a.wei_tuo_lian,a.bao_gao_bian_zhi_,a.bao_gao_fu_he_yua,b.* from t_lhwtsqb a inner join t_lhypb b on a.id_ = b.parent_id_ where b.parent_id_ in ('${value}')and b.id_ in ('${lhypIdStr}')`
+          repostCurd('sql', allSQL).then(res1 => {
+              /* 封装样品登记表对象  */
+              let ypdjb = []
+              let res = res1.variables.data
+              wtdAndYpb = res
+
+              for(let i = 0; i<res.length; i++){
+              lhwtbID.push('{"id_":"' + res[i].wtID + '"}')
+              lhwtbOnlyId.push(res[i].wtID)
+              lhwtzsbID.push('{"shen_qing_id_":"' + res[i].zhan_shi_biao_id_ + '"}')
+                  let count = 0;
+                  if(res[i].yang_pin_lei_xing != ''  && res[i].yang_pin_lei_xing != undefined){
+                    count = 1;
+                    if(res[i].yang_pin_lei_er_ != ''  && res[i].yang_pin_lei_er_ != undefined){
+                       count = 2;
+                       if(res[i].yang_pin_lei_san_ != ''  && res[i].yang_pin_lei_san_ != undefined){
+                         count = 3;
+                         if(res[i].yang_pin_lei_si_ != ''  && res[i].yang_pin_lei_si_ != undefined){
+                           count = 4;
                          }
                          }
-                      }
+                       }
                     }
                     }
-                    for(let x = 0; x<count;x++){
-                      let obj = {}
-                      obj["wei_tuo_dan_hao_"] = res[i].wei_tuo_bian_hao_
-                      obj["wei_tuo_dan_wei_"] = res[i].wei_tuo_dan_wei_
-                      obj["lian_xi_ren_"]     = res[i].wei_tuo_fang_lian
-                      obj["lian_xi_dian_hua_"] = res[i].wei_tuo_lian
-
-                      obj["yang_ben_ming_che"]  = res[i].yang_pin_ming_che
-                      obj["yang_ben_bian_hao"]  = res[i].yang_pin_bian_hao
-                      obj["pi_hao_bian_hao_"]   = res[i].song_jian_pi_hao_
-                      obj["xing_ming_"]         = res[i].xing_ming_
-                      obj["xing_bie_"]          = res[i].xing_bie_
-                      obj["nian_ling_"]         = res[i].nian_ling_
-                      obj["yang_ben_zhuang_t"]  = res[i].yang_pin_zhuang_t
-                      obj["shou_yang_ri_qi_"]   = this_.dateFormat()
-                      obj["bei_zhu_"]           = res[i].bei_zhu_
-
-                      obj["yang_ben_lei_xing"] =    x==0? res[i].yang_pin_lei_xing : x==1? res[i].yang_pin_lei_er_ : x==2? res[i].yang_pin_lei_san_ : x==3? res[i].yang_pin_lei_si_ :''
-                      obj["yun_shu_tiao_jian"] =    x==0? res[i].yang_ben_yun_shu_ : x==1? res[i].yang_pin_yun_shu_ : x==2? res[i].yang_pin_yun_san : x==3? res[i].yang_pin_yun_si_ :''
-                      obj["yang_pin_shu_lian"] =    x==0? res[i].shu_liang_ : x==1? res[i].shu_liang_er_ : x==2? res[i].shu_liang_san_ : x==3? res[i].shu_liang_si_ :''
-                      obj["yang_ben_gui_ge_s"] =    x==0? res[i].yang_pin_gui_ge_ : x==1? res[i].yang_pin_gui_ge_e : x==2? res[i].yang_pin_gui_ge_s : x==3? res[i].yang_pin_gui_si_ :''
-                      obj["yan_shou_jie_guo_"] =      ypInfoList[i].yan_shou_jie_guo_
-                      obj["cun_fang_wei_zhi_"] =       ypInfoList[i].shou_yang_wei_zhi
-                      obj["liu_zhuan_zhuang_"] =       '待检'
-                      obj["shi_fou_liu_yang_"] =       ypInfoList[i].shi_fou_liu_yang_
-                      // obj["shou_yang_ren_"] =          ypInfoList[i].
-                      // obj["jiao_yang_ri_qi_"] =        ypInfoList[i].
-                      // obj["jiao_yang_jyr"] =           ypInfoList[i].
-                      // obj["jiao_yang_shu_lia"] =       ypInfoList[i].
-                      obj["liu_yang_ri_qi_"] =         ypInfoList[i].liu_yang_ri_qi_
-                      obj["liu_yang_cun_fang"]  =      ypInfoList[i].liu_yang_cun_fang
-                      obj["liu_yang_shu_lian"]  =      ypInfoList[i].liu_yang_shu_lian
-                      obj["liu_yang_qi_xian"]   =        ypInfoList[i].liu_yang_qi_xian
-                      obj["xiao_hui_ri_qi_"]    =         ypInfoList[i].xiao_hui_ri_qi_
-                      obj["fan_yang_ri_qi_"]    =         ypInfoList[i].fan_yang_ri_qi_
-                      obj["fan_yang_jyr"]       =       ypInfoList[i].fan_yang_jyr
-                      changeWeiZhi = ypInfoList[i].shou_yang_wei_zhi ==''?'':ypInfoList[i].shou_yang_wei_zhi
-                      changesyWeiZhi = ypInfoList[i].liu_yang_cun_fang ==''?'':ypInfoList[i].liu_yang_cun_fang
-                      ypdjb.push(obj)
-                    }
-                }
-                // console.log('进入样品登记表...',ypdjb)
-                repostCurd('add', '{"tableName":"t_lhypdjb","paramWhere":' + JSON.stringify(ypdjb) + '}')
-                repostCurd('updates', '{"tableName":"t_lhypb","paramWhere":[' + lhypIdNewList + '],"paramCond":{"jie_yang_zhuang_t":"已接收"}}')
-                /*
+                  }
+                  for(let x = 0; x<count;x++){
+                    let obj = {}
+                    obj["wei_tuo_dan_hao_"] = res[i].wei_tuo_bian_hao_
+                    obj["wei_tuo_dan_wei_"] = res[i].wei_tuo_dan_wei_
+                    obj["lian_xi_ren_"]     = res[i].wei_tuo_fang_lian
+                    obj["lian_xi_dian_hua_"] = res[i].wei_tuo_lian
+
+                    obj["yang_ben_ming_che"]  = res[i].yang_pin_ming_che
+                    obj["yang_ben_bian_hao"]  = res[i].yang_pin_bian_hao
+                    obj["pi_hao_bian_hao_"]   = res[i].song_jian_pi_hao_
+                    obj["xing_ming_"]         = res[i].xing_ming_
+                    obj["xing_bie_"]          = res[i].xing_bie_
+                    obj["nian_ling_"]         = res[i].nian_ling_
+                    obj["yang_ben_zhuang_t"]  = res[i].yang_pin_zhuang_t
+                    obj["shou_yang_ri_qi_"]   = this_.dateFormat()
+                    obj["bei_zhu_"]           = res[i].bei_zhu_
+
+                    obj["yang_ben_lei_xing"] =    x==0? res[i].yang_pin_lei_xing : x==1? res[i].yang_pin_lei_er_ : x==2? res[i].yang_pin_lei_san_ : x==3? res[i].yang_pin_lei_si_ :''
+                    obj["yun_shu_tiao_jian"] =    x==0? res[i].yang_ben_yun_shu_ : x==1? res[i].yang_pin_yun_shu_ : x==2? res[i].yang_pin_yun_san : x==3? res[i].yang_pin_yun_si_ :''
+                    obj["yang_pin_shu_lian"] =    x==0? res[i].shu_liang_ : x==1? res[i].shu_liang_er_ : x==2? res[i].shu_liang_san_ : x==3? res[i].shu_liang_si_ :''
+                    obj["yang_ben_gui_ge_s"] =    x==0? res[i].yang_pin_gui_ge_ : x==1? res[i].yang_pin_gui_ge_e : x==2? res[i].yang_pin_gui_ge_s : x==3? res[i].yang_pin_gui_si_ :''
+                    obj["yan_shou_jie_guo_"] =      ypInfoList[i].yan_shou_jie_guo_
+                    obj["cun_fang_wei_zhi_"] =       ypInfoList[i].shou_yang_wei_zhi
+                    obj["liu_zhuan_zhuang_"] =       '待检'
+                    obj["shi_fou_liu_yang_"] =       ypInfoList[i].shi_fou_liu_yang_
+                    // obj["shou_yang_ren_"] =          ypInfoList[i].
+                    // obj["jiao_yang_ri_qi_"] =        ypInfoList[i].
+                    // obj["jiao_yang_jyr"] =           ypInfoList[i].
+                    // obj["jiao_yang_shu_lia"] =       ypInfoList[i].
+                    obj["liu_yang_ri_qi_"] =         ypInfoList[i].liu_yang_ri_qi_
+                    obj["liu_yang_cun_fang"]  =      ypInfoList[i].liu_yang_cun_fang
+                    obj["liu_yang_shu_lian"]  =      ypInfoList[i].liu_yang_shu_lian
+                    obj["liu_yang_qi_xian"]   =        ypInfoList[i].liu_yang_qi_xian
+                    obj["xiao_hui_ri_qi_"]    =         ypInfoList[i].xiao_hui_ri_qi_
+                    obj["fan_yang_ri_qi_"]    =         ypInfoList[i].fan_yang_ri_qi_
+                    obj["fan_yang_jyr"]       =       ypInfoList[i].fan_yang_jyr
+                    obj["biao_zhi_uuid_"]       =       ypInfoList[i].biao_zhi_uuid_
+                    changeWeiZhi = ypInfoList[i].shou_yang_wei_zhi ==''?'':ypInfoList[i].shou_yang_wei_zhi
+                    changesyWeiZhi = ypInfoList[i].liu_yang_cun_fang ==''?'':ypInfoList[i].liu_yang_cun_fang
+                    ypdjb.push(obj)
+                  }
+              }
+              let fbbIdStr = ''
+              for(let i =0;i<lhwtbOnlyId.length; i++){
+                fbbIdStr += lhwtbOnlyId[i] + ','
+              }
+              fbbIdStr = fbbIdStr.substring(0,fbbIdStr.length-1)
+              // fbbIdStr = fbbIdStr.replace(/,/g,"','")
+              // console.log('fbbIdStr :',fbbIdStr)
+              // console.log('进入样品登记表...',ypdjb)
+              repostCurd('add', '{"tableName":"t_lhypdjb","paramWhere":' + JSON.stringify(ypdjb) + '}')
+              repostCurd('updates', '{"tableName":"t_lhypb","paramWhere":[' + lhypIdNewList + '],"paramCond":{"jie_yang_zhuang_t":"已接收"}}')
+
+              /*
                 更新委托单 如果本来没值,就更新 报告编制人和 报告审核员 否则更新
                 更新委托单 如果本来没值,就更新 报告编制人和 报告审核员 否则更新
-                  委托单数组 和 样品数组 数量相同,遍历两者 判断委托单是否有编制人,审核员?
-                  如果没有,则记录下委托单ID,以及同索引下的样品表的编制人和审核员
-                */
-                for(var index = 0; index <ypInfoList.length; index++){
-                  if(res[index].bao_gao_bian_zhi_  == '' || res[index].bao_gao_fu_he_yua  == ''){
-                    // console.log('{"id_":"' + res[index].id_ + '"}')
-                    // console.log(ypInfoList[index].bao_gao_bian_zhi_)
-                    // console.log(ypInfoList[index].bao_gao_shen_he_y)
-                   repostCurd('update','{"tableName":"t_lhwtsqb","paramWhere":' + '{"id_":"' + res[index].wtID + '"}' + ',"paramCond":' + '{"bao_gao_bian_zhi_":"'+ypInfoList[index].bao_gao_bian_zhi_+'","bao_gao_fu_he_yua":"' +  ypInfoList[index].bao_gao_shen_he_y + '"}}')
-                }
+                委托单数组 和 样品数组 数量相同,遍历两者 判断委托单是否有编制人,审核员?
+                如果没有,则记录下委托单ID,以及同索引下的样品表的编制人和审核员
+              */
+              // let finalWtdIdList = []
+              for(var index = 0; index < ypInfoList.length; index++){
+                if(res[index].bao_gao_bian_zhi_  == '' || res[index].bao_gao_fu_he_yua  == ''){
+                 repostCurd('update','{"tableName":"t_lhwtsqb","paramWhere":' + '{"id_":"' + res[index].wtID + '"}' + ',"paramCond":' + '{"bao_gao_bian_zhi_":"'+ypInfoList[index].bao_gao_bian_zhi_+'","bao_gao_fu_he_yua":"' +  ypInfoList[index].bao_gao_shen_he_y + '"}}')
               }
               }
-               /*
-                   3、任务分配
-                   3-1、根据 wtdAndYpb 的 wtID 更改委托表的 委托状态 wei_tuo_zhuang_ta 变成 已完成
-                   3-2、根据每个样品对应的检测项目,开启一个或多个任务 / 遍历样品表开任务分配流程,一个样品可能对应多个检测
-                   3-3、委托表找zhan_shi_biao_id_ 修改  t_lhwtzsb "zhuang_tai_"为"任务分配进行中"
-                */
-                 repostCurd('updates', '{"tableName":"t_lhwtsqb","paramWhere":[' + lhwtbID + '],"paramCond":{"wei_tuo_zhuang_ta":"已完成"}}')
-
-                 let rws = []
-                if(wtdAndYpb.length>0){
-                   for(var i in wtdAndYpb){
-                     let strs = wtdAndYpb[i].jian_ce_xiang_mu_.split(',')
-                         for(var l in strs){
-                          let rw = {}
-                           rw["ren_wu_ming_cheng"] = strs[l] //检测项目
-                           rw["yang_pin_ming_che"] = wtdAndYpb[i].yang_pin_ming_che//样品名称
-                           rw["yang_pin_bian_hao"] = wtdAndYpb[i].yang_pin_bian_hao//样品编号
-                           rw["wei_tuo_lei_xing_"] = wtdAndYpb[i].wei_tuo_lei_xing_ //委托类型
-                           let yplxz = ''
-                           if(wtdAndYpb[i].yang_pin_lei_xing != null && wtdAndYpb[i].yang_pin_lei_xing!=''){ //样品类型1
-                              yplxz = wtdAndYpb[i].yang_pin_lei_xing //样品类型
-                           }
-                           if(wtdAndYpb[i].yang_pin_lei_er_ != null && wtdAndYpb[i].yang_pin_lei_er_!=''){ //样品类型2
-                             if(yplxz==null || yplxz == ''){
-                               yplxz = wtdAndYpb[i].yang_pin_lei_er_ //样品类型
-                             }else{
-                               yplxz =yplxz+','+ wtdAndYpb[i].yang_pin_lei_er_ //样品类型
-                             }
+            }
+              /*
+              let wtdSQL = "select id_,bao_gao_bian_zhi_,bao_gao_fu_he_yua from t_lhwtsqb where id_ in('" + value + "')"
+
+               repostCurd('sql', wtdSQL).then(response => {
+                   let result = response.variables.data
+                   console.log(result)
+                   for(var i in result){
+                      if(result[i].bao_gao_bian_zhi_ == '' || result[i].bao_gao_bian_zhi_ == undefined){
+                        finalWtdIdList.push(result[i])
+                      }
+                   }
+                   console.log('finalWtdIdList',finalWtdIdList)
+               })
+                 3、任务分配     【2022/11/23 取消 直接 批量开检测子流程】
+                 3-1、根据 wtdAndYpb 的 wtID 更改委托表的 委托状态 wei_tuo_zhuang_ta 变成 已完成
+                 3-2、根据每个样品对应的检测项目,开启一个或多个任务 / 遍历样品表开任务分配流程,一个样品可能对应多个检测
+                 3-3、委托表找zhan_shi_biao_id_ 修改  t_lhwtzsb "zhuang_tai_"为"任务分配进行中"
+
+               // console.log('委托单及样品信息',wtdAndYpb)
+               // console.log('委托单id列表 ',lhwtbID)
+               // console.log('展示表id列表 ',lhwtzsbID)
+
+               repostCurd('updates', '{"tableName":"t_lhwtsqb","paramWhere":[' + lhwtbID + '],"paramCond":{"wei_tuo_zhuang_ta":"已完成"}}')
+
+               let rws = []
+              if(wtdAndYpb.length>0){
+                 for(var i in wtdAndYpb){
+                   let strs = wtdAndYpb[i].jian_ce_xiang_mu_.split(',')
+                       for(var l in strs){
+                        let rw = {}
+                         rw["ren_wu_ming_cheng"] = strs[l] //检测项目
+                         rw["yang_pin_ming_che"] = wtdAndYpb[i].yang_pin_ming_che//样品名称
+                         rw["yang_pin_bian_hao"] = wtdAndYpb[i].yang_pin_bian_hao//样品编号
+                         rw["wei_tuo_lei_xing_"] = wtdAndYpb[i].wei_tuo_lei_xing_ //委托类型
+                         let yplxz = ''
+                         if(wtdAndYpb[i].yang_pin_lei_xing != null && wtdAndYpb[i].yang_pin_lei_xing!=''){ //样品类型1
+                            yplxz = wtdAndYpb[i].yang_pin_lei_xing //样品类型
+                         }
+                         if(wtdAndYpb[i].yang_pin_lei_er_ != null && wtdAndYpb[i].yang_pin_lei_er_!=''){ //样品类型2
+                           if(yplxz==null || yplxz == ''){
+                             yplxz = wtdAndYpb[i].yang_pin_lei_er_ //样品类型
+                           }else{
+                             yplxz =yplxz+','+ wtdAndYpb[i].yang_pin_lei_er_ //样品类型
                            }
                            }
-                           if(wtdAndYpb[i].yang_pin_lei_san_ != null && wtdAndYpb[i].yang_pin_lei_san_!=''){ //样品类型3
-                             if(yplxz==null || yplxz == ''){
-                               yplxz = wtdAndYpb[i].yang_pin_lei_san_ //样品类型
-                             }else{
-                               yplxz =yplxz+','+ wtdAndYpb[i].yang_pin_lei_san_ //样品类型
-                             }
+                         }
+                         if(wtdAndYpb[i].yang_pin_lei_san_ != null && wtdAndYpb[i].yang_pin_lei_san_!=''){ //样品类型3
+                           if(yplxz==null || yplxz == ''){
+                             yplxz = wtdAndYpb[i].yang_pin_lei_san_ //样品类型
+                           }else{
+                             yplxz =yplxz+','+ wtdAndYpb[i].yang_pin_lei_san_ //样品类型
                            }
                            }
-                           if(wtdAndYpb[i].yang_pin_lei_si_ != null && wtdAndYpb[i].yang_pin_lei_si_!=''){ //样品类型4
-                             if(yplxz==null || yplxz == ''){
-                               yplxz = wtdAndYpb[i].yang_pin_lei_si_ //样品类型
-                             }else{
-                               yplxz = yplxz+','+ wtdAndYpb[i].yang_pin_lei_si_ //样品类型
-                             }
+                         }
+                         if(wtdAndYpb[i].yang_pin_lei_si_ != null && wtdAndYpb[i].yang_pin_lei_si_!=''){ //样品类型4
+                           if(yplxz==null || yplxz == ''){
+                             yplxz = wtdAndYpb[i].yang_pin_lei_si_ //样品类型
+                           }else{
+                             yplxz = yplxz+','+ wtdAndYpb[i].yang_pin_lei_si_ //样品类型
                            }
                            }
-                           rw["yang_pin_lei_xing"] = yplxz //样品类型
-                           rw["wei_tuo_id_"] = wtdAndYpb[i].wtID  //委托id
-                           rw["he_tong_id_"] = wtdAndYpb[i].he_tong_id_ //合同id
-                           rw["zhuang_tai_"] = '待任务分配'//状态
-                           rw["wan_cheng_shi_jia"] = wtdAndYpb[i].song_jian_shi_jia  //送检日期
-                           rw["bao_gao_bian_zhi_"] = ypInfoList[i].bao_gao_bian_zhi_  //报告编制人
-                           rw["bao_gao_shen_he_y"] = ypInfoList[i].bao_gao_shen_he_y  //报告审核人
-                           rw["bao_gao_lei_xing_"] = wtdAndYpb[i].bao_gao_lei_xing_  //报告类型
-                           rw["xin_xiang_mu_ming"] = wtdAndYpb[i].xiang_mu_ming_che   //项目名称
-                           rw["zhan_shi_biao_id_"] = wtdAndYpb[i].zhan_shi_biao_id_  //展示表id
-                           rws.push(rw)
-                          }
-                    }
-                   repostCurd('add', '{"tableName":"t_lhrwfpb","paramWhere":'+JSON.stringify(rws)+',"defKey":"Process_04o0csc","formKey":"lhrwfp"}')
-                  }
-                  /* 更新委托单 检测开始时间   问吴懿是否需要
-                  repostCurd('updates', '{"tableName":"t_lhwtsqb","paramWhere":[' + lhwtbID + '],"paramCond":{"jian_ce_kai_shi_s":"' + this_.dateFormat() + '"}}')
-                  */
-                  //更新展示表
-                  if(lhwtzsbID.length > 0){
-                    repostCurd('updates', '{"tableName":"t_lhwtzsb","paramWhere":['+lhwtzsbID+'],"paramCond":{"zhuang_tai_":"任务分配进行中"}}')
+                         }
+                         rw["yang_pin_lei_xing"] = yplxz //样品类型
+                         rw["wei_tuo_id_"] = wtdAndYpb[i].wtID  //委托id
+                         rw["he_tong_id_"] = wtdAndYpb[i].he_tong_id_ //合同id
+                         rw["zhuang_tai_"] = '待任务分配'//状态
+                         rw["wan_cheng_shi_jia"] = wtdAndYpb[i].song_jian_shi_jia  //送检日期
+                         rw["bao_gao_bian_zhi_"] = ypInfoList[i].bao_gao_bian_zhi_  //报告编制人
+                         rw["bao_gao_shen_he_y"] = ypInfoList[i].bao_gao_shen_he_y  //报告审核人
+                         rw["bao_gao_lei_xing_"] = wtdAndYpb[i].bao_gao_lei_xing_  //报告类型
+                         rw["xin_xiang_mu_ming"] = wtdAndYpb[i].xiang_mu_ming_che   //项目名称
+                         rw["zhan_shi_biao_id_"] = wtdAndYpb[i].zhan_shi_biao_id_  //展示表id
+                         rws.push(rw)
+                        }
                   }
                   }
+                   // console.log("任务分配",rws)
+                 repostCurd('add', '{"tableName":"t_lhrwfpb","paramWhere":'+JSON.stringify(rws)+',"defKey":"Process_04o0csc","formKey":"lhrwfp"}')
+                }
+                // 更新委托单 检测开始时间   问吴懿是否需要
+                //repostCurd('updates', '{"tableName":"t_lhwtsqb","paramWhere":[' + lhwtbID + '],"paramCond":{"jian_ce_kai_shi_s":"' + this_.dateFormat() + '"}}')
 
 
-            })
+                //更新展示表
+                if(lhwtzsbID.length > 0){
+                  repostCurd('updates', '{"tableName":"t_lhwtzsb","paramWhere":['+lhwtzsbID+'],"paramCond":{"zhuang_tai_":"任务分配进行中"}}')
+                }
+                */
 
 
-            // console.log('dWhere : ',dWhere)
-
-            /* 2、更新货架位置信息(位置状态、样品编号、入库时间)如果是重复位置,则新增一条位置记录,并增加对应UUID  */
-            for (let num in dWhere) {
-                let sql = "select * from t_ypcfwz where id_ = '" + cfwzIdList[num] + "'"
-                repostCurd('sql', sql).then(response => {
-                  let resArr = response.variables.data
-                  if (resArr.length == 1) {
-                    if (resArr[0].wei_zhi_zhuang_ta == "空余") {
-                      repostCurd('update', '{"tableName":"t_ypcfwz","paramWhere":' + dWhere[num] + ',"paramCond":' + '{"wei_zhi_zhuang_ta":"占用","yang_pin_bian_hao":"' + ypbh[num] +'","ru_ku_shi_jian_":"' + this_.dateFormat() + '"}}').then(res => {
-                        console.log("原本位置为空余 ,新位置更新成功")
+               /*
+                3、【任务分配2022/11/23 取消 直接 批量开检测子流程】
+                 3-1、根据 wtdAndYpb 的 wtID 更改委托表的 委托状态 wei_tuo_zhuang_ta 变成 已完成
+                 3-2、根据每个样品对应的检测项目,开启一个或多个任务 / 遍历样品表开检测子流程,一个样品可能对应多个检测
+                 3-3、委托表找zhan_shi_biao_id_ 修改  t_lhwtzsb "zhuang_tai_"为"待环境监控"
+               */
+
+               repostCurd('updates', '{"tableName":"t_lhwtsqb","paramWhere":[' + lhwtbID + '],"paramCond":{"wei_tuo_zhuang_ta":"已完成"}}')
+
+// console.log('dWhere : ',dWhere)
+
+          /* 2、更新货架位置信息(位置状态、样品编号、入库时间)如果是重复位置,则新增一条位置记录,并增加对应UUID   */
+          for (let num in dWhere) {
+              let sql = "select * from t_ypcfwz where id_ = '" + cfwzIdList[num] + "'"
+              repostCurd('sql', sql).then(response => {
+                let resArr = response.variables.data
+                if (resArr.length == 1) {
+                  if (resArr[0].wei_zhi_zhuang_ta == "空余") {
+                    repostCurd('update', '{"tableName":"t_ypcfwz","paramWhere":' + dWhere[num] + ',"paramCond":' + '{"wei_zhi_zhuang_ta":"占用","yang_pin_bian_hao":"' + ypbh[num] +'","ru_ku_shi_jian_":"' + this_.dateFormat() + '"}}').then(res => {
+                      // console.log("原本位置为空余 ,新位置更新成功")
+                    })
+                  } else if (resArr[0].wei_zhi_zhuang_ta == "占用") {
+                    // 新增一条新的位置记录,使用旧的位置记录 修改它的样品编号,入库时间,标识UUID
+                    let cfNewList = []
+                    let cfNew = {}
+                    cfNew["fang_jian_lei_xin"] = resArr[0].fang_jian_lei_xin
+                    cfNew["wei_zhi_"] = resArr[0].wei_zhi_
+                    cfNew["qu_yu_"] = resArr[0].qu_yu_
+                    cfNew["huo_jia_lei_xing_"] = resArr[0].huo_jia_lei_xing_
+                    cfNew["huo_jia_hao_"] = resArr[0].huo_jia_hao_
+                    cfNew["ceng_hao_"] = resArr[0].ceng_hao_
+                    cfNew["shui_ping_fen_qu_"] = resArr[0].shui_ping_fen_qu_
+                    cfNew["wei_zhi_bian_hao_"] = resArr[0].wei_zhi_bian_hao_
+                    cfNew["wei_zhi_zhuang_ta"] = resArr[0].wei_zhi_zhuang_ta
+                    cfNew["cun_chu_tiao_jian"] = resArr[0].cun_chu_tiao_jian
+                    cfNew["yang_pin_bian_hao"] = ypbh[num]
+                    // cfNew["yang_pin_bian_hao"] = lhypIdList[num]
+                    cfNew["ru_ku_shi_jian_"] = this_.dateFormat()
+                    cfNew["biao_zhi_uuid_"] = uuidList[num]
+                    cfNewList.push(cfNew)
+                    let uuid = cfNew["biao_zhi_uuid_"];
+                    // console.log('原本位置为占用 ,新位置插入成功')
+
+                    repostCurd('add', '{"tableName":"t_ypcfwz","paramWhere":' + JSON.stringify(cfNewList) + '}').then(res => {
+                      let selectsql = "select id_ from t_ypcfwz where biao_zhi_uuid_='" + uuid + "'";
+                      repostCurd('sql', selectsql).then(res => {
+                        let dataid = res.variables.data[0].id_;
+                        let abc = '{"biao_zhi_uuid_":"' + uuid + '"}'
+                        // console.log('zzj abc ',abc)
+                        // console.log('zzj dataid ',dataid)
+                        if (changeWeiZhi && !changesyWeiZhi) {
+                          repostCurd('update', '{"tableName":"t_lhypdjb","paramWhere":' + abc + ',"paramCond":' + '{"cun_fang_wei_zhi_":"' + dataid + '"}}').then(res => {
+                            // console.log('回填样品收样位置')
+                          })
+                        } else {
+                          repostCurd('update', '{"tableName":"t_lhypdjb","paramWhere":' + abc + ',"paramCond":' + '{"liu_yang_cun_fang":"' + dataid + '"}}').then(res => {
+                            // console.log('回填样品留样位置')
+                          })
+                        }
                       })
                       })
-                    } else if (resArr[0].wei_zhi_zhuang_ta == "占用") {
-                      // 新增一条新的位置记录,使用旧的位置记录 修改它的样品编号,入库时间,标识UUID
-                      let cfNewList = []
-                      let cfNew = {}
-                      cfNew["fang_jian_lei_xin"] = resArr[0].fang_jian_lei_xin
-                      cfNew["wei_zhi_"] = resArr[0].wei_zhi_
-                      cfNew["qu_yu_"] = resArr[0].qu_yu_
-                      cfNew["huo_jia_lei_xing_"] = resArr[0].huo_jia_lei_xing_
-                      cfNew["huo_jia_hao_"] = resArr[0].huo_jia_hao_
-                      cfNew["ceng_hao_"] = resArr[0].ceng_hao_
-                      cfNew["shui_ping_fen_qu_"] = resArr[0].shui_ping_fen_qu_
-                      cfNew["wei_zhi_bian_hao_"] = resArr[0].wei_zhi_bian_hao_
-                      cfNew["wei_zhi_zhuang_ta"] = resArr[0].wei_zhi_zhuang_ta
-                      cfNew["cun_chu_tiao_jian"] = resArr[0].cun_chu_tiao_jian
-                      cfNew["yang_pin_bian_hao"] = ypbh[num]
-                      // cfNew["yang_pin_bian_hao"] = lhypIdList[num]
-                      cfNew["ru_ku_shi_jian_"] = this_.dateFormat()
-                      cfNew["biao_zhi_uuid_"] = this_.uuid()
-                      cfNewList.push(cfNew)
-                      let uuid = cfNew["biao_zhi_uuid_"];
-                      console.log('原本位置为占用 ,新位置插入成功')
-
-                      repostCurd('add', '{"tableName":"t_ypcfwz","paramWhere":' + JSON.stringify(cfNewList) + '}').then(res => {
-                        let selectsql = "select id_ from t_ypcfwz where biao_zhi_uuid_='" + uuid + "'";
-                        repostCurd('sql', selectsql).then(res => {
-                          let dataid = res.variables.data[0].id_;
-                          let abc = '{"biao_zhi_uuid_":"' + uuid + '"}'
-                          // console.log('zzj abc ',abc)
-                          if (changeWeiZhi && !changesyWeiZhi) {
-                            // alert(1)
-                            repostCurd('update', '{"tableName":"t_lhypdjb","paramWhere":' + abc + ',"paramCond":' + '{"shou_yang_wei_zhi":"' + dataid + '"}}').then(res => {
-                              console.log('回填样品收样位置')
-                            })
-                          } else {
-                            // alert(2)
-                            repostCurd('update', '{"tableName":"t_lhypdjb","paramWhere":' + abc + ',"paramCond":' + '{"liu_yang_wei_zhi_":"' + dataid + '"}}').then(res => {
-                              console.log('回填样品留样位置')
-                            })
-                          }
-                        })
 
 
-                      })
-                    }
+                    })
                   }
                   }
-                })
-            }
+                }
+              })
+          }
+
+               let ffbSql = "select * from t_lhfbb where FIND_IN_SET( parent_id_,'"+ fbbIdStr +"')"
+               repostCurd('sql',ffbSql).then(response => {
+                 let ffbList = response.variables.data
+                 if(wtdAndYpb.length>0){
+                   let jcxmArr = []
+                   wtdAndYpb.forEach(item=>{
+                     item.jian_ce_xiang_mu_.split(',').reverse().forEach(temp=>{
+                       jcxmArr.push(temp)
+                     })
+                   })
+
+                   let allProject = []
+                   let finalJCTask = []
+                   let processDefKeyParam = []
+                   let processFormKeyParam = []
+                   let sql111 = `select id_, defkey_, formkey_ from t_mjjcnlfw where defkey_ != '' and find_in_set(id_, '${jcxmArr.join(',')}')`
+                   repostCurd('sql', sql111).then(res => {
+                        allProject = res.variables.data
+                        wtdAndYpb.forEach(item => {
+                          let yblxArr = []
+                          let yblxStr = ''
+                          yblxArr.push(item.yang_pin_lei_xing, item.yang_pin_lei_er_, item.yang_pin_lei_san_, item.yang_pin_lei_si_)
+                          yblxStr = yblxArr.filter(s => s).join(',')
+                          let t = item.jian_ce_xiang_mu_.split(',')
+                          let ypList = ypInfoList.find(k => k.id_ === item.id_)
+                          t.forEach(i => {
+                             let fbbItem = ffbList.find(j => j.jian_ce_xiang_mu_ === i)
+                             let jcxmItem = allProject.find(k => k.id_ === i)
+                             let obj = {
+                                 jian_ce_yuan_: fbbItem.jian_ce_yuan_,
+                                 fu_he_yuan_  : fbbItem.fu_he_yuan_,
+                                 yang_pin_ming_che: item.yang_pin_ming_che,
+                                 yang_pin_bian_hao: item.yang_pin_bian_hao,
+                                 jian_ce_xiang_mu_:jcxmItem.id_,
+                                 wei_tuo_id_:item.wtID,
+                                 he_tong_id_:item.he_tong_id_,
+                                 bao_gao_bian_zhi_:ypList.bao_gao_bian_zhi_,
+                                 bao_gao_fu_he_yua:ypList.bao_gao_shen_he_y,
+                                 wei_tuo_lei_xing_:item.wei_tuo_lei_xing_,
+                                 yang_pin_lei_xing: yblxStr,
+                                 xin_xiang_mu_ming:item.xiang_mu_ming_che,
+                                 wan_cheng_shi_jia:item.song_jian_shi_jia,
+                                 zhuang_tai_:'待环境监控',
+                                 zhan_shi_biao_id_:item.zhan_shi_biao_id_
+                             }
+                             finalJCTask.push(obj)
+                             processDefKeyParam.push(jcxmItem.defkey_)
+                             processFormKeyParam.push(jcxmItem.formkey_)
+                          })
+                        })
+
+
+                       finalJCTask.forEach((item,index )=>{
+                         let obj = {
+                           tableName:"t_lhjczb",
+                           paramWhere:[item],
+                           defKey:processDefKeyParam[index],
+                           formKey:processFormKeyParam[index]
+                         }
+                       repostCurd('add', JSON.stringify(obj))
+                       })
+                   })
+
+                   }
+
+               })
+
+              //更新展示表
+              if(lhwtzsbID.length > 0){
+                repostCurd('updates', '{"tableName":"t_lhwtzsb","paramWhere":['+lhwtzsbID+'],"paramCond":{"zhuang_tai_":"检测进行中"}}')
+              }
+
+            })
             this.$emit('callback', true)
             this.$emit('callback', true)
             this.visable = false
             this.visable = false
             this.$message({
             this.$message({
@@ -441,27 +543,6 @@ export default {
         return arr.indexOf(item, 0) === index;
         return arr.indexOf(item, 0) === index;
       });
       });
     },
     },
-   /* 提交数据
-    commitData(val){
-      for(let item of val) {
-             let dataWhere = [] //ajax的修改字段
-             dataWhere.push('{"tableName":"t_gdyrqcyp" + "," + "paramWhere":"id_:'+item.id_ +'" +","+    "shu_liang_":"'+ item.shu_liang_ +'"  +","+  "lingYongRen":"' + item.ling_yong_ren_ + '"  +","+  "cunFangWeiZhi":"' + item.cun_fang_wei_zhi_ + '"  +","+  "sign":"out"}')
-               // dataWhere.push('{"yangPinBianHao":"'+ item.yang_pin_bian_hao +'"  +","+  "lingYongRen":"' + item.ling_yong_ren_ + '"  +","+  "cunFangWeiZhi":"' + item.cun_fang_wei_zhi_ + '"  +","+  "shuLiang":"' + item.shu_liang_ + '"}')
-
-            // repostCurd('updateSample',"{data:'"+JSON.stringify(dataWhere)+"'}").then(response =>{
-            //   console.log(response)
-            // })
-
-            // this.Update('t_gdyrqcyp',{"id_":item.id_},"{data:'"+JSON.stringify(dataWhere)+"'}").then(response => {
-            //            this.$emit('callback', true)
-            //            this.visible = false
-            //            this.$message({
-            //                      message: '样品出库操作成功!',
-            //                      type: 'success'
-            //                    });
-            //          })
-               }
-    },*/
     Update (name,where,cond) {
     Update (name,where,cond) {
     	  let cont = {}
     	  let cont = {}
     	  cont['tableName'] = name
     	  cont['tableName'] = name

+ 5 - 2
src/views/system/jbdScan/scan.vue

@@ -4,6 +4,7 @@
     <component
     <component
     :is="currentScan"
     :is="currentScan"
     :scanVisible="scanVisible"
     :scanVisible="scanVisible"
+    :obj = "obj"
     @scanOff = "scanOff"/>
     @scanOff = "scanOff"/>
   </div>
   </div>
 </template>
 </template>
@@ -15,12 +16,14 @@ import material from './goods/material'
 import sample from './goods/sample'
 import sample from './goods/sample'
 import sampleConfirmation from './goods/sampleConfirmation'
 import sampleConfirmation from './goods/sampleConfirmation'
 import manualConfirmation from './goods/manualConfirmation'
 import manualConfirmation from './goods/manualConfirmation'
+import tag from './goods/tag'
 
 
 export default {
 export default {
-  components: { facility,material,sample,sampleConfirmation,manualConfirmation},
+  components: { facility,material,sample,sampleConfirmation,manualConfirmation,tag},
   props:{
   props:{
     currentScan:String,
     currentScan:String,
-    scanVisible:Boolean
+    scanVisible:Boolean,
+    obj:String
   },
   },
 
 
   methods:{
   methods:{