Bladeren bron

超声波检测

lining 6 jaren geleden
bovenliggende
commit
4b448d32f1
20 gewijzigde bestanden met toevoegingen van 1890 en 2 verwijderingen
  1. 16 0
      src/dashoo.cn/backend/api/business/codecsequence/codecsequenceService.go
  2. 3 0
      src/dashoo.cn/backend/api/business/limsbalance/limsbalanceService.go
  3. 2 0
      src/dashoo.cn/backend/api/business/limsdataentry/limsdataentry.go
  4. 4 0
      src/dashoo.cn/backend/api/business/limsdoctemplate/limstemplateenum.go
  5. 24 0
      src/dashoo.cn/backend/api/business/limsreportoilpipeultrasonic/limsreportoilpipeultrasonic.go
  6. 58 0
      src/dashoo.cn/backend/api/business/limsreportoilpipeultrasonic/limsreportoilpipeultrasonicService.go
  7. 1 0
      src/dashoo.cn/backend/api/controllers/base.go
  8. 16 0
      src/dashoo.cn/backend/api/controllers/lims/limscreatereport.go
  9. 45 0
      src/dashoo.cn/backend/api/controllers/lims/limsdataentry.go
  10. 319 0
      src/dashoo.cn/backend/api/controllers/limswzjys/limsreportoilpipeultrasonic.go
  11. 6 0
      src/dashoo.cn/backend/api/routers/router.go
  12. 42 0
      src/dashoo.cn/frontend_web/src/api/wzjys/limsreportoilpipeultrasonic.js
  13. 7 0
      src/dashoo.cn/frontend_web/src/pages/lims/dataentry/alltask.vue
  14. 77 0
      src/dashoo.cn/frontend_web/src/pages/lims/dataentry/index.vue
  15. 7 0
      src/dashoo.cn/frontend_web/src/pages/lims/dataentry/tacktodo.vue
  16. 181 0
      src/dashoo.cn/frontend_web/src/pages/lims/wzjys/reportoilpipeult/_opera/datahistory.vue
  17. 808 0
      src/dashoo.cn/frontend_web/src/pages/lims/wzjys/reportoilpipeult/_opera/datalist.vue
  18. 273 0
      src/dashoo.cn/frontend_web/src/pages/lims/wzjys/reportoilpipeult/_opera/operation.vue
  19. 0 1
      src/dashoo.cn/frontend_web/src/pages/lims/wzjys/reportpetroleumpipe/_opera/datalist.vue
  20. 1 1
      src/dashoo.cn/frontend_web/src/pages/setting/testtype.vue

+ 16 - 0
src/dashoo.cn/backend/api/business/codecsequence/codecsequenceService.go

@@ -563,4 +563,20 @@ func (s *CodecSequenceService)GetDetailLiquidTransportation(accCode string) stri
 	sequence := s.GetSequenceByName(accCode, seqName)
 	seqStr := "J能QP1.3—"+ strconv.Itoa(time.Now().Year()) + "-" + fmt.Sprintf("%03s", strconv.Itoa(sequence))
 	return seqStr
+}
+
+// 油套管超声波检测数据录入
+func (s *CodecSequenceService)GetDetailOilPipeUlt(accCode string) string{
+	seqName := "DetailOilPipeUlt"
+	sequence := s.GetSequenceByName(accCode, seqName)
+	seqStr := "J物Q2.1-"+ strconv.Itoa(time.Now().Year()) + "-" + fmt.Sprintf("%03s", strconv.Itoa(sequence))
+	return seqStr
+}
+
+// 油套管超声波检测数据录入
+func (s *CodecSequenceService)GetReportOilPipeUlt(accCode string) string{
+	seqName := "ReportOilPipeUlt"
+	sequence := s.GetSequenceByName(accCode, seqName)
+	seqStr := "J物Q2-2-"+ strconv.Itoa(time.Now().Year()) + "-" + fmt.Sprintf("%03s", strconv.Itoa(sequence))
+	return seqStr
 }

+ 3 - 0
src/dashoo.cn/backend/api/business/limsbalance/limsbalanceService.go

@@ -246,6 +246,9 @@ func (this *LimsBalanceService) CreateDataentry(AccCode string, UserNames string
 	case limsdoctemplate.DAYT_LIQUIDTRANSPORTATION_DETAIL:
 		//离心泵数据录入
 		seqStr = codecSvc.GetDetailLiquidTransportation(AccCode)
+	case limsdoctemplate.DAYT_REPORTOILPIPEULTRASONIC_DETAIL:
+		//超声波检测
+		seqStr = codecSvc.GetDetailOilPipeUlt(AccCode)
 	}
 	//根据分配人员创建多条数据录入记录
 	ConUserIdList := strings.Split(balancedata.ConUserId, ",")

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

