|
|
@@ -215,7 +215,7 @@
|
|
|
<label>样本类型 : {{ sampleForm.SampleTypeName }} </label>
|
|
|
</el-col>
|
|
|
<el-col :span="24" style="padding: 8px 5px 0 0;">
|
|
|
- <label>样本编码 : {{ sampleForm.BarCode }}</label>
|
|
|
+ <label>样本条码 : {{ sampleForm.BarCode }}</label>
|
|
|
</el-col>
|
|
|
<el-col :span="24" style="padding: 8px 5px 0 0;">
|
|
|
<label>位置编码 : {{ checkPosition }}</label>
|
|
|
@@ -238,7 +238,7 @@
|
|
|
<label>样本条码 : {{ sampleForm.SampleCode }} </label>
|
|
|
</el-col>
|
|
|
<el-col :span="12">
|
|
|
- <label>可用容量 : {{ sampleForm.Capacitystr }} {{ sampleForm.Unit }} </label>
|
|
|
+ <label>可用容量 : {{ sampleForm.Capacity }} {{ sampleForm.Unit }} </label>
|
|
|
</el-col>
|
|
|
<el-col :span="12">
|
|
|
<label>录入人 : {{ sampleForm.CreateBy }} </label>
|
|
|
@@ -300,9 +300,9 @@
|
|
|
<el-form :model="sampleForm" ref="sampleForm" :rules="sampleformRule" label-width="120px" size="mini">
|
|
|
<el-row>
|
|
|
<el-col :span="8">
|
|
|
- <el-form-item label="样本类型" required prop="SampleTypestr">
|
|
|
- <el-select v-model="sampleForm.SampleTypestr" clearable placeholder="请选择" style="width:100%"
|
|
|
- @change="choosetype" :disabled="disabledsampletype || batchitem == '1'">
|
|
|
+ <el-form-item label="样本类型" required prop="SampleType">
|
|
|
+ <el-select v-model="sampleForm.SampleType" clearable placeholder="请选择" style="width:100%"
|
|
|
+ @change="chooseSampleType" :disabled="disabledsampletype || batchitem == '1'">
|
|
|
<el-option v-for="item in sampleTypeList" :label="item.label" :key="item" :value="item.value">
|
|
|
</el-option>
|
|
|
</el-select>
|
|
|
@@ -353,7 +353,7 @@
|
|
|
<el-col :span="8">
|
|
|
<el-form-item label="样本编码" required prop="SampleCode">
|
|
|
<el-input v-model="sampleForm.SampleCode" :disabled="disabledsamplecode || contains('1,2', batchitem)"
|
|
|
- @blur="blursamplecode" placeholder="样本编码"></el-input>
|
|
|
+ @blur="blurSampleCode" placeholder="样本编码"></el-input>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="8">
|
|
|
@@ -362,8 +362,8 @@
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="8">
|
|
|
- <el-form-item label="可用容量" prop="Capacitystr" placeholder="可用容量">
|
|
|
- <el-input v-model="sampleForm.Capacitystr" :disabled="disabledcapacity" placeholder="可用容量">
|
|
|
+ <el-form-item label="可用容量" prop="Capacity" placeholder="可用容量">
|
|
|
+ <el-input v-model="sampleForm.Capacity" :disabled="disabledcapacity" placeholder="可用容量">
|
|
|
</el-input>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
@@ -522,7 +522,7 @@
|
|
|
<img width="100%" :src="dialogImageUrl" alt="">
|
|
|
</el-dialog>
|
|
|
|
|
|
- <preoperation-dialog @close="preoperationDialogCallback" :visible.sync="dialogFormVisible"></preoperation-dialog>
|
|
|
+ <preoperation-dialog @close="preoperationDialogCallback" :visible.sync="preoperationVisible"></preoperation-dialog>
|
|
|
<choose-source-dialog @close="peopleDialogCallback" :visible.sync="peopleSourceVisible"></choose-source-dialog>
|
|
|
<choose-animal-dialog @close="animalDialogCallback" :visible.sync="animalSourceVisible"></choose-animal-dialog>
|
|
|
<choose-micro-dialog @close="microDialogCallback" :visible.sync="microSourceVisible"></choose-micro-dialog>
|
|
|
@@ -577,7 +577,6 @@
|
|
|
'&xshelf=' + this.yshelf + '&yshelf=' + this.xshelf + '&value=' + value
|
|
|
_this.$axios.get('/sampletype/getiscanusedbystation' + parmstr, {})
|
|
|
.then(res => {
|
|
|
- // response
|
|
|
if (res.data.code === 0) {
|
|
|
callback()
|
|
|
} else {
|
|
|
@@ -585,7 +584,6 @@
|
|
|
}
|
|
|
})
|
|
|
.catch(err => {
|
|
|
- // handle error
|
|
|
callback(new Error('网络异常请重试'))
|
|
|
console.error(err)
|
|
|
})
|
|
|
@@ -619,7 +617,6 @@
|
|
|
let _this = this
|
|
|
_this.$axios.get('/sampleoperation/validformdetailbarcoder?param=' + value, {})
|
|
|
.then(res => {
|
|
|
- // response
|
|
|
if (res.data.code === 0) {
|
|
|
callback()
|
|
|
} else {
|
|
|
@@ -627,7 +624,6 @@
|
|
|
}
|
|
|
})
|
|
|
.catch(err => {
|
|
|
- // handle error
|
|
|
callback(new Error('网络异常请重试'))
|
|
|
console.error(err)
|
|
|
})
|
|
|
@@ -649,13 +645,13 @@
|
|
|
disabledbarcode: false,
|
|
|
disabledsamplecode: false,
|
|
|
disabledsampletype: false,
|
|
|
- disabledsamplingorgan: false,
|
|
|
+ //disabledsamplingorgan: false,
|
|
|
disabledvaliditydate: false,
|
|
|
disabledsourcebutton: false,
|
|
|
disabledcheckprint: false,
|
|
|
diaabledreceiveDate: false,
|
|
|
diaabledyongjiu: false,
|
|
|
- disabledsamplingsite: false,
|
|
|
+ // disabledsamplingsite: false,
|
|
|
disabledcapacity: false,
|
|
|
disabledunit: false,
|
|
|
disabledbtnpreopera: false,
|
|
|
@@ -664,14 +660,14 @@
|
|
|
sampleForm: {
|
|
|
BarCode: '', // 样本条码
|
|
|
SampleCode: '', // 样本编码
|
|
|
- SampleTypestr: '', // 样本类型
|
|
|
+ SampleType: '', // 样本类型
|
|
|
SampleTypeName: '',
|
|
|
// SamplingOrgan: '', // 组织器官
|
|
|
// SamplingSite: '', // 取材部位
|
|
|
SamplingSiteName: '',
|
|
|
Name: '', // 名称
|
|
|
ReceiveDate: new Date(), // 接收日期
|
|
|
- Capacitystr: '', // 可用容量
|
|
|
+ Capacity: '', // 可用容量
|
|
|
Unit: '', // 单位(容量)
|
|
|
ValidityDate: '', // 有效日期
|
|
|
InnerCode: '', // 样本内码
|
|
|
@@ -712,11 +708,11 @@
|
|
|
validator: checkSampleCode,
|
|
|
trigger: 'blur'
|
|
|
}],
|
|
|
- SampleTypestr: [{
|
|
|
+ SampleType: [{
|
|
|
validator: checkSampleType,
|
|
|
trigger: 'change'
|
|
|
}],
|
|
|
- Capacitystr: [{
|
|
|
+ Capacity: [{
|
|
|
validator: checkCapacity,
|
|
|
trigger: 'blur'
|
|
|
}],
|
|
|
@@ -756,7 +752,7 @@
|
|
|
volumeunit: 'ml',
|
|
|
date: '',
|
|
|
tableColumnWidth: '200',
|
|
|
- dialogFormVisible: false,
|
|
|
+ preoperationVisible: false,
|
|
|
// 选择样本来源对话框
|
|
|
form2: {},
|
|
|
peopleSourceVisible: false,
|
|
|
@@ -822,7 +818,7 @@
|
|
|
dialogtiquVisible: false, // 提取弹框是否显示
|
|
|
sampleinfodetail: {}, // 样本信息
|
|
|
sampleinfoid: 0, // 所选样本的id
|
|
|
- sampleinfotype: '', // 所选样本的type
|
|
|
+ // sampleinfotype: '', // 所选样本的type
|
|
|
code_default: false, // 样本编码是否知道生成
|
|
|
extendList: [], // 特有扩展
|
|
|
// publickzlist: [], // 公共扩展
|
|
|
@@ -2224,7 +2220,6 @@
|
|
|
}
|
|
|
],
|
|
|
waituploads: [], // 等待上传的附件列表
|
|
|
- userlist: [], // 录入人
|
|
|
downloadTemplates: [{
|
|
|
Name: "默认模版"
|
|
|
}],
|
|
|
@@ -2255,16 +2250,11 @@
|
|
|
this.equipid = eid
|
|
|
this.getEquipImg(eid)
|
|
|
this.initData(eid)
|
|
|
- //this.getsametypetreelist()
|
|
|
this.getSampleType()
|
|
|
- // 获取公共扩展
|
|
|
- // this.getpublickz()
|
|
|
this.getSampleUnit()
|
|
|
// 获取自动生成编码数据
|
|
|
- this.getautocodedata()
|
|
|
+ this.getAutoCodedata()
|
|
|
this.getisAutoPrint()
|
|
|
- // 获取录入人
|
|
|
- this.getuserlist()
|
|
|
// 获取分组列表
|
|
|
this.getGrouplist()
|
|
|
},
|
|
|
@@ -2279,7 +2269,6 @@
|
|
|
// 获取冻存架信息
|
|
|
_this.$axios.get('/shelfset/equipmentdraw/' + eid, {})
|
|
|
.then(res => {
|
|
|
- // response
|
|
|
_this.downloading = false
|
|
|
_this.samplelist = res.data.items
|
|
|
_this.colorTableHeight = res.data.dimension[1]
|
|
|
@@ -2287,7 +2276,6 @@
|
|
|
_this.location()
|
|
|
})
|
|
|
.catch(err => {
|
|
|
- // handle error
|
|
|
console.error(err)
|
|
|
})
|
|
|
},
|
|
|
@@ -2374,6 +2362,34 @@
|
|
|
_this.UnitList = res.data
|
|
|
})
|
|
|
},
|
|
|
+ // 获取是否生成编码
|
|
|
+ getAutoCodedata() {
|
|
|
+ let _this = this
|
|
|
+ _this.$axios.get('/sampleoperation/getAutoCodedata', {})
|
|
|
+ .then(res => {
|
|
|
+ _this.sampleForm.code_default = res.data.code_default
|
|
|
+ _this.sampleForm.code_codeId = res.data.code_codeId
|
|
|
+ _this.sampleForm.code_lastnum = res.data.code_lastnum
|
|
|
+ _this.sampleForm.coderule_samplingorgan_flag = res.data.coderule_samplingorgan_flag
|
|
|
+ _this.sampleForm.coderule_sampletype_flag = res.data.coderule_sampletype_flag
|
|
|
+ _this.sampleForm.SampleCode = res.data.SampleCode
|
|
|
+ })
|
|
|
+ .catch(err => {
|
|
|
+ console.error(err)
|
|
|
+ })
|
|
|
+ },
|
|
|
+ // 获取是否默认勾选打印标签
|
|
|
+ getisAutoPrint() {
|
|
|
+ let _this = this
|
|
|
+ _this.$axios.get('/paramset/getisautoprint', {})
|
|
|
+ .then(res => {
|
|
|
+ if (res.data === 'true') {
|
|
|
+ _this.sampleForm.autoprintchecked = true
|
|
|
+ } else {
|
|
|
+ _this.sampleForm.autoprintchecked = false
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
|
|
|
getEquipImg(eid) {
|
|
|
let _this = this
|
|
|
@@ -2563,64 +2579,7 @@
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
- getautocodedata() {
|
|
|
- let _this = this
|
|
|
- _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
|
|
|
- _this.sampleForm.coderule_samplingorgan_flag = res.data.coderule_samplingorgan_flag
|
|
|
- _this.sampleForm.coderule_sampletype_flag = res.data.coderule_sampletype_flag
|
|
|
- _this.sampleForm.SampleCode = res.data.SampleCode
|
|
|
- })
|
|
|
- .catch(err => {
|
|
|
- // handle error
|
|
|
- console.error(err)
|
|
|
- })
|
|
|
- },
|
|
|
- // 获取是否默认勾选打印标签
|
|
|
- getisAutoPrint() {
|
|
|
- let _this = this
|
|
|
- _this.$axios.get('/paramset/getisautoprint', {})
|
|
|
- .then(res => {
|
|
|
- if (res.data === 'true') {
|
|
|
- _this.sampleForm.autoprintchecked = true
|
|
|
- } else {
|
|
|
- _this.sampleForm.autoprintchecked = false
|
|
|
- }
|
|
|
- })
|
|
|
- },
|
|
|
-
|
|
|
- openpreop() {
|
|
|
- if (this.dchxtable === -1 || this.dchytable === -1) {
|
|
|
- this.$message({
|
|
|
- type: 'warning',
|
|
|
- message: '请选择存储位置!'
|
|
|
- })
|
|
|
- return
|
|
|
- }
|
|
|
- if (this.sampleForm.type_flag === 'edit') {
|
|
|
- this.$message({
|
|
|
- type: 'warning',
|
|
|
- message: '当前位置已有样本!请选择其他存储位置!'
|
|
|
- })
|
|
|
- return
|
|
|
- }
|
|
|
- this.dialogFormVisible = true
|
|
|
- var packnew = {
|
|
|
- typelist: this.sampleTypeList,
|
|
|
- organlist: this.organlist,
|
|
|
- cascade: this.organlist2
|
|
|
- }
|
|
|
- this.$store.dispatch('sampleNewModel', packnew)
|
|
|
- },
|
|
|
-
|
|
|
+
|
|
|
handleclk(xbox, ybox, xshelf, yshelf) {
|
|
|
// 清空状态
|
|
|
this.clearSampleForm()
|
|
|
@@ -2675,12 +2634,12 @@
|
|
|
_this.disabledsamplecode = true
|
|
|
_this.disabledbarcode = true
|
|
|
_this.disabledsampletype = true
|
|
|
- _this.disabledsamplingorgan = true
|
|
|
+ // _this.disabledsamplingorgan = true
|
|
|
_this.disabledsourcebutton = true
|
|
|
_this.disabledcheckprint = true
|
|
|
_this.diaabledreceiveDate = true
|
|
|
_this.diaabledyongjiu = true
|
|
|
- _this.disabledsamplingsite = true
|
|
|
+ // _this.disabledsamplingsite = true
|
|
|
_this.disabledcapacity = true
|
|
|
_this.disabledunit = true
|
|
|
_this.disabledvaliditydate = true
|
|
|
@@ -2706,112 +2665,6 @@
|
|
|
// }
|
|
|
// }
|
|
|
},
|
|
|
- getSampleInfoByBatchs() {
|
|
|
- let _this = this
|
|
|
- if (_this.batchstorages.length > 0) {
|
|
|
- let val = _this.batchstorages[0]
|
|
|
- _this.sampleForm.BarCode = val.BarCode
|
|
|
- _this.sampleForm.SampleCode = val.SampleCode
|
|
|
- _this.sampleForm.SampleTypestr = val.SampleTypeId + ''
|
|
|
- _this.sampleForm.SampleTypeName = val.SampleTypeName
|
|
|
- _this.sampleForm.Capacitystr = val.SampleSize
|
|
|
- _this.sampleForm.Unit = val.SampleUnit
|
|
|
- _this.sampleForm.SourceId = val.SampleSourceId
|
|
|
- _this.sampleForm.SourceIdCard = val.IdCard
|
|
|
- _this.sampleForm.SourceName = val.Name
|
|
|
- }
|
|
|
- },
|
|
|
-
|
|
|
- // getOrgan(code) {
|
|
|
- // let _this = this
|
|
|
- // _this.$axios.get('/samplesite/getsitebyfcode?code=' + code, {})
|
|
|
- // .then(res => {
|
|
|
- // // response
|
|
|
- // for (var i = 0; i < res.data.length; i++) {
|
|
|
- // _this.samplequcailist.push({
|
|
|
- // label: res.data[i].Name,
|
|
|
- // value: res.data[i].Code
|
|
|
- // })
|
|
|
- // }
|
|
|
- // if (_this.sampleForm.type_flag === 'add') {
|
|
|
- // if (_this.samplequcailist.length > 0) {
|
|
|
- // _this.sampleForm.SamplingSite = _this.samplequcailist[0].value
|
|
|
- // } else {
|
|
|
- // _this.sampleForm.SamplingSite = ''
|
|
|
- // }
|
|
|
- // }
|
|
|
- // })
|
|
|
- // },
|
|
|
- choosetype(v) {
|
|
|
- let _this = this
|
|
|
- _this.groupnameList = []
|
|
|
- _this.extendList = []
|
|
|
- if (v !== '') {
|
|
|
- _this.$axios.get('/sampletype/gettykzzdgroup?SampleType=' + v, {})
|
|
|
- .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.getSpecialkz(v)
|
|
|
- let sampletypestr = _this.sampleForm.SampleTypestr
|
|
|
- _this.getautobarcode(sampletypestr)
|
|
|
- })
|
|
|
- }
|
|
|
- },
|
|
|
- getSpecialkz(v) {
|
|
|
- // 获取特有扩展
|
|
|
- let _this = this
|
|
|
- if (v !== '') {
|
|
|
- _this.$axios.get('/sampletype/gettykzzd?SampleType=' + v, {})
|
|
|
- .then(res => {
|
|
|
- _this.extendList = res.data
|
|
|
- // 获取样本类型数据
|
|
|
- _this.getsampetypedata(v)
|
|
|
- })
|
|
|
- }
|
|
|
- },
|
|
|
- getsampetypedata(v) {
|
|
|
- let _this = this
|
|
|
- _this.$axios.get('/sampletype/sampletypeajax?id=' + v, {})
|
|
|
- .then(res => {
|
|
|
- // response
|
|
|
- _this.sampleForm.Capacitystr = res.data.SampleType.DefaultCapacity + ''
|
|
|
- if (res.data.VHours === '5000-1-1 23:59:59') {
|
|
|
- _this.sampleForm.Isyongjiu = true
|
|
|
- } else {
|
|
|
- _this.sampleForm.ValidityDate = new Date(res.data.VHours)
|
|
|
- _this.sampleForm.Isyongjiu = false
|
|
|
- }
|
|
|
- _this.sampleForm.Unit = res.data.SampleType.Unit
|
|
|
- if (_this.sampleForm.code_default === 'true' && _this.sampleForm.coderule_sampletype_flag === 1) {
|
|
|
- if (_this.sampleForm.coderule_samplingorgan_flag !== 1 || (_this.sampleForm
|
|
|
- .coderule_samplingorgan_flag === 1 && _this.selectedorgan.length > 0)) {
|
|
|
- let sampletypestr = _this.sampleForm.SampleTypestr
|
|
|
- let sampleselectedorgan = ''
|
|
|
- if (_this.selectedorgan.length > 0) {
|
|
|
- sampleselectedorgan = _this.selectedorgan[_this.selectedorgan.length - 1]
|
|
|
- }
|
|
|
- _this.getautobarcode(sampletypestr, sampleselectedorgan)
|
|
|
- }
|
|
|
- }
|
|
|
- })
|
|
|
- },
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
- getautobarcode(samptype, samporg) {
|
|
|
- // 获取自动编码
|
|
|
- let _this = this
|
|
|
- _this.$axios.get('/sampleoperation/getautobarcode?SampleType=' + samptype + '&fid=' + samporg, {})
|
|
|
- .then(res => {
|
|
|
- // response
|
|
|
- _this.sampleForm.code_lastnum = res.data.num
|
|
|
- _this.sampleForm.SampleCode = res.data.barcode
|
|
|
- })
|
|
|
- },
|
|
|
// 判断是否有冻存管图片位置,依据现在逻辑先调整
|
|
|
IsPosition(stations, x, y) {
|
|
|
for (var i = 0; i < stations.length; i++) {
|
|
|
@@ -2824,35 +2677,28 @@
|
|
|
}
|
|
|
return false
|
|
|
},
|
|
|
- // 选择预录入样本
|
|
|
- preoperationDialogCallback(val) {
|
|
|
- let _this = this
|
|
|
- _this.sampleForm.type_flag = 'pre_add'
|
|
|
- _this.disabledsamplecode = true
|
|
|
- _this.disabledbarcode = true
|
|
|
- _this.disabledsampletype = true
|
|
|
- _this.disabledsamplingorgan = true
|
|
|
- _this.disabledsourcebutton = true
|
|
|
- _this.disabledcheckprint = true
|
|
|
- _this.disabledgroup = true
|
|
|
- this.getSampleInfoById(val.Id)
|
|
|
- },
|
|
|
- // 获取附件信息
|
|
|
- getattachment(barcode, samplecode) {
|
|
|
- let _this = this
|
|
|
- let params = {
|
|
|
- samplecode: samplecode,
|
|
|
- barcode: barcode
|
|
|
+ openpreop() {
|
|
|
+ if (this.dchxtable === -1 || this.dchytable === -1) {
|
|
|
+ this.$message({
|
|
|
+ type: 'warning',
|
|
|
+ message: '请选择存储位置!'
|
|
|
+ })
|
|
|
+ return
|
|
|
}
|
|
|
- this.$axios.get('/sampleoperation/getattachmentbysamplecode', {
|
|
|
- params
|
|
|
+ if (this.sampleForm.type_flag === 'edit') {
|
|
|
+ this.$message({
|
|
|
+ type: 'warning',
|
|
|
+ message: '当前位置已有样本!请选择其他存储位置!'
|
|
|
})
|
|
|
- .then(res => {
|
|
|
- _this.achmentlist = res.data
|
|
|
- }).catch(() => {})
|
|
|
- },
|
|
|
- clickachment(host, fid) {
|
|
|
- window.open(`http://${host}/${fid}`)
|
|
|
+ return
|
|
|
+ }
|
|
|
+ this.preoperationVisible = true
|
|
|
+ var packnew = {
|
|
|
+ typelist: this.sampleTypeList,
|
|
|
+ organlist: this.organlist,
|
|
|
+ cascade: this.organlist2
|
|
|
+ }
|
|
|
+ this.$store.dispatch('sampleNewModel', packnew)
|
|
|
},
|
|
|
|
|
|
getSampleInfoById(id) {
|
|
|
@@ -2860,15 +2706,11 @@
|
|
|
_this.sampleinfoid = id
|
|
|
_this.$axios.get('/sampleoperation/getsamplebyid?SamplesInfoId=' + id, {})
|
|
|
.then(res => {
|
|
|
- // 分装提取复苏使用
|
|
|
_this.sampleinfodetail = res.data
|
|
|
- _this.sampleinfotype = res.data.SampleType + ''
|
|
|
_this.sampleForm.BarCode = res.data.BarCode
|
|
|
_this.sampleForm.SampleCode = res.data.SampleCode
|
|
|
_this.sampleForm.SampleTypeName = res.data.SampleTypeName + ''
|
|
|
- _this.sampleForm.SampleTypestr = res.data.SampleType + ''
|
|
|
- // _this.getparentcodebytopcode(res.data.SamplingOrgan)
|
|
|
- // _this.sampleForm.SamplingSite = res.data.SamplingSite
|
|
|
+ _this.sampleForm.SampleType = res.data.SampleType + ''
|
|
|
_this.sampleForm.Name = res.data.Name
|
|
|
if (res.data.ReceiveDate.substring(0, 3) === '000') {
|
|
|
_this.sampleForm.ReceiveDate = null
|
|
|
@@ -2890,32 +2732,19 @@
|
|
|
_this.sampleForm.ValidityDate = new Date(res.data.ValidityDate)
|
|
|
_this.ValidityDate = res.data.ValidityDate + ''
|
|
|
}
|
|
|
- _this.sampleForm.Capacitystr = res.data.Capacity + ''
|
|
|
+ _this.sampleForm.Capacity = res.data.Capacity + ''
|
|
|
_this.sampleForm.Unit = res.data.Unit
|
|
|
_this.sampleForm.InnerCode = res.data.InnerCode
|
|
|
_this.sampleForm.Remark = res.data.Remark
|
|
|
_this.sampleForm.SourceId = res.data.SourceId
|
|
|
_this.sampleForm.SourceIdCard = res.data.SourceIdCard
|
|
|
_this.sampleForm.SourceName = res.data.SourceName
|
|
|
- // 录入人
|
|
|
- let iscontaincreateuser = false
|
|
|
- for (var i = 0; i < _this.userlist.length; i++) {
|
|
|
- if (_this.userlist[i].Id == res.data.CreateUserId) {
|
|
|
- iscontaincreateuser = true
|
|
|
- break
|
|
|
- }
|
|
|
- }
|
|
|
- if (!iscontaincreateuser && res.data.CreateBy != '') {
|
|
|
- _this.userlist.unshift({
|
|
|
- 'Id': res.data.CreateUserId,
|
|
|
- 'Realname': res.data.CreateBy
|
|
|
- })
|
|
|
- }
|
|
|
_this.sampleForm.CreateUserId = res.data.CreateUserId
|
|
|
+ _this.sampleForm.CreateBy = res.data.CreateBy
|
|
|
//获取所属分组
|
|
|
_this.getGroup(res.data.BarCode)
|
|
|
// 获取特有扩展并给特有扩展信息赋值
|
|
|
- _this.getExtendValue(res.data)
|
|
|
+ _this.getExtendValue(res.data.SampleType)
|
|
|
//获取附件信息
|
|
|
_this.getattachment(res.data.BarCode, res.data.SampleCode)
|
|
|
})
|
|
|
@@ -2933,26 +2762,161 @@
|
|
|
this.groupname = res.data.GroupName
|
|
|
})
|
|
|
.catch(err => {
|
|
|
- // handle error
|
|
|
console.error(err)
|
|
|
})
|
|
|
},
|
|
|
+ // 获取特有扩展并赋值
|
|
|
getExtendValue(val) {
|
|
|
- // 获取特有扩展并赋值
|
|
|
- if (val && val.SampleType > 0) {
|
|
|
- let _this = this
|
|
|
- _this.$axios.get('/sampletype/gettykzzd?SampleType=' + val.SampleType, {})
|
|
|
+ let _this = this
|
|
|
+ _this.groupnameList = []
|
|
|
+ _this.extendList = []
|
|
|
+ if (val && val > 0) {
|
|
|
+ _this.$axios.get('/sampletype/gettykzzdgroup?SampleType=' + val, {})
|
|
|
+ .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.$axios.get('/sampletype/gettykzzd?SampleType=' + val, {})
|
|
|
+ .then(res => {
|
|
|
+ _this.extendList = res.data
|
|
|
+ for (let i = 0; i < this.extendList.length; i++) {
|
|
|
+ this.extendList[i].FieldDefault = val[this.extendList[i].FieldName]
|
|
|
+ }
|
|
|
+ })
|
|
|
+ })
|
|
|
+ }
|
|
|
+ },
|
|
|
+ // 获取附件信息
|
|
|
+ getattachment(barcode, samplecode) {
|
|
|
+ let _this = this
|
|
|
+ let params = {
|
|
|
+ samplecode: samplecode,
|
|
|
+ barcode: barcode
|
|
|
+ }
|
|
|
+ this.$axios.get('/sampleoperation/getattachmentbysamplecode', {
|
|
|
+ params
|
|
|
+ })
|
|
|
+ .then(res => {
|
|
|
+ _this.achmentlist = res.data
|
|
|
+ }).catch(() => {})
|
|
|
+ },
|
|
|
+ clickachment(host, fid) {
|
|
|
+ window.open(`http://${host}/${fid}`)
|
|
|
+ },
|
|
|
+ getSampleInfoByBatchs() {
|
|
|
+ let _this = this
|
|
|
+ if (_this.batchstorages.length > 0) {
|
|
|
+ let val = _this.batchstorages[0]
|
|
|
+ _this.sampleForm.BarCode = val.BarCode
|
|
|
+ _this.sampleForm.SampleCode = val.SampleCode
|
|
|
+ _this.sampleForm.SampleType = val.SampleTypeId + ''
|
|
|
+ _this.sampleForm.SampleTypeName = val.SampleTypeName
|
|
|
+ _this.sampleForm.Capacity = val.SampleSize
|
|
|
+ _this.sampleForm.Unit = val.SampleUnit
|
|
|
+ _this.sampleForm.SourceId = val.SampleSourceId
|
|
|
+ _this.sampleForm.SourceIdCard = val.IdCard
|
|
|
+ _this.sampleForm.SourceName = val.Name
|
|
|
+ }
|
|
|
+ },
|
|
|
+
|
|
|
+ chooseSampleType(v) {
|
|
|
+ let _this = this
|
|
|
+ _this.groupnameList = []
|
|
|
+ _this.extendList = []
|
|
|
+ if (v !== '') {
|
|
|
+ _this.$axios.get('/sampletype/gettykzzdgroup?SampleType=' + v, {})
|
|
|
+ .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.getSpecialkz(v)
|
|
|
+ _this.getSampleTypedata(v)
|
|
|
+ })
|
|
|
+ }
|
|
|
+ },
|
|
|
+ getSpecialkz(v) {
|
|
|
+ let _this = this
|
|
|
+ if (v !== '') {
|
|
|
+ _this.$axios.get('/sampletype/gettykzzd?SampleType=' + v, {})
|
|
|
.then(res => {
|
|
|
- // response
|
|
|
_this.extendList = res.data
|
|
|
- // 扩展赋值
|
|
|
- for (let i = 0; i < this.extendList.length; i++) {
|
|
|
- this.extendList[i].FieldDefault = val[this.extendList[i].FieldName]
|
|
|
+ })
|
|
|
+ }
|
|
|
+ },
|
|
|
+ getSampleTypedata(v) {
|
|
|
+ let _this = this
|
|
|
+ _this.$axios.get('/sampletype/sampletypeajax?id=' + v, {})
|
|
|
+ .then(res => {
|
|
|
+ _this.sampleForm.Capacity = res.data.SampleType.DefaultCapacity + ''
|
|
|
+ if (res.data.VHours === '5000-1-1 23:59:59') {
|
|
|
+ _this.sampleForm.Isyongjiu = true
|
|
|
+ } else {
|
|
|
+ _this.sampleForm.ValidityDate = new Date(res.data.VHours)
|
|
|
+ _this.sampleForm.Isyongjiu = false
|
|
|
+ }
|
|
|
+ _this.sampleForm.Unit = res.data.SampleType.Unit
|
|
|
+ if (_this.sampleForm.SampleCode == '' && _this.sampleForm.code_default === 'true' && _this.sampleForm
|
|
|
+ .coderule_sampletype_flag === 1) {
|
|
|
+ _this.getAutoBarCode(v)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ getAutoBarCode(samptype) {
|
|
|
+ let _this = this
|
|
|
+ _this.$axios.get('/sampleoperation/getautobarcode?SampleType=' + samptype, {})
|
|
|
+ .then(res => {
|
|
|
+ _this.sampleForm.code_lastnum = res.data.num
|
|
|
+ _this.sampleForm.SampleCode = res.data.barcode
|
|
|
+ })
|
|
|
+ },
|
|
|
+ blurSampleCode() {
|
|
|
+ let _this = this
|
|
|
+ if (_this.sampleForm.SampleCode !== '') {
|
|
|
+ _this.$axios.get('/sampleoperation/getsamplebysamplecode?samplecode=' + this.sampleForm.SampleCode, {})
|
|
|
+ .then(res => {
|
|
|
+ if (res.data.SampleCode !== '') {
|
|
|
+ _this.disabledsamplecode = true
|
|
|
+ _this.disabledsampletype = true
|
|
|
+ //_this.disabledsamplingorgan = true
|
|
|
+ _this.disabledsourcebutton = true
|
|
|
+ _this.sampleForm.BarCode = ''
|
|
|
+ _this.sampleForm.SampleCode = res.data.SampleCode
|
|
|
+ _this.sampleForm.SampleType = res.data.SampleType + ''
|
|
|
+ _this.sampleForm.Name = res.data.Name
|
|
|
+ _this.sampleForm.SourceId = res.data.SourceId
|
|
|
+ _this.sampleForm.SourceIdCard = res.data.SourceIdCard
|
|
|
+ _this.sampleForm.SourceName = res.data.SourceName
|
|
|
+ if (res.data.ReceiveDate.substring(0, 3) === '000') {
|
|
|
+ _this.sampleForm.ReceiveDate = null
|
|
|
+ } else {
|
|
|
+ _this.sampleForm.ReceiveDate = new Date(res.data.ReceiveDate)
|
|
|
+ }
|
|
|
+ _this.getSampleTypedata(_this.sampleForm.SampleType)
|
|
|
+ // 获取特有扩展并给特有扩展信息赋值
|
|
|
+ _this.getExtendValue(res.data.SampleType)
|
|
|
}
|
|
|
})
|
|
|
}
|
|
|
},
|
|
|
|
|
|
+ preoperationDialogCallback(val) {
|
|
|
+ let _this = this
|
|
|
+ _this.sampleForm.type_flag = 'pre_add'
|
|
|
+ _this.disabledsamplecode = true
|
|
|
+ _this.disabledbarcode = true
|
|
|
+ _this.disabledsampletype = true
|
|
|
+ //_this.disabledsamplingorgan = true
|
|
|
+ _this.disabledsourcebutton = true
|
|
|
+ _this.disabledcheckprint = true
|
|
|
+ _this.disabledgroup = true
|
|
|
+ _this.getSampleInfoById(val.Id)
|
|
|
+ },
|
|
|
peopleDialogCallback(val) {
|
|
|
this.sampleForm.SourceId = val.Id
|
|
|
this.sampleForm.SourceIdCard = val.IdCard
|
|
|
@@ -2967,21 +2931,6 @@
|
|
|
this.sampleForm.SourceName = val.Name
|
|
|
},
|
|
|
|
|
|
- // getparentcodebytopcode(v) {
|
|
|
- // let _this = this
|
|
|
- // _this.$axios.get('/sampleorgan/getparentcodebytopcode/' + v, {})
|
|
|
- // .then(res => {
|
|
|
- // _this.selectedorgan = []
|
|
|
- // let pidarr = res.data.split(',')
|
|
|
- // for (var i = pidarr.length - 1; i >= 0; i--) {
|
|
|
- // if (pidarr[i] !== '0') {
|
|
|
- // _this.selectedorgan.push(pidarr[i])
|
|
|
- // }
|
|
|
- // }
|
|
|
- // // _this.getOrgan(_this.selectedorgan[_this.selectedorgan.length - 1])
|
|
|
- // })
|
|
|
- // },
|
|
|
-
|
|
|
savedata() {
|
|
|
if (this.sampleTitle == '新增样本') {
|
|
|
this.addSampleInfo()
|
|
|
@@ -3066,6 +3015,7 @@
|
|
|
}
|
|
|
_this.GroupName = tempOfficers.join(',');
|
|
|
}
|
|
|
+ console.log("--------------------------", params)
|
|
|
// _this.$axios.post('/sampleoperation?batchitem=' + _this.batchitem + '&groupid=' + _this.GroupId +
|
|
|
// '&groupname=' +
|
|
|
_this.$axios.post('/sampleoperation?groupid=' + _this.GroupId + '&groupname=' + _this.GroupName,
|
|
|
@@ -3097,7 +3047,6 @@
|
|
|
let printparams = res.data.item.Printmsg.split(',')
|
|
|
if (printparams.length === 3 && printparams[0] !== '' && printparams[1] !== '' &&
|
|
|
printparams[2] !== '') {
|
|
|
- // 执行打印操作
|
|
|
window.PrintReport(printparams[1], `samples,${printparams[2]},${printparams[0]}`)
|
|
|
}
|
|
|
}
|
|
|
@@ -3127,7 +3076,6 @@
|
|
|
message: res.data.message
|
|
|
})
|
|
|
}
|
|
|
-
|
|
|
_this.sampleInfoDialog = false
|
|
|
})
|
|
|
.catch(err => {
|
|
|
@@ -3223,14 +3171,12 @@
|
|
|
}
|
|
|
_this.$axios.post('/sampleoperation/applyin', params)
|
|
|
.then(res => {
|
|
|
- // response
|
|
|
if (res.data.code === 0) {
|
|
|
this.$message({
|
|
|
type: 'success',
|
|
|
message: res.data.message
|
|
|
})
|
|
|
_this.handleclk(_this.xbox - 1, _this.ybox - 1, _this.xshelf, _this.yshelf)
|
|
|
- // _this.goAnchor('#equishelfcard')
|
|
|
//清空缓存数据
|
|
|
_this.batchstorages = []
|
|
|
store.set('batchstorages', _this.batchstorages)
|
|
|
@@ -3244,7 +3190,6 @@
|
|
|
message: res.data.message
|
|
|
})
|
|
|
_this.handleclk(_this.xbox - 1, _this.ybox - 1, _this.xshelf, _this.yshelf)
|
|
|
- // _this.goAnchor('#equishelfcard')
|
|
|
//清空缓存数据
|
|
|
_this.batchstorages = []
|
|
|
store.set('batchstorages', _this.batchstorages)
|
|
|
@@ -3256,7 +3201,6 @@
|
|
|
}
|
|
|
})
|
|
|
.catch(err => {
|
|
|
- // handle error
|
|
|
console.error(err)
|
|
|
})
|
|
|
} else {
|
|
|
@@ -3274,7 +3218,8 @@
|
|
|
cancelButtonText: '取消',
|
|
|
type: 'warning'
|
|
|
}).then(() => {
|
|
|
- _this.$axios.delete('sampleinput/' + _this.sampleinfoid + '?sampletype=' + _this.sampleinfotype, null)
|
|
|
+ _this.$axios.delete('sampleinput/' + _this.sampleinfoid + '?sampletype=' + _this.sampleForm.SampleType,
|
|
|
+ null)
|
|
|
.then(res => {
|
|
|
if (res.data.code === 0) {
|
|
|
_this.$message({
|
|
|
@@ -3295,53 +3240,21 @@
|
|
|
}
|
|
|
},
|
|
|
|
|
|
- blursamplecode() {
|
|
|
- let _this = this
|
|
|
- if (_this.sampleForm.SampleCode !== '') {
|
|
|
- _this.$axios.get('/sampleoperation/getsamplebysamplecode?samplecode=' + this.sampleForm.SampleCode, {})
|
|
|
- .then(res => {
|
|
|
- // response
|
|
|
- if (res.data.SampleCode !== '') {
|
|
|
- _this.disabledsamplecode = true
|
|
|
- _this.disabledsampletype = true
|
|
|
- _this.disabledsamplingorgan = true
|
|
|
- _this.disabledsourcebutton = true
|
|
|
- _this.sampleForm.BarCode = ''
|
|
|
- _this.sampleForm.SampleCode = res.data.SampleCode
|
|
|
- _this.sampleForm.SampleTypestr = res.data.SampleType + ''
|
|
|
- // _this.getparentcodebytopcode(res.data.SamplingOrgan)
|
|
|
- // _this.sampleForm.SamplingSite = res.data.SamplingSite
|
|
|
- _this.sampleForm.Name = res.data.Name
|
|
|
- _this.sampleForm.SourceId = res.data.SourceId
|
|
|
- _this.sampleForm.SourceIdCard = res.data.SourceIdCard
|
|
|
- _this.sampleForm.SourceName = res.data.SourceName
|
|
|
- if (res.data.ReceiveDate.substring(0, 3) === '000') {
|
|
|
- _this.sampleForm.ReceiveDate = null
|
|
|
- } else {
|
|
|
- _this.sampleForm.ReceiveDate = new Date(res.data.ReceiveDate)
|
|
|
- }
|
|
|
- _this.geteditsampetypedata(_this.sampleForm.SampleTypestr)
|
|
|
- // 获取特有扩展并给特有扩展信息赋值
|
|
|
- _this.getExtendValue(res.data)
|
|
|
- }
|
|
|
- })
|
|
|
- }
|
|
|
- },
|
|
|
- geteditsampetypedata(v) {
|
|
|
- // 获取样本类型数据
|
|
|
- let _this = this
|
|
|
- _this.$axios.get('/sampletype/sampletypeajax?id=' + v, {})
|
|
|
- .then(res => {
|
|
|
- // response
|
|
|
- _this.sampleForm.Capacitystr = res.data.SampleType.DefaultCapacity + ''
|
|
|
- if (res.data.VHours === '5000-1-1 23:59:59') {
|
|
|
- _this.sampleForm.Isyongjiu = true
|
|
|
- } else {
|
|
|
- _this.sampleForm.ValidityDate = new Date(res.data.VHours)
|
|
|
- _this.sampleForm.Isyongjiu = false
|
|
|
- }
|
|
|
- })
|
|
|
- },
|
|
|
+
|
|
|
+ // geteditsampetypedata(v) {
|
|
|
+ // // 获取样本类型数据
|
|
|
+ // let _this = this
|
|
|
+ // _this.$axios.get('/sampletype/sampletypeajax?id=' + v, {})
|
|
|
+ // .then(res => {
|
|
|
+ // _this.sampleForm.Capacity = res.data.SampleType.DefaultCapacity + ''
|
|
|
+ // if (res.data.VHours === '5000-1-1 23:59:59') {
|
|
|
+ // _this.sampleForm.Isyongjiu = true
|
|
|
+ // } else {
|
|
|
+ // _this.sampleForm.ValidityDate = new Date(res.data.VHours)
|
|
|
+ // _this.sampleForm.Isyongjiu = false
|
|
|
+ // }
|
|
|
+ // })
|
|
|
+ // },
|
|
|
saveandadd(value) {
|
|
|
this.addSampleInfo(value)
|
|
|
// 控制坐标
|
|
|
@@ -3364,13 +3277,13 @@
|
|
|
this.disabledbarcode = false
|
|
|
this.disabledsamplecode = false
|
|
|
this.disabledsampletype = false
|
|
|
- this.disabledsamplingorgan = false
|
|
|
+ // this.disabledsamplingorgan = false
|
|
|
this.disabledvaliditydate = false
|
|
|
this.disabledsourcebutton = false
|
|
|
this.disabledcheckprint = false
|
|
|
this.diaabledreceiveDate = false
|
|
|
this.diaabledyongjiu = false
|
|
|
- this.disabledsamplingsite = false
|
|
|
+ // this.disabledsamplingsite = false
|
|
|
this.disabledcapacity = false
|
|
|
this.disabledunit = false
|
|
|
this.disabledbtnpreopera = false
|
|
|
@@ -3383,7 +3296,7 @@
|
|
|
this.sampleForm.SourceName = ''
|
|
|
this.sampleForm.InnerCode = ''
|
|
|
this.sampleForm.SampleCode = ''
|
|
|
- this.sampleForm.Capacitystr = ''
|
|
|
+ this.sampleForm.Capacity = ''
|
|
|
this.sampleForm.Unit = ''
|
|
|
this.sampleForm.CreateBy = ''
|
|
|
this.sampleForm.ReceiveDate = new Date()
|
|
|
@@ -3392,7 +3305,7 @@
|
|
|
this.ValidityDate = ''
|
|
|
this.sampleForm.Isyongjiu = false
|
|
|
this.GroupIdOption = []
|
|
|
- this.sampleForm.SampleTypestr = ''
|
|
|
+ this.sampleForm.SampleType = ''
|
|
|
this.sampleForm.Remark = ''
|
|
|
this.sampleForm.type_flag = 'add'
|
|
|
this.sampleinfoid = 0
|
|
|
@@ -3601,24 +3514,7 @@
|
|
|
this.$router.go(-1)
|
|
|
}
|
|
|
},
|
|
|
- getuserlist() {
|
|
|
- this.$axios.get('users/list', {})
|
|
|
- .then(res => {
|
|
|
- // response
|
|
|
- if (res.data.items) {
|
|
|
- this.userlist = res.data.items
|
|
|
- }
|
|
|
- this.userlist.unshift({
|
|
|
- 'Id': this.authUser.Profile.Id,
|
|
|
- 'Realname': this.authUser.Profile.Realname
|
|
|
- })
|
|
|
- this.sampleForm.CreateUserId = this.authUser.Profile.Id
|
|
|
- })
|
|
|
- .catch(err => {
|
|
|
- // handle error
|
|
|
- console.error(err)
|
|
|
- })
|
|
|
- },
|
|
|
+
|
|
|
|
|
|
//获取当前上传图片字段
|
|
|
getitem(val) {
|