|
|
@@ -137,7 +137,7 @@
|
|
|
</el-row>
|
|
|
<el-row :gutter="20">
|
|
|
<el-form :model="mainForm" label-width="100px">
|
|
|
- <el-col :span="testdetail.length > 1 ? 12:24">
|
|
|
+ <el-col :span="testdetail && testdetail.length > 1 ? 12:24">
|
|
|
<el-card v-if="mainForm.PackageId != ''" class="box-card sampletestmaincard">
|
|
|
<div slot="header">
|
|
|
<legend style="color:#436EEE"></legend>
|
|
|
@@ -157,7 +157,7 @@
|
|
|
</el-col>
|
|
|
|
|
|
<el-col :span="12">
|
|
|
- <el-card v-if="mainForm.PackageId != '' && testdetail.length > 1" class="box-card sampletestmaincard">
|
|
|
+ <el-card v-if="mainForm.PackageId != '' && testdetail && testdetail.length > 1" class="box-card sampletestmaincard">
|
|
|
<div slot="header">
|
|
|
<legend style="color:#436EEE"></legend>
|
|
|
<i class="icon icon-paragraph-justify"> {{testdetail[1].TestName}}</i>
|
|
|
@@ -287,56 +287,56 @@
|
|
|
computed: mapGetters({
|
|
|
authUser: 'authUser'
|
|
|
}),
|
|
|
- data() {
|
|
|
+ data () {
|
|
|
return {
|
|
|
- breadcrumb: '', //面包屑标题
|
|
|
- MainId: '', //检测主单ID
|
|
|
- pageflag: '', //页面新增或编辑标志位
|
|
|
+ breadcrumb: '', // 面包屑标题
|
|
|
+ MainId: '', // 检测主单ID
|
|
|
+ pageflag: '', // 页面新增或编辑标志位
|
|
|
currentItemCount: 0,
|
|
|
currentPage: 1,
|
|
|
size: 10,
|
|
|
CurrentItemCount: 0,
|
|
|
CurrentPage: 1,
|
|
|
Size: 10,
|
|
|
- mainForm: { //主表信息
|
|
|
- InspectionNum: '', //检测单号
|
|
|
- ProtocolNo: '', //协议号
|
|
|
- SourceId: '', //样本来源ID
|
|
|
- SourceIdCard: '', //身份证
|
|
|
- SourceName: '', //样本源姓名
|
|
|
- Sex: '', //性别
|
|
|
- Telephone: '', //样本来源手机号
|
|
|
- SampleCode: '', //样本编码
|
|
|
- BarCode: '', //样本条码
|
|
|
- SampleType: '', //样本类型
|
|
|
+ mainForm: { // 主表信息
|
|
|
+ InspectionNum: '', // 检测单号
|
|
|
+ ProtocolNo: '', // 协议号
|
|
|
+ SourceId: '', // 样本来源ID
|
|
|
+ SourceIdCard: '', // 身份证
|
|
|
+ SourceName: '', // 样本源姓名
|
|
|
+ Sex: '', // 性别
|
|
|
+ Telephone: '', // 样本来源手机号
|
|
|
+ SampleCode: '', // 样本编码
|
|
|
+ BarCode: '', // 样本条码
|
|
|
+ SampleType: '', // 样本类型
|
|
|
SampleTypeName: '',
|
|
|
- SamplingOrgan: '', //组织器官
|
|
|
+ SamplingOrgan: '', // 组织器官
|
|
|
SamplingOrganName: '',
|
|
|
- SamplingSite: '', //取材部位
|
|
|
+ SamplingSite: '', // 取材部位
|
|
|
SamplingSiteName: '',
|
|
|
- PackageId: '', //套餐
|
|
|
- CheckTime: new Date(), //检测时间
|
|
|
- CheckUserId: '', //检测人ID
|
|
|
- CheckUserName: '', //检测人
|
|
|
- HandleFlag: '', //是否处理,是否结果已出:0,未处理;1,结果已出
|
|
|
- JudgmentFlag: '', //异常标志,结果里是否有异常项:0,正常;1,异常
|
|
|
- AuditorFlag: '', //审核状态:0:未审核;1:审核通过
|
|
|
+ PackageId: '', // 套餐
|
|
|
+ CheckTime: new Date(), // 检测时间
|
|
|
+ CheckUserId: '', // 检测人ID
|
|
|
+ CheckUserName: '', // 检测人
|
|
|
+ HandleFlag: '', // 是否处理,是否结果已出:0,未处理;1,结果已出
|
|
|
+ JudgmentFlag: '', // 异常标志,结果里是否有异常项:0,正常;1,异常
|
|
|
+ AuditorFlag: '', // 审核状态:0:未审核;1:审核通过
|
|
|
AuditorRemark: '',
|
|
|
- AuditorOn: new Date(), //审核时间
|
|
|
- AuditorUserId: '', //审核人ID
|
|
|
- AuditorBy: '', //审核人
|
|
|
+ AuditorOn: new Date(), // 审核时间
|
|
|
+ AuditorUserId: '', // 审核人ID
|
|
|
+ AuditorBy: '', // 审核人
|
|
|
CreateBy: '',
|
|
|
- Remark: '' //备注
|
|
|
+ Remark: '' // 备注
|
|
|
},
|
|
|
- searchform: { //协议弹窗查找
|
|
|
- ProtocolNo: '', //协议编码
|
|
|
- IDCard: '' //身份证号
|
|
|
+ searchform: { // 协议弹窗查找
|
|
|
+ ProtocolNo: '', // 协议编码
|
|
|
+ IDCard: '' // 身份证号
|
|
|
},
|
|
|
- searchForm: { //协议弹窗查找
|
|
|
- BarCode: '', //协议编码
|
|
|
- Name: '' //姓名
|
|
|
+ searchForm: { // 协议弹窗查找
|
|
|
+ BarCode: '', // 协议编码
|
|
|
+ Name: '' // 姓名
|
|
|
},
|
|
|
- protocolsourcelist: [], //选择样本来源弹窗表格
|
|
|
+ protocolsourcelist: [], // 选择样本来源弹窗表格
|
|
|
BarCodelist: [],
|
|
|
detailForm: {
|
|
|
TestItems: [{
|
|
|
@@ -347,15 +347,15 @@
|
|
|
}]
|
|
|
},
|
|
|
testdetail: [{
|
|
|
- TestItems: [], //检验项目
|
|
|
- TestName: '', //检验名称
|
|
|
- Total: '' //总数
|
|
|
+ TestItems: [], // 检验项目
|
|
|
+ TestName: '', // 检验名称
|
|
|
+ Total: '' // 总数
|
|
|
}],
|
|
|
- packagelist: [], //套餐下拉
|
|
|
- sampletypelist: [], //样本类型下拉
|
|
|
+ packagelist: [], // 套餐下拉
|
|
|
+ sampletypelist: [], // 样本类型下拉
|
|
|
choosesourcedialog: false,
|
|
|
searchBarCodedialog: false,
|
|
|
- searchProtocoldialog: false, //选择协议弹窗
|
|
|
+ searchProtocoldialog: false, // 选择协议弹窗
|
|
|
mainrules: {
|
|
|
InspectionNum: [{
|
|
|
required: true,
|
|
|
@@ -419,11 +419,11 @@
|
|
|
SuccessStatus: 0,
|
|
|
AuditorRemark: ''
|
|
|
},
|
|
|
- auditorShow: false, //审核信息弹窗
|
|
|
- authoer_flag: false,
|
|
|
+ auditorShow: false, // 审核信息弹窗
|
|
|
+ authoer_flag: false
|
|
|
}
|
|
|
},
|
|
|
- mounted() {
|
|
|
+ mounted () {
|
|
|
let _this = this
|
|
|
_this.MainId = _this.$route.params.opera
|
|
|
_this.DonorsId = this.$route.query.Id
|
|
|
@@ -431,30 +431,30 @@
|
|
|
_this.breadcrumb = '新增样本检测'
|
|
|
_this.pageflag = 'addsampletest'
|
|
|
_this.mainForm.CreateBy = this.authUser.Profile.Realname
|
|
|
- _this.getInspectionNum() //获取检测单号
|
|
|
- _this.getallpackage() //获取检验套餐
|
|
|
- } else if (typeof (_this.MainId) != 'undefined' && _this.MainId != '0') {
|
|
|
+ _this.getInspectionNum() // 获取检测单号
|
|
|
+ _this.getallpackage() // 获取检验套餐
|
|
|
+ } else if (typeof (_this.MainId) !== 'undefined' && _this.MainId != '0') {
|
|
|
_this.breadcrumb = '编辑样本检测'
|
|
|
_this.pageflag = 'editsampletest'
|
|
|
- _this.getsampletestmain() //根据主表Id获取主单信息
|
|
|
+ _this.getsampletestmain() // 根据主表Id获取主单信息
|
|
|
}
|
|
|
- _this.getsampletype() //样本类型下拉
|
|
|
+ _this.getsampletype() // 样本类型下拉
|
|
|
},
|
|
|
methods: {
|
|
|
- //获取检测单号
|
|
|
- getInspectionNum() {
|
|
|
+ // 获取检测单号
|
|
|
+ getInspectionNum () {
|
|
|
let _this = this
|
|
|
this.$axios.get('/orderadd/getOrderNumgene?ordertype=2')
|
|
|
.then(function (response) {
|
|
|
_this.mainForm.InspectionNum = response.data.items + ''
|
|
|
if (_this.DonorsId && _this.DonorsId != 0) {
|
|
|
_this.back_flat = 1
|
|
|
- _this.getDonorsBasic() //获取样本来源信息
|
|
|
+ _this.getDonorsBasic() // 获取样本来源信息
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
- //初始化套餐列表
|
|
|
- getallpackage() {
|
|
|
+ // 初始化套餐列表
|
|
|
+ getallpackage () {
|
|
|
let _this = this
|
|
|
_this.$axios.get('/inspection/getallpackage')
|
|
|
.then(res => {
|
|
|
@@ -473,8 +473,8 @@
|
|
|
console.error(err)
|
|
|
})
|
|
|
},
|
|
|
- //样本类型下拉
|
|
|
- getsampletype() {
|
|
|
+ // 样本类型下拉
|
|
|
+ getsampletype () {
|
|
|
let _this = this
|
|
|
_this.$axios.get('/sampletype/list', {})
|
|
|
.then(res => {
|
|
|
@@ -488,11 +488,10 @@
|
|
|
value: res.data.items[i].Id + ''
|
|
|
})
|
|
|
}
|
|
|
-
|
|
|
})
|
|
|
},
|
|
|
- //根据主表Id获取主单信息
|
|
|
- getsampletestmain() {
|
|
|
+ // 根据主表Id获取主单信息
|
|
|
+ getsampletestmain () {
|
|
|
let _this = this
|
|
|
_this.$axios.get('/sampletest/getsampletestmain/' + _this.MainId, {})
|
|
|
.then(function (response) {
|
|
|
@@ -506,18 +505,18 @@
|
|
|
_this.getsampletestitems()
|
|
|
})
|
|
|
.catch(function (error) {
|
|
|
- console.log(error);
|
|
|
- });
|
|
|
+ console.log(error)
|
|
|
+ })
|
|
|
},
|
|
|
- //获取样本检验子表检验项
|
|
|
- getsampletestitems() {
|
|
|
+ // 获取样本检验子表检验项
|
|
|
+ getsampletestitems () {
|
|
|
let _this = this
|
|
|
let params = {
|
|
|
InspectionNum: _this.mainForm.InspectionNum
|
|
|
}
|
|
|
_this.$axios.get('/sampletest/getsampletestlist/', {
|
|
|
- params
|
|
|
- })
|
|
|
+ params
|
|
|
+ })
|
|
|
.then(res => {
|
|
|
_this.testdetail = res.data.items
|
|
|
})
|
|
|
@@ -525,15 +524,15 @@
|
|
|
console.error(err)
|
|
|
})
|
|
|
},
|
|
|
- //根据样本来源ID获取样本来源信息
|
|
|
- getDonorsBasic() {
|
|
|
+ // 根据样本来源ID获取样本来源信息
|
|
|
+ getDonorsBasic () {
|
|
|
let _this = this // request
|
|
|
let params = {
|
|
|
Id: this.DonorsId
|
|
|
}
|
|
|
_this.$axios.get('/sampletest/getdonorsbasic', {
|
|
|
- params
|
|
|
- })
|
|
|
+ params
|
|
|
+ })
|
|
|
.then(res => {
|
|
|
_this.mainForm.ProtocolNo = res.data.items.ProtocolNo
|
|
|
_this.mainForm.SourceIdCard = res.data.items.IdCard
|
|
|
@@ -551,12 +550,12 @@
|
|
|
})
|
|
|
},
|
|
|
|
|
|
- //保存信息
|
|
|
- savemain() {
|
|
|
- this.$refs["mainForm"].validate((valid) => {
|
|
|
+ // 保存信息
|
|
|
+ savemain () {
|
|
|
+ this.$refs['mainForm'].validate((valid) => {
|
|
|
if (valid) {
|
|
|
let _this = this
|
|
|
- //处理检验项目结果
|
|
|
+ // 处理检验项目结果
|
|
|
_this.detailForm.TestItems = []
|
|
|
if (_this.testdetail && _this.testdetail.length > 0) {
|
|
|
for (var i = 0; i < _this.testdetail.length; i++) {
|
|
|
@@ -565,7 +564,7 @@
|
|
|
Code: _this.testdetail[i].TestItems[j].Code,
|
|
|
ItemName: _this.testdetail[i].TestItems[j].ItemName,
|
|
|
Reference: _this.testdetail[i].TestItems[j].Reference,
|
|
|
- ResultData: _this.testdetail[i].TestItems[j].ResultData,
|
|
|
+ ResultData: _this.testdetail[i].TestItems[j].ResultData
|
|
|
}
|
|
|
_this.detailForm.TestItems.push(items)
|
|
|
}
|
|
|
@@ -576,7 +575,7 @@
|
|
|
_this.mainForm = Object.assign(_this.mainForm, _this.detailForm)
|
|
|
}
|
|
|
// _this.mainForm.SampleType = parseInt(_this.mainForm.SampleType)
|
|
|
- //_this.mainForm.SampleTypeName = _this.$refs.refsampletype.selectedLabel
|
|
|
+ // _this.mainForm.SampleTypeName = _this.$refs.refsampletype.selectedLabel
|
|
|
// _this.mainForm.Sex = parseInt(_this.mainForm.Sex)
|
|
|
_this.$axios.post('/sampletest/addsampletestmain', _this.mainForm)
|
|
|
.then(function (response) {
|
|
|
@@ -597,17 +596,17 @@
|
|
|
console.log(error)
|
|
|
})
|
|
|
} else {
|
|
|
- console.log('error submit!!');
|
|
|
- return false;
|
|
|
+ console.log('error submit!!')
|
|
|
+ return false
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
- //编辑信息
|
|
|
- editmain() {
|
|
|
- this.$refs["mainForm"].validate((valid) => {
|
|
|
+ // 编辑信息
|
|
|
+ editmain () {
|
|
|
+ this.$refs['mainForm'].validate((valid) => {
|
|
|
if (valid) {
|
|
|
let _this = this
|
|
|
- //处理检验项目结果
|
|
|
+ // 处理检验项目结果
|
|
|
_this.detailForm.TestItems = []
|
|
|
if (_this.testdetail && _this.testdetail.length > 0) {
|
|
|
for (var i = 0; i < _this.testdetail.length; i++) {
|
|
|
@@ -616,7 +615,7 @@
|
|
|
Code: _this.testdetail[i].TestItems[j].Code,
|
|
|
ItemName: _this.testdetail[i].TestItems[j].ItemName,
|
|
|
Reference: _this.testdetail[i].TestItems[j].Reference,
|
|
|
- ResultData: _this.testdetail[i].TestItems[j].ResultData,
|
|
|
+ ResultData: _this.testdetail[i].TestItems[j].ResultData
|
|
|
}
|
|
|
_this.detailForm.TestItems.push(items)
|
|
|
}
|
|
|
@@ -625,7 +624,7 @@
|
|
|
}
|
|
|
_this.mainForm.SampleType = parseInt(_this.mainForm.SampleType)
|
|
|
_this.mainForm.SampleTypeName = _this.mainForm.SampleType + ''
|
|
|
- //_this.mainForm.SampleTypeName = _this.$refs.refsampletype.selectedLabel
|
|
|
+ // _this.mainForm.SampleTypeName = _this.$refs.refsampletype.selectedLabel
|
|
|
// _this.mainForm.Sex = parseInt(_this.mainForm.Sex)
|
|
|
_this.$axios.post('/sampletest/editsampletestmain/' + _this.MainId, _this.mainForm)
|
|
|
.then(function (response) {
|
|
|
@@ -646,15 +645,15 @@
|
|
|
console.log(error)
|
|
|
})
|
|
|
} else {
|
|
|
- console.log('error submit!!');
|
|
|
- return false;
|
|
|
+ console.log('error submit!!')
|
|
|
+ return false
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
- //获取套餐检验项
|
|
|
- getpackageitems() {
|
|
|
+ // 获取套餐检验项
|
|
|
+ getpackageitems () {
|
|
|
let _this = this
|
|
|
- //_this.detailForm.TestItems = []
|
|
|
+ // _this.detailForm.TestItems = []
|
|
|
_this.$axios.get('/sampletest/getpackagelist/' + _this.mainForm.PackageId)
|
|
|
.then(res => {
|
|
|
_this.testdetail = res.data.items
|
|
|
@@ -663,8 +662,8 @@
|
|
|
console.error(err)
|
|
|
})
|
|
|
},
|
|
|
- //选择样本来源弹窗关闭
|
|
|
- customsampsourceDialogCallback(val) {
|
|
|
+ // 选择样本来源弹窗关闭
|
|
|
+ customsampsourceDialogCallback (val) {
|
|
|
if (val && (val.Id != 0 || val.Id != '')) {
|
|
|
this.mainForm.SourceId = parseInt(val.Id)
|
|
|
this.mainForm.SourceIdCard = val.IdCard
|
|
|
@@ -673,8 +672,8 @@
|
|
|
this.mainForm.Telephone = val.Telephone
|
|
|
}
|
|
|
},
|
|
|
- //查找已审核的协议表单
|
|
|
- searchdata() {
|
|
|
+ // 查找已审核的协议表单
|
|
|
+ searchdata () {
|
|
|
let _this = this
|
|
|
_this.searchProtocoldialog = true
|
|
|
let params = {
|
|
|
@@ -684,17 +683,17 @@
|
|
|
idcard: _this.searchform.IDCard
|
|
|
}
|
|
|
_this.$axios.get('/samplesprotocol/getprotocollist', {
|
|
|
- params
|
|
|
- })
|
|
|
+ params
|
|
|
+ })
|
|
|
.then(function (response) {
|
|
|
_this.protocolsourcelist = response.data.items
|
|
|
_this.currentItemCount = response.data.currentItemCount
|
|
|
})
|
|
|
.catch(function (error) {
|
|
|
- console.log(error);
|
|
|
- });
|
|
|
+ console.log(error)
|
|
|
+ })
|
|
|
},
|
|
|
- searchBarCode() {
|
|
|
+ searchBarCode () {
|
|
|
let _this = this
|
|
|
_this.searchBarCodedialog = true
|
|
|
let params = {
|
|
|
@@ -704,17 +703,17 @@
|
|
|
IDCard: _this.searchForm.IDCard
|
|
|
}
|
|
|
_this.$axios.get('/samplesbook/getbarcodelist', {
|
|
|
- params
|
|
|
- })
|
|
|
+ params
|
|
|
+ })
|
|
|
.then(function (response) {
|
|
|
_this.BarCodelist = response.data.items
|
|
|
_this.CurrentItemCount = response.data.currentItemCount
|
|
|
})
|
|
|
.catch(function (error) {
|
|
|
- console.log(error);
|
|
|
- });
|
|
|
+ console.log(error)
|
|
|
+ })
|
|
|
},
|
|
|
- handleselect(val) {
|
|
|
+ handleselect (val) {
|
|
|
let _this = this
|
|
|
_this.mainForm.ProtocolNo = val.ProtocolNo
|
|
|
_this.mainForm.SourceId = val.Id
|
|
|
@@ -728,7 +727,7 @@
|
|
|
_this.mainForm.SampleTypeName = val.SampleTypeName
|
|
|
_this.searchProtocoldialog = false
|
|
|
},
|
|
|
- Handleselect(val) {
|
|
|
+ Handleselect (val) {
|
|
|
let _this = this
|
|
|
_this.mainForm.ProtocolNo = val.ProtocolNo
|
|
|
_this.mainForm.SourceId = val.SourceId
|
|
|
@@ -743,15 +742,15 @@
|
|
|
_this.searchBarCodedialog = false
|
|
|
},
|
|
|
|
|
|
- auditor() {
|
|
|
+ auditor () {
|
|
|
let _this = this
|
|
|
_this.$refs['mainForm'].validate((valid) => {
|
|
|
if (valid) {
|
|
|
- _this.$confirm("确定审核该检测单?审核后所有信息将不可修改!", "提示", {
|
|
|
- confirmButtonText: "确定",
|
|
|
- cancelButtonText: "取消",
|
|
|
- type: "warning"
|
|
|
- })
|
|
|
+ _this.$confirm('确定审核该检测单?审核后所有信息将不可修改!', '提示', {
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ cancelButtonText: '取消',
|
|
|
+ type: 'warning'
|
|
|
+ })
|
|
|
.then(() => {
|
|
|
if (_this.shenheForm.SuccessStatus == 0) {
|
|
|
_this.mainForm.AuditorFlag = 1
|
|
|
@@ -769,7 +768,7 @@
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
- saveauditor(mainForm) {
|
|
|
+ saveauditor (mainForm) {
|
|
|
let _this = this
|
|
|
_this.$axios.put('/sampletest/auditortest/' + _this.MainId, _this.mainForm)
|
|
|
.then(res => {
|
|
|
@@ -793,26 +792,26 @@
|
|
|
})
|
|
|
},
|
|
|
|
|
|
- handleSizeChange(value) {
|
|
|
+ handleSizeChange (value) {
|
|
|
this.size = value
|
|
|
this.currentPage = 1
|
|
|
this.searchdata()
|
|
|
},
|
|
|
- handleCurrentChange(value) {
|
|
|
+ handleCurrentChange (value) {
|
|
|
this.currentPage = value
|
|
|
this.searchdata()
|
|
|
},
|
|
|
- HandleSizeChange(value) {
|
|
|
+ HandleSizeChange (value) {
|
|
|
this.Size = value
|
|
|
this.CurrentPage = 1
|
|
|
this.searchBarCode()
|
|
|
},
|
|
|
- HandleCurrentChange(value) {
|
|
|
+ HandleCurrentChange (value) {
|
|
|
this.CurrentPage = value
|
|
|
this.searchBarCode()
|
|
|
},
|
|
|
- //返回按钮
|
|
|
- goback() {
|
|
|
+ // 返回按钮
|
|
|
+ goback () {
|
|
|
if (this.$route.query.size) {
|
|
|
this.$router.push({
|
|
|
name: this.$route.query.pname,
|
|
|
@@ -825,16 +824,15 @@
|
|
|
this.$router.go(-1)
|
|
|
}
|
|
|
},
|
|
|
- jssexhandle(val) {
|
|
|
+ jssexhandle (val) {
|
|
|
if (val === '0') {
|
|
|
return '男'
|
|
|
} else if (val === '1') {
|
|
|
return '女'
|
|
|
}
|
|
|
- },
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
</script>
|
|
|
|
|
|
<style lang="scss">
|