|
|
@@ -108,7 +108,7 @@
|
|
|
width: (unitwidth/colorTableWidth-2.5) + 'px',
|
|
|
height: (unitheight/colorTableHeight/samplelist[index].RowNum-2.5) + 'px',
|
|
|
backgroundColor: ybox == rowindex && xshelf == k1+1 && yshelf == k2+1 ? COLORARR[7] : COLORARR[0]}"
|
|
|
- style="margin: 1px" @click="getEquipPosition(rowindex-1, k1+1, k2+1)">
|
|
|
+ style="margin: 1px" @click="getEquipPosition(rowindex-1, k1+1, k2+1)">
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
@@ -123,7 +123,8 @@
|
|
|
</div>
|
|
|
</el-col>
|
|
|
<el-col :span="4" style="margin-top: 20px">
|
|
|
- <div class="ulbgcolor" v-for="g in shelfs.ColumnNum" :key="g" style="width:150px;float:left;margin-left:1px">
|
|
|
+ <div class="ulbgcolor" v-for="g in shelfs.ColumnNum" :key="g"
|
|
|
+ style="width:150px;float:left;margin-left:1px">
|
|
|
<div class="hoverdiv" v-bind:style="{
|
|
|
backgroundColor: xbox == g && ybox == ybox &&
|
|
|
xshelf == shelfs.YStation && yshelf == shelfs.XStation ? COLORARR[2] :
|
|
|
@@ -199,7 +200,7 @@
|
|
|
<div slot="header">
|
|
|
<i class="icon icon-file-text"> </i> 样本管理
|
|
|
<span style="float: right;">
|
|
|
- <el-button @click="sampleInfoDialog = true" type="primary" class="el-button--mini"
|
|
|
+ <el-button @click="showDialog" type="primary" class="el-button--mini"
|
|
|
v-if="sampleForm.type_flag === 'edit'">编辑</el-button>
|
|
|
<el-button @click="dialogfusuVisible=true" type="primary" class="el-button--mini"
|
|
|
v-if="sampleForm.type_flag === 'edit'">复苏</el-button>
|
|
|
@@ -808,7 +809,8 @@
|
|
|
boxSample: [],
|
|
|
equipid: 0, // 新增,设备id
|
|
|
COLORARR: ['#EAEAEA', '#13CE66', '#FF4949', '#D1EEEE', '#20A0FF', '#836FFF', '#000080',
|
|
|
- '#FF7777'], //灰、绿、粉、25%、蓝、紫、深蓝
|
|
|
+ '#FF7777'
|
|
|
+ ], //灰、绿、粉、25%、蓝、紫、深蓝
|
|
|
selectedorgan: [], // 级联所选组织结构
|
|
|
sampleorganprops: {
|
|
|
value: 'code',
|
|
|
@@ -2592,7 +2594,7 @@
|
|
|
|
|
|
handleclk(xbox, ybox, xshelf, yshelf) {
|
|
|
// 清空状态
|
|
|
- //this.clearSampleForm()
|
|
|
+ this.clearSampleForm()
|
|
|
let _this = this
|
|
|
var inputstr = _this.equipid + ',' + yshelf + ',' + xshelf + ',' + (xbox + 1) + ',' + (ybox + 1)
|
|
|
_this.$axios.get('/shelfset/boxdraw/' + inputstr, {})
|
|
|
@@ -2628,17 +2630,6 @@
|
|
|
//清空状态
|
|
|
this.clearSampleForm()
|
|
|
if (v != null) {
|
|
|
- if (v.IState == 1) {
|
|
|
- for (var i = 0; i < this.sampleTypeList.length; i++) {
|
|
|
- if (v.SampleType == this.sampleTypeList[i].value) {
|
|
|
- this.imgSrc = this.filehost + this.sampleTypeList[i].photo
|
|
|
- }
|
|
|
- }
|
|
|
- } else if (v.IState == 5) {
|
|
|
- this.imgSrc = this.filehost + '/static/img/sampletypeimg/zhanwei.png'
|
|
|
- } else if (v.IState == 10) {
|
|
|
- this.imgSrc = '/img/lock.png'
|
|
|
- }
|
|
|
let _this = this
|
|
|
_this.sampleForm.type_flag = 'edit'
|
|
|
_this.disabledsamplecode = true
|
|
|
@@ -2703,6 +2694,7 @@
|
|
|
|
|
|
getSampleInfoById(id) {
|
|
|
let _this = this
|
|
|
+ _this.extendList = []
|
|
|
_this.sampleinfoid = id
|
|
|
_this.$axios.get('/sampleoperation/getsamplebyid?SamplesInfoId=' + id, {})
|
|
|
.then(res => {
|
|
|
@@ -2741,10 +2733,21 @@
|
|
|
_this.sampleForm.SourceName = res.data.SourceName
|
|
|
_this.sampleForm.CreateUserId = res.data.CreateUserId
|
|
|
_this.sampleForm.CreateBy = res.data.CreateBy
|
|
|
+ if (res.data.IState == 1) {
|
|
|
+ for (var i = 0; i < this.sampleTypeList.length; i++) {
|
|
|
+ if (res.data.SampleType == this.sampleTypeList[i].value) {
|
|
|
+ this.imgSrc = this.filehost + this.sampleTypeList[i].photo
|
|
|
+ }
|
|
|
+ }
|
|
|
+ } else if (res.data.IState == 5) {
|
|
|
+ this.imgSrc = this.filehost + '/static/img/sampletypeimg/zhanwei.png'
|
|
|
+ } else if (res.data.IState == 10) {
|
|
|
+ this.imgSrc = '/img/lock.png'
|
|
|
+ }
|
|
|
//获取所属分组
|
|
|
_this.getGroup(res.data.BarCode)
|
|
|
// 获取特有扩展并给特有扩展信息赋值
|
|
|
- _this.getExtendValue(res.data.SampleType)
|
|
|
+ _this.getExtendValue(res.data)
|
|
|
//获取附件信息
|
|
|
_this.getattachment(res.data.BarCode, res.data.SampleCode)
|
|
|
})
|
|
|
@@ -2769,9 +2772,8 @@
|
|
|
getExtendValue(val) {
|
|
|
let _this = this
|
|
|
_this.groupnameList = []
|
|
|
- _this.extendList = []
|
|
|
- if (val && val > 0) {
|
|
|
- _this.$axios.get('/sampletype/gettykzzdgroup?SampleType=' + val, {})
|
|
|
+ if (val && val.SampleType > 0) {
|
|
|
+ _this.$axios.get('/sampletype/gettykzzdgroup?SampleType=' + val.SampleType, {})
|
|
|
.then(res => {
|
|
|
for (var i = 0; i < res.data.length; i++) {
|
|
|
if (res.data[i].GroupName != '') {
|
|
|
@@ -2779,11 +2781,11 @@
|
|
|
}
|
|
|
}
|
|
|
_this.Tabs = _this.groupnameList[0]
|
|
|
- _this.$axios.get('/sampletype/gettykzzd?SampleType=' + val, {})
|
|
|
+ _this.$axios.get('/sampletype/gettykzzd?SampleType=' + val.SampleType, {})
|
|
|
.then(res => {
|
|
|
_this.extendList = res.data
|
|
|
for (let i = 0; i < this.extendList.length; i++) {
|
|
|
- this.extendList[i].FieldDefault = val[this.extendList[i].FieldName]
|
|
|
+ this.extendList[i].FieldDefault = val[this.extendList[i].FieldName]
|
|
|
}
|
|
|
})
|
|
|
})
|
|
|
@@ -2898,7 +2900,7 @@
|
|
|
}
|
|
|
_this.getSampleTypedata(_this.sampleForm.SampleType)
|
|
|
// 获取特有扩展并给特有扩展信息赋值
|
|
|
- _this.getExtendValue(res.data.SampleType)
|
|
|
+ _this.getExtendValue(res.data)
|
|
|
}
|
|
|
})
|
|
|
}
|
|
|
@@ -2929,6 +2931,10 @@
|
|
|
this.sampleForm.SourceName = val.Name
|
|
|
},
|
|
|
|
|
|
+ showDialog(){
|
|
|
+ this.sampleTitle = '编辑样本'
|
|
|
+ this.sampleInfoDialog = true
|
|
|
+ },
|
|
|
savedata() {
|
|
|
if (this.sampleTitle == '新增样本') {
|
|
|
this.addSampleInfo()
|
|
|
@@ -2967,7 +2973,7 @@
|
|
|
let jsonstr = _this.getExtendata()
|
|
|
// 转换为json对象
|
|
|
let jsonobj = JSON.parse(jsonstr)
|
|
|
- // 拼接两个对象
|
|
|
+ // 拼接两个对象
|
|
|
let params = _this.sampleForm
|
|
|
params = Object.assign(params, jsonobj)
|
|
|
// 位置冰箱等信息
|
|
|
@@ -3013,7 +3019,6 @@
|
|
|
}
|
|
|
_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,
|
|
|
@@ -3024,7 +3029,7 @@
|
|
|
type: 'success',
|
|
|
message: res.data.message
|
|
|
})
|
|
|
- _this.getSampleInfoById(res.data.code.item.Id)
|
|
|
+ _this.handleclk(_this.xbox, _this.ybox, _this.xshelf, _this.yshelf)
|
|
|
// _this.handleclk(_this.xbox - 1, _this.ybox - 1, _this.xshelf, _this.yshelf)
|
|
|
// 清空上传附件
|
|
|
_this.$refs.refuploadattach.clearFiles()
|
|
|
@@ -3033,41 +3038,43 @@
|
|
|
//清空缓存数据
|
|
|
_this.batchstorages = []
|
|
|
store.set('batchstorages', _this.batchstorages)
|
|
|
- } else if (res.data.code === 10 || res.data.code === 11) { // 保存成功后打印
|
|
|
- this.$message({
|
|
|
- type: 'success',
|
|
|
- message: res.data.message
|
|
|
- })
|
|
|
- _this.handleclk(_this.xbox - 1, _this.ybox - 1, _this.xshelf, _this.yshelf)
|
|
|
- // 自动打印
|
|
|
- if (res.data.item.Printmsg !== '') {
|
|
|
- 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]}`)
|
|
|
- }
|
|
|
- }
|
|
|
- // 清空上传附件
|
|
|
- _this.$refs.refuploadattach.clearFiles()
|
|
|
- // 获取附件信息
|
|
|
- _this.getattachment(_this.sampleForm.BarCode, _this.sampleForm.SampleCode)
|
|
|
- //清空缓存数据
|
|
|
- _this.batchstorages = []
|
|
|
- store.set('batchstorages', _this.batchstorages)
|
|
|
- } else if (res.data.code === 20) {
|
|
|
- this.$message({
|
|
|
- type: 'error',
|
|
|
- message: res.data.message
|
|
|
- })
|
|
|
- _this.handleclk(_this.xbox - 1, _this.ybox - 1, _this.xshelf, _this.yshelf)
|
|
|
- // 清空上传附件
|
|
|
- _this.$refs.refuploadattach.clearFiles()
|
|
|
- // 获取附件信息
|
|
|
- _this.getattachment(_this.sampleForm.BarCode, _this.sampleForm.SampleCode)
|
|
|
- //清空缓存数据
|
|
|
- _this.batchstorages = []
|
|
|
- store.set('batchstorages', _this.batchstorages)
|
|
|
- } else {
|
|
|
+ }
|
|
|
+ // else if (res.data.code === 10 || res.data.code === 11) { // 保存成功后打印
|
|
|
+ // this.$message({
|
|
|
+ // type: 'success',
|
|
|
+ // message: res.data.message
|
|
|
+ // })
|
|
|
+ // _this.handleclk(_this.xbox - 1, _this.ybox - 1, _this.xshelf, _this.yshelf)
|
|
|
+ // // 自动打印
|
|
|
+ // if (res.data.item.Printmsg !== '') {
|
|
|
+ // 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]}`)
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ // // 清空上传附件
|
|
|
+ // _this.$refs.refuploadattach.clearFiles()
|
|
|
+ // // 获取附件信息
|
|
|
+ // _this.getattachment(_this.sampleForm.BarCode, _this.sampleForm.SampleCode)
|
|
|
+ // //清空缓存数据
|
|
|
+ // _this.batchstorages = []
|
|
|
+ // store.set('batchstorages', _this.batchstorages)
|
|
|
+ // } else if (res.data.code === 20) {
|
|
|
+ // this.$message({
|
|
|
+ // type: 'error',
|
|
|
+ // message: res.data.message
|
|
|
+ // })
|
|
|
+ // _this.handleclk(_this.xbox - 1, _this.ybox - 1, _this.xshelf, _this.yshelf)
|
|
|
+ // // 清空上传附件
|
|
|
+ // _this.$refs.refuploadattach.clearFiles()
|
|
|
+ // // 获取附件信息
|
|
|
+ // _this.getattachment(_this.sampleForm.BarCode, _this.sampleForm.SampleCode)
|
|
|
+ // //清空缓存数据
|
|
|
+ // _this.batchstorages = []
|
|
|
+ // store.set('batchstorages', _this.batchstorages)
|
|
|
+ // }
|
|
|
+ else {
|
|
|
this.$message({
|
|
|
type: 'warning',
|
|
|
message: res.data.message
|
|
|
@@ -3118,7 +3125,6 @@
|
|
|
params = Object.assign(params, jsonobj)
|
|
|
_this.$axios.put('/sampleoperation/editsampe?BarCode=' + this.sampleForm.BarCode, params)
|
|
|
.then(res => {
|
|
|
- // response
|
|
|
if (res.data.code === 0) {
|
|
|
this.$message({
|
|
|
type: 'success',
|
|
|
@@ -3134,6 +3140,7 @@
|
|
|
message: res.data.message
|
|
|
})
|
|
|
}
|
|
|
+ _this.sampleInfoDialog = false
|
|
|
})
|
|
|
.catch(err => {
|
|
|
console.error(err)
|