Kaynağa Gözat

修改标签样式

ZZJ 3 yıl önce
ebeveyn
işleme
a47d1bf943

+ 1 - 1
src/plugins/error/index.js

@@ -16,7 +16,7 @@ export default {
                         }
                     })
                     if (process.env.NODE_ENV !== 'development') return
-                    //if (logType === 'warning') return  
+                    if (logType === 'warning') return  
                     util.log.capsule('ibps', 'ErrorHandler', logType)
                     util.log.danger('>>>>>> 错误信息 >>>>>>')
                     console.log(info)

+ 416 - 417
src/views/system/jbdScan/goods/manualConfirmation.vue

@@ -18,446 +18,410 @@
            </div>
               <el-dialog
                width="90%"
+               top="5vh"
                :modal-append-to-body='false'
-               title="      样品手动接收确认操作 - 确认样品数量及相关信息 - 【位置根据是否留样二选一进行选择】"
+               title="      样品手动接收确认操作 - 确认样品数量及相关信息 "
                @close="closeDialog"
                :before-close = "handleClose"
                :visible.sync="visible"
                > <!-- 表单是否显示 -->
-                   <div style="min-height: 600px;"  @click.self="handleChange">
-                     <el-button @click="submitData('确认')" type="primary" style="float: right;margin: 5px;">样品确认</el-button>
-                       <el-table
-                           :data="listData"
-                           stripe
-                           style="width: 100%">
+                   <div style="height: 600px;overflow: auto;"  @click.self="handleChange">
+                     <el-form label-position="top" size="mini" :model="listData" label-width="100px">
+                      <div v-for="(item,index) in listData">
+                        <el-row>
+                          <div class="dynamic-form-table">
+                            <div class="dynamic-form-table__block panel panel-info">
+                            <div class="panel-heading ibps-clearfix">
+                              <!--块模式:工具栏-->
+                              <div class="ibps-fl dynamic-form-table__label">
+                                样品{{ index+1 }}
+                              </div>
+                            </div>
+                            </div>
+                          </div>
+                        </el-row>
+
+                        <div style="padding: 10px 20px;">
 
-                         <el-table-column
-                           prop="yang_pin_bian_hao"
-                           label="样品编号"
-                           width="150px">
-                          </el-table-column>
-
-                         <el-table-column
-                           prop="yang_pin_ming_che"
-                           label="样品名称">
-                         </el-table-column>
-
-                         <el-table-column
-                           prop="yang_pin_zong_shu"
-                           label="样品总数"
-                           width="180px">
-                         </el-table-column>
-
-                         <el-table-column
-                           label="本次确认数量"
-                           width="150px">
-                               <template slot-scope="scope">
-                                   <el-input-number
-                                    v-model="scope.row.jie_yang_shu_lian"
-                                    controls-position="right"
-                                    @change="handleChange"
-                                    :min="1" :max="9999">
-                                    </el-input-number>
-                                </template>
-                         </el-table-column>
-
-
-
-
-                        <el-table-column
-                          prop="yang_pin_lei_xing"
-                          label="样品类型(一)"
-                          width="150px">
-                         </el-table-column>
-
-                        <el-table-column
-                          prop="yang_ben_yun_shu_"
-                          label="样品运输条件(一)"
-                          width="150px">
-                         </el-table-column>
-
-                        <el-table-column
-                          prop="shu_liang_"
-                          label="样品数量(一)"
-                          width="150px">
-                         </el-table-column>
-
-                        <el-table-column
-                          prop="yang_pin_gui_ge_"
-                          label="样品规格(一)"
-                          width="150px">
-                         </el-table-column>
-
-
-                         <el-table-column
-                           prop="yang_pin_lei_er_"
-                           label="样品类型(二)"
-                           width="150px">
-                          </el-table-column>
-
-                         <el-table-column
-                           prop="yang_pin_yun_shu_"
-                           label="样品运输条件(二)"
-                           width="150px">
-                          </el-table-column>
-
-                         <el-table-column
-                           prop="shu_liang_er_"
-                           label="样品数量(二)"
-                           width="150px">
-                          </el-table-column>
-
-                         <el-table-column
-                           prop="yang_pin_gui_ge_e"
-                           label="样品规格(二)"
-                           width="150px">
-                          </el-table-column>
-
-
-                         <el-table-column
-                           prop="yang_pin_lei_san_"
-                           label="样品类型(三)"
-                           width="150px">
-                          </el-table-column>
-
-                         <el-table-column
-                           prop="yang_pin_yun_san"
-                           label="样品运输条件(三)"
-                           width="150px">
-                          </el-table-column>
-
-                         <el-table-column
-                           prop="shu_liang_san_"
-                           label="样品数量(三)"
-                           width="150px">
-                          </el-table-column>
-
-                         <el-table-column
-                           prop="yang_pin_gui_ge_s"
-                           label="样品规格(三)"
-                           width="150px">
-                          </el-table-column>
-
-                        <el-table-column
-                          prop="yang_pin_lei_si_"
-                          label="样品类型(四)"
-                          width="150px">
-                         </el-table-column>
-
-                        <el-table-column
-                          prop="yang_pin_yun_si_"
-                          label="样品运输条件(四)"
-                          width="150px">
-                         </el-table-column>
-
-                        <el-table-column
-                          prop="shu_liang_si_"
-                          label="样品数量(四)"
-                          width="150px">
-                         </el-table-column>
-
-                        <el-table-column
-                          prop="yang_pin_gui_si_"
-                          label="样品规格(四)"
-                          width="150px">
-                         </el-table-column>
-
-                         <el-table-column
-                           label="是否留样"
-                           width="80px">
-                           <template slot-scope="scope">
-                               <el-select v-model="scope.row.shi_fou_liu_yang_" placeholder="请选择">
-                                 <el-option
-                                   v-for="item in ifLY"
-                                   :key="item.value"
-                                   :label="item.label"
-                                   :value="item.value">
-                                 </el-option>
-                               </el-select>
-                            </template>
-                         </el-table-column>
-
-                         <el-table-column
-                           label="样品存放位置"
-                           width="200px"
-                           >
-                            <template slot-scope="scope">
-                              <!-- <ibps-link-data
-                                v-model="scope.row.shou_yang_wei_zhi"
-                                template-key = "lhypwzztzly"
-                              /> -->
-                              <weizhiData  v-model="scope.row.shou_yang_wei_zhi"/>
-                             </template>
-                         </el-table-column>
-
-                         <el-table-column
-                           label="留样存放位置"
-                           width="200px">
-                            <template slot-scope="scope">
-                              <!-- <ibps-link-data
-                                v-model="scope.row.liu_yang_wei_zhi_"
-                                template-key = "lhypwzztzly"
-                              /> -->
-                              <liuyangData v-model="scope.row.liu_yang_wei_zhi_"/>
-                             </template>
-
-                         </el-table-column>
-
-
-                        <el-table-column
-                          label="验收结果"
-                          width="120px">
-                          <template slot-scope="scope">
-                              <el-select v-model="scope.row.yan_shou_jie_guo_" placeholder="请选择">
-                                <el-option
-                                  v-for="item in checkOptions"
-                                  :key="item.value"
-                                  :label="item.label"
-                                  :value="item.value">
-                                </el-option>
-                              </el-select>
-                           </template>
-                        </el-table-column>
-
-                        <el-table-column
-                          label="留样日期"
-                          width="230px">
-                          <template slot-scope="scope">
-                            <el-date-picker
-                              v-model="scope.row.liu_yang_ri_qi_"
-                              type="date"
-                              value-format="yyyy-MM-dd"
-                              format="yyyy-MM-dd"
-                              placeholder="请选择"
-                              :readonly="false"
-                              :clearable="true"
-                            />
-                          </template>
-                        </el-table-column>
-
-                        <el-table-column
-                          label="留样数量"
-                          width="150px">
-                          <template slot-scope="scope">
-                              <el-input-number
-                               v-model="scope.row.liu_yang_shu_lian"
-                                controls-position="right"
-                                @change="handleChange"
-                                :min="1" :max="9999">
-                               </el-input-number>
-                           </template>
-
-                        </el-table-column>
-
-
-                        <el-table-column
-                          label="留样期限至"
-                          width="230px">
-                          <template slot-scope="scope">
-                            <el-date-picker
-                              v-model="scope.row.liu_yang_qi_xian"
-                              type="date"
-                              value-format="yyyy-MM-dd"
-                              format="yyyy-MM-dd"
-                              placeholder="请选择"
-                              :readonly="false"
-                              :clearable="true"
-                            />
-                          </template>
-                        </el-table-column>
-
-
-                        <el-table-column
-                          label="销毁日期"
-                          width="230px">
-                          <template slot-scope="scope">
-                            <el-date-picker
-                              v-model="scope.row.xiao_hui_ri_qi_"
-                              type="date"
-                              value-format="yyyy-MM-dd"
-                              format="yyyy-MM-dd"
-                              placeholder="请选择"
-                              :readonly="false"
-                              :clearable="true"
-                            />
-                          </template>
-                        </el-table-column>
-
-                        <el-table-column
-                          label="返样日期"
-                          width="230px">
-                          <template slot-scope="scope">
-                            <el-date-picker
-                              v-model="scope.row.fan_yang_ri_qi_"
-                              type="date"
-                              value-format="yyyy-MM-dd"
-                              format="yyyy-MM-dd"
-                              placeholder="请选择"
-                              :readonly="false"
-                              :clearable="true"
-                            />
-                          </template>
-                        </el-table-column>
-
-
-                        <el-table-column
-                          label="返样接样人"
-                          width="150px">
-                          <template slot-scope="scope">
-                            <el-input
-                                  v-model="scope.row.fan_yang_jyr"
-                                  placeholder="请输入"
-                                  type="text"
-                                  :readonly="false"
-                                  clearable
-                                />
-                          </template>
-                        </el-table-column>
-
-
-                        <el-table-column
-                          label="姓名"
-                          width="150px">
-                          <template slot-scope="scope">
-                            <el-input
-                                  v-model="scope.row.xing_ming_"
-                                  placeholder="请输入"
-                                  type="text"
-                                  :readonly="false"
-                                  clearable
-                                />
-                          </template>
-                        </el-table-column>
-
-                        <el-table-column
-                          label="性别"
-                          width="150px">
-                            <template slot-scope="scope">
-                                <el-select v-model="scope.row.xing_bie_" placeholder="请选择">
+                        
+                        <el-row>
+                          <el-col :span="6">
+                            <el-form-item label="样品编号">
+                              <el-input v-model="item.yang_pin_bian_hao" readonly="true"></el-input>
+                            </el-form-item>
+                          </el-col>
+                          <el-col :span="6">
+                            <el-form-item label="样品名称">
+                              <el-input v-model="item.yang_pin_ming_che" readonly="true"></el-input>
+                            </el-form-item>
+                          </el-col>
+                          <el-col :span="6">
+                            <el-form-item label="样品总数">
+                              <el-input v-model="item.yang_pin_zong_shu" readonly="true"></el-input>
+                            </el-form-item>
+                          </el-col>
+                          <el-col :span="6">
+                            <el-form-item label="本次确认数量">
+                              <el-input v-model="item.jie_yang_shu_lian"></el-input>
+                            </el-form-item>
+                          </el-col>
+                        </el-row>
+
+
+                        <el-row>
+                          <el-col :span="6">
+                            <el-form-item label="样品类型(一)">
+                              <el-input v-model="item.yang_pin_lei_xing || '/'" readonly="true"></el-input>
+                            </el-form-item>
+                          </el-col>
+                          
+                          <el-col :span="6">
+                            <el-form-item label="样品运输条件(一)">
+                              <el-input v-model="item.yang_ben_yun_shu_ || '/'" readonly="true"></el-input>
+                            </el-form-item>
+                          </el-col>
+                          
+                          <el-col :span="6">
+                            <el-form-item label="样品数量(一)">
+                              <el-input v-model="item.shu_liang_ || '/'" readonly="true"></el-input>
+                            </el-form-item>
+                          </el-col>
+                          
+                          <el-col :span="6">
+                            <el-form-item label="样品规格(一)">
+                              <el-input v-model="item.yang_pin_gui_ge_ || '/'" readonly="true"></el-input>
+                            </el-form-item>
+                          </el-col>
+                        </el-row>
+                          
+                        <el-row>
+                          <el-col :span="6">
+                            <el-form-item label="样品类型(二)">
+                              <el-input v-model="item.yang_pin_lei_er_ || '/'" readonly="true"></el-input>
+                            </el-form-item>
+                          </el-col>
+                          <el-col :span="6">
+                            <el-form-item label="样品运输条件(二)">
+                              <el-input v-model="item.yang_pin_yun_shu_ || '/'" readonly="true"></el-input>
+                            </el-form-item>
+                          </el-col>
+                          <el-col :span="6">
+                            <el-form-item label="样品数量(二)">
+                              <el-input v-model="item.shu_liang_er_ || '/'" readonly="true"></el-input>
+                            </el-form-item>
+                          </el-col>
+                          <el-col :span="6">
+                            <el-form-item label="样品规格(二)">
+                              <el-input v-model="item.yang_pin_gui_ge_e || '/'" readonly="true"></el-input>
+                            </el-form-item>
+                          </el-col>
+                        </el-row>
+                          
+                        <el-row>
+                          <el-col :span="6">
+                            <el-form-item label="样品类型(三)">
+                              <el-input v-model="item.yang_pin_lei_san_ || '/'" readonly="true"></el-input>
+                            </el-form-item>
+                          </el-col>
+                          <el-col :span="6">
+                            <el-form-item label="样品运输条件(三)">
+                              <el-input v-model="item.yang_pin_yun_san || '/'" readonly="true"></el-input>
+                            </el-form-item>
+                          </el-col>
+                          <el-col :span="6">
+                            <el-form-item label="样品数量(三)">
+                              <el-input v-model="item.shu_liang_san_ || '/'" readonly="true"></el-input>
+                            </el-form-item>
+                          </el-col>
+                          <el-col :span="6">
+                            <el-form-item label="样品规格(三)">
+                              <el-input v-model="item.yang_pin_gui_ge_s || '/'" readonly="true"></el-input>
+                            </el-form-item>
+                          </el-col>
+                        </el-row>   
+
+                        <el-row>
+                          <el-col :span="6">
+                            <el-form-item label="样品类型(四)">
+                              <el-input v-model="item.yang_pin_lei_si_ || '/'" readonly="true" ></el-input>
+                            </el-form-item>
+                          </el-col>
+                          <el-col :span="6">
+                            <el-form-item label="样品运输条件(四)">
+                              <el-input v-model="item.yang_pin_yun_si_ || '/'" readonly="true"></el-input>
+                            </el-form-item>
+                          </el-col>
+                          <el-col :span="6">
+                            <el-form-item label="样品数量(四)">
+                              <el-input v-model="item.shu_liang_si_ || '/'" readonly="true"></el-input>
+                            </el-form-item>
+                          </el-col>
+                          <el-col :span="6">
+                            <el-form-item label="样品规格(四)">
+                              <el-input v-model="item.yang_pin_gui_si_ || '/'" readonly="true"></el-input>
+                            </el-form-item>
+                          </el-col>
+                        </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="请选择">
+                                   <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="样品存放位置">
+                              <template slot-scope="scope">
+                                <weizhiData  v-model="item.shou_yang_wei_zhi"/>
+                               </template>
+                            </el-form-item>
+                          </el-col>
+                          <el-col :span="6">
+                            <el-form-item label="留样存放位置">
+                              <template slot-scope="scope">
+                                <liuyangData v-model="item.liu_yang_wei_zhi_"/>
+                               </template>
+                            </el-form-item>
+                          </el-col>
+                          <el-col :span="6">
+                            <el-form-item label="验收结果">
+                              <template slot-scope="scope">
+                                <el-select v-model="item.yan_shou_jie_guo_" placeholder="请选择">
                                   <el-option