@@ -188,11 +188,13 @@ type LimsDateEntry struct {
 	TBModel            string    `xorm:"VARCHAR(20)"` // 试块型号
 	ScanSnty           string    `xorm:"VARCHAR(20)"` // 扫查灵敏度
 	ScanRegu           string    `xorm:"VARCHAR(20)"` // 扫查调节
+	ScanMode           string    `xorm:"VARCHAR(20)"` // 扫查方式
 	TestLoc            string    `xorm:"VARCHAR(20)"` // 检测部位
 	Couplant           string    `xorm:"VARCHAR(20)"` // 耦合剂
 	Comp               float64    `xorm:"DECIMAL(10,2)"` // 补偿
 	UPRange            string    `xorm:"VARCHAR(20)"` // 声程范围
 	SVRange            float64    `xorm:"DECIMAL(10,2)"` //声速范围
+	UTNumber           string    `xorm:"VARCHAR(20)"` // 超声波 编号
 
 	CheckBy        string    `xorm:"VARCHAR(50)"`
 	CreatedTime    time.Time `xorm:"DATETIME created"` //创建时间

+ 4 - 0
src/dashoo.cn/backend/api/business/limsdoctemplate/limstemplateenum.go

@@ -155,4 +155,8 @@ const (
 	DAYT_LIQUIDTRANSPORTATION_REPORT string = "DAYT.LiquidTransportation.Report"
 	// 加热炉
 	DAYT_REPORTHEATINGFURNACE_REPORT string = "DAYT.ReportHeatingFurnace.Report"
+	// 超声波检测
+	DAYT_REPORTOILPIPEULTRASONIC_DETAIL string = "DAYT.ReportOilPipeUltrasonic.Detail"
+	// 超声波报告
+	DAYT_REPORTOILPIPEULTRASONIC_REPORT string = "DAYT.ReportOilPipeUltrasonic.Report"
 )

+ 24 - 0
src/dashoo.cn/backend/api/business/limsreportoilpipeultrasonic/limsreportoilpipeultrasonic.go

@@ -0,0 +1,24 @@
+package limsreportoilpipeultrasonic
+
+import (
+	"time"
+)
+
+type LimsReportOilPipeUltrasonic struct {
+	Id             int       `xorm:"not null pk autoincr INT(10)"`
+	EId            int       `xorm:"comment('委托单ID') INT(11)"`
+	TaskbalanceId  int       `xorm:"comment('任务分配表ID') INT(11)"`
+	DataentryId    int       `xorm:"comment('数据记录表ID') INT(11)"`
+	SampleNum      string    `xorm:"comment('样品编号') VARCHAR(20)"`
+	DefectLoc      string    `xorm:"comment('缺陷位置') VARCHAR(20)"`
+	Depth          float64   `xorm:"comment('缺陷深度') DECIMAL(10,2)"`
+	Length         float64   `xorm:"comment('缺陷长度') DECIMAL(10,2)"`
+	Heigth         float64   `xorm:"comment('缺陷高度') DECIMAL(10,2)"`
+	Remark         string    `xorm:"comment('备注') VARCHAR(255)"`
+	CreateUserId   int       `xorm:"INT(11)"`
+	CreateOn       time.Time `xorm:"DATETIME"`
+	CreateBy       string    `xorm:"VARCHAR(50)"`
+	ModifiedOn     time.Time `xorm:"DATETIME"`
+	ModifiedUserId int       `xorm:"INT(11)"`
+	ModifiedBy     string    `xorm:"VARCHAR(50)"`
+}

+ 58 - 0
src/dashoo.cn/backend/api/business/limsreportoilpipeultrasonic/limsreportoilpipeultrasonicService.go

@@ -0,0 +1,58 @@
+package limsreportoilpipeultrasonic
+
+import (
+	"dashoo.cn/backend/api/business/limsdataentry"
+	"dashoo.cn/backend/api/business/limsentrust"
+	"dashoo.cn/backend/api/business/workflow"
+	. "dashoo.cn/backend/api/mydb"
+	"dashoo.cn/utils"
+	"github.com/go-xorm/xorm"
+	"reflect"
+	"strings"
+)
+
+type LimsReportOilPipeUltrasonicService struct {
+	MyServiceBase
+}
+
+func GetLimsReportOilPipeUltrasonicService(xormEngine *xorm.Engine) *LimsReportOilPipeUltrasonicService {
+	s := new(LimsReportOilPipeUltrasonicService)
+	s.DBE = xormEngine
+	return s
+}
+
+/**
+ * 生成报告
+ */
+func (s *LimsReportOilPipeUltrasonicService) DataToExcelReport(entrustMainEntity limsentrust.LimsEntrustMain, dateentryname string, createreportname string, tablename string, seqStr string, retUrl string, entrustId string, dataentryIds string) (reportUrl string, err error) {
+	var reportList []LimsReportOilPipeUltrasonic
+	s.GetEntitysByOrderbyWhere(tablename, "DataEntryId in ("+dataentryIds+")", "DataEntryId", &reportList)
+	var dataentry limsdataentry.LimsDateEntry
+	s.GetEntityByIdBytbl(dateentryname, dataentryIds, &dataentry)
+	//模板下载到服务器
+	//_dir := utils.Cfg.MustValue("file", "tmplateDir") + entrustId
+	fileurl := strings.Split(retUrl, "|")
+	templateUrl := "http://" + fileurl[0]
+	fileName := fileurl[1]
+
+	svcActiviti := workflow.GetActivitiService(utils.DBE)
+	datamap := StructToMapDemo(dataentry)
+	//datamap := make(map[string]interface{})
+	datamap["seqStr"] = seqStr
+
+
+
+	reportUrl = svcActiviti.FillWordTemplate(datamap, templateUrl, fileName)
+
+	return reportUrl, err
+}
+
+func StructToMapDemo(obj interface{}) map[string]interface{} {
+	obj1 := reflect.TypeOf(obj)
+	obj2 := reflect.ValueOf(obj)
+	var data = make(map[string]interface{})
+	for i := 0; i < obj1.NumField(); i++ {
+		data[obj1.Field(i).Name] = obj2.Field(i).Interface()
+	}
+	return data
+}

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

@@ -255,6 +255,7 @@ var (
 	LimsReportDrillCollarName                string = "LimsReportDrillCollar"          //  石油专用管材钻铤检验记录
 	LimsPetroleUmPipeName                    string = "LimsReportPetroleumPipe"        //  石油专用管材方钻杆检验记录
 	LimsCertificateName                      string = "LimsCertificate"                //  关联证书表
+	LimsReportOilPipeUltrasonicName          string = "LimsReportOilPipeUltrasonic"   // 石油专用管材油(套)管超声波检测记录
 )
 
 //分页信息及数据

+ 16 - 0
src/dashoo.cn/backend/api/controllers/lims/limscreatereport.go

@@ -1,6 +1,16 @@
 package lims
 
 import (
+	"dashoo.cn/backend/api/business/limsreportalerkrgas"
+	"dashoo.cn/backend/api/business/limsreportelecpumpwell"
+	"dashoo.cn/backend/api/business/limsreportheatingfurnace"
+	"dashoo.cn/backend/api/business/limsreportliquidtransportation"
+	"dashoo.cn/backend/api/business/limsreportmotor"
+	"dashoo.cn/backend/api/business/limsreportdetHSgas"
+	"dashoo.cn/backend/api/business/limsreportdetelectoxygen"
+	"dashoo.cn/backend/api/business/limsreportoilpipeultrasonic"
+	"dashoo.cn/backend/api/business/limsreportpistonpumpunit"
+	"dashoo.cn/backend/api/business/limsreportscrewpump"
 	"encoding/base64"
 	"encoding/json"
 	"fmt"
@@ -1055,6 +1065,12 @@ func (this *CreateReportController) generateExcelReportN(entrustMain limsentrust
 		seqStrJS := codecSvc.GetReportHeatingFurnaceJS(this.User.AccCode)
 		svc := limsreportheatingfurnace.GetLimsReportHeatingFurnaceSessionService(session)
 		reportUrl, err = svc.DataToExcelReport(entrustMain, this.User.AccCode+LimsDateEntryName, this.User.AccCode+LimsCreateReportName, this.User.AccCode+LimsReportHeatingFurnaceName, seqStr, seqStrJS, docTemplate.FileURL, entrustId, dataentryIds)
+	case limsdoctemplate.DAYT_REPORTOILPIPEULTRASONIC_REPORT:
+		// 超声波检测
+		codecSvc := codecsequence.GetCodecSequenceService(utils.DBE)
+		seqStr := codecSvc.GetReportOilPipeUlt(this.User.AccCode)
+		svc := limsreportoilpipeultrasonic.GetLimsReportOilPipeUltrasonicService(utils.DBE)
+		reportUrl, err = svc.DataToExcelReport(entrustMain, this.User.AccCode+LimsDateEntryName, this.User.AccCode+LimsCreateReportName, this.User.AccCode+LimsReportOilPipeUltrasonicName, seqStr, docTemplate.FileURL, entrustId, dataentryIds)
 	}
 
 	return reportUrl, UnHGReportUrl, err

+ 45 - 0
src/dashoo.cn/backend/api/controllers/lims/limsdataentry.go

@@ -4,6 +4,7 @@ import (
 	"dashoo.cn/backend/api/business/limsdrillcollar"
 	"dashoo.cn/backend/api/business/limspetroleumpipe"
 	"dashoo.cn/backend/api/business/limspipedrillpipe"
+	"dashoo.cn/backend/api/business/limsreportoilpipeultrasonic"
 	"encoding/base64"
 	"encoding/json"
 	"errors"
@@ -2549,6 +2550,48 @@ func (this *LimsDataEntryController) exportdatatoexcel(fileurl string, dataentry
 		//var userlist limsdataentry.UserModel
 		//svc.GetEntityByWhere(BaseUserName, "Id = '"+utils.ToStr(dataentrylist.JHUserId)+"'", &userlist)
 		DocUrl, err = svc.DocDataToExcel(entrustlist[0], dataentrylist, this.User.AccCode+LimsReportDrillCollarName, "", fileurl)
+	case limsdoctemplate.DAYT_REPORTOILPIPEULTRASONIC_DETAIL:
+		// 油(套)管超声波检测
+		//var model limsdataentry.LimsDateEntry
+		//svc := limsdataentry.GetLimsDataEntryService(utils.DBE)
+		var tabledata []limsreportoilpipeultrasonic.LimsReportOilPipeUltrasonic
+		where1 := "DataEntryId=" + strconv.Itoa(dataentrylist.Id)
+		//has := svc.GetEntityByWhere(this.User.AccCode+LimsReportOilPipeUltrasonicName, where1, &model)
+		//wheretable := "MId=" + strconv.Itoa(model.Id)
+		//svc.GetEntitysByWhere(this.User.AccCode+LimsHeatingFurnaceItemsName, wheretable, &tabledata)
+		svc.GetEntitysByOrderbyWhere(this.User.AccCode+LimsReportOilPipeUltrasonicName, where1, "Id desc", &tabledata)
+		datamap := StructToMapDemo(dataentrylist)
+
+
+		var interfaceSlice []interface{} = make([]interface{}, len(tabledata))
+		for i, d := range tabledata {
+			interfaceSlice[i] = d
+		}
+		datamap["TableData"] = workflow.TableDetailData{
+			DataList:   interfaceSlice,
+			StartRow:   10,
+			NeedDelRow: 7,
+			ReverseRow: 0,
+			Cols: []string{"SampleNum", "DefectLoc", "Depth", "Length", "Heigth", "Remark"},
+			Merge:   []string{"1,2","4,5"},
+			ColsNum: 8,
+		}
+		datamap["TableComment"] = []string{"TableData"}
+
+		svcActiviti := workflow.GetActivitiService(utils.DBE)
+		var template limsdoctemplate.LimsDocTemplate
+		wheretem := "Id=" + strconv.Itoa(entrustlist[0].DocId)
+		has := svc.GetEntityByWhere(this.User.AccCode+LimsDocTemplateName, wheretem, &template)
+		if has {
+			urlArr := strings.Split(template.FileURL, "|")
+			templateUrl := "http://" + urlArr[0]
+			fileName := urlArr[1]
+			DocUrl = svcActiviti.FillWordTemplate(datamap, templateUrl, fileName)
+			err = nil
+		} else {
+			DocUrl = ""
+			err = errors.New("")
+		}
 	}
 	return DocUrl, err
 }
@@ -4394,6 +4437,8 @@ func (this *LimsDataEntryController) UpdateEntity() {
 		"Comp",
 		"UPRange",
 		"SVRange",
+		"ScanMode",
+		"UTNumber",
 	}
 	err := svc.UpdateEntityBytbl(this.User.AccCode+LimsDateEntryName, id, &model, cols)
 	if err == nil {

+ 319 - 0
src/dashoo.cn/backend/api/controllers/limswzjys/limsreportoilpipeultrasonic.go

@@ -0,0 +1,319 @@
+package limswzjys
+
+import (
+"dashoo.cn/business/userRole"
+"dashoo.cn/backend/api/business/baseUser"
+"dashoo.cn/backend/api/business/limsreportoilpipeultrasonic"
+. "dashoo.cn/backend/api/controllers"
+"dashoo.cn/utils"
+"encoding/json"
+"strings"
+"time"
+)
+
+type LimsReportOilPipeUltrasonicController struct {
+	BaseController
+}
+
+// @Title 获取列表
+// @Description get user by token
+// @Success 200 {object} []limsreportoilpipeultrasonic.LimsReportOilPipeUltrasonic
+// @router /list [get]
+func (this *LimsReportOilPipeUltrasonicController) GetEntityList() {
+
+	//获取分页信息
+	page := this.GetPageInfoForm()
+	where := " 1=1 "
+	orderby := "Id"
+	asc := false
+	Order := this.GetString("Order")
+	Prop := this.GetString("Prop")
+	if Order != "" && Prop != "" {
+		orderby = Prop
+		if Order == "asc" {
+			asc = true
+		}
+	}
+	Id := this.GetString("Id")
+	EId := this.GetString("EId")
+	TaskBalanceId := this.GetString("TaskBalanceId")
+	DataEntryId := this.GetString("DataEntryId")
+	SampleNum := this.GetString("SampleNum")
+	DefectLoc := this.GetString("DefectLoc")
+	Depth := this.GetString("Depth")
+	Length := this.GetString("Length")
+	Heigth := this.GetString("Heigth")
+	Remark := this.GetString("Remark")
+	CreateUserId := this.GetString("CreateUserId")
+	CreateOn := this.GetString("CreateOn")
+	CreateBy := this.GetString("CreateBy")
+	ModifiedOn := this.GetString("ModifiedOn")
+	ModifiedUserId := this.GetString("ModifiedUserId")
+	ModifiedBy := this.GetString("ModifiedBy")
+
+	if Id != "" {
+		where = where + " and Id like '%" + Id + "%'"
+	}
+
+
+	if EId != "" {
+		where = where + " and EId like '%" + EId + "%'"
+	}
+
+
+	if TaskBalanceId != "" {
+		where = where + " and TaskBalanceId like '%" + TaskBalanceId + "%'"
+	}
+
+
+	if DataEntryId != "" {
+		where = where + " and DataEntryId like '%" + DataEntryId + "%'"
+	}
+
+
+	if SampleNum != "" {
+		where = where + " and SampleNum like '%" + SampleNum + "%'"
+	}
+
+
+	if DefectLoc != "" {
+		where = where + " and DefectLoc like '%" + DefectLoc + "%'"
+	}
+
+
+	if Depth != "" {
+		where = where + " and Depth like '%" + Depth + "%'"
+	}
+
+
+	if Length != "" {
+		where = where + " and Length like '%" + Length + "%'"
+	}
+
+
+	if Heigth != "" {
+		where = where + " and Heigth like '%" + Heigth + "%'"
+	}
+
+
+	if Remark != "" {
+		where = where + " and Remark like '%" + Remark + "%'"
+	}
+
+
+	if CreateUserId != "" {
+		where = where + " and CreateUserId like '%" + CreateUserId + "%'"
+	}
+
+
+	if CreateOn != "" {
+		where = where + " and CreateOn like '%" + CreateOn + "%'"
+	}
+
+
+	if CreateBy != "" {
+		where = where + " and CreateBy like '%" + CreateBy + "%'"
+	}
+
+
+	if ModifiedOn != "" {
+		where = where + " and ModifiedOn like '%" + ModifiedOn + "%'"
+	}
+
+
+	if ModifiedUserId != "" {
+		where = where + " and ModifiedUserId like '%" + ModifiedUserId + "%'"
+	}
+
+
+	if ModifiedBy != "" {
+		where = where + " and ModifiedBy like '%" + ModifiedBy + "%'"
+	}
+
+
+	if CreateOn != "" {
+		dates := strings.Split(CreateOn, ",")
+		if len(dates) == 2 {
+			minDate := dates[0]
+			maxDate := dates[1]
+			where = where + " and CreateOn>='" + minDate + "' and CreateOn<='" + maxDate + "'"
+		}
+	}
+
+	svc := limsreportoilpipeultrasonic.GetLimsReportOilPipeUltrasonicService(utils.DBE)
+	var list []limsreportoilpipeultrasonic.LimsReportOilPipeUltrasonic
+	total := svc.GetPagingEntitiesWithOrderBytbl(this.User.AccCode, page.CurrentPage, page.Size, orderby, asc, &list, where)
+	var datainfo DataInfo
+	datainfo.Items = list
+	datainfo.CurrentItemCount = total
+	datainfo.PageIndex = page.CurrentPage
+	datainfo.ItemsPerPage = page.Size
+	this.Data["json"] = &datainfo
+	this.ServeJSON()
+}
+
+// @Title 获取字典列表
+// @Description get user by token
+// @Success 200 {object} map[string]interface{}
+// @router /dictlist [get]
+func (this *LimsReportOilPipeUltrasonicController) GetDictList() {
+	dictList := make(map[string]interface{})
+	//dictSvc := items.GetItemsService(utils.DBE)
+	userSvc := baseUser.GetBaseUserService(utils.DBE)
+	//customerSvc := svccustomer.GetCustomerService(utils.DBE)
+	//dictList["WellNo"] = dictSvc.GetKeyValueItems("WellNo", this.User.AccCode)
+	var userEntity userRole.Base_User
+	userSvc.GetEntityById(this.User.Id, &userEntity)
+	dictList["Supervisers"] = userSvc.GetUserListByDepartmentId(this.User.AccCode, userEntity.Departmentid)
+
+	//var dictCustomer []svccustomer.Customer
+	//customerSvc.GetEntitysByWhere(this.User.AccCode + CustomerName, "", &dictCustomer)
+	//dictList["EntrustCorp"] = &dictCustomer
+
+	var datainfo DataInfo
+	datainfo.Items = dictList
+	this.Data["json"] = &datainfo
+	this.ServeJSON()
+}
+
+// @Title 获取实体
+// @Description 获取实体
+// @Success 200 {object} limsreportoilpipeultrasonic.LimsReportOilPipeUltrasonic
+// @router /get/:id [get]
+func (this *LimsReportOilPipeUltrasonicController) GetEntity() {
+	Id := this.Ctx.Input.Param(":id")
+
+	var model limsreportoilpipeultrasonic.LimsReportOilPipeUltrasonic
+	svc := limsreportoilpipeultrasonic.GetLimsReportOilPipeUltrasonicService(utils.DBE)
+	svc.GetEntityByIdBytbl(this.User.AccCode+LimsReportOilPipeUltrasonicName, Id, &model)
+
+	this.Data["json"] = &model
+	this.ServeJSON()
+}
+
+// @Title 添加
+// @Description 新增
+// @Param 	body body limsreportoilpipeultrasonic.LimsReportOilPipeUltrasonic
+// @Success	200	{object} controllers.Request
+// @router /add [post]
+func (this *LimsReportOilPipeUltrasonicController) AddEntity() {
+	var model limsreportoilpipeultrasonic.LimsReportOilPipeUltrasonic
+	var jsonBlob = this.Ctx.Input.RequestBody
+	svc := limsreportoilpipeultrasonic.GetLimsReportOilPipeUltrasonicService(utils.DBE)
+
+	json.Unmarshal(jsonBlob, &model)
+	model.CreateOn = time.Now()
+	model.CreateBy = this.User.Realname
+	model.CreateUserId, _ = utils.StrTo(this.User.Id).Int()
+
+	_, err := svc.InsertEntityBytbl(this.User.AccCode+LimsReportOilPipeUltrasonicName, &model)
+
+	var errinfo ErrorDataInfo
+	if err == nil {
+		//新增
+		errinfo.Message = "添加成功!"
+		errinfo.Code = 0
+		errinfo.Item = model.Id
+		this.Data["json"] = &errinfo
+		this.ServeJSON()
+	} else {
+		errinfo.Message = "添加失败!" + utils.AlertProcess(err.Error())
+		errinfo.Code = -1
+		this.Data["json"] = &errinfo
+		this.ServeJSON()
+	}
+}
+
+// @Title 修改实体
+// @Description 修改实体
+// @Param 	body body limsreportoilpipeultrasonic.LimsReportOilPipeUltrasonic
+// @Success	200	{object} controllers.Request
+// @router /update/:id [post]
+func (this *LimsReportOilPipeUltrasonicController) UpdateEntity() {
+	id := this.Ctx.Input.Param(":id")
+	var errinfo ErrorInfo
+	if id == "" {
+		errinfo.Message = "操作失败!请求信息不完整"
+		errinfo.Code = -2
+		this.Data["json"] = &errinfo
+		this.ServeJSON()
+		return
+	}
+
+	var model limsreportoilpipeultrasonic.LimsReportOilPipeUltrasonic
+	svc := limsreportoilpipeultrasonic.GetLimsReportOilPipeUltrasonicService(utils.DBE)
+
+	var jsonBlob = this.Ctx.Input.RequestBody
+	json.Unmarshal(jsonBlob, &model)
+	model.ModifiedOn = time.Now()
+	model.ModifiedBy = this.User.Realname
+	model.ModifiedUserId, _ = utils.StrTo(this.User.Id).Int()
+
+	cols := []string{
+
+		"Id",
+		"EId",
+		"TaskBalanceId",
+		"DataEntryId",
+		"SampleNum",
+		"DefectLoc",
+		"Depth",
+		"Length",
+		"Heigth",
+		"Remark",
+		"CreateUserId",
+		"CreateOn",
+		"CreateBy",
+		"ModifiedOn",
+		"ModifiedUserId",
+		"ModifiedBy",
+
+
+	}
+	err := svc.UpdateEntityBytbl(this.User.AccCode+LimsReportOilPipeUltrasonicName, id, &model, cols)
+	if err == nil {
+		errinfo.Message = "修改成功!"
+		errinfo.Code = 0
+		this.Data["json"] = &errinfo
+		this.ServeJSON()
+	} else {
+		errinfo.Message = "修改失败!" + utils.AlertProcess(err.Error())
+		errinfo.Code = -1
+		this.Data["json"] = &errinfo
+		this.ServeJSON()
+	}
+}
+
+// @Title 删除单条信息
+// @Description
+// @Success 200 {object} ErrorInfo
+// @Failure 403 :id 为空
+// @router /delete/:Id [delete]
+func (this *LimsReportOilPipeUltrasonicController) DeleteEntity() {
+	Id := this.Ctx.Input.Param(":Id")
+	var errinfo ErrorInfo
+	if Id == "" {
+		errinfo.Message = "操作失败!请求信息不完整"
+		errinfo.Code = -2
+		this.Data["json"] = &errinfo
+		this.ServeJSON()
+		return
+	}
+	var model limsreportoilpipeultrasonic.LimsReportOilPipeUltrasonic
+	var entityempty limsreportoilpipeultrasonic.LimsReportOilPipeUltrasonic
+	svc := limsreportoilpipeultrasonic.GetLimsReportOilPipeUltrasonicService(utils.DBE)
+	opdesc := "删除-" + Id
+	err := svc.DeleteOperationAndWriteLogBytbl(this.User.AccCode+LimsReportOilPipeUltrasonicName, BaseOperationLogName, Id, &model, &entityempty, utils.ToStr(this.User.Id), this.User.Username, opdesc, this.User.AccCode, "钻井日报")
+	if err == nil {
+		errinfo.Message = "删除成功"
+		errinfo.Code = 0
+		this.Data["json"] = &errinfo
+		this.ServeJSON()
+	} else {
+		errinfo.Message = "删除失败!" + utils.AlertProcess(err.Error())
+		errinfo.Code = -1
+		this.Data["json"] = &errinfo
+		this.ServeJSON()
+	}
+}
+

+ 6 - 0
src/dashoo.cn/backend/api/routers/router.go

@@ -557,6 +557,12 @@ func init() {
 				&limswzjys.LimsReportDrillCollarController{},
 			),
 		),
+		// 石油专用管材油(套)管超声波检测记录
+		beego.NSNamespace("/limsreportoilpipeultrasonic",
+			beego.NSInclude(
+				&limswzjys.LimsReportOilPipeUltrasonicController{},
+			),
+		),
 	)
 	beego.AddNamespace(ns)
 }

