浏览代码

1.蜜蜂所入库申请增加查询

hanmj 6 年之前
父节点
当前提交
56df5b6b6f

+ 249 - 85
src/dashoo.cn/frontend_animal/src/pages/biobank/sampleRK/_opera/operation.vue

@@ -140,12 +140,27 @@
         <el-row :gutter="20" class="samplesdetailcss">
           <el-col :span="24">
             <el-card class="box-card equipmentdetail adddetailcard" v-if="!save_flag">
-              <div slot="header">
+              <div >
                 <legend style="color:#436EEE"></legend>
                 <i class="icon icon-paragraph-justify">样本信息</i>
-                <span style="float: right;">
-                  <el-button type="primary" class="el-button--mini" @click="EquipmentlistShow" :disabled="SampleRKform.ApplyStatus != 0">样本存储</el-button>
-                </span>
+                  <el-form ref="form" :inline="true" style="float: right; margin-top: -10px">
+                    <el-form-item label="样本条码">
+                      <el-input size="small" style="width: 165px;" v-model="BarCode" placeholder="请输入样本条码"></el-input>
+                    </el-form-item>
+                    <el-form-item>
+                      <el-dropdown split-button type="primary" size="small"  @command="handleSearchCommand">
+                        查询
+                        <el-dropdown-menu slot="dropdown">
+                          <el-dropdown-item command="search">高级查询</el-dropdown-item>
+                          <el-dropdown-item command="clear">查询重置</el-dropdown-item>
+                        </el-dropdown-menu>
+                      </el-dropdown>
+                    </el-form-item>
+                    <el-form-item>
+                      <el-button type="primary" class="el-button--small" @click="EquipmentlistShow" :disabled="SampleRKform.ApplyStatus != 0">样本存储</el-button>
+                    </el-form-item>
+                  </el-form>
+                  
               </div>
               <el-table :data="SamplesList" border stripe style="width: 100%" height="530" @selection-change="handleSelectionChange">
                 <el-table-column type="selection" width="35px"></el-table-column>
@@ -230,6 +245,61 @@
         <el-button size="small" type="primary" @click="confirmLogin">登录</el-button>
       </div>
     </el-dialog>
+    <el-dialog title="高级查询" :visible.sync="searchdialogVisible" width="1000px">
+      <el-form ref="advancedSearchForm" label-width="90px">
+        <el-row>
+          <el-col :span="8">
+            <el-form-item label="样本条码">
+              <el-input v-model="BarCode" placeholder="请输入样本条码" size="mini" style="width:100%"></el-input>
+            </el-form-item>
+            <el-form-item label="样本内码" v-if="acc !='srNA2'">
+              <el-input v-model="InnerCode" placeholder="请输入样本内码" size="mini" style="width:100%"></el-input>
+            </el-form-item>
+            <el-form-item label="样本类型">
+              <el-select v-model="SampleType" clearable placeholder="请选择" @change="selsampletypeChange" size="mini"
+                style="width:100%">
+                <el-option v-for="item in sampletypes" :label="item.Name" :value="item.Id" :key="item.Id"></el-option>
+              </el-select>
+            </el-form-item>
+            <el-form-item label="录入日期">
+              <el-date-picker v-model="CreateOn" type="daterange" range-separator="至" start-placeholder="开始日期"
+                end-placeholder="结束日期" size="mini" style="width:100%"></el-date-picker>
+            </el-form-item>            
+          </el-col>
+          <el-col :span="8">
+            <el-form-item label="样本编码">
+              <el-input v-model="SampleCode" placeholder="请输入样本编码" size="mini" style="width:100%"></el-input>
+            </el-form-item>
+            <el-form-item label="样本名称">
+              <el-input v-model="Name" placeholder="请输入样本名称" size="mini" style="width:100%"></el-input>
+            </el-form-item>
+            <el-form-item label="特有扩展">
+              <el-select v-model="STNoteField" clearable placeholder="请选择" size="mini" style="width:100%">
+                <el-option v-for="item in typetykzlist" :label="item.Name" :value="item.FieldName" :key="item.FieldName"></el-option>
+              </el-select>
+            </el-form-item>
+          </el-col>
+          <el-col :span="8">
+            <el-form-item label="样本源名称">
+              <el-input v-model="SourceName" placeholder="请输入样本源名称" size="mini" style="width:100%"></el-input>
+            </el-form-item>
+            <el-form-item label="录入人">
+              <el-input v-model="CreateBy" placeholder="请输入录入人" size="mini" style="width:100%"></el-input>
+            </el-form-item>
+            <el-form-item label="特有检索">
+              <el-input v-model="Stnotevalue" placeholder="输入检索内容" size="mini" style="width:100%"></el-input>
+            </el-form-item>
+            <el-form-item label="所属分组">
+              <el-input v-model="GroupName" placeholder="输入所属分组" size="mini" style="width:100%"></el-input>
+            </el-form-item>
+          </el-col>
+        </el-row>
+      </el-form>
+      <span slot="footer" class="dialog-footer">
+        <el-button size="mini" @click="searchdialogVisible = false">取 消</el-button>
+        <el-button size="mini" type="primary" @click="seachdata">查 询</el-button>
+      </span>
+    </el-dialog>
   </div>
 </template>
 