-                                    v-for="item in sex"
+                                    v-for="item in checkOptions"
                                     :key="item.value"
                                     :label="item.label"
                                     :value="item.value">
                                   </el-option>
                                 </el-select>
                              </template>
-                        </el-table-column>
-
-                        <el-table-column
-                          label="年龄"
-                          width="130px">
-                          <template slot-scope="scope">
-                            <el-input
-                                  v-model="scope.row.nian_ling_"
-                                  placeholder="请输入"
-                                  type="text"
-                                  :readonly="false"
-                                  clearable
-                                />
-                          </template>
-                        </el-table-column>
-
-
-                       <!-- <el-table-column
-                          label="报告编制员"
-                          width="130px">
-                           <template slot-scope="scope">
-                              <ibps-user-selector
-                                v-model="scope.row.bao_gao_bian_zhi_"
+                            </el-form-item>
+                          </el-col>
+                        </el-row>  
+                        
+                        <el-row>
+                          <el-col :span="6">
+                            <el-form-item label="留样日期">
+                              <template slot-scope="scope">
+                              <el-date-picker
+                                v-model="item.liu_yang_ri_qi_"
+                                type="date"
+                                value-format="yyyy-MM-dd"
+                                format="yyyy-MM-dd"
                                 placeholder="请选择"
-                                type="user"
-                                store="id"
+                                :readonly="false"
+                                :clearable="true"
+                                @change="liuyanChange(item,index)"
                               />
-                           </template>
-                        </el-table-column>
-
-                        <el-table-column
-                          label="报告复核员"
-                          width="130px">
-                           <template slot-scope="scope">
-                            <ibps-user-selector
-                              v-model="scope.row.bao_gao_shen_he_y"
-                              placeholder="请选择"
-                              type="user"
-                              store="id"
-                            />
                             </template>
-                        </el-table-column> -->
-
-
-                        <el-table-column
-                          label="备注"
-                          width="180px">
-                          <template slot-scope="scope">
-                            <el-input
-                                  v-model="scope.row.bei_zhu_"
-                                  placeholder="请输入"
-                                  type="text"
+                            </el-form-item>
+                          </el-col>
+                          <el-col :span="6">
+                            <el-form-item label="留样数量">
+                             <template slot-scope="scope">
+                                <el-input-number
+                                 v-model="item.liu_yang_shu_lian"
+                                  controls-position="right"
+                                  @change="handleChange"
+                                  :min="1" :max="9999">
+                                 </el-input-number>
+                             </template>
+                            </el-form-item>
+                          </el-col>
+                          <el-col :span="6">
+                            <el-form-item label="留样期限至">
+                              <template slot-scope="scope">
+                                <el-date-picker
+                                  v-model="item.liu_yang_qi_xian"
+                                  type="date"
+                                  value-format="yyyy-MM-dd"
+                                  format="yyyy-MM-dd"
+                                  placeholder="请选择"
                                   :readonly="false"
-                                  clearable
+                                  :clearable="true"
                                 />
-                          </template>
-                        </el-table-column>
-
-                        
-                         <el-table-column
-                          label="送样要求"
-                          width="180px">
-                          <template slot-scope="scope">
-                            <el-input
-                                  v-model="scope.row.song_yang_yao_qiu"
-                                  placeholder="请输入"
-                                  type="text"
+                              </template>
+                            </el-form-item>
+                          </el-col>
+                          <el-col :span="6">
+                            <el-form-item v-if="flag" label="销毁日期">
+                              <template slot-scope="scope">
+                                <el-date-picker
+                                  v-model="item.xiao_hui_ri_qi_"
+                                  type="date"
+                                  value-format="yyyy-MM-dd"
+                                  format="yyyy-MM-dd"
+                                  placeholder="请选择"
                                   :readonly="false"
-                                  clearable
+                                  :clearable="true"
                                 />