+ 42 - 0
src/dashoo.cn/frontend_web/src/api/wzjys/limsreportoilpipeultrasonic.js

@@ -0,0 +1,42 @@
+export default {
+  getList (CreateOn, params, myAxios) {
+    return myAxios({
+      url: '/limsreportoilpipeultrasonic/list?CreateOn=' + CreateOn,
+      method: 'GET',
+      params: params
+    })
+  },
+  getDictList (myAxios) {
+    return myAxios({
+      url: '/limsreportoilpipeultrasonic/dictlist/',
+      method: 'GET'
+    })
+  },
+  getEntity (entityId, myAxios) {
+    return myAxios({
+      url: '/limsreportoilpipeultrasonic/get/' + entityId,
+      method: 'GET'
+    })
+  },
+  addEntity (formData, myAxios) {
+    return myAxios({
+      url: '/limsreportoilpipeultrasonic/add',
+      method: 'post',
+      data: formData
+    })
+  },
+  updateEntity (entityId, formData, myAxios) {
+    return myAxios({
+      url: '/limsreportoilpipeultrasonic/update/' + entityId,
+      method: 'post',
+      data: formData
+    })
+  },
+  deleteEntity (entityId, myAxios) {
+    return myAxios({
+      url: '/limsreportoilpipeultrasonic/delete/' + entityId,
+      method: 'delete'
+    })
+  }
+}
+