@@ -241,8 +311,7 @@
   export default {
     name: 'materialdetect',
     components: {},
-    components: {},
-    data() {
+    data () {
       var checksampletype = (rule, value, callback) => {
         if (!value) {
           callback(new Error('请选择存储容器'))
@@ -265,22 +334,22 @@
         }
       }
       return {
-        pagetitle: '', //面包屑标题
-        service_flag: '', //页面新增或编辑标志位
+        pagetitle: '', // 面包屑标题
+        service_flag: '', // 页面新增或编辑标志位
         CurrentItemCount: 0, // 当前页显示数量
         CurrentPage: 1, // 当前页
         Size: 10,
         currentItemCount: 0, // 当前页显示数量
         currentPage: 1, // 当前页
         size: 10,
-        SamplesList: [], //选择样本列表
+        SamplesList: [], // 选择样本列表
         equipmentList: [],
         selectSamples: [],
         SampleRKform: {
           EntryNo: '',
           OperationBy: '',
-          ConUserId: '', //负责人ID
-          ConUserBy: '', //负责人
+          ConUserId: '', // 负责人ID
+          ConUserBy: '', // 负责人
           EntryTime: new Date(),
           ConTime: new Date(),
           ApplyStatus: 0,
@@ -299,7 +368,7 @@
         applyForm: {},
         sampletypelist: [],
         equipmentForm: {
-          EquipmentId: '',
+          EquipmentId: ''
         },
         storarules: {
           EquipmentId: [{
@@ -307,45 +376,79 @@
             trigger: 'blur'
           }]
         },
-        batchstorages: [], //批量存储的样本
+        batchstorages: [], // 批量存储的样本
         auditorShow: false,
         ParentId: 0,
-        authorSamples: [], //要审核的样本列表
+        authorSamples: [], // 要审核的样本列表
         shenheForm: {
           SuccessStatus: 0,
           AuditorRemark: ''
         },
         loginDialogVisible: false,
+        searchdialogVisible: false,
         username: '',
         password: '',
         isLoginSucceed: false,
         acceptUsers: [],
-        Getter: '', //接收人
-        GetterName: '', //接收人
+        Getter: '', // 接收人
+        GetterName: '', // 接收人
         samplesdetail: [],
-        selectcollection_flag: 0, //采集单选择按钮标志位,0:不可用;1:可用
+        selectcollection_flag: 0, // 采集单选择按钮标志位,0:不可用;1:可用
         CreateOn: [],
-        samplecodelist: [], //样本编码
+        samplecodelist: [], // 样本编码
         sampletypes: [], // 样本类型
         ServiceId: 0,
         permissionscode: {
           rkadd: 'biobank.sampleRK.add',
           rkedit: 'biobank.sampleRK.edit',
-          rkapprove: 'biobank.sampleRK.approve',
+          rkapprove: 'biobank.sampleRK.approve'
         },
         permissions: {
           'biobank.sampleRK.add': false,
           'biobank.sampleRK.edit': false,
-          'biobank.sampleRK.approve': false,
+          'biobank.sampleRK.approve': false
+        },
+        searchValue: {
+          BarCode: '',
+          SampleCode: '',
+          SourceName: '',
+          InnerCode: '',
+          Name: '',
+          CreateBy: '',
+          CreateOn: [],
+          selectedzuzhi: [],
+          SamplingSite: '',
+          SampleType: '',
+          Validity: [],
+          Capacity: '',
+          Location: '',
+          Extension: '',
+          GroupName: '',
+          GroupName: ''
         },
+        BarCode: '', // 样本条码
+        SampleCode: '', // 样本编码
+        SampleType: '', // 样本类型
+        Stnotevalue: '', // 特有扩展检索值
+        STNoteField: [], // 特有扩展名称
+        CreateBy: '', // 录入人
+        CreateOn: [], // 录入时期
+        GroupName: '', // 所属分组
+        Name: '', // 名称
+        SourceName: '', // 样本来源
+        Validity: [], // 有效日期
+        InnerCode: '', // 样本内码
+        acc: '',
+        typetykzlist: [] // 特有扩展
       }
     },
-    created() {
+    created () {
       let _this = this
+      this.acc = this.authUser.Profile.AccCode
       if (_this.$route.query.samplecodelist) {
         _this.samplecodelist = this.$route.query.samplecodelist
       }
-      _this.ServiceId = _this.$route.params.opera //主单id
+      _this.ServiceId = _this.$route.params.opera // 主单id
       // _this.filehost = process.env.imgserverhost
       if (_this.ServiceId && _this.ServiceId == 'addRK') {
         _this.pagetitle = '新增样本入库'
@@ -360,10 +463,11 @@
       }
       _this.getEntryNo()
       _this.getuserlist()
-      _this.getsamplelist() //获取样本列表
+      _this.getsamplelist() // 获取样本列表
       _this.getuserlist()
       _this.getEquiplist()
       _this.getPermissions()
+      _this.getextends()
     },
     computed: {
       ...mapGetters({
@@ -371,14 +475,14 @@
       })
     },
     methods: {
-      getApplyInfo() {
+      getApplyInfo () {
         let _this = this // request
         let params = {
           Id: this.ServiceId
         }
         _this.$axios.get('/samplesapply/getapplyinfo', {
-            params
-          })
+          params
+        })
           .then(res => {
             _this.SampleRKform = res.data.items
             if (_this.SampleRKform.ApplyStatus == 0) {
@@ -402,27 +506,27 @@
             console.error(err)
           })
       },
-      //获取样本信息
-      getdetaillist() {
+      // 获取样本信息
+      getdetaillist () {
         let _this = this // request
         let params = {
           ParentId: this.ServiceId,
           _currentPage: this.CurrentPage,
-          _size: this.Size,
+          _size: this.Size
         }
-        _this.$axios.get("/samplesapply/applydetaillist", {
-            params
-          })
+        _this.$axios.get('/samplesapply/applydetaillist', {
+          params
+        })
           .then(res => {
             _this.ApplyList = res.data.items
             _this.CurrentItemCount = res.data.currentItemCount
           })
           .catch(function (error) {
-            console.log(error);
-          });
+            console.log(error)
+          })
       },
-      //自动生成单品交付单编号
-      getEntryNo() {
+      // 自动生成单品交付单编号
+      getEntryNo () {
         let _this = this
         if (_this.SampleRKform.EntryNo == '') {
           _this.$axios.get('orderadd/getOrderNumgene')
@@ -431,39 +535,39 @@
             })
         }
       },
-      //获取样本信息
-      getsamplelist() {
+      // 获取样本信息
+      getsamplelist () {
         let _this = this // request
         let params = {
           _currentPage: this.currentPage,
-          _size: this.size,
+          _size: this.size
         }
-        if (_this.samplecodelist == "") {
-          _this.$axios.get("/samplepreinput/list", {
-              params
-            })
+        if (_this.samplecodelist == '') {
+          _this.$axios.get('/samplepreinput/list', {
+            params
+          })
             .then(res => {
               _this.SamplesList = res.data.items
               _this.currentItemCount = res.data.currentItemCount
             })
             .catch(function (error) {
-              console.log(error);
-            });
+              console.log(error)
+            })
         } else {
           _this.$axios.get('samplesubpackage/subpackagelist/' + _this.samplecodelist, {
-              params
-            })
+            params
+          })
             .then(res => {
               _this.SamplesList = res.data.items
               _this.currentItemCount = res.data.currentItemCount
             })
             .catch(function (error) {
-              console.log(error);
-            });
+              console.log(error)
+            })
         }
       },
       // 获取容器列表
