浏览代码

update duo liuyang

ZZJ 2 年之前
父节点
当前提交
b3cf7b2ca4

+ 94 - 12
src/views/system/jbdScan/goods/manualConfirmation.vue

@@ -136,6 +136,21 @@
                                     </template>
                                 </el-form-item>
                             </el-col>
+                            <el-col :span="6">
+                                <el-form-item label="是否留样" class="zzj">
+                                <template slot-scope="scope">
+                                    <el-select v-model="item.shi_fou_liu_yang_yi" placeholder="请选择"
+                                        @change="ifLiuYangChange_One(index)">
+                                    <el-option
+                                        v-for="item in ifLY"
+                                        :key="item.value"
+                                        :label="item.label"
+                                        :value="item.value">
+                                    </el-option>
+                                    </el-select>
+                                </template>
+                                </el-form-item>
+                            </el-col>
                             <el-col :span="6">
                             <el-form-item label="留样数量(一)" required class="zzj">
                                 <template slot-scope="scope">
@@ -217,6 +232,21 @@
                                     </template>
                                 </el-form-item>
                             </el-col>
+                            <el-col :span="6">
+                                <el-form-item label="是否留样" class="zzj">
+                                <template slot-scope="scope">
+                                    <el-select v-model="item.shi_fou_liu_yang_er" placeholder="请选择"
+                                        @change="ifLiuYangChange_Two(index)">
+                                    <el-option
+                                        v-for="item in ifLY"
+                                        :key="item.value"
+                                        :label="item.label"
+                                        :value="item.value">
+                                    </el-option>
+                                    </el-select>
+                                </template>
+                                </el-form-item>
+                            </el-col>
                             <el-col :span="6">
                             <el-form-item label="留样数量(二)" required class="zzj">
                                 <template slot-scope="scope">
@@ -297,6 +327,21 @@
                                     </template>
                                 </el-form-item>
                             </el-col>
+                            <el-col :span="6">
+                                <el-form-item label="是否留样" class="zzj">
+                                <template slot-scope="scope">
+                                    <el-select v-model="item.shi_fou_liu_yang_san" placeholder="请选择"
+                                        @change="ifLiuYangChange_Three(index)">
+                                    <el-option
+                                        v-for="item in ifLY"
+                                        :key="item.value"
+                                        :label="item.label"
+                                        :value="item.value">
+                                    </el-option>
+                                    </el-select>
+                                </template>
+                                </el-form-item>
+                            </el-col>
                             <el-col :span="6">
                             <el-form-item label="留样数量(三)" required class="zzj">
                                 <template slot-scope="scope">
@@ -377,6 +422,21 @@
                                     </template>
                                 </el-form-item>
                             </el-col>
+                            <el-col :span="6">
+                                <el-form-item label="是否留样" class="zzj">
+                                <template slot-scope="scope">
+                                    <el-select v-model="item.shi_fou_liu_yang_si" placeholder="请选择"
+                                        @change="ifLiuYangChange_Four(index)">
+                                    <el-option
+                                        v-for="item in ifLY"
+                                        :key="item.value"
+                                        :label="item.label"
+                                        :value="item.value">
+                                    </el-option>
+                                    </el-select>
+                                </template>
+                                </el-form-item>
+                            </el-col>
                             <el-col :span="6">
                             <el-form-item label="留样数量(四)" required class="zzj">
                                 <template slot-scope="scope">
@@ -413,7 +473,7 @@
                         </el-row>  
                         
                         <el-row>
-                            <el-col :span="6">
+                            <!-- <el-col :span="6">
                                 <el-form-item label="是否留样">
                                 <template slot-scope="scope">
                                     <el-select v-model="item.shi_fou_liu_yang_" placeholder="请选择"
@@ -427,7 +487,7 @@
                                     </el-select>
                                 </template>
                                 </el-form-item>
-                            </el-col>
+                            </el-col> -->
                           <el-col :span="6">
                             <el-form-item label="留样日期">
                               <template slot-scope="scope">
@@ -802,20 +862,42 @@ import * as dayjs from 'dayjs'
         item.jie_yang_shu_lian = total
     },
     ifLiuYangChange(item,index){
-        // console.log(index)
-        if(this.listData[index].shi_fou_liu_yang_ == '否'){
-            this.listData[index].liu_yang_ri_qi_ = null
-            this.listData[index].liu_yang_qi_xian = null
+        console.log(index)
+        // if(this.listData[index].shi_fou_liu_yang_ == '否'){
+        //     this.listData[index].liu_yang_ri_qi_ = null
+        //     this.listData[index].liu_yang_qi_xian = null
+        //     this.listData[index].liu_yang_shu_lian_yi = null
+        //     this.listData[index].liu_yang_shu_lian_er = null
+        //     this.listData[index].liu_yang_shu_lian_san = null
+        //     this.listData[index].liu_yang_shu_lian_si = null
+
+        //     this.listData[index].liu_yang_wei_zhi_yi = null
+        //     this.listData[index].liu_yang_wei_zhi_er = null
+        //     this.listData[index].liu_yang_wei_zhi_san = null
+        //     this.listData[index].liu_yang_wei_zhi_si = null
+        //     // todo 更新留样位置1-4
+        // }
+    },
+    ifLiuYangChange_One(index){
+        if(this.listData[index].shi_fou_liu_yang_yi == '否'){
             this.listData[index].liu_yang_shu_lian_yi = null
+        }
+    },
+    ifLiuYangChange_Two(index){
+        if(this.listData[index].shi_fou_liu_yang_er == '否'){
             this.listData[index].liu_yang_shu_lian_er = null
+        }
+    },
+    
+    ifLiuYangChange_Three(index){
+        if(this.listData[index].shi_fou_liu_yang_san == '否'){
             this.listData[index].liu_yang_shu_lian_san = null
+        }
+    },
+    
+    ifLiuYangChange_Four(index){
+        if(this.listData[index].shi_fou_liu_yang_si == '否'){
             this.listData[index].liu_yang_shu_lian_si = null
-
-            this.listData[index].liu_yang_wei_zhi_yi = null
-            this.listData[index].liu_yang_wei_zhi_er = null
-            this.listData[index].liu_yang_wei_zhi_san = null
-            this.listData[index].liu_yang_wei_zhi_si = null
-            // todo 更新留样位置1-4
         }
     }
   }

+ 92 - 25
src/views/system/jbdScan/goods/sampleConfirmation.vue

@@ -135,6 +135,21 @@
                                 </template>
                                 </el-form-item>
                             </el-col>
+                            <el-col :span="6">
+                                <el-form-item label="是否留样" class="zzj">
+                                <template slot-scope="scope">
+                                    <el-select v-model="item.shi_fou_liu_yang_yi" placeholder="请选择"
+                                        @change="ifLiuYangChange_One(index)">
+                                    <el-option
+                                        v-for="item in ifLY"
+                                        :key="item.value"
+                                        :label="item.label"
+                                        :value="item.value">
+                                    </el-option>
+                                    </el-select>
+                                </template>
+                                </el-form-item>
+                            </el-col>
                             <el-col :span="6">
                             <el-form-item label="留样数量(一)" required class="zzj">
                                 <template slot-scope="scope">
@@ -215,6 +230,21 @@
                                     </template>
                                 </el-form-item>
                             </el-col>
+                            <el-col :span="6">
+                                <el-form-item label="是否留样" class="zzj">
+                                <template slot-scope="scope">
+                                    <el-select v-model="item.shi_fou_liu_yang_er" placeholder="请选择"
+                                        @change="ifLiuYangChange_Two(index)">
+                                    <el-option
+                                        v-for="item in ifLY"
+                                        :key="item.value"
+                                        :label="item.label"
+                                        :value="item.value">
+                                    </el-option>
+                                    </el-select>
+                                </template>
+                                </el-form-item>
+                            </el-col>
                             <el-col :span="6">
                             <el-form-item label="留样数量(二)" required class="zzj">
                                 <template slot-scope="scope">