+ 7 - 0
src/dashoo.cn/frontend_web/src/pages/lims/dataentry/alltask.vue

@@ -879,6 +879,13 @@
               query: queryParams
             })
             break
+          // 石油专用管材油(套)管超声波检测
+          case 'DAYT.ReportOilPipeUltrasonic.Detail':
+            this.$router.push({
+              path: '/lims/wzjys/reportoilpipeult/datalist',
+              query: queryParams
+            })
+            break
           default:
             this.$message.warning('无模板类型相匹配,请重试');
         }

+ 77 - 0
src/dashoo.cn/frontend_web/src/pages/lims/dataentry/index.vue

@@ -917,6 +917,83 @@
               query: queryParams
             })
             break
+          // 离心泵机组液体输送系统节能监测原始记录
+          case 'DAYT.LiquidTransportation.Detail':
+            this.$router.push({
+              path: '/lims/reportliquidtransportation/operation',
+              query: queryParams
+            })
+            break
+          // 柱塞泵机组液体输送系统
+          case 'DAYT.ReportPistonPumpUnit.Detail':
+            this.$router.push({
+              path: '/lims/reportpistonpumpunit/operation',
+              query: queryParams
+            })
+            break
+          // 电动机节能
+          case 'DAYT.LimsReportMotor.Detail':
+            this.$router.push({
+              path: '/lims/reportmotor/operation',
+              query: queryParams
+            })
+            break
+          // 电泵井节能
+          case 'DAYT.LimsReportElecPumpWell.Detail':
+            this.$router.push({
+              path: '/lims/reportelecpumpwell/operation',
+              query: queryParams
+            })
+            break
+          // 螺杆泵
+          case 'DAYT.LimsReportScrewPump.Detail':
+            this.$router.push({
+              path: '/lims/reportscrewpump/operation',
+              query: queryParams
+            })
+            break
+          // 油田专用变压器
+          case 'DAYT.LimsReportSpecialField.Detail':
+            this.$router.push({
+              path: '/lims/reportspecialfield/operation',
+              query: queryParams
+            })
+            break
+          // 加热炉节能监测原始记录表
+          case 'DAYT.ReportHeatingFurnace.Detail':
+            this.$router.push({
+              path: '/lims/reportheatingfurnace/operation',
+              query: queryParams
+            })
+            break
+          // 石油专用管材钻杆
+          case 'DAYT.PipeDrillPipe.Detail':
+            this.$router.push({
+              path: '/lims/wzjys/reportpipedrillpipe/datalist',
+              query: queryParams
+            })
+            break
+          // 石油专用管材方钻杆
+          case 'DAYT.PetroleumPipe.Detail':
+            this.$router.push({
+              path: '/lims/wzjys/reportpetroleumpipe/datalist',
+              query: queryParams
+            })
+            break
+          // 钻铤
+          case 'DAYT.DrillCollar.Detail':
+            this.$router.push({
+              path: '/lims/wzjys/reportdrillcollar/datalist',
+              query: queryParams
+            })
+            break
+          // 石油专用管材油(套)管超声波检测
+          case 'DAYT.ReportOilPipeUltrasonic.Detail':
+            this.$router.push({
+              path: '/lims/wzjys/reportoilpipeult/datalist',
+              query: queryParams
+            })
+            break
           default:
             this.$message.warning('无模板类型相匹配,请重试');
         }

+ 7 - 0
src/dashoo.cn/frontend_web/src/pages/lims/dataentry/tacktodo.vue

@@ -953,6 +953,13 @@
               query: queryParams
             })
             break
+          // 石油专用管材油(套)管超声波检测
+          case 'DAYT.ReportOilPipeUltrasonic.Detail':
+            this.$router.push({
+              path: '/lims/wzjys/reportoilpipeult/datalist',
+              query: queryParams
+            })
+            break
           default:
             this.$message.warning('无模板类型相匹配,请重试')
         }

+ 181 - 0
src/dashoo.cn/frontend_web/src/pages/lims/wzjys/reportoilpipeult/_opera/datahistory.vue

@@ -0,0 +1,181 @@
+<template>
+  <el-dialog title="历史数据录入信息" :visible.sync="dialogTableVisible">
+    <!--<br />-->
+    <!--<el-alert title="" description="您可以选择相同模板输入的历史数据,加入您的数据中再做相应修改" type="success" :closable="false">-->
+    <!--</el-alert>-->
+    <!--<br />-->
+    <el-card class="box-card">
+      <el-table :data="dataentryhistorylist" :stripe="true">
+        <el-table-column label="操作" width="100">
+          <template slot-scope="scope">
+            <el-button @click="handleselectentry(scope.row)" type="primary" plain size="mini" title="选择">
+              选择</el-button>
+          </template>
+        </el-table-column>
+        <el-table-column sortable min-width="120" align="center" show-overflow-tooltip prop="DataEntryCode" label="委托单号"></el-table-column>
+        <el-table-column sortable min-width="120" align="center" show-overflow-tooltip prop="CustomerName" label="委托单位"></el-table-column>
+        <el-table-column sortable min-width="120" align="center" show-overflow-tooltip prop="DocType" label="文档名称"></el-table-column>
+        <el-table-column sortable min-width="120" align="center" show-overflow-tooltip prop="CreatedTime" label="生成时间">
+          <template slot-scope="scope">
+            <p>{{jstimehandle(scope.row.CreatedTime)}}</p>
+          </template>
+        </el-table-column>
+      </el-table>
+      <el-pagination @current-change="historyhandleCurrentChange" :current-page="historycurrentPage"
+                     :page-sizes="[10, 15, 20, 25]" :page-size="historysize" layout="total, sizes, prev, pager, next, jumper" :total="historycurrentItemCount">
+      </el-pagination>
+    </el-card>
+  </el-dialog>
+</template>
+<script>
+  import { mapGetters } from 'vuex'
+  import api from '@/api/lims/dataEntry'
+
+  export default {
+    computed: {
+      ...mapGetters({
+        authUser: 'authUser'
+      })
+    },
+    name: 'limsreportoilpipeultHistory',
+    data () {
+      return {
+        PositionCheckId: '',
+        TestDepartId: '',
+        CustomerId: '',
+        MId: '',
+        tbid: '',
+        EId: '',
+        DataEntryId: '',
+        datadocId: '',
+        historycurrentItemCount: 0,
+        historycurrentPage: 1,
+        historysize: 10,
+        dialogTableVisible: false,
+        dataentryhistorylist: []
+      }
+    },
+    created () {
+    },
+    methods: {
+      OpenOrignDataInput (values) {
+        this.dataentryhistorylist = []
+        this.tbid = values.TaskBalanceId
+        this.EId = values.EId
+        this.DataEntryId = values.DataEntryId
+        this.datadocId = values.DataDocId
+        this.TestDepartId = values.TestDepartId
+        this.PositionCheckId = values.PositionCheckId
+        this.CustomerId = values.EntrustCorp
+        this.MId = values.Id
+        const params = {
+          _currentPage: this.historycurrentPage,
+          _size: this.historysize,
+          datadocId: this.datadocId,
+          testdetailId: values.TestDepartId,
+          postioncheckId: values.PositionCheckId,
+          customerId: values.EntrustCorp
+        }
+        let entryId = values.Id
+        api.getDataEntryReportList(params, entryId, this.$axios)
+          .then(res => {
+            this.dataentryhistorylist = res.data.item
+            this.historycurrentItemCount = res.data.currentItemCount
+          }).catch(err => {
+            console.error(err)
+          })
+      },
+
+      handleselectentry (val) {
+        let params = {
+          eid: this.EId,
+          tbid: this.tbid,
+          deid: this.DataEntryId,
+          datadocId: this.datadocId
+        }
+        api.dataEntryhistory(params, val.Id, this.$axios)
+          .then(res => {
+            if (res.data.code === 0) {
+              this.dialogTableVisible = false
+              this.$emit('init-datalist')
+            } else {
+              this.$message({
+                type: 'warning',
+                message: res.data.message
+              })
+            }
+          }).catch(err => {
+            console.error(err)
+          })
+      },
+
+      historyhandleCurrentChange (value) {
+        this.historycurrentPage = value
+        this.refreshdataentrydata()
+      },
+
+      historyhandleSizeChange (value) {
+        this.historysize = value
+        this.historycurrentPage = 1
+        this.refreshdataentrydata()
+      },
+
+      // 选择页码刷新历史数据
+      refreshdataentrydata () {
+        const params = {
+          _currentPage: this.historycurrentPage,
+          _size: this.historysize,
+          datadocId: this.datadocId,
+          testdetailId: this.TestDepartId,
+          postioncheckId: this.PositionCheckId,
+          customerId: this.CustomerId
+        }
+        let entryId = this.MId
+        api.getDataEntryReportList(params, entryId, this.$axios)
+          .then(res => {
+            this.dataentryhistorylist = res.data.item
+            this.historycurrentItemCount = res.data.currentItemCount
+          }).catch(err => {
+            console.error(err)
+          })
+      },
+
+      jstimehandle (val) {
+        if (val === '') {
+          return '----'
+        } else if (val === '0001-01-01T08:00:00+08:00') {
+          return '----'
+        } else if (val === '5000-01-01T23:59:59+08:00') {
+          return '永久'
+        } else {
+          val = val.replace('T', ' ')
+          return val.substring(0, 10)
+        }
+      },
+
+      formatDateTime (date) {
+        var y = date.getFullYear()
+        var m = date.getMonth() + 1
+        m = m < 10 ? ('0' + m) : m
+        var d = date.getDate()
+        d = d < 10 ? ('0' + d) : d
+        var h = date.getHours()
+        var minute = date.getMinutes()
+        minute = minute < 10 ? ('0' + minute) : minute
+        return y + '-' + m + '-' + d + ' ' + h + ':' + minute
+      },
+
+      in_array_positionname (stringToSearch, arrayToSearch) {
+        for (let s = 0; s < arrayToSearch.length; s++) {
+          let thisEntry = arrayToSearch[s].PositionName
+          if (thisEntry === stringToSearch) {
+            return true
+          }
+        }
+        return false
+      }
+
+    }
+  }
+</script>
+

