4
0
shihang 6 gadi atpakaļ
vecāks
revīzija
e2bc5244c2
33 mainītis faili ar 647 papildinājumiem un 717 dzēšanām
  1. 10 12
      src/dashoo.cn/backend/api/business/reports/reportService.go
  2. 47 310
      src/dashoo.cn/backend/api/business/samplesinfo/samplesinfoService.go
  3. 4 4
      src/dashoo.cn/backend/api/business/sampletype/sampletype.go
  4. 81 4
      src/dashoo.cn/backend/api/controllers/reports.go
  5. 19 1
      src/dashoo.cn/backend/api/controllers/samplesinfo/sampleoperation.go
  6. 0 1
      src/dashoo.cn/backend/api/controllers/samplesinfo/samplespreinput.go
  7. 1 0
      src/dashoo.cn/backend/api/models/parameters.go
  8. 1 1
      src/dashoo.cn/frontend_animal/nuxt.config.js
  9. 38 21
      src/dashoo.cn/frontend_animal/src/components/samples/preoperation.vue
  10. 2 25
      src/dashoo.cn/frontend_animal/src/pages/equipment/_opera/manage_new.vue
  11. 1 16
      src/dashoo.cn/frontend_animal/src/pages/report/samples/samplesall.vue
  12. 1 17
      src/dashoo.cn/frontend_animal/src/pages/report/samples/samplesarchived.vue
  13. 1 13
      src/dashoo.cn/frontend_animal/src/pages/report/samples/samplesbycreatedate.vue
  14. 1 13
      src/dashoo.cn/frontend_animal/src/pages/report/samples/samplesbygroup.vue
  15. 2 17
      src/dashoo.cn/frontend_animal/src/pages/report/samples/samplesbysource.vue
  16. 1 13
      src/dashoo.cn/frontend_animal/src/pages/report/samples/samplesbytype.vue
  17. 1 4
      src/dashoo.cn/frontend_animal/src/pages/report/samples/samplesstored.vue
  18. 1 15
      src/dashoo.cn/frontend_animal/src/pages/report/samples/samplesstoredbydate.vue
  19. 1 13
      src/dashoo.cn/frontend_animal/src/pages/report/samples/samplesstoredbyequipment.vue
  20. 1 13
      src/dashoo.cn/frontend_animal/src/pages/report/samples/samplesstoredbysampletype.vue
  21. 2 1
      src/dashoo.cn/frontend_animal/src/pages/samples/prerecorded/_opera/unhumanadd.vue
  22. 2 15
      src/dashoo.cn/frontend_animal/src/pages/samples/stored/_opera/detailed.vue
  23. 2 2
      src/dashoo.cn/frontend_web/nuxt.config.js
  24. 1 1
      src/dashoo.cn/frontend_web/src/pages/equipment/_opera/manage_new.vue
  25. 12 3
      src/dashoo.cn/frontend_web/src/pages/equipment/_opera/operation.vue
  26. 36 21
      src/dashoo.cn/frontend_web/src/pages/report/samples/samplesarchived.vue
  27. 58 23
      src/dashoo.cn/frontend_web/src/pages/report/samples/samplesbycreatedate.vue
  28. 42 21
      src/dashoo.cn/frontend_web/src/pages/report/samples/samplesbygroup.vue
  29. 64 23
      src/dashoo.cn/frontend_web/src/pages/report/samples/samplesbysource.vue
  30. 44 22
      src/dashoo.cn/frontend_web/src/pages/report/samples/samplesbytype.vue
  31. 58 25
      src/dashoo.cn/frontend_web/src/pages/report/samples/samplesstoredbydate.vue
  32. 58 26
      src/dashoo.cn/frontend_web/src/pages/report/samples/samplesstoredbyequipment.vue
  33. 54 21
      src/dashoo.cn/frontend_web/src/pages/report/samples/samplesstoredbysampletype.vue

+ 10 - 12
src/dashoo.cn/backend/api/business/reports/reportService.go

@@ -4,12 +4,13 @@ import (
 	//	"fmt"
 	//	"strconv"
 
-	"dashoo.cn/utils"
-	. "dashoo.cn/utils/db"
 	"fmt"
-	"github.com/go-xorm/xorm"
 	"strconv"
+
 	. "dashoo.cn/backend/api/models"
+	"dashoo.cn/utils"
+	. "dashoo.cn/utils/db"
+	"github.com/go-xorm/xorm"
 )
 
 type ReportService struct {
@@ -23,17 +24,14 @@ func GetReportService(xormEngine *xorm.Engine) *ReportService {
 }
 
 func (s *ReportService) GetSamplesReport(order, where string) (int64, []SamplesReport) {
-	//var err error
 	var total int64
 	if order != "" {
 		order = " order by " + order
 	}
-	////获取总记录数
+	//获取总记录数
 	if where == "" {
 		where = "1=1"
 	}
-	//sqlCount := " select  count(*) from SampleOrgan a  left join SampleOrgan b on a.TNodeParent = b.TNode where " + where
-	//var sql string
 
 	sql := `SELECT m.SampleCode, m.Name, m.SampleTypeName, m.SamplingOrganName, m.SamplingSiteName, SUM(d.Capacity) CapacitySum, COUNT(m.SampleCode) SampleTotal
 	from s5OVESamplesMain m 
@@ -44,7 +42,7 @@ func (s *ReportService) GetSamplesReport(order, where string) (int64, []SamplesR
 	return total, List
 }
 
-func (s *ReportService) GetSampleDetailt(acccode string, pageIndex, itemsPerPage int64, order, where string) (int64, []SamplesDetail) {
+func (s *ReportService) GetSampleDetailt(acccode string, pageIndex, itemsPerPage int64, tbldonor, order, where string) (int64, []SamplesDetail) {
 	var err error
 	var total int64
 	if order != "" {
@@ -56,7 +54,7 @@ func (s *ReportService) GetSampleDetailt(acccode string, pageIndex, itemsPerPage
 	}
 	tbldetail := acccode + SamplesDetailtbName
 	tblmain := acccode + SamplesMaintbName
-	tbldonor := acccode + DonorstbName
+	//tbldonor := acccode + DonorstbName
 	groupdetail := acccode + GroupDetailName
 
 	sqlCount := " select count(*) 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 left join " + groupdetail + " g on g.SampleId=a.Id where " + where
@@ -64,7 +62,7 @@ func (s *ReportService) GetSampleDetailt(acccode string, pageIndex, itemsPerPage
 	fmt.Println(sqlCount)
 	var sql string
 
-	sql = ` select a.*,b.*,c.FamilyState,c.ClinicNum,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.*,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 
 	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 
@@ -72,7 +70,7 @@ func (s *ReportService) GetSampleDetailt(acccode string, pageIndex, itemsPerPage
 	left join Equipment f on a.EquipmentId=f.Id 
 	left join ` + groupdetail + ` g on g.SampleId=a.Id 
 	where ` + where + order
-	if (pageIndex != 0 && itemsPerPage != 0) {
+	if pageIndex != 0 && itemsPerPage != 0 {
 		sql = sql + ` limit ` + utils.ToStr((pageIndex-1)*itemsPerPage) + "," + utils.ToStr(itemsPerPage) + ""
 	}
 	//+ `
@@ -92,4 +90,4 @@ func (s *ReportService) GetSampleDetailt(acccode string, pageIndex, itemsPerPage
 		}
 	}
 	return total, List
-}
+}

+ 47 - 310
src/dashoo.cn/backend/api/business/samplesinfo/samplesinfoService.go