@@ -295,6 +325,21 @@
                                     </template>
                                 </el-form-item>
                             </el-col>
+                            <el-col :span="6">
+                                <el-form-item label="是否留样" class="zzj">
+                                <template slot-scope="scope">
+                                    <el-select v-model="item.shi_fou_liu_yang_san" placeholder="请选择"
+                                        @change="ifLiuYangChange_Three(index)">
+                                    <el-option
+                                        v-for="item in ifLY"
+                                        :key="item.value"
+                                        :label="item.label"
+                                        :value="item.value">
+                                    </el-option>
+                                    </el-select>
+                                </template>
+                                </el-form-item>
+                            </el-col>
                             <el-col :span="6">
                             <el-form-item label="留样数量(三)" required class="zzj">
                                 <template slot-scope="scope">
@@ -376,6 +421,21 @@
                                     </template>
                                 </el-form-item>
                             </el-col>
+                            <el-col :span="6">
+                                <el-form-item label="是否留样" class="zzj">
+                                <template slot-scope="scope">
+                                    <el-select v-model="item.shi_fou_liu_yang_si" placeholder="请选择"
+                                        @change="ifLiuYangChange_Four(index)">
+                                    <el-option
+                                        v-for="item in ifLY"
+                                        :key="item.value"
+                                        :label="item.label"
+                                        :value="item.value">
+                                    </el-option>
+                                    </el-select>
+                                </template>
+                                </el-form-item>
+                            </el-col>
                             <el-col :span="6">
                             <el-form-item label="留样数量(四)" required class="zzj">
                                 <template slot-scope="scope">
@@ -393,21 +453,6 @@
                         </el-row>   
 
                         <el-row>
-                          <el-col :span="6">
-                            <el-form-item label="是否留样">
-                              <template slot-scope="scope">
-                                 <el-select v-model="item.shi_fou_liu_yang_" placeholder="请选择"
-                                 @change="ifLiuYangChange(item,index)">
-                                   <el-option
-                                     v-for="item in ifLY"
-                                     :key="item.value"
-                                     :label="item.label"
-                                     :value="item.value">
-                                   </el-option>
-                                 </el-select>
-                              </template>
-                            </el-form-item>
-                          </el-col>
                          
                           <!-- <el-col :span="6">
                             <el-form-item label="留样存放位置" required>
@@ -773,20 +818,42 @@ import * as dayjs from 'dayjs'
         item.jie_yang_shu_lian = total
     },
     ifLiuYangChange(item,index){
-        // console.log(index)
-        if(this.listData[index].shi_fou_liu_yang_ == '否'){
-            this.listData[index].liu_yang_ri_qi_ = null
-            this.listData[index].liu_yang_qi_xian = null
+        console.log(index)
+        // if(this.listData[index].shi_fou_liu_yang_ == '否'){
+        //     this.listData[index].liu_yang_ri_qi_ = null
+        //     this.listData[index].liu_yang_qi_xian = null
+        //     this.listData[index].liu_yang_shu_lian_yi = null
+        //     this.listData[index].liu_yang_shu_lian_er = null
+        //     this.listData[index].liu_yang_shu_lian_san = null
+        //     this.listData[index].liu_yang_shu_lian_si = null
+
+        //     this.listData[index].liu_yang_wei_zhi_yi = null
+        //     this.listData[index].liu_yang_wei_zhi_er = null
+        //     this.listData[index].liu_yang_wei_zhi_san = null
+        //     this.listData[index].liu_yang_wei_zhi_si = null
+        //     // todo 更新留样位置1-4
+        // }
+    },
+    ifLiuYangChange_One(index){
+        if(this.listData[index].shi_fou_liu_yang_yi == '否'){
             this.listData[index].liu_yang_shu_lian_yi = null
+        }
+    },
+    ifLiuYangChange_Two(index){
+        if(this.listData[index].shi_fou_liu_yang_er == '否'){
             this.listData[index].liu_yang_shu_lian_er = null
+        }
+    },
+    
+    ifLiuYangChange_Three(index){
+        if(this.listData[index].shi_fou_liu_yang_san == '否'){
             this.listData[index].liu_yang_shu_lian_san = null
+        }
+    },
+    
+    ifLiuYangChange_Four(index){
+        if(this.listData[index].shi_fou_liu_yang_si == '否'){
             this.listData[index].liu_yang_shu_lian_si = null
-
-            this.listData[index].liu_yang_wei_zhi_yi = null
-            this.listData[index].liu_yang_wei_zhi_er = null
-            this.listData[index].liu_yang_wei_zhi_san = null
-            this.listData[index].liu_yang_wei_zhi_si = null
-            // todo 更新留样位置1-4
         }
     }
   }

+ 131 - 53
src/views/system/jbdScan/js/manualConfirmationJS.js

@@ -68,7 +68,11 @@ export default {
                         item.biao_zhi_uuid_2 = this.uuid()
                         item.biao_zhi_uuid_3 = this.uuid()
                         item.biao_zhi_uuid_4 = this.uuid()
-                        item.shi_fou_liu_yang_ = '是'
+                        // item.shi_fou_liu_yang_ = '是'
+                        item.shi_fou_liu_yang_yi = '是'
+                        item.shi_fou_liu_yang_er = '是'
+                        item.shi_fou_liu_yang_san = '是'
+                        item.shi_fou_liu_yang_si = '是'
                         item.yan_shou_jie_guo_ = '完好'
                         item.liu_yang_shu_lian_yi = ' ml/支×1支'
                         item.shou_yang_wei_zhi_yi = cfID
@@ -84,7 +88,6 @@ export default {
                         item.yang_pin_lei_san_ ? this.$set(item, 'flag3', true) : this.$set(item, 'flag3', false)
                         item.yang_pin_lei_si_ ? this.$set(item, 'flag4', true) : this.$set(item, 'flag4', false)
                         item.liu_yang_qi_xian = dayjs(item.song_jian_shi_jia).add(rq, 'month').format("YYYY-MM-DD")
-                        
                         // temp[i].xiao_hui_ri_qi_ = dayjs(temp[i].liu_yang_qi_xian).endOf('month').format("YYYY-MM-DD")
                     })
                     this.listData = temp