-      getEquiplist() {
+      getEquiplist () {
         let _this = this
         _this.$axios.get('/equipment/elist', {})
           .then(res => {
@@ -480,7 +584,7 @@
           })
       },
       // 打开容器弹窗 选择存储位置
-      EquipmentlistShow() {
+      EquipmentlistShow () {
         let _this = this
         if (_this.selectSamples.length < 1) {
           _this.$message({
@@ -492,13 +596,13 @@
         if (_this.service_flag == 'editRK') {
           _this.SampleRKform.ConUserBy = _this.$refs.reflrrselect.selectedLabel
         }
-        //拼接样本与主申请单信息
+        // 拼接样本与主申请单信息
         for (var i = 0; i < _this.selectSamples.length; i++) {
           _this.selectSamples[i] = Object.assign(_this.selectSamples[i], _this.SampleRKform)
         }
         _this.Equipmentdialog = true
       },
-      chooseEquip() {
+      chooseEquip () {
         this.$refs['equipmentForm'].validate((valid) => {
           if (valid) {
             store.set('batchstorages', this.selectSamples)
@@ -528,13 +632,13 @@
       //   }
       //   _this.auditorShow = true
       // },
-      auditor() {
+      auditor () {
         let _this = this
-        _this.$confirm("确定审核该入库申请单?审核后所有信息将不可修改!", "提示", {
-            confirmButtonText: "确定",
-            cancelButtonText: "取消",
-            type: "warning"
-          })
+        _this.$confirm('确定审核该入库申请单?审核后所有信息将不可修改!', '提示', {
+          confirmButtonText: '确定',
+          cancelButtonText: '取消',
+          type: 'warning'
+        })
           .then(() => {
             if (_this.shenheForm.SuccessStatus == 1) {
               _this.SampleRKform.ApplyStatus = 3
@@ -548,7 +652,7 @@
           })
           .catch(() => {})
       },
-      saveauditor() {
+      saveauditor () {
         let _this = this
         let params = _this.SampleRKform
         _this.$axios.put('/samplesapply/auditorrk/' + _this.ServiceId, params)
@@ -604,7 +708,7 @@
       // authorSelectionChange(val) {
       //   this.authorSamples = val
       // },
-      getuserlist() {
+      getuserlist () {
         this.$axios.get('users/list', {})
           .then(res => {
             // response
@@ -623,33 +727,33 @@
             console.error(err)
           })
       },
-      numtoupchar(num) {
-        return String.fromCharCode(64 + parseInt(num));
+      numtoupchar (num) {
+        return String.fromCharCode(64 + parseInt(num))
       },
-      postiontoupchar(postion) {
-        let pos = postion.split(";");
+      postiontoupchar (postion) {
+        let pos = postion.split(';')
         if (pos.length === 2) {
-          return this.numtoupchar(pos[1]) + pos[0];
+          return this.numtoupchar(pos[1]) + pos[0]
         } else {
-          return postion;
+          return postion
         }
       },
-      //获取权限
-      getPermissions() {
+      // 获取权限
+      getPermissions () {
         let _this = this
         // request
         let params = {
           percodes: `'${this.permissionscode.rkadd}','${this.permissionscode.rkedit}','${this.permissionscode.rkapprove}'`
         }
         this.$axios.get('/permissions/isauths', {
-            params
-          })
+          params
+        })
           .then(res => {
             if (res.data instanceof Array && res.data.length > 0) {
               console.log(res.data)
               res.data.forEach(element => {
                 _this.permissions[element.Code] = element.Isperm
-              });
+              })
             }
           })
           .catch(err => {
@@ -657,18 +761,18 @@
             console.error(err)
           })
       },
-      handleSelectionChange(val) {
+      handleSelectionChange (val) {
         this.selectSamples = val
       },
-      contains(strs, str) {
+      contains (strs, str) {
         let arrs = strs.split(',')
         for (let v in arrs) {
           if (arrs[v] === (str + '')) return true
         }
         return false
       },
-      //登陆
-      selectGetter() {
+      // 登陆
+      selectGetter () {
         if (this.Getter != this.authUser.Profile.Id) {
           this.loginDialogVisible = true
         }
@@ -678,7 +782,7 @@
           }
         }
       },
-      cancelLogin() {
+      cancelLogin () {
         if (this.isLoginSucceed) {
           this.isLoginSucceed = false
         } else {
@@ -686,13 +790,13 @@
         }
         this.loginDialogVisible = false
       },
-      confirmLogin() {
+      confirmLogin () {
         let _this = this
         let fields = {
           username: this.username,
-          password: this.password,
+          password: this.password
         }
-        this.$axios.post("/users/checkUserPwd?RealName=" + this.GetterName, fields)
+        this.$axios.post('/users/checkUserPwd?RealName=' + this.GetterName, fields)
           .then(res => {
             if (res.data.code == 0) {
               _this.loginDialogVisible = false
@@ -710,27 +814,87 @@
             console.error(err)
           })
       },
-      HandleCurrentChange(value) {
+      HandleCurrentChange (value) {
         this.CurrentPage = value
         this.getdetaillist()
       },
-      HandleSizeChange(value) {
+      HandleSizeChange (value) {
         this.Size = value
         this.CurrentPage = 1
         this.getdetaillist()
       },
-      handleCurrentChange(value) {
+      handleCurrentChange (value) {
         this.currentPage = value
         this.getsamplelist()
       },
-      handleSizeChange(value) {
+      handleSizeChange (value) {
         this.size = value
         this.currentPage = 1
         this.getsamplelist()
       },
+      seachdata () {
+        this.currentPage = 1
+      },
+      handleSearchCommand (command) {
+        if (command == 'search') {
+          this.searchdialogVisible = true
+        } else if (command == 'clear') {
+          this.clearSearch()
+        }
+      },
+      // 清空查询数据
+      clearSearch () {
+        this.BarCode = ''
+        this.SampleCode = ''
+        this.SourceName = ''
+        this.InnerCode = ''
+        this.Name = ''
+        this.CreateBy = ''
+        this.CreateOn = []
+        this.SampleType = ''
+        this.STNoteField = ''
+        this.Stnotevalue = ''
+        this.Validity = []
+        this.GroupName = ''
+        this.currentPage = 1
+        // this.initData()
+      },
+      selsampletypeChange () {
+        // 获取特有扩展
+        let _this = this
+        if (_this.SampleType != '') {
+          _this.$axios.get('/sampletype/gettykzzd?SampleType=' + _this.SampleType, {})
+            .then(res => {
+              console.log(222, res)
+              // response
+              _this.STNoteField = []
+              _this.typetykzlist = res.data
+              console.log(222333)
+            })
+        }
+      },
+      // 返回查询条件执行
+      searchsampletypeChange () {
+        // 获取特有扩展
+        let _this = this
+        if (_this.SampleType !== '') {
+          _this.$axios.get('/sampletype/gettykzzd?SampleType=' + _this.SampleType, {})
+            .then(res => {
+              _this.typetykzlist = res.data
+            })
+        }
+      },
+      getextends () {
+        let _this = this
+        this.$axios.get('/sampleinput/getsampletype', {
+          _currentPage: -1
+        })
+          .then(res => {
+            _this.sampletypes = res.data.items
+          }).catch(() => {})
+      }
     }
   }
-
 </script>
 
 <style lang="scss">

+ 142 - 144
src/dashoo.cn/frontend_animal/src/pages/samples/prerecorded/index.vue

@@ -90,7 +90,7 @@
         </el-table-column>
       </el-table>
       <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="currentPage"
-        :page-sizes="[10, 20, 50, 100]" :page-size="size" layout="total, sizes, prev, pager, next, jumper" :total="currentItemCount">
+        :page-sizes="[10, 50, 100, 200, 500]" :page-size="size" layout="total, sizes, prev, pager, next, jumper" :total="currentItemCount">
       </el-pagination>
     </el-card>
 
@@ -290,7 +290,7 @@
     components: {
       draggable
     },
-    data() {
+    data () {
       return {
         dialogVisible: false,
         currentItemCount: 0, // 当前页显示数量
@@ -304,7 +304,7 @@
         STNoteField: [], // 特有扩展名称
         CreateBy: '', // 录入人
         CreateOn: [], // 录入时期
-        GroupName: '', //所属分组
+        GroupName: '', // 所属分组
         Name: '', // 名称
         SourceName: '', // 样本来源
         Validity: [], // 有效日期
@@ -317,17 +317,17 @@
         peintitemid: 0,
         selectedzuzhi: [],
         typetykzlist: [], // 特有扩展
-        multipleSelection: [], //多选框
+        multipleSelection: [], // 多选框
         showcolumn: [], // 显示列
         cachecols: [],
         columndialogVisible: false, // 自定义显示列弹框
         isIndeterminate: false,
         checkAll: true,
         searchDialogVisible: false, // 自定义搜索弹框
-        searchTemplateName: "自定义搜索1",
+        searchTemplateName: '自定义搜索1',
         searchTemplates: [],
-        currentSearchTemplateName: "",
-        searchField: "BarCode",
+        currentSearchTemplateName: '',
+        searchField: 'BarCode',
         searchValue: {
           BarCode: '',
           SampleCode: '',
@@ -344,7 +344,7 @@
           Location: '',
           Extension: '',
           GroupName: '',
-          GroupName: '',
+          GroupName: ''
         },
         sampinputtreeprops2: {
           value: 'name',
@@ -353,65 +353,65 @@
         },
         selectedzuzhi2: [],
         samplesitenames2: [], // 取材部位
-        orAnd: "and",
+        orAnd: 'and',
         orAndData: [{
-            name: "并且",
-            value: "and",
-          },
-          {
-            name: "或者",
-            value: "or",
-          }
+          name: '并且',
+          value: 'and'
+        },
+        {
+          name: '或者',
+          value: 'or'
+        }
         ],
         searchTableData: [],
         searchcolumn: [], // 搜索列
         currentSearchTemplate: '',
-        acc: '',
+        acc: ''
       }
     },
-    created() {
+    created () {
       this.acc = this.authUser.Profile.AccCode
       if (this.$route.query.size && this.$route.query.currentPage) {
         this.size = parseInt(this.$route.query.size)
         this.currentPage = parseInt(this.$route.query.currentPage)
 
         let searchmodel = store.get('sampleprerecordedseach')
-        if (typeof (searchmodel) != 'undefined') {
-          if (searchmodel.BarCode && searchmodel.BarCode !== '') { //样本条码
+        if (typeof (searchmodel) !== 'undefined') {
+          if (searchmodel.BarCode && searchmodel.BarCode !== '') { // 样本条码
             this.BarCode = searchmodel.BarCode
           }
-          if (searchmodel.SampleCode && searchmodel.SampleCode !== '') { //样本编码
+          if (searchmodel.SampleCode && searchmodel.SampleCode !== '') { // 样本编码
             this.SampleCode = searchmodel.SampleCode
           }
-          if (searchmodel.SourceName && searchmodel.SourceName !== '') { //样本来源
+          if (searchmodel.SourceName && searchmodel.SourceName !== '') { // 样本来源
             this.SourceName = searchmodel.SourceName
           }
-          if (searchmodel.InnerCode && searchmodel.InnerCode !== '') { //样本内码
+          if (searchmodel.InnerCode && searchmodel.InnerCode !== '') { // 样本内码
             this.InnerCode = searchmodel.InnerCode
           }
-          if (searchmodel.Name && searchmodel.Name !== '') { //名称
+          if (searchmodel.Name && searchmodel.Name !== '') { // 名称
             this.Name = searchmodel.Name
           }
-          if (searchmodel.CreateBy && searchmodel.CreateBy !== '') { //录入人
+          if (searchmodel.CreateBy && searchmodel.CreateBy !== '') { // 录入人
             this.CreateBy = searchmodel.CreateBy
           }
-          if (searchmodel.CreateOn && searchmodel.CreateOn.length === 2) { //录入日期
+          if (searchmodel.CreateOn && searchmodel.CreateOn.length === 2) { // 录入日期
             this.CreateOn = [new Date(searchmodel.CreateOn[0]), new Date(searchmodel.CreateOn[1])]
           }
-          if (searchmodel.SampleType && searchmodel.SampleType !== '') { //样本类型
+          if (searchmodel.SampleType && searchmodel.SampleType !== '') { // 样本类型
             this.SampleType = searchmodel.SampleType
             this.searchsampletypeChange()
           }
-          if (searchmodel.STNoteField && searchmodel.STNoteField.length > 0) { //特有扩展
+          if (searchmodel.STNoteField && searchmodel.STNoteField.length > 0) { // 特有扩展
             this.STNoteField = searchmodel.STNoteField
           }
-          if (searchmodel.Stnotevalue && searchmodel.Stnotevalue !== '') { //特有检索内容
+          if (searchmodel.Stnotevalue && searchmodel.Stnotevalue !== '') { // 特有检索内容
             this.Stnotevalue = searchmodel.Stnotevalue
           }
-          if (searchmodel.Validity && searchmodel.Validity.length === 2) { //有效日期
+          if (searchmodel.Validity && searchmodel.Validity.length === 2) { // 有效日期
             this.Validity = [new Date(searchmodel.Validity[0]), new Date(searchmodel.Validity[1])]
           }
-          if (searchmodel.GroupName && searchmodel.GroupName !== '') { //所属分组
+          if (searchmodel.GroupName && searchmodel.GroupName !== '') { // 所属分组
             this.GroupName = searchmodel.GroupName
           }
         }
@@ -420,7 +420,7 @@
       }
 
       this.cachecols = store.get('sampleprerecordedshowcolumn')
-      //当前显示列无数据,使用已录入样本显示列数据
+      // 当前显示列无数据,使用已录入样本显示列数据
       if (!(this.cachecols && this.cachecols !== '')) {
         this.cachecols = store.get('sapminputshowcolumn')
       }
@@ -472,7 +472,7 @@
           name: '可用容量',
           show: true,
           kuoz: false
-        },{
+        }, {
           filed: 'InnerCode',
           name: '样本内码',
           show: true,
@@ -504,31 +504,31 @@
       this.checkedshowall()
       this.getAllSearchTab()
     },
-    mounted() {
+    mounted () {
       let _this = this
       window.clickmodeltypetag = function (val, e) {
         _this.clickmodeltypetag(val)
       }
     },
     methods: {
-      getextends() {
+      getextends () {
         let _this = this
         this.$axios.get('/sampleinput/getsampletype', {
-            _currentPage: -1
-          })
+          _currentPage: -1
+        })
           .then(res => {
             _this.sampletypes = res.data.items
             if (store.get('sampleprerecordedseach').searchWithTemplate && store.get(
-                'sampleprerecordedseach')
+              'sampleprerecordedseach')
               .searchWithTemplate !==
-              '') { //自定义查询
+              '') { // 自定义查询
               this.handleSearchCommand(store.get('sampleprerecordedseach').searchWithTemplate)
             } else {
               this.initData()
             }
           }).catch(() => {})
       },
-      initData() {
+      initData () {
         this.currentSearchTemplate = ''
         let _this = this
         let params = {
@@ -554,11 +554,11 @@
           }
           params = Object.assign(params, params2)
         }
-        //返回时保存查找内容
+        // 返回时保存查找内容
         store.set('sampleprerecordedseach', params)
         this.$axios.get('/samplepreinput/animallist', {
-            params
-          })
+          params
+        })
           .then(res => {
             _this.list = res.data.items
             _this.currentItemCount = res.data.currentItemCount
@@ -567,7 +567,7 @@
             console.error(err)
           })
       },
-      //根据子code获取所有父code
+      // 根据子code获取所有父code
       // getparentcodebytopcode(v) {
       //   let _this = this
       //   _this.$axios.get('/sampleorgan/getparentcodebytopcode/' + v, {})
@@ -583,19 +583,19 @@
       //     })
       // },
 
-      loadprintdata() {
+      loadprintdata () {
         this.$axios.get('/sampleinput/getprintschemelist', {
-            _currentPage: -1
-          })
+          _currentPage: -1
+        })
           .then(res => {
             this.printschemelist = res.data.items
           }).catch(() => {})
       },
-      seachdata() {
+      seachdata () {
         this.currentPage = 1
         this.initData()
       },
-      selsampletypeChange() {
+      selsampletypeChange () {
         // 获取特有扩展
         let _this = this
         if (_this.SampleType != '') {
@@ -607,8 +607,8 @@
             })
         }
       },
-      //返回查询条件执行
-      searchsampletypeChange() {
+      // 返回查询条件执行
+      searchsampletypeChange () {
         // 获取特有扩展
         let _this = this
         if (_this.SampleType !== '') {
@@ -618,10 +618,10 @@
             })
         }
       },
-      //导出样本
-      handleExportsamplesCommand(command) {
+      // 导出样本
+      handleExportsamplesCommand (command) {
         let _this = this
-        if (command == 'exportchosen') { //导出所选数据
+        if (command == 'exportchosen') { // 导出所选数据
           if (_this.multipleSelection.length < 1) {
             _this.$message({
               type: 'warning',
@@ -630,7 +630,7 @@
             return
           }
           _this.exportsamples('exportchosen')
-        } else if (command == 'exportpage') { //导出当前页数据
+        } else if (command == 'exportpage') { // 导出当前页数据
           if (_this.list.length < 1) {
             _this.$message({
               type: 'warning',
@@ -639,7 +639,7 @@
             return
           }
           _this.exportsamples('exportpage')
-        } else if (command == 'exportall') { //导出所有数据
+        } else if (command == 'exportall') { // 导出所有数据
           _this.$confirm('此操作将导出所有满足条件的数据!是否继续导出?', '提示', {
             confirmButtonText: '确定',
             cancelButtonText: '取消',
@@ -649,7 +649,7 @@
           }).catch(() => {})
         }
       },
-      exportsamples(val) {
+      exportsamples (val) {
         let _this = this
         // 显示列
         let showcolumnarr = []
@@ -693,13 +693,13 @@
           }
           params = Object.assign(params, params3)
         }
-        //导出所选样本
+        // 导出所选样本
         if (val == 'exportchosen') {
           for (var i = 0; i < _this.multipleSelection.length; i++) {
             if (i == _this.multipleSelection.length - 1) {
               id += _this.multipleSelection[i].Id
             } else {
-              id += _this.multipleSelection[i].Id + ","
+              id += _this.multipleSelection[i].Id + ','
             }
           }
           let paramsid = {
@@ -707,13 +707,13 @@
           }
           params = Object.assign(params, paramsid)
         }
-        //导出当前页样本
+        // 导出当前页样本
         if (val == 'exportpage') {
           for (var i = 0; i < _this.list.length; i++) {
             if (i == _this.list.length - 1) {
               id += _this.list[i].Id
             } else {
-              id += _this.list[i].Id + ","
+              id += _this.list[i].Id + ','
             }
           }
           let paramsid = {
@@ -723,8 +723,8 @@
         }
         console.log(params, 'params++')
         _this.$axios.get('/sampleinput/exportexcel', {
-            params
-          })
+          params
+        })
           .then(res => {
             window.location = 'http://' + res.data
           })
@@ -733,8 +733,8 @@
             console.error(err)
           })
       },
-      //样本条码批量打印
-      batchprint() {
+      // 样本条码批量打印
+      batchprint () {
         let _this = this
         if (_this.multipleSelection.length < 1) {
           _this.$message({
@@ -765,9 +765,9 @@
             console.error(err)
           })
       },
-      //---------------------------------------------------
-      //自定义显示列
-      checkedshowall() {
+      // ---------------------------------------------------
+      // 自定义显示列
+      checkedshowall () {
         let tc = 0
         for (var i = 0; i < this.showcolumn.length; i++) {
           if (this.showcolumn[i].show) {
@@ -786,13 +786,13 @@
           }
         }
       },
-      handleCheckAllChange(val) {
+      handleCheckAllChange (val) {
         for (var i = 0; i < this.showcolumn.length; i++) {
           this.showcolumn[i].show = val
         }
       },
       // 自定义显示列保存操作
-      saveshowfiled() {
+      saveshowfiled () {
         store.set('sampleprerecordedshowcolumn', this.showcolumn)
         this.columndialogVisible = false
         this.$message({
@@ -801,7 +801,7 @@
         })
         this.initData()
       },
-      header_dragend(newWidth, oldWidth, column, event) {
+      header_dragend (newWidth, oldWidth, column, event) {
         for (var i = 0; i < this.showcolumn.length; i++) {
           if (this.showcolumn[i].name === column.label) {
             this.showcolumn[i].columnwidth = newWidth
@@ -810,17 +810,17 @@
           }
         }
       },
-      //----------------------------------------------------------------
-      //自定义查询
-      handleSearchCommand(command) {
+      // ----------------------------------------------------------------
+      // 自定义查询
+      handleSearchCommand (command) {
         if (command == 'search') {
           this.dialogVisible = true
         } else if (command == 'clear') {
           this.clearSearch()
-        } else if (command == "编辑") {
+        } else if (command == '编辑') {
           this.searchDialogVisible = true
           this.searchcolumn = this.showcolumn.filter(function (e) {
-            return e.filed != "Location"
+            return e.filed != 'Location'
           })
         } else {
           this.currentSearchTemplate = command
@@ -831,19 +831,19 @@
           this.searchWithTemplate(command)
         }
       },
-      //添加自定义搜索
-      addSearchTab(name) {
+      // 添加自定义搜索
+      addSearchTab (name) {
         for (let i = 0; i < this.searchTemplates.length; i++) {
           if (this.searchTemplates[i].Name == name) {
-            this.$message("名称已经存在")
+            this.$message('名称已经存在')
             return
           }
         }
         this.searchTemplates.push({
-            Name: name,
-            Fields: [],
-          }),
-          this.currentSearchTemplateName = name
+          Name: name,
+          Fields: []
+        }),
+        this.currentSearchTemplateName = name
 
         for (let i = 0; i < this.searchTemplates.length; i++) {
           if (this.searchTemplates[i].Name == this.currentSearchTemplateName) {
@@ -851,32 +851,31 @@
           }
         }
       },
-      removeSearchTab(targetName) {
+      removeSearchTab (targetName) {
         let _this = this
         this.$axios.delete('/sampleinput/searchTemplate?name=' + targetName, {})
           .then(res => {
             if (res.data.code == 0) {
-              let tabs = _this.searchTemplates;
-              let activeName = _this.currentSearchTemplateName;
+              let tabs = _this.searchTemplates
+              let activeName = _this.currentSearchTemplateName
               if (activeName === targetName) {
                 tabs.forEach((tab, index) => {
                   if (tab.Name === targetName) {
-                    let nextTab = tabs[index + 1] || tabs[index - 1];
+                    let nextTab = tabs[index + 1] || tabs[index - 1]
                     if (nextTab) {
                       activeName = nextTab.Name
                       _this.searchTableData = this.getSearchTableData(nextTab.Fields)
                     }
                   }
-                });
+                })
               }
 
               _this.currentSearchTemplateName = activeName
               _this.searchTemplates = tabs.filter(tab => tab.Name !== targetName)
-
             } else {
               _this.$message({
                 type: 'warning',
-                message: res.data.message,
+                message: res.data.message
               })
             }
           })
@@ -884,11 +883,11 @@
             console.error(err)
           })
       },
-      //添加自定义搜索详情
-      addSearchField() {
+      // 添加自定义搜索详情
+      addSearchField () {
         let searchValue
         for (let k in this.searchValue) {
-          if (typeof this.searchValue[k] == 'number') {
+          if (typeof this.searchValue[k] === 'number') {
             searchValue = this.searchValue[k]
             break
           } else if (this.searchValue[k] && this.searchValue[k].length > 0) {
@@ -898,18 +897,18 @@
         }
 
         if (!searchValue) {
-          this.$message("请输入检索数值或范围")
+          this.$message('请输入检索数值或范围')
           return
         }
 
-        let s = ""
+        let s = ''
         if (searchValue instanceof Array && searchValue.length > 0) {
           if (searchValue[0] instanceof Date) {
             let arr = []
             for (let j = 0; j < searchValue.length; j++) {
               arr.push(this.formatDateTime(searchValue[j]))
             }
-            s = arr.join("--")
+            s = arr.join('--')
           } else {
             s = searchValue[searchValue.length - 1]
           }
@@ -922,7 +921,7 @@
             for (let index in this.searchTemplates[i].Fields) {
               let field = this.searchTemplates[i].Fields[index]
               if (field.Field == this.searchField && field.Value == this.searchValue && field.OrAnd == this.orAnd) {
-                this.$message("此查询条件已经存在")
+                this.$message('此查询条件已经存在')
                 return
               }
             }
@@ -931,23 +930,23 @@
               Field: this.searchField,
               Value: s + '',
               OrAnd: this.orAnd,
-              Name: this.getFieldName(this.searchField),
+              Name: this.getFieldName(this.searchField)
             })
             this.searchTableData = this.getSearchTableData(this.searchTemplates[i].Fields)
             break
           }
         }
       },
-      //查询自定义搜索详情
-      saveAndSearchWithTemplate() {
+      // 查询自定义搜索详情
+      saveAndSearchWithTemplate () {
         let _this = this
         this.saveSearchTemplate(function () {
           _this.currentSearchTemplate = _this.currentSearchTemplateName
           _this.searchWithTemplate(_this.currentSearchTemplateName)
         })
       },
-      //保存自定义搜索详情
-      saveSearchTemplate(cb) {
+      // 保存自定义搜索详情
+      saveSearchTemplate (cb) {
         let _this = this
         let template = JSON.stringify(this.searchTableData)
         this.$axios.put('/sampleinput/searchTemplate?name=' + this.currentSearchTemplateName, template)
@@ -955,7 +954,7 @@
             if (res.data.code == 0) {
               _this.$message({
                 type: 'success',
-                message: res.data.message,
+                message: res.data.message
               })
               if (cb) {
                 cb()
@@ -963,7 +962,7 @@
             } else {
               _this.$message({
                 type: 'warning',
-                message: res.data.message,
+                message: res.data.message
               })
             }
           })
@@ -972,7 +971,7 @@
             console.error(err)
           })
       },
-      deleteSearchField(v) {
+      deleteSearchField (v) {
         if (v.Name) {
           for (let i = 0; i < this.searchTemplates.length; i++) {
             if (this.searchTemplates[i].Name == this.currentSearchTemplateName) {
@@ -985,20 +984,20 @@
           }
         }
       },
-      searchWithTemplate(name) {
+      searchWithTemplate (name) {
         console.log(name)
         this.searchDialogVisible = false
 
         let params = {
           _currentPage: this.currentPage,
-          _size: this.size,
+          _size: this.size
 
         }
         let _this = this
         // request
         this.$axios.get('/samplepreinput/search?name=' + name, {
-            params
-          })
+          params
+        })
           .then(res => {
             console.log(res.data.items)
             // response
@@ -1013,27 +1012,27 @@
             console.error(err)
           })
       },
-      getSearchTableData(searchFields) {
+      getSearchTableData (searchFields) {
         let data = searchFields.map(function (ele) {
-          if (ele["OrAnd"] == "or") {
-            ele["Guanxi"] = "或者"
+          if (ele['OrAnd'] == 'or') {
+            ele['Guanxi'] = '或者'
           } else {
-            ele["Guanxi"] = "并且"
+            ele['Guanxi'] = '并且'
           }
           return ele
         })
 
         return data || []
       },
-      clickmodeltypetag(val) {
-        this.currentSearchTemplateName = val.getAttribute("id")
+      clickmodeltypetag (val) {
+        this.currentSearchTemplateName = val.getAttribute('id')
         for (let i = 0; i < this.searchTemplates.length; i++) {
           if (this.searchTemplates[i].Name == this.currentSearchTemplateName) {
             this.searchTableData = this.getSearchTableData(this.searchTemplates[i].Fields)
           }
         }
       },
-      getAllSearchTab() {
+      getAllSearchTab () {
         let _this = this
         this.$axios.get('/sampleinput/searchTemplate', {})
           .then(res => {
@@ -1056,7 +1055,7 @@
             console.error(err)
           })
       },
-      changeSearchField(val) {
+      changeSearchField (val) {
         this.searchValue = {
           BarCode: '',
           SampleCode: '',
@@ -1072,19 +1071,19 @@
           Capacity: '',
           Location: '',
           Extension: '',
-          GroupName: '',
+          GroupName: ''
         }
       },
-      getFieldName(field) {
+      getFieldName (field) {
         for (let i = 0; i < this.showcolumn.length; i++) {
           if (this.showcolumn[i].filed == field) {
             return this.showcolumn[i].name
           }
         }
-        return ""
+        return ''
       },
-      //----------------------------------------------------------------
-      handleSizeChange(value) {
+      // ----------------------------------------------------------------
+      handleSizeChange (value) {
         this.size = value
         this.currentPage = 1
         if (this.currentSearchTemplate) {
@@ -1093,7 +1092,7 @@
           this.initData()
         }
       },
-      jstimehandle(val) {
+      jstimehandle (val) {
         if (val === '') {
           return '----'
         } else if (val === '0001-01-01T08:00:00+08:00') {
@@ -1105,7 +1104,7 @@
           return val.substring(0, 19)
         }
       },
-      Jstimehandle(val) {
+      Jstimehandle (val) {
         if (val === '') {
           return '----'
         } else if (val === '0001-01-01T08:00:00+08:00') {
@@ -1117,7 +1116,7 @@
           return val.substring(0, 10)
         }
       },
-      handleCurrentChange(value) {
+      handleCurrentChange (value) {
         this.currentPage = value
         if (this.currentSearchTemplate) {
           this.searchWithTemplate(this.currentSearchTemplate)
@@ -1125,8 +1124,8 @@
           this.initData()
         }
       },
-      //清空查询数据
-      clearSearch() {
+      // 清空查询数据
+      clearSearch () {
         this.BarCode = ''
         this.SampleCode = ''
         this.SourceName = ''
@@ -1142,7 +1141,7 @@
         this.currentPage = 1
         this.initData()
       },
-      deletedata(val) {
+      deletedata (val) {
         let _this = this
         _this.$confirm('此操作将永久删除该数据, 是否继续?', '提示', {
           confirmButtonText: '确定',
@@ -1169,8 +1168,8 @@
             .catch(() => {})
         }).catch(() => {})
       },
-      //批量删除
-      batchdelete() {
+      // 批量删除
+      batchdelete () {
         let _this = this
         if (_this.multipleSelection.length < 1) {
           _this.$message({
@@ -1198,25 +1197,25 @@
                   succeedMsg = res.data.message
                 } else {
                   errorMsg = res.data.message
-                  failedIds.push(_this.multipleSelection[i].Id);
+                  failedIds.push(_this.multipleSelection[i].Id)
                 }
                 count++
-                //最后一个请求结束
+                // 最后一个请求结束
                 if (count == _this.multipleSelection.length) {
-                  //更新界面
+                  // 更新界面
                   this.initData()
-                  //全部删除成功
+                  // 全部删除成功
                   if (failedIds.length == 0) {
                     _this.$message({
                       type: 'success',
-                      message: succeedMsg,
+                      message: succeedMsg
                     })
                   } else {
-                    //存在删除失败
-                    errorMsg = errorMsg + ",失败ID:" + failedIds.join(",")
+                    // 存在删除失败
+                    errorMsg = errorMsg + ',失败ID:' + failedIds.join(',')
                     _this.$message({
                       type: 'warning',
-                      message: errorMsg,
+                      message: errorMsg
                     })
                   }
                 }
@@ -1227,20 +1226,20 @@
           console.error(err)
         })
       },
-      deleteRow(index, rows) {
+      deleteRow (index, rows) {
         rows.splice(index, 1)
       },
-      handleSelectionChange(val) {
+      handleSelectionChange (val) {
         this.multipleSelection = val
       },
-      handleChange(value) {
+      handleChange (value) {
         console.log(value)
       },
-      openPrintDialog(val) {
+      openPrintDialog (val) {
         this.peintitemid = val.Id
         this.dialogPrintVisible = true
       },
-      doprintscheme() {
+      doprintscheme () {
         this.dialogPrintVisible = false
         // 执行打印操作
         window.PrintReport(this.Printscheme,
@@ -1248,7 +1247,6 @@
       }
     }
   }
-
 </script>
 
 <style lang="scss">