Explorar el Código

蜜蜂所常温标签

shihang hace 6 años
padre
commit
02cc0a02f1

+ 2 - 0
src/dashoo.cn/backend/api/business/samplesinfo/samplesinfo.go

@@ -401,6 +401,8 @@ type AnimalSamplesInfoShow struct {
 	ParentBarCode     string    `xorm:"VARCHAR(50)"`
 	IType             int       `xorm:"INT(10)"` //样本属性 1分装子样本 2提取子样本
 	Remark            string    `xorm:"TEXT"`
+	BeeKeepers        string    `xorm:"VARCHAR(256)"`
+	TakeAway          string    `xorm:"VARCHAR(256)"`
 	CreateUserId      int       `xorm:"INT(10)"`
 	CreateBy          string    `xorm:"VARCHAR(255)"`
 	CreateOn          time.Time `xorm:"DATETIME created"`

+ 12 - 0
src/dashoo.cn/backend/api/business/samplesinfo/samplesinfoService.go

@@ -869,6 +869,18 @@ func (s *SamplesInfoService) QuerySampleList(acccode string, where string) []Sam
 	return List
 }
 
+func (s *SamplesInfoService) QueryAnimalSampleList(acccode string, where string) []AnimalSamplesInfoShow {
+	tblmain := acccode + SamplesMaintbName
+	tbldetail := acccode + SamplesDetailtbName
+	animaltb := acccode + AnimalInfoName
+	sql := "select a.*,b.*,c.Genus,c.GenusName,concat(c.ProvinceName,c.CityName,c.StreetName,c.Address) as AddressName,c.InnerNo as SourceInner,c.Amount,c.Unit as SourceUni,c.ProjectName,c.Longitude,c.Latitude,c.Altitude,c.SurveyDate,c.ZBack11 as BeeKeepers,c.ZBack17 as TakeAway from   " + tbldetail + " a left join " + tblmain +
+		" b on a.SampleCode = b.SampleCode left join " + animaltb +
+		" c on b.SourceId = c.Id where " + where + " order by a.Id desc"
+	List := make([]AnimalSamplesInfoShow, 0)
+	utils.DBE.Sql(sql).Find(&List)
+	return List
+}
+
 type SampleCount struct {
 	IState int
 	SCount int

+ 5 - 4
src/dashoo.cn/backend/api/controllers/common.go

@@ -64,8 +64,8 @@ func Apiget(str string) (body []byte) {
 func Apipost(strUrl, method string, postDict interface{}) (body []byte) {
 	strUrl = strings.Replace(strUrl, " ", "%20", -1)
 	httpClient := &http.Client{
-	//Transport:nil,
-	//CheckRedirect: nil,
+		//Transport:nil,
+		//CheckRedirect: nil,
 	}
 
 	var httpReq *http.Request
@@ -81,8 +81,8 @@ func Apipost(strUrl, method string, postDict interface{}) (body []byte) {
 
 func ApiKeyRequest(strUrl, method, apikey string, postDict interface{}) (body []byte) {
 	httpClient := &http.Client{
-	//Transport:nil,
-	//CheckRedirect: nil,
+		//Transport:nil,
+		//CheckRedirect: nil,
 	}
 	var httpReq *http.Request
 	b, _ := json.Marshal(postDict)
@@ -156,6 +156,7 @@ func UploadFile(filename, path string, r *http.Request, fname ...string) string
 
 // 上传打印方案文件
 func UploadPrintFile(filename, path string, r *http.Request) string {
+	fmt.Println("cdddddddddddddddd", filename, path, r)
 	fn, _, _ := r.FormFile("file")
 	defer fn.Close()
 

+ 51 - 253
src/dashoo.cn/backend/api/controllers/home.go

@@ -111,10 +111,10 @@ func spreBarcodeprint(param string) (it samplesinfo.SamplesInfoShow, datas []sam
 	}
 	svc := samplesinfo.GetSamplesInfoService(utils.DBE)
 	datas = svc.QuerySampleList(acccode, where)
-	fmt.Println("111111111111111", datas)
 	return
 }
 
+//样本条码
 func sampleBarcodeprint(param string) (it samplesinfo.SamplesInfoShow, datas []samplesinfo.SamplesInfoShow) {
 	param = Base64Decode(param)
 	params := strings.Split(param, ",")
@@ -129,15 +129,48 @@ func sampleBarcodeprint(param string) (it samplesinfo.SamplesInfoShow, datas []s
 	return
 }
 
-//func sampleListeprint(param string) (it cellscollection.CellsCollectionDetail, datas []cellscollection.CellsCollectionDetail) {
-//	param = Base64Decode(param)
-//	params := strings.Split(param, ",")
-//	accode := params[1]
-//	detailid := params[2]
-//	svc := cellscollection.GetCellscollectionService(utils.DBE)
-//	svc.GetEntitysByWhere(accode+CellsCollectionDetailName, "SampleFromItem=2 and PreparationDetailId="+detailid, &datas)
-//	return
-//}
+//样本条码--蜜蜂所
+func animalBarcodeprint(param string) (it samplesinfo.AnimalSamplesInfoShow, datas []samplesinfo.AnimalSamplesInfoShow) {
+	param = Base64Decode(param)
+	params := strings.Split(param, ",")
+	code := params[1]
+	acccode := params[2]
+	where := ""
+	if code != "" {
+		where = where + " a.Id =" + code + ""
+	}
+	svc := samplesinfo.GetSamplesInfoService(utils.DBE)
+	datas = svc.QueryAnimalSampleList(acccode, where)
+	return
+}
+
+//预录入、已录入、待复存样本条码批量打印--蜜蜂所
+func animalBarcodeprintbatch(param string) (it samplesinfo.AnimalSamplesInfoShow, datas []samplesinfo.AnimalSamplesInfoShow) {
+	param = Base64Decode(param)
+	params := strings.Split(param, ",")
+	acccode := params[1]
+	codes := params[2]
+	fmt.Println(acccode)
+	fmt.Println(codes)
+	codess := strings.Split(codes, ";")
+	where := ""
+	if len(codess) > 0 {
+		where = where + " a.Id in ( "
+		for i := 0; i < len(codess); i++ {
+			if codess[i] != "" {
+				if i == len(codess)-1 {
+					where = where + codess[i] + ""
+				} else {
+					where = where + "" + codess[i] + ","
+				}
+			}
+		}
+		where = where + " ) "
+	}
+	svc := samplesinfo.GetSamplesInfoService(utils.DBE)
+	datas = svc.QueryAnimalSampleList(acccode, where)
+	return
+}
 
 //预录入、已录入、待复存样本条码批量打印
 func sampleBarcodeprintbatch(param string) (it samplesinfo.SamplesInfoShow, datas []samplesinfo.SamplesInfoShow) {
@@ -669,249 +702,6 @@ func lablepreprintnotinsertsample(param string) (it LablePrePrint, datas []Lable
 	return
 }
 
-////实验结果打印
-//func testResultprint(param string) (it lissystem.TestInfoPrintModel, datas []*lissystem.TestInfoPrintModel) {
-//	param = Base64Decode(param)
-//	params := strings.Split(param, ",")
-//	if len(params) < 6 {
-//		return
-//	}
-//	beego.Debug(params)
-//	inspectionNum := params[1]
-//	acccode := params[2]
-//	labName := params[3]
-//	itemName := params[4]
-//	hospital := params[5]
-
-//	svc := lissystem.GetTestLabInfoService(utils.DBE)
-//	datas = svc.TestInfoDetailPrint(acccode, inspectionNum, labName, itemName, hospital)
-//	svc.AddLabInfoPrintTime(acccode, inspectionNum)
-
-//	return
-//}
-
-//LIS申请单信息打印
-//func testApplyprint(param string) (it lissystem.TestOrderDetail, datas []lissystem.TestOrderDetail) {
-//	param = Base64Decode(param)
-//	params := strings.Split(param, ",")
-//	ApplyNum := params[1]
-//	acccode := params[2]
-//	where := ""
-//	if ApplyNum != "" {
-//		where = where + " a.ApplyNum=" + ApplyNum + ""
-//	}
-//	svc := lissystem.GetTestApplicationService(utils.DBE)
-//	datas = svc.TestApplicationPrint(acccode, where)
-//	return
-//}
-
-//爱萨尔 样本采集申请单信息打印
-//func testCollectionprint(param string) (it cellscollection.CellsCollectionandDonorsInfo, datas []cellscollection.CellsCollectionandDonorsInfo) {
-//	param = Base64Decode(param)
-//	params := strings.Split(param, ",")
-//	ApplyNum := params[1]
-//	acccode := params[2]
-//	where := ""
-//	if ApplyNum != "" {
-//		where = where + " c.CollectionNo=" + ApplyNum + ""
-//	}
-//	svc := cellscollection.GetCellscollectionService(utils.DBE)
-//	datas = svc.TestCellscollectionPrint(acccode, where)
-//	return
-//}
-
-//爱萨尔 合同信息打印
-//func testContractprint(param string) (it cellscontract.CellsContract, datas []cellscontract.CellsContract) {
-//	param = Base64Decode(param)
-//	params := strings.Split(param, ",")
-//	PId := params[1]
-//	acccode := params[2]
-//	where := ""
-//	if PId != "" {
-//		where = where + " Id=" + PId + ""
-//	}
-//	svc := cellscontract.GetCellscontractService(utils.DBE)
-//	datas = svc.TestCellsContractPrint(acccode+CellsContractName, where)
-//	return
-//}
-
-//LIMS 委托信息打印
-//func testEntrustprint(param string) (it limsentrust.LimsEntrustMain, datas []limsentrust.LimsEntrustMain) {
-//	param = Base64Decode(param)
-//	params := strings.Split(param, ",")
-//	Id := params[1]
-//	acccode := params[2]
-//	where := ""
-//	if Id != "" {
-//		where = where + " Id=" + Id + ""
-//	}
-//	svc := limsentrust.GetLimsEnturstService(utils.DBE)
-//	datas = svc.TestLimsEntrustPrint(acccode+LimsEntrustMainName, where)
-//	return
-//}
-
-//LIMS 样品交接信息打印
-//func testDeliverprint(param string) (it limsdeliver.LimsDeliverDetail, datas []limsdeliver.LimsDeliverDetail) {
-//	param = Base64Decode(param)
-//	params := strings.Split(param, ",")
-//	Id := params[1]
-//	acccode := params[2]
-//	where := ""
-//	if Id != "" {
-//		where = where + " EId=" + Id + ""
-//	}
-//	svc := limsdeliver.GetLimsDeliverService(utils.DBE)
-//	datas = svc.TestLimsDeliverPrint(acccode+LimsDeliverName, acccode+LimsDeliverDetailName, where)
-//	return
-//}
-
-//LIMS制备后样品条码打印
-//func PreparedBarCode(param string) (it limspreparation.LimsPreparation, datas []limspreparation.LimsPreparation) {
-//	param = Base64Decode(param)
-//	params := strings.Split(param, ",")
-//	fmt.Println("11111111111111", param)
-//	acccode := params[1]
-//	codes := params[2]
-//	fmt.Println(acccode)
-//	fmt.Println(codes)
-//	codess := strings.Split(codes, ";")
-//	where := ""
-//	if len(codess) > 0 {
-//		where = where + " Id in ( "
-//		for i := 0; i < len(codess); i++ {
-//			if codess[i] != "" {
-//				if i == len(codess)-1 {
-//					where = where + codess[i] + ""
-//				} else {
-//					where = where + "" + codess[i] + ","
-//				}
-//			}
-//		}
-//		where = where + " ) "
-//	}
-//	svc := limspreparation.GetLimsPreparationService(utils.DBE)
-//	datas = svc.QuerySampleList(acccode, where)
-//	return
-//}
-
-//LIS室间交接条码打印
-//func testTransferBarCodeprint(param string) (it lissystem.TestOrderDetail, datas []lissystem.TestOrderDetail) {
-//	param = Base64Decode(param)
-//	params := strings.Split(param, ",")
-//	TransferNum := params[1]
-//	acccode := params[2]
-//	where := ""
-//	if TransferNum != "" {
-//		where = where + " a.TransferNum=" + TransferNum + ""
-//	}
-//	svc := lissystem.GetTestTransferService(utils.DBE)
-//	datas = svc.TestTransferBarCodePrint(acccode, where)
-//	return
-//}
-
-//LIS业务申请条码打印
-//func testApplyBarCodeprint(param string) (it lissystem.TestOrderDetail, datas []lissystem.TestOrderDetail) {
-//	param = Base64Decode(param)
-//	params := strings.Split(param, ",")
-//	ApplyNum := params[1]
-//	acccode := params[2]
-//	where := ""
-//	if ApplyNum != "" {
-//		where = where + " a.ApplyNum=" + ApplyNum + ""
-//	}
-//	svc := lissystem.GetTestTransferService(utils.DBE)
-//	datas = svc.TestTransferBarCodePrint(acccode, where)
-//	return
-//}
-
-//爱萨尔样本采集条码打印
-//func cellscollectionBarCodeprint(param string) (it cellscollection.CellsCollectionandDonorsInfo, datas []cellscollection.CellsCollectionandDonorsInfo) {
-//	param = Base64Decode(param)
-//	params := strings.Split(param, ",")
-//	ApplyNum := params[1]
-//	acccode := params[2]
-//	where := ""
-//	if ApplyNum != "" {
-//		where = where + " c.CollectionNo=" + ApplyNum + ""
-//	}
-//	svc := cellscollection.GetCellscollectionService(utils.DBE)
-//	datas = svc.TestCellscollectionPrint(acccode, where)
-//	return
-//}
-
-//阳性报告打印
-//func testPositiveReport(param string) (it lissystem.LaboratoryReportModel, datas []lissystem.LaboratoryReportModel) {
-//	param = Base64Decode(param)
-//	params := strings.Split(param, ",")
-//	CreateOnstart, _ := strconv.ParseInt(params[1], 10, 64)
-//	CreateOnend, _ := strconv.ParseInt(params[2], 10, 64)
-//	acccode := params[3]
-//	testlistid := params[4]
-//	where := " 1=1 and e.CheckStatus=2  and c.id=" + testlistid
-//	if CreateOnstart != 0 {
-//		where = where + " and  b.CollectDate>'" + time.Unix(CreateOnstart, 0).Format("2006-01-02") + "'"
-//	}
-//	if CreateOnend != 0 {
-//		where = where + " and b.CollectDate <'" + time.Unix(CreateOnend, 0).Format("2006-01-02") + " 23:59:59'"
-//	}
-//	svc := lissystem.GetLaboratoryReportService(utils.DBE)
-//	datas = svc.TestPositiveReport(acccode, where)
-//	return
-//}
-
-//LIS室间交接信息打印
-//func testTransferprint(param string) (it lissystem.TestOrderDetail, datas []lissystem.TestOrderDetail) {
-//	param = Base64Decode(param)
-//	params := strings.Split(param, ",")
-//	TransferNum := params[1]
-//	acccode := params[2]
-//	where := ""
-//	if TransferNum != "" {
-//		where = where + " a.TransferNum=" + TransferNum + ""
-//	}
-//	svc := lissystem.GetTestTransferService(utils.DBE)
-//	datas = svc.TestTransferPrint(acccode, where)
-//	return
-//}
-
-//医院结果信息打印
-//func hospitalResultprint(param string) (it lissystem.TestOrderDetail, datas []lissystem.TestOrderDetail) {
-//	param = Base64Decode(param)
-//	params := strings.Split(param, ",")
-//	InspectionNum := params[1]
-//	acccode := params[2]
-//	where := ""
-//	if InspectionNum != "" {
-//		where = where + " a.InspectionNum='" + InspectionNum + "'"
-//	}
-//	svc := lissystem.GetTestLabInfoService(utils.DBE)
-//	datas = svc.HospitalResultPrint(acccode, where)
-//	return
-//}
-
-//套餐结果信息打印
-//func packageResultprint(param string) (it lissystem.TestOrderDetail, datas []lissystem.TestOrderDetail) {
-//	param = Base64Decode(param)
-//	params := strings.Split(param, ",")
-//	SampleCode := params[1]
-//	PackageId := params[2]
-//	acccode := params[3]
-//	var testinfos []lissystem.TestInfo
-//	var where string
-//	svc := lissystem.GetTestLabInfoService(utils.DBE)
-//	where_testinfo := " SampleCode='" + SampleCode + "' and PackageId=" + PackageId
-//	svc.GetEntitysByWhere(acccode+TestInfoName, where_testinfo, &testinfos)
-//	for i := 0; i < len(testinfos); i++ {
-//		if i == 0 {
-//			where = "a.InspectionNum = '" + testinfos[i].InspectionNum + "' "
-//		} else {
-//			where = where + " or a.InspectionNum = '" + testinfos[i].InspectionNum + "' "
-//		}
-//	}
-//	datas = svc.PackageResultPrint(acccode, where)
-//	return
-//}
-
 //物料入库单打印
 func materialRKprint(param string) (it material.MaterialRKPrintModel, datas []material.MaterialRKPrintModel) {
 	param = Base64Decode(param)
@@ -973,6 +763,14 @@ func (this *HomeController) Printservice() {
 		it, itema := sampleBarcodeprint(param)
 		cols = AutoColType(&it)
 		item = itema
+	case "animalsamples":
+		it, itema := animalBarcodeprint(param)
+		cols = AutoColType(&it)
+		item = itema
+	case "animalsamplesbatch":
+		it, itema := animalBarcodeprintbatch(param)
+		cols = AutoColType(&it)
+		item = itema
 	case "lableprint":
 		it, itema := lablepreprint(param)
 		cols = AutoColType(&it)

+ 14 - 2
src/dashoo.cn/backend/api/controllers/upload.go

@@ -41,10 +41,22 @@ func (this *UploadController) SamplesTypeImg() {
 // @Success 200 {object} business.device.DeviceChannels
 // @router /printschemefr3 [post]
 func (this *UploadController) Printschemefr3() {
+	fmt.Println("ddddddddddddddddd")
+	accode := this.GetString("accode")
 	filename := this.GetString("name")
+	path := "/static/upload/printscheme/" + accode + "/"
+	this.Data["json"] = UploadPrintFile(filename, path, this.Ctx.Request)
+	this.ServeJSON()
+}
+
+// @Title 上传打印方案
+// @Description 上传打印方案
+// @Success 200 {object} business.device.DeviceChannels
+// @router /printupload [post]
+func (this *UploadController) Printscheme() {
 	accode := this.GetString("accode")
-	var path string
-	path = "/static/upload/printscheme/" + accode + "/"
+	filename := this.GetString("name")
+	path := "/static/upload/printscheme/" + accode + "/"
 	this.Data["json"] = UploadPrintFile(filename, path, this.Ctx.Request)
 	this.ServeJSON()
 }

+ 11 - 0
src/dashoo.cn/backend/api/static/bmisrep/animalnormal.fr3

@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="utf-8"?>
+<TfrxReport Version="4.14" DotMatrixReport="False" IniFile="\Software\Fast Reports" PreviewOptions.Buttons="4095" PreviewOptions.Zoom="1" PrintOptions.Printer="Default" PrintOptions.PrintOnSheet="0" ReportOptions.CreateDate="43626.564145162" ReportOptions.Description.Text="" ReportOptions.LastChange="43626.6073741088" ScriptLanguage="PascalScript" ScriptText.Text="begin&#13;&#10;&#13;&#10;end." PropData="044C65667403700208446174617365747301010C2300000020446174615365743D226672786462312220446174615365744E616D653D22646231220000095661726961626C657301010C0E000000204E616D653D22206D797661722200010C1B000000204E616D653D2276617231222056616C75653D222776617231272200010C1B000000204E616D653D2276617232222056616C75653D222776617232272200010C1B000000204E616D653D2276617233222056616C75653D22277661723327220000055374796C650100">
+  <TfrxDataPage Name="Data" Height="1000" Left="0" Top="0" Width="1000"/>
+  <TfrxReportPage Name="Page1" PaperWidth="210" PaperHeight="297" PaperSize="9" LeftMargin="10" RightMargin="10" TopMargin="10" BottomMargin="10" Columns="2" ColumnWidth="95" ColumnPositions.Text="0&#13;&#10;95" HGuides.Text="" VGuides.Text="">
+    <TfrxMasterData Name="MasterData1" Height="105.82684" Left="0" Top="18.89765" Width="359.05535" ColumnWidth="0" ColumnGap="0" DataSet="frxdb1" DataSetName="db1" RowCount="0">
+      <TfrxMemoView Name="Memo1" Left="15.11812" Top="3.77953" Width="151.1812" Height="15.11812" ShowHint="False" Font.Charset="1" Font.Color="-16777208" Font.Height="-13" Font.Name="Arial" Font.Style="0" ParentFont="False" Text="名称:[db1.&#34;SourceName&#34;]"/>
+      <TfrxMemoView Name="Memo2" Left="219.21274" Top="3.77953" Width="128.50402" Height="18.89765" ShowHint="False" Font.Charset="1" Font.Color="-16777208" Font.Height="-13" Font.Name="Arial" Font.Style="0" ParentFont="False" Text="库号:[db1.&#34;SourceInner&#34;]"/>
+      <TfrxMemoView Name="Memo3" Left="15.11812" Top="30.23624" Width="332.59864" Height="18.89765" ShowHint="False" Font.Charset="1" Font.Color="-16777208" Font.Height="-13" Font.Name="Arial" Font.Style="0" ParentFont="False" Text="采集地:[db1.&#34;Address&#34;]"/>
+    </TfrxMasterData>
+  </TfrxReportPage>
+</TfrxReport>

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

@@ -159,8 +159,8 @@ module.exports = {
   },
 
   axios: {
-    // baseURL: '//localhost:9081/api/' // 本机开发使用
-    baseURL: '//192.168.0.192:9081/api/' // 蜜蜂所使用
+    baseURL: '//localhost:9081/api/' // 本机开发使用
+    // baseURL: '//192.168.0.192:9081/api/' // 蜜蜂所使用
     // baseURL: '//47.92.238.200:9081/api/' // BioBank on ALi发布使用
     // baseURL: '//188.188.30.89:9081/api/' //临沂使用
     // baseURL: '//api09.labsop.cn/api/'
@@ -177,10 +177,10 @@ module.exports = {
     appclient: 'biobank', //因顿LIMS:lims,样本库:biobank,细胞制备:cellbank,样本搜索判断,登录跳转判断
 
     //imgserverhost: 'http://47.92.238.200:9081', // BioBank服务地址,图片上传文件
-    // upfilehost: 'http://weed1.labsop.cn:9333/dir/assign', // 附件上传
-    // imgserverhost: 'http://localhost:9081', // BioBank服务地址,图片上传文件
-    imgserverhost: 'http://192.168.0.192:9081', // 蜜蜂所服务地址,图片上传文件
-    upfilehost: 'http://192.168.0.192:9333/dir/assign', // 蜜蜂所附件上传
+    upfilehost: 'http://weed1.labsop.cn:9333/dir/assign', // 附件上传
+    imgserverhost: 'http://localhost:9081', // BioBank服务地址,图片上传文件
+    // imgserverhost: 'http://192.168.0.192:9081', // 蜜蜂所服务地址,图片上传文件
+    // upfilehost: 'http://192.168.0.192:9333/dir/assign', // 蜜蜂所附件上传
 
     //imgserverhost: 'http://188.188.30.89:9081', // 临沂服务地址,图片上传文件
     //upfilehost: '188.188.30.89:9333/dir/assign', // 临沂附件上传

+ 2 - 4
src/dashoo.cn/frontend_animal/src/pages/samples/stored/index.vue

@@ -984,8 +984,7 @@
       },
       doprintscheme() {
         this.dialogPrintVisible = false
-        // 执行打印操作
-        window.PrintReport(this.Printscheme, `samples,${this.peintitemid},${this.authUser.Profile.AccCode}`)
+        window.PrintReport(this.Printscheme, `animalsamples,${this.peintitemid},${this.authUser.Profile.AccCode}`)
       },
       getstationurl(val) {
         return `?station=${val.ShelfX};${val.ShelfY};${val.BoxX};${val.BoxY};${val.Position};${val.Id}&pname=samples-stored&size=${this.size}&currentPage=${this.currentPage}`
@@ -1008,7 +1007,7 @@
               }
               idstring = idstring.substring(0, idstring.length - 1)
               // 执行打印操作
-              window.PrintReport(res.data, `samplesbatch,${this.authUser.Profile.AccCode},${idstring}`)
+              window.PrintReport(res.data, `animalsamplesbatch,${this.authUser.Profile.AccCode},${idstring}`)
             } else {
               _this.$message({
                 type: 'warning',
@@ -1017,7 +1016,6 @@
             }
           })
           .catch(err => {
-            // handle error
             console.error(err)
           })
       },

+ 13 - 5
src/dashoo.cn/frontend_animal/src/pages/setting/printscheme/_opera/printschemeedit.vue

@@ -56,6 +56,14 @@
           </el-col>
           <el-col :span="16">
             <el-form-item label="上传打印模板【.fr3格式】">
+              <el-upload ref="upload" class="printscheme-uploader" :action="filehost + '/api/uploads/printupload'"
+                :show-file-list="false" :data="uploadprintparam" :on-change="handlechangeavatar"
+                :on-success="handleAvatarSuccess" :before-upload="beforeAvatarUpload">
+                <img v-if="uploadstate===1" :src="fileimg" class="printschemefile">
+                <i v-else class="el-icon-plus printscheme-uploader-icon"></i>
+              </el-upload>
+            </el-form-item>
+            <!-- <el-form-item label="上传打印模板【.fr3格式】">
               <el-upload ref="upload" class="printscheme-uploader" :action="filehost + '/api/uploads/printschemefr3'"
                 :show-file-list="false" :data="uploadprintparam" :auto-upload="false" :on-change="handlechangeavatar"
                 :on-success="handleAvatarSuccess" :before-upload="beforeAvatarUpload">
@@ -63,7 +71,7 @@
                 <i v-else class="el-icon-plus printscheme-uploader-icon"></i>
               </el-upload>
               <div style="margin-top:-20px;text-align:center;width:88px">{{printschemeinfoform.FileName}}</div>
-            </el-form-item>
+            </el-form-item> -->
           </el-col>
         </el-row>
       </el-form>
@@ -112,14 +120,12 @@
       this.filehost = process.env.imgserverhost
       this.fileimg = process.env.imgserverhost + '/static/img/print.png'
       let pid = this.$route.params.opera
-      // initial data
       this.initData(pid)
       this.accode = this.authUser.Profile.AccCode
     },
     methods: {
       initData(pid) {
         let _this = this
-        // paginate
         this.$axios.get('printscheme/getmodel/' + pid, {})
           .then(res => {
             _this.printschemeinfoform = res.data
@@ -128,17 +134,16 @@
             }
           })
           .catch(err => {
-            // handle error
             console.error(err)
           })
       },
       savedata(formName) {
         let _this = this
+        console.log("w111111cvvfgggggggggwwwwwww", _this.printschemeinfoform)
         this.$refs[formName].validate((valid) => {
           if (valid) {
             _this.$axios.put('printscheme/' + _this.printschemeinfoform.Id, _this.printschemeinfoform)
               .then(res => {
-                // response
                 if (res.data.code === 0) {
                   _this.$message({
                     type: 'success',
@@ -154,6 +159,8 @@
         })
       },
       addsave() {
+        console.log("wwwwwwwwwwwwwwwww", this.$refs.upload.uploadFiles)
+        console.log("w11111111111111111111wwwwwwww", this.filehost)
         if (this.$refs.upload.uploadFiles.length > 0) {
           this.$refs.upload.submit()
         } else {
@@ -186,6 +193,7 @@
       },
       handleAvatarSuccess(res, file) {
         this.printschemeinfoform.FileAddr = res
+        console.log("dddddddddddddddd", res, file)
         this.savedata('printschemeinfoform')
       },
       beforeAvatarUpload(file) {

+ 3 - 2
src/dashoo.cn/frontend_animal/src/static/js/printUtilities.js

@@ -162,10 +162,11 @@ function PrintReport(repID, param) {
   param = base64encode(param);
   param = param.replace("+", "%2B");
   var href = "bmisrep://rep=" + repID + "&param=" + param;
-  //var url = "localhost:9081"
-  var url = "192.168.0.192:9081" //蜜蜂所
+  var url = "localhost:9081"
+ //  var url = "192.168.0.192:9081" //蜜蜂所
  //  var url = "47.92.238.200:9081"
   href = href + "&host=" + url;
+  
 
   if (typeof preview == "undefined") {
     preview = true;

+ 46 - 16
src/dashoo.cn/frontend_web/src/pages/biobank/source/_opera/sourceinfo.vue

@@ -2,9 +2,11 @@
   .input-with-select .el-select .el-input {
     width: 110px;
   }
+
   .input-with-select .el-input-group__append {
     background-color: #fff;
   }
+
 </style>
 
 <template>
@@ -20,7 +22,8 @@
           <el-breadcrumb-item>详细信息</el-breadcrumb-item>
         </el-breadcrumb>
         <span style="float: right;">
-          <el-button size="mini" type="primary" class="el-button--small" style="margin-left: 8px" @click="goback">返回</el-button>
+          <el-button size="mini" type="primary" class="el-button--small" style="margin-left: 8px" @click="goback">返回
+          </el-button>
         </span>
       </div>
 
@@ -83,14 +86,14 @@
         </div>
       </el-card>
 
-      <el-card class="box-card donorsdetailmaincard" v-show="userextends.length > 0">
+      <el-card class="box-card donorsdetailmaincard" v-for="groupname in groupnameList" :key="groupname"
+        style="margin-top: 5px">
         <div slot="header">
-          <i class="icon icon-paragraph-justify"> 扩展信息</i>
+          <i class="icon icon-paragraph-justify"> 扩展信息 / {{groupname}}</i>
         </div>
-        <div>
-          <div class="donorsdetailkzinfodiv">
-            <el-row>
-              <template v-for="(item, index) in animalextends">
+        <div class="donorsdetailkzinfodiv">
+          <el-row>
+            <template v-for="(item, index) in userextends">
               <el-col :span="6" :key="index" v-if="item.GroupName === groupname && item.FieldType == '5'">
                 <label>
                   <a @click="clickachment(item.FieldDefault)">{{item.Name}}:{{item.FieldDefault}}</a>
@@ -100,10 +103,30 @@
                 <label>{{item.Name}}:{{item.FieldDefault}}</label>
               </el-col>
             </template>
+          </el-row>
+        </div>
+      </el-card>
+      <!-- <el-card class="box-card donorsdetailmaincard" v-show="userextends.length > 0">
+        <div slot="header">
+          <i class="icon icon-paragraph-justify"> 扩展信息</i>
+        </div>
+        <div>
+          <div class="donorsdetailkzinfodiv">
+            <el-row>
+              <template v-for="(item, index) in userextends">
+                <el-col :span="6" :key="index" v-if="item.GroupName === groupname && item.FieldType == '5'">
+                  <label>
+                    <a @click="clickachment(item.FieldDefault)">{{item.Name}}:{{item.FieldDefault}}</a>
+                  </label>
+                </el-col>
+                <el-col :span="6" :key="index" v-if="item.GroupName === groupname && item.FieldType != '5'">
+                  <label>{{item.Name}}:{{item.FieldDefault}}</label>
+                </el-col>
+              </template>
             </el-row>
           </div>
         </div>
-      </el-card>
+      </el-card> -->
 
       <el-card class="box-card donorsdetailmaincard">
         <div slot="header">
@@ -245,6 +268,7 @@
         },
         Birthday: '',
         acc: '',
+        groupnameList: [],
         userextends: [], // 扩展字段
         familydetaillist: [], // 家族信息
         sampletotal: {}, // 样本统计
@@ -265,7 +289,8 @@
       createpage() {
         let pid = this.$route.params.opera
         this.pid = pid
-        this.getextends(pid)
+        // this.getextends(pid)
+        this.getGroupName()
         this.getFamilyList(pid)
         this.getsampletotal(pid)
         this.getdevicesamples(pid)
@@ -305,37 +330,43 @@
             console.error(err)
           })
       },
+      getGroupName() {
+        this.$axios.get('extends/listbyloginwithgroup', {})
+          .then(res => {
+            for (var i = 0; i < res.data.length; i++) {
+              if (res.data[i].GroupName != '') {
+                this.groupnameList.push(res.data[i].GroupName)
+              }
+            }
+            this.Tabs = this.groupnameList[0]
+            this.getextends()
+          })
+      },
       getextends(pid) {
         this.$axios.get('extends/listbylogin', {})
           .then(res => {
-            // response
             this.userextends = res.data
             this.initData(pid)
           })
           .catch(err => {
-            // handle error
             console.error(err)
           })
       },
       getFamilyList(pid) {
         this.$axios.get('familyman/familydetaillist/' + pid, {})
           .then(res => {
-            // response
             this.familydetaillist = res.data.items
           })
           .catch(err => {
-            // handle error
             console.error(err)
           })
       },
       getsampletotal(pid) {
         this.$axios.get('samplessource/getsampletotal/' + pid, {})
           .then(res => {
-            // response
             this.sampletotal = res.data
           })
           .catch(err => {
-            // handle error
             console.error(err)
           })
       },
@@ -352,7 +383,6 @@
             this.currentItemCount = res.data.currentItemCount
           })
           .catch(err => {
-            // handle error
             console.error(err)
           })
       },

+ 3 - 6
src/dashoo.cn/frontend_web/src/pages/biobank/source/index.vue

@@ -15,8 +15,8 @@
           <router-link :to="'/biobank/source/addsource/operation'">
             <el-button type="primary" size="mini" style="margin-left:10px; margin-top: -4px;">添加</el-button>
           </router-link>
-          <el-button size="mini" type="primary" style="margin-left:10px; margin-top: -4px;"
-            @click="importVisible = true">导入</el-button>
+          <!-- <el-button size="mini" type="primary" style="margin-left:10px; margin-top: -4px;"
+            @click="importVisible = true">导入</el-button> -->
         </span>
         <el-form ref="form" :inline="true" style="float: right; margin-top: -10px">
           <el-form-item label="姓名">
@@ -121,7 +121,7 @@
       </span>
     </el-dialog>
 
-    <el-dialog title="样本批量导入" :visible.sync="importVisible">
+    <el-dialog title="样本来源导入" :visible.sync="importVisible">
       <el-upload :action="filehost + '/api/uploads/exportanimal'" :show-file-list="false" :data="importfileparam"
         :on-success="handleexportfileSuccess" :before-upload="beforeexportfileUpload">
         <el-button size="mini" type="primary">点击上传导入文件</el-button> <span>{{importmsg}}</span>
@@ -281,7 +281,6 @@
       //导入蜜蜂样本来源
       importData() {
         let _this = this
-        console.log("11111111111111111",_this.importfilepath)
         if (_this.importfilepath === '') {
           _this.$message({
             type: 'warning',
@@ -313,7 +312,6 @@
           })
       },
       beforeexportfileUpload(file) {
-        console.log("dsdsdsdsdsdsdsdsdsdsdsdsdsdsdsdsds",this.filehost)
         let i = file.name.lastIndexOf('.')
         let typename = ''
         if (i > -1) {
@@ -333,7 +331,6 @@
         return true
       },
       handleexportfileSuccess(res, file) {
-        console.log("dsdsdsdsdsdsdsdsdsdsdsdsdsdsdsdsds",this.filehost)
         this.importfilepath = res
       },
       getuserlist() {

+ 15 - 54
src/dashoo.cn/frontend_web/src/pages/samples/prerecorded/_opera/prerecordedadd.vue

@@ -37,16 +37,16 @@
           </el-col>
           <el-col :span="8">
             <el-form-item label="来源编码">
-              <el-input v-model="sourceform.InnerNo" placeholder="来源编码"></el-input>
+              <el-input v-model="sourceform.InnerNo" placeholder="来源编码" :disabled="disInnerNo"></el-input>
             </el-form-item>
           </el-col>
           <el-col :span="8">
             <el-form-item label="身份证">
-              <el-input v-model="sourceform.IdCard" placeholder="身份证"></el-input>
+              <el-input v-model="sourceform.IdCard" placeholder="身份证" :disabled="disIdCard"></el-input>
             </el-form-item>
           </el-col>
           <el-col :span="8">
-            <el-form-item label="性别" prop="Sex">
+            <el-form-item label="性别" prop="Sex" :disabled="disSex">
               <template>
                 <el-radio class="radio" v-model="sourceform.Sex" :label="0">男</el-radio>
                 <el-radio class="radio" v-model="sourceform.Sex" :label="1">女</el-radio>
@@ -55,7 +55,7 @@
           </el-col>
           <el-col :span="8">
             <el-form-item label="年龄">
-              <el-input-number style="width:100%" v-model="sourceform.Age" placeholder="请输入年龄"></el-input-number>
+              <el-input-number style="width:100%" v-model="sourceform.Age" placeholder="请输入年龄" :disabled="disAge"></el-input-number>
             </el-form-item>
           </el-col>
         </el-card>
@@ -309,7 +309,7 @@
       <img width="100%" :src="dialogImageUrl" alt="">
     </el-dialog>
 
-    <choose-source-dialog @close="customsampsourceDialogCallback" :visible.sync="dialogsamplesourceVisible"></choose-source-dialog>
+    <choose-source-dialog @close="sourceDialogCallback" :visible.sync="dialogsamplesourceVisible"></choose-source-dialog>
   </div>
 </template>
 <script>
@@ -428,6 +428,10 @@
           Sex: 0,
           Age: 20
         },
+        disInnerNo: false,
+        disIdCard: false,
+        disSex: false,
+        disAge: false,
         sampleform: {
           BarCode: '', // 样本条码
           SampleCode: '', // 样本编码
@@ -534,7 +538,6 @@
       getType() {
         let _this = this;
         _this.$axios.get("/sampletype/list", {}).then(res => {
-          // response
           _this.sampletypelist = [];
           for (var i = 0; i < res.data.currentItemCount; i++) {
             _this.sampletypelist.push({
@@ -548,12 +551,10 @@
       },
       getautocodedata() {
         let _this = this;
-        // request
         // 获取自动编码数据
         _this.$axios
           .get("/sampleoperation/getautocodedata", {})
           .then(res => {
-            // response
             _this.sampleform.code_default = res.data.code_default;
             _this.sampleform.code_codeId = res.data.code_codeId;
             _this.sampleform.code_lastnum = res.data.code_lastnum;
@@ -563,17 +564,9 @@
               res.data.coderule_sampletype_flag;
           })
           .catch(err => {
-            // handle error
             console.error(err);
           });
       },
-      // getpublickz() {
-      //   let _this = this;
-      //   _this.$axios.get("/sampletype/getpublickzzd", {}).then(res => {
-      //     // response
-      //     _this.publickzlist = res.data;
-      //   });
-      // },
       getsampetypeunit() {
         // 获取样本单位
         let _this = this;
@@ -628,7 +621,6 @@
         _this.sampleform.SamplingOrgan = code
         _this.$axios.get("/sampleorgan/getorgannamebyfcode?code=" + code, {})
           .then(res => {
-            // response
             _this.sampleform.SamplingOrganName = res.data
 
           });
@@ -669,7 +661,6 @@
         // 获取样本类型数据
         let _this = this;
         _this.$axios.get("/sampletype/sampletypeajax?id=" + v, {}).then(res => {
-          // response
           _this.sampleform.Capacitystr = res.data.SampleType.DefaultCapacity + ""
           _this.sampleform.UsedCapacity = res.data.SampleType.SubpackageCapacity * res.data.SampleType.SubpackageNum
           if (res.data.VHours === "5000-1-1 23:59:59") {
@@ -714,14 +705,12 @@
             samporg, {}
           )
           .then(res => {
-            // response
             _this.sampleform.code_lastnum = res.data.num;
             _this.sampleform.SampleCode = res.data.barcode;
           });
       },
       getsametypetreelist() {
         let _this = this;
-        // request
         _this.$axios.get("/sampleorgan/gettreelist", {})
           .then(res => {
             _this.organlist2 = window.toolfun_gettreejson(
@@ -732,11 +721,10 @@
             );
           })
           .catch(err => {
-            // handle error
             console.error(err);
           });
       },
-      customsampsourceDialogCallback(val) { //样本来源选择数据显示
+      sourceDialogCallback(val) { //样本来源选择数据显示
         this.disabledsource = true
         this.sourceform.SourceId = val.Id
         this.sourceform.IdCard = val.IdCard
@@ -744,7 +732,10 @@
         this.sourceform.InnerNo = val.InnerNo
         this.sourceform.Sex = val.Sex
         this.sourceform.Age = val.Age
-
+        this.disInnerNo = true
+        this.disIdCard = true
+        this.disSex = true
+        this.disAge = true
       },
       goback() {
         if (this.$route.query.size) {
@@ -763,15 +754,6 @@
         // 拼接扩展字段
         let _this = this;
         let jsonstr = "";
-        // 公共扩展
-        // for (let i = 0; i < _this.publickzlist.length; i++) {
-        //   jsonstr +=
-        //     '"' +
-        //     _this.publickzlist[i].FieldName +
-        //     '" : "' +
-        //     _this.publickzlist[i].FieldDefault +
-        //     '",';
-        // }
         // 特有扩展
         for (let i = 0; i < _this.typetykzlist.length; i++) {
           jsonstr +=
@@ -839,7 +821,6 @@
                 _this.SubpackageCapacity + '&capacity=' + _this.sampleform.Capacity + '&groupid=' + _this.GroupId +
                 '&groupname=' + _this.GroupName, params)
               .then(res => {
-                // response
                 if (res.data.code === 0) {
                   this.$message({
                     type: 'success',
@@ -994,7 +975,7 @@
             if (_this.total === 0) {
               _this.saveSampleSourceInfo()
             } else {
-              _this.editSampleSourceInfo()
+              _this.savedata()
             }
           })
       },
@@ -1014,26 +995,6 @@
             }
           })
           .catch(err => {
-            // handle error
-            console.error(err)
-          })
-      },
-      //修改样本来源表
-      editSampleSourceInfo() {
-        let _this = this
-        _this.$axios.put('/samplessource/editbasic/' + _this.sourceform.SourceId, _this.sourceform)
-          .then(res => {
-            if (res.data.code === 0) {
-              _this.savedata()
-            } else {
-              _this.$message({
-                type: 'warning',
-                message: res.data.message
-              })
-            }
-          })
-          .catch(err => {
-            // handle error
             console.error(err)
           })
       },