-                          </template>
-                        </el-table-column> 
-                                            
-  
-                         <el-table-column
-                           label="接样确认状态"
-                           width="130px">
-                            <template slot-scope="scope">
-                                <el-select v-model="scope.row.jie_yang_zhuang_t" placeholder="请选择">
-                                  <el-option
-                                    v-for="item in options"
-                                    :key="item.value"
-                                    :label="item.label"
-                                    :value="item.value">
-                                  </el-option>
-                                </el-select>
-
-                             </template>
-
-                         </el-table-column>
-
-
-
-                         <el-table-column label="功能">
-                                 <template slot-scope="scope">
+                              </template>
+                            </el-form-item>
+                          </el-col>
+                        </el-row>
+
+                        <el-row>
+                          <el-col :span="6">
+                            <el-form-item label="返样日期">
+                              <template slot-scope="scope">
+                                <el-date-picker
+                                  v-model="item.fan_yang_ri_qi_"
+                                  type="date"
+                                  value-format="yyyy-MM-dd"
+                                  format="yyyy-MM-dd"
+                                  placeholder="请选择"
+                                  :readonly="false"
+                                  :clearable="true"
+                                />
+                              </template>
+                            </el-form-item>
+                          </el-col>
+                          <el-col :span="6">
+                            <el-form-item label="返样接样人">
+                              <template slot-scope="scope">
+                                <el-input
+                                      v-model="item.fan_yang_jyr"
+                                      placeholder="请输入"
+                                      type="text"
+                                      :readonly="false"
+                                      clearable
+                                    />
+                              </template>
+                            </el-form-item>
+                          </el-col>
+                          <!-- <el-col :span="6">
+                            <el-form-item label="分装留样数量">
+                              <template slot-scope="scope">
+                                <el-input
+                                      v-model="item.fen_zhuang_liu_ya"
+                                      placeholder="请输入"
+                                      type="text"
+                                      :readonly="false"
+                                      clearable
+                                    />
+                              </template>
+                            </el-form-item>
+                          </el-col> -->
+                        </el-row>
+
+                        <el-row>
+                          <el-col :span="6">
+                            <el-form-item label="姓名">
+                              <template slot-scope="scope">
+                                <el-input
+                                      v-model="item.xing_ming_"
+                                      placeholder="请输入"
+                                      type="text"
+                                      :readonly="false"
+                                      clearable
+                                    />
+                              </template>
+                            </el-form-item>
+                          </el-col>
+                          <el-col :span="6">
+                            <el-form-item label="性别">
+                              <template slot-scope="scope">
+                                  <el-select v-model="item.xing_bie_" placeholder="请选择">
+                                    <el-option
+                                      v-for="item in sex"
+                                      :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="年龄">
+                              <template slot-scope="scope">
+                                <el-input
+                                      v-model="item.nian_ling_"
+                                      placeholder="请输入"
+                                      type="text"
+                                      :readonly="false"
+                                      clearable
+                                    />
+                              </template>
+                            </el-form-item>
+                          </el-col>
+                        </el-row>
+
+                        <el-row>
+                          
+                          <el-col :span="6">
+                            <el-form-item label="备注">
+                              <template slot-scope="scope">
+                                <el-input
+                                      v-model="item.bei_zhu_"
+                                      placeholder="请输入"
+                                      type="text"
+                                      :readonly="false"
+                                      clearable
+                                    />
+                              </template>
+                            </el-form-item>
+                          </el-col>
+                          <el-col :span="6">
+                            <el-form-item label="送样要求">
+                              <template slot-scope="scope">
+                                <el-input
+                                      v-model="item.song_yang_yao_qiu"
+                                      placeholder="请输入"
+                                      type="text"
+                                      :readonly="false"
+                                      clearable
+                                    />
+                              </template>
+                            </el-form-item>
+                          </el-col>
+                          <el-col :span="6">
+                            <el-form-item label="接样确认状态">
+                              <template slot-scope="scope">
+                                  <el-select v-model="item.jie_yang_zhuang_t" placeholder="请选择">
+                                    <el-option
+                                      v-for="item in options"
+                                      :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="功能">
+                              <template slot-scope="scope">
                                      <el-button
                                        size="small"
                                        type="danger"
                                        icon="el-icon-delete"
-                                       @click="deleteData(scope.row.id_)"
+                                       @click="deleteData(item.id_)"
                                      >删除</el-button>
                                  </template>
-                               </el-table-column>
-
-
-                       </el-table>
-                       <el-pagination
-                         layout="prev,pager,next"
-                         background
-                         @current-change="current_change"
-                         :current-page="currentPage"
-                         :pager-count="5"
-                         :page-size="10"
-                         :total="this.pageCount"
-                       ></el-pagination>
+                            </el-form-item>
+                          </el-col> 
+                        </el-row>
+
+                        <el-row>
+                        </el-row>
+                      </div>
+                      </div>
+                     </el-form>
                    </div>
+                   <span slot="footer" class="dialog-footer">
+                      <el-button @click="visible = false">取 消</el-button>
+                      <el-button @click="submitData('确认')" type="primary" >样品确认</el-button>
+                   </span>
              </el-dialog>
 
   </div>
@@ -469,6 +433,7 @@ import manualConfirmationJS from '../js/manualConfirmationJS.js'
 import IbpsLinkData from '@/business/platform/data/templaterender/link-data'
 import weizhiData from "./weizhiData.vue"
 import liuyangData from "./liuyangData.vue"
+import * as dayjs from 'dayjs'
 
 // import IbpsUserSelector from '@/business/platform/org/selector'
  export default {
@@ -553,21 +518,31 @@ import liuyangData from "./liuyangData.vue"
       // OriginalPosition:[],
       mjwtsqbAllResult:[],
       pageCount:1,
-      item:''
-
+      item:'',
+      flag: true
     }
   },
   methods:{
     current_change(currentPage){
       this.currentPage = currentPage
       this.facilityData(currentPage)
+    },
+    liuyanChange(item,index){
+      // console.log(item,index)
+      this.flag = false
+      let itemData =  dayjs(this.listData[index].liu_yang_ri_qi_).add(7,'day').format("YYYY-MM-DD")
+      let val =  dayjs(this.listData[index].liu_yang_ri_qi_).add(3,'month').format("YYYY-MM-DD")
+      this.listData[index].xiao_hui_ri_qi_ = itemData
+      this.listData[index].liu_yang_qi_xian = val
+      this.flag = true
     }
   }
 
   }
 </script>
 
-<style>
+
+<style lang="less" scoped>
  .sample-scan .popContainer{
       position: fixed;
       top: 0;
@@ -577,4 +552,28 @@ import liuyangData from "./liuyangData.vue"
       z-index: 9999999;
       background: rgba(0,0,0,0.7);
   }
-</style>
+    // .dynamic-form-table__label:before {
+    //   content: '*';
+    //   color: #F56C6C;
+    // }
+    .dynamic-form-table__label{
+      color: #F56C6C;
+      font-size: 18px;
+      line-height: 40px;
+      font-weight: bold;
+    }
+    /deep/.el-form-item__content{
+    display: inline-block;
+  }
+  /deep/.el-form-item__label{
+    padding: 0;
+    margin-right: 5px;
+    width: 100px;
+  }
+   /deep/.el-input__inner{
+   border-top: none !important;
+   border-left: none !important;
+   border-right: none !important;
+   border-radius: 0;
+ }
+</style>

+ 348 - 379
src/views/system/jbdScan/goods/sampleConfirmation.vue

@@ -18,155 +18,155 @@
            </div>
               <el-dialog
                width="90%"
+               top="5vh"
                :modal-append-to-body='false'
-               title="样品扫码接收确认操作 - 扫码样品标签并确认样品数量、存放位置-位置根据是否留样二选一进行选择 (如果扫描无结果,请点击除标题外的空白处,恢复扫码功能)"
+               title="样品扫码接收确认操作 - 扫码样品标签并确认样品数量、存放位置 (如果扫描无结果,请点击除标题外的空白处,恢复扫码功能)"
                @close="closeDialog"
                :before-close = "handleClose"
                :visible.sync="visible"> <!-- 表单是否显示 -->
-                   <div style="min-height: 600px;"  @click.self="handleChange">
-                     <el-button @click="submitData('确认')" type="primary" style="float: right;margin: 5px;">样品确认</el-button>
-                     <!--<el-button @click="submitData('入库确认')" type="primary" style="float: right;margin: 5px;">入库确认</el-button>-->
-                        <el-table
-                           :data="listData"
-                           stripe
-                           style="width: 100%">
+               <div style="height: 600px;overflow: auto;"  @click.self="handleChange">
+                     <el-form label-position="top" size="mini" :model="listData" label-width="100px">
+                      <div v-for="(item,index) in listData">
+                        <el-row>
+                          <div class="dynamic-form-table">
+                            <div class="dynamic-form-table__block panel panel-info">
+                            <div class="panel-heading ibps-clearfix">
+                              <!--块模式:工具栏-->
+                              <div class="ibps-fl dynamic-form-table__label">
+                                样品{{ index+1 }}
+                              </div>
+                            </div>
+                            </div>
+                          </div>
+                        </el-row>
 