+ 808 - 0
src/dashoo.cn/frontend_web/src/pages/lims/wzjys/reportoilpipeult/_opera/datalist.vue

@@ -0,0 +1,808 @@
+<template>
+  <div>
+    <el-breadcrumb class="heading">
+      <el-breadcrumb-item :to="{ path: '/' }">平台首页</el-breadcrumb-item>
+      <el-breadcrumb-item :to="{ path: '/lims/wzjys/reportpetroleumpipe' }">石油专用管材方钻杆检验记录</el-breadcrumb-item>
+    </el-breadcrumb>
+    <el-card>
+      <div slot="header">
+        <span>
+          <i class="icon icon-table2"></i> 石油专用管材油(套)管超声波检测记录
+        </span>
+        <span style="float: right;">
+          <el-button type="primary" size="mini" v-if="this.ischeck===1" @click="jiaoheshowdialog">校核</el-button>
+          <el-button type="primary" size="mini" v-if="this.DataStatus==0||this.DataStatus==5||this.DataStatus==3"
+                     @click="setProoFreadShow">提交校核</el-button>
+          <el-button type="plain" size="mini" style="margin-left:10px; margin-top: -4px;"
+                     v-if="this.DataStatus==0||this.DataStatus==5||this.DataStatus==3" @click="addDataEntity">添加明细</el-button>
+          <!--<el-button type="plain" @click="searchCommand('search')" size="mini"-->
+          <!--style="margin-left:10px; margin-top: -4px;">查询</el-button>-->
+
+          <router-link v-if="this.sign == '1'" :to="'/lims/dataentry/tacktodo'">
+            <el-button type="primary" size="mini" style="margin-left: 8px">返回</el-button>
+          </router-link>
+          <router-link v-else-if="this.sign == '2'" :to="'/lims/dataentry'">
+            <el-button type="primary" size="mini" style="margin-left: 8px">返回</el-button>
+          </router-link>
+          <router-link v-else-if="this.sign == '3'" :to="'/lims/dataentry/alltask'">
+            <el-button type="primary" size="mini" style="margin-left: 8px">返回</el-button>
+          </router-link>
+          <router-link v-else :to="'/lims/dataentry'">
+            <el-button type="primary" size="mini" style="margin-left: 8px">返回</el-button>
+          </router-link>
+        </span>
+        <el-form ref="form" :inline="true" style="float: right; margin-top: -7px">
+          <el-form-item label="样品编号">
+            <!--<el-date-picker size="mini" style="width: 220px" v-model="CreateOn" type="daterange" range-separator="至"-->
+            <!--start-placeholder="生成日期" end-placeholder="结束日期"></el-date-picker>-->
+            <el-input size="mini" v-model="searchForm.SampleNumber" style="width:100%" placeholder="请输入"></el-input>
+          </el-form-item>
+
+          <el-form-item>
+            <el-dropdown split-button type="primary" size="mini" @click="handleSearch" @command="searchCommand">
+              查询
+              <el-dropdown-menu slot="dropdown">
+                <el-dropdown-item command="search">高级查询</el-dropdown-item>
+                <el-dropdown-item command="clear">查询重置</el-dropdown-item>
+              </el-dropdown-menu>
+            </el-dropdown>
+          </el-form-item>
+        </el-form>
+      </div>
+      <el-form label-width="120px" ref="formDataMain" :model="formDataMain">
+        <el-row>
+          <el-col :span="6">
+            <el-form-item label="编号">
+              <el-input v-model="formDataMain.UTNumber" placeholder="请输入" style="width: 100%"
+                        :disabled="DataStatus != 0 && DataStatus != 5 && DataStatus != 3">
+              </el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :span="6">
+            <el-form-item label="产品名称" prop="Product" :rules="{ required: true, message: '产品名称不能为空!'}">
+              <el-input v-model="formDataMain.Product" placeholder="请输入" style="width: 100%"
+                        :disabled="DataStatus != 0 && DataStatus != 5 && DataStatus != 3">
+              </el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :span="6">
+            <el-form-item label="产品规格">
+              <el-input v-model="formDataMain.Spec" placeholder="请输入" style="width: 100%"
+                        :disabled="DataStatus != 0 && DataStatus != 5 && DataStatus != 3">
+              </el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :span="6">
+            <el-form-item label="试块型号">
+              <el-input v-model="formDataMain.TBModel" placeholder="请输入" style="width: 100%"
+                        :disabled="DataStatus != 0 && DataStatus != 5 && DataStatus != 3">
+              </el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :span="6">
+            <el-form-item label="扫描灵敏度">
+              <el-input v-model="formDataMain.ScanSnty" placeholder="请输入" style="width: 100%"
+                        :disabled="DataStatus != 0 && DataStatus != 5 && DataStatus != 3">
+              </el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :span="6">
+            <el-form-item label="扫描调节" prop="ScanRegu">
+              <el-input v-model="formDataMain.ScanRegu" placeholder="请输入" style="width: 100%"
+                        :disabled="DataStatus != 0 && DataStatus != 5 && DataStatus != 3">
+              </el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :span="6">
+            <el-form-item label="扫查方式" prop="ScanMode">
+              <el-input v-model="formDataMain.ScanMode" placeholder="请输入" style="width: 100%"
+                        :disabled="DataStatus != 0 && DataStatus != 5 && DataStatus != 3">
+              </el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :span="6">
+            <el-form-item label="检测部位" prop="TestLoc">
+              <el-input v-model="formDataMain.TestLoc" placeholder="请输入" style="width: 100%"
+                        :disabled="DataStatus != 0 && DataStatus != 5 && DataStatus != 3">
+              </el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :span="6">
+            <el-form-item label="被检部位表面状态" prop="Appearance" label-width="130px">
+              <el-input v-model="formDataMain.Appearance" placeholder="请输入" style="width: 100%"
+                        :disabled="DataStatus != 0 && DataStatus != 5 && DataStatus != 3">
+              </el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :span="6">
+            <el-form-item label="耦合剂" prop="Couplant">
+              <el-input v-model="formDataMain.Couplant" placeholder="请输入" style="width: 100%"
+                        :disabled="DataStatus != 0 && DataStatus != 5 && DataStatus != 3">
+              </el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :span="6">
+            <el-form-item label="补偿" prop="Comp">
+              <el-input v-model="formDataMain.Comp" placeholder="请输入" style="width: 100%"
+                        :disabled="DataStatus != 0 && DataStatus != 5 && DataStatus != 3">
+              </el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :span="6">
+            <el-form-item label="声程范围" prop="UPRange">
+              <el-input v-model="formDataMain.UPRange" placeholder="请输入" style="width: 100%"
+                        :disabled="DataStatus != 0 && DataStatus != 5 && DataStatus != 3">
+              </el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :span="6">
+            <el-form-item label="声速范围" prop="SVRange">
+              <el-input v-model="formDataMain.SVRange" placeholder="请输入" style="width: 100%"
+                        :disabled="DataStatus != 0 && DataStatus != 5 && DataStatus != 3">
+              </el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item label="检测标准" prop="DetectBasis">
+              <el-input v-model="formDataMain.DetectBasis" placeholder="请输入" style="width: 100%"
+                        :disabled="DataStatus != 0 && DataStatus != 5 && DataStatus != 3">
+              </el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :span="24" align="center">
+            <el-button type="primary" size="mini" @click="saveMainInfo"
+                       :disabled="DataStatus != 0 && DataStatus != 5 && DataStatus != 3">保存</el-button>
+            <el-button type="primary" size="mini" @click="getDataHistory"
+                       :disabled="DataStatus != 0 && DataStatus != 5 && DataStatus != 3">选择历史记录</el-button>
+          </el-col>
+        </el-row>
+      </el-form>
+    </el-card>
+    <el-card class="box-card" style="height: calc(100vh - 270px);">
+      <el-table :data="entityList" border height="calc(100vh - 345px)" style="width: 100%" @sort-change="orderby"
+                @current-change="saveTableRow" @row-dblclick="dbTableRow">
+        <el-table-column v-if="this.DataStatus==0||this.DataStatus==5||this.DataStatus==3" label="操作" min-width="120"
+                         align="center" fixed>
+          <template slot-scope="scope">
+            <el-button type="primary" plain size="mini" title="编辑" @click="EditEntity(scope.row)">编辑</el-button>
+            <el-popover placement="top" title="提示">
+              <el-alert title="" description="确认要删除吗?" type="warning" :closable="false">
+              </el-alert>
+              <br />
+              <div style="text-align: right; margin: 0">
+                <el-button type="primary" size="mini" @click="deleteEntity(scope.row)">删除</el-button>
+              </div>
+              <el-button slot="reference" type="primary" plain size="mini" title="删除" style="margin-left:3px">
+                删除
+              </el-button>
+            </el-popover>
+          </template>
+        </el-table-column>
+        <el-table-column prop="SampleNum" sortable min-width="110" label="样品编号" align="center"
+                         show-overflow-tooltip>
+          <template slot-scope="scope">
+            <el-input size="small" :disabled="DataStatus != 0 && DataStatus!=5 && DataStatus!=3"
+                      v-model="scope.row.SampleNum" style="width: 100%"></el-input>
+          </template>
+        </el-table-column>
+        <el-table-column prop="DefectLoc" sortable min-width="110" label="缺陷位置" align="center"
+                         show-overflow-tooltip>
+          <template slot-scope="scope">
+            <el-input size="small" :disabled="DataStatus != 0 && DataStatus!=5 && DataStatus!=3"
+                      v-model="scope.row.DefectLoc" style="width: 100%"></el-input>
+          </template>
+        </el-table-column>
+        <el-table-column prop="Depth" sortable min-width="110" label="缺陷深度" align="center"
+                         show-overflow-tooltip>
+          <template slot-scope="scope">
+            <el-input size="small" :disabled="DataStatus != 0 && DataStatus!=5 && DataStatus!=3"
+                      v-model="scope.row.Depth" style="width: 100%"></el-input>
+          </template>
+        </el-table-column>
+        <el-table-column prop="Length" sortable min-width="110" label="缺陷长度" align="center"
+                         show-overflow-tooltip>
+          <template slot-scope="scope">
+            <el-input size="small" :disabled="DataStatus != 0 && DataStatus!=5 && DataStatus!=3"
+                      v-model="scope.row.Length" style="width: 100%"></el-input>
+          </template>
+        </el-table-column>
+        <el-table-column prop="Heigth" sortable min-width="110" label="缺陷高度" align="center"
+                         show-overflow-tooltip>
+          <template slot-scope="scope">
+            <el-input size="small" :disabled="DataStatus != 0 && DataStatus!=5 && DataStatus!=3"
+                      v-model="scope.row.Heigth" style="width: 100%"></el-input>
+          </template>
+        </el-table-column>
+        <el-table-column prop="Remark" sortable min-width="110" label="备注" align="center"
+                         show-overflow-tooltip>
+          <template slot-scope="scope">
+            <el-input size="small" :disabled="DataStatus != 0 && DataStatus!=5 && DataStatus!=3"
+                      v-model="scope.row.Remark" style="width: 100%"></el-input>
+          </template>
+        </el-table-column>
+        <!--<el-table-column v-for="column in tableColumns"-->
+                         <!--v-if="column.prop != 'CreateOn'" :prop="column.prop" sortable min-width="100" :label="column.label" align="center" show-overflow-tooltip></el-table-column>-->
+
+        <!--<el-table-column prop="CreateOn" sortable min-width="150" label="生成时间" align="center" show-overflow-tooltip>
+          <template scope="scope">
+            {{ jstimehandle(scope.row.CreateOn+'') }}
+          </template>
+        </el-table-column>-->
+      </el-table>
+      <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="currentPage"
+                     :page-sizes="[10, 15, 20, 25]" :page-size="size" layout="total, sizes, prev, pager, next, jumper" :total="currentItemCount">
+      </el-pagination>
+    </el-card>
+
+    <el-dialog title="高级查询" :visible.sync="dialogVisible" width="720px">
+      <el-form ref="advancedsearchForm" label-width="110px">
+        <el-row>
+
+          <el-col :span="12">
+            <el-form-item label="生成时间">
+              <el-date-picker size="mini" v-model="CreateOn" type="daterange" style="width:100%" range-separator="至"
+                              start-placeholder="生成日期" end-placeholder="结束日期"></el-date-picker>
+            </el-form-item>
+          </el-col>
+
+          <el-col :span="12">
+            <el-form-item label="">
+              <el-input size="mini" v-model="searchForm.Id" style="width:100%" placeholder="请输入"></el-input>
+            </el-form-item>
+          </el-col>
+
+          <el-col :span="12">
+            <el-form-item label="委托单ID">
+              <el-input size="mini" v-model="searchForm.EId" style="width:100%" placeholder="请输入"></el-input>
+            </el-form-item>
+          </el-col>
+
+          <el-col :span="12">
+            <el-form-item label="任务分配表ID">
+              <el-input size="mini" v-model="searchForm.TaskBalanceId" style="width:100%" placeholder="请输入"></el-input>
+            </el-form-item>
+          </el-col>
+
+          <el-col :span="12">
+            <el-form-item label="数据记录表ID">
+              <el-input size="mini" v-model="searchForm.DataEntryId" style="width:100%" placeholder="请输入"></el-input>
+            </el-form-item>
+          </el-col>
+
+          <el-col :span="12">
+            <el-form-item label="样品编号">
+              <el-input size="mini" v-model="searchForm.SampleNum" style="width:100%" placeholder="请输入"></el-input>
+            </el-form-item>
+          </el-col>
+
+          <el-col :span="12">
+            <el-form-item label="缺陷位置">
+              <el-input size="mini" v-model="searchForm.DefectLoc" style="width:100%" placeholder="请输入"></el-input>
+            </el-form-item>
+          </el-col>
+
+          <el-col :span="12">
+            <el-form-item label="缺陷深度">
+              <el-input size="mini" v-model="searchForm.Depth" style="width:100%" placeholder="请输入"></el-input>
+            </el-form-item>
+          </el-col>
+
+          <el-col :span="12">
+            <el-form-item label="缺陷长度">
+              <el-input size="mini" v-model="searchForm.Length" style="width:100%" placeholder="请输入"></el-input>
+            </el-form-item>
+          </el-col>
+
+          <el-col :span="12">
+            <el-form-item label="缺陷高度">
+              <el-input size="mini" v-model="searchForm.Heigth" style="width:100%" placeholder="请输入"></el-input>
+            </el-form-item>
+          </el-col>
+
+          <el-col :span="12">
+            <el-form-item label="备注">
+              <el-input size="mini" v-model="searchForm.Remark" style="width:100%" placeholder="请输入"></el-input>
+            </el-form-item>
+          </el-col>
+
+        </el-row>
+      </el-form>
+      <span slot="footer" class="dialog-footer">
+        <el-button size="mini" @click="dialogVisible = false">取 消</el-button>
+        <el-button size="mini" type="primary" @click="handleSearch">查 询</el-button>
+      </span>
+    </el-dialog>
+    <el-dialog title="提交校核" :visible.sync="ProoFreadShow" top="5vh">
+      <el-form :model="shenhesubmitForm" label-width="130px" ref="shenhesubmitForm">
+        <el-row>
+          <el-form-item label="校核人" prop="AuthorUser">
+            <el-select ref="consigneeselect" v-model="shenhesubmitForm.AuditorUserId" placeholder="请选择校核人" style="width: 100%;">
+              <el-option v-for="item in acceptUsers" :key="item.id" :label="item.realname" :value="item.id">
+              </el-option>
+            </el-select>
+          </el-form-item>
+        </el-row>
+        <el-row>
+          <el-form-item label="说明">
+            <el-input type="textarea" v-model="shenhesubmitForm.AuditorRemark" placeholder="请输入说明"></el-input>
+          </el-form-item>
+        </el-row>
+      </el-form>
+      <div slot="footer" class="dialog-footer" style="margin-top: -25px">
+        <el-button size="small" @click="ProoFreadShow = false">取 消</el-button>
+        <el-button type="primary" size="small" @click="makesure()">确 定</el-button>
+      </div>
+    </el-dialog>
+    <el-dialog title="校核信息" :visible.sync="jiaoheshow" top="5vh">
+      <el-form :model="jiaoheForm" label-width="130px" ref="jiaoheForm">
+        <el-form-item label="校核状态">
+          <template>
+            <el-radio class="radio" v-model="jiaoheForm.SuccessStatus" :label="2">校核通过</el-radio>
+            <el-radio class="radio" v-model="jiaoheForm.SuccessStatus" :label="3">校核未通过</el-radio>
+          </template>
+        </el-form-item>
+        <el-form-item label="说明">
+          <el-input type="textarea" v-model="jiaoheForm.AuditorRemark" placeholder="请输入校核说明"></el-input>
+        </el-form-item>
+      </el-form>
+      <div slot="footer" class="dialog-footer" style="margin-top: -25px">
+        <el-button size="small" @click="jiaoheshow = false">取 消</el-button>
+        <el-button type="primary" size="small" @click="jiaohemakesure()">确 定</el-button>
+      </div>
+    </el-dialog>
+    <data-opera ref="DataoperaCompoment" :DataEntryId="DataEntryId+''" :TaskBalanceId="TaskBalanceId+''" :EId="EId+''"
+                @init-data="initDatas"></data-opera>
+    <data-history ref="historyDataCompoment" @init-datalist="initDatas"></data-history>
+  </div>
+</template>
+<script>
+  import { mapGetters } from 'vuex'
+  import api from '@/api/wzjys/limsreportoilpipeultrasonic'
+  import DataHistory from './datahistory.vue'
+  import DataOpera from './operation.vue'
+  import cmp from '@/utils/strings.js'
+
+  export default {
+    computed: {
+      ...mapGetters({
+        authUser: 'authUser'
+      })
+    },
+    name: 'limsreportoilpipeultrasonic',
+    components: {
+      DataHistory,
+      DataOpera
+    },
+    data () {
+      return {
+        dialogVisible: false,
+        Id: '',
+        EId: '',
+        TaskBalanceId: '',
+        DataEntryId: '',
+        ProoFreadShow: false,
+        jiaoheshow: false,
+        sign: '2',
+        ischeck: 0,
+        DataStatus: 0,
+        acceptUsers: [],
+        // 列表数据
+        entityList: [],
+        // 分页参数
+        size: 10,
+        currentPage: 1,
+        currentItemCount: 0,
+        // 列表排序
+        Column: {
+          Order: '',
+          Prop: ''
+        },
+        // 查询时间
+        CreateOn: [new Date(new Date().getTime() - 30 * 24 * 60 * 60 * 1000), new Date()],
+        // 查询项
+        searchFormReset: {},
+        formDataMain: {
+          Id: '',
+          EId: '',
+          DocId: '',
+          TaskId: '',
+          UTNumber: '',
+          Product: '',
+          Spec: '',
+          Appearance: '',
+          TBModel: '',
+          ScanSnty: '',
+          ScanRegu: '',
+          ScanMode: '',
+          TestLoc: '',
+          Couplant: '',
+          Comp: '',
+          UPRange: '',
+          SVRange: '',
+          DetectBasis: ''
+        },
+        searchForm: {
+          Id: '',
+          EId: '',
+          TaskBalanceId: '',
+          DataEntryId: '',
+          SampleNum: '',
+          DefectLoc: '',
+          Depth: '',
+          Length: '',
+          Heigth: '',
+          Remark: '',
+          CreateUserId: '',
+          CreateOn: '',
+          CreateBy: '',
+          ModifiedOn: '',
+          ModifiedUserId: '',
+          ModifiedBy: ''
+
+        },
+        // 校核提交
+        shenhesubmitForm: {
+          AuditorUserId: '',
+          DataEntryId: '',
+          SuccessStatus: 1,
+          AuditorRemark: ''
+        },
+        jiaoheForm: {
+          SuccessStatus: 2,
+          AuditorRemark: '',
+          DataEntryId: 0
+        },
+        rowHistory: {},
+        params: {
+          Id: '',
+          EId: '',
+          DataDocId: '',
+          TestDepartId: '',
+          PositionCheckId: '',
+          TaskBalanceId: '',
+          DataEntryId: '',
+          EntrustCorp: ''
+        }
+      }
+    },
+    created () {
+      this.EId = this.$route.query.eid
+      this.TaskBalanceId = this.$route.query.tbid
+      this.DataEntryId = this.$route.query.deid
+      this.DataStatus = parseInt(this.$route.query.datastatus)
+      this.DataDocId = this.$route.query.datadocId
+      this.sign = this.$route.query.sign
+      this.ischeck = this.$route.query.ischeck
+      // 查询条件初始值备份
+      Object.assign(this.searchFormReset, this.searchForm)
+      // 查询列表
+      this.getDataEntry()
+      this.initDatas()
+      this.getUsersByRole()
+      // this.getDictOptions()
+    },
+    methods: {
+      saveMainInfo () {
+        this.formDataMain.Comp = parseFloat(this.formDataMain.Comp)
+        this.formDataMain.SVRange = parseFloat(this.formDataMain.SVRange)
+        this.$refs['formDataMain'].validate((valid) => {
+          if (valid) {
+            this.$axios.post('/limsdataentry/updateEntity/' + this.DataEntryId, this.formDataMain).then(res => {
+              if (res.data.code === 0) {
+                this.getDataEntry()
+                this.$message({
+                  type: 'success',
+                  message: res.data.message
+                })
+              } else {
+                this.$message({
+                  type: 'warning',
+                  message: res.data.message
+                })
+              }
+            }).catch(error => {
+              console.log(error)
+            })
+          }
+        })
+      },
+      getDataEntry () {
+        this.$axios.get('/limsdataentry/getdataentry/' + this.DataEntryId).then(res => {
+          this.formDataMain = res.data
+          if (!this.formDataMain.InspectionDate || this.formDataMain.InspectionDate.indexOf('0001-01-01') !== -1) {
+            this.formDataMain.InspectionDate = new Date()
+          }
+          // this.params.Id = res.data.Id
+        }).catch(error => {
+          console.log(error)
+        })
+      },
+      getDataHistory () {
+        this.params.DataDocId = this.formDataMain.DocId
+        this.params.TaskBalanceId = this.formDataMain.TaskId
+        this.params.EId = this.formDataMain.EId
+        this.params.DataEntryId = this.formDataMain.Id
+        this.params.Id = this.formDataMain.Id
+        this.$refs['historyDataCompoment'].dialogTableVisible = true
+        this.$refs['historyDataCompoment'].OpenOrignDataInput(this.params)
+      },
+      initDatas () {
+        // 分页及列表条件
+        let params = {
+          _currentPage: this.currentPage,
+          _size: this.size,
+          Order: this.Column.Order,
+          Prop: this.Column.Prop
+        }
+        let myCreateOn = []
+        // 解析时间
+        // if (this.CreateOn.length === 2) {
+        //   this.CreateOn[1].setHours(23)
+        //   this.CreateOn[1].setMinutes(59)
+        //   this.CreateOn[1].setSeconds(59)
+        //   myCreateOn.push(this.formatDateTime(this.CreateOn[0]))
+        //   myCreateOn.push(this.formatDateTime(this.CreateOn[1]))
+        // }
+        // 查询条件
+        this.searchForm.DataEntryId = this.DataEntryId
+        Object.assign(params, this.searchForm)
+        // 访问接口
+        api.getList(myCreateOn.join(','), params, this.$axios).then(res => {
+          this.entityList = res.data.items
+          this.currentItemCount = res.data.currentItemCount
+        }).catch(err => {
+          console.error(err)
+        })
+      },
+      addDataEntity () {
+        // 刷新子列表
+        this.$refs['DataoperaCompoment'].resetFormData()
+        this.$refs['DataoperaCompoment'].dialogVisible = true
+      },
+
+      // 获取校核人列表
+      getUsersByRole () {
+        // request
+        this.$axios.get('/limsdataentry/getuserlistbyjhrole/', {})
+          .then(res => {
+            if (res.data instanceof Array && res.data.length > 0) {
+              this.acceptUsers = res.data
+            }
+          })
+          .catch(err => {
+            // handle error
+            console.error(err)
+          })
+      },
+      setProoFreadShow () {
+        // if (this.formData.PositionCheckId === '') {
+        //   this.$message.warning('检测地点为空,不允许提交!')
+        //   return
+        // }
+        this.ProoFreadShow = true
+      },
+      // 打开校核弹窗
+      jiaoheshowdialog () {
+        this.jiaoheForm.DataEntryId = this.DataEntryId
+        this.jiaoheshow = true
+      },
+      checkstatus () {
+        this.shenhesubmitForm.SuccessStatus = 1
+        this.shenhesubmitForm.DataEntryId = parseInt(this.DataEntryId)
+        let params = this.shenhesubmitForm
+        this.$axios.put('/limsdataentry/checksubmit/', params)
+          .then(res => {
+            // response
+            if (res.data.code === 0) {
+              this.$message({
+                type: 'success',
+                message: res.data.message
+
+              })
+              this.DataStatus = 1
+              // this.initDatas()
+            } else {
+              this.$message({
+                type: 'warning',
+                message: '校核提交错误!'
+              })
+            }
+          })
+          .catch(err => {
+            // handle error
+            console.error(err)
+          })
+      },
+      // 提交校核
+      makesure () {
+        console.log(this.formDataMain.Id, '====')
+        if (!this.formDataMain.Id || this.formDataMain.Id < 0) {
+          this.$message.warning('没有保存,不能提交!')
+          return
+        }
+        this.$confirm('确定提交校核!', '提示', {
+          confirmButtonText: '确定',
+          cancelButtonText: '取消',
+          type: 'warning'
+        })
+          .then(() => {
+            this.ProoFreadShow = false
+            console.log('1')
+            this.checkstatus()
+          })
+          .catch(() => {})
+      },
+      jiaohecheckstatus () {
+        let params = this.jiaoheForm
+        this.$axios.put('/limsdataentry/jiaohe/', params)
+          .then(res => {
+            // response
+            if (res.data.code === 0) {
+              this.ischeck = '0'
+              this.$message({
+                type: 'success',
+                message: res.data.message
+              })
+              // this.initdata2()
+            } else {
+              this.$message({
+                type: 'warning',
+                message: '校核错误,请先确定您已经录入内容并且录入的内容已经保存'
+              })
+            }
+          })
+          .catch(err => {
+            // handle error
+            console.error(err)
+          })
+      },
+      jiaohemakesure () {
+        this.$confirm('确认校核!', '提示', {
+          confirmButtonText: '确定',
+          cancelButtonText: '取消',
+          type: 'warning'
+        })
+          .then(() => {
+            this.jiaoheshow = false
+            this.jiaohecheckstatus()
+          })
+          .catch(() => {})
+      },
+
+      getDictOptions () {
+        api.getDictList(this.$axios).then(res => {
+
+        }).catch(err => {
+          console.error(err)
+        })
+      },
+
+      dbTableRow (row) {
+        if (this.entityList.length === 1) {
+          this.updateTableRow(row)
+        }
+      },
+      saveTableRow (row, oldRow) {
+        let noChange = true
+        if (oldRow && row) {
+          let tmpRow = {}
+          Object.assign(tmpRow, oldRow)
+          noChange = cmp(this.rowHistory, tmpRow)
+        }
+        if (oldRow && oldRow.Id > 0 && !noChange) {
+          this.updateTableRow(oldRow)
+        }
+        Object.assign(this.rowHistory, row)
+      },
+      updateTableRow (row) {
+        api.updateEntity(row.Id, row, this.$axios).then(res => {
+          if (res.data.code === 0) {
+            // 保存成功后,初始化数据,变成修改
+            this.$message({
+              type: 'success',
+              message: res.data.message
+            })
+          } else {
+            this.$message({
+              type: 'warning',
+              message: res.data.message
+            })
+          }
+        }).catch(err => {
+          console.error(err)
+        })
+      },
+
+      searchCommand (command) {
+        if (command === 'search') {
+          this.dialogVisible = true
+        } else if (command === 'clear') {
+          this.clearSearch()
+        }
+      },
+      // 列表排序功能
+      orderby (column) {
+        if (column.order === 'ascending') {
+          this.Column.Order = 'asc'
+        } else if (column.order === 'descending') {
+          this.Column.Order = 'desc'
+        }
+        this.Column.Prop = column.prop
+        this.initDatas()
+      },
+      clearSearch () {
+        Object.assign(this.searchForm, this.searchFormReset)
+        // this.searchForm = this.searchFormReset;
+        this.CreateOn = ''
+        this.initDatas()
+      },
+      handleSearch () {
+        this.currentPage = 1
+        this.dialogVisible = false
+        this.initDatas()
+      },
+      handleCurrentChange (value) {
+        this.currentPage = value
+        this.initDatas()
+      },
+      handleSizeChange (value) {
+        this.size = value
+        this.currentPage = 1
+        this.initDatas()
+      },
+      deleteEntity (row) {
+        row.deleteConfirmFlag = false
+        api.deleteEntity(row.Id, this.$axios).then(res => {
+          if (res.data.code === 0) {
+            this.initDatas()
+            this.$message({
+              type: 'success',
+              message: res.data.message
+            })
+          } else {
+            this.$message({
+              type: 'warning',
+              message: res.data.message
+            })
+          }
+        }).catch(err => {
+          console.error(err)
+        })
+      },
+      EditEntity (row) {
+        this.$refs['DataoperaCompoment'].subListEditEntity(row.Id)
+        this.$refs['DataoperaCompoment'].dialogVisible = true
+      },
+
+      jstimehandle (val) {
+        if (val === '') {
+          return '----'
+        } else if (val === '0001-01-01T08:00:00+08:00') {
+          return '----'
+        } else if (val === '5000-01-01T23:59:59+08:00') {
+          return '永久'
+        } else {
+          val = val.replace('T', ' ')
+          return val.substring(0, 10)
+        }
+      },
+
+      formatDateTime (date) {
+        var y = date.getFullYear()
+        var m = date.getMonth() + 1
+        m = m < 10 ? ('0' + m) : m
+        var d = date.getDate()
+        d = d < 10 ? ('0' + d) : d
+        var h = date.getHours()
+        var minute = date.getMinutes()
+        minute = minute < 10 ? ('0' + minute) : minute
+        return y + '-' + m + '-' + d + ' ' + h + ':' + minute
+      }
+    }
+  }
+</script>
+
+<style lang="scss">
+
+</style>
+