@@ -99,9 +102,6 @@ export default {
             let liuYangSQL = `select liu_yang_qi_xian_ from t_lyqxpzb limit 1`
             let cfIDSQL = `select cun_fang_id_,liu_yang_id_ FROM t_ypwzmrxzb`
             Promise.all([repostCurd('sql', fysql), repostCurd('sql', liuYangSQL),repostCurd('sql',cfIDSQL)]).then(([res1,res2,res3]) => {
-                // console.log(res1)
-                // console.log(res2)
-                // console.log(res3)
                 let cfID = res3.variables.data[0].cun_fang_id_
                 let lyID = res3.variables.data[0].liu_yang_id_
                 this.listData = []
@@ -116,7 +116,11 @@ export default {
                         item.biao_zhi_uuid_2 = this.uuid()
                         item.biao_zhi_uuid_3 = this.uuid()
                         item.biao_zhi_uuid_4 = this.uuid()
-                        item.shi_fou_liu_yang_ = '是'
+                        // item.shi_fou_liu_yang_ = '是'
+                        item.shi_fou_liu_yang_yi = '是'
+                        item.shi_fou_liu_yang_er = '是'
+                        item.shi_fou_liu_yang_san = '是'
+                        item.shi_fou_liu_yang_si = '是'
                         item.yan_shou_jie_guo_ = '完好'
                         item.liu_yang_shu_lian_yi = ' ml/支×1支'
                         item.shou_yang_wei_zhi_yi = cfID
@@ -176,6 +180,11 @@ export default {
             })
             this.closeDialog();
         },
+        handleErrorData(msg){
+            const { error } = this.$form.$message
+            error(`${msg}`)
+            return
+        },
         submitData(type) {
             // this指针
             let this_ = this;
@@ -242,33 +251,71 @@ export default {
                             this_.$message.error('操作失败,[' + ypInfoList[yp].yang_pin_ming_che + '] 验收结果不能为空!')
                             return;
                         }
-                        if (ypInfoList[yp].shi_fou_liu_yang_ == null || ypInfoList[yp].shi_fou_liu_yang_ == '') {
-                            this_.$message.error('操作失败,[' + ypInfoList[yp].yang_pin_ming_che + '] 是否留样不能为空!')
-                            return;
-                        }
-                        if (ypInfoList[yp].shi_fou_liu_yang_ == "是") {
+                        // if (ypInfoList[yp].shi_fou_liu_yang_ == null || ypInfoList[yp].shi_fou_liu_yang_ == '') {
+                        //     this_.$message.error('操作失败,[' + ypInfoList[yp].yang_pin_ming_che + '] 是否留样不能为空!')
+                        //     return;
+                        // }
+                        /** 如果四个是否留样中有一个为‘是’ 则 留样日期 和对应的留样位置就不能为空 */
+                        // ypInfoList[yp].shou_yang_wei_zhi_yi == null || ypInfoList[yp].shou_yang_wei_zhi_yi == ''
+                        if (ypInfoList[yp].shi_fou_liu_yang_yi == "是" ||
+                         (ypInfoList[yp].flag2 == true && ypInfoList[yp].shi_fou_liu_yang_er == "是") ||
+                          (ypInfoList[yp].flag3 == true && ypInfoList[yp].shi_fou_liu_yang_san == "是") ||
+                           (ypInfoList[yp].flag4 == true && ypInfoList[yp].shi_fou_liu_yang_si == "是")) {
                             if (ypInfoList[yp].liu_yang_ri_qi_ == null || ypInfoList[yp].liu_yang_ri_qi_ == '') {
-                                this_.$message.error("留样时必须填写留样日期!")
+                                this_.$message.error('留样时必须填写留样日期!')
                                 return;
+                                // this_.handleErrorData("") todo 失效
                             }
-                            // 判断位置是否为空
-                            if (ypInfoList[yp].liu_yang_wei_zhi_yi == null || ypInfoList[yp].liu_yang_wei_zhi_yi == '') {
-                                this_.$message.error('操作失败,[' + ypInfoList[yp].yang_pin_ming_che + '] 类型1的留样位置选择不能为空!')
-                                return;
+                            if(ypInfoList[yp].shi_fou_liu_yang_yi == "是"){
+                                // 判断位置是否为空
+                                if (ypInfoList[yp].liu_yang_wei_zhi_yi == null || ypInfoList[yp].liu_yang_wei_zhi_yi == '') {
+                                    this_.$message.error('操作失败,[' + ypInfoList[yp].yang_pin_ming_che + '] 类型1的留样位置选择不能为空!')
+                                    return;
+                                }
+                                if(ypInfoList[yp].liu_yang_shu_lian_yi == null || ypInfoList[yp].liu_yang_shu_lian_yi == ''){
+                                    this_.$message.error('操作失败,[' + ypInfoList[yp].yang_pin_ming_che + '] 类型1的留样数量不能为空!')
+                                    return;
+                                }
                             }
-                            if (ypInfoList[yp].flag2 == true && (ypInfoList[yp].liu_yang_wei_zhi_er == '' || ypInfoList[yp].liu_yang_wei_zhi_er == null)) {
-                                this_.$message.error('操作失败,[' + ypInfoList[yp].yang_pin_ming_che + '] 类型2的留样位置选择不能为空!')
-                                return;
+                            if(ypInfoList[yp].shi_fou_liu_yang_er == "是"){
+                                if(ypInfoList[yp].flag2 == true){
+                                    if (ypInfoList[yp].liu_yang_wei_zhi_er == '' || ypInfoList[yp].liu_yang_wei_zhi_er == null) {
+                                        this_.$message.error('操作失败,[' + ypInfoList[yp].yang_pin_ming_che + '] 类型2的留样位置选择不能为空!')
+                                        return;
+                                    }
+                                    if(ypInfoList[yp].liu_yang_shu_lian_er == null || ypInfoList[yp].liu_yang_shu_lian_er == ''){
+                                        this_.$message.error('操作失败,[' + ypInfoList[yp].yang_pin_ming_che + '] 类型2的留样数量不能为空!')
+                                        return;
+                                    }
+                                }
                             }
-                            if (ypInfoList[yp].flag3 == true && (ypInfoList[yp].liu_yang_wei_zhi_san == '' || ypInfoList[yp].liu_yang_wei_zhi_san == null)) {
-                                this_.$message.error('操作失败,[' + ypInfoList[yp].yang_pin_ming_che + '] 类型3的留样位置选择不能为空!')
-                                return;
+                            if(ypInfoList[yp].shi_fou_liu_yang_san == "是"){
+                                if(ypInfoList[yp].flag3 == true ){
+                                    if (ypInfoList[yp].liu_yang_wei_zhi_san == '' || ypInfoList[yp].liu_yang_wei_zhi_san == null) {
+                                        this_.$message.error('操作失败,[' + ypInfoList[yp].yang_pin_ming_che + '] 类型3的留样位置选择不能为空!')
+                                        return;
+                                    }
+                                    if(ypInfoList[yp].liu_yang_shu_lian_san == null || ypInfoList[yp].liu_yang_shu_lian_san == ''){
+                                        this_.$message.error('操作失败,[' + ypInfoList[yp].yang_pin_ming_che + '] 类型3的留样数量不能为空!')
+                                        return;
+                                    }
+                                }
+
                             }
-                            if (ypInfoList[yp].flag4 == true && (ypInfoList[yp].liu_yang_wei_zhi_si == '' || ypInfoList[yp].liu_yang_wei_zhi_si == null)) {
-                                this_.$message.error('操作失败,[' + ypInfoList[yp].yang_pin_ming_che + '] 类型4的留样位置选择不能为空!')
-                                return;
+                            if(ypInfoList[yp].shi_fou_liu_yang_si == "是"){
+                                if(ypInfoList[yp].flag4 == true ){
+                                    if (ypInfoList[yp].liu_yang_wei_zhi_si == '' || ypInfoList[yp].liu_yang_wei_zhi_si == null) {
+                                        this_.$message.error('操作失败,[' + ypInfoList[yp].yang_pin_ming_che + '] 类型4的留样位置选择不能为空!')
+                                        return;
+                                    }
+                                    if(ypInfoList[yp].liu_yang_shu_lian_si == null || ypInfoList[yp].liu_yang_shu_lian_si == ''){
+                                        this_.$message.error('操作失败,[' + ypInfoList[yp].yang_pin_ming_che + '] 类型4的留样数量不能为空!')
+                                        return;
+                                    }
+                                }
                             }
                         }
+
                         // 判断位置是否为空
                         if (ypInfoList[yp].shou_yang_wei_zhi_yi == null || ypInfoList[yp].shou_yang_wei_zhi_yi == '') {
                             this_.$message.error('操作失败,[' + ypInfoList[yp].yang_pin_ming_che + '] 类型1的位置选择不能为空!')
@@ -365,28 +412,28 @@ export default {
                         ypInfoList.forEach(item => {
                             allUUID.push(item.biao_zhi_uuid_1, item.biao_zhi_uuid_2, item.biao_zhi_uuid_3, item.biao_zhi_uuid_4)
                             let allResult = []
-                            if(item.shou_yang_wei_zhi_yi != undefined){
+                            if(item.shou_yang_wei_zhi_yi != undefined && item.shou_yang_wei_zhi_yi){
                                 allResult.push(this.handleLocationInfo(item.shou_yang_wei_zhi_yi, '否', localInfo, locationIds, item, item.biao_zhi_uuid_1, currentTime,item.yang_pin_lei_xing,item.liu_yang_shu_lian_yi))
                             }
-                            if (item.shou_yang_wei_zhi_er != undefined) {
+                            if (item.shou_yang_wei_zhi_er != undefined && item.shou_yang_wei_zhi_er) {
                                 allResult.push(this.handleLocationInfo(item.shou_yang_wei_zhi_er, '否', localInfo, locationIds, item, item.biao_zhi_uuid_2, currentTime,item.yang_pin_lei_er_,item.liu_yang_shu_lian_er))
                             }
-                            if (item.shou_yang_wei_zhi_san != undefined) {
+                            if (item.shou_yang_wei_zhi_san != undefined && item.shou_yang_wei_zhi_san) {
                                 allResult.push(this.handleLocationInfo(item.shou_yang_wei_zhi_san, '否', localInfo, locationIds, item, item.biao_zhi_uuid_3, currentTime,item.yang_pin_lei_san_,item.liu_yang_shu_lian_san))
                             }
-                            if (item.shou_yang_wei_zhi_si != undefined) {
+                            if (item.shou_yang_wei_zhi_si != undefined && item.shou_yang_wei_zhi_si) {
                                 allResult.push(this.handleLocationInfo(item.shou_yang_wei_zhi_si, '否', localInfo, locationIds, item, item.biao_zhi_uuid_4, currentTime,item.yang_pin_lei_si_,item.liu_yang_shu_lian_si))
                             }
-                            if(item.liu_yang_wei_zhi_yi){
+                            if(item.liu_yang_wei_zhi_yi != undefined && item.liu_yang_wei_zhi_yi && item.shi_fou_liu_yang_yi === '是'){
                                 allResult.push(this.handleLocationInfo(item.liu_yang_wei_zhi_yi, '是', localInfo, locationIds, item, item.biao_zhi_uuid_1, currentTime,item.yang_pin_lei_xing,item.liu_yang_shu_lian_yi))
                             }
-                            if (item.liu_yang_wei_zhi_er != undefined) {
+                            if (item.liu_yang_wei_zhi_er != undefined && item.liu_yang_wei_zhi_er && item.shi_fou_liu_yang_er === '是') {
                                 allResult.push(this.handleLocationInfo(item.liu_yang_wei_zhi_er, '是', localInfo, locationIds, item, item.biao_zhi_uuid_2, currentTime,item.yang_pin_lei_er_,item.liu_yang_shu_lian_er))
                             }
-                            if (item.liu_yang_wei_zhi_san != undefined) {
+                            if (item.liu_yang_wei_zhi_san != undefined && item.liu_yang_wei_zhi_san && item.shi_fou_liu_yang_san === '是') {
                                 allResult.push(this.handleLocationInfo(item.liu_yang_wei_zhi_san, '是', localInfo, locationIds, item, item.biao_zhi_uuid_3, currentTime,item.yang_pin_lei_san_,item.liu_yang_shu_lian_san))
                             }
-                            if (item.liu_yang_wei_zhi_si != undefined) {
+                            if (item.liu_yang_wei_zhi_si != undefined && item.liu_yang_wei_zhi_si && item.shi_fou_liu_yang_si === '是') {
                                 allResult.push(this.handleLocationInfo(item.liu_yang_wei_zhi_si, '是', localInfo, locationIds, item, item.biao_zhi_uuid_4, currentTime,item.yang_pin_lei_si_,item.liu_yang_shu_lian_si))
                             }
                             allResult.forEach(item => {
@@ -394,14 +441,15 @@ export default {
                             })
                         })
                         let allUUIDStr = allUUID.filter(i => i).join(',')
-                        // console.log(allUUIDStr)
                         // 更新样品位置list
                         // console.log('emptyLocal:',this.emptyLocal)
-                        let allParams = {
-                            tableName: 't_ypcfwz',
-                            updList: this.emptyLocal
+                        if(this.emptyLocal.length > 0){
+                            let allParams = {
+                                tableName: 't_ypcfwz',
+                                updList: this.emptyLocal
+                            }
+                            repostCurd('updatesByWhere', JSON.stringify(allParams))
                         }
-                        repostCurd('updatesByWhere', JSON.stringify(allParams))
                         // 插入样品位置list
                         // console.log('fullLocal:',this.fullLocal)
                         repostCurd('add', '{"tableName":"t_ypcfwz","paramWhere":' + JSON.stringify(this.fullLocal) + '}').then(res => {
@@ -449,14 +497,42 @@ export default {
                                         xmmc.push(item.chang_gui_xiang_m, item.tao_can_ming_chen)
                                         let xiangMuZh = xmmc.filter(i => i).join(',')
 
-                                        let yblx = c == 0 ? ypInfoList[index].yang_pin_lei_xing : c == 1 ? ypInfoList[index].yang_pin_lei_er_ : c == 2 ? ypInfoList[index].yang_pin_lei_san_ : c == 3 ? ypInfoList[index].yang_pin_lei_si_ : ''
-                                        let ystj = c == 0 ? ypInfoList[index].yang_ben_yun_shu_ : c == 1 ? ypInfoList[index].yang_pin_yun_shu_ : c == 2 ? ypInfoList[index].yang_pin_yun_san : c == 3 ? ypInfoList[index].yang_pin_yun_si_ : ''
-                                        let ypsl = c == 0 ? ypInfoList[index].shu_liang_ : c == 1 ? ypInfoList[index].shu_liang_er_ : c == 2 ? ypInfoList[index].shu_liang_san_ : c == 3 ? ypInfoList[index].shu_liang_si_ : ''
-                                        let ybgg = c == 0 ? ypInfoList[index].yang_pin_gui_ge_ : c == 1 ? ypInfoList[index].yang_pin_gui_ge_e : c == 2 ? ypInfoList[index].yang_pin_gui_ge_s : c == 3 ? ypInfoList[index].yang_pin_gui_si_ : ''
-                                        let sywz = c == 0 ? ypInfoList[index].shou_yang_wei_zhi_yi : c == 1 ? ypInfoList[index].shou_yang_wei_zhi_er : c == 2 ? ypInfoList[index].shou_yang_wei_zhi_san : c == 3 ? ypInfoList[index].shou_yang_wei_zhi_si : ''
-                                        let lycf = c == 0 ? ypInfoList[index].liu_yang_wei_zhi_yi : c == 1 ? ypInfoList[index].liu_yang_wei_zhi_er : c == 2 ? ypInfoList[index].liu_yang_wei_zhi_san : c == 3 ? ypInfoList[index].liu_yang_wei_zhi_si : ''
-                                        let lysl = c == 0 ? ypInfoList[index].liu_yang_shu_lian_yi : c == 1 ? ypInfoList[index].liu_yang_shu_lian_er : c == 2 ? ypInfoList[index].liu_yang_shu_lian_san : c == 3 ? ypInfoList[index].liu_yang_shu_lian_si : ''
-                                        let currentUUID = c == 0 ? ypInfoList[index].biao_zhi_uuid_1 : c == 1 ? ypInfoList[index].biao_zhi_uuid_2 : c == 2 ? ypInfoList[index].biao_zhi_uuid_3 : c == 3 ? ypInfoList[index].biao_zhi_uuid_4 : ''
+                                        let yblx = c == 0 ? ypInfoList[index].yang_pin_lei_xing :
+                                                   c == 1 ? ypInfoList[index].yang_pin_lei_er_  : 
+                                                   c == 2 ? ypInfoList[index].yang_pin_lei_san_ : 
+                                                   c == 3 ? ypInfoList[index].yang_pin_lei_si_  : ''
+                                        let ystj = c == 0 ? ypInfoList[index].yang_ben_yun_shu_ : 
+                                                   c == 1 ? ypInfoList[index].yang_pin_yun_shu_ : 
+                                                   c == 2 ? ypInfoList[index].yang_pin_yun_san  : 
+                                                   c == 3 ? ypInfoList[index].yang_pin_yun_si_  : ''
+                                        let ypsl = c == 0 ? ypInfoList[index].shu_liang_ : 
+                                                   c == 1 ? ypInfoList[index].shu_liang_er_ : 
+                                                   c == 2 ? ypInfoList[index].shu_liang_san_ : 
+                                                   c == 3 ? ypInfoList[index].shu_liang_si_ : ''
+                                        let ybgg = c == 0 ? ypInfoList[index].yang_pin_gui_ge_ : 
+                                                   c == 1 ? ypInfoList[index].yang_pin_gui_ge_e : 
+                                                   c == 2 ? ypInfoList[index].yang_pin_gui_ge_s : 
+                                                   c == 3 ? ypInfoList[index].yang_pin_gui_si_ : ''
+                                        let sywz = c == 0 ? ypInfoList[index].shou_yang_wei_zhi_yi : 
+                                                   c == 1 ? ypInfoList[index].shou_yang_wei_zhi_er : 
+                                                   c == 2 ? ypInfoList[index].shou_yang_wei_zhi_san : 
+                                                   c == 3 ? ypInfoList[index].shou_yang_wei_zhi_si : ''
+                                        let lycf = c == 0 ? ypInfoList[index].liu_yang_wei_zhi_yi : 
+                                                   c == 1 ? ypInfoList[index].liu_yang_wei_zhi_er : 
+                                                   c == 2 ? ypInfoList[index].liu_yang_wei_zhi_san : 
+                                                   c == 3 ? ypInfoList[index].liu_yang_wei_zhi_si : ''
+                                        let lysl = c == 0 ? ypInfoList[index].liu_yang_shu_lian_yi : 
+                                                   c == 1 ? ypInfoList[index].liu_yang_shu_lian_er : 
+                                                   c == 2 ? ypInfoList[index].liu_yang_shu_lian_san : 
+                                                   c == 3 ? ypInfoList[index].liu_yang_shu_lian_si : ''
+                                        let currentUUID = c == 0 ? ypInfoList[index].biao_zhi_uuid_1 : 
+                                                          c == 1 ? ypInfoList[index].biao_zhi_uuid_2 : 
+                                                          c == 2 ? ypInfoList[index].biao_zhi_uuid_3 : 
+                                                          c == 3 ? ypInfoList[index].biao_zhi_uuid_4 : ''
+                                        let ifLy = c == 0 ? ypInfoList[index].shi_fou_liu_yang_yi : 
+                                                   c == 1 ? ypInfoList[index].shi_fou_liu_yang_er :
+                                                   c == 2 ? ypInfoList[index].shi_fou_liu_yang_san: 
+                                                   c == 3 ? ypInfoList[index].shi_fou_liu_yang_si : ''
                                         let obj = {
                                             wei_tuo_dan_hao_: item.wei_tuo_bian_hao_,
                                             wei_tuo_dan_wei_: item.wtdh,
@@ -479,11 +555,11 @@ export default {
                                             yan_shou_jie_guo_: ypInfoList[index].yan_shou_jie_guo_,
                                             cun_fang_wei_zhi_: sywz,
                                             liu_zhuan_zhuang_: '待任务分配',
-                                            shi_fou_liu_yang_: ypInfoList[index].shi_fou_liu_yang_,
-                                            liu_yang_ri_qi_: ypInfoList[index].liu_yang_ri_qi_,
-                                            liu_yang_cun_fang: lycf,
-                                            liu_yang_shu_lian: lysl,
-                                            liu_yang_qi_xian: ypInfoList[index].liu_yang_qi_xian,
+                                            shi_fou_liu_yang_: ifLy,
+                                            liu_yang_ri_qi_: ifLy == '是'? ypInfoList[index].liu_yang_ri_qi_:'',
+                                            liu_yang_cun_fang: ifLy == '是'?lycf:'',
+                                            liu_yang_shu_lian: lysl == null ?'':lysl,
+                                            liu_yang_qi_xian: ifLy == '是'? ypInfoList[index].liu_yang_qi_xian:'',
                                             xiao_hui_ri_qi_: ypInfoList[index].xiao_hui_ri_qi_,
                                             fan_yang_ri_qi_: ypInfoList[index].fan_yang_ri_qi_,
                                             fan_yang_jyr: ypInfoList[index].fan_yang_jyr,
@@ -492,6 +568,7 @@ export default {
                                             jian_ce_xiang_mu_: xiangMuZh,
                                             shou_yang_ren_:this.$store.getters.userInfo.user.name
                                         }
+                                        // console.log(obj)
                                         ypdjb.push(obj)
                                     }
                                     // 2-2:封装任务分配表
@@ -592,6 +669,7 @@ export default {
         },
         // 根据旧位置数据生成新位置数据
         generateNewLocation(oldLocation, sampleInfo) {
+            // console.log(oldLocation)
             let temp = {
                 fang_jian_lei_xin: oldLocation.fang_jian_lei_xin,
                 wei_zhi_: oldLocation.wei_zhi_,
@@ -628,7 +706,7 @@ export default {
                         yang_pin_ming_che: item.yang_pin_ming_che,
                         shi_fou_liu_yang_: isLiuYang,
                         yang_pin_lei_xing: sampleType,
-                        liu_yang_shu_lian: liuYangNum
+                        liu_yang_shu_lian: liuYangNum == null? '':liuYangNum
                     }
                 }
                 let result = {
@@ -644,7 +722,7 @@ export default {
                     biao_zhi_uuid_: UUID,
                     shi_fou_liu_yang_: isLiuYang,
                     type: sampleType,
-                    num: liuYangNum
+                    num: liuYangNum == null? '':liuYangNum
                 }
                 let newLocation = this.generateNewLocation(localInfo.find(i => i.id_ === currentLocation), sampleInfo)
                 let result = {

+ 129 - 56
src/views/system/jbdScan/js/sampleConfirmationJS.js

@@ -78,7 +78,11 @@ export default {
                             item.biao_zhi_uuid_2 = this.uuid()
                             item.biao_zhi_uuid_3 = this.uuid()
                             item.biao_zhi_uuid_4 = this.uuid()
-                            item.shi_fou_liu_yang_ = '是'
+                            // item.shi_fou_liu_yang_ = '是'
+                            item.shi_fou_liu_yang_yi = '是'
+                            item.shi_fou_liu_yang_er = '是'
+                            item.shi_fou_liu_yang_san = '是'
+                            item.shi_fou_liu_yang_si = '是'
                             item.yan_shou_jie_guo_ = '完好'
                             item.liu_yang_shu_lian_yi = ' ml/支×1支'
                             item.shou_yang_wei_zhi_yi = cfID
@@ -196,37 +200,75 @@ export default {
                             this_.$message.error('操作失败,[' + ypInfoList[yp].yang_pin_ming_che + '] 验收结果不能为空!')
                             return;
                         }
-                        if (ypInfoList[yp].shi_fou_liu_yang_ == null || ypInfoList[yp].shi_fou_liu_yang_ == '') {
-                            this_.$message.error('操作失败,[' + ypInfoList[yp].yang_pin_ming_che + '] 是否留样不能为空!')
-                            return;
-                        }
-                        if (ypInfoList[yp].shi_fou_liu_yang_ == "是") {
+                        // if (ypInfoList[yp].shi_fou_liu_yang_ == null || ypInfoList[yp].shi_fou_liu_yang_ == '') {
+                        //     this_.$message.error('操作失败,[' + ypInfoList[yp].yang_pin_ming_che + '] 是否留样不能为空!')
+                        //     return;
+                        // }
+                        /** 如果四个是否留样中有一个为‘是’ 则 留样日期 和对应的留样位置就不能为空 */
+                        // ypInfoList[yp].shou_yang_wei_zhi_yi == null || ypInfoList[yp].shou_yang_wei_zhi_yi == ''
+                        if (ypInfoList[yp].shi_fou_liu_yang_yi == "是" ||
+                         (ypInfoList[yp].flag2 == true && ypInfoList[yp].shi_fou_liu_yang_er == "是") ||
+                          (ypInfoList[yp].flag3 == true && ypInfoList[yp].shi_fou_liu_yang_san == "是") ||
+                           (ypInfoList[yp].flag4 == true && ypInfoList[yp].shi_fou_liu_yang_si == "是")) {
                             if (ypInfoList[yp].liu_yang_ri_qi_ == null || ypInfoList[yp].liu_yang_ri_qi_ == '') {
-                                this_.$message.error("留样时必须填写留样日期!")
+                                this_.$message.error('留样时必须填写留样日期!')
                                 return;
+                                // this_.handleErrorData("") todo 失效
                             }
-                            // 判断位置是否为空
-                            if (ypInfoList[yp].liu_yang_wei_zhi_yi == null || ypInfoList[yp].liu_yang_wei_zhi_yi == '') {
-                                this_.$message.error('操作失败,[' + ypInfoList[yp].yang_pin_ming_che + '] 类型1的留样位置选择不能为空!')
-                                return;
+                            if(ypInfoList[yp].shi_fou_liu_yang_yi == "是"){
+                                // 判断位置是否为空
+                                if (ypInfoList[yp].liu_yang_wei_zhi_yi == null || ypInfoList[yp].liu_yang_wei_zhi_yi == '') {
+                                    this_.$message.error('操作失败,[' + ypInfoList[yp].yang_pin_ming_che + '] 类型1的留样位置选择不能为空!')
+                                    return;
+                                }
+                                if(ypInfoList[yp].liu_yang_shu_lian_yi == null || ypInfoList[yp].liu_yang_shu_lian_yi == ''){
+                                    this_.$message.error('操作失败,[' + ypInfoList[yp].yang_pin_ming_che + '] 类型1的留样数量不能为空!')
+                                    return;
+                                }
                             }
-                            if (ypInfoList[yp].flag2 == true && (ypInfoList[yp].liu_yang_wei_zhi_er == '' || ypInfoList[yp].liu_yang_wei_zhi_er == null)) {
-                                this_.$message.error('操作失败,[' + ypInfoList[yp].yang_pin_ming_che + '] 类型2的留样位置选择不能为空!')
-                                return;
+                            if(ypInfoList[yp].shi_fou_liu_yang_er == "是"){
+                                if(ypInfoList[yp].flag2 == true){
+                                    if (ypInfoList[yp].liu_yang_wei_zhi_er == '' || ypInfoList[yp].liu_yang_wei_zhi_er == null) {
+                                        this_.$message.error('操作失败,[' + ypInfoList[yp].yang_pin_ming_che + '] 类型2的留样位置选择不能为空!')
+                                        return;
+                                    }
+                                    if(ypInfoList[yp].liu_yang_shu_lian_er == null || ypInfoList[yp].liu_yang_shu_lian_er == ''){
+                                        this_.$message.error('操作失败,[' + ypInfoList[yp].yang_pin_ming_che + '] 类型2的留样数量不能为空!')
+                                        return;
+                                    }
+                                }
                             }
-                            if (ypInfoList[yp].flag3 == true && (ypInfoList[yp].liu_yang_wei_zhi_san == '' || ypInfoList[yp].liu_yang_wei_zhi_san == null)) {
-                                this_.$message.error('操作失败,[' + ypInfoList[yp].yang_pin_ming_che + '] 类型3的留样位置选择不能为空!')
-                                return;
+                            if(ypInfoList[yp].shi_fou_liu_yang_san == "是"){
+                                if(ypInfoList[yp].flag3 == true ){
+                                    if (ypInfoList[yp].liu_yang_wei_zhi_san == '' || ypInfoList[yp].liu_yang_wei_zhi_san == null) {
+                                        this_.$message.error('操作失败,[' + ypInfoList[yp].yang_pin_ming_che + '] 类型3的留样位置选择不能为空!')
+                                        return;
+                                    }
+                                    if(ypInfoList[yp].liu_yang_shu_lian_san == null || ypInfoList[yp].liu_yang_shu_lian_san == ''){
+                                        this_.$message.error('操作失败,[' + ypInfoList[yp].yang_pin_ming_che + '] 类型3的留样数量不能为空!')
+                                        return;
+                                    }
+                                }
+
                             }
-                            if (ypInfoList[yp].flag4 == true && (ypInfoList[yp].liu_yang_wei_zhi_si == '' || ypInfoList[yp].liu_yang_wei_zhi_si == null)) {
-                                this_.$message.error('操作失败,[' + ypInfoList[yp].yang_pin_ming_che + '] 类型4的留样位置选择不能为空!')
-                                return;
+                            if(ypInfoList[yp].shi_fou_liu_yang_si == "是"){
+                                if(ypInfoList[yp].flag4 == true ){
+                                    if (ypInfoList[yp].liu_yang_wei_zhi_si == '' || ypInfoList[yp].liu_yang_wei_zhi_si == null) {
+                                        this_.$message.error('操作失败,[' + ypInfoList[yp].yang_pin_ming_che + '] 类型4的留样位置选择不能为空!')
+                                        return;
+                                    }
+                                    if(ypInfoList[yp].liu_yang_shu_lian_si == null || ypInfoList[yp].liu_yang_shu_lian_si == ''){
+                                        this_.$message.error('操作失败,[' + ypInfoList[yp].yang_pin_ming_che + '] 类型4的留样数量不能为空!')
+                                        return;
+                                    }
+                                }
                             }
                         }
-                       // 判断位置是否为空
-                       if (ypInfoList[yp].shou_yang_wei_zhi_yi == null || ypInfoList[yp].shou_yang_wei_zhi_yi == '') {
-                        this_.$message.error('操作失败,[' + ypInfoList[yp].yang_pin_ming_che + '] 类型1的位置选择不能为空!')
-                        return;
+
+                        // 判断位置是否为空
+                        if (ypInfoList[yp].shou_yang_wei_zhi_yi == null || ypInfoList[yp].shou_yang_wei_zhi_yi == '') {
+                            this_.$message.error('操作失败,[' + ypInfoList[yp].yang_pin_ming_che + '] 类型1的位置选择不能为空!')
+                            return;
                         }
                         if (ypInfoList[yp].flag2 == true && (ypInfoList[yp].shou_yang_wei_zhi_er == '' || ypInfoList[yp].shou_yang_wei_zhi_er == null)) {
                             this_.$message.error('操作失败,[' + ypInfoList[yp].yang_pin_ming_che + '] 类型2的位置选择不能为空!')
@@ -257,6 +299,7 @@ export default {
                             ypInfoList[yp].shou_yang_wei_zhi_san, ypInfoList[yp].liu_yang_wei_zhi_san,
                             ypInfoList[yp].shou_yang_wei_zhi_si, ypInfoList[yp].liu_yang_wei_zhi_si
                         )
+
                         let o = {
                             where:{
                                 id_ : ypInfoList[yp].id_
@@ -289,7 +332,6 @@ export default {
                         sampleList.push(o)
                     }
                     localStr = localArr.filter(i => i).join(',')
-
                     let value = ''
                     let lhypIdStr = ''
                     for (let i = 0; i < lhypbWJ.length; i++) {
@@ -311,7 +353,6 @@ export default {
                     Promise.all([repostCurd("sql", allSQL), repostCurd("sql", allLocal)]).then((res) => {
                         let result = res[0].variables.data
                         let localInfo = res[1].variables.data
-                        // todo
                         // console.log(localInfo)
                         /* 1、更新货架位置信息 */
                         this.emptyLocal = []
@@ -320,28 +361,28 @@ export default {
                         ypInfoList.forEach(item => {
                             allUUID.push(item.biao_zhi_uuid_1, item.biao_zhi_uuid_2, item.biao_zhi_uuid_3, item.biao_zhi_uuid_4)
                             let allResult = []
-                            if(item.shou_yang_wei_zhi_yi != undefined){
+                            if(item.shou_yang_wei_zhi_yi != undefined && item.shou_yang_wei_zhi_yi){
                                 allResult.push(this.handleLocationInfo(item.shou_yang_wei_zhi_yi, '否', localInfo, locationIds, item, item.biao_zhi_uuid_1, currentTime,item.yang_pin_lei_xing,item.liu_yang_shu_lian_yi))
                             }
-                            if (item.shou_yang_wei_zhi_er != undefined) {
+                            if (item.shou_yang_wei_zhi_er != undefined && item.shou_yang_wei_zhi_er) {
                                 allResult.push(this.handleLocationInfo(item.shou_yang_wei_zhi_er, '否', localInfo, locationIds, item, item.biao_zhi_uuid_2, currentTime,item.yang_pin_lei_er_,item.liu_yang_shu_lian_er))
                             }
-                            if (item.shou_yang_wei_zhi_san != undefined) {
+                            if (item.shou_yang_wei_zhi_san != undefined && item.shou_yang_wei_zhi_san) {
                                 allResult.push(this.handleLocationInfo(item.shou_yang_wei_zhi_san, '否', localInfo, locationIds, item, item.biao_zhi_uuid_3, currentTime,item.yang_pin_lei_san_,item.liu_yang_shu_lian_san))
                             }
-                            if (item.shou_yang_wei_zhi_si != undefined) {
+                            if (item.shou_yang_wei_zhi_si != undefined && item.shou_yang_wei_zhi_si) {
                                 allResult.push(this.handleLocationInfo(item.shou_yang_wei_zhi_si, '否', localInfo, locationIds, item, item.biao_zhi_uuid_4, currentTime,item.yang_pin_lei_si_,item.liu_yang_shu_lian_si))
                             }
-                            if(item.liu_yang_wei_zhi_yi){
+                            if(item.liu_yang_wei_zhi_yi != undefined && item.liu_yang_wei_zhi_yi && item.shi_fou_liu_yang_yi === '是'){
                                 allResult.push(this.handleLocationInfo(item.liu_yang_wei_zhi_yi, '是', localInfo, locationIds, item, item.biao_zhi_uuid_1, currentTime,item.yang_pin_lei_xing,item.liu_yang_shu_lian_yi))
                             }
-                            if (item.liu_yang_wei_zhi_er != undefined) {
+                            if (item.liu_yang_wei_zhi_er != undefined && item.liu_yang_wei_zhi_er && item.shi_fou_liu_yang_er === '是') {
                                 allResult.push(this.handleLocationInfo(item.liu_yang_wei_zhi_er, '是', localInfo, locationIds, item, item.biao_zhi_uuid_2, currentTime,item.yang_pin_lei_er_,item.liu_yang_shu_lian_er))
                             }
-                            if (item.liu_yang_wei_zhi_san != undefined) {
+                            if (item.liu_yang_wei_zhi_san != undefined && item.liu_yang_wei_zhi_san && item.shi_fou_liu_yang_san === '是') {
                                 allResult.push(this.handleLocationInfo(item.liu_yang_wei_zhi_san, '是', localInfo, locationIds, item, item.biao_zhi_uuid_3, currentTime,item.yang_pin_lei_san_,item.liu_yang_shu_lian_san))
                             }
-                            if (item.liu_yang_wei_zhi_si != undefined) {
+                            if (item.liu_yang_wei_zhi_si != undefined && item.liu_yang_wei_zhi_si && item.shi_fou_liu_yang_si === '是') {
                                 allResult.push(this.handleLocationInfo(item.liu_yang_wei_zhi_si, '是', localInfo, locationIds, item, item.biao_zhi_uuid_4, currentTime,item.yang_pin_lei_si_,item.liu_yang_shu_lian_si))
                             }
                             allResult.forEach(item => {
@@ -349,14 +390,15 @@ export default {
                             })
                         })
                         let allUUIDStr = allUUID.filter(i => i).join(',')
-                        // console.log(allUUIDStr)
                         // 更新样品位置list
                         // console.log('emptyLocal:',this.emptyLocal)
-                        let allParams = {
-                            tableName: 't_ypcfwz',
-                            updList: this.emptyLocal
+                        if(this.emptyLocal.length > 0){
+                            let allParams = {
+                                tableName: 't_ypcfwz',
+                                updList: this.emptyLocal
+                            }
+                            repostCurd('updatesByWhere', JSON.stringify(allParams))
                         }
-                        repostCurd('updatesByWhere', JSON.stringify(allParams))
                         // 插入样品位置list
                         // console.log('fullLocal:',this.fullLocal)
                         repostCurd('add', '{"tableName":"t_ypcfwz","paramWhere":' + JSON.stringify(this.fullLocal) + '}').then(res => {
@@ -404,14 +446,42 @@ export default {
                                         xmmc.push(item.chang_gui_xiang_m, item.tao_can_ming_chen)
                                         let xiangMuZh = xmmc.filter(i => i).join(',')
 
-                                        let yblx = c == 0 ? ypInfoList[index].yang_pin_lei_xing : c == 1 ? ypInfoList[index].yang_pin_lei_er_ : c == 2 ? ypInfoList[index].yang_pin_lei_san_ : c == 3 ? ypInfoList[index].yang_pin_lei_si_ : ''
-                                        let ystj = c == 0 ? ypInfoList[index].yang_ben_yun_shu_ : c == 1 ? ypInfoList[index].yang_pin_yun_shu_ : c == 2 ? ypInfoList[index].yang_pin_yun_san : c == 3 ? ypInfoList[index].yang_pin_yun_si_ : ''
-                                        let ypsl = c == 0 ? ypInfoList[index].shu_liang_ : c == 1 ? ypInfoList[index].shu_liang_er_ : c == 2 ? ypInfoList[index].shu_liang_san_ : c == 3 ? ypInfoList[index].shu_liang_si_ : ''
-                                        let ybgg = c == 0 ? ypInfoList[index].yang_pin_gui_ge_ : c == 1 ? ypInfoList[index].yang_pin_gui_ge_e : c == 2 ? ypInfoList[index].yang_pin_gui_ge_s : c == 3 ? ypInfoList[index].yang_pin_gui_si_ : ''
-                                        let sywz = c == 0 ? ypInfoList[index].shou_yang_wei_zhi_yi : c == 1 ? ypInfoList[index].shou_yang_wei_zhi_er : c == 2 ? ypInfoList[index].shou_yang_wei_zhi_san : c == 3 ? ypInfoList[index].shou_yang_wei_zhi_si : ''
-                                        let lycf = c == 0 ? ypInfoList[index].liu_yang_wei_zhi_yi : c == 1 ? ypInfoList[index].liu_yang_wei_zhi_er : c == 2 ? ypInfoList[index].liu_yang_wei_zhi_san : c == 3 ? ypInfoList[index].liu_yang_wei_zhi_si : ''
-                                        let lysl = c == 0 ? ypInfoList[index].liu_yang_shu_lian_yi : c == 1 ? ypInfoList[index].liu_yang_shu_lian_er : c == 2 ? ypInfoList[index].liu_yang_shu_lian_san : c == 3 ? ypInfoList[index].liu_yang_shu_lian_si : ''
-                                        let currentUUID = c == 0 ? ypInfoList[index].biao_zhi_uuid_1 : c == 1 ? ypInfoList[index].biao_zhi_uuid_2 : c == 2 ? ypInfoList[index].biao_zhi_uuid_3 : c == 3 ? ypInfoList[index].biao_zhi_uuid_4 : ''
+                                        let yblx = c == 0 ? ypInfoList[index].yang_pin_lei_xing :
+                                                   c == 1 ? ypInfoList[index].yang_pin_lei_er_  : 
+                                                   c == 2 ? ypInfoList[index].yang_pin_lei_san_ : 
+                                                   c == 3 ? ypInfoList[index].yang_pin_lei_si_  : ''
+                                        let ystj = c == 0 ? ypInfoList[index].yang_ben_yun_shu_ : 
+                                                   c == 1 ? ypInfoList[index].yang_pin_yun_shu_ : 
+                                                   c == 2 ? ypInfoList[index].yang_pin_yun_san  : 
+                                                   c == 3 ? ypInfoList[index].yang_pin_yun_si_  : ''
+                                        let ypsl = c == 0 ? ypInfoList[index].shu_liang_ : 
+                                                   c == 1 ? ypInfoList[index].shu_liang_er_ : 
+                                                   c == 2 ? ypInfoList[index].shu_liang_san_ : 
+                                                   c == 3 ? ypInfoList[index].shu_liang_si_ : ''
+                                        let ybgg = c == 0 ? ypInfoList[index].yang_pin_gui_ge_ : 
+                                                   c == 1 ? ypInfoList[index].yang_pin_gui_ge_e : 
+                                                   c == 2 ? ypInfoList[index].yang_pin_gui_ge_s : 
+                                                   c == 3 ? ypInfoList[index].yang_pin_gui_si_ : ''
+                                        let sywz = c == 0 ? ypInfoList[index].shou_yang_wei_zhi_yi : 
+                                                   c == 1 ? ypInfoList[index].shou_yang_wei_zhi_er : 
+                                                   c == 2 ? ypInfoList[index].shou_yang_wei_zhi_san : 
+                                                   c == 3 ? ypInfoList[index].shou_yang_wei_zhi_si : ''
+                                        let lycf = c == 0 ? ypInfoList[index].liu_yang_wei_zhi_yi : 
+                                                   c == 1 ? ypInfoList[index].liu_yang_wei_zhi_er : 
+                                                   c == 2 ? ypInfoList[index].liu_yang_wei_zhi_san : 
+                                                   c == 3 ? ypInfoList[index].liu_yang_wei_zhi_si : ''
+                                        let lysl = c == 0 ? ypInfoList[index].liu_yang_shu_lian_yi : 
+                                                   c == 1 ? ypInfoList[index].liu_yang_shu_lian_er : 
+                                                   c == 2 ? ypInfoList[index].liu_yang_shu_lian_san : 
+                                                   c == 3 ? ypInfoList[index].liu_yang_shu_lian_si : ''
+                                        let currentUUID = c == 0 ? ypInfoList[index].biao_zhi_uuid_1 : 
+                                                          c == 1 ? ypInfoList[index].biao_zhi_uuid_2 : 
+                                                          c == 2 ? ypInfoList[index].biao_zhi_uuid_3 : 
+                                                          c == 3 ? ypInfoList[index].biao_zhi_uuid_4 : ''
+                                        let ifLy = c == 0 ? ypInfoList[index].shi_fou_liu_yang_yi : 
+                                                   c == 1 ? ypInfoList[index].shi_fou_liu_yang_er :
+                                                   c == 2 ? ypInfoList[index].shi_fou_liu_yang_san: 
+                                                   c == 3 ? ypInfoList[index].shi_fou_liu_yang_si : ''
                                         let obj = {
                                             wei_tuo_dan_hao_: item.wei_tuo_bian_hao_,
                                             wei_tuo_dan_wei_: item.wtdh,
@@ -434,11 +504,11 @@ export default {
                                             yan_shou_jie_guo_: ypInfoList[index].yan_shou_jie_guo_,
                                             cun_fang_wei_zhi_: sywz,
                                             liu_zhuan_zhuang_: '待任务分配',
-                                            shi_fou_liu_yang_: ypInfoList[index].shi_fou_liu_yang_,
-                                            liu_yang_ri_qi_: ypInfoList[index].liu_yang_ri_qi_,
-                                            liu_yang_cun_fang: lycf,
-                                            liu_yang_shu_lian: lysl,
-                                            liu_yang_qi_xian: ypInfoList[index].liu_yang_qi_xian,
+                                            shi_fou_liu_yang_: ifLy,
+                                            liu_yang_ri_qi_: ifLy == '是'? ypInfoList[index].liu_yang_ri_qi_:'',
+                                            liu_yang_cun_fang: ifLy == '是'?lycf:'',
+                                            liu_yang_shu_lian: lysl == null ?'':lysl,
+                                            liu_yang_qi_xian: ifLy == '是'? ypInfoList[index].liu_yang_qi_xian:'',
                                             xiao_hui_ri_qi_: ypInfoList[index].xiao_hui_ri_qi_,
                                             fan_yang_ri_qi_: ypInfoList[index].fan_yang_ri_qi_,
                                             fan_yang_jyr: ypInfoList[index].fan_yang_jyr,
@@ -447,6 +517,7 @@ export default {
                                             jian_ce_xiang_mu_: xiangMuZh,
                                             shou_yang_ren_:this.$store.getters.userInfo.user.name
                                         }
+                                        // console.log(obj)
                                         ypdjb.push(obj)
                                     }
                                     // 2-2:封装任务分配表
@@ -499,7 +570,8 @@ export default {
                                     // console.log('3、更新样品表',lhypIdNewList)
                                     repostCurd('updates', '{"tableName":"t_lhypb","paramWhere":[' + lhypIdNewList + '],"paramCond":{"jie_yang_zhuang_t":"已接收"}}').then(res=>{
                                         this.handleAnySituation(true,"样品成功接收,正在开启任务分配!",'success')
-                                    })*/
+                                    })
+                                    */
                                     console.log('更新样品表',sampleList)
                                     let allSampleParams ={
                                         tableName:'t_lhypb',
@@ -508,6 +580,7 @@ export default {
                                     repostCurd('updatesByWhere', JSON.stringify(allSampleParams)).then(res=>{
                                         this.handleAnySituation(true,"样品成功接收,正在开启任务分配!",'success')
                                     })
+
                                 })
 
                                 
@@ -516,6 +589,7 @@ export default {
                     })
                 }).catch(_ => { });
             }
+
         },
         /* 去除指定行数据 使用过滤器filter过滤指定行号数据 */
         deleteData(val) {
@@ -566,7 +640,6 @@ export default {
         },
         handleLocationInfo(currentLocation, isLiuYang, localInfo, locationIds, item, UUID, currentTime,sampleType,liuYangNum) {
             !locationIds.has(currentLocation) ? locationIds.add(currentLocation) : localInfo.find(i => i.id_ === currentLocation).wei_zhi_zhuang_ta = '占用'
-            // console.log(localInfo.find(i => i.id_ === currentLocation), currentLocation)
             if (localInfo.find(i => i.id_ === currentLocation)!=undefined  &&localInfo.find(i => i.id_ === currentLocation).wei_zhi_zhuang_ta === '空余') {
                 let obj = {
                     where: {
@@ -579,7 +652,7 @@ export default {
                         yang_pin_ming_che: item.yang_pin_ming_che,
                         shi_fou_liu_yang_: isLiuYang,
                         yang_pin_lei_xing: sampleType,
-                        liu_yang_shu_lian: liuYangNum
+                        liu_yang_shu_lian: liuYangNum == null? '':liuYangNum
                     }
                 }
                 let result = {
@@ -595,7 +668,7 @@ export default {
                     biao_zhi_uuid_: UUID,
                     shi_fou_liu_yang_: isLiuYang,
                     type: sampleType,
-                    num: liuYangNum
+                    num: liuYangNum == null? '':liuYangNum
                 }
                 let newLocation = this.generateNewLocation(localInfo.find(i => i.id_ === currentLocation), sampleInfo)
                 let result = {