-                         <el-table-column
-                             prop="yang_pin_bian_hao"
-                             label="样品编号"
-                             width="150px">
-                            </el-table-column>
-                         
-                           <el-table-column
-                             prop="yang_pin_ming_che"
-                             label="样品名称">
-                           </el-table-column>
-                         
-                           <el-table-column
-                             prop="yang_pin_zong_shu"
-                             label="样品总数"
-                             width="180px">
-                           </el-table-column>
-                         
-                           <el-table-column
-                             label="本次确认数量"
-                             width="150px">
-                                 <template slot-scope="scope">
-                                     <el-input-number
-                                      v-model="scope.row.jie_yang_shu_lian"
-                                      controls-position="right"
-                                      @change="handleChange"
-                                      :min="1" :max="9999">
-                                      </el-input-number>
-                                  </template>
-                           </el-table-column>
-                         
-                         
-                         
-                         
-                          <el-table-column
-                            prop="yang_pin_lei_xing"
-                            label="样品类型(一)"
-                            width="150px">
-                           </el-table-column>
-                         
-                          <el-table-column
-                            prop="yang_ben_yun_shu_"
-                            label="样品运输条件(一)"
-                            width="150px">
-                           </el-table-column>
-                         
-                          <el-table-column
-                            prop="shu_liang_"
-                            label="样品数量(一)"
-                            width="150px">
-                           </el-table-column>
-                         
-                          <el-table-column
-                            prop="yang_pin_gui_ge_"
-                            label="样品规格(一)"
-                            width="150px">
-                           </el-table-column>
-                         
-                         
-                           <el-table-column
-                             prop="yang_pin_lei_er_"
-                             label="样品类型(二)"
-                             width="150px">
-                            </el-table-column>
-                         
-                           <el-table-column
-                             prop="yang_pin_yun_shu_"
-                             label="样品运输条件(二)"
-                             width="150px">
-                            </el-table-column>
-                         
-                           <el-table-column
-                             prop="shu_liang_er_"
-                             label="样品数量(二)"
-                             width="150px">
-                            </el-table-column>
-                         
-                           <el-table-column
-                             prop="yang_pin_gui_ge_e"
-                             label="样品规格(二)"
-                             width="150px">
-                            </el-table-column>
-                         
-                         
-                           <el-table-column
-                             prop="yang_pin_lei_san_"
-                             label="样品类型(三)"
-                             width="150px">
-                            </el-table-column>
-                         
-                           <el-table-column
-                             prop="yang_pin_yun_san"
-                             label="样品运输条件(三)"
-                             width="150px">
-                            </el-table-column>
-                         
-                           <el-table-column
-                             prop="shu_liang_san_"
-                             label="样品数量(三)"
-                             width="150px">
-                            </el-table-column>
-                         
-                           <el-table-column
-                             prop="yang_pin_gui_ge_s"
-                             label="样品规格(三)"
-                             width="150px">
-                            </el-table-column>
-                         
-                          <el-table-column
-                            prop="yang_pin_lei_si_"
-                            label="样品类型(四)"
-                            width="150px">
-                           </el-table-column>
-                         
-                          <el-table-column
-                            prop="yang_pin_yun_si_"
-                            label="样品运输条件(四)"
-                            width="150px">
-                           </el-table-column>
-                         
-                          <el-table-column
-                            prop="shu_liang_si_"
-                            label="样品数量(四)"
-                            width="150px">
-                           </el-table-column>
-                         
-                          <el-table-column
-                            prop="yang_pin_gui_si_"
-                            label="样品规格(四)"
-                            width="150px">
-                           </el-table-column>
-                         
-                           <el-table-column
-                             label="是否留样"
-                             width="120px">
-                             <template slot-scope="scope">
-                                 <el-select v-model="scope.row.shi_fou_liu_yang_" placeholder="请选择">
+                        <div style="padding: 10px 20px;">
+
+                        
+                        <el-row>
+                          <el-col :span="6">
+                            <el-form-item label="样品编号">
+                              <el-input v-model="item.yang_pin_bian_hao" readonly="true"></el-input>
+                            </el-form-item>
+                          </el-col>
+                          <el-col :span="6">
+                            <el-form-item label="样品名称">
+                              <el-input v-model="item.yang_pin_ming_che" readonly="true"></el-input>
+                            </el-form-item>
+                          </el-col>
+                          <el-col :span="6">
+                            <el-form-item label="样品总数">
+                              <el-input v-model="item.yang_pin_zong_shu" readonly="true"></el-input>
+                            </el-form-item>
+                          </el-col>
+                          <el-col :span="6">
+                            <el-form-item label="本次确认数量">
+                              <el-input v-model="item.jie_yang_shu_lian"></el-input>
+                            </el-form-item>
+                          </el-col>
+                        </el-row>
+
+
+                        <el-row>
+                          <el-col :span="6">
+                            <el-form-item label="样品类型(一)">
+                              <el-input v-model="item.yang_pin_lei_xing || '/'" readonly="true"></el-input>
+                            </el-form-item>
+                          </el-col>
+                          
+                          <el-col :span="6">
+                            <el-form-item label="样品运输条件(一)">
+                              <el-input v-model="item.yang_ben_yun_shu_ || '/'" readonly="true"></el-input>
+                            </el-form-item>
+                          </el-col>
+                          
+                          <el-col :span="6">
+                            <el-form-item label="样品数量(一)">
+                              <el-input v-model="item.shu_liang_ || '/'" readonly="true"></el-input>
+                            </el-form-item>
+                          </el-col>
+                          
+                          <el-col :span="6">
+                            <el-form-item label="样品规格(一)">
+                              <el-input v-model="item.yang_pin_gui_ge_ || '/'" readonly="true"></el-input>
+                            </el-form-item>
+                          </el-col>
+                        </el-row>
+                          
+                        <el-row>
+                          <el-col :span="6">
+                            <el-form-item label="样品类型(二)">
+                              <el-input v-model="item.yang_pin_lei_er_ || '/'" readonly="true"></el-input>
+                            </el-form-item>
+                          </el-col>
+                          <el-col :span="6">
+                            <el-form-item label="样品运输条件(二)">
+                              <el-input v-model="item.yang_pin_yun_shu_ || '/'" readonly="true"></el-input>
+                            </el-form-item>
+                          </el-col>
+                          <el-col :span="6">
+                            <el-form-item label="样品数量(二)">
+                              <el-input v-model="item.shu_liang_er_ || '/'" readonly="true"></el-input>
+                            </el-form-item>
+                          </el-col>
+                          <el-col :span="6">
+                            <el-form-item label="样品规格(二)">
+                              <el-input v-model="item.yang_pin_gui_ge_e || '/'" readonly="true"></el-input>
+                            </el-form-item>
+                          </el-col>
+                        </el-row>
+                          
+                        <el-row>
+                          <el-col :span="6">
+                            <el-form-item label="样品类型(三)">
+                              <el-input v-model="item.yang_pin_lei_san_ || '/'" readonly="true"></el-input>
+                            </el-form-item>
+                          </el-col>
+                          <el-col :span="6">
+                            <el-form-item label="样品运输条件(三)">
+                              <el-input v-model="item.yang_pin_yun_san || '/'" readonly="true"></el-input>
+                            </el-form-item>
+                          </el-col>
+                          <el-col :span="6">
+                            <el-form-item label="样品数量(三)">
+                              <el-input v-model="item.shu_liang_san_ || '/'" readonly="true"></el-input>
+                            </el-form-item>
+                          </el-col>
+                          <el-col :span="6">
+                            <el-form-item label="样品规格(三)">
+                              <el-input v-model="item.yang_pin_gui_ge_s || '/'" readonly="true"></el-input>
+                            </el-form-item>
+                          </el-col>
+                        </el-row>   
+
+                        <el-row>
+                          <el-col :span="6">
+                            <el-form-item label="样品类型(四)">
+                              <el-input v-model="item.yang_pin_lei_si_ || '/'" readonly="true" ></el-input>
+                            </el-form-item>
+                          </el-col>
+                          <el-col :span="6">
+                            <el-form-item label="样品运输条件(四)">
+                              <el-input v-model="item.yang_pin_yun_si_ || '/'" readonly="true"></el-input>
+                            </el-form-item>
+                          </el-col>
+                          <el-col :span="6">
+                            <el-form-item label="样品数量(四)">
+                              <el-input v-model="item.shu_liang_si_ || '/'" readonly="true"></el-input>
+                            </el-form-item>
+                          </el-col>
+                          <el-col :span="6">
+                            <el-form-item label="样品规格(四)">
+                              <el-input v-model="item.yang_pin_gui_si_ || '/'" readonly="true"></el-input>
+                            </el-form-item>
+                          </el-col>
+                        </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="请选择">
                                    <el-option
                                      v-for="item in ifLY"
                                      :key="item.value"
@@ -175,40 +175,26 @@
                                    </el-option>
                                  </el-select>
                               </template>
-                           </el-table-column>
-                         
-                           <el-table-column
-                             label="样品存放位置"
-                             width="200px"
-                             >
+                            </el-form-item>
+                          </el-col>
+                          <el-col :span="6">
+                            <el-form-item label="样品存放位置">
                               <template slot-scope="scope">
-                                <!-- <ibps-link-data
-                                  v-model="scope.row.shou_yang_wei_zhi"
-                                  template-key = "lhypwzztzly"
-                                /> -->
-                                <weizhiData  v-model="scope.row.shou_yang_wei_zhi"/>
+                                <weizhiData  v-model="item.shou_yang_wei_zhi"/>
                                </template>
-                           </el-table-column>
-                         
-                           <el-table-column
-                             label="留样存放位置"
-                             width="200px">
+                            </el-form-item>
+                          </el-col>
+                          <el-col :span="6">
+                            <el-form-item label="留样存放位置">
                               <template slot-scope="scope">
-                               <!-- <ibps-link-data
-                                  v-model="scope.row.liu_yang_wei_zhi_"
-                                  template-key = "lhypwzztzly"
-                                /> -->
-                                <liuyangData v-model="scope.row.liu_yang_wei_zhi_"/>
+                                <liuyangData v-model="item.liu_yang_wei_zhi_"/>
                                </template>
-                         
-                           </el-table-column>
-                         
-                         
-                          <el-table-column
-                            label="验收结果"
-                            width="120px">
-                            <template slot-scope="scope">
-                                <el-select v-model="scope.row.yan_shou_jie_guo_" placeholder="请选择">
+                            </el-form-item>
+                          </el-col>
+                          <el-col :span="6">
+                            <el-form-item label="验收结果">
+                              <template slot-scope="scope">
+                                <el-select v-model="item.yan_shou_jie_guo_" placeholder="请选择">
                                   <el-option
                                     v-for="item in checkOptions"
                                     :key="item.value"
@@ -217,123 +203,133 @@
                                   </el-option>
                                 </el-select>
                              </template>
-                          </el-table-column>
-                         
-                          <el-table-column
-                            label="留样日期"
-                            width="230px">
-                            <template slot-scope="scope">
+                            </el-form-item>
+                          </el-col>
+                        </el-row>  
+                        
+                        <el-row>
+                          <el-col :span="6">
+                            <el-form-item label="留样日期">
+                              <template slot-scope="scope">
                               <el-date-picker
-                                v-model="scope.row.liu_yang_ri_qi_"
+                                v-model="item.liu_yang_ri_qi_"
                                 type="date"
                                 value-format="yyyy-MM-dd"
                                 format="yyyy-MM-dd"
                                 placeholder="请选择"
                                 :readonly="false"
                                 :clearable="true"
+                                @change="liuyanChange(item,index)"
                               />
                             </template>
-                          </el-table-column>
-                         
-                          <el-table-column
-                            label="留样数量"
-                            width="150px">
-                            <template slot-scope="scope">
+                            </el-form-item>
+                          </el-col>
+                          <el-col :span="6">
+                            <el-form-item label="留样数量">
+                             <template slot-scope="scope">
                                 <el-input-number
-                                 v-model="scope.row.liu_yang_shu_lian"
+                                 v-model="item.liu_yang_shu_lian"
                                   controls-position="right"
                                   @change="handleChange"
                                   :min="1" :max="9999">
                                  </el-input-number>
                              </template>