+ 273 - 0
src/dashoo.cn/frontend_web/src/pages/lims/wzjys/reportoilpipeult/_opera/operation.vue

@@ -0,0 +1,273 @@
+<template>
+  <div>
+    <!--<el-breadcrumb class="heading">-->
+    <!--<el-breadcrumb-item :to="{ path: '/' }">平台首页</el-breadcrumb-item>-->
+    <!--<el-breadcrumb-item :to="{ path: '/lims/s5ovelimspipedrillpipe' }">石油专用管材钻杆检验记录</el-breadcrumb-item>-->
+    <!--<el-breadcrumb-item>编辑</el-breadcrumb-item>-->
+    <!--</el-breadcrumb>-->
+    <el-dialog title="超声波检测" :visible.sync="dialogVisible" width="80%">
+      <el-card class="box-card">
+        <div slot="header">
+          <span>
+            <i class="icon icon-table2"></i> 编辑
+          </span>
+          <!-- <span style="float: right;"> -->
+            <!-- <el-button type="primary" size="mini" @click="saveEntity">保存</el-button> -->
+            <!-- <router-link :to="'/lims/wzjys/reportpipedrillpipe/datalist'">
+              <el-button type="primary" size="mini" style="margin-left: 8px">返回</el-button>
+            </router-link> -->
+          <!-- </span> -->
+        </div>
+        <el-form label-width="110px" ref="EntityForm" :model="formData">
+          <el-row>
+            <el-col :span="8">
+              <el-form-item label="样品编号">
+                <el-input v-model="formData.SampleNum" placeholder="请输入" style="width: 100%"></el-input>
+              </el-form-item>
+            </el-col>
+
+            <el-col :span="8">
+              <el-form-item label="缺陷位置">
+                <el-input v-model="formData.DefectLoc" placeholder="请输入"
+                  style="width: 100%"></el-input>
+              </el-form-item>
+            </el-col>
+
+            <el-col :span="8">
+              <el-form-item label="缺陷埋藏深度(mm)" label-width="170px">
+                <el-input v-model="formData.Depth" placeholder="请输入"
+                  style="width: 100%"></el-input>
+              </el-form-item>
+            </el-col>
+
+            <el-col :span="8">
+              <el-form-item label="缺陷指示长度(mm)" label-width="170px">
+                <el-input v-model="formData.Length" placeholder="请输入"
+                          style="width: 100%"></el-input>
+              </el-form-item>
+            </el-col>
+
+            <el-col :span="8">
+              <el-form-item label="缺陷高度(mm)" label-width="160px">
+                <el-input v-model="formData.Heigth" placeholder="请输入"
+                          style="width: 100%"></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :span="24">
+              <el-form-item label="备注">
+                <el-input type="textarea" v-model="formData.Remark" placeholder="请输入" style="width: 100%"></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :span="24">
+              <el-form-item :span="24" style="text-align: center;">
+                <el-button type="primary" size="small" @click="saveEntity"><i class="el-icon-circle-check"></i>
+                  {{ this.saveBtnName }}</el-button>
+                <el-checkbox style="margin-left: 10px;" v-model="continueInsertChecked" label="连续新增?" size="small"
+                  @change="continueInsertChange"></el-checkbox>
+                <el-button type="plain" size="small" @click="resetFormData"><i class="el-icon-refresh"></i> 重置
+                </el-button>
+              </el-form-item>
+            </el-col>
+
+          </el-row>
+        </el-form>
+      </el-card>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+  import {
+    mapGetters
+  } from 'vuex'
+  import api from '@/api/wzjys/limsreportoilpipeultrasonic'
+  export default {
+    computed: {
+      ...mapGetters({
+        authUser: 'authUser'
+      })
+    },
+    name: 'limsoilpipeultEdit',
+    props: {
+      EId: String,
+      TaskBalanceId: String,
+      DataEntryId: String
+    },
+
+    data () {
+      return {
+        saveBtnName: '新增',
+        continueInsertChecked: false,
+        dialogVisible: false,
+        serviceId: '',
+        historyData: {},
+        formData: {
+          Id: '',
+          EId: '',
+          TaskBalanceId: '',
+          DataEntryId: '',
+          SampleNum: '',
+          DefectLoc: '',
+          Depth: '',
+          Length: '',
+          Heigth: '',
+          Remark: '',
+          CreateUserId: '',
+          CreateOn: '',
+          CreateBy: '',
+          ModifiedOn: '',
+          ModifiedUserId: '',
+          ModifiedBy: ''
+        }
+      }
+    },
+    created () {
+      this.getDictOptions()
+
+      if (this.serviceId > 0) {
+        this.formData.Id = this.serviceId
+        this.initDatas()
+      } else {
+        this.formData.Id = 0
+        this.formData.EId = this.EId
+        this.formData.TaskBalanceId = this.TaskBalanceId
+        this.formData.DataEntryId = this.DataEntryId
+        // this.getEntrustInfo(this.EId)
+      }
+      // 初始值备份
+      Object.assign(this.historyData, this.formData)
+    },
+    methods: {
+      initDatas () {
+        if (this.formData.Id) {
+          api.getEntity(this.formData.Id, this.$axios).then(res => {
+            console.log('initDatas')
+            this.formData = res.data
+            this.$emit('init-data')
+            if (this.continueInsertChecked) {
+              this.continueInsertChange()
+            }
+          }).catch(err => {
+            console.error(err)
+          })
+        }
+      },
+      resetFormData () {
+        Object.assign(this.formData, this.historyData)
+        this.saveBtnName = '新增'
+        this.formData.Id = 0
+        this.formData.EId = this.EId
+        this.formData.TaskBalanceId = this.TaskBalanceId
+        this.formData.DataEntryId = this.DataEntryId
+      },
+      subListEditEntity (entityId) {
+        this.serviceId = entityId
+        this.formData.Id = this.serviceId
+        this.saveBtnName = '修改' // 修改
+        this.continueInsertChecked = false
+        this.initDatas()
+      },
+
+      getDictOptions () {
+        api.getDictList(this.$axios).then(res => {
+
+        }).catch(err => {
+          console.error(err)
+        })
+      },
+
+      // 保存信息
+      saveEntity () {
+        this.$refs['EntityForm'].validate((valid) => {
+          this.formData.EId = parseInt(this.formData.EId)
+          this.formData.DataEntryId = parseInt(this.formData.DataEntryId)
+          this.formData.TaskBalanceId = parseInt(this.formData.TaskBalanceId)
+          this.formData.Depth = parseFloat(this.formData.Depth)
+          this.formData.Heigth = parseFloat(this.formData.Heigth)
+          this.formData.Length = parseFloat(this.formData.Length)
+          if (valid) {
+            if (!this.formData.Id) {
+              this.addEntity()
+            } else {
+              this.updateEntity()
+            }
+          } else {
+            return false
+          }
+        })
+      },
+      addEntity () {
+        api.addEntity(this.formData, this.$axios).then(res => {
+          if (res.data.code === 0) {
+            // 保存成功后,初始化数据,变成修改
+            this.formData.Id = res.data.item
+            this.saveBtnName = '修改'
+            this.initDatas()
+            this.$message({
+              type: 'success',
+              message: res.data.message
+            })
+          } else {
+            this.$message({
+              type: 'warning',
+              message: res.data.message
+            })
+          }
+        }).catch(err => {
+          console.error(err)
+        })
+      },
+      updateEntity () {
+        api.updateEntity(this.formData.Id, this.formData, this.$axios).then(res => {
+          if (res.data.code === 0) {
+            // 保存成功后,初始化数据,变成修改
+            this.initDatas()
+            this.$message({
+              type: 'success',
+              message: res.data.message
+            })
+          } else {
+            this.$message({
+              type: 'warning',
+              message: res.data.message
+            })
+          }
+        }).catch(err => {
+          console.error(err)
+        })
+      },
+      continueInsertChange () {
+        this.formData.Id = 0
+        this.saveBtnName = '新增'
+      },
+      jstimehandle (val) {
+        if (val === '') {
+          return '----'
+        } else if (val === '0001-01-01T08:00:00+08:00') {
+          return '----'
+        } else if (val === '5000-01-01T23:59:59+08:00') {
+          return '永久'
+        } else {
+          val = val.replace('T', ' ')
+          return val.substring(0, 10)
+        }
+      },
+
+      formatDateTime (date) {
+        var y = date.getFullYear()
+        var m = date.getMonth() + 1
+        m = m < 10 ? ('0' + m) : m
+        var d = date.getDate()
+        d = d < 10 ? ('0' + d) : d
+        var h = date.getHours()
+        var minute = date.getMinutes()
+        minute = minute < 10 ? ('0' + minute) : minute
+        return y + '-' + m + '-' + d + ' ' + h + ':' + minute
+      }
+    }
+  }
+</script>
+
+<style lang="scss">
+
+</style>

+ 0 - 1
src/dashoo.cn/frontend_web/src/pages/lims/wzjys/reportpetroleumpipe/_opera/datalist.vue

@@ -951,7 +951,6 @@
       }
     }
   }
-
 </script>
 
 <style lang="scss">

+ 1 - 1
src/dashoo.cn/frontend_web/src/pages/setting/testtype.vue

@@ -282,7 +282,7 @@
         this.$refs['testypeForm'].validate((valid) => {
           if (valid) {
             _this.testypeForm.DepartmentId = parseInt(_this.selectedorg[_this.selectedorg.length - 1])
-            // _this.testypeForm.Department = this.$refs.refDepartment.currentLabels[this.$refs.refDepartment.currentLabels.length - 1]
+            _this.testypeForm.Department = this.$refs.refDepartment.currentLabels[this.$refs.refDepartment.currentLabels.length - 1]
             if (_this.testypeForm.TemplateId > 0) {
               _this.testypeForm.TemplateName = _this.$refs.refTemplateId.selectedLabel + ''
               _this.testypeForm.TemplateId = parseInt(_this.testypeForm.TemplateId)