|
|
@@ -1,6 +1,6 @@
|
|
|
<template>
|
|
|
<div>
|
|
|
- <el-card class="box-card" style="height: calc(100vh - 92px);">
|
|
|
+ <el-card class="box-card" >
|
|
|
<div slot="header" style="height: 20px;">
|
|
|
<span style="float: left;">
|
|
|
<i class="icon icon-table2"></i>
|
|
|
@@ -348,14 +348,14 @@
|
|
|
computed: {
|
|
|
...mapGetters({
|
|
|
authUser: 'authUser'
|
|
|
- }),
|
|
|
+ })
|
|
|
},
|
|
|
components: {
|
|
|
draggable,
|
|
|
batchrecoverydialog,
|
|
|
uploadattachdialog
|
|
|
},
|
|
|
- data() {
|
|
|
+ data () {
|
|
|
return {
|
|
|
dialogVisible: false,
|
|
|
sampleinfodetail: {
|
|
|
@@ -392,7 +392,7 @@
|
|
|
publicsampletypes: [], // 公共拓展
|
|
|
publicdatas: [], // 样本取用记录
|
|
|
relationSamples: [], // 相关样本
|
|
|
- GroupName: '', //所属分组
|
|
|
+ GroupName: '', // 所属分组
|
|
|
path: '', // 上传文件路径
|
|
|
userextends: [], // 扩展字段
|
|
|
specialelist: [], // 特殊扩展字段
|
|
|
@@ -416,7 +416,7 @@
|
|
|
selectedzuzhi2: [],
|
|
|
peintitemid: 0,
|
|
|
shenhe: {
|
|
|
- applyfusu_flag: true,
|
|
|
+ applyfusu_flag: true
|
|
|
},
|
|
|
multipleSelection: [],
|
|
|
typetykzlist: [], // 特有扩展
|
|
|
@@ -429,9 +429,9 @@
|
|
|
searchDialogVisible: false, // 自定义搜索弹框
|
|
|
|
|
|
searchTableData: [],
|
|
|
- searchTemplateName: "自定义搜索1",
|
|
|
- currentSearchTemplateName: "",
|
|
|
- searchField: "BarCode",
|
|
|
+ searchTemplateName: '自定义搜索1',
|
|
|
+ currentSearchTemplateName: '',
|
|
|
+ searchField: 'BarCode',
|
|
|
searchValue: {
|
|
|
BarCode: '',
|
|
|
SampleCode: '',
|
|
|
@@ -447,80 +447,80 @@
|
|
|
Capacity: '',
|
|
|
Location: '',
|
|
|
Extension: '',
|
|
|
- GroupName: '', //所属分组
|
|
|
+ GroupName: '' // 所属分组
|
|
|
},
|
|
|
- orAnd: "and",
|
|
|
+ orAnd: 'and',
|
|
|
searchTemplates: [],
|
|
|
orAndData: [{
|
|
|
- name: "并且",
|
|
|
- value: "and",
|
|
|
- },
|
|
|
- {
|
|
|
- name: "或者",
|
|
|
- value: "or",
|
|
|
- }
|
|
|
+ name: '并且',
|
|
|
+ value: 'and'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: '或者',
|
|
|
+ value: 'or'
|
|
|
+ }
|
|
|
],
|
|
|
searchcolumn: [], // 搜索列
|
|
|
currentSearchTemplate: '',
|
|
|
- acc: '',
|
|
|
+ acc: ''
|
|
|
}
|
|
|
},
|
|
|
- created() {
|
|
|
+ created () {
|
|
|
this.acc = this.authUser.Profile.AccCode
|
|
|
if (this.$route.query.size && this.$route.query.currentPage) {
|
|
|
this.size = parseInt(this.$route.query.size)
|
|
|
this.currentPage = parseInt(this.$route.query.currentPage)
|
|
|
let searchmodel = store.get('samplestoredseach')
|
|
|
- if (typeof (searchmodel) != 'undefined') {
|
|
|
- if (searchmodel.BarCode && searchmodel.BarCode !== '') { //样本条码
|
|
|
+ if (typeof (searchmodel) !== 'undefined') {
|
|
|
+ if (searchmodel.BarCode && searchmodel.BarCode !== '') { // 样本条码
|
|
|
this.BarCode = searchmodel.BarCode
|
|
|
}
|
|
|
- if (searchmodel.SampleCode && searchmodel.SampleCode !== '') { //样本编码
|
|
|
+ if (searchmodel.SampleCode && searchmodel.SampleCode !== '') { // 样本编码
|
|
|
this.SampleCode = searchmodel.SampleCode
|
|
|
}
|
|
|
- if (searchmodel.SourceName && searchmodel.SourceName !== '') { //样本来源
|
|
|
+ if (searchmodel.SourceName && searchmodel.SourceName !== '') { // 样本来源
|
|
|
this.SourceName = searchmodel.SourceName
|
|
|
}
|
|
|
- if (searchmodel.InnerCode && searchmodel.InnerCode !== '') { //样本内码
|
|
|
+ if (searchmodel.InnerCode && searchmodel.InnerCode !== '') { // 样本内码
|
|
|
this.InnerCode = searchmodel.InnerCode
|
|
|
}
|
|
|
- if (searchmodel.Name && searchmodel.Name !== '') { //名称
|
|
|
+ if (searchmodel.Name && searchmodel.Name !== '') { // 名称
|
|
|
this.Name = searchmodel.Name
|
|
|
}
|
|
|
- if (searchmodel.CreateBy && searchmodel.CreateBy !== '') { //录入人
|
|
|
+ if (searchmodel.CreateBy && searchmodel.CreateBy !== '') { // 录入人
|
|
|
this.CreateBy = searchmodel.CreateBy
|
|
|
}
|
|
|
- if (searchmodel.CreateOn && searchmodel.CreateOn.length === 2) { //录入日期
|
|
|
+ if (searchmodel.CreateOn && searchmodel.CreateOn.length === 2) { // 录入日期
|
|
|
this.CreateOn = [new Date(searchmodel.CreateOn[0]), new Date(searchmodel.CreateOn[1])]
|
|
|
}
|
|
|
- if (searchmodel.SamplingOrgan && searchmodel.SamplingOrgan !== '') { //组织器官
|
|
|
+ if (searchmodel.SamplingOrgan && searchmodel.SamplingOrgan !== '') { // 组织器官
|
|
|
this.selectsigorg = searchmodel.SamplingOrgan
|
|
|
this.getparentcodebytopcode(searchmodel.SamplingOrgan)
|
|
|
// this.selectedzuzhi=searchmodel.SamplingOrgan
|
|
|
}
|
|
|
- if (searchmodel.SamplingSite && searchmodel.SamplingSite !== '') { //取材部位
|
|
|
+ if (searchmodel.SamplingSite && searchmodel.SamplingSite !== '') { // 取材部位
|
|
|
this.SamplingSite = searchmodel.SamplingSite
|
|
|
}
|
|
|
- if (searchmodel.SampleType && searchmodel.SampleType !== '') { //样本类型
|
|
|
+ if (searchmodel.SampleType && searchmodel.SampleType !== '') { // 样本类型
|
|
|
this.SampleType = searchmodel.SampleType
|
|
|
this.searchsampletypeChange()
|
|
|
}
|
|
|
- if (searchmodel.STNoteField && searchmodel.STNoteField.length > 0) { //特有扩展
|
|
|
+ if (searchmodel.STNoteField && searchmodel.STNoteField.length > 0) { // 特有扩展
|
|
|
this.STNoteField = searchmodel.STNoteField
|
|
|
}
|
|
|
- if (searchmodel.Stnotevalue && searchmodel.Stnotevalue !== '') { //特有检索内容
|
|
|
+ if (searchmodel.Stnotevalue && searchmodel.Stnotevalue !== '') { // 特有检索内容
|
|
|
this.Stnotevalue = searchmodel.Stnotevalue
|
|
|
}
|
|
|
- if (searchmodel.Validity && searchmodel.Validity.length === 2) { //有效日期
|
|
|
+ if (searchmodel.Validity && searchmodel.Validity.length === 2) { // 有效日期
|
|
|
this.Validity = [new Date(searchmodel.Validity[0]), new Date(searchmodel.Validity[1])]
|
|
|
}
|
|
|
- if (searchmodel.Noteitem && searchmodel.Noteitem.length > 0) { //公有扩展
|
|
|
+ if (searchmodel.Noteitem && searchmodel.Noteitem.length > 0) { // 公有扩展
|
|
|
this.Noteitem = searchmodel.Noteitem
|
|
|
}
|
|
|
- if (searchmodel.Noteitemvalue && searchmodel.Noteitemvalue !== '') { //公共检索内容
|
|
|
+ if (searchmodel.Noteitemvalue && searchmodel.Noteitemvalue !== '') { // 公共检索内容
|
|
|
this.Noteitemvalue = searchmodel.Noteitemvalue
|
|
|
}
|
|
|
- if (searchmodel.GroupName && searchmodel.GroupName !== '') { //所属分组
|
|
|
+ if (searchmodel.GroupName && searchmodel.GroupName !== '') { // 所属分组
|
|
|
this.GroupName = searchmodel.GroupName
|
|
|
}
|
|
|
}
|
|
|
@@ -561,7 +561,7 @@
|
|
|
name: '可用容量',
|
|
|
show: true,
|
|
|
kuoz: false
|
|
|
- },
|
|
|
+ },
|
|
|
// {
|
|
|
// filed: 'SamplingOrganName',
|
|
|
// name: '组织器官',
|
|
|
@@ -573,7 +573,7 @@
|
|
|
// show: true,
|
|
|
// kuoz: false
|
|
|
// },
|
|
|
- {
|
|
|
+ {
|
|
|
filed: 'InnerCode',
|
|
|
name: '样本内码',
|
|
|
show: true,
|
|
|
@@ -612,7 +612,7 @@
|
|
|
this.getAllSearchTab()
|
|
|
},
|
|
|
|
|
|
- mounted() {
|
|
|
+ mounted () {
|
|
|
let _this = this
|
|
|
window.clickmodeltypetag = function (val, e) {
|
|
|
_this.clickmodeltypetag(val)
|
|
|
@@ -620,7 +620,7 @@
|
|
|
},
|
|
|
|
|
|
methods: {
|
|
|
- initData() {
|
|
|
+ initData () {
|
|
|
this.currentSearchTemplate = ''
|
|
|
let _this = this
|
|
|
// 增加自定义显示列,存储位置,之后需要去掉
|
|
|
@@ -675,10 +675,10 @@
|
|
|
params = Object.assign(params, params3)
|
|
|
}
|
|
|
store.set('samplestoredseach', params)
|
|
|
-
|
|
|
+
|
|
|
this.$axios.get('/sampleinput/list', {
|
|
|
- params
|
|
|
- })
|
|
|
+ params
|
|
|
+ })
|
|
|
.then(res => {
|
|
|
_this.list = res.data.items
|
|
|
_this.currentItemCount = res.data.currentItemCount
|
|
|
@@ -687,8 +687,8 @@
|
|
|
console.error(err)
|
|
|
})
|
|
|
},
|
|
|
- //根据子code获取所有父code
|
|
|
- getparentcodebytopcode(v) {
|
|
|
+ // 根据子code获取所有父code
|
|
|
+ getparentcodebytopcode (v) {
|
|
|
let _this = this
|
|
|
_this.$axios.get('/sampleorgan/getparentcodebytopcode/' + v, {})
|
|
|
.then(res => {
|
|
|
@@ -702,33 +702,33 @@
|
|
|
_this.searchzuzhitreehandleChange()
|
|
|
})
|
|
|
},
|
|
|
- uploadfile(val) {
|
|
|
+ uploadfile (val) {
|
|
|
this.sampleinfodetail.BarCode = val.BarCode
|
|
|
this.sampleinfodetail.SampleCode = val.SampleCode
|
|
|
this.dialoguploadVisible = true
|
|
|
},
|
|
|
- uploaddialogcallback() {
|
|
|
+ uploaddialogcallback () {
|
|
|
this.initData()
|
|
|
},
|
|
|
- loadprintdata() {
|
|
|
+ loadprintdata () {
|
|
|
this.$axios.get('/sampleinput/getprintschemelist', {
|
|
|
- _currentPage: -1
|
|
|
- })
|
|
|
+ _currentPage: -1
|
|
|
+ })
|
|
|
.then(res => {
|
|
|
this.printschemelist = res.data.items
|
|
|
}).catch(() => {})
|
|
|
},
|
|
|
- getextends() {
|
|
|
+ getextends () {
|
|
|
let _this = this
|
|
|
this.$axios.get('/sampleinput/getsampletype', {
|
|
|
- _currentPage: -1
|
|
|
- })
|
|
|
+ _currentPage: -1
|
|
|
+ })
|
|
|
.then(res => {
|
|
|
_this.sampletypes = res.data.items
|
|
|
}).catch(() => {})
|
|
|
this.$axios.get('/sampleinput/getpublicsampletype', {
|
|
|
- _currentPage: -1
|
|
|
- })
|
|
|
+ _currentPage: -1
|
|
|
+ })
|
|
|
.then(res => {
|
|
|
_this.publicsampletypes = res.data.items
|
|
|
// 扩展列增加到显示列中
|
|
|
@@ -786,31 +786,31 @@
|
|
|
}
|
|
|
}
|
|
|
if (store.get('samplestoredseach').searchWithTemplate && store.get('samplestoredseach').searchWithTemplate !==
|
|
|
- '') { //自定义查询
|
|
|
+ '') { // 自定义查询
|
|
|
this.handleSearchCommand(store.get('samplestoredseach').searchWithTemplate)
|
|
|
} else {
|
|
|
this.initData()
|
|
|
}
|
|
|
}).catch(() => {})
|
|
|
this.$axios.get('/sampleinput/getoperations', {
|
|
|
- _currentPage: -1
|
|
|
- })
|
|
|
+ _currentPage: -1
|
|
|
+ })
|
|
|
.then(res => {
|
|
|
_this.zuzhitreelist = window.toolfun_gettreejson(res.data.items, 'id', 'pId', 'id,name,code')
|
|
|
}).catch(() => {})
|
|
|
},
|
|
|
- seachdata() {
|
|
|
+ seachdata () {
|
|
|
if (this.selectedzuzhi.length > 0) {
|
|
|
this.selectsigorg = this.selectedzuzhi[this.selectedzuzhi.length - 1]
|
|
|
}
|
|
|
this.currentPage = 1
|
|
|
this.initData()
|
|
|
},
|
|
|
- openPrintDialog(val) {
|
|
|
+ openPrintDialog (val) {
|
|
|
this.peintitemid = val.Id
|
|
|
this.dialogPrintVisible = true
|
|
|
},
|
|
|
- selsampletypeChange() {
|
|
|
+ selsampletypeChange () {
|
|
|
// 获取特有扩展
|
|
|
let _this = this
|
|
|
if (_this.SampleType !== '') {
|
|
|
@@ -822,8 +822,8 @@
|
|
|
})
|
|
|
}
|
|
|
},
|
|
|
- //返回查询条件执行
|
|
|
- searchsampletypeChange() {
|
|
|
+ // 返回查询条件执行
|
|
|
+ searchsampletypeChange () {
|
|
|
// 获取特有扩展
|
|
|
let _this = this
|
|
|
if (_this.SampleType !== '') {
|
|
|
@@ -835,7 +835,7 @@
|
|
|
}
|
|
|
},
|
|
|
// 自定义显示列保存操作
|
|
|
- saveshowfiled() {
|
|
|
+ saveshowfiled () {
|
|
|
store.set('sapminputshowcolumn', this.showcolumn)
|
|
|
this.columndialogVisible = false
|
|
|
this.$message({
|
|
|
@@ -844,12 +844,12 @@
|
|
|
})
|
|
|
this.initData()
|
|
|
},
|
|
|
- handleCheckAllChange(val) {
|
|
|
+ handleCheckAllChange (val) {
|
|
|
for (var i = 0; i < this.showcolumn.length; i++) {
|
|
|
this.showcolumn[i].show = val
|
|
|
}
|
|
|
},
|
|
|
- checkedshowall() {
|
|
|
+ checkedshowall () {
|
|
|
let tc = 0
|
|
|
for (var i = 0; i < this.showcolumn.length; i++) {
|
|
|
if (this.showcolumn[i].show) {
|
|
|
@@ -868,7 +868,7 @@
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
- handleSizeChange(value) {
|
|
|
+ handleSizeChange (value) {
|
|
|
this.size = value
|
|
|
this.currentPage = 1
|
|
|
if (this.currentSearchTemplate) {
|
|
|
@@ -876,9 +876,8 @@
|
|
|
} else {
|
|
|
this.initData()
|
|
|
}
|
|
|
-
|
|
|
},
|
|
|
- handleCurrentChange(value) {
|
|
|
+ handleCurrentChange (value) {
|
|
|
this.currentPage = value
|
|
|
if (this.currentSearchTemplate) {
|
|
|
this.searchWithTemplate(this.currentSearchTemplate)
|
|
|
@@ -887,7 +886,7 @@
|
|
|
}
|
|
|
},
|
|
|
|
|
|
- jstimehandle(val) {
|
|
|
+ jstimehandle (val) {
|
|
|
if (val === '') {
|
|
|
return '----'
|
|
|
} else if (val === '0001-01-01T08:00:00+08:00') {
|
|
|
@@ -899,11 +898,11 @@
|
|
|
return val.substring(0, 19)
|
|
|
}
|
|
|
},
|
|
|
- jssubstrhandle(val, no) {
|
|
|
+ jssubstrhandle (val, no) {
|
|
|
let position = val.split(';')
|
|
|
return position[no]
|
|
|
},
|
|
|
- deletedata(val) {
|
|
|
+ deletedata (val) {
|
|
|
let _this = this
|
|
|
_this.$confirm('此操作将永久删除该数据, 是否继续?', '提示', {
|
|
|
confirmButtonText: '确定',
|
|
|
@@ -930,10 +929,10 @@
|
|
|
.catch(() => {})
|
|
|
}).catch(() => {})
|
|
|
},
|
|
|
- handleSelectionChange(val) {
|
|
|
+ handleSelectionChange (val) {
|
|
|
this.multipleSelection = val
|
|
|
},
|
|
|
- header_dragend(newWidth, oldWidth, column, event) {
|
|
|
+ header_dragend (newWidth, oldWidth, column, event) {
|
|
|
for (var i = 0; i < this.showcolumn.length; i++) {
|
|
|
if (this.showcolumn[i].name === column.label) {
|
|
|
this.showcolumn[i].columnwidth = newWidth
|
|
|
@@ -942,7 +941,7 @@
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
- zuzhitreehandleChange(value) {
|
|
|
+ zuzhitreehandleChange (value) {
|
|
|
if (this.selectedzuzhi.length > 0) {
|
|
|
this.selectsigorg = this.selectedzuzhi[this.selectedzuzhi.length - 1] + ''
|
|
|
this.$axios.get('/samplesite/getsitebyfcode?code=' + this.selectsigorg, {})
|
|
|
@@ -952,7 +951,7 @@
|
|
|
}).catch(() => {})
|
|
|
}
|
|
|
},
|
|
|
- searchzuzhitreehandleChange(value) {
|
|
|
+ searchzuzhitreehandleChange (value) {
|
|
|
if (this.selectedzuzhi.length > 0) {
|
|
|
this.selectsigorg = this.selectedzuzhi[this.selectedzuzhi.length - 1] + ''
|
|
|
this.$axios.get('/samplesite/getsitebyfcode?code=' + this.selectsigorg, {})
|
|
|
@@ -961,7 +960,7 @@
|
|
|
}).catch(() => {})
|
|
|
}
|
|
|
},
|
|
|
- zuzhitreehandleChange2(value) {
|
|
|
+ zuzhitreehandleChange2 (value) {
|
|
|
if (this.selectedzuzhi2.length > 0) {
|
|
|
let selectsigorg = this.selectedzuzhi2[this.selectedzuzhi2.length - 1] + ''
|
|
|
this.$axios.get('/samplesite/getsitebyfcode?code=' + selectsigorg, {})
|
|
|
@@ -971,7 +970,7 @@
|
|
|
}).catch(() => {})
|
|
|
}
|
|
|
},
|
|
|
- chooseType(command) {
|
|
|
+ chooseType (command) {
|
|
|
let _this = this
|
|
|
if (_this.multipleSelection.length < 1) {
|
|
|
_this.$message({
|
|
|
@@ -980,7 +979,7 @@
|
|
|
})
|
|
|
return
|
|
|
}
|
|
|
- if (command == 'Apply') { //生成出库申请单:复苏
|
|
|
+ if (command == 'Apply') { // 生成出库申请单:复苏
|
|
|
_this.shenhe.applyfusu_flag = false
|
|
|
}
|
|
|
_this.shenhe = Object.assign(_this.shenhe, {
|
|
|
@@ -988,10 +987,10 @@
|
|
|
})
|
|
|
_this.dialogfusuVisible = true
|
|
|
},
|
|
|
- //导出样本
|
|
|
- handleExportsamplesCommand(command) {
|
|
|
+ // 导出样本
|
|
|
+ handleExportsamplesCommand (command) {
|
|
|
let _this = this
|
|
|
- if (command == 'exportchosen') { //导出所选数据
|
|
|
+ if (command == 'exportchosen') { // 导出所选数据
|
|
|
if (_this.multipleSelection.length < 1) {
|
|
|
_this.$message({
|
|
|
type: 'warning',
|
|
|
@@ -1000,7 +999,7 @@
|
|
|
return
|
|
|
}
|
|
|
_this.exportsamples('exportchosen')
|
|
|
- } else if (command == 'exportpage') { //导出当前页数据
|
|
|
+ } else if (command == 'exportpage') { // 导出当前页数据
|
|
|
if (_this.list.length < 1) {
|
|
|
_this.$message({
|
|
|
type: 'warning',
|
|
|
@@ -1009,7 +1008,7 @@
|
|
|
return
|
|
|
}
|
|
|
_this.exportsamples('exportpage')
|
|
|
- } else if (command == 'exportall') { //导出所有数据
|
|
|
+ } else if (command == 'exportall') { // 导出所有数据
|
|
|
_this.$confirm('此操作将导出所有满足条件的数据!是否继续导出?', '提示', {
|
|
|
confirmButtonText: '确定',
|
|
|
cancelButtonText: '取消',
|
|
|
@@ -1019,7 +1018,7 @@
|
|
|
}).catch(() => {})
|
|
|
}
|
|
|
},
|
|
|
- exportsamples(val) {
|
|
|
+ exportsamples (val) {
|
|
|
let _this = this
|
|
|
_this.exportloading = true
|
|
|
// 显示列
|
|
|
@@ -1068,13 +1067,13 @@
|
|
|
}
|
|
|
params = Object.assign(params, params3)
|
|
|
}
|
|
|
- //导出所选样本
|
|
|
+ // 导出所选样本
|
|
|
if (val == 'exportchosen') {
|
|
|
for (var i = 0; i < _this.multipleSelection.length; i++) {
|
|
|
if (i == _this.multipleSelection.length - 1) {
|
|
|
id += _this.multipleSelection[i].Id
|
|
|
} else {
|
|
|
- id += _this.multipleSelection[i].Id + ","
|
|
|
+ id += _this.multipleSelection[i].Id + ','
|
|
|
}
|
|
|
}
|
|
|
let paramsid = {
|
|
|
@@ -1082,13 +1081,13 @@
|
|
|
}
|
|
|
params = Object.assign(params, paramsid)
|
|
|
}
|
|
|
- //导出当前页样本
|
|
|
+ // 导出当前页样本
|
|
|
if (val == 'exportpage') {
|
|
|
for (var i = 0; i < _this.list.length; i++) {
|
|
|
if (i == _this.list.length - 1) {
|
|
|
id += _this.list[i].Id
|
|
|
} else {
|
|
|
- id += _this.list[i].Id + ","
|
|
|
+ id += _this.list[i].Id + ','
|
|
|
}
|
|
|
}
|
|
|
let paramsid = {
|
|
|
@@ -1097,10 +1096,10 @@
|
|
|
params = Object.assign(params, paramsid)
|
|
|
}
|
|
|
_this.$axios.get('/sampleinput/exportexcel', {
|
|
|
- params
|
|
|
- })
|
|
|
+ params
|
|
|
+ })
|
|
|
.then(res => {
|
|
|
- console.log("wwwwwwwwwwwwwwww",res.data)
|
|
|
+ console.log('wwwwwwwwwwwwwwww', res.data)
|
|
|
_this.exportloading = false
|
|
|
window.location = 'http://' + res.data
|
|
|
})
|
|
|
@@ -1109,15 +1108,15 @@
|
|
|
console.error(err)
|
|
|
})
|
|
|
},
|
|
|
- doprintscheme() {
|
|
|
+ doprintscheme () {
|
|
|
this.dialogPrintVisible = false
|
|
|
// 执行打印操作
|
|
|
window.PrintReport(this.Printscheme, `samples,${this.peintitemid},${this.authUser.Profile.AccCode}`)
|
|
|
},
|
|
|
- getstationurl(val) {
|
|
|
+ getstationurl (val) {
|
|
|
return `?station=${val.ShelfX};${val.ShelfY};${val.BoxX};${val.BoxY};${val.Position};${val.Id}&pname=samples-stored&size=${this.size}¤tPage=${this.currentPage}`
|
|
|
},
|
|
|
- batchprint() {
|
|
|
+ batchprint () {
|
|
|
let _this = this
|
|
|
if (_this.multipleSelection.length < 1) {
|
|
|
_this.$message({
|
|
|
@@ -1149,7 +1148,7 @@
|
|
|
})
|
|
|
},
|
|
|
|
|
|
- batchdelete() {
|
|
|
+ batchdelete () {
|
|
|
let _this = this
|
|
|
if (_this.multipleSelection.length < 1) {
|
|
|
_this.$message({
|
|
|
@@ -1170,32 +1169,32 @@
|
|
|
let count = 0
|
|
|
for (var i = 0; i < _this.multipleSelection.length; i++) {
|
|
|
_this.$axios.delete('sampleinput/' + _this.multipleSelection[i].Id + '?sampletype=' + _this.multipleSelection[
|
|
|
- i].SampleType, null)
|
|
|
+ i].SampleType, null)
|
|
|
.then(res => {
|
|
|
// response
|
|
|
if (res.data.code === 0) {
|
|
|
succeedMsg = res.data.message
|
|
|
} else {
|
|
|
errorMsg = res.data.message
|
|
|
- failedIds.push(_this.multipleSelection[i].Id);
|
|
|
- }
|
|
|
+ failedIds.push(_this.multipleSelection[i].Id)
|
|
|
+ }
|
|
|
count++
|
|
|
- //最后一个请求结束
|
|
|
+ // 最后一个请求结束
|
|
|
if (count == _this.multipleSelection.length) {
|
|
|
- //更新界面
|
|
|
+ // 更新界面
|
|
|
this.initData()
|
|
|
- //全部删除成功
|
|
|
+ // 全部删除成功
|
|
|
if (failedIds.length == 0) {
|
|
|
_this.$message({
|
|
|
type: 'success',
|
|
|
- message: succeedMsg,
|
|
|
+ message: succeedMsg
|
|
|
})
|
|
|
} else {
|
|
|
- //存在删除失败
|
|
|
- errorMsg = errorMsg + ",失败ID:" + failedIds.join(",")
|
|
|
+ // 存在删除失败
|
|
|
+ errorMsg = errorMsg + ',失败ID:' + failedIds.join(',')
|
|
|
_this.$message({
|
|
|
type: 'warning',
|
|
|
- message: errorMsg,
|
|
|
+ message: errorMsg
|
|
|
})
|
|
|
}
|
|
|
}
|
|
|
@@ -1217,10 +1216,10 @@
|
|
|
// }
|
|
|
// _this.dialogfusuVisible = true
|
|
|
// },
|
|
|
- numtoupchar(num) {
|
|
|
+ numtoupchar (num) {
|
|
|
return String.fromCharCode(64 + parseInt(num))
|
|
|
},
|
|
|
- postiontoupchar(postion) {
|
|
|
+ postiontoupchar (postion) {
|
|
|
let pos = postion.split(';')
|
|
|
if (pos.length === 2) {
|
|
|
return this.numtoupchar(pos[1]) + pos[0]
|
|
|
@@ -1228,15 +1227,15 @@
|
|
|
return postion
|
|
|
}
|
|
|
},
|
|
|
- recoverydialogcallback(v) {
|
|
|
+ recoverydialogcallback (v) {
|
|
|
this.multipleSelection = []
|
|
|
this.initData()
|
|
|
},
|
|
|
|
|
|
- addSearchField() {
|
|
|
+ addSearchField () {
|
|
|
let searchValue
|
|
|
for (let k in this.searchValue) {
|
|
|
- if (typeof this.searchValue[k] == 'number') {
|
|
|
+ if (typeof this.searchValue[k] === 'number') {
|
|
|
searchValue = this.searchValue[k]
|
|
|
break
|
|
|
} else if (this.searchValue[k] && this.searchValue[k].length > 0) {
|
|
|
@@ -1246,18 +1245,18 @@
|
|
|
}
|
|
|
|
|
|
if (!searchValue) {
|
|
|
- this.$message("请输入检索数值或范围")
|
|
|
+ this.$message('请输入检索数值或范围')
|
|
|
return
|
|
|
}
|
|
|
|
|
|
- let s = ""
|
|
|
+ let s = ''
|
|
|
if (searchValue instanceof Array && searchValue.length > 0) {
|
|
|
if (searchValue[0] instanceof Date) {
|
|
|
let arr = []
|
|
|
for (let j = 0; j < searchValue.length; j++) {
|
|
|
arr.push(this.formatDateTime(searchValue[j]))
|
|
|
}
|
|
|
- s = arr.join("--")
|
|
|
+ s = arr.join('--')
|
|
|
} else {
|
|
|
s = searchValue[searchValue.length - 1]
|
|
|
}
|
|
|
@@ -1270,7 +1269,7 @@
|
|
|
for (let index in this.searchTemplates[i].Fields) {
|
|
|
let field = this.searchTemplates[i].Fields[index]
|
|
|
if (field.Field == this.searchField && field.Value == this.searchValue && field.OrAnd == this.orAnd) {
|
|
|
- this.$message("此查询条件已经存在")
|
|
|
+ this.$message('此查询条件已经存在')
|
|
|
return
|
|
|
}
|
|
|
}
|
|
|
@@ -1279,7 +1278,7 @@
|
|
|
Field: this.searchField,
|
|
|
Value: s + '',
|
|
|
OrAnd: this.orAnd,
|
|
|
- Name: this.getFieldName(this.searchField),
|
|
|
+ Name: this.getFieldName(this.searchField)
|
|
|
})
|
|
|
this.searchTableData = this.getSearchTableData(this.searchTemplates[i].Fields)
|
|
|
break
|
|
|
@@ -1287,7 +1286,7 @@
|
|
|
}
|
|
|
},
|
|
|
|
|
|
- deleteSearchField(v) {
|
|
|
+ deleteSearchField (v) {
|
|
|
if (v.Name) {
|
|
|
for (let i = 0; i < this.searchTemplates.length; i++) {
|
|
|
if (this.searchTemplates[i].Name == this.currentSearchTemplateName) {
|
|
|
@@ -1301,12 +1300,12 @@
|
|
|
}
|
|
|
},
|
|
|
|
|
|
- getSearchTableData(searchFields) {
|
|
|
+ getSearchTableData (searchFields) {
|
|
|
let data = searchFields.map(function (ele) {
|
|
|
- if (ele["OrAnd"] == "or") {
|
|
|
- ele["Guanxi"] = "或者"
|
|
|
+ if (ele['OrAnd'] == 'or') {
|
|
|
+ ele['Guanxi'] = '或者'
|
|
|
} else {
|
|
|
- ele["Guanxi"] = "并且"
|
|
|
+ ele['Guanxi'] = '并且'
|
|
|
}
|
|
|
return ele
|
|
|
})
|
|
|
@@ -1314,36 +1313,36 @@
|
|
|
return data || []
|
|
|
},
|
|
|
|
|
|
- getFieldName(field) {
|
|
|
+ getFieldName (field) {
|
|
|
for (let i = 0; i < this.showcolumn.length; i++) {
|
|
|
if (this.showcolumn[i].filed == field) {
|
|
|
return this.showcolumn[i].name
|
|
|
}
|
|
|
}
|
|
|
- return ""
|
|
|
+ return ''
|
|
|
},
|
|
|
|
|
|
- getFieldByName(name) {
|
|
|
+ getFieldByName (name) {
|
|
|
for (let i = 0; i < this.showcolumn.length; i++) {
|
|
|
if (this.showcolumn[i].name == name) {
|
|
|
return this.showcolumn[i].filed
|
|
|
}
|
|
|
}
|
|
|
- return ""
|
|
|
+ return ''
|
|
|
},
|
|
|
|
|
|
- addSearchTab(name) {
|
|
|
+ addSearchTab (name) {
|
|
|
for (let i = 0; i < this.searchTemplates.length; i++) {
|
|
|
if (this.searchTemplates[i].Name == name) {
|
|
|
- this.$message("名称已经存在")
|
|
|
+ this.$message('名称已经存在')
|
|
|
return
|
|
|
}
|
|
|
}
|
|
|
this.searchTemplates.push({
|
|
|
- Name: name,
|
|
|
- Fields: [],
|
|
|
- }),
|
|
|
- this.currentSearchTemplateName = name
|
|
|
+ Name: name,
|
|
|
+ Fields: []
|
|
|
+ }),
|
|
|
+ this.currentSearchTemplateName = name
|
|
|
|
|
|
for (let i = 0; i < this.searchTemplates.length; i++) {
|
|
|
if (this.searchTemplates[i].Name == this.currentSearchTemplateName) {
|
|
|
@@ -1352,7 +1351,7 @@
|
|
|
}
|
|
|
},
|
|
|
|
|
|
- getAllSearchTab() {
|
|
|
+ getAllSearchTab () {
|
|
|
let _this = this
|
|
|
this.$axios.get('/sampleinput/searchTemplate', {})
|
|
|
.then(res => {
|
|
|
@@ -1376,32 +1375,31 @@
|
|
|
})
|
|
|
},
|
|
|
|
|
|
- removeSearchTab(targetName) {
|
|
|
+ removeSearchTab (targetName) {
|
|
|
let _this = this
|
|
|
this.$axios.delete('/sampleinput/searchTemplate?name=' + targetName, {})
|
|
|
.then(res => {
|
|
|
if (res.data.code == 0) {
|
|
|
- let tabs = _this.searchTemplates;
|
|
|
- let activeName = _this.currentSearchTemplateName;
|
|
|
- if (activeName === targetName) {
|
|
|
+ let tabs = _this.searchTemplates
|
|
|
+ let activeName = _this.currentSearchTemplateName
|
|
|
+ if (activeName === targetName) {
|
|
|
tabs.forEach((tab, index) => {
|
|
|
if (tab.Name === targetName) {
|
|
|
- let nextTab = tabs[index + 1] || tabs[index - 1];
|
|
|
- if (nextTab) {
|
|
|
+ let nextTab = tabs[index + 1] || tabs[index - 1]
|
|
|
+ if (nextTab) {
|
|
|
activeName = nextTab.Name
|
|
|
_this.searchTableData = this.getSearchTableData(nextTab.Fields)
|
|
|
}
|
|
|
}
|
|
|
- });
|
|
|
- }
|
|
|
+ })
|
|
|
+ }
|
|
|
|
|
|
_this.currentSearchTemplateName = activeName
|
|
|
_this.searchTemplates = tabs.filter(tab => tab.Name !== targetName)
|
|
|
-
|
|
|
} else {
|
|
|
_this.$message({
|
|
|
type: 'warning',
|
|
|
- message: res.data.message,
|
|
|
+ message: res.data.message
|
|
|
})
|
|
|
}
|
|
|
})
|
|
|
@@ -1411,8 +1409,8 @@
|
|
|
})
|
|
|
},
|
|
|
|
|
|
- clickmodeltypetag(val) {
|
|
|
- this.currentSearchTemplateName = val.getAttribute("id")
|
|
|
+ clickmodeltypetag (val) {
|
|
|
+ this.currentSearchTemplateName = val.getAttribute('id')
|
|
|
for (let i = 0; i < this.searchTemplates.length; i++) {
|
|
|
if (this.searchTemplates[i].Name == this.currentSearchTemplateName) {
|
|
|
this.searchTableData = this.getSearchTableData(this.searchTemplates[i].Fields)
|
|
|
@@ -1420,15 +1418,15 @@
|
|
|
}
|
|
|
},
|
|
|
|
|
|
- handleSearchCommand(command) {
|
|
|
+ handleSearchCommand (command) {
|
|
|
if (command == 'search') {
|
|
|
this.dialogVisible = true
|
|
|
} else if (command == 'clear') {
|
|
|
this.clearSearch()
|
|
|
- } else if (command == "编辑") {
|
|
|
+ } else if (command == '编辑') {
|
|
|
this.searchDialogVisible = true
|
|
|
this.searchcolumn = this.showcolumn.filter(function (e) {
|
|
|
- return e.filed != "Location"
|
|
|
+ return e.filed != 'Location'
|
|
|
})
|
|
|
} else {
|
|
|
this.currentSearchTemplate = command
|
|
|
@@ -1440,18 +1438,18 @@
|
|
|
}
|
|
|
},
|
|
|
|
|
|
- searchWithTemplate(name) {
|
|
|
+ searchWithTemplate (name) {
|
|
|
this.searchDialogVisible = false
|
|
|
let params = {
|
|
|
_currentPage: this.currentPage,
|
|
|
- _size: this.size,
|
|
|
+ _size: this.size
|
|
|
|
|
|
}
|
|
|
let _this = this
|
|
|
// request
|
|
|
this.$axios.get('/sampleinput/search?name=' + name, {
|
|
|
- params
|
|
|
- })
|
|
|
+ params
|
|
|
+ })
|
|
|
.then(res => {
|
|
|
// response
|
|
|
if (res.data.items) {
|
|
|
@@ -1466,7 +1464,7 @@
|
|
|
})
|
|
|
},
|
|
|
|
|
|
- saveAndSearchWithTemplate() {
|
|
|
+ saveAndSearchWithTemplate () {
|
|
|
let _this = this
|
|
|
this.saveSearchTemplate(function () {
|
|
|
_this.currentSearchTemplate = _this.currentSearchTemplateName
|
|
|
@@ -1474,7 +1472,7 @@
|
|
|
})
|
|
|
},
|
|
|
|
|
|
- saveSearchTemplate(cb) {
|
|
|
+ saveSearchTemplate (cb) {
|
|
|
let _this = this
|
|
|
let template = JSON.stringify(this.searchTableData)
|
|
|
this.$axios.put('/sampleinput/searchTemplate?name=' + this.currentSearchTemplateName, template)
|
|
|
@@ -1482,7 +1480,7 @@
|
|
|
if (res.data.code == 0) {
|
|
|
_this.$message({
|
|
|
type: 'success',
|
|
|
- message: res.data.message,
|
|
|
+ message: res.data.message
|
|
|
})
|
|
|
if (cb) {
|
|
|
cb()
|
|
|
@@ -1490,7 +1488,7 @@
|
|
|
} else {
|
|
|
_this.$message({
|
|
|
type: 'warning',
|
|
|
- message: res.data.message,
|
|
|
+ message: res.data.message
|
|
|
})
|
|
|
}
|
|
|
})
|
|
|
@@ -1500,7 +1498,7 @@
|
|
|
})
|
|
|
},
|
|
|
|
|
|
- changeSearchField(val) {
|
|
|
+ changeSearchField (val) {
|
|
|
this.searchValue = {
|
|
|
BarCode: '',
|
|
|
SampleCode: '',
|
|
|
@@ -1519,7 +1517,7 @@
|
|
|
GroupName: ''
|
|
|
}
|
|
|
},
|
|
|
- clearSearch() {
|
|
|
+ clearSearch () {
|
|
|
this.BarCode = ''
|
|
|
this.SampleCode = ''
|
|
|
this.SourceName = ''
|
|
|
@@ -1540,22 +1538,21 @@
|
|
|
this.GroupName = ''
|
|
|
this.initData()
|
|
|
},
|
|
|
- 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();
|
|
|
- var second = date.getSeconds();
|
|
|
- minute = minute < 10 ? ('0' + minute) : minute;
|
|
|
- minute = second < 10 ? ('0' + second) : second;
|
|
|
- return y + '-' + m + '-' + d + ' ' + h + ':' + minute + ':' + second;
|
|
|
- }
|
|
|
+ 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()
|
|
|
+ var second = date.getSeconds()
|
|
|
+ minute = minute < 10 ? ('0' + minute) : minute
|
|
|
+ minute = second < 10 ? ('0' + second) : second
|
|
|
+ return y + '-' + m + '-' + d + ' ' + h + ':' + minute + ':' + second
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
</script>
|
|
|
|
|
|
<style lang="scss">
|