-                         
-                          </el-table-column>
-                         
-                         
-                          <el-table-column
-                            label="留样期限至"
-                            width="230px">
-                            <template slot-scope="scope">
-                              <el-date-picker
-                                v-model="scope.row.liu_yang_qi_xian"
-                                type="date"
-                                value-format="yyyy-MM-dd"
-                                format="yyyy-MM-dd"
-                                placeholder="请选择"
-                                :readonly="false"
-                                :clearable="true"
-                              />
-                            </template>
-                          </el-table-column>
-                         
-                         
-                          <el-table-column
-                            label="销毁日期"
-                            width="230">
-                            <template slot-scope="scope">
-                              <el-date-picker
-                                v-model="scope.row.xiao_hui_ri_qi_"
-                                type="date"
-                                value-format="yyyy-MM-dd"
-                                format="yyyy-MM-dd"
-                                placeholder="请选择"
-                                :readonly="false"
-                                :clearable="true"
-                              />
-                            </template>
-                          </el-table-column>
-                         
-                          <el-table-column
-                            label="返样日期"
-                            width="230px">
-                            <template slot-scope="scope">
-                              <el-date-picker
-                                v-model="scope.row.fan_yang_ri_qi_"
-                                type="date"
-                                value-format="yyyy-MM-dd"
-                                format="yyyy-MM-dd"
-                                placeholder="请选择"
-                                :readonly="false"
-                                :clearable="true"
-                              />
-                            </template>
-                          </el-table-column>
-                         
-                         
-                          <el-table-column
-                            label="返样接样人"
-                            width="150px">
-                            <template slot-scope="scope">
-                              <el-input
-                                    v-model="scope.row.fan_yang_jyr"
-                                    placeholder="请输入"
-                                    type="text"
-                                    :readonly="false"
-                                    clearable
-                                  />
-                            </template>
-                          </el-table-column>
-                         
-                         
-                          <el-table-column
-                            label="姓名"
-                            width="150px">
-                            <template slot-scope="scope">
-                              <el-input
-                                    v-model="scope.row.xing_ming_"
-                                    placeholder="请输入"
-                                    type="text"
-                                    :readonly="false"
-                                    clearable
-                                  />
-                            </template>
-                          </el-table-column>
-                         
-                          <el-table-column
-                            label="性别"
-                            width="150px">
+                            </el-form-item>
+                          </el-col>
+                          <el-col :span="6">
+                            <el-form-item label="留样期限至">
                               <template slot-scope="scope">
-                                  <el-select v-model="scope.row.xing_bie_" placeholder="请选择">
+                                <el-date-picker
+                                  v-model="item.liu_yang_qi_xian"
+                                  type="date"
+                                  value-format="yyyy-MM-dd"
+                                  format="yyyy-MM-dd"
+                                  placeholder="请选择"
+                                  :readonly="false"
+                                  :clearable="true"
+                                />
+                              </template>
+                            </el-form-item>
+                          </el-col>
+                          <el-col :span="6">
+                            <el-form-item v-if="flag" label="销毁日期">
+                              <template slot-scope="scope">
+                                <el-date-picker
+                                  v-model="item.xiao_hui_ri_qi_"
+                                  type="date"
+                                  value-format="yyyy-MM-dd"
+                                  format="yyyy-MM-dd"
+                                  placeholder="请选择"
+                                  :readonly="false"
+                                  :clearable="true"
+                                />
+                              </template>
+                            </el-form-item>
+                          </el-col>
+                        </el-row>
+
+                        <el-row>
+                          <el-col :span="6">
+                            <el-form-item label="返样日期">
+                              <template slot-scope="scope">
+                                <el-date-picker
+                                  v-model="item.fan_yang_ri_qi_"
+                                  type="date"
+                                  value-format="yyyy-MM-dd"
+                                  format="yyyy-MM-dd"
+                                  placeholder="请选择"
+                                  :readonly="false"
+                                  :clearable="true"
+                                />
+                              </template>
+                            </el-form-item>
+                          </el-col>
+                          <el-col :span="6">
+                            <el-form-item label="返样接样人">
+                              <template slot-scope="scope">
+                                <el-input
+                                      v-model="item.fan_yang_jyr"
+                                      placeholder="请输入"
+                                      type="text"
+                                      :readonly="false"
+                                      clearable
+                                    />
+                              </template>
+                            </el-form-item>
+                          </el-col>
+                          <!-- <el-col :span="6">
+                            <el-form-item label="分装留样数量">
+                              <template slot-scope="scope">
+                                <el-input
+                                      v-model="item.fen_zhuang_liu_ya"
+                                      placeholder="请输入"
+                                      type="text"
+                                      :readonly="false"
+                                      clearable
+                                    />
+                              </template>
+                            </el-form-item>
+                          </el-col> -->
+                        </el-row>
+
+                        <el-row>
+                          <el-col :span="6">
+                            <el-form-item label="姓名">
+                              <template slot-scope="scope">
+                                <el-input
+                                      v-model="item.xing_ming_"
+                                      placeholder="请输入"
+                                      type="text"
+                                      :readonly="false"
+                                      clearable
+                                    />
+                              </template>
+                            </el-form-item>
+                          </el-col>
+                          <el-col :span="6">
+                            <el-form-item label="性别">
+                              <template slot-scope="scope">
+                                  <el-select v-model="item.xing_bie_" placeholder="请选择">
                                     <el-option
                                       v-for="item in sex"
                                       :key="item.value"
@@ -342,86 +338,55 @@
                                     </el-option>
                                   </el-select>
                                </template>
-                          </el-table-column>
-                         
-                          <el-table-column
-                            label="年龄"
-                            width="130px">
-                            <template slot-scope="scope">
-                              <el-input
-                                    v-model="scope.row.nian_ling_"
-                                    placeholder="请输入"
-                                    type="text"
-                                    :readonly="false"
-                                    clearable
-                                  />
-                            </template>
-                          </el-table-column>
-                         
-                         
-                         <!-- <el-table-column
-                            label="报告编制员"
-                            width="130px">
-                             <template slot-scope="scope">
-                                <ibps-user-selector
-                                  v-model="scope.row.bao_gao_bian_zhi_"
-                                  placeholder="请选择"
-                                  type="user"
-                                  store="id"
-                                />
-                             </template>
-                          </el-table-column>
-                         
-                          <el-table-column
-                            label="报告复核员"
-                            width="130px">
-                             <template slot-scope="scope">
-                              <ibps-user-selector
-                                v-model="scope.row.bao_gao_shen_he_y"
-                                placeholder="请选择"
-                                type="user"
-                                store="id"
-                              />
+                            </el-form-item>
+                          </el-col>
+                          <el-col :span="6">
+                            <el-form-item label="年龄">
+                              <template slot-scope="scope">
+                                <el-input
+                                      v-model="item.nian_ling_"
+                                      placeholder="请输入"
+                                      type="text"
+                                      :readonly="false"
+                                      clearable
+                                    />
                               </template>
-                          </el-table-column> -->
-                         
-                         
-                          <el-table-column
-                            label="备注"
-                            width="180px">
-                            <template slot-scope="scope">
-                              <el-input
-                                    v-model="scope.row.bei_zhu_"
-                                    placeholder="请输入"
-                                    type="text"
-                                    :readonly="false"
-                                    clearable
-                                  />
-                            </template>
-                          </el-table-column>
-                                              
+                            </el-form-item>
+                          </el-col>
+                        </el-row>
 
-                        
-                          <el-table-column
-                          label="送样要求"
-                          width="180px">
-                          <template slot-scope="scope">
-                            <el-input
-                                  v-model="scope.row.song_yang_yao_qiu"
-                                  placeholder="请输入"
-                                  type="text"
-                                  :readonly="false"
-                                  clearable
-                                />
-                          </template>
-                        </el-table-column> 
-
-                           
-                           <el-table-column
-                             label="接样确认状态"
-                             width="130px">
+                        <el-row>
+                          
+                          <el-col :span="6">
+                            <el-form-item label="备注">
+                              <template slot-scope="scope">
+                                <el-input
+                                      v-model="item.bei_zhu_"
+                                      placeholder="请输入"
+                                      type="text"
+                                      :readonly="false"
+                                      clearable
+                                    />
+                              </template>
+                            </el-form-item>
+                          </el-col>
+                          <el-col :span="6">
+                            <el-form-item label="送样要求">
+                              <template slot-scope="scope">
+                                <el-input
+                                      v-model="item.song_yang_yao_qiu"
+                                      placeholder="请输入"
+                                      type="text"
+                                      :readonly="false"
+                                      clearable
+                                    />
+                              </template>
+                            </el-form-item>
+                          </el-col>
+                          <el-col :span="6">
+                            <el-form-item label="接样确认状态">
                               <template slot-scope="scope">
-                                  <el-select v-model="scope.row.jie_yang_zhuang_t" placeholder="请选择">
+                                  <el-select v-model="item.jie_yang_zhuang_t" placeholder="请选择">
                                     <el-option
                                       v-for="item in options"
                                       :key="item.value"
@@ -429,34 +394,33 @@
                                       :value="item.value">
                                     </el-option>
                                   </el-select>
-                         
                                </template>
-                         
-                           </el-table-column>
-
-                         <el-table-column label="功能">
-                                 <template slot-scope="scope">
+                            </el-form-item>
+                          </el-col>
+                          <el-col :span="6">
+                            <el-form-item label="功能">
+                              <template slot-scope="scope">
                                      <el-button
                                        size="small"
                                        type="danger"
                                        icon="el-icon-delete"
-                                       @click="deleteData(scope.row.id_)"
+                                       @click="deleteData(item.id_)"
                                      >删除</el-button>
                                  </template>
-                               </el-table-column>
-
+                            </el-form-item>
+                          </el-col> 
+                        </el-row>
 
-                       </el-table>
-                       <!-- <el-pagination
-                         layout="prev,pager,next"
-                         background
-                         @current-change="current_change"
-                         :current-page="currentPage"
-                         :pager-count="5"
-                         :page-size="10"
-                         :total="this.pageCount"
-                       ></el-pagination> -->
+                        <el-row>
+                        </el-row>
+                      </div>
+                      </div>
+                     </el-form>
                    </div>
+                   <span slot="footer" class="dialog-footer">
+                      <el-button @click="visible = false">取 消</el-button>
+                      <el-button @click="submitData('确认')" type="primary" >样品确认</el-button>
+                   </span>
              </el-dialog>
 
   </div>
@@ -468,13 +432,12 @@ import sampleConfirmationJS from '../js/sampleConfirmationJS.js'
 import IbpsLinkData from '@/business/platform/data/templaterender/link-data'
 import weizhiData from "./weizhiData.vue"
 import liuyangData from "./liuyangData.vue"
-// import IbpsUserSelector from '@/business/platform/org/selector'
+import * as dayjs from 'dayjs'
  export default {
    components:{
      IbpsLinkData,
      weizhiData,
      liuyangData,
-    //  IbpsUserSelector
    },
    mixins:[sampleConfirmationJS],
    props:{scanVisible:Boolean},
@@ -551,12 +514,18 @@ import liuyangData from "./liuyangData.vue"
 
     }
   },
-  // methods:{
-  //   current_change(currentPage){
-  //     this.currentPage = currentPage
-  //     this.facilityData(currentPage)
-  //   }
-  // }
+  methods:{
+    
+    liuyanChange(item,index){
+      // console.log(item,index)
+      this.flag = false
+      let itemData =  dayjs(this.listData[index].liu_yang_ri_qi_).add(7,'day').format("YYYY-MM-DD")
+      let val =  dayjs(this.listData[index].liu_yang_ri_qi_).add(3,'month').format("YYYY-MM-DD")
+      this.listData[index].xiao_hui_ri_qi_ = itemData
+      this.listData[index].liu_yang_qi_xian = val
+      this.flag = true
+    }
+  }
   }
 </script>
 

