2 Commit-ok e5c4a10563 ... 73d0b40335

Szerző SHA1 Üzenet Dátum
  hanmj 73d0b40335 1.蜜蜂所出入库查询2.CE8120结构图添加 6 éve
  hanmj 56df5b6b6f 1.蜜蜂所入库申请增加查询 6 éve

+ 5 - 7
src/dashoo.cn/backend/api/business/samplesinfo/samplesinfoService.go

@@ -102,18 +102,16 @@ func (s *SamplesInfoService) GetPagingEntitiesWithTb(acccode string, pageIndex,
 	fmt.Println(sqlCount)
 	var sql string
 
-	sql = ` select z.*, g.GroupId,g.GroupName from(select a.*,
-	b.MId,b.AccCode,b.Name,b.Department,b.SampleType ,b.SampleTypeName,b.SamplingOrgan,b.SamplingOrganName,b.SamplingSite ,b.SamplingSiteName,b.ReceiveDate ,b.SourceId ,b.SourceIdCard ,b.SourceName,b.SerialNum,b.MCreateOn,b.MCreateUserId ,b.MCreateBy ,b.MModifiedOn ,b.MModifiedUserId ,b.MModifiedBy ,b.ZBack11,b.ZBack12,b.ZBack13,b.ZBack14,b.ZBack15,b.ZBack16,b.ZBack17,b.ZBack18,b.ZBack19,b.ZBack20,b.ZBack21,b.ZBack22,b.ZBack23,b.ZBack24,b.ZBack25,b.ZBack26,b.ZBack27,b.ZBack28,b.ZBack29,b.ZBack30,b.ZBack31,b.ZBack32,b.ZBack33,b.ZBack34,b.ZBack35,b.ZBack36,b.ZBack37,b.ZBack38,b.ZBack39,b.ZBack40,b.ZBack41,b.ZBack42,b.ZBack43,b.ZBack44,b.ZBack45,b.ZBack46,b.ZBack47,b.ZBack48,b.ZBack49,b.ZBack50,b.ZBack51,b.ZBack52,b.ZBack53,b.ZBack54,b.ZBack55,b.ZBack56,b.ZBack57,b.ZBack58,b.ZBack59,b.ZBack60,` +
-	` c.Genus,concat(c.ProvinceName,c.CityName,c.StreetName,c.Address) as AddressName,c.SurveyDate, ` +
-	` d.XStation ShelfX,d.YStation ShelfY,d.Code ShelfCode,` +
-	` e.XStation BoxX,e.YStation BoxY,e.Code BoxCode,` +
-	` f.Id Eid,f.Name EName,f.Code ECode from ` + tbldetail + ` a 
+	//sql = ` select a.*,b.*,c.Genus,concat(c.ProvinceName,c.CityName,c.StreetName,c.Address) as AddressName,c.SurveyDate,d.XStation ShelfX,d.YStation ShelfY,d.Code ShelfCode,e.XStation BoxX,e.YStation BoxY,e.Code BoxCode,f.Id Eid,f.Name EName,f.Code ECode,g.GroupId,g.GroupName from ` + tbldetail + ` a
+	sql = ` select a.*,b.*,c.Genus,concat(c.ProvinceName,c.CityName,c.StreetName,c.Address) as AddressName,c.SurveyDate,d.XStation ShelfX,d.YStation ShelfY,d.Code ShelfCode,e.XStation BoxX,e.YStation BoxY,e.Code BoxCode,f.Id Eid,f.Name EName,f.Code ECode from ` + tbldetail + ` a
 	left join ` + tblmain + ` b on a.SampleCode = b.SampleCode  
 	left join ` + tbldonor + ` c on b.SourceId = c.Id 
 	left join Shelf d on a.ShelfId=d.Id 
 	left join Box e on a.BoxId=e.Id 
 	left join Equipment f on a.EquipmentId=f.Id 
-	where ` + where + order+ ` limit ` + utils.ToStr((pageIndex-1)*itemsPerPage) + "," + utils.ToStr(itemsPerPage)+ ` ) z  ` + ` left join `+ groupdetail + ` g on g.SampleId=z.Id `
+	
+	where ` + where + order + `
+		 limit ` + utils.ToStr((pageIndex-1)*itemsPerPage) + "," + utils.ToStr(itemsPerPage) + ""
 	fmt.Println(sql)
 	List := make([]SamplesInfoList, 0)
 	utils.DBE.Sql(sql).Find(&List)

+ 101 - 0
src/dashoo.cn/backend/api/controllers/equipment/equipment.go

@@ -1104,6 +1104,107 @@ func (this *EquipmentController) AddEquipment() {
 		lastnum_shelf.LastNum = "F" + utils.ToStr(num_lastdata)
 		svcshelf.UpdateShelfNum(lastnum_shelf, this.User.AccCode)
 
+	}else if model.DItem == 25 { // Thermo Fisher  CE8120
+		shelf_x_int := 1
+		shelf_y_int := 1
+		box_x_int := 1
+		box_y_int := 1
+		svcshelf := shelfset.GetshelfsetService(utils.DBE)
+		lastdata := svcshelf.GetLastShelfNum(this.User.AccCode)
+		num_lastdata, _ := utils.StrTo(lastdata[1:]).Int64()
+		lastdata_box := svcshelf.GetLastBoxNum(this.User.AccCode)
+		num_lastdata_box, _ := utils.StrTo(lastdata_box[1:]).Int64()
+		for i := 1; i <= equip.RowNum; i++ {
+			for j := 1; j <= equip.ColumnNum; j++ {
+				if j == 4 { //第4个为小型格4行5x5冻存盒
+					shelf_x_int = 1
+					shelf_y_int = 14
+					box_x_int = 5
+					box_y_int = 5
+				} else { //其他为大型格14行9*9冻存盒
+					shelf_x_int = 1
+					shelf_y_int = 14
+					box_x_int = 9
+					box_y_int = 9
+				}
+				var shelfempty shelfset.Shelf
+				shelfempty.AccCode = this.User.AccCode
+				shelfempty.EquipmentId = equip.Id
+				shelfempty.Code = "F" + utils.ToStr(num_lastdata)
+				shelfempty.BarCode = "F" + utils.ToStr(num_lastdata)
+				shelfempty.RowNum = shelf_x_int
+				shelfempty.ColumnNum = shelf_y_int
+				shelfempty.XStation = j
+				shelfempty.YStation = i
+				shelfempty.SampleType = equip.SampleType
+				shelfempty.CreateBy = this.User.Realname
+				shelfempty.CreateUserId, _ = utils.StrTo(this.User.Id).Int()
+				num_lastdata = num_lastdata + 1
+				_, err = svcshelf.InsertEntity(&shelfempty)
+				sqlfield := " AccCode,EquipmentId,ShelfId,XStation,YStation,RowNum,ColumnNum,"
+				sqlvalue := "'" + this.User.AccCode + "'," + utils.ToStr(equip.Id) + "," + utils.ToStr(shelfempty.Id) + "," + utils.ToStr(j) + "," + utils.ToStr(i) + "," + utils.ToStr(shelf_x_int) + "," + utils.ToStr(shelf_y_int) + ","
+				ii, jj := shelf_x_int, shelf_y_int
+				//添加冻存盒
+				if box_x_int > 0 && box_y_int > 0 {
+					for e := 0; e < ii; e++ {
+						charname := Boxlinename(e + 1)
+						for f := 0; f < jj; f++ {
+							fieldname := fmt.Sprintf("%v%v", charname, f+1)
+							if f == jj-1 && e == ii-1 {
+								sqlfield += fieldname
+								sqlvalue += "-1"
+							} else {
+								sqlfield += fieldname + ","
+								sqlvalue += "-1,"
+							}
+						}
+					}
+					for a := 1; a <= shelf_x_int; a++ {
+						for b := 1; b <= shelf_y_int; b++ {
+							var boxempty shelfset.Box
+							boxempty.AccCode = this.User.AccCode
+							boxempty.EquipmentId = equip.Id
+							boxempty.ShelfId = shelfempty.Id
+							boxempty.Code = "B" + utils.ToStr(num_lastdata_box)
+							boxempty.BarCode = "B" + utils.ToStr(num_lastdata_box)
+							boxempty.YStation = a
+							boxempty.XStation = b
+							boxempty.RowNum = box_x_int
+							boxempty.ColumnNum = box_y_int
+							boxempty.SampleType = equip.SampleType
+							boxempty.CreateBy = this.User.Realname
+							boxempty.CreateBy = this.User.Realname
+							num_lastdata_box = num_lastdata_box + 1
+							_, err = svc.InsertEntity(&boxempty)
+						}
+					}
+				} else {
+					for e := 0; e < ii; e++ {
+						charname := Boxlinename(e + 1)
+						for f := 0; f < jj; f++ {
+							fieldname := fmt.Sprintf("%v%v", charname, f+1)
+							if f == jj-1 && e == ii-1 {
+								sqlfield += fieldname
+								sqlvalue += "-2"
+							} else {
+								sqlfield += fieldname + ","
+								sqlvalue += "-2,"
+							}
+						}
+					}
+				}
+				svc1 := currboxcapacity.GetCurrboxcapacityService(utils.DBE)
+				svc1.Add(sqlfield, sqlvalue)
+			}
+		}
+		num_lastdata_box = num_lastdata_box - 1
+		var lastnum lastordernum.LastOrderNum
+		lastnum.LastNum = "B" + utils.ToStr(num_lastdata_box)
+		svcshelf.UpdateBoxNum(lastnum, this.User.AccCode)
+		num_lastdata = num_lastdata - 1
+		var lastnum_shelf lastordernum.LastOrderNum
+		lastnum_shelf.LastNum = "F" + utils.ToStr(num_lastdata)
+		svcshelf.UpdateShelfNum(lastnum_shelf, this.User.AccCode)
 	} else {
 
 		if model.Shelf_X > 0 && model.Shelf_y > 0 {

+ 76 - 0
src/dashoo.cn/backend/api/controllers/samplesinfo/samplespreinput.go

@@ -212,6 +212,82 @@ func (this *SamplespreinputController) AnimalList() {
 	this.ServeJSON()
 }
 
+// @Title get
+// @Success 200 {object} controllers.Request
+// @router /animalapplylist [get]
+func (this *SamplespreinputController) AnimalApplyList() {
+	page := this.GetPageInfoForm()
+	where := " a.IState in (2,3,4,7,8) and a.DeletionStateCode=0 "
+	sampleCode := this.GetString("SampleCode")
+	if sampleCode != "" {
+		where = where + " and a.SampleCode like '%" + sampleCode + "%' "
+	}
+	barCode := this.GetString("BarCode")
+	if barCode != "" {
+		where = where + " and a.BarCode like '%" + barCode + "%' "
+	}
+	name := this.GetString("Name")
+	if name != "" {
+		where = where + " and  b.Name ='" + name + "'"
+	}
+	sampletype := this.GetString("SampleType")
+	stnotevalue := this.GetString("Stnotevalue") //特有扩展检索值
+	stnote := this.GetStrings("STNoteField")     //特有扩展名称
+	if sampletype != "" {
+		where = where + " and  b.SampleType = '" + sampletype + "'"
+		if j := len(stnote); j > 0 && stnotevalue != "" {
+			tysql := ""
+			for i := 0; i < j; i++ {
+				if tysql == "" {
+					tysql = " b." + stnote[i] + " like '%" + stnotevalue + "%' "
+				} else {
+					tysql += " or b." + stnote[i] + " like '%" + stnotevalue + "%' "
+				}
+			}
+			where = where + " and (" + tysql + ") "
+		}
+	}
+	CreateOnstart, _ := this.GetInt64("CreateOnstart")
+	if CreateOnstart != 0 {
+		where = where + " and  a.CreateOn >'" + time.Unix(CreateOnstart, 0).Format("2006-01-02") + "'"
+	}
+	CreateOnend, _ := this.GetInt64("CreateOnend")
+	if CreateOnend != 0 {
+		where = where + " and a.CreateOn <'" + time.Unix(CreateOnend, 0).Format("2006-01-02") + " 23:59:59'"
+	}
+	innercode := this.GetString("InnerCode")
+	if innercode != "" {
+		where = where + " and a.InnerCode ='" + innercode + "'"
+	}
+
+	createby := this.GetString("CreateBy")
+	if createby != "" {
+		where = where + "and  a.CreateBy ='" + createby + "'"
+	}
+	groupname := this.GetString("GroupName")
+	if groupname != "" {
+		where = where + "and  g.GroupName like '%" + groupname + "%' "
+	}
+	//支持从样本来源详情处跳转
+	ssouceid := this.GetString("sourceid")
+	if ssouceid != "" {
+		where = where + " and  SourceId = " + ssouceid + ""
+	}
+	donorname := this.GetString("SourceName")
+	if donorname != "" {
+		where = where + " and SourceName like '%" + donorname + "%'"
+	}
+	svc := samplesinfo.GetSamplesInfoService(utils.DBE)
+	var list []samplesinfo.SamplesInfoList
+	total, list := svc.GetPagingEntitiesWithTb(this.User.AccCode, page.CurrentPage, page.Size, this.User.AccCode+AnimaltbName, "Id ", where)
+
+	var datainfo DataInfo
+	datainfo.Items = list
+	datainfo.CurrentItemCount = total
+	this.Data["json"] = &datainfo
+	this.ServeJSON()
+}
+
 // @Title get
 // @Success 200 {object} controllers.Request
 // @router /getunit [get]

+ 252 - 86
src/dashoo.cn/frontend_animal/src/pages/biobank/sampleRK/_opera/operation.vue

@@ -140,12 +140,29 @@
         <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> -->
+                  <el-form ref="form" :inline="true" style="float: right; margin-top: -10px">
+                    <el-button type="primary" class="el-button--small" @click="EquipmentlistShow" :disabled="SampleRKform.ApplyStatus != 0">样本存储</el-button>
+                  </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>
@@ -166,7 +183,7 @@
                 </el-table-column>
               </el-table>
               <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="currentPage"
-                :page-sizes="[10, 20, 50, 100, 500]" :page-size="size" layout="total, sizes, prev, next, jumper" :total="currentItemCount">
+                :page-sizes="[10, 100, 200, 500]" :page-size="size" layout="total, sizes, prev, next, jumper" :total="currentItemCount">
               </el-pagination>
             </el-card>
           </el-col>
@@ -230,6 +247,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 +313,7 @@
   export default {
     name: 'materialdetect',
     components: {},
-    components: {},
-    data() {
+    data () {
       var checksampletype = (rule, value, callback) => {
         if (!value) {
           callback(new Error('请选择存储容器'))
@@ -265,22 +336,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 +370,7 @@
         applyForm: {},
         sampletypelist: [],
         equipmentForm: {
-          EquipmentId: '',
+          EquipmentId: ''
         },
         storarules: {
           EquipmentId: [{
@@ -307,45 +378,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 +465,11 @@
       }
       _this.getEntryNo()
       _this.getuserlist()
-      _this.getsamplelist() //获取样本列表
+      _this.getsamplelist() // 获取样本列表
       _this.getuserlist()
       _this.getEquiplist()
       _this.getPermissions()
+      _this.getextends()
     },
     computed: {
       ...mapGetters({
@@ -371,14 +477,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 +508,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 +537,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/animalapplylist', {
+            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 +586,7 @@
           })
       },
       // 打开容器弹窗 选择存储位置
-      EquipmentlistShow() {
+      EquipmentlistShow () {
         let _this = this
         if (_this.selectSamples.length < 1) {
           _this.$message({
@@ -492,13 +598,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 +634,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 +654,7 @@
           })
           .catch(() => {})
       },
-      saveauditor() {
+      saveauditor () {
         let _this = this
         let params = _this.SampleRKform
         _this.$axios.put('/samplesapply/auditorrk/' + _this.ServiceId, params)
@@ -604,7 +710,7 @@
       // authorSelectionChange(val) {
       //   this.authorSamples = val
       // },
-      getuserlist() {
+      getuserlist () {
         this.$axios.get('users/list', {})
           .then(res => {
             // response
@@ -623,33 +729,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 +763,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 +784,7 @@
           }
         }
       },
-      cancelLogin() {
+      cancelLogin () {
         if (this.isLoginSucceed) {
           this.isLoginSucceed = false
         } else {
@@ -686,13 +792,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 +816,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, 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">

+ 153 - 1
src/dashoo.cn/frontend_web/src/pages/equipment/_opera/manage_new.vue

@@ -3301,6 +3301,152 @@
             type: 2
           }
         ],
+        CE8120: [ // 25:Thermo Fisher CE8120,type:1规则图形,2不规则图形
+          {
+            XStation: 4,
+            YStation: 1,
+            x: 77,
+            y: 76,
+            width: 53,
+            height: 53,
+            type: 1
+          },
+          {
+            XStation: 1,
+            YStation: 1,
+            x: 134,
+            y: 45,
+            width: 84,
+            height: 84,
+            type: 1
+          },
+          {
+            XStation: 2,
+            YStation: 1,
+            x: 122,
+            y: 133,
+            width: 84,
+            height: 84,
+            type: 1
+          },
+          {
+            XStation: 3,
+            YStation: 1,
+            x: 33,
+            y: 133,
+            width: 84,
+            height: 84,
+            type: 1
+          },
+          {
+            XStation: 1,
+            YStation: 2,
+            x: 34,
+            y: 234,
+            width: 84,
+            height: 84,
+            type: 1
+          },
+          {
+            XStation: 2,
+            YStation: 2,
+            x: 123,
+            y: 234,
+            width: 84,
+            height: 84,
+            type: 1
+          },
+          {
+            XStation: 3,
+            YStation: 2,
+            x: 135,
+            y: 322,
+            width: 84,
+            height: 84,
+            type: 1
+          },
+          {
+            XStation: 4,
+            YStation: 2,
+            x: 77,
+            y: 322,
+            width: 53,
+            height: 53,
+            type: 1
+          },
+          {
+            XStation: 1,
+            YStation: 3,
+            x: 233,
+            y: 322,
+            width: 84,
+            height: 84,
+            type: 1
+          },
+          {
+            XStation: 2,
+            YStation: 3,
+            x: 245,
+            y: 233,
+            width: 84,
+            height: 84,
+            type: 1
+          },
+          {
+            XStation: 3,
+            YStation: 3,
+            x: 333,
+            y: 233,
+            width: 84,
+            height: 84,
+            type: 1
+          },
+          {
+            XStation: 4,
+            YStation: 3,
+            x: 322,
+            y: 322,
+            width: 53,
+            height: 53,
+            type: 1
+          },
+          {
+            XStation: 1,
+            YStation: 4,
+            x: 333,
+            y: 134,
+            width: 84,
+            height: 84,
+            type: 1
+          },
+          {
+            XStation: 2,
+            YStation: 4,
+            x: 245,
+            y: 134,
+            width: 84,
+            height: 84,
+            type: 1
+          },
+          {
+            XStation: 3,
+            YStation: 4,
+            x: 232,
+            y: 45,
+            width: 84,
+            height: 84,
+            type: 1
+          },
+          {
+            XStation: 4,
+            YStation: 4,
+            x: 321,
+            y: 77,
+            width: 53,
+            height: 53,
+            type: 1
+          }
+        ],
         waituploads: [], // 等待上传的附件列表
         downloadTemplates: [{
           Name: '默认模版'
@@ -3379,6 +3525,8 @@
                 yedanguandatarrtrmp = _this.yedanguanrongqiarr_newmodel
               } else if (_this.yedanguanitem === 22) {
                 yedanguandatarrtrmp = _this.genepointlite1
+              } else if (_this.yedanguanitem === 25) { // Thermo Fisher CE8120
+                yedanguandatarrtrmp = _this.CE8120
               } else {
                 yedanguandatarrtrmp = _this.genepointlite2
               }
@@ -3496,7 +3644,7 @@
               _this.showtsyedanguan = false
               _this.showcgshebei = true
               _this.fridgebottomimg = _this.filehost + '/static/img/sampletypeimg/bottomydg.png'
-            } else if (res.data && (res.data.DItem === 19 || res.data.DItem === 20 || res.data.DItem === 21 || res.data.DItem === 22 || res.data.DItem === 23)) {
+            } else if (res.data && (res.data.DItem === 19 || res.data.DItem === 20 || res.data.DItem === 21 || res.data.DItem === 22 || res.data.DItem === 23 || res.data.DItem === 25)) {
               _this.yedanguanitem = res.data.DItem
               if (res.data.DItem === 19) {
                 _this.yeshuyedanguanimgid = 'cryobiobank97Kimg'
@@ -3506,6 +3654,8 @@
                 _this.yeshuyedanguanimgid = 'cryobiobank97K_newmodelimg'
               } else if (res.data.DItem === 22) {
                 _this.yeshuyedanguanimgid = 'GenePointLITE1'
+              } else if (res.data.DItem === 25) {
+                _this.yeshuyedanguanimgid = 'cryobiobank97Kimg'
               } else {
                 _this.yeshuyedanguanimgid = 'GenePointLITE2'
               }
@@ -3548,6 +3698,8 @@
           yedanguandatarrtrmp = _this.yedanguanrongqiarr_newmodel
         } else if (_this.yedanguanitem === 22) {
           yedanguandatarrtrmp = _this.genepointlite1
+        } else if (_this.yedanguanitem === 25) {
+          yedanguandatarrtrmp = _this.CE8120
         } else {
           yedanguandatarrtrmp = _this.genepointlite2
         }

+ 22 - 17
src/dashoo.cn/frontend_web/src/pages/equipment/_opera/operation.vue

@@ -37,7 +37,7 @@
             </el-form-item>
             <el-form-item label="品牌" required>
               <el-select
-                :disabled="!isadd && (formmodel.DItem === 19 || formmodel.DItem === 20 || formmodel.DItem === 21)"
+                :disabled="!isadd && (formmodel.DItem === 19 || formmodel.DItem === 20 || formmodel.DItem === 21 || formmodel.DItem === 25)"
                 v-model="formmodel.Brand" placeholder="请选择品牌" @change="selectDModel" style="width:100%">
                 <el-option v-for="item in brandoptions" :label="item.label" :value="item.value" :key="item.value">
                 </el-option>
@@ -51,7 +51,7 @@
             </el-form-item>
             <el-form-item label="型号" required>
               <el-select
-                :disabled="!isadd && (formmodel.DItem === 19 || formmodel.DItem === 20 || formmodel.DItem === 21)"
+                :disabled="!isadd && (formmodel.DItem === 19 || formmodel.DItem === 20 || formmodel.DItem === 21 || formmodel.DItem === 25)"
                 v-model="formmodel.ModelVersion" placeholder="请选择型号" @change="selectPhoto" style="width:100%">
                 <el-option v-for="item in modeloptions" :label="item.label" :value="item.value" :key="item.value">
                 </el-option>
@@ -151,7 +151,7 @@
   export default {
     name: 'makerTemplatesEdit',
 
-    data() {
+    data () {
       var checkvalue = (rule, value, callback) => {
         if (!isNaN(parseFloat(value)) && !isNaN(value)) {
           callback()
@@ -253,7 +253,7 @@
         equipid: 0 // 柴新增,设备id
       }
     },
-    created() {
+    created () {
       this.remoteurl = process.env.imgserverhost
       let eid = this.$route.params.opera
       this.equipid = eid // 未进行变量优化
@@ -271,7 +271,7 @@
       }
     },
     methods: {
-      getbrand(brand) {
+      getbrand (brand) {
         // toggle loading
         let _this = this
         // request
@@ -295,7 +295,7 @@
             this.loading = false
           })
       },
-      getsensorsbyequid(equid) {
+      getsensorsbyequid (equid) {
         // toggle loading
         let _this = this
         // request
@@ -311,7 +311,7 @@
             console.error(err)
           })
       },
-      selectDModel(value) {
+      selectDModel (value) {
         // toggle loading
         let _this = this
         this.modeloptions = []
@@ -340,7 +340,7 @@
             this.loading = false
           })
       },
-      selectPhoto(value) {
+      selectPhoto (value) {
         let _this = this
         this.$axios.get('/equipment/getbydmodel/' + value, {})
           .then(res => {
@@ -391,6 +391,12 @@
                     _this.haveshelf = true
                     _this.showdchdcj = false
                     break
+                  case 25:
+                    _this.formmodel.RowNum = '4'
+                    _this.formmodel.ColumnNum = '4'
+                    _this.haveshelf = true
+                    _this.showdchdcj = false
+                    break
                   default:
                     _this.formmodel.RowNum = '1'
                     _this.formmodel.ColumnNum = '1'
@@ -413,7 +419,7 @@
           })
       },
       // 全选框控制
-      handleCheckAllChange(val) {
+      handleCheckAllChange (val) {
         this.checkedsampetype = []
         if (val) {
           for (var i = 0; i < this.sampelist.length; i++) {
@@ -422,12 +428,12 @@
         }
         this.issampetypecheckedall = false
       },
-      handlecheckedsampetypeChange(value) {
+      handlecheckedsampetypeChange (value) {
         let checkedCount = value.length
         this.checkAll = checkedCount === this.sampelist.length
         this.issampetypecheckedall = checkedCount > 0 && checkedCount < this.sampelist.length
       },
-      getmodel(opera) {
+      getmodel (opera) {
         // toggle loading
         let _this = this
         // request
@@ -475,7 +481,7 @@
             this.loading = false
           })
       },
-      isesedshelf(opera) {
+      isesedshelf (opera) {
         // 是否有冻存架使用
         let _this = this
         // request
@@ -491,7 +497,7 @@
             this.loading = false
           })
       },
-      getType() {
+      getType () {
         let _this = this
         _this.$axios.get('/sampletype/list', {})
           .then(res => {
@@ -521,7 +527,7 @@
             }
           })
       },
-      savedata() {
+      savedata () {
         let _this = this
         this.$refs['deviceform'].validate((valid) => {
           if (valid) {
@@ -546,7 +552,7 @@
             } else {
               // 不能修改为特殊型号
               if ((_this.editdataitem !== 19 && _this.editdataitem !== 20 && _this.editdataitem !== 21) && (_this
-                  .formmodel.DItem === 19 ||
+                .formmodel.DItem === 19 ||
                   _this.formmodel.DItem === 20 || _this.formmodel.DItem === 21)) {
                 this.$message({
                   type: 'warning',
@@ -573,7 +579,7 @@
           }
         })
       },
-      goback() {
+      goback () {
         if (this.$route.query.size) {
           this.$router.push({
             name: this.$route.query.pname,
@@ -588,7 +594,6 @@
       }
     }
   }
-
 </script>
 <style type="text/css">
   .deviceaddsamptype {

+ 16 - 17
src/dashoo.cn/frontend_web/src/pages/equipment/index.vue

@@ -63,7 +63,7 @@
               <router-link :to="'/equipment/' + v.Equipment.Id + '/manage_new?name=' + v.Equipment.Name + '&pname=equipment&size='+size+'&currentPage='+currentPage">
                 <el-button type="primary" size="mini">样本录入</el-button>
               </router-link>
-              <router-link v-if="v.Equipment.DItem !== 20 && v.Equipment.DItem !== 19 && v.Equipment.DItem !== 21 && v.Equipment.DItem !== 22 && v.Equipment.DItem !== 23" :to="'/equipment/' + v.Equipment.Id + '/shelfset_new?name=' + v.Equipment.Name + '&pname=equipment&size='+size+'&currentPage='+currentPage">
+              <router-link v-if="v.Equipment.DItem !== 20 && v.Equipment.DItem !== 19 && v.Equipment.DItem !== 21 && v.Equipment.DItem !== 22 && v.Equipment.DItem !== 23 && v.Equipment.DItem !== 25" :to="'/equipment/' + v.Equipment.Id + '/shelfset_new?name=' + v.Equipment.Name + '&pname=equipment&size='+size+'&currentPage='+currentPage">
                 <el-button type="primary" size="mini">设置</el-button>
               </router-link>
               <el-button type="primary" size="mini" @click="copy(v.Equipment.Id, v.Equipment.Code)">复制</el-button>
@@ -94,7 +94,7 @@
   export default {
     name: 'equipmanage',
 
-    data() {
+    data () {
       return {
         remoteurl: '',
         isnodata: false,
@@ -108,7 +108,7 @@
         downloading: true
       }
     },
-    created() {
+    created () {
       this.remoteurl = process.env.imgserverhost
       if (this.$route.query.size && this.$route.query.currentPage) {
         this.size = parseInt(this.$route.query.size)
@@ -118,7 +118,7 @@
       this.initData()
     },
     methods: {
-      initData() {
+      initData () {
         let _this = this
         const params = {
           _currentPage: this.currentPage,
@@ -126,8 +126,8 @@
           searchkey: this.keyword
         }
         this.$axios.get('/equipment/list', {
-            params
-          })
+          params
+        })
           .then(res => {
             _this.downloading = false
             _this.list = res.data.items
@@ -144,14 +144,14 @@
             _this.downloading = false
           })
       },
-      loadsensordata(code, i, j) {
+      loadsensordata (code, i, j) {
         let _this = this
         return _this.$axios.get('/channels/datavalue/' + code, null)
           .then(res => {
             _this.list[i].SensorData[j].Temperature = res.data.Temp + '  ℃'
           })
       },
-      loadsensordataall() {
+      loadsensordataall () {
         for (let i = 0; i < this.list.length; i++) {
           if (this.list[i].SensorData && this.list[i].SensorData.length > 0) {
             for (let j = 0; j < this.list[i].SensorData.length; j++) {
@@ -160,25 +160,25 @@
           }
         }
       },
-      handleSizeChange(value) {
+      handleSizeChange (value) {
         this.size = value
         this.currentPage = 1
         this.initData()
       },
-      handleCurrentChange(value) {
+      handleCurrentChange (value) {
         this.currentPage = value
         this.initData()
       },
-      seachdata() {
+      seachdata () {
         this.currentPage = 1
         this.initData()
       },
-      toeditdevice(opera) {
+      toeditdevice (opera) {
         this.$router.push({
           path: '/equipment/' + opera + '/operation?pname=equipment&size=' + this.size + '&currentPage=' + this.currentPage
         })
       },
-      deletedata(val, name) {
+      deletedata (val, name) {
         let _this = this
         _this.$confirm('此操作将永久删除该数据, 是否继续?', '提示', {
           confirmButtonText: '确定',
@@ -207,7 +207,7 @@
             })
         }).catch(() => {})
       },
-      copy(val, code) {
+      copy (val, code) {
         let _this = this
         _this.$confirm('确认复制此设备所有数据吗, 是否继续?', '提示', {
           confirmButtonText: '确定',
@@ -245,18 +245,17 @@
         }).catch(() => {})
       },
 
-      searchCommand(command) {
+      searchCommand (command) {
         if (command == 'clear') {
           this.clearSearch()
         }
       },
-      clearSearch(){
+      clearSearch () {
         this.keyword = ''
         this.seachdata()
       }
     }
   }
-
 </script>
 
 <style>

+ 1 - 1
src/dashoo.cn/frontend_weixin/src/pages/samples.vue

@@ -22,7 +22,7 @@
       <template v-if="showCelldetail">
         <x-textarea :value="donorslist.ZBack12" :max="200" title="细胞状态:" :show-counter="false" readonly="true"></x-textarea>
         <x-textarea :value="donorslist.ZBack11" :max="200" title="细胞出库信息:" :show-counter="false" readonly="true"></x-textarea>
-        <x-textarea :value="donorslist.WeiZhi" title="自体存储位置:" text-align="right" readonly="true"></x-textarea>
+        <x-textarea :value="donorslist.WeiZhi" title="存储位置:" text-align="right" readonly="true"></x-textarea>
         <cell :value="donorslist.Temperature" title="存储温度:" text-align="right"></cell>
         <cell :value="donorslist.RiQi" title="储存日期:" text-align="right" readonly="true"></cell>
         <cell :value="donorslist.NianXian" title="储存年限:" text-align="right" readonly="true"></cell>