@@ -13,7 +13,8 @@ import (
 	"dashoo.cn/backend/api/business/baseUser"
 	"dashoo.cn/backend/api/business/donorsinfo"
 	"dashoo.cn/backend/api/business/sampleimporttemplate"
-	"dashoo.cn/backend/api/business/samplenoteitem"
+
+	//	"dashoo.cn/backend/api/business/samplenoteitem"
 	"dashoo.cn/backend/api/business/samplesbusiness"
 	"dashoo.cn/backend/api/business/sampletype"
 	"dashoo.cn/backend/api/business/shelfset"
@@ -205,291 +206,19 @@ func (s *SamplesInfoService) DeleteDetail(tbldetail, where string) error {
 	return err
 }
 
-/*func (s *SamplesInfoService) InsertExcelSamplesInput(excelpath, acccode, createby string, createuserid int) (err error, warn string) {
-	//公共扩展list
-	svcdnote := samplenoteitem.GetSampleNoteItemService(utils.DBE)
-	wherenote := " AccCode='" + acccode + "'"
-	notecount := svcdnote.GetNoteCount(acccode) //获取扩展项目count
-	notelist := svcdnote.GetDNoteItemList(wherenote)
-
-	tblmain := acccode + SamplesMaintbName
-	tbldetail := acccode + SamplesDetailtbName
-	tblfile := acccode + SamplesDetailFiletbName
-	tblbuss := acccode + SamplesBusstbName
-	tbldonor := acccode + DonorstbName
-
-	var datadetail SamplesDetail
-	var databuss samplesbusiness.SamplesBusiness //业务记录
-
-	dir, _ := os.Getwd()
-	flag := 0
-	excelpath = dir + excelpath
-	println("exsdf=--================", excelpath)
-	xlFile, _ := xlsx.OpenFile(excelpath)
-	svcdonors := donorsinfo.GetDonorsInfoService(utils.DBE)
-	var donors_data donorsinfo.DonorsInfo
-	var sampletype_data sampletype.SampleType
-	var base_userrole userRole.Base_User
-	svc := sampletype.GetSampleTypeService(utils.DBE)
-	svc1 := baseUser.GetBaseUserService(utils.DBE)
-	var warn1 string
-	for sheetindex, sheet := range xlFile.Sheets { //循环页数
-		sheetrows := len(xlFile.Sheets[sheetindex].Rows) //每一页的行数
-		fmt.Println("sheetindex", sheetindex)
-		for rowindex, row := range sheet.Rows { //循环行数
-			notefieldstr := ""
-			notevaluestr := ""
-			if rowindex == 0 { //第一行是表头,跳过
-				continue
-			}
-			if row.Cells == nil || len(row.Cells) < 13 { //小于必填项的19列,不允许导入(改为跳过)
-				continue
-			}
-
-			basestation := new(SamplesInfoShow)
-			for cellindex, cell := range row.Cells { //循环列数
-				if cellindex == 0 && len(cell.String()) == 0 { //冰箱ID不能为空
-					flag = 1
-					break
-				}
-				if cellindex == 2 && len(cell.String()) == 0 { //冻存架不能为空
-					flag = 1
-					break
-				}
-				if cellindex == 4 && len(cell.String()) == 0 { //冻存盒Id不能为空
-					flag = 1
-					break
-				}
-				if cellindex == 6 && len(cell.String()) == 0 { //位置不能为空
-					flag = 1
-					break
-				}
-				if cellindex == 7 && len(cell.String()) == 0 { //样本编码不能为空
-					flag = 1
-					break
-				}
-				if cellindex == 9 && len(cell.String()) == 0 { //样本类型不能为空
-					flag = 1
-					break
-				}
-				if cellindex == 15 { //容量不能为空
-					if len(cell.String()) == 0 {
-						flag = 1
-						break
-					}
-					fcapacity, _ := utils.StrTo(cell.String()).Float32()
-					if fcapacity <= 0 {
-						flag = 1
-						break
-					}
-				}
-				if cellindex == 16 && len(cell.String()) == 0 { //单位不能为空
-					flag = 1
-					break
-				}
-				if cellindex == 17 && len(cell.String()) == 0 { //有效日期不能为空
-					flag = 1
-					break
-				}
-				if cellindex == 18 && len(cell.String()) == 0 { //接收日期不能为空
-					flag = 1
-					break
-				}
-				if cell.String() != "" && len(cell.String()) != 0 {
-					if cellindex == 0 {
-						basestation.EquipmentId, _ = utils.StrTo(cell.String()).Int()
-					} else if cellindex == 2 {
-						basestation.ShelfId, _ = utils.StrTo(cell.String()).Int()
-					} else if cellindex == 4 {
-						basestation.BoxId, _ = utils.StrTo(cell.String()).Int()
-					} else if cellindex == 6 {
-						spos := cell.String()
-						sposs := StrSplit(spos, ";")
-						basestation.Position = sposs[1] + ";" + utils.ToStr(Boxlineumber(sposs[0]))
-						whereposition := " DeletionStateCode=0 and IState in (1,5) and BoxId=" + utils.ToStr(basestation.BoxId) + " and Position='" + basestation.Position + "'"
-						have := s.QuerySampleInfoHas(tbldetail, whereposition)
-						if have {
-							flag = 1
-							warn1 += cell.String() + ","
-							break
-						}
-					} else if cellindex == 7 { //样本编码
-						basestation.SampleCode = cell.String()
-					} else if cellindex == 8 && len(cell.String()) > 0 { //样本条码
-						whereposition := " DeletionStateCode=0 and BarCode = '" + cell.String() + "' "
-						have := s.QuerySampleInfoHas(tbldetail, whereposition)
-						where := " DeletionStateCode=0 and BarCode = '" + cell.String() + "'"
-						has := s.QuerySampleInfoHas(tblfile, where)
-						if have || has {
-							flag = 1
-							warn1 += cell.String() + ","
-							break
-						}
-						basestation.BarCode = cell.String()
-					} else if cellindex == 9 {
-						basestation.SampleTypeName = cell.String()
-						where2 := " AccCode='" + acccode + "' and Name='" + cell.String() + "'"
-						sampletype_data = svc.GetSampleType(where2)
-						if sampletype_data.Id == 0 {
-							flag = 1
-							warn1 = " "
-							break
-						}
-						basestation.SampleType = sampletype_data.Id
-					} else if cellindex == 10 {
-						basestation.Name = cell.String()
-					} else if cellindex == 11 {
-						basestation.SamplingOrgan = cell.String()
-					} else if cellindex == 12 {
-						basestation.SamplingOrganName = cell.String()
-					} else if cellindex == 13 {
-						basestation.SamplingSite = cell.String()
-					} else if cellindex == 14 {
-						basestation.SamplingSiteName = cell.String()
-					} else if cellindex == 15 {
-						basestation.Capacity, _ = utils.StrTo(cell.String()).Float32()
-						basestation.InitCapacity = basestation.Capacity
-					} else if cellindex == 16 {
-						basestation.Unit = cell.String()
-					} else if cellindex == 17 {
-						stime, err := utils.TimeParse(cell.Value, "2006-1-2 15:4:5")
-						if err != nil {
-							aa, _ := utils.StrTo(cell.Value).Float64()
-							basestation.ValidityDate = xlsx.TimeFromExcelTime(aa, false)
-						} else {
-							basestation.ValidityDate = stime
-						}
-					} else if cellindex == 18 {
-						stime, err := utils.TimeParse(cell.Value, "2006-1-2 15:4:5")
-						if err != nil {
-							aa, _ := utils.StrTo(cell.Value).Float64()
-							basestation.ReceiveDate = xlsx.TimeFromExcelTime(aa, false)
-						} else {
-							basestation.ReceiveDate = stime
-						}
-					} else if cellindex == 19 {
-						base_userrole = svc1.GetidByRealname(cell.String())
-						basestation.CreateBy = cell.String()
-						basestation.CreateUserId = base_userrole.Id
-					} else if cellindex == 20 {
-						basestation.SourceName = cell.String()
-					} else if cellindex == 21 {
-						basestation.SourceIdCard = cell.String()
-					} else if cellindex == 22 {
-						basestation.Remark = cell.String()
-					} else if cellindex == 23 {
-						basestation.ParentBarCode = cell.String()
-					} else if cellindex == 24 {
-						basestation.InnerCode = cell.String()
-					} else if cellindex > 24 && cellindex < 25+notecount {
-						for i := 1; i < notecount+1; i++ {
-							if cellindex == 24+i {
-								notefieldstr = notefieldstr + "," + notelist[i-1].FieldName //扩展字段 因为cellindex可能小于21
-								notevaluestr = notevaluestr + ",'" + cell.String() + "'"    //扩展名称
-							}
-						}
-					}
-				}
-			}
-			if flag == 1 {
-				flag = 0
-				continue
-			}
-
-			if basestation.CreateBy == "" {
-				basestation.CreateBy = createby
-				basestation.CreateUserId = createuserid
-			}
-			if basestation.SourceName != "" || basestation.SourceIdCard != "" {
-				wheredonors := " IdCard = '" + basestation.SourceIdCard + "' and Name ='" + basestation.SourceName + "' "
-				donors_data = svcdonors.QueryDonorEntity(tbldonor, wheredonors)
-				basestation.SourceId = donors_data.Id
-			}
-			basestation.AccCode = acccode
-			basestation.CreateOn = time.Now()
-			basestation.IState = 3
-			basestation.IType = 0
-			basestation.FreezingNum = 0
-			wheremain := " SampleCode='" + basestation.SampleCode + "' "
-			ishasmain := s.QuerySampleInfoHas(tblmain, wheremain)
-
-			if !ishasmain { //没有主信息,全部添加
-				//添加主表
-				sqlfield := " AccCode,SampleCode,Name,SampleType,SampleTypeName,SourceId,"
-				sqlfield = sqlfield + "SamplingOrgan,SamplingOrganName,SamplingSite,SamplingSiteName,ReceiveDate,"
-				sqlfield = sqlfield + "SourceIdCard,SourceName,MCreateUserId,MCreateBy,MCreateOn,MModifiedOn"
-				sqlfield = sqlfield + notefieldstr
-
-				sqlvalue := "'" + basestation.AccCode + "','" + basestation.SampleCode + "','" + basestation.Name + "'," + utils.ToStr(basestation.SampleType) + ",'" + basestation.SampleTypeName + "',"
-				sqlvalue = sqlvalue + "" + utils.ToStr(basestation.SourceId) + ","
-				sqlvalue = sqlvalue + "'" + basestation.SamplingOrgan + "','" + basestation.SamplingOrganName + "','" + basestation.SamplingSite + "',"
-				sqlvalue = sqlvalue + "'" + basestation.SamplingSiteName + "','" + basestation.ReceiveDate.Format("2006-1-2 15:4:5") + "','" + basestation.SourceIdCard + "','" + basestation.SourceName + "',"
-				sqlvalue = sqlvalue + "" + utils.ToStr(basestation.CreateUserId) + ",'" + basestation.CreateBy + "',now(),now()"
-				sqlvalue = sqlvalue + notevaluestr
-				fmt.Println(sqlfield)
-				fmt.Println(sqlvalue)
-				s.AddLine(tblmain, sqlfield, sqlvalue)
-			}
-			if basestation.BarCode == "" {
-				basestation.BarCode = s.AutoGetBarCode(acccode, basestation.SampleCode)
-			}
-			datadetail.SampleCode = basestation.SampleCode
-			datadetail.BarCode = basestation.BarCode
-			datadetail.IState = 1
-			datadetail.EquipmentId = basestation.EquipmentId
-			datadetail.ShelfId = basestation.ShelfId
-			datadetail.BoxId = basestation.BoxId
-			datadetail.Position = basestation.Position
-			datadetail.ParentBarCode = basestation.ParentBarCode
-			datadetail.IType = basestation.IType
-			datadetail.Capacity = basestation.Capacity
-			datadetail.InitCapacity = basestation.Capacity
-			datadetail.Unit = basestation.Unit
-			datadetail.FreezingNum = 0
-			datadetail.ValidityDate = basestation.ValidityDate
-			datadetail.InnerCode = basestation.InnerCode
-			datadetail.CreateUserId = basestation.CreateUserId
-			datadetail.CreateBy = basestation.CreateBy
-			datadetail.Remark = basestation.Remark
-			affected, _ := s.InsertEntityBytbl(tbldetail, &datadetail)
-			if affected > 0 {
-				databuss.OpType = 7
-				databuss.AccCode = basestation.AccCode
-				databuss.BarCode = datadetail.BarCode
-				databuss.CapacityUsed = datadetail.Capacity
-				databuss.CapacityRest = datadetail.Capacity
-				databuss.SampleCode = datadetail.SampleCode
-				databuss.Unit = datadetail.Unit
-				databuss.SampleType = basestation.SampleType
-				databuss.EquipmentId = datadetail.EquipmentId
-				databuss.ShelfId = datadetail.ShelfId
-				databuss.BoxId = datadetail.BoxId
-				databuss.Position = datadetail.Position
-				databuss.PositionDesc = s.GetPostiondescByPosId(datadetail.EquipmentId, datadetail.ShelfId, datadetail.BoxId, datadetail.Position)
-				databuss.CreateUserId = datadetail.CreateUserId
-				databuss.CreateBy = datadetail.CreateBy
-				s.InsertEntityBytbl(tblbuss, &databuss)
-			}
-			if rowindex == (sheetrows) {
-				//s.AddLine(tbldetail, sqlfield, sqlvalue)
-			}
-		}
-	}
-	return err, warn1
-}*/
-
 func (s *SamplesInfoService) InsertExcelSamplesInput(excelpath, acccode, createby string, createuserid int) (err error, warn string) {
 	//公共扩展list
-	svcdnote := samplenoteitem.GetSampleNoteItemService(utils.DBE)
-	wherenote := " AccCode='" + acccode + "'"
-	notecount := svcdnote.GetNoteCount(acccode) //获取扩展项目count
-	notelist := svcdnote.GetDNoteItemList(wherenote)
+	//svcdnote := samplenoteitem.GetSampleNoteItemService(utils.DBE)
+	//wherenote := " AccCode='" + acccode + "'"
+	//notecount := svcdnote.GetNoteCount(acccode) //获取扩展项目count
+	//notelist := svcdnote.GetDNoteItemList(wherenote)
 
 	tblmain := acccode + SamplesMaintbName
 	tbldetail := acccode + SamplesDetailtbName
 	tblfile := acccode + SamplesDetailFiletbName
 	tblbuss := acccode + SamplesBusstbName
-	tbldonor := acccode + DonorstbName
+	tbldonor := acccode + AnimalInfoName
+	//tbldonor := acccode + DonorstbName
 
 	var datadetail SamplesDetail
 	var databuss samplesbusiness.SamplesBusiness //业务记录
@@ -513,6 +242,7 @@ func (s *SamplesInfoService) InsertExcelSamplesInput(excelpath, acccode, createb
 	for sheetindex, sheet := range xlFile.Sheets { //循环页数
 		sheetrows := len(xlFile.Sheets[sheetindex].Rows) //每一页的行数
 		templateName := sheet.Name
+
 		if templateName != "默认模板" {
 			svc2 := sampleimporttemplate.GetSampleImporttemplateService(utils.DBE)
 			where := " AccCode = '" + acccode + "'"
@@ -525,7 +255,6 @@ func (s *SamplesInfoService) InsertExcelSamplesInput(excelpath, acccode, createb
 				continue
 			}
 			fields := strings.Split(list[0].Content, ",")
-
 			for rowindex, row := range sheet.Rows { //循环行数
 				notefieldstr := ""
 				notevaluestr := ""
@@ -542,15 +271,14 @@ func (s *SamplesInfoService) InsertExcelSamplesInput(excelpath, acccode, createb
 						break
 					}
 					field := fields[cellindex]
-					if len(cell.String()) == 0 &&
-						(field == "SampleCode" ||
-							field == "SampleType") {
+					if len(cell.String()) == 0 && (field == "SampleCode" || field == "SampleType") {
 						//不能为空
 						flag = 1
 						break
 					}
 
 					if cell.String() != "" && len(cell.String()) != 0 {
+						fmt.Println("mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm", field)
 						if field == "EquipmentId" {
 							basestation.EquipmentId, _ = utils.StrTo(cell.String()).Int()
 						} else if field == "ShelfId" {
@@ -582,9 +310,11 @@ func (s *SamplesInfoService) InsertExcelSamplesInput(excelpath, acccode, createb
 							}
 							basestation.BarCode = cell.String()
 						} else if field == "SampleType" {
+							fmt.Println("dvvvvvvvbv            ddd", field)
 							basestation.SampleTypeName = cell.String()
 							where2 := " AccCode='" + acccode + "' and Name='" + cell.String() + "'"
 							sampletype_data = svc.GetSampleType(where2)
+							fmt.Println("ddddddddddddddddddddddddd", sampletype_data)
 							if sampletype_data.Id == 0 {
 								flag = 1
 								warn1 = " "
@@ -593,17 +323,6 @@ func (s *SamplesInfoService) InsertExcelSamplesInput(excelpath, acccode, createb
 							basestation.SampleType = sampletype_data.Id
 						} else if field == "Name" {
 							basestation.Name = cell.String()
-						} else if field == "SamplingOrgan" {
-							basestation.SamplingOrgan = cell.String()
-						} else if field == "SamplingOrganName" {
-							basestation.SamplingOrganName = cell.String()
-						} else if field == "SamplingSite" {
-							basestation.SamplingSite = cell.String()
-						} else if field == "SamplingSiteName" {
-							basestation.SamplingSiteName = cell.String()
-						} else if field == "Capacity" {
-							basestation.Capacity, _ = utils.StrTo(cell.String()).Float32()
-							basestation.InitCapacity = basestation.Capacity
 						} else if field == "Unit" {
 							basestation.Unit = cell.String()
 						} else if field == "ValidityDate" {
@@ -642,19 +361,35 @@ func (s *SamplesInfoService) InsertExcelSamplesInput(excelpath, acccode, createb
 								notevaluestr = notevaluestr + ",'" + cell.String() + "'" //扩展名称
 							}
 						}
+						//						 else if field == "SamplingOrgan" {
+						//							basestation.SamplingOrgan = cell.String()
+						//						} else if field == "SamplingOrganName" {
+						//							basestation.SamplingOrganName = cell.String()
+						//						} else if field == "SamplingSite" {
+						//							basestation.SamplingSite = cell.String()
+						//						} else if field == "SamplingSiteName" {
+						//							basestation.SamplingSiteName = cell.String()
+						//						} else if field == "Capacity" {
+						//							basestation.Capacity, _ = utils.StrTo(cell.String()).Float32()
+						//							basestation.InitCapacity = basestation.Capacity
+						//						}
 					}
-				}
-				if flag == 1 {
-					flag = 0
-					continue
+
 				}
 
+				//				if flag == 1 {
+				//					flag = 0
+				//					continue
+				//				}
 				if basestation.CreateBy == "" {
 					basestation.CreateBy = createby
 					basestation.CreateUserId = createuserid
 				}
-				if basestation.SourceName != "" || basestation.SourceIdCard != "" {
-					wheredonors := " IdCard = '" + basestation.SourceIdCard + "' and Name ='" + basestation.SourceName + "' "
+
+				//				if basestation.SourceName != "" || basestation.SourceIdCard != "" {
+				if basestation.SourceName != "" {
+					//wheredonors := " IdCard = '" + basestation.SourceIdCard + "' and Name ='" + basestation.SourceName + "' "
+					wheredonors := " Name ='" + basestation.SourceName + "' "
 					donors_data = svcdonors.QueryDonorEntity(tbldonor, wheredonors)
 					basestation.SourceId = donors_data.Id
 				}
@@ -680,9 +415,9 @@ func (s *SamplesInfoService) InsertExcelSamplesInput(excelpath, acccode, createb
 					sqlvalue = sqlvalue + notevaluestr
 					s.AddLine(tblmain, sqlfield, sqlvalue)
 				}
-				if basestation.BarCode == "" {
-					basestation.BarCode = s.AutoGetBarCode(acccode, basestation.SampleCode)
-				}
+				//				if basestation.BarCode == "" {
+				//					basestation.BarCode = s.AutoGetBarCode(acccode, basestation.SampleCode)
+				//				}
 				datadetail.SampleCode = basestation.SampleCode
 				datadetail.BarCode = basestation.BarCode
 				datadetail.IState = 1
@@ -701,6 +436,7 @@ func (s *SamplesInfoService) InsertExcelSamplesInput(excelpath, acccode, createb
 				datadetail.CreateUserId = basestation.CreateUserId
 				datadetail.CreateBy = basestation.CreateBy
 				datadetail.Remark = basestation.Remark
+				fmt.Println("eeeeeeeeeeeeeeeeeeeeeeeeeeeeee3", tbldetail, &datadetail)
 				affected, _ := s.InsertEntityBytbl(tbldetail, &datadetail)
 				if affected > 0 {
 					databuss.OpType = 7
@@ -855,14 +591,15 @@ func (s *SamplesInfoService) InsertExcelSamplesInput(excelpath, acccode, createb
 							basestation.ParentBarCode = cell.String()
 						} else if cellindex == 24 {
 							basestation.InnerCode = cell.String()
-						} else if cellindex > 24 && cellindex < 25+notecount {
-							for i := 1; i < notecount+1; i++ {
-								if cellindex == 24+i {
-									notefieldstr = notefieldstr + "," + notelist[i-1].FieldName //扩展字段 因为cellindex可能小于21
-									notevaluestr = notevaluestr + ",'" + cell.String() + "'"    //扩展名称
-								}
-							}
 						}
+						//						else if cellindex > 24 && cellindex < 25+notecount {
+						//							for i := 1; i < notecount+1; i++ {
+						//								if cellindex == 24+i {
+						//									notefieldstr = notefieldstr + "," + notelist[i-1].FieldName //扩展字段 因为cellindex可能小于21
+						//									notevaluestr = notevaluestr + ",'" + cell.String() + "'"    //扩展名称
+						//								}
+						//							}
+						//						}
 					}
 				}
 

+ 4 - 4
src/dashoo.cn/backend/api/business/sampletype/sampletype.go

@@ -6,20 +6,20 @@ import (
 
 type SampleType struct {
 	Id                 int       `xorm:"<- not null pk autoincr INT(50)"`
+	AccCode            string    `xorm:"VARCHAR(10)"`
 	MainId             int       `xorm:"INT(10)"`
 	MainName           string    `xorm:"VARCHAR(255)"`
-	AccCode            string    `xorm:"VARCHAR(10)"`
 	Code               string    `xorm:"VARCHAR(50)"`
 	Name               string    `xorm:"VARCHAR(255)"`
 	DefaultCapacity    float32   `xorm:"DECIMAL(10)"`
 	Unit               string    `xorm:"VARCHAR(255)"`
 	ValidityHours      int       `xorm:"INT(10)"`
 	WaningHours        int       `xorm:"INT(10)"`
-	SubpackageNum      int       `xorm:"INT(10)"`
-	SubpackageCapacity float32   `xorm:"DECIMAL(10)"`
 	SortCode           int       `xorm:"INT(10)"`
-	PhotoType          int       `xorm:"INT(10)"`
 	Photo              string    `xorm:"VARCHAR(255)"`
+	PhotoType          int       `xorm:"INT(10)"`
+	SubpackageNum      int       `xorm:"INT(10)"`
+	SubpackageCapacity float32   `xorm:"DECIMAL(10)"`
 	SeriesNumber       string    `xorm:"VARCHAR(255)"`
 	StypeItemIds       string    `xorm:"VARCHAR(255)"`
 	CreateOn           time.Time `xorm:"DATETIME created"`

+ 81 - 4
src/dashoo.cn/backend/api/controllers/reports.go

@@ -893,7 +893,48 @@ func (this *ReportsController) SamplesDetailList() {
 	}
 	var lists []reports.SamplesDetail
 	svc := reports.GetReportService(utils.DBE)
-	total, lists := svc.GetSampleDetailt(this.User.AccCode, page.CurrentPage, page.Size, "BarCode", where)
+	total, lists := svc.GetSampleDetailt(this.User.AccCode, page.CurrentPage, page.Size, this.User.AccCode+DonorstbName, "BarCode", where)
+	var datainfo DataInfo
+	datainfo.Items = lists
+	datainfo.CurrentItemCount = total
+	this.Data["json"] = &datainfo
+	this.ServeJSON()
+}
+
+// @Title get
+// @Success 200 {object} controllers.Request
+// @router /animaldetaillist [get]
+func (this *ReportsController) AnimalDetailList() {
+	page := this.GetPageInfoForm()
+	where := " 1=1 and a.DeletionStateCode=0 "
+	CreateDate := this.GetString("CreateDate")
+	SourceId := this.GetString("SourceId")
+	GroupId := this.GetString("GroupId")
+	SampleTypeId := this.GetString("SampleTypeId")
+	Name := this.GetString("Name")
+	if SourceId != "" {
+		where = where + " and b.SourceId=" + SourceId
+	}
+	if GroupId != "" {
+		where = where + " and g.GroupId=" + GroupId
+	}
+	if SampleTypeId != "" {
+		where = where + " and b.SampleType=" + SampleTypeId
+	}
+	if Name != "" {
+		where = where + " and  b.Name = " + Name + ""
+	}
+	if CreateDate != "" {
+		dates := strings.Split(CreateDate, ",")
+		if len(dates) == 2 {
+			minDate := dates[0]
+			maxDate := dates[1]
+			where = where + " and a.CreateOn>='" + minDate + "' and a.CreateOn<='" + maxDate + "'"
+		}
+	}
+	var lists []reports.SamplesDetail
+	svc := reports.GetReportService(utils.DBE)
+	total, lists := svc.GetSampleDetailt(this.User.AccCode, page.CurrentPage, page.Size, this.User.AccCode+AnimaltbName, "BarCode", where)
 	var datainfo DataInfo
 	datainfo.Items = lists
 	datainfo.CurrentItemCount = total
@@ -930,8 +971,44 @@ func (this *ReportsController) SampleStoredList() {
 			where = where + " and a.CreateOn>='" + minDate + "' and a.CreateOn<='" + maxDate + "'"
 		}
 	}
-	// this.User.AccCode, page.CurrentPage, page.Size, "Id desc", where
-	total, lists := svc.GetSampleDetailt(this.User.AccCode, page.CurrentPage, page.Size, "BarCode", where)
+	total, lists := svc.GetSampleDetailt(this.User.AccCode, page.CurrentPage, page.Size, this.User.AccCode+DonorstbName, "BarCode", where)
+	var datainfo DataInfo
+	datainfo.Items = lists
+	datainfo.CurrentItemCount = total
+	this.Data["json"] = &datainfo
+	this.ServeJSON()
+}
+
+// @Title get
+// @Success 200 {object} controllers.Request
+// @router /animalstoredlist [get]
+func (this *ReportsController) AnimalStoredList() {
+	var lists []reports.SamplesDetail
+	svc := reports.GetReportService(utils.DBE)
+	page := this.GetPageInfoForm()
+	where := "IState =1 and DeletionStateCode=0 "
+	CreateDate := this.GetString("CreateDate")
+	SampleType := this.GetString("SampleTypeId")
+	EId := this.GetString("EId")
+	Name := this.GetString("Name")
+	if SampleType != "" {
+		where = where + " and  b.SampleType = '" + SampleType + "'"
+	}
+	if EId != "" {
+		where = where + " and  f.Id = '" + EId + "'"
+	}
+	if Name != "" {
+		where = where + " and  b.Name = '" + Name + "'"
+	}
+	if CreateDate != "" {
+		dates := strings.Split(CreateDate, ",")
+		if len(dates) == 2 {
+			minDate := dates[0]
+			maxDate := dates[1]
+			where = where + " and a.CreateOn>='" + minDate + "' and a.CreateOn<='" + maxDate + "'"
+		}
+	}
+	total, lists := svc.GetSampleDetailt(this.User.AccCode, page.CurrentPage, page.Size, this.User.AccCode+AnimaltbName, "BarCode", where)
 	var datainfo DataInfo
 	datainfo.Items = lists
 	datainfo.CurrentItemCount = total
@@ -1011,7 +1088,7 @@ func (this *ReportsController) ExportExcel() {
 
 	title = strings.Split(titlestring, ",")
 
-	_, datas = svc.GetSampleDetailt(this.User.AccCode, 0, 0, "BarCode", where)
+	_, datas = svc.GetSampleDetailt(this.User.AccCode, 0, 0, this.User.AccCode+DonorstbName, "BarCode", where)
 
 	f := xlsx.NewFile()
 	this.SaveSampleXlsx(filetitle, title, showcolumnarr, datas, f)

+ 19 - 1
src/dashoo.cn/backend/api/controllers/samplesinfo/sampleoperation.go

@@ -1407,7 +1407,6 @@ func (this *SampleOperationController) ImportExcel() {
 	json.Unmarshal(jsonblob, &url)
 	var errinfo ErrorInfo
 	svc := samplesinfo.GetSamplesInfoService(utils.DBE)
-	//path := "/static/file/excel/report/" + this.GetAccode() + "/" + inputstr
 	id, _ := utils.StrTo(this.User.Id).Int()
 	err, _ := svc.InsertExcelSamplesInput(url.URL, this.User.AccCode, this.User.Realname, id)
 	if err == nil {
@@ -1651,6 +1650,25 @@ func (this *SampleOperationController) BatchAddByApply(datamain samplesapply.Sam
 				_, err = svcSample.InsertEntityBytbl(this.User.AccCode+SamplesApplyDetailName, &datadetail)
 
 				if err == nil {
+					//写入BUSS表
+					var databuss samplesbusiness.SamplesBusiness //业务记录
+					databuss.AccCode = this.User.AccCode
+					databuss.OpType = 3
+					databuss.CapacityUsed = datadetail.Capacity
+					databuss.CapacityRest = datadetail.Capacity
+					databuss.SampleCode = datadetail.SampleCode
+					databuss.Unit = datadetail.Unit
+					databuss.SampleType = datadetail.SampleType
+					databuss.EquipmentId = datadetail.EquipmentId
+					databuss.ShelfId = datadetail.ShelfId
+					databuss.BoxId = datadetail.BoxId
+					databuss.Position = datadetail.Position
+					databuss.PositionDesc = svcSample.GetPostiondescByPosId(datadetail.EquipmentId, datadetail.ShelfId, datadetail.BoxId, datadetail.Position)
+					databuss.CreateUserId, _ = utils.StrTo(this.User.Id).Int()
+					databuss.CreateBy = this.User.Realname
+					svcSample.InsertEntityBytbl(this.User.AccCode+SamplesBusstbName, &databuss)
+
+					//更新样本状态
 					var detailmodel samplesinfo.SamplesDetail
 					detailmodel.ModifiedBy = this.User.Realname
 					detailmodel.ModifiedUserId, _ = utils.StrTo(this.User.Id).Int()

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

@@ -271,7 +271,6 @@ func (this *SamplespreinputController) Add() {
 		datamain.MCreateUserId = datadetail.CreateUserId
 		datamain.MCreateBy = datadetail.CreateBy
 		datamain.ReceiveDate = time.Unix(dataother.ReceiveDateint/1000, 0)
-
 		_, err = svcSample.InsertSamplePre(this.User.AccCode+SamplesMaintbName, this.User.AccCode+SamplesDetailtbName, &datamain, &datadetail)
 	}
 

+ 1 - 0
src/dashoo.cn/backend/api/models/parameters.go

@@ -6,6 +6,7 @@ var (
 	SiteName                string
 	ErrTime                 int    = 5
 	DonorstbName            string = "DonorsInfo"
+	AnimalInfoName          string = "AnimalInfo"
 	DonorslogtbName         string = "DonorsLog"
 	IsUpdating              string = "false"
 	SamplesLogtbName        string = "SamplesLog"

+ 1 - 1
src/dashoo.cn/frontend_animal/nuxt.config.js

@@ -160,7 +160,7 @@ module.exports = {
 
   axios: {
     baseURL: '//localhost:9081/api/' // 本机开发使用
-    // baseURL: '//47.92.238.200:9081/api/' // BioBank on ALi发布使用
+    //  baseURL: '//47.92.238.200:9081/api/' // BioBank on ALi发布使用
     // baseURL: '//188.188.30.89:9081/api/' //临沂使用
     // baseURL: '//api09.labsop.cn/api/'
     // baseURL: '//192.168.0.211:10091/api/' // 花生所系统

+ 38 - 21
src/dashoo.cn/frontend_animal/src/components/samples/preoperation.vue

@@ -10,42 +10,48 @@
             <el-form-item label="录入人员">
               <el-input v-model="form.operator" placeholder="请输入录入人"></el-input>
             </el-form-item>
+          </el-col>
+          <el-col :span="8">
+            <el-form-item label="样本编码">
+              <el-input v-model="form.number" placeholder="请输入样本编码"></el-input>
+            </el-form-item>
             <el-form-item label="样本类型">
               <el-select v-model="form.sampletype" clearable style="width:100%" placeholder="请选择">
                 <el-option v-for="item in typelist" :label="item.Name" :value="item.Id" :key="item.Id">
                 </el-option>
               </el-select>
             </el-form-item>
-          </el-col>
-          <el-col :span="8">
-            <el-form-item label="样本编码">
-              <el-input v-model="form.number" placeholder="请输入样本编码"></el-input>
-            </el-form-item>
-            <el-form-item label="开始日期">
+            <!-- <el-form-item label="开始日期">
               <el-date-picker style="width: 100%" v-model="form.startdate" type="date" :clearable="false"
                 placeholder="请输入开始日期" :picker-options="pickerOptions0">
               </el-date-picker>
-            </el-form-item>
-            <el-form-item label="组织器官" v-if="acc != '' || acc != 'ssqOy' || acc != 'saB4v'">
+            </el-form-item> -->
+            <!-- <el-form-item label="组织器官" v-if="acc != '' || acc != 'ssqOy' || acc != 'saB4v'">
               <el-cascader :options="cascade" style="width:100%" :props="sampleorganprops" change-on-select
                 :show-all-levels="false" v-model="selectedorgan" placeholder="请选择" @change="choose"></el-cascader>
-            </el-form-item>
+            </el-form-item> -->
           </el-col>
           <el-col :span="8">
             <el-form-item label="样本名称">
               <el-input v-model="form.name" placeholder="请输入名称"></el-input>
             </el-form-item>
-            <el-form-item label="结束日期">
+            <el-col :span="12">
+              <el-form-item label="接收日期">
+                <el-date-picker size="mini" style="width: 240px" v-model="ReceiveDate" type="daterange"
+                  range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期"></el-date-picker>
+              </el-form-item>
+            </el-col>
+            <!-- <el-form-item label="结束日期">
               <el-date-picker style="width: 100%" v-model="form.enddate" type="date" :clearable="false"
                 placeholder="请输入结束日期" :picker-options="pickerOptions0">
               </el-date-picker>
-            </el-form-item>
-            <el-form-item label="取材部位" v-if="acc != '' || acc != 'ssqOy' || acc != 'saB4v'">
+            </el-form-item> -->
+            <!-- <el-form-item label="取材部位" v-if="acc != '' || acc != 'ssqOy' || acc != 'saB4v'">
               <el-select v-model="form.samplingsite" clearable style="width:100%" placeholder="请选择">
                 <el-option v-for="item in ssoption" :label="item.label" :value="item.value" :key="item.value">
                 </el-option>
               </el-select>
-            </el-form-item>
+            </el-form-item> -->
           </el-col>
         </el-row>
       </el-form>
@@ -153,11 +159,12 @@
         sampleyulurulist: [],
         organdialog: '',
         sampletype: '',
-        pickerOptions0: { //  日期选择
-          disabledDate(time) {
-            return time.getTime() < Date.now() - 8.64e7
-          }
-        },
+        ReceiveDate: [],
+        // pickerOptions0: { //  日期选择
+        //   disabledDate(time) {
+        //     return time.getTime() < Date.now() - 8.64e7
+        //   }
+        // },
         currentPage: 1, // 分页
         pagesize: 7,
         currentItemCount: 0,
@@ -176,12 +183,23 @@
     methods: {
       initData() {
         let _this = this
-        // request
+        let ReceiveDate = []
+        if (!_this.ReceiveDate) {
+          _this.ReceiveDate = []
+        }
+        if (_this.ReceiveDate.length == 2) {
+          _this.ReceiveDate[1].setHours(23)
+          _this.ReceiveDate[1].setMinutes(59)
+          _this.ReceiveDate[1].setSeconds(59)
+          ReceiveDate.push(_this.formatDateTime(_this.ReceiveDate[0]))
+          ReceiveDate.push(_this.formatDateTime(_this.ReceiveDate[1]))
+        }
         const params = {
           _currentPage: this.currentPage,
           _size: this.pagesize,
         }
-        this.$axios.get('sampleinput/getlistajax', {
+        Object.assign(params, _this.form)
+        this.$axios.get('sampleinput/getlistajax?ReceiveDate=' + ReceiveDate.join(','), {
             params
           })
           .then(res => {
@@ -189,7 +207,6 @@
             _this.currentItemCount = res.data.currentItemCount
           })
           .catch(err => {
-            // handle error
             console.error(err)
           })
       },

+ 2 - 25
src/dashoo.cn/frontend_animal/src/pages/equipment/_opera/manage_new.vue

@@ -24,7 +24,7 @@
         </el-breadcrumb>
 
         <span style="float: right;">
-          <el-button size="mini" type="primary" style="margin-left: 8px" v-if="Apply_flag==false" @click="SaveApply">保存
+          <el-button size="mini" type="primary" style="margin-left: 8px" v-if="Apply_flag==false" @click="SaveApply">保 
           </el-button>
           <el-button size="mini" type="primary" style="margin-left: 8px" @click="exportVisible = true">导入</el-button>
           <el-button size="mini" type="primary" style="margin-left: 8px" @click="showBoxTemplate()">下载冻存盒导入模板
@@ -244,7 +244,7 @@
                     <label><strong>样本内码 :</strong> {{ sampleForm.InnerCode }} </label>
                   </el-col>
                   <el-col :span="12">
-                    <label><strong>样本码 :</strong> {{ sampleForm.SampleCode }} </label>
+                    <label><strong>样本码 :</strong> {{ sampleForm.SampleCode }} </label>
                   </el-col>
                   <el-col :span="12">
                     <label><strong>可用容量 :</strong> {{ sampleForm.Capacitystr }} {{ sampleForm.Unit }} </label>
@@ -320,15 +320,6 @@
               </el-input>
             </el-form-item>
           </el-col>
-          <!-- <el-col :span="8" v-if="acc != 'sBBo4' && acc != 'ssqOy' && acc != 'saB4v'">
-            <el-form-item label="样本来源">
-              <el-input v-model="sampleForm.SourceName" placeholder="样本来源" style="width:100%" disabled>
-                <el-button type="primary" :disabled="disabledsourcebutton || contains('1,2', batchitem)"
-                  style="width:30%" @click="peopleSourceVisible = true" slot="append">选择
-                </el-button>
-              </el-input>
-            </el-form-item>
-          </el-col> -->
           <el-col :span="8" v-if="acc == 'sBBo4'">
             <el-form-item label="样本来源">
               <el-input v-model="sampleForm.SourceName" placeholder="样本来源" style="width:100%" disabled>
@@ -3426,8 +3417,6 @@
                 }
                 _this.GroupName = tempOfficers.join(',');
               }
-              // _this.$axios.post('/sampleoperation?batchitem=' + _this.batchitem + '&groupid=' + _this.GroupId +
-              //     '&groupname=' +
               _this.$axios.post('/sampleoperation?groupid=' + _this.GroupId + '&groupname=' + _this.GroupName,
                   params)
                 .then(res => {
@@ -3438,9 +3427,6 @@
                     })
                     _this.shelfs = _this.samplelist[0]
                     _this.handleclk(_this.xbox-1, _this.ybox-1, _this.xshelf, _this.yshelf)
-                    // _this.handleclk(_this.xbox - 1, _this.ybox - 1, _this.xshelf, _this.yshelf)
-                    // 清空上传附件
-                    _this.$refs.refuploadattach.clearFiles()
                     // 获取附件信息
                     _this.getattachment(_this.sampleForm.BarCode, _this.sampleForm.SampleCode)
                     //清空缓存数据
@@ -3460,8 +3446,6 @@
                         window.PrintReport(printparams[1], `samples,${printparams[2]},${printparams[0]}`)
                       }
                     }
-                    // 清空上传附件
-                    _this.$refs.refuploadattach.clearFiles()
                     // 获取附件信息
                     _this.getattachment(_this.sampleForm.BarCode, _this.sampleForm.SampleCode)
                     //清空缓存数据
@@ -3473,8 +3457,6 @@
                       message: res.data.message
                     })
                     _this.handleclk(_this.xbox - 1, _this.ybox - 1, _this.xshelf, _this.yshelf)
-                    // 清空上传附件
-                    _this.$refs.refuploadattach.clearFiles()
                     // 获取附件信息
                     _this.getattachment(_this.sampleForm.BarCode, _this.sampleForm.SampleCode)
                     //清空缓存数据
@@ -3536,8 +3518,6 @@
                 type: 'success',
                 message: res.data.message
               })
-              // 清空上传附件
-              _this.$refs.refuploadattach.clearFiles()
               // 获取附件信息
               _this.getattachment(_this.sampleForm.BarCode, _this.sampleForm.SampleCode)
             } else {
@@ -3553,7 +3533,6 @@
           })
       },
       SaveApply(value) {
-        console.log("1111111111111111",value)
         let _this = this
         if (this.dchxtable === -1 || this.dchytable === -1) {
           this.$message({
@@ -3707,8 +3686,6 @@
           // 清空特有扩展
           this.sampleForm.extendList = []
           this.$refs['sampleForm'].resetFields()
-          // 清空上传数据
-          this.$refs.refuploadattach.clearFiles()
           this.achmentlist = []
         }
       },

+ 1 - 16
src/dashoo.cn/frontend_animal/src/pages/report/samples/samplesall.vue

@@ -45,8 +45,6 @@
         <el-table-column label="名称" prop="Name" align="center"></el-table-column>
         <el-table-column label="样本类型" prop="SampleTypeName" align="center"></el-table-column>
         <el-table-column label="样本来源" prop="SourceName" align="center"></el-table-column>
-        <el-table-column label="组织器官" prop="SamplingOrganName" align="center"></el-table-column>
-        <el-table-column label="取材部位" prop="SamplingSiteName" align="center"></el-table-column>
         <el-table-column label="可用容量" prop="Capacity" align="center">
           <template slot-scope="scope">
             {{ scope.row.Capacity }}{{ scope.row.Unit }}
@@ -163,16 +161,6 @@
             name: '可用容量',
             show: true,
             kuoz: false
-          }, {
-            filed: 'SamplingOrganName',
-            name: '组织器官',
-            show: true,
-            kuoz: false
-          }, {
-            filed: 'SamplingSiteName',
-            name: '取材部位',
-            show: true,
-            kuoz: false
           }, {
             filed: 'InnerCode',
             name: '样本内码',
@@ -239,8 +227,7 @@
           CreateDate.push(this.formatDateTime(this.CreateDate[1]))
         }
         params = Object.assign(params, this.searchform)
-        // request
-        this.$axios.get('reports/samplesdetaillist?CreateDate=' + CreateDate, {
+        this.$axios.get('reports/animaldetaillist?CreateDate=' + CreateDate, {
             params
           })
           .then(res => {
@@ -249,14 +236,12 @@
             this.dialogTableVisible = false
           })
           .catch(err => {
-            // handle error
             console.error(err)
           })
       },
       getsampletype() {
         this.$axios.get('sampletype/list', {})
           .then(res => {
-            // response
             this.sampletypelist = res.data.items
           })
           .catch(err => {

+ 1 - 17
src/dashoo.cn/frontend_animal/src/pages/report/samples/samplesarchived.vue

@@ -31,8 +31,6 @@
         <el-table-column label="名称" prop="Name" align="center"></el-table-column>
         <el-table-column label="样本类型" prop="SampleTypeName" align="center"></el-table-column>
         <el-table-column label="样本来源" prop="SampleCode" align="center"></el-table-column>
-        <el-table-column label="组织器官" prop="SamplingOrganName" align="center"></el-table-column>
-        <el-table-column label="取材部位" prop="SamplingSiteName" align="center"></el-table-column>
         <el-table-column label=" 可用容量" prop="Capacity" align="center">
           <template slot-scope="scope">
             {{ scope.row.Capacity }}{{ scope.row.Unit }}
@@ -116,16 +114,6 @@
             name: '可用容量',
             show: true,
             kuoz: false
-          }, {
-            filed: 'SamplingOrganName',
-            name: '组织器官',
-            show: true,
-            kuoz: false
-          }, {
-            filed: 'SamplingSiteName',
-            name: '取材部位',
-            show: true,
-            kuoz: false
           }, {
             filed: 'InnerCode',
             name: '样本内码',
@@ -168,7 +156,6 @@
       }
     },
     created() {
-      // initial data
       this.initData()
       this.getsampsource()
     },
@@ -277,17 +264,14 @@
           _currentPage: this.currentPage,
           _size: this.size
         }
-        // request
-        this.$axios.get('reports/samplesdetaillist', {
+        this.$axios.get('reports/animaldetaillist', {
             params
           })
           .then(res => {
             this.list = res.data.items
             this.currentItemCount = res.data.currentItemCount
-            // this.dialogTableVisible = false
           })
           .catch(err => {
-            // handle error
             console.error(err)
           })
       },

+ 1 - 13
src/dashoo.cn/frontend_animal/src/pages/report/samples/samplesbycreatedate.vue

@@ -45,8 +45,6 @@
         <el-table-column label="名称" prop="Name" align="center"></el-table-column>
         <el-table-column label="样本类型" prop="SampleTypeName" align="center"></el-table-column>
         <el-table-column label="样本来源" align="center" prop="SourceName"></el-table-column>
-        <el-table-column label="组织器官" prop="SamplingOrganName" align="center"></el-table-column>
-        <el-table-column label="取材部位" prop="SamplingSiteName" align="center"></el-table-column>
         <el-table-column label=" 可用容量" prop="Capacity" align="center"></el-table-column>
         <el-table-column label="有效日期" prop="Validity" align="center" show-overflow-tooltip>
           <template slot-scope="scope">
@@ -142,16 +140,6 @@
             name: '可用容量',
             show: true,
             kuoz: false
-          }, {
-            filed: 'SamplingOrganName',
-            name: '组织器官',
-            show: true,
-            kuoz: false
-          }, {
-            filed: 'SamplingSiteName',
-            name: '取材部位',
-            show: true,
-            kuoz: false
           }, {
             filed: 'InnerCode',
             name: '样本内码',
@@ -215,7 +203,7 @@
           CreateDate.push(_this.formatDateTime(_this.CreateDate[1]))
         }
         // request
-        this.$axios.get('reports/samplesdetaillist?CreateDate=' + CreateDate, {
+        this.$axios.get('reports/animaldetaillist?CreateDate=' + CreateDate, {
             params
           })
           .then(res => {

+ 1 - 13
src/dashoo.cn/frontend_animal/src/pages/report/samples/samplesbygroup.vue

@@ -46,8 +46,6 @@
         <el-table-column label="名称" prop="Name" align="center"></el-table-column>
         <el-table-column label="样本类型" prop="SampleTypeName" align="center"></el-table-column>
         <el-table-column label="样本来源" prop="SourceName" align="center"></el-table-column>
-        <el-table-column label="组织器官" prop="SamplingOrganName" align="center"></el-table-column>
-        <el-table-column label="取材部位" prop="SamplingSiteName" align="center"></el-table-column>
         <el-table-column label="可用容量" prop="Capacity" align="center">
           <template slot-scope="scope">
             {{ scope.row.Capacity }} {{ scope.row.Unit }}
@@ -148,16 +146,6 @@
             name: '可用容量',
             show: true,
             kuoz: false
-          }, {
-            filed: 'SamplingOrganName',
-            name: '组织器官',
-            show: true,
-            kuoz: false
-          }, {
-            filed: 'SamplingSiteName',
-            name: '取材部位',
-            show: true,
-            kuoz: false
           }, {
             filed: 'InnerCode',
             name: '样本内码',
@@ -210,7 +198,7 @@
         }
         // request
         console.log(this.SourceId)
-        this.$axios.get('reports/samplesdetaillist?GroupId=' + this.GroupId, {
+        this.$axios.get('reports/animaldetaillist?GroupId=' + this.GroupId, {
             params
           })
           .then(res => {

+ 2 - 17
src/dashoo.cn/frontend_animal/src/pages/report/samples/samplesbysource.vue

@@ -46,8 +46,6 @@
         <el-table-column label="名称" prop="Name" align="center"></el-table-column>
         <el-table-column label="样本类型" prop="SampleTypeName" align="center"></el-table-column>
         <el-table-column label="样本来源" prop="SourceName" align="center"></el-table-column>
-        <el-table-column label="组织器官" prop="SamplingOrganName" align="center"></el-table-column>
-        <el-table-column label="取材部位" prop="SamplingSiteName" align="center"></el-table-column>
         <el-table-column label=" 可用容量" prop="Capacity" align="center">
           <template slot-scope="scope">
             {{ scope.row.Capacity }} {{ scope.row.Unit }}
@@ -148,16 +146,6 @@
             name: '可用容量',
             show: true,
             kuoz: false
-          }, {
-            filed: 'SamplingOrganName',
-            name: '组织器官',
-            show: true,
-            kuoz: false
-          }, {
-            filed: 'SamplingSiteName',
-            name: '取材部位',
-            show: true,
-            kuoz: false
           }, {
             filed: 'InnerCode',
             name: '样本内码',
@@ -208,8 +196,7 @@
           _currentPage: this.currentPage,
           _size: this.size
         }
-        // request
-        this.$axios.get('reports/samplesdetaillist?SourceId=' + this.SourceId, {
+        this.$axios.get('reports/animaldetaillist?SourceId=' + this.SourceId, {
             params
           })
           .then(res => {
@@ -218,18 +205,16 @@
             this.dialogTableVisible = false
           })
           .catch(err => {
-            // handle error
             console.error(err)
           })
       },
       getsampsource() {
         let _this = this
-        _this.$axios.get('samplessource/samplessourcelist')
+        _this.$axios.get('samplessource/animallist')
           .then(res => {
             _this.sampsources = res.data.items
           })
           .catch(err => {
-            // handle error
             console.error(err)
           })
       },

+ 1 - 13
src/dashoo.cn/frontend_animal/src/pages/report/samples/samplesbytype.vue

@@ -46,8 +46,6 @@
         <el-table-column label="名称" prop="Name" align="center"></el-table-column>
         <el-table-column label="样本类型" prop="SampleTypeName" align="center"></el-table-column>
         <el-table-column label="样本来源" prop="SourceName" align="center"></el-table-column>
-        <el-table-column label="组织器官" prop="SamplingOrganName" align="center"></el-table-column>
-        <el-table-column label="取材部位" prop="SamplingSiteName" align="center"></el-table-column>
         <el-table-column label=" 可用容量" prop="Capacity" align="center">
           <template slot-scope="scope">
             {{ scope.row.Capacity }} {{ scope.row.Unit }}
@@ -149,16 +147,6 @@
             name: '可用容量',
             show: true,
             kuoz: false
-          }, {
-            filed: 'SamplingOrganName',
-            name: '组织器官',
-            show: true,
-            kuoz: false
-          }, {
-            filed: 'SamplingSiteName',
-            name: '取材部位',
-            show: true,
-            kuoz: false
           }, {
             filed: 'InnerCode',
             name: '样本内码',
@@ -210,7 +198,7 @@
           _size: this.size
         }
         // request
-        this.$axios.get('reports/samplesdetaillist?SampleTypeId=' + this.SampleTypeId, {
+        this.$axios.get('reports/animaldetaillist?SampleTypeId=' + this.SampleTypeId, {
             params
           })
           .then(res => {

+ 1 - 4
src/dashoo.cn/frontend_animal/src/pages/report/samples/samplesstored.vue

@@ -42,8 +42,6 @@
         <el-table-column label="名称" prop="Name" align="center"></el-table-column>
         <el-table-column label="样本类型" prop="SampleTypeName" align="center"></el-table-column>
         <el-table-column label="样本来源" align="center" prop="SourceName"></el-table-column>
-        <el-table-column label="组织器官" prop="SamplingOrganName" align="center"></el-table-column>
-        <el-table-column label="取材部位" prop="SamplingSiteName" align="center"></el-table-column>
         <el-table-column label="可用容量" prop="Capacity" align="center">
           <template slot-scope="scope">
             {{ scope.row.Capacity }} {{ scope.row.Unit }}
@@ -97,7 +95,6 @@
       }
     },
     created() {
-      // initial data
       this.initData()
     },
     methods: {
@@ -135,7 +132,7 @@
           CreateDate.push(_this.formatDateTime(_this.CreateDate[1]))
         }
         // request
-        this.$axios.get('reports/samplestoredlist?CreateDate=' + CreateDate, {
+        this.$axios.get('reports/animalstoredlist?CreateDate=' + CreateDate, {
             params
           })
           .then(res => {

+ 1 - 15
src/dashoo.cn/frontend_animal/src/pages/report/samples/samplesstoredbydate.vue

@@ -36,8 +36,6 @@
         <el-table-column label="名称" prop="Name" align="center"></el-table-column>
         <el-table-column label="样本类型" prop="SampleTypeName" align="center"></el-table-column>
         <el-table-column label="样本来源" align="center" prop="SourceName"></el-table-column>
-        <el-table-column label="组织器官" prop="SamplingOrganName" align="center"></el-table-column>
-        <el-table-column label="取材部位" prop="SamplingSiteName" align="center"></el-table-column>
         <el-table-column label="可用容量" prop="Capacity" align="center">
           <template slot-scope="scope">
             {{ scope.row.Capacity }} {{ scope.row.Unit }}
@@ -177,16 +175,6 @@
             name: '可用容量',
             show: true,
             kuoz: false
-          }, {
-            filed: 'SamplingOrganName',
-            name: '组织器官',
-            show: true,
-            kuoz: false
-          }, {
-            filed: 'SamplingSiteName',
-            name: '取材部位',
-            show: true,
-            kuoz: false
           }, {
             filed: 'InnerCode',
             name: '样本内码',
@@ -259,7 +247,7 @@
           CreateDate.push(_this.formatDateTime(_this.CreateDate[1]))
         }
         params = Object.assign(params, this.searchform)
-        this.$axios.get('reports/samplestoredlist?CreateDate=' + CreateDate, {
+        this.$axios.get('reports/animalstoredlist?CreateDate=' + CreateDate, {
             params
           })
           .then(res => {
@@ -268,14 +256,12 @@
             this.dialogTableVisible = false
           })
           .catch(err => {
-            // handle error
             console.error(err)
           })
       },
       getequipment() {
         this.$axios.get('/equipment/elist', {})
           .then(res => {
-            // response
             for (var i = 0; i < res.data.items.length / 2; i++) {
               this.equipmentlist.push({
                 label: res.data.items[2 * i],

+ 1 - 13
src/dashoo.cn/frontend_animal/src/pages/report/samples/samplesstoredbyequipment.vue

@@ -36,8 +36,6 @@
         <el-table-column label="名称" prop="Name" align="center"></el-table-column>
         <el-table-column label="样本类型" prop="SampleTypeName" align="center"></el-table-column>
         <el-table-column label="样本来源" align="center" prop="SourceName"></el-table-column>
-        <el-table-column label="组织器官" prop="SamplingOrganName" align="center"></el-table-column>
-        <el-table-column label="取材部位" prop="SamplingSiteName" align="center"></el-table-column>
         <el-table-column label="可用容量" prop="Capacity" align="center">
           <template slot-scope="scope">
             {{ scope.row.Capacity }} {{ scope.row.Unit }}
@@ -177,16 +175,6 @@
             name: '可用容量',
             show: true,
             kuoz: false
-          }, {
-            filed: 'SamplingOrganName',
-            name: '组织器官',
-            show: true,
-            kuoz: false
-          }, {
-            filed: 'SamplingSiteName',
-            name: '取材部位',
-            show: true,
-            kuoz: false
           }, {
             filed: 'InnerCode',
             name: '样本内码',
@@ -261,7 +249,7 @@
         }
         params = Object.assign(params, this.searchform)
         // request
-        this.$axios.get('reports/samplestoredlist?CreateDate=' + CreateDate, {
+        this.$axios.get('reports/animalstoredlist?CreateDate=' + CreateDate, {
             params
           })
           .then(res => {

+ 1 - 13
src/dashoo.cn/frontend_animal/src/pages/report/samples/samplesstoredbysampletype.vue

@@ -36,8 +36,6 @@
         <el-table-column label="名称" prop="Name" align="center"></el-table-column>
         <el-table-column label="样本类型" prop="SampleTypeName" align="center"></el-table-column>
         <el-table-column label="样本来源" align="center" prop="SourceName"></el-table-column>
-        <el-table-column label="组织器官" prop="SamplingOrganName" align="center"></el-table-column>
-        <el-table-column label="取材部位" prop="SamplingSiteName" align="center"></el-table-column>
         <el-table-column label="可用容量" prop="Capacity" align="center">
           <template slot-scope="scope">
             {{ scope.row.Capacity }} {{ scope.row.Unit }}
@@ -177,16 +175,6 @@
             name: '可用容量',
             show: true,
             kuoz: false
-          }, {
-            filed: 'SamplingOrganName',
-            name: '组织器官',
-            show: true,
-            kuoz: false
-          }, {
-            filed: 'SamplingSiteName',
-            name: '取材部位',
-            show: true,
-            kuoz: false
           }, {
             filed: 'InnerCode',
             name: '样本内码',
@@ -300,7 +288,7 @@
         }
         params = Object.assign(params, this.searchform)
         // request
-        this.$axios.get('reports/samplestoredlist?CreateDate=' + CreateDate, {
+        this.$axios.get('reports/animalstoredlist?CreateDate=' + CreateDate, {
             params
           })
           .then(res => {

+ 2 - 1
src/dashoo.cn/frontend_animal/src/pages/samples/prerecorded/_opera/unhumanadd.vue

@@ -896,8 +896,9 @@
         this.TimeCode = this.jstimehandle(val.SurveyDate)
         this.getGroupCode()
       },
-      getGroupCode() {
+       getGroupCode() {
         let _this = this;
+        _this.groupcodeListv = []
         let params = {
           SourceId: this.sampleform.SourceId
         }

+ 2 - 15
src/dashoo.cn/frontend_animal/src/pages/samples/stored/_opera/detailed.vue

@@ -70,12 +70,12 @@
             <el-col :span="6">
               <label>初始容量 :{{ sampleinfodetail.InitCapacity }} {{ sampleinfodetail.Unit }}</label>
             </el-col>
-            <el-col :span="6" v-if="acc !='sBBo4' && acc !='ssqOy' && acc != 'saB4v'">
+            <!-- <el-col :span="6" v-if="acc !='sBBo4' && acc !='ssqOy' && acc != 'saB4v'">
               <label>组织器官 : {{ sampleinfodetail.SamplingOrganName }}</label>
             </el-col>
             <el-col :span="6" v-if="acc !='sBBo4' && acc !='ssqOy' && acc != 'saB4v'">
               <label>取材部位 :{{ sampleinfodetail.SamplingSiteName }}</label>
-            </el-col>
+            </el-col> -->
           </el-row>
           <el-row>
             <el-col :span="6">
@@ -477,19 +477,6 @@
             _this.achmentlist = res.data
           }).catch(() => {})
       },
-      // getpublicextends(val) {
-      //   this.$axios.get('/sampleinput/getpublicsampletypedata', {})
-      //     .then(res => {
-      //       this.publicsampletypes = res.data.items
-      //       // 定义window变量,eval使用需要
-      //       let foo = window
-      //       foo.editv = val
-      //       // 给扩展信息赋值
-      //       for (let i = 0; i < this.publicsampletypes.length; i++) {
-      //         this.publicsampletypes[i].FieldDefault = foo.eval('editv.' + this.publicsampletypes[i].FieldName)
-      //       }
-      //     }).catch(() => {})
-      // },
       getusedrecord() {
         let params = {
           _currentPage: this.currentPage,

+ 2 - 2
src/dashoo.cn/frontend_web/nuxt.config.js

@@ -175,8 +175,8 @@ module.exports = {
   env: {
     appclient: 'biobank', //因顿LIMS:lims,样本库:biobank,细胞制备:cellbank,样本搜索判断,登录跳转判断
 
-    //imgserverhost: 'http://localhost:9081', // BioBank服务地址,图片上传文件
-    imgserverhost: 'http://47.92.238.200:9081', // BioBank服务地址,图片上传文件
+    imgserverhost: 'http://localhost:9081', // BioBank服务地址,图片上传文件
+    //imgserverhost: 'http://47.92.238.200:9081', // BioBank服务地址,图片上传文件
     upfilehost: 'http://weed1.labsop.cn:9333/dir/assign', // 附件上传
 
     //imgserverhost: 'http://188.188.30.89:9081', // 临沂服务地址,图片上传文件

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

@@ -244,7 +244,7 @@
                     <label><strong>样本内码 :</strong> {{ sampleForm.InnerCode }} </label>
                   </el-col>
                   <el-col :span="12">
-                    <label><strong>样本码 :</strong> {{ sampleForm.SampleCode }} </label>
+                    <label><strong>样本码 :</strong> {{ sampleForm.SampleCode }} </label>
                   </el-col>
                   <el-col :span="12">
                     <label><strong>可用容量 :</strong> {{ sampleForm.Capacitystr }} {{ sampleForm.Unit }} </label>

+ 12 - 3
src/dashoo.cn/frontend_web/src/pages/equipment/_opera/operation.vue

@@ -36,7 +36,8 @@
               <el-input v-model="formmodel.Code"></el-input>
             </el-form-item>
             <el-form-item label="品牌" required>
-              <el-select :disabled="!isadd && (formmodel.DItem === 19 || formmodel.DItem === 20 || formmodel.DItem === 21)"
+              <el-select
+                :disabled="!isadd && (formmodel.DItem === 19 || formmodel.DItem === 20 || formmodel.DItem === 21)"
                 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>
@@ -49,7 +50,8 @@
               <el-input v-model="formmodel.Name"></el-input>
             </el-form-item>
             <el-form-item label="型号" required>
-              <el-select :disabled="!isadd && (formmodel.DItem === 19 || formmodel.DItem === 20 || formmodel.DItem === 21)"
+              <el-select
+                :disabled="!isadd && (formmodel.DItem === 19 || formmodel.DItem === 20 || formmodel.DItem === 21)"
                 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>
@@ -371,6 +373,12 @@
                     _this.haveshelf = true
                     _this.showdchdcj = false
                     break
+                  case 21:
+                    _this.formmodel.RowNum = '6'
+                    _this.formmodel.ColumnNum = '9'
+                    _this.haveshelf = true
+                    _this.showdchdcj = false
+                    break
                   default:
                     _this.formmodel.RowNum = '1'
                     _this.formmodel.ColumnNum = '1'
@@ -525,7 +533,8 @@
                 })
             } else {
               // 不能修改为特殊型号
-              if ((_this.editdataitem !== 19 && _this.editdataitem !== 20 && _this.editdataitem !== 21) && (_this.formmodel.DItem === 19 ||
+              if ((_this.editdataitem !== 19 && _this.editdataitem !== 20 && _this.editdataitem !== 21) && (_this
+                  .formmodel.DItem === 19 ||
                   _this.formmodel.DItem === 20 || _this.formmodel.DItem === 21)) {
                 this.$message({
                   type: 'warning',

+ 36 - 21
src/dashoo.cn/frontend_web/src/pages/report/samples/samplesarchived.vue

@@ -31,8 +31,6 @@
         <el-table-column label="名称" prop="Name" align="center"></el-table-column>
         <el-table-column label="样本类型" prop="SampleTypeName" align="center"></el-table-column>
         <el-table-column label="样本来源" prop="SampleCode" align="center"></el-table-column>
-        <el-table-column label="组织器官" prop="SamplingOrganName" align="center"></el-table-column>
-        <el-table-column label="取材部位" prop="SamplingSiteName" align="center"></el-table-column>
         <el-table-column label=" 可用容量" prop="Capacity" align="center">
           <template slot-scope="scope">
             {{ scope.row.Capacity }}{{ scope.row.Unit }}
@@ -62,17 +60,25 @@
         </el-table-column>
       </el-table>
       <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="currentPage"
-        :page-sizes="[10, 15, 20]" :page-size="size" layout="total, sizes, prev, pager, next, jumper" :total="currentItemCount">
+        :page-sizes="[10, 15, 20]" :page-size="size" layout="total, sizes, prev, pager, next, jumper"
+        :total="currentItemCount">
       </el-pagination>
     </el-card>
   </div>
 </template>
 
 <script>
+  import {
+    mapGetters
+  } from 'vuex'
   export default {
     name: 'samplereport',
+    computed: mapGetters({
+      authUser: 'authUser'
+    }),
     data() {
       return {
+        acc: '',
         dialogTableVisible: true,
         currentPage: 1, // 当前页
         size: 10, // 每页显示数量
@@ -116,16 +122,6 @@
             name: '可用容量',
             show: true,
             kuoz: false
-          }, {
-            filed: 'SamplingOrganName',
-            name: '组织器官',
-            show: true,
-            kuoz: false
-          }, {
-            filed: 'SamplingSiteName',
-            name: '取材部位',
-            show: true,
-            kuoz: false
           }, {
             filed: 'InnerCode',
             name: '样本内码',
@@ -169,10 +165,17 @@
     },
     created() {
       // initial data
-      this.initData()
+      this.searchlist()
       this.getsampsource()
     },
     methods: {
+      searchlist() {
+        if (this.acc == 'saB4v') {
+          this.AninitData()
+        } else {
+          this.initData()
+        }
+      },
       getsampsource() {
         let _this = this
         _this.$axios.get('samplessource/samplessourcelist')
@@ -267,7 +270,6 @@
             window.location = 'http://' + res.data
           })
           .catch(err => {
-            // handle error
             console.error(err)
           })
       },
@@ -277,17 +279,30 @@
           _currentPage: this.currentPage,
           _size: this.size
         }
-        // request
         this.$axios.get('reports/samplesdetaillist', {
             params
           })
           .then(res => {
             this.list = res.data.items
             this.currentItemCount = res.data.currentItemCount
-            // this.dialogTableVisible = false
           })
           .catch(err => {
-            // handle error
+            console.error(err)
+          })
+      },
+      AninitData() {
+        let params = {
+          _currentPage: this.currentPage,
+          _size: this.size
+        }
+        this.$axios.get('reports/animaldetaillist', {
+            params
+          })
+          .then(res => {
+            this.list = res.data.items
+            this.currentItemCount = res.data.currentItemCount
+          })
+          .catch(err => {
             console.error(err)
           })
       },
@@ -312,11 +327,11 @@
       handleSizeChange(value) {
         this.size = value
         this.currentPage = 1
-        this.initData()
+        this.searchlist()
       },
       handleCurrentChange(value) {
         this.currentPage = value
-        this.initData()
+        this.searchlist()
       },
       jstimehandle(val) {
         if (val === '') {
@@ -347,7 +362,7 @@
       },
       clearSearch() {
         this.searchform.name = ''
-        this.initData()
+        this.searchlist()
       }
     }
   }

+ 58 - 23
src/dashoo.cn/frontend_web/src/pages/report/samples/samplesbycreatedate.vue

@@ -10,7 +10,8 @@
           <el-breadcrumb-item>样本统计</el-breadcrumb-item>
         </el-breadcrumb>
         <span style="float: right;">
-          <el-dropdown split-button type="primary" size="mini" style="margin-left:10px; margin-top: -4px;" @command="handleExportsamplesCommand">
+          <el-dropdown split-button type="primary" size="mini" style="margin-left:10px; margin-top: -4px;"
+            @command="handleExportsamplesCommand">
             导出
             <el-dropdown-menu slot="dropdown">
               <el-dropdown-item style="color:black;" command="exportchosen">导出所选样本</el-dropdown-item>
@@ -26,7 +27,7 @@
           </el-form-item>
 
           <el-form-item>
-            <el-dropdown split-button type="primary" size="mini" @click="initData()" @command="searchCommand">
+            <el-dropdown split-button type="primary" size="mini" @click="searchlist()" @command="searchCommand">
               查询
               <el-dropdown-menu slot="dropdown">
                 <el-dropdown-item command="clear">查询重置</el-dropdown-item>
@@ -45,8 +46,6 @@
         <el-table-column label="名称" prop="Name" align="center"></el-table-column>
         <el-table-column label="样本类型" prop="SampleTypeName" align="center"></el-table-column>
         <el-table-column label="样本来源" align="center" prop="SourceName"></el-table-column>
-        <el-table-column label="组织器官" prop="SamplingOrganName" align="center"></el-table-column>
-        <el-table-column label="取材部位" prop="SamplingSiteName" align="center"></el-table-column>
         <el-table-column label=" 可用容量" prop="Capacity" align="center"></el-table-column>
         <el-table-column label="有效日期" prop="Validity" align="center" show-overflow-tooltip>
           <template slot-scope="scope">
@@ -72,22 +71,23 @@
         </el-table-column>
       </el-table>
       <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="currentPage"
-        :page-sizes="[10, 15, 20]" :page-size="size" layout="total, sizes, prev, pager, next, jumper" :total="currentItemCount">
+        :page-sizes="[10, 15, 20]" :page-size="size" layout="total, sizes, prev, pager, next, jumper"
+        :total="currentItemCount">
       </el-pagination>
     </el-card>
-    
+
     <el-dialog title="创建时间" :visible.sync="dialogTableVisible" width="30%">
       <el-form>
         <el-row>
           <el-col :span="24">
             <el-form-item label-width="80px" label="创建日期">
-              <el-date-picker v-model="CreateDate" type="daterange" unlink-panels range-separator="至" start-placeholder="开始日期"
-                end-placeholder="结束日期" style="width:100%"></el-date-picker>
+              <el-date-picker v-model="CreateDate" type="daterange" unlink-panels range-separator="至"
+                start-placeholder="开始日期" end-placeholder="结束日期" style="width:100%"></el-date-picker>
             </el-form-item>
           </el-col>
           <span style="float: right;margin-top:-10px;">
             <el-button size="small" @click="dialogTableVisible = false">取 消</el-button>
-            <el-button type="primary" size="small" @click="initData()">确 定</el-button>
+            <el-button type="primary" size="small" @click="searchlist()">确 定</el-button>
           </span>
         </el-row>
       </el-form>
@@ -96,10 +96,17 @@
 </template>
 
 <script>
+  import {
+    mapGetters
+  } from 'vuex'
   export default {
     name: 'samplereport',
+    computed: mapGetters({
+      authUser: 'authUser'
+    }),
     data() {
       return {
+        acc: '',
         dialogTableVisible: true,
         currentPage: 1, // 当前页
         size: 10, // 每页显示数量
@@ -142,16 +149,6 @@
             name: '可用容量',
             show: true,
             kuoz: false
-          }, {
-            filed: 'SamplingOrganName',
-            name: '组织器官',
-            show: true,
-            kuoz: false
-          }, {
-            filed: 'SamplingSiteName',
-            name: '取材部位',
-            show: true,
-            kuoz: false
           }, {
             filed: 'InnerCode',
             name: '样本内码',
@@ -194,8 +191,16 @@
       }
     },
     created() {
+      this.acc = this.authUser.Profile.AccCode
     },
     methods: {
+      searchlist() {
+        if (this.acc == 'saB4v') {
+          this.AninitData()
+        } else {
+          this.initData()
+        }
+      },
       initData() {
         let _this = this
         let CreateDate = []
@@ -214,7 +219,6 @@
           CreateDate.push(_this.formatDateTime(_this.CreateDate[0]))
           CreateDate.push(_this.formatDateTime(_this.CreateDate[1]))
         }
-        // request
         this.$axios.get('reports/samplesdetaillist?CreateDate=' + CreateDate, {
             params
           })
@@ -228,6 +232,37 @@
             console.error(err)
           })
       },
+      //animal
+      AninitData() {
+        let _this = this
+        let CreateDate = []
+        let params = {
+          _currentPage: this.currentPage,
+          _size: this.size
+        }
+        // 解析时间
+        if (_this.CreateDate && _this.CreateDate.length === 2) {
+          _this.CreateDate[0].setHours(23)
+          _this.CreateDate[0].setMinutes(59)
+          _this.CreateDate[0].setSeconds(59)
+          _this.CreateDate[1].setHours(23)
+          _this.CreateDate[1].setMinutes(59)
+          _this.CreateDate[1].setSeconds(59)
+          CreateDate.push(_this.formatDateTime(_this.CreateDate[0]))
+          CreateDate.push(_this.formatDateTime(_this.CreateDate[1]))
+        }
+        this.$axios.get('reports/animaldetaillist?CreateDate=' + CreateDate, {
+            params
+          })
+          .then(res => {
+            this.list = res.data.items
+            this.currentItemCount = res.data.currentItemCount
+            this.dialogTableVisible = false
+          })
+          .catch(err => {
+            console.error(err)
+          })
+      },
       // 导出样本
       handleExportsamplesCommand(command) {
         if (command === 'exportchosen') { // 导出所选数据
@@ -347,14 +382,14 @@
       handleSizeChange(value) {
         this.size = value
         this.currentPage = 1
-        this.initData()
+        this.searchlist()
       },
       handleSelectionChange(val) {
         this.multipleSelection = val
       },
       handleCurrentChange(value) {
         this.currentPage = value
-        this.initData()
+        this.searchlist()
       },
       jstimehandle(val) {
         if (val === '') {
@@ -390,7 +425,7 @@
       },
       clearSearch() {
         this.CreateDate = []
-        this.initData()
+        this.searchlist()
       }
     }
   }

+ 42 - 21
src/dashoo.cn/frontend_web/src/pages/report/samples/samplesbygroup.vue

@@ -10,7 +10,8 @@
           <el-breadcrumb-item>样本统计</el-breadcrumb-item>
         </el-breadcrumb>
         <span style="float: right;">
-          <el-dropdown split-button type="primary" size="mini" style="margin-left:10px; margin-top: -4px;" @command="handleExportsamplesCommand">
+          <el-dropdown split-button type="primary" size="mini" style="margin-left:10px; margin-top: -4px;"
+            @command="handleExportsamplesCommand">
             导出
             <el-dropdown-menu slot="dropdown">
               <el-dropdown-item style="color:black;" command="exportchosen">导出所选样本</el-dropdown-item>
@@ -27,7 +28,7 @@
           </el-form-item>
 
           <el-form-item>
-            <el-dropdown split-button type="primary" size="mini" @click="initData()" @command="searchCommand">
+            <el-dropdown split-button type="primary" size="mini" @click="searchlist()" @command="searchCommand">
               查询
               <el-dropdown-menu slot="dropdown">
                 <el-dropdown-item command="clear">查询重置</el-dropdown-item>
@@ -46,14 +47,12 @@
         <el-table-column label="名称" prop="Name" align="center"></el-table-column>
         <el-table-column label="样本类型" prop="SampleTypeName" align="center"></el-table-column>
         <el-table-column label="样本来源" prop="SourceName" align="center"></el-table-column>
-        <el-table-column label="组织器官" prop="SamplingOrganName" align="center"></el-table-column>
-        <el-table-column label="取材部位" prop="SamplingSiteName" align="center"></el-table-column>
         <el-table-column label="可用容量" prop="Capacity" align="center">
           <template slot-scope="scope">
             {{ scope.row.Capacity }} {{ scope.row.Unit }}
           </template>
         </el-table-column>
-         <el-table-column label="接收日期" prop="ReceiveDate" align="center" show-overflow-tooltip>
+        <el-table-column label="接收日期" prop="ReceiveDate" align="center" show-overflow-tooltip>
           <template slot-scope="scope">
             {{ jstimehandle(scope.row.ReceiveDate+'') }}
           </template>
@@ -62,7 +61,7 @@
           <template slot-scope="scope">
             {{ jstimehandle(scope.row.ValidityDate+'') }}
           </template>
-        </el-table-column>     
+        </el-table-column>
         <el-table-column label=" 录入人" prop="CreateBy" align="center"></el-table-column>
         <el-table-column label=" 存储位置" prop="Location" align="center">
           <template slot-scope="scope">
@@ -77,7 +76,8 @@
         </el-table-column>
       </el-table>
       <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="currentPage"
-        :page-sizes="[10, 15, 20]" :page-size="size" layout="total, sizes, prev, pager, next, jumper" :total="currentItemCount">
+        :page-sizes="[10, 15, 20]" :page-size="size" layout="total, sizes, prev, pager, next, jumper"
+        :total="currentItemCount">
       </el-pagination>
     </el-card>
     <el-dialog title="所属分组" :visible.sync="dialogTableVisible" width="30%">
@@ -92,7 +92,7 @@
           </el-col>
           <span style="float: right;margin-top:-10px;">
             <el-button size="small" @click="dialogTableVisible = false">取 消</el-button>
-            <el-button type="primary" size="small" @click="initData()">确 定</el-button>
+            <el-button type="primary" size="small" @click="searchlist()">确 定</el-button>
           </span>
         </el-row>
       </el-form>
@@ -101,10 +101,17 @@
 </template>
 
 <script>
+  import {
+    mapGetters
+  } from 'vuex'
   export default {
     name: 'samplereport',
+    computed: mapGetters({
+      authUser: 'authUser'
+    }),
     data() {
       return {
+        acc: '',
         dialogTableVisible: true,
         currentPage: 1, // 当前页
         size: 10, // 每页显示数量
@@ -148,16 +155,6 @@
             name: '可用容量',
             show: true,
             kuoz: false
-          }, {
-            filed: 'SamplingOrganName',
-            name: '组织器官',
-            show: true,
-            kuoz: false
-          }, {
-            filed: 'SamplingSiteName',
-            name: '取材部位',
-            show: true,
-            kuoz: false
           }, {
             filed: 'InnerCode',
             name: '样本内码',
@@ -200,15 +197,22 @@
       }
     },
     created() {
+      this.acc = this.authUser.Profile.AccCode
       this.getGrouplist()
     },
     methods: {
+      searchlist() {
+        if (this.acc == 'saB4v') {
+          this.AninitData()
+        } else {
+          this.initData()
+        }
+      },
       initData() {
         let params = {
           _currentPage: this.currentPage,
           _size: this.size
         }
-        // request
         console.log(this.SourceId)
         this.$axios.get('reports/samplesdetaillist?GroupId=' + this.GroupId, {
             params
@@ -222,6 +226,23 @@
             console.error(err)
           })
       },
+      AninitData() {
+        let params = {
+          _currentPage: this.currentPage,
+          _size: this.size
+        }
+        this.$axios.get('reports/animaldetaillist?GroupId=' + this.GroupId, {
+            params
+          })
+          .then(res => {
+            this.list = res.data.items
+            this.currentItemCount = res.data.currentItemCount
+            this.dialogTableVisible = false
+          })
+          .catch(err => {
+            console.error(err)
+          })
+      },
       getGrouplist() {
         this.$axios.get('samplesgroup/grouplist')
           .then(res => {
@@ -342,11 +363,11 @@
       handleSizeChange(value) {
         this.size = value
         this.currentPage = 1
-        this.initData()
+        this.searchlist()
       },
       handleCurrentChange(value) {
         this.currentPage = value
-        this.initData()
+        this.searchlist()
       },
       jstimehandle(val) {
         if (val === '') {

+ 64 - 23
src/dashoo.cn/frontend_web/src/pages/report/samples/samplesbysource.vue

@@ -10,7 +10,8 @@
           <el-breadcrumb-item>样本统计</el-breadcrumb-item>
         </el-breadcrumb>
         <span style="float: right;">
-          <el-dropdown split-button type="primary" size="mini" style="margin-left:10px; margin-top: -4px;" @command="handleExportsamplesCommand">
+          <el-dropdown split-button type="primary" size="mini" style="margin-left:10px; margin-top: -4px;"
+            @command="handleExportsamplesCommand">
             导出
             <el-dropdown-menu slot="dropdown">
               <el-dropdown-item style="color:black;" command="exportchosen">导出所选样本</el-dropdown-item>
@@ -27,7 +28,7 @@
           </el-form-item>
 
           <el-form-item>
-            <el-dropdown split-button type="primary" size="mini" @click="initData()" @command="searchCommand">
+            <el-dropdown split-button type="primary" size="mini" @click="searchlist()" @command="searchCommand">
               查询
               <el-dropdown-menu slot="dropdown">
                 <el-dropdown-item command="clear">查询重置</el-dropdown-item>
@@ -46,8 +47,8 @@
         <el-table-column label="名称" prop="Name" align="center"></el-table-column>
         <el-table-column label="样本类型" prop="SampleTypeName" align="center"></el-table-column>
         <el-table-column label="样本来源" prop="SourceName" align="center"></el-table-column>
-        <el-table-column label="组织器官" prop="SamplingOrganName" align="center"></el-table-column>
-        <el-table-column label="取材部位" prop="SamplingSiteName" align="center"></el-table-column>
+        <!-- <el-table-column label="组织器官" prop="SamplingOrganName" align="center"></el-table-column>
+        <el-table-column label="取材部位" prop="SamplingSiteName" align="center"></el-table-column> -->
         <el-table-column label=" 可用容量" prop="Capacity" align="center">
           <template slot-scope="scope">
             {{ scope.row.Capacity }} {{ scope.row.Unit }}
@@ -77,22 +78,30 @@
         </el-table-column>
       </el-table>
       <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="currentPage"
-        :page-sizes="[10, 15, 20]" :page-size="size" layout="total, sizes, prev, pager, next, jumper" :total="currentItemCount">
+        :page-sizes="[10, 15, 20]" :page-size="size" layout="total, sizes, prev, pager, next, jumper"
+        :total="currentItemCount">
       </el-pagination>
     </el-card>
     <el-dialog title="样本来源" :visible.sync="dialogTableVisible" width="30%">
       <el-form>
         <el-row>
-          <el-col :span="24">
+          <el-col :span="24" v-if="acc != 'saB4v'">
             <el-form-item label="样本来源" label-width="80px">
               <el-select v-model="SourceId" clearable placeholder="请选择" style="width:100%">
                 <el-option v-for="item in sampsources" :label="item.Name" :value="item.Id" :key="item.Id"></el-option>
               </el-select>
             </el-form-item>
           </el-col>
+          <el-col :span="24" v-if="acc == 'saB4v'">
+            <el-form-item label="样本来源" label-width="80px">
+              <el-select v-model="SourceId" clearable placeholder="请选择" style="width:100%">
+                <el-option v-for="item in animalsources" :label="item.Name" :value="item.Id" :key="item.Id"></el-option>
+              </el-select>
+            </el-form-item>
+          </el-col>
           <span style="float: right;margin-top:-10px;">
             <el-button size="small" @click="dialogTableVisible = false">取 消</el-button>
-            <el-button type="primary" size="small" @click="initData()">确 定</el-button>
+            <el-button type="primary" size="small" @click="searchlist()">确 定</el-button>
           </span>
         </el-row>
       </el-form>
@@ -101,10 +110,17 @@
 </template>
 
 <script>
+  import {
+    mapGetters
+  } from 'vuex'
   export default {
     name: 'samplereport',
+    computed: mapGetters({
+      authUser: 'authUser'
+    }),
     data() {
       return {
+        acc: '',
         dialogTableVisible: true,
         currentPage: 1, // 当前页
         size: 10, // 每页显示数量
@@ -116,6 +132,7 @@
         },
         list: [],
         sampsources: [],
+        animalsources: [],
         showcolumnselecd: [], // 选中的显示列
         multipleSelection: [], // 多选框
         showcolumn: [{
@@ -148,16 +165,6 @@
             name: '可用容量',
             show: true,
             kuoz: false
-          }, {
-            filed: 'SamplingOrganName',
-            name: '组织器官',
-            show: true,
-            kuoz: false
-          }, {
-            filed: 'SamplingSiteName',
-            name: '取材部位',
-            show: true,
-            kuoz: false
           }, {
             filed: 'InnerCode',
             name: '样本内码',
@@ -200,15 +207,23 @@
       }
     },
     created() {
+      this.acc = this.authUser.Profile.AccCode
       this.getsampsource()
+      this.getanimalsource()
     },
     methods: {
+      searchlist() {
+        if (this.acc == 'saB4v') {
+          this.AninitData()
+        } else {
+          this.initData()
+        }
+      },
       initData() {
         let params = {
           _currentPage: this.currentPage,
           _size: this.size
         }
-        // request
         this.$axios.get('reports/samplesdetaillist?SourceId=' + this.SourceId, {
             params
           })
@@ -218,7 +233,6 @@
             this.dialogTableVisible = false
           })
           .catch(err => {
-            // handle error
             console.error(err)
           })
       },
@@ -229,10 +243,38 @@
             _this.sampsources = res.data.items
           })
           .catch(err => {
-            // handle error
             console.error(err)
           })
       },
+      //animal
+      AninitData() {
+        let params = {
+          _currentPage: this.currentPage,
+          _size: this.size
+        }
+        this.$axios.get('reports/animaldetaillist?SourceId=' + this.SourceId, {
+            params
+          })
+          .then(res => {
+            this.list = res.data.items
+            this.currentItemCount = res.data.currentItemCount
+            this.dialogTableVisible = false
+          })
+          .catch(err => {
+            console.error(err)
+          })
+      },
+      getanimalsource() {
+        let _this = this
+        _this.$axios.get('samplessource/animallist')
+          .then(res => {
+            _this.animalsources = res.data.items
+          })
+          .catch(err => {
+            console.error(err)
+          })
+      },
+
       // 导出样本
       handleExportsamplesCommand(command) {
         if (command === 'exportchosen') { // 导出所选数据
@@ -317,7 +359,6 @@
             window.location = 'http://' + res.data
           })
           .catch(err => {
-            // handle error
             console.error(err)
           })
       },
@@ -342,11 +383,11 @@
       handleSizeChange(value) {
         this.size = value
         this.currentPage = 1
-        this.initData()
+        this.searchlist()
       },
       handleCurrentChange(value) {
         this.currentPage = value
-        this.initData()
+        this.searchlist()
       },
       jstimehandle(val) {
         if (val === '') {

+ 44 - 22
src/dashoo.cn/frontend_web/src/pages/report/samples/samplesbytype.vue

@@ -10,7 +10,8 @@
           <el-breadcrumb-item>样本统计</el-breadcrumb-item>
         </el-breadcrumb>
         <span style="float: right;">
-          <el-dropdown split-button type="primary" size="mini" style="margin-left:10px; margin-top: -4px;" @command="handleExportsamplesCommand">
+          <el-dropdown split-button type="primary" size="mini" style="margin-left:10px; margin-top: -4px;"
+            @command="handleExportsamplesCommand">
             导出
             <el-dropdown-menu slot="dropdown">
               <el-dropdown-item style="color:black;" command="exportchosen">导出所选样本</el-dropdown-item>
@@ -27,7 +28,7 @@
           </el-form-item>
 
           <el-form-item>
-            <el-dropdown split-button type="primary" size="mini" @click="initData()" @command="searchCommand">
+            <el-dropdown split-button type="primary" size="mini" @click="searchlist()" @command="searchCommand">
               查询
               <el-dropdown-menu slot="dropdown">
                 <el-dropdown-item command="clear">查询重置</el-dropdown-item>
@@ -46,8 +47,6 @@
         <el-table-column label="名称" prop="Name" align="center"></el-table-column>
         <el-table-column label="样本类型" prop="SampleTypeName" align="center"></el-table-column>
         <el-table-column label="样本来源" prop="SourceName" align="center"></el-table-column>
-        <el-table-column label="组织器官" prop="SamplingOrganName" align="center"></el-table-column>
-        <el-table-column label="取材部位" prop="SamplingSiteName" align="center"></el-table-column>
         <el-table-column label=" 可用容量" prop="Capacity" align="center">
           <template slot-scope="scope">
             {{ scope.row.Capacity }} {{ scope.row.Unit }}
@@ -77,7 +76,8 @@
         </el-table-column>
       </el-table>
       <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="currentPage"
-        :page-sizes="[10, 15, 20]" :page-size="size" layout="total, sizes, prev, pager, next, jumper" :total="currentItemCount">
+        :page-sizes="[10, 15, 20]" :page-size="size" layout="total, sizes, prev, pager, next, jumper"
+        :total="currentItemCount">
       </el-pagination>
     </el-card>
     <el-dialog title="样本类型" :visible.sync="dialogTableVisible" width="30%">
@@ -86,13 +86,14 @@
           <el-col :span="24">
             <el-form-item label="样本类型" label-width="80px">
               <el-select v-model="SampleTypeId" clearable placeholder="请选择" style="width:100%">
-                <el-option v-for="item in sampletypelist" :label="item.Name" :value="item.Id" :key="item.Id"></el-option>
+                <el-option v-for="item in sampletypelist" :label="item.Name" :value="item.Id" :key="item.Id">
+                </el-option>
               </el-select>
             </el-form-item>
           </el-col>
           <span style="float: right;margin-top:-10px;">
             <el-button size="small" @click="dialogTableVisible = false">取 消</el-button>
-            <el-button type="primary" size="small" @click="initData()">确 定</el-button>
+            <el-button type="primary" size="small" @click="searchlist()">确 定</el-button>
           </span>
         </el-row>
       </el-form>
@@ -101,10 +102,17 @@
 </template>
 
 <script>
+  import {
+    mapGetters
+  } from 'vuex'
   export default {
     name: 'samplereport',
+    computed: mapGetters({
+      authUser: 'authUser'
+    }),
     data() {
       return {
+        acc: '',
         dialogTableVisible: true,
         currentPage: 1, // 当前页
         size: 10, // 每页显示数量
@@ -149,16 +157,6 @@
             name: '可用容量',
             show: true,
             kuoz: false
-          }, {
-            filed: 'SamplingOrganName',
-            name: '组织器官',
-            show: true,
-            kuoz: false
-          }, {
-            filed: 'SamplingSiteName',
-            name: '取材部位',
-            show: true,
-            kuoz: false
           }, {
             filed: 'InnerCode',
             name: '样本内码',
@@ -201,15 +199,22 @@
       }
     },
     created() {
+      this.acc = this.authUser.Profile.AccCode
       this.getsampletype()
     },
     methods: {
+      searchlist() {
+        if (this.acc == 'saB4v') {
+          this.AninitData()
+        } else {
+          this.initData()
+        }
+      },
       initData() {
         let params = {
           _currentPage: this.currentPage,
           _size: this.size
         }
-        // request
         this.$axios.get('reports/samplesdetaillist?SampleTypeId=' + this.SampleTypeId, {
             params
           })
@@ -219,7 +224,24 @@
             this.dialogTableVisible = false
           })
           .catch(err => {
-            // handle error
+            console.error(err)
+          })
+      },
+      //animal
+      AninitData() {
+        let params = {
+          _currentPage: this.currentPage,
+          _size: this.size
+        }
+        this.$axios.get('reports/animaldetaillist?SampleTypeId=' + this.SampleTypeId, {
+            params
+          })
+          .then(res => {
+            this.list = res.data.items
+            this.currentItemCount = res.data.currentItemCount
+            this.dialogTableVisible = false
+          })
+          .catch(err => {
             console.error(err)
           })
       },
@@ -343,11 +365,11 @@
       handleSizeChange(value) {
         this.size = value
         this.currentPage = 1
-        this.initData()
+        this.searchlist()
       },
       handleCurrentChange(value) {
         this.currentPage = value
-        this.initData()
+        this.searchlist()
       },
       jstimehandle(val) {
         if (val === '') {
@@ -381,7 +403,7 @@
       },
       clearSearch() {
         this.SampleTypeId = '',
-          this.initData()
+          this.searchlist()
       }
     }
   }

+ 58 - 25
src/dashoo.cn/frontend_web/src/pages/report/samples/samplesstoredbydate.vue

@@ -10,7 +10,8 @@
           <el-breadcrumb-item :to="{ path: '/report/samplesstored' }">样本-已存储</el-breadcrumb-item>
         </el-breadcrumb>
         <span style="float: right;">
-          <el-button size="mini" type="primary" style="margin-left:10px; margin-top: -4px;" @click="handleExportsamplesCommand('exportall')">
+          <el-button size="mini" type="primary" style="margin-left:10px; margin-top: -4px;"
+            @click="handleExportsamplesCommand('exportall')">
             导出
           </el-button>
         </span>
@@ -36,8 +37,6 @@
         <el-table-column label="名称" prop="Name" align="center"></el-table-column>
         <el-table-column label="样本类型" prop="SampleTypeName" align="center"></el-table-column>
         <el-table-column label="样本来源" align="center" prop="SourceName"></el-table-column>
-        <el-table-column label="组织器官" prop="SamplingOrganName" align="center"></el-table-column>
-        <el-table-column label="取材部位" prop="SamplingSiteName" align="center"></el-table-column>
         <el-table-column label="可用容量" prop="Capacity" align="center">
           <template slot-scope="scope">
             {{ scope.row.Capacity }} {{ scope.row.Unit }}
@@ -64,7 +63,8 @@
         <!-- <el-table-column label=" 所属分组" prop="GroupName" align="center"></el-table-column> -->
       </el-table>
       <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="currentPage"
-        :page-sizes="[10, 15, 20]" :page-size="size" layout="total, sizes, prev, pager, next, jumper" :total="currentItemCount">
+        :page-sizes="[10, 15, 20]" :page-size="size" layout="total, sizes, prev, pager, next, jumper"
+        :total="currentItemCount">
       </el-pagination>
     </el-card>
 
@@ -73,13 +73,13 @@
         <el-row>
           <el-col :span="24">
             <el-form-item label-width="80px" label="创建日期">
-              <el-date-picker v-model="CreateDate" type="daterange" unlink-panels range-separator="至" start-placeholder="开始日期"
-                end-placeholder="结束日期" style="width:100%"></el-date-picker>
+              <el-date-picker v-model="CreateDate" type="daterange" unlink-panels range-separator="至"
+                start-placeholder="开始日期" end-placeholder="结束日期" style="width:100%"></el-date-picker>
             </el-form-item>
           </el-col>
           <span style="float: right;margin-top:-10px;">
             <el-button size="small" @click="balanceShow = false">取 消</el-button>
-            <el-button type="primary" size="small" @click="initData()">确 定</el-button>
+            <el-button type="primary" size="small" @click="searchlist()">确 定</el-button>
           </span>
         </el-row>
       </el-form>
@@ -127,10 +127,17 @@
 </template>
 
 <script>
+  import {
+    mapGetters
+  } from 'vuex'
   export default {
     name: 'samplereport',
+    computed: mapGetters({
+      authUser: 'authUser'
+    }),
     data() {
       return {
+        acc: '',
         dialogVisible: false,
         dialogTableVisible: true,
         currentItemCount: 0, // 当前页显示数量
@@ -177,16 +184,6 @@
             name: '可用容量',
             show: true,
             kuoz: false
-          }, {
-            filed: 'SamplingOrganName',
-            name: '组织器官',
-            show: true,
-            kuoz: false
-          }, {
-            filed: 'SamplingSiteName',
-            name: '取材部位',
-            show: true,
-            kuoz: false
           }, {
             filed: 'InnerCode',
             name: '样本内码',
@@ -236,10 +233,18 @@
       }
     },
     created() {
+      this.acc = this.authUser.Profile.AccCode
       this.getequipment()
       this.getsampletype()
     },
     methods: {
+      searchlist() {
+        if (this.acc == 'saB4v') {
+          this.AninitData()
+        } else {
+          this.initData()
+        }
+      },
       initData() {
         let _this = this
         let CreateDate = []
@@ -268,7 +273,38 @@
             this.dialogTableVisible = false
           })
           .catch(err => {
-            // handle error
+            console.error(err)
+          })
+      },
+      //animal
+      AninitData() {
+        let _this = this
+        let CreateDate = []
+        let params = {
+          _currentPage: this.currentPage,
+          _size: this.size
+        }
+        // 解析时间
+        if (_this.CreateDate && _this.CreateDate.length === 2) {
+          this.CreateDate[0].setHours(23)
+          this.CreateDate[0].setMinutes(59)
+          this.CreateDate[0].setSeconds(59)
+          this.CreateDate[1].setHours(23)
+          this.CreateDate[1].setMinutes(59)
+          this.CreateDate[1].setSeconds(59)
+          CreateDate.push(_this.formatDateTime(_this.CreateDate[0]))
+          CreateDate.push(_this.formatDateTime(_this.CreateDate[1]))
+        }
+        params = Object.assign(params, this.searchform)
+        this.$axios.get('reports/animaldetaillist?CreateDate=' + CreateDate, {
+            params
+          })
+          .then(res => {
+            this.list = res.data.items
+            this.currentItemCount = res.data.currentItemCount
+            this.dialogTableVisible = false
+          })
+          .catch(err => {
             console.error(err)
           })
       },
@@ -284,18 +320,15 @@
             }
           })
           .catch(err => {
-            // handle error
             console.error(err)
           })
       },
       getsampletype() {
         this.$axios.get('sampletype/list', {})
           .then(res => {
-            // response
             this.sampletypelist = res.data.items
           })
           .catch(err => {
-            // handle error
             console.error(err)
           })
       },
@@ -418,11 +451,11 @@
       handleSizeChange(value) {
         this.size = value
         this.currentPage = 1
-        this.initData()
+        this.searchlist()
       },
       handleCurrentChange(value) {
         this.currentPage = value
-        this.initData()
+        this.searchlist()
       },
       jstimehandle(val) {
         if (val === '') {
@@ -460,14 +493,14 @@
       },
       seachdata() {
         this.currentPage = 1
-        this.initData()
+        this.searchlist()
       },
       clearSearch() {
         this.searchform.Name = ''
         this.searchform.SampleTypeId = ''
         this.searchform.EId = ''
         this.CreateDate = []
-        this.initData()
+        this.searchlist()
       }
     }
   }

+ 58 - 26
src/dashoo.cn/frontend_web/src/pages/report/samples/samplesstoredbyequipment.vue

@@ -10,7 +10,8 @@
           <el-breadcrumb-item :to="{ path: '/report/samplesstored' }">样本-已存储</el-breadcrumb-item>
         </el-breadcrumb>
         <span style="float: right;">
-          <el-button type="primary" size="mini" style="margin-left:10px; margin-top: -4px;" @click="handleExportsamplesCommand('exportall')">
+          <el-button type="primary" size="mini" style="margin-left:10px; margin-top: -4px;"
+            @click="handleExportsamplesCommand('exportall')">
             导出
           </el-button>
         </span>
@@ -36,8 +37,6 @@
         <el-table-column label="名称" prop="Name" align="center"></el-table-column>
         <el-table-column label="样本类型" prop="SampleTypeName" align="center"></el-table-column>
         <el-table-column label="样本来源" align="center" prop="SourceName"></el-table-column>
-        <el-table-column label="组织器官" prop="SamplingOrganName" align="center"></el-table-column>
-        <el-table-column label="取材部位" prop="SamplingSiteName" align="center"></el-table-column>
         <el-table-column label="可用容量" prop="Capacity" align="center">
           <template slot-scope="scope">
             {{ scope.row.Capacity }} {{ scope.row.Unit }}
@@ -64,7 +63,8 @@
         <el-table-column label=" 所属分组" prop="GroupName" align="center"></el-table-column>
       </el-table>
       <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="currentPage"
-        :page-sizes="[10, 15, 20]" :page-size="size" layout="total, sizes, prev, pager, next, jumper" :total="currentItemCount">
+        :page-sizes="[10, 15, 20]" :page-size="size" layout="total, sizes, prev, pager, next, jumper"
+        :total="currentItemCount">
       </el-pagination>
     </el-card>
 
@@ -72,14 +72,15 @@
       <el-form>
         <el-row>
           <el-form-item prop="Equip" label="容器">
-            <el-select ref="selecteequipment" v-model="searchform.EId" filterable placeholder="请选择容器" style="width: 80%">
+            <el-select ref="selecteequipment" v-model="searchform.EId" filterable placeholder="请选择容器"
+              style="width: 80%">
               <el-option v-for="item in equipmentlist" :key="item.value" :label="item.label" :value="item.value">
               </el-option>
             </el-select>
           </el-form-item>
           <span style="float: right;margin-top:-10px;">
             <el-button size="small" @click="dialogTableVisible = false">取 消</el-button>
-            <el-button type="primary" size="small" @click="initData()">确 定</el-button>
+            <el-button type="primary" size="small" @click="searchlist()">确 定</el-button>
           </span>
         </el-row>
       </el-form>
@@ -127,10 +128,17 @@
 </template>
 
 <script>
+  import {
+    mapGetters
+  } from 'vuex'
   export default {
     name: 'samplereport',
+    computed: mapGetters({
+      authUser: 'authUser'
+    }),
     data() {
       return {
+        acc: '',
         dialogVisible: false,
         dialogTableVisible: true,
         currentItemCount: 0, // 当前页显示数量
@@ -177,16 +185,6 @@
             name: '可用容量',
             show: true,
             kuoz: false
-          }, {
-            filed: 'SamplingOrganName',
-            name: '组织器官',
-            show: true,
-            kuoz: false
-          }, {
-            filed: 'SamplingSiteName',
-            name: '取材部位',
-            show: true,
-            kuoz: false
           }, {
             filed: 'InnerCode',
             name: '样本内码',
@@ -237,10 +235,18 @@
       }
     },
     created() {
+      this.acc = this.authUser.Profile.AccCode
       this.getequipment()
       this.getsampletype()
     },
     methods: {
+       searchlist() {
+        if (this.acc == 'saB4v') {
+          this.AninitData()
+        } else {
+          this.initData()
+        }
+      },
       initData() {
         let _this = this
         let CreateDate = []
@@ -260,7 +266,6 @@
           CreateDate.push(_this.formatDateTime(this.CreateDate[1]))
         }
         params = Object.assign(params, this.searchform)
-        // request
         this.$axios.get('reports/samplestoredlist?CreateDate=' + CreateDate, {
             params
           })
@@ -270,14 +275,44 @@
             this.dialogTableVisible = false
           })
           .catch(err => {
-            // handle error
+            console.error(err)
+          })
+      },
+      //animal
+      AninitData() {
+        let _this = this
+        let CreateDate = []
+        let params = {
+          _currentPage: this.currentPage,
+          _size: this.size
+        }
+        // 解析时间
+        if (this.CreateDate.length === 2) {
+          this.CreateDate[0].setHours(23)
+          this.CreateDate[0].setMinutes(59)
+          this.CreateDate[0].setSeconds(59)
+          this.CreateDate[1].setHours(23)
+          this.CreateDate[1].setMinutes(59)
+          this.CreateDate[1].setSeconds(59)
+          CreateDate.push(_this.formatDateTime(this.CreateDate[0]))
+          CreateDate.push(_this.formatDateTime(this.CreateDate[1]))
+        }
+        params = Object.assign(params, this.searchform)
+        this.$axios.get('reports/animaldetaillist?CreateDate=' + CreateDate, {
+            params
+          })
+          .then(res => {
+            this.list = res.data.items
+            this.currentItemCount = res.data.currentItemCount
+            this.dialogTableVisible = false
+          })
+          .catch(err => {
             console.error(err)
           })
       },
       getequipment() {
         this.$axios.get('/equipment/elist', {})
           .then(res => {
-            // response
             for (var i = 0; i < res.data.items.length / 2; i++) {
               this.equipmentlist.push({
                 label: res.data.items[2 * i],
@@ -286,18 +321,15 @@
             }
           })
           .catch(err => {
-            // handle error
             console.error(err)
           })
       },
       getsampletype() {
         this.$axios.get('sampletype/list', {})
           .then(res => {
-            // response
             this.sampletypelist = res.data.items
           })
           .catch(err => {
-            // handle error
             console.error(err)
           })
       },
@@ -426,16 +458,16 @@
       },
       seachdata() {
         this.currentPage = 1
-        this.initData()
+        this.searchlist()
       },
       handleSizeChange(value) {
         this.size = value
         this.currentPage = 1
-        this.initData()
+        this.searchlist()
       },
       handleCurrentChange(value) {
         this.currentPage = value
-        this.initData()
+        this.searchlist()
       },
       jstimehandle(val) {
         if (val === '') {
@@ -454,7 +486,7 @@
         this.searchform.Name = ''
         this.searchform.EId = ''
         this.CreateDate = []
-        this.initData()
+        this.searchlist()
       }
     }
   }

+ 54 - 21
src/dashoo.cn/frontend_web/src/pages/report/samples/samplesstoredbysampletype.vue

@@ -10,7 +10,8 @@
           <el-breadcrumb-item :to="{ path: '/report/samplesstored' }">样本-已存储</el-breadcrumb-item>
         </el-breadcrumb>
         <span style="float: right;">
-          <el-button type="primary" size="mini" style="margin-left:10px; margin-top: -4px;" @click="handleExportsamplesCommand('exportall')">
+          <el-button type="primary" size="mini" style="margin-left:10px; margin-top: -4px;"
+            @click="handleExportsamplesCommand('exportall')">
             导出
           </el-button>
         </span>
@@ -63,7 +64,8 @@
         <!-- <el-table-column label=" 所属分组" prop="GroupName" align="center"></el-table-column> -->
       </el-table>
       <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="currentPage"
-        :page-sizes="[10, 15, 20]" :page-size="size" layout="total, sizes, prev, pager, next, jumper" :total="currentItemCount">
+        :page-sizes="[10, 15, 20]" :page-size="size" layout="total, sizes, prev, pager, next, jumper"
+        :total="currentItemCount">
       </el-pagination>
     </el-card>
 
@@ -79,7 +81,7 @@
           </el-form-item>
           <span style="float: right;margin-top:-10px;">
             <el-button size="small" @click="balanceShow = false">取 消</el-button>
-            <el-button type="primary" size="small" @click="initData()">确 定</el-button>
+            <el-button type="primary" size="small" @click="searchlist()">确 定</el-button>
           </span>
         </el-row>
       </el-form>
@@ -127,10 +129,17 @@
 </template>
 
 <script>
+  import {
+    mapGetters
+  } from 'vuex'
   export default {
     name: 'samplereport',
+    computed: mapGetters({
+      authUser: 'authUser'
+    }),
     data() {
       return {
+        acc: '',
         dialogVisible: false,
         dialogTableVisible: true,
         currentItemCount: 0, // 当前页显示数量
@@ -177,16 +186,6 @@
             name: '可用容量',
             show: true,
             kuoz: false
-          }, {
-            filed: 'SamplingOrganName',
-            name: '组织器官',
-            show: true,
-            kuoz: false
-          }, {
-            filed: 'SamplingSiteName',
-            name: '取材部位',
-            show: true,
-            kuoz: false
           }, {
             filed: 'InnerCode',
             name: '样本内码',
@@ -237,14 +236,21 @@
       }
     },
     created() {
+      this.acc = this.authUser.Profile.AccCode
       this.getsampletype()
       this.getequipment()
     },
     methods: {
+      searchlist() {
+        if (this.acc == 'saB4v') {
+          this.AninitData()
+        } else {
+          this.initData()
+        }
+      },
       getequipment() {
         this.$axios.get('/equipment/elist', {})
           .then(res => {
-            // response
             for (var i = 0; i < res.data.items.length / 2; i++) {
               this.equipmentlist.push({
                 label: res.data.items[2 * i],
@@ -253,7 +259,6 @@
             }
           })
           .catch(err => {
-            // handle error
             console.error(err)
           })
       },
@@ -299,7 +304,6 @@
           CreateDate.push(this.formatDateTime(this.CreateDate[1]))
         }
         params = Object.assign(params, this.searchform)
-        // request
         this.$axios.get('reports/samplestoredlist?CreateDate=' + CreateDate, {
             params
           })
@@ -309,7 +313,36 @@
             this.dialogTableVisible = false
           })
           .catch(err => {
-            // handle error
+            console.error(err)
+          })
+      },
+      //animal
+      AninitData() {
+        let CreateDate = []
+        let params = {
+          _currentPage: this.currentPage,
+          _size: this.size
+        }
+        // 解析时间
+        if (this.CreateDate && this.CreateDate.length === 2) {
+          this.CreateDate[0].setHours(23)
+          this.CreateDate[0].setMinutes(59)
+          this.CreateDate[0].setSeconds(59)
+          this.CreateDate[1].setHours(23)
+          this.CreateDate[1].setMinutes(59)
+          this.CreateDate[1].setSeconds(59)
+          CreateDate.push(this.formatDateTime(this.CreateDate[0]))
+          CreateDate.push(this.formatDateTime(this.CreateDate[1]))
+        }
+        this.$axios.get('reports/animaldetaillist?CreateDate=' + CreateDate, {
+            params
+          })
+          .then(res => {
+            this.list = res.data.items
+            this.currentItemCount = res.data.currentItemCount
+            this.dialogTableVisible = false
+          })
+          .catch(err => {
             console.error(err)
           })
       },
@@ -423,16 +456,16 @@
       },
       seachdata() {
         this.currentPage = 1
-        this.initData()
+        this.searchlist()
       },
       handleSizeChange(value) {
         this.size = value
         this.currentPage = 1
-        this.initData()
+        this.searchlist()
       },
       handleCurrentChange(value) {
         this.currentPage = value
-        this.initData()
+        this.searchlist()
       },
       jstimehandle(val) {
         if (val === '') {
@@ -450,7 +483,7 @@
         this.searchform.Name = ''
         this.searchform.SampleTypeId = ''
         this.searchform.EId = ''
-        this.initData()
+        this.searchlist()
       }
     }
   }