+ 9 - 6
src/views/system/jbdScan/goods/tag.vue

@@ -10,10 +10,12 @@
           <vue-easy-print tableShow ref="easyPrint"
             :onePageRow="onePageRow"
           >
-            <div v-for="(item1, index1) in list" :key="index1"  style="display: inline-block" >
+            <div v-for="(item1, index1) in list" :key="index1"  >
               <div v-for="(item2, index2) in parseInt(item1.num)" :key="index2" 
-              style="display: inline-block"
-              ><!-- style="page-break-after:always" -->
+              
+              >
+              <!-- style="display: inline-block" 13行15行:取消后页面居中 -->
+              <!-- style="page-break-after:always" -->
                <div class="All">
                 <div class="tagBox">
                   <div class="lh">
@@ -48,7 +50,7 @@
                     <div>{{ index2 + 1 }}/{{ item1.num }}支</div>
                   </div>
                   <div class="ewm">
-                    <vue-barcode :value="item1.serial" :width="1" :height="15" ></vue-barcode>
+                    <vue-barcode :value="item1.serial" :width="1" :height="15" :margin="0" :displayValue="false" ></vue-barcode>
                   </div>
 
                   <!-- <div
@@ -223,12 +225,13 @@ export default {
   display: inline-block;
   // justify-content: space-around;
   // flex-direction: column;
-  margin: 10px 5px;
+  // margin: 10px 5px;
+  margin: 10px 300px;
   border-radius: 4px;
   background-color: #fff;
 }
 .ewm{
-
+  margin-left: 64px;
 }
 /*
 .tagBox {

+ 116 - 99
src/views/system/jbdScan/js/manualConfirmationJS.js

@@ -1,4 +1,5 @@
 import repostCurd from '@/business/platform/form/utils/custom/joinCURD.js'
+import * as dayjs from 'dayjs'
 
 export default {
   methods: {
@@ -28,9 +29,14 @@ export default {
         this.pageCount = res1.variables.data[0].count
         if (res.variables.data && res.variables.data.length > 0) {
           for (let i in res.variables.data) {
-            res.variables.data[i].jie_yang_shu_lian = 1
-            res.variables.data[i].jie_yang_zhuang_t = '确认'
+            res.variables.data[i].jie_yang_shu_lian = res.variables.data[i].yang_pin_zong_shu
+            res.variables.data[i].jie_yang_zhuang_t = '确认'
             res.variables.data[i].biao_zhi_uuid_ = this.uuid()
+            res.variables.data[i].shi_fou_liu_yang_ = '是'
+            res.variables.data[i].yan_shou_jie_guo_ = '完好'
+            res.variables.data[i].liu_yang_ri_qi_ = this.dateFormat()
+            res.variables.data[i].liu_yang_qi_xian = dayjs(res.variables.data[i].song_jian_shi_jia).add(3,'month').format("YYYY-MM-DD")
+            res.variables.data[i].xiao_hui_ri_qi_ = dayjs(res.variables.data[i].liu_yang_qi_xian).endOf('month').format("YYYY-MM-DD")
             this.listData.push(res.variables.data[i])
           }
         }
@@ -78,18 +84,7 @@ export default {
           let dWhere = []
           let ypbh = []
           let cfwzIdList = [] // 放置 存放位置的ID
-
-          // let ypIdList = [] // 样品id列表,格式转好的
-          // let ypWeiZhi = [] // 样品收样位置
-          // let ypLiuYangWeiZhi = [] // 样品留样位置
-          // let saoMaNumList = [] // 扫码确认数量列表
-          // let jieYangQueRenZTList = [] // 接样状态列表
-
           let ypbhList = [] // 样品编号列表
-          // let mjypbList = [] // 明鉴样品表
-          // let mjypbWJ = [] // 明鉴样品表外键
-
-
 
           // 罗湖样品编号列表
           let lhypbhList = []
@@ -113,6 +108,7 @@ export default {
 
 
           for (let yp in ypInfoList) { //样品数据
+            let cfwzObj = []
             let cfwz = ''
             /*
               校验:
@@ -148,15 +144,17 @@ export default {
           //     return;
           //   }
 
+            cfwzObj.push(ypInfoList[yp].shou_yang_wei_zhi) //取位置信息
+
             if (ypInfoList[yp].shi_fou_liu_yang_ == "是") {
               if (ypInfoList[yp].liu_yang_wei_zhi_ == null || ypInfoList[yp].liu_yang_wei_zhi_ == '') {
                 this_.$message.error("你要留样的话,存放位置不能为空哦!")
                 return;
               }
-              if (ypInfoList[yp].shou_yang_wei_zhi != undefined && ypInfoList[yp].shou_yang_wei_zhi != '') {
-                this_.$message.error("你要留样的话,就不要选收样存放位置!")
-                return;
-              }
+              // if (ypInfoList[yp].shou_yang_wei_zhi != undefined && ypInfoList[yp].shou_yang_wei_zhi != '') {
+              //   this_.$message.error("你要留样的话,就不要选收样存放位置!")
+              //   return;
+              // }
               if (ypInfoList[yp].liu_yang_ri_qi_ == null || ypInfoList[yp].liu_yang_ri_qi_ == '') {
                 this_.$message.error("留样时必须填写留样日期!")
                 return;
@@ -177,20 +175,21 @@ export default {
                 this_.$message.error("留样时必须填写销毁日期!")
                 return;
               }
-                cfwz = ypInfoList[yp].liu_yang_wei_zhi_
-
-            } else {
-              if (ypInfoList[yp].shou_yang_wei_zhi == null || ypInfoList[yp].shou_yang_wei_zhi == '') {
-                this_.$message.error("你正常收样的话,样品存放位置不能为空哦!")
-                return;
-              }
-              if (ypInfoList[yp].liu_yang_wei_zhi_ != undefined && ypInfoList[yp].liu_yang_wei_zhi_ != '') {
-                this_.$message.error("你正常收样的话,就不要选择留样存放位置!")
-                return;
-              }
-                cfwz = ypInfoList[yp].shou_yang_wei_zhi //取位置信息
-            }
-
+                // cfwz = ypInfoList[yp].liu_yang_wei_zhi_
+                cfwzObj.push(ypInfoList[yp].liu_yang_wei_zhi_)
+
+            } 
+            // else {
+            //   if (ypInfoList[yp].shou_yang_wei_zhi == null || ypInfoList[yp].shou_yang_wei_zhi == '') {
+            //     this_.$message.error("你正常收样的话,样品存放位置不能为空哦!")
+            //     return;
+            //   }
+            //   if (ypInfoList[yp].liu_yang_wei_zhi_ != undefined && ypInfoList[yp].liu_yang_wei_zhi_ != '') {
+            //     this_.$message.error("你正常收样的话,就不要选择留样存放位置!")
+            //     return;
+            //   }
+            //     cfwz = ypInfoList[yp].shou_yang_wei_zhi //取位置信息
+            // }
 
             // uuidList.push(ypInfoList[yp].biao_zhi_uuid_)
             // ypIdList.push('{"id_":"' + ypInfoList[yp].id_ + '"}')
@@ -205,7 +204,7 @@ export default {
             // 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)
+            cfwzIdList.push(cfwzObj)
             lhypbhList.push( ypInfoList[yp].yang_pin_bian_hao )
             lhypbWJ.push( ypInfoList[yp].parent_id_ )
             lhypIdList.push( ypInfoList[yp].id_ )
@@ -220,8 +219,6 @@ export default {
         */
          let value = ''
          let lhypIdStr = ''
-         // console.log('lhypbWJ :',lhypbWJ)
-         // console.log('lhypIdList :',lhypIdList)
          for(let i =0;i<lhypbWJ.length; i++){
            value += lhypbWJ[i] + ','
          }
@@ -276,7 +273,7 @@ export default {
                     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["bei_zhu_"]           = ypInfoList[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_ :''
@@ -286,12 +283,8 @@ export default {
                     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_cun_fang"]  =      ypInfoList[i].liu_yang_wei_zhi_
                     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_
@@ -299,8 +292,9 @@ export default {
                     obj["fan_yang_jyr"]       =       ypInfoList[i].fan_yang_jyr
                     obj["biao_zhi_uuid_"]     =       ypInfoList[i].biao_zhi_uuid_
                     obj["song_yang_yao_qiu"]  =    ypInfoList[i].song_yang_yao_qiu
+                    // obj["fen_zhuang_liu_ya"]  =    ypInfoList[i].fen_zhuang_liu_ya
                     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_wei_zhi_ ==''?'':ypInfoList[i].liu_yang_wei_zhi_
                     ypdjb.push(obj)
                   }
               }
@@ -404,14 +398,15 @@ export default {
                          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
+                         rw["fen_zhuang_liu_ya"] = ypInfoList[i].liu_yang_shu_lian  // 留样数量
                          rws.push(rw)
                         // }
                   }
-                   // console.log("任务分配",rws)
+                  //  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() + '"}}')
+                // 更新委托单 检测开始时间   问吴懿是否需要 不需要
+                // repostCurd('updates', '{"tableName":"t_lhwtsqb","paramWhere":[' + lhwtbID + '],"paramCond":{"jian_ce_kai_shi_s":"' + this_.dateFormat() + '"}}')
 
                 //更新展示表
                 if(lhwtzsbID.length > 0){
@@ -432,57 +427,86 @@ export default {
                  repostCurd('updates', '{"tableName":"t_lhwtsqb","paramWhere":[' + lhwtbID + '],"paramCond":{"wei_tuo_zhuang_ta":"已完成"}}')
                  */
 
-
-          /* 2、更新货架位置信息(位置状态、样品编号、入库时间)如果是重复位置,则新增一条位置记录,并增加对应UUID   */
+          // console.log('dwhere:',dWhere)
+          // console.log('cfwzIdList:',cfwzIdList)
+          /* 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] +'","yang_pin_ming_che":"'  + lhypmcList[num] +'","ru_ku_shi_jian_":"' + this_.dateFormat() + '"}}').then(res => {
-                    })
-                  } 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["yang_pin_ming_che"] = lhypmcList[num]
-                    cfNew["ru_ku_shi_jian_"] = this_.dateFormat()
-                    cfNew["biao_zhi_uuid_"] = uuidList[num]
-                    cfNewList.push(cfNew)
-                    let uuid = cfNew["biao_zhi_uuid_"];
-
-                    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 + '"}}')
-                        } else {
-                          repostCurd('update', '{"tableName":"t_lhypdjb","paramWhere":' + abc + ',"paramCond":' + '{"liu_yang_cun_fang":"' + dataid + '"}}')
+            let firstIfEmpty = true
+            let secondIfEmpty = true
+              for(let index = 0; index<cfwzIdList[num].length; index++){
+                let sql = "select * from t_ypcfwz where id_ = '" + cfwzIdList[num][index] + "'"
+                // console.log(sql)
+                  repostCurd('sql', sql).then(response => {
+                    let resArr = response.variables.data
+                    // console.log(resArr)
+                    if (resArr.length == 1) {
+                      if (resArr[0].wei_zhi_zhuang_ta == "空余") {
+                        if(index == 0){
+                          firstIfEmpty = false
+                        }else{
+                          secondIfEmpty = false
                         }
-                      })
-                    })
-                  }
-                }
-              })
+                        let content = '{"id_":"' + cfwzIdList[num][index] + '"}'
+                        repostCurd('update', 
+                        '{"tableName":"t_ypcfwz","paramWhere":'+content+',"paramCond":{"wei_zhi_zhuang_ta":"占用","ru_ku_shi_jian_":"'+this_.dateFormat()+'","yang_pin_bian_hao":"'+ypbh[num]+'","yang_pin_ming_che":"'+lhypmcList[num]+'"}}').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["shi_fou_guo_shen_"] = '启用'
+                        // cfNew["yang_pin_bian_hao"] = lhypIdList[num]
+                        cfNew["yang_pin_ming_che"] = lhypmcList[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('货位:',cfNewList)
+
+
+                        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 data = res.variables.data;
+                            // console.log('data:',data)
+                            let suchAs = '{"biao_zhi_uuid_":"' + uuid + '"}'
+                            // console.log(data.length,changeWeiZhi,changesyWeiZhi,firstIfEmpty,secondIfEmpty)
+                            if(data.length == 1 && changeWeiZhi && firstIfEmpty){
+                              repostCurd('update', '{"tableName":"t_lhypdjb","paramWhere":'+suchAs+',"paramCond":{"cun_fang_wei_zhi_":"'+data[0].id_+'"}}').then(res=>{
+                                console.log('One 存放位置',res)
+                              })
+                            }else if(data.length == 1 && changesyWeiZhi && secondIfEmpty){
+                              repostCurd('update', '{"tableName":"t_lhypdjb","paramWhere":'+suchAs+',"paramCond":{"liu_yang_cun_fang":"'+data[0].id_+'"}}').then(res=>{
+                                console.log('One 留样位置',res)
+                              })
+                            }else if(data.length == 2 && changeWeiZhi && changesyWeiZhi){
+                              let whereL = []
+                              whereL.push(suchAs)
+                              repostCurd('updates', '{"tableName":"t_lhypdjb","paramWhere":['+whereL+'],"paramCond":{"cun_fang_wei_zhi_":"'+data[0].id_+'","liu_yang_cun_fang":"'+data[1].id_+'"}}').then(res=>{
+                                console.log('Two 收样留样位置',res)
+                              })
+                            }
+                          })
+                        })
+                      }
+                    }
+                  })
+              }
           }
-          
+           
           /*
                let ffbSql = "select * from t_lhfbb where FIND_IN_SET( parent_id_,'"+ fbbIdStr +"')"
                repostCurd('sql',ffbSql).then(response => {
@@ -494,7 +518,6 @@ export default {
                        jcxmArr.push(temp)
                      })
                    })
-
                    let allProject = []
                    let finalJCTask = []
                    let processDefKeyParam = []
@@ -534,8 +557,6 @@ export default {
                              processFormKeyParam.push(jcxmItem.formkey_)
                           })
                         })
-
-
                        finalJCTask.forEach((item,index )=>{
                          let obj = {
                            tableName:"t_lhjczb",
@@ -546,17 +567,13 @@ export default {
                        repostCurd('add', JSON.stringify(obj))
                        })
                    })
-
                    }
-
                })
-
               //更新展示表
               if(lhwtzsbID.length > 0){
                 repostCurd('updates', '{"tableName":"t_lhwtzsb","paramWhere":['+lhwtzsbID+'],"paramCond":{"zhuang_tai_":"检测进行中"}}')
               }
               */
-
           })
 
 

+ 439 - 382
src/views/system/jbdScan/js/sampleConfirmationJS.js

@@ -31,11 +31,20 @@ export default {
          repostCurd('select','{"tableName": "t_lhypb","paramWhere":{"yang_pin_bian_hao":"' + id + '","jie_yang_zhuang_t":"待接收","shi_fou_guo_shen_":"1"}}').then(res => {
           if (res.variables.data && res.variables.data.length > 0) {
             for (let i in res.variables.data) {
-              res.variables.data[i].jie_yang_shu_lian = 1
-              res.variables.data[i].jie_yang_zhuang_t = '未确认'
+              // res.variables.data[i].jie_yang_shu_lian = 1
+              // 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.OriginalPosition.push(res.variables.data[i].shi_fou_liu_yang_ == "是" ? res.variables.data[i].liu_yang_wei_zhi_ : res.variables.data[i].shou_yang_wei_zhi)
+              res.variables.data[i].jie_yang_shu_lian = res.variables.data[i].yang_pin_zong_shu
+              res.variables.data[i].jie_yang_zhuang_t = '已确认'
               res.variables.data[i].biao_zhi_uuid_ = this.uuid()
+              res.variables.data[i].shi_fou_liu_yang_ = '是'
+              res.variables.data[i].yan_shou_jie_guo_ = '完好'
+              res.variables.data[i].liu_yang_ri_qi_ = this.dateFormat()
+              res.variables.data[i].liu_yang_qi_xian = dayjs(res.variables.data[i].song_jian_shi_jia).add(3,'month').format("YYYY-MM-DD")
+              res.variables.data[i].xiao_hui_ri_qi_ = dayjs(res.variables.data[i].liu_yang_qi_xian).endOf('month').format("YYYY-MM-DD")
               this.listData.push(res.variables.data[i])
-              // this.OriginalPosition.push(res.variables.data[i].shi_fou_liu_yang_ == "是" ? res.variables.data[i].liu_yang_wei_zhi_ : res.variables.data[i].shou_yang_wei_zhi)
             }
             }
         })
@@ -59,24 +68,34 @@ export default {
       });
       },
 
-    submitData(type) {
-      // this指针
-      let this_ = this;
-      // 回传关闭事件。隐藏当前组件。
-      let changeWeiZhi;     // 此处俩字段作用在下面 选择货位时出现重复位置 而重新更新样品登记表 收样位置|留样位置
-      let changesyWeiZhi;
-      let judge = true;
-        this.$confirm('请再次确认 [样品接收信息]').then(_ => {
-
+      submitData(type) {
+        // this指针
+        let this_ = this;
+        let changeWeiZhi;     // 此处俩字段作用在下面 选择货位时出现重复位置 而重新更新样品登记表 收样位置|留样位置
+        let changesyWeiZhi;
+        // 回传关闭事件。隐藏当前组件。
+        let judge = true;
+  
+        if (this_.listData.length == 0) {
+          this.$emit('callback', true)
+          this.visable = false
+          this.$message({
+            message: '暂无样品待接收确认!',
+            type: 'error'
+          })
+          this.closeDialog();
+        } else {
+          this.$confirm('请再次确认 [样品接收信息]').then(_ => {
+  
             // 获取样品列表
             let ypInfoList = this_.listData
-
+            // console.log(ypInfoList, "样品信息")
+  
             let dWhere = []
             let ypbh = []
             let cfwzIdList = [] // 放置 存放位置的ID
-            // let uuidList = [] // 列表的UUID
             let ypbhList = [] // 样品编号列表
-
+  
             // 罗湖样品编号列表
             let lhypbhList = []
             let lhypmcList = []
@@ -88,16 +107,18 @@ export default {
             let lhypbWJ = []
             // 罗湖委托表主键
             let lhwtbID = []
+            let lhwtbOnlyId = []
             // 罗湖委托表展示表ID
             let lhwtzsbID = []
-            let lhwtbOnlyId = []
             // 罗湖样品id列表
             let lhypIdList = []
             // 罗湖样品id格式列表
             let lhypIdNewList = []
             let uuidList = [] // 列表的UUID
-
+  
+  
             for (let yp in ypInfoList) { //样品数据
+              let cfwzObj = []
               let cfwz = ''
               /*
                 校验:
@@ -110,6 +131,7 @@ export default {
                 this_.$message.error('操作失败,[' + ypInfoList[yp].yang_pin_ming_che + '] 接收确认数量不得大于收样数量。')
                 return;
               }
+  
               if (ypInfoList[yp].jie_yang_zhuang_t == '未确认') {
                 this_.$message.error('操作失败,[' + ypInfoList[yp].yang_pin_ming_che + '] 接收确认状态必须为已确认。')
                 return;
@@ -122,25 +144,27 @@ export default {
                 this_.$message.error('操作失败,[' + ypInfoList[yp].yang_pin_ming_che + '] 是否留样不能为空!')
                 return;
               }
-
-              // if (ypInfoList[yp].bao_gao_bian_zhi_ == undefined || ypInfoList[yp].bao_gao_bian_zhi_ == '') {
-              //   this_.$message.error('操作失败,[' + ypInfoList[yp].yang_pin_ming_che + '] 报告编制员不能为空!')
-              //   return;
-              // }
-              // if (ypInfoList[yp].bao_gao_shen_he_y == undefined || ypInfoList[yp].bao_gao_shen_he_y == '') {
-              //   this_.$message.error('操作失败,[' + ypInfoList[yp].yang_pin_ming_che + '] 报告审核员不能为空!')
-              //   return;
-              // }
-
+  
+            //  if (ypInfoList[yp].bao_gao_bian_zhi_ == undefined || ypInfoList[yp].bao_gao_bian_zhi_ == '') {
+            //     this_.$message.error('操作失败,[' + ypInfoList[yp].yang_pin_ming_che + '] 报告编制员不能为空!')
+            //     return;
+            //   }
+            //   if (ypInfoList[yp].bao_gao_shen_he_y == undefined || ypInfoList[yp].bao_gao_shen_he_y == '') {
+            //     this_.$message.error('操作失败,[' + ypInfoList[yp].yang_pin_ming_che + '] 报告审核员不能为空!')
+            //     return;
+            //   }
+  
+              cfwzObj.push(ypInfoList[yp].shou_yang_wei_zhi) //取位置信息
+  
               if (ypInfoList[yp].shi_fou_liu_yang_ == "是") {
                 if (ypInfoList[yp].liu_yang_wei_zhi_ == null || ypInfoList[yp].liu_yang_wei_zhi_ == '') {
                   this_.$message.error("你要留样的话,存放位置不能为空哦!")
                   return;
                 }
-                if (ypInfoList[yp].shou_yang_wei_zhi != undefined && ypInfoList[yp].shou_yang_wei_zhi != '') {
-                  this_.$message.error("你要留样的话,就不要选收样存放位置!")
-                  return;
-                }
+                // if (ypInfoList[yp].shou_yang_wei_zhi != undefined && ypInfoList[yp].shou_yang_wei_zhi != '') {
+                //   this_.$message.error("你要留样的话,就不要选收样存放位置!")
+                //   return;
+                // }
                 if (ypInfoList[yp].liu_yang_ri_qi_ == null || ypInfoList[yp].liu_yang_ri_qi_ == '') {
                   this_.$message.error("留样时必须填写留样日期!")
                   return;
@@ -161,377 +185,408 @@ export default {
                   this_.$message.error("留样时必须填写销毁日期!")
                   return;
                 }
-                  cfwz = ypInfoList[yp].liu_yang_wei_zhi_
-
-              } else {
-                if (ypInfoList[yp].shou_yang_wei_zhi == null || ypInfoList[yp].shou_yang_wei_zhi == '') {
-                  this_.$message.error("你正常收样的话,样品存放位置不能为空哦!")
-                  return;
-                }
-                if (ypInfoList[yp].liu_yang_wei_zhi_ != undefined && ypInfoList[yp].liu_yang_wei_zhi_ != '') {
-                  this_.$message.error("你正常收样的话,就不要选择留样存放位置!")
-                  return;
-                }
-                  cfwz = ypInfoList[yp].shou_yang_wei_zhi //取位置信息
-              }
+                  // cfwz = ypInfoList[yp].liu_yang_wei_zhi_
+                  cfwzObj.push(ypInfoList[yp].liu_yang_wei_zhi_)
+  
+              } 
+              // else {
+              //   if (ypInfoList[yp].shou_yang_wei_zhi == null || ypInfoList[yp].shou_yang_wei_zhi == '') {
+              //     this_.$message.error("你正常收样的话,样品存放位置不能为空哦!")
+              //     return;
+              //   }
+              //   if (ypInfoList[yp].liu_yang_wei_zhi_ != undefined && ypInfoList[yp].liu_yang_wei_zhi_ != '') {
+              //     this_.$message.error("你正常收样的话,就不要选择留样存放位置!")
+              //     return;
+              //   }
+              //     cfwz = ypInfoList[yp].shou_yang_wei_zhi //取位置信息
+              // }
+  
+              // uuidList.push(ypInfoList[yp].biao_zhi_uuid_)
               // ypIdList.push('{"id_":"' + ypInfoList[yp].id_ + '"}')
               // ypWeiZhi.push(ypInfoList[yp].shou_yang_wei_zhi) // 收样存放位置
               // ypLiuYangWeiZhi.push(ypInfoList[yp].liu_yang_wei_zhi_) // 留样存放位置
               // saoMaNumList.push(ypInfoList[yp].jie_yang_shu_lian) // 扫码数量
               // jieYangQueRenZTList.push(ypInfoList[yp].jie_yang_zhuang_t) // 接收确认状态
               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_ + '"}')
-            uuidList.push(ypInfoList[yp].biao_zhi_uuid_)
-            ypbh.push(ypInfoList[yp].yang_pin_bian_hao)
-            lhypmcList.push(ypInfoList[yp].yang_pin_ming_che)
-          }
-
-        /*
-          封装好样品登记表对象,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_ as wtdh, 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;
+  
+  
+              // 罗湖
+              // 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(cfwzObj)
+              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)
+              lhypmcList.push(ypInfoList[yp].yang_pin_ming_che)
+            }
+  
+          /*
+            封装好样品登记表对象,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,"','")
+  
+           // console.log('lhypIdStr :',lhypIdStr)
+           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_ as wtdh, 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}')`
+            // console.log(allSQL)
+            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].wtdh
-                    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_
-                    obj["song_yang_yao_qiu"]  =    ypInfoList[i].song_yang_yao_qiu
-                    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,以及同索引下的样品表的编制人和审核员
-              */
-              // 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 + '"}}')
+                    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].wtdh
+                      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_"]           = ypInfoList[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["liu_yang_ri_qi_"]    =       ypInfoList[i].liu_yang_ri_qi_
+                      obj["liu_yang_cun_fang"]  =      ypInfoList[i].liu_yang_wei_zhi_
+                      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_
+                      obj["song_yang_yao_qiu"]  =    ypInfoList[i].song_yang_yao_qiu
+                      // obj["fen_zhuang_liu_ya"]  =    ypInfoList[i].fen_zhuang_liu_ya
+                      changeWeiZhi = ypInfoList[i].shou_yang_wei_zhi ==''?'':ypInfoList[i].shou_yang_wei_zhi
+                      changesyWeiZhi = ypInfoList[i].liu_yang_wei_zhi_ ==''?'':ypInfoList[i].liu_yang_wei_zhi_
+                      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,以及同索引下的样品表的编制人和审核员
+                */
+                // let finalWtdIdList = []
+  
+  /**
+   * 1.11胡老师说不要
+   
+                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 + '"}}')
+                }
               }
-            }*/
-              /*
-              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_ //样品类型
+  */
+  
+                /*
+                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 取消 直接 批量开检测子流程】【2022/11/30 胡老师又要】
+                   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_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_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_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_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_ //样品类型
+                             }
                            }
-                         }
-                         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)
-                        // }
+                           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
+                           rw["fen_zhuang_liu_ya"] = ypInfoList[i].liu_yang_shu_lian  // 留样数量
+                           rws.push(rw)
+                          // }
+                    }
+                    //  console.log("任务分配",rws)
+                   repostCurd('add', '{"tableName":"t_lhrwfpb","paramWhere":'+JSON.stringify(rws)+',"defKey":"Process_04o0csc","formKey":"lhrwfp"}')
                   }
-                   // 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_":"任务分配进行中"}}')
-                }
-                
-
-               /*
-                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] +'","yang_pin_ming_che":"'  + lhypmcList[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["yang_pin_ming_che"] = lhypmcList[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 + "'";
-                      // console.log(selectsql)
-                      repostCurd('sql', selectsql).then(res => {
-                        // console.log(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('回填样品收样位置')
+                  // 更新委托单 检测开始时间   问吴懿是否需要 不需要
+                  // 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_":"任务分配进行中"}}')
+                  }
+                  
+  
+  
+  
+  
+  
+                 /*
+                  3、【任务分配2022/11/23 取消 直接 批量开检测子流程】【2022/11/30 取消】
+                   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)
+            // console.log('cfwzIdList:',cfwzIdList)
+            /* 2、更新货架位置信息(位置状态、样品编号、入库时间)如果是重复位置,则新增一条位置记录,并增加对应UUID  */
+            for (let num in dWhere) {
+              let firstIfEmpty = true
+              let secondIfEmpty = true
+                for(let index = 0; index<cfwzIdList[num].length; index++){
+                  let sql = "select * from t_ypcfwz where id_ = '" + cfwzIdList[num][index] + "'"
+                  // console.log(sql)
+                    repostCurd('sql', sql).then(response => {
+                      let resArr = response.variables.data
+                      // console.log(resArr)
+                      if (resArr.length == 1) {
+                        if (resArr[0].wei_zhi_zhuang_ta == "空余") {
+                          if(index == 0){
+                            firstIfEmpty = false
+                          }else{
+                            secondIfEmpty = false
+                          }
+                          let content = '{"id_":"' + cfwzIdList[num][index] + '"}'
+                          repostCurd('update', 
+                          '{"tableName":"t_ypcfwz","paramWhere":'+content+',"paramCond":{"wei_zhi_zhuang_ta":"占用","ru_ku_shi_jian_":"'+this_.dateFormat()+'","yang_pin_bian_hao":"'+ypbh[num]+'","yang_pin_ming_che":"'+lhypmcList[num]+'"}}').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["shi_fou_guo_shen_"] = '启用'
+                          // cfNew["yang_pin_bian_hao"] = lhypIdList[num]
+                          cfNew["yang_pin_ming_che"] = lhypmcList[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('货位:',cfNewList)
+  
+  
+                          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 data = res.variables.data;
+                              // console.log('data:',data)
+                              let suchAs = '{"biao_zhi_uuid_":"' + uuid + '"}'
+                              // console.log(data.length,changeWeiZhi,changesyWeiZhi,firstIfEmpty,secondIfEmpty)
+                              if(data.length == 1 && changeWeiZhi && firstIfEmpty){
+                                repostCurd('update', '{"tableName":"t_lhypdjb","paramWhere":'+suchAs+',"paramCond":{"cun_fang_wei_zhi_":"'+data[0].id_+'"}}').then(res=>{
+                                  console.log('One 存放位置',res)
+                                })
+                              }else if(data.length == 1 && changesyWeiZhi && secondIfEmpty){
+                                repostCurd('update', '{"tableName":"t_lhypdjb","paramWhere":'+suchAs+',"paramCond":{"liu_yang_cun_fang":"'+data[0].id_+'"}}').then(res=>{
+                                  console.log('One 留样位置',res)
+                                })
+                              }else if(data.length == 2 && changeWeiZhi && changesyWeiZhi){
+                                let whereL = []
+                                whereL.push(suchAs)
+                                repostCurd('updates', '{"tableName":"t_lhypdjb","paramWhere":['+whereL+'],"paramCond":{"cun_fang_wei_zhi_":"'+data[0].id_+'","liu_yang_cun_fang":"'+data[1].id_+'"}}').then(res=>{
+                                  console.log('Two 收样留样位置',res)
+                                })
+                              }
+                            })
                           })
                         }
-                      })
-
+                      }
                     })
-                  }
                 }
-              })
-          }
-/*
-               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 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_)
+                     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_":"检测进行中"}}')
-              }
-*/
+                         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.visable = false
             this.$message({
@@ -540,7 +595,9 @@ export default {
             })
             this.closeDialog();
           }).catch(_ => {});
-    },
+        }
+  
+      },
     /* 去除指定行数据 使用过滤器filter过滤指定行号数据 */
     deleteData(val){
       this.listData = this.listData.filter((data) =>{