|
|
@@ -90,7 +90,7 @@
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
|
<el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="currentPage"
|
|
|
- :page-sizes="[10, 20, 50, 100]" :page-size="size" layout="total, sizes, prev, pager, next, jumper" :total="currentItemCount">
|
|
|
+ :page-sizes="[10, 50, 100, 200, 500]" :page-size="size" layout="total, sizes, prev, pager, next, jumper" :total="currentItemCount">
|
|
|
</el-pagination>
|
|
|
</el-card>
|
|
|
|
|
|
@@ -290,7 +290,7 @@
|
|
|
components: {
|
|
|
draggable
|
|
|
},
|
|
|
- data() {
|
|
|
+ data () {
|
|
|
return {
|
|
|
dialogVisible: false,
|
|
|
currentItemCount: 0, // 当前页显示数量
|
|
|
@@ -304,7 +304,7 @@
|
|
|
STNoteField: [], // 特有扩展名称
|
|
|
CreateBy: '', // 录入人
|
|
|
CreateOn: [], // 录入时期
|
|
|
- GroupName: '', //所属分组
|
|
|
+ GroupName: '', // 所属分组
|
|
|
Name: '', // 名称
|
|
|
SourceName: '', // 样本来源
|
|
|
Validity: [], // 有效日期
|
|
|
@@ -317,17 +317,17 @@
|
|
|
peintitemid: 0,
|
|
|
selectedzuzhi: [],
|
|
|
typetykzlist: [], // 特有扩展
|
|
|
- multipleSelection: [], //多选框
|
|
|
+ multipleSelection: [], // 多选框
|
|
|
showcolumn: [], // 显示列
|
|
|
cachecols: [],
|
|
|
columndialogVisible: false, // 自定义显示列弹框
|
|
|
isIndeterminate: false,
|
|
|
checkAll: true,
|
|
|
searchDialogVisible: false, // 自定义搜索弹框
|
|
|
- searchTemplateName: "自定义搜索1",
|
|
|
+ searchTemplateName: '自定义搜索1',
|
|
|
searchTemplates: [],
|
|
|
- currentSearchTemplateName: "",
|
|
|
- searchField: "BarCode",
|
|
|
+ currentSearchTemplateName: '',
|
|
|
+ searchField: 'BarCode',
|
|
|
searchValue: {
|
|
|
BarCode: '',
|
|
|
SampleCode: '',
|
|
|
@@ -344,7 +344,7 @@
|
|
|
Location: '',
|
|
|
Extension: '',
|
|
|
GroupName: '',
|
|
|
- GroupName: '',
|
|
|
+ GroupName: ''
|
|
|
},
|
|
|
sampinputtreeprops2: {
|
|
|
value: 'name',
|
|
|
@@ -353,65 +353,65 @@
|
|
|
},
|
|
|
selectedzuzhi2: [],
|
|
|
samplesitenames2: [], // 取材部位
|
|
|
- orAnd: "and",
|
|
|
+ orAnd: 'and',
|
|
|
orAndData: [{
|
|
|
- name: "并且",
|
|
|
- value: "and",
|
|
|
- },
|
|
|
- {
|
|
|
- name: "或者",
|
|
|
- value: "or",
|
|
|
- }
|
|
|
+ name: '并且',
|
|
|
+ value: 'and'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: '或者',
|
|
|
+ value: 'or'
|
|
|
+ }
|
|
|
],
|
|
|
searchTableData: [],
|
|
|
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('sampleprerecordedseach')
|
|
|
- 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.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.GroupName && searchmodel.GroupName !== '') { //所属分组
|
|
|
+ if (searchmodel.GroupName && searchmodel.GroupName !== '') { // 所属分组
|
|
|
this.GroupName = searchmodel.GroupName
|
|
|
}
|
|
|
}
|
|
|
@@ -420,7 +420,7 @@
|
|
|
}
|
|
|
|
|
|
this.cachecols = store.get('sampleprerecordedshowcolumn')
|
|
|
- //当前显示列无数据,使用已录入样本显示列数据
|
|
|
+ // 当前显示列无数据,使用已录入样本显示列数据
|
|
|
if (!(this.cachecols && this.cachecols !== '')) {
|
|
|
this.cachecols = store.get('sapminputshowcolumn')
|
|
|
}
|
|
|
@@ -472,7 +472,7 @@
|
|
|
name: '可用容量',
|
|
|
show: true,
|
|
|
kuoz: false
|
|
|
- },{
|
|
|
+ }, {
|
|
|
filed: 'InnerCode',
|
|
|
name: '样本内码',
|
|
|
show: true,
|
|
|
@@ -504,31 +504,31 @@
|
|
|
this.checkedshowall()
|
|
|
this.getAllSearchTab()
|
|
|
},
|
|
|
- mounted() {
|
|
|
+ mounted () {
|
|
|
let _this = this
|
|
|
window.clickmodeltypetag = function (val, e) {
|
|
|
_this.clickmodeltypetag(val)
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
- getextends() {
|
|
|
+ getextends () {
|
|
|
let _this = this
|
|
|
this.$axios.get('/sampleinput/getsampletype', {
|
|
|
- _currentPage: -1
|
|
|
- })
|
|
|
+ _currentPage: -1
|
|
|
+ })
|
|
|
.then(res => {
|
|
|
_this.sampletypes = res.data.items
|
|
|
if (store.get('sampleprerecordedseach').searchWithTemplate && store.get(
|
|
|
- 'sampleprerecordedseach')
|
|
|
+ 'sampleprerecordedseach')
|
|
|
.searchWithTemplate !==
|
|
|
- '') { //自定义查询
|
|
|
+ '') { // 自定义查询
|
|
|
this.handleSearchCommand(store.get('sampleprerecordedseach').searchWithTemplate)
|
|
|
} else {
|
|
|
this.initData()
|
|
|
}
|
|
|
}).catch(() => {})
|
|
|
},
|
|
|
- initData() {
|
|
|
+ initData () {
|
|
|
this.currentSearchTemplate = ''
|
|
|
let _this = this
|
|
|
let params = {
|
|
|
@@ -554,11 +554,11 @@
|
|
|
}
|
|
|
params = Object.assign(params, params2)
|
|
|
}
|
|
|
- //返回时保存查找内容
|
|
|
+ // 返回时保存查找内容
|
|
|
store.set('sampleprerecordedseach', params)
|
|
|
this.$axios.get('/samplepreinput/animallist', {
|
|
|
- params
|
|
|
- })
|
|
|
+ params
|
|
|
+ })
|
|
|
.then(res => {
|
|
|
_this.list = res.data.items
|
|
|
_this.currentItemCount = res.data.currentItemCount
|
|
|
@@ -567,7 +567,7 @@
|
|
|
console.error(err)
|
|
|
})
|
|
|
},
|
|
|
- //根据子code获取所有父code
|
|
|
+ // 根据子code获取所有父code
|
|
|
// getparentcodebytopcode(v) {
|
|
|
// let _this = this
|
|
|
// _this.$axios.get('/sampleorgan/getparentcodebytopcode/' + v, {})
|
|
|
@@ -583,19 +583,19 @@
|
|
|
// })
|
|
|
// },
|
|
|
|
|
|
- loadprintdata() {
|
|
|
+ loadprintdata () {
|
|
|
this.$axios.get('/sampleinput/getprintschemelist', {
|
|
|
- _currentPage: -1
|
|
|
- })
|
|
|
+ _currentPage: -1
|
|
|
+ })
|
|
|
.then(res => {
|
|
|
this.printschemelist = res.data.items
|
|
|
}).catch(() => {})
|
|
|
},
|
|
|
- seachdata() {
|
|
|
+ seachdata () {
|
|
|
this.currentPage = 1
|
|
|
this.initData()
|
|
|
},
|
|
|
- selsampletypeChange() {
|
|
|
+ selsampletypeChange () {
|
|
|
// 获取特有扩展
|
|
|
let _this = this
|
|
|
if (_this.SampleType != '') {
|
|
|
@@ -607,8 +607,8 @@
|
|
|
})
|
|
|
}
|
|
|
},
|
|
|
- //返回查询条件执行
|
|
|
- searchsampletypeChange() {
|
|
|
+ // 返回查询条件执行
|
|
|
+ searchsampletypeChange () {
|
|
|
// 获取特有扩展
|
|
|
let _this = this
|
|
|
if (_this.SampleType !== '') {
|
|
|
@@ -618,10 +618,10 @@
|
|
|
})
|
|
|
}
|
|
|
},
|
|
|
- //导出样本
|
|
|
- handleExportsamplesCommand(command) {
|
|
|
+ // 导出样本
|
|
|
+ handleExportsamplesCommand (command) {
|
|
|
let _this = this
|
|
|
- if (command == 'exportchosen') { //导出所选数据
|
|
|
+ if (command == 'exportchosen') { // 导出所选数据
|
|
|
if (_this.multipleSelection.length < 1) {
|
|
|
_this.$message({
|
|
|
type: 'warning',
|
|
|
@@ -630,7 +630,7 @@
|
|
|
return
|
|
|
}
|
|
|
_this.exportsamples('exportchosen')
|
|
|
- } else if (command == 'exportpage') { //导出当前页数据
|
|
|
+ } else if (command == 'exportpage') { // 导出当前页数据
|
|
|
if (_this.list.length < 1) {
|
|
|
_this.$message({
|
|
|
type: 'warning',
|
|
|
@@ -639,7 +639,7 @@
|
|
|
return
|
|
|
}
|
|
|
_this.exportsamples('exportpage')
|
|
|
- } else if (command == 'exportall') { //导出所有数据
|
|
|
+ } else if (command == 'exportall') { // 导出所有数据
|
|
|
_this.$confirm('此操作将导出所有满足条件的数据!是否继续导出?', '提示', {
|
|
|
confirmButtonText: '确定',
|
|
|
cancelButtonText: '取消',
|
|
|
@@ -649,7 +649,7 @@
|
|
|
}).catch(() => {})
|
|
|
}
|
|
|
},
|
|
|
- exportsamples(val) {
|
|
|
+ exportsamples (val) {
|
|
|
let _this = this
|
|
|
// 显示列
|
|
|
let showcolumnarr = []
|
|
|
@@ -693,13 +693,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 = {
|
|
|
@@ -707,13 +707,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 = {
|
|
|
@@ -723,8 +723,8 @@
|
|
|
}
|
|
|
console.log(params, 'params++')
|
|
|
_this.$axios.get('/sampleinput/exportexcel', {
|
|
|
- params
|
|
|
- })
|
|
|
+ params
|
|
|
+ })
|
|
|
.then(res => {
|
|
|
window.location = 'http://' + res.data
|
|
|
})
|
|
|
@@ -733,8 +733,8 @@
|
|
|
console.error(err)
|
|
|
})
|
|
|
},
|
|
|
- //样本条码批量打印
|
|
|
- batchprint() {
|
|
|
+ // 样本条码批量打印
|
|
|
+ batchprint () {
|
|
|
let _this = this
|
|
|
if (_this.multipleSelection.length < 1) {
|
|
|
_this.$message({
|
|
|
@@ -765,9 +765,9 @@
|
|
|
console.error(err)
|
|
|
})
|
|
|
},
|
|
|
- //---------------------------------------------------
|
|
|
- //自定义显示列
|
|
|
- checkedshowall() {
|
|
|
+ // ---------------------------------------------------
|
|
|
+ // 自定义显示列
|
|
|
+ checkedshowall () {
|
|
|
let tc = 0
|
|
|
for (var i = 0; i < this.showcolumn.length; i++) {
|
|
|
if (this.showcolumn[i].show) {
|
|
|
@@ -786,13 +786,13 @@
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
- handleCheckAllChange(val) {
|
|
|
+ handleCheckAllChange (val) {
|
|
|
for (var i = 0; i < this.showcolumn.length; i++) {
|
|
|
this.showcolumn[i].show = val
|
|
|
}
|
|
|
},
|
|
|
// 自定义显示列保存操作
|
|
|
- saveshowfiled() {
|
|
|
+ saveshowfiled () {
|
|
|
store.set('sampleprerecordedshowcolumn', this.showcolumn)
|
|
|
this.columndialogVisible = false
|
|
|
this.$message({
|
|
|
@@ -801,7 +801,7 @@
|
|
|
})
|
|
|
this.initData()
|
|
|
},
|
|
|
- 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
|
|
|
@@ -810,17 +810,17 @@
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
- //----------------------------------------------------------------
|
|
|
- //自定义查询
|
|
|
- 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
|
|
|
@@ -831,19 +831,19 @@
|
|
|
this.searchWithTemplate(command)
|
|
|
}
|
|
|
},
|
|
|
- //添加自定义搜索
|
|
|
- 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) {
|
|
|
@@ -851,32 +851,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;
|
|
|
+ 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];
|
|
|
+ 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
|
|
|
})
|
|
|
}
|
|
|
})
|
|
|
@@ -884,11 +883,11 @@
|
|
|
console.error(err)
|
|
|
})
|
|
|
},
|
|
|
- //添加自定义搜索详情
|
|
|
- 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) {
|
|
|
@@ -898,18 +897,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]
|
|
|
}
|
|
|
@@ -922,7 +921,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
|
|
|
}
|
|
|
}
|
|
|
@@ -931,23 +930,23 @@
|
|
|
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
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
- //查询自定义搜索详情
|
|
|
- saveAndSearchWithTemplate() {
|
|
|
+ // 查询自定义搜索详情
|
|
|
+ saveAndSearchWithTemplate () {
|
|
|
let _this = this
|
|
|
this.saveSearchTemplate(function () {
|
|
|
_this.currentSearchTemplate = _this.currentSearchTemplateName
|
|
|
_this.searchWithTemplate(_this.currentSearchTemplateName)
|
|
|
})
|
|
|
},
|
|
|
- //保存自定义搜索详情
|
|
|
- saveSearchTemplate(cb) {
|
|
|
+ // 保存自定义搜索详情
|
|
|
+ saveSearchTemplate (cb) {
|
|
|
let _this = this
|
|
|
let template = JSON.stringify(this.searchTableData)
|
|
|
this.$axios.put('/sampleinput/searchTemplate?name=' + this.currentSearchTemplateName, template)
|
|
|
@@ -955,7 +954,7 @@
|
|
|
if (res.data.code == 0) {
|
|
|
_this.$message({
|
|
|
type: 'success',
|
|
|
- message: res.data.message,
|
|
|
+ message: res.data.message
|
|
|
})
|
|
|
if (cb) {
|
|
|
cb()
|
|
|
@@ -963,7 +962,7 @@
|
|
|
} else {
|
|
|
_this.$message({
|
|
|
type: 'warning',
|
|
|
- message: res.data.message,
|
|
|
+ message: res.data.message
|
|
|
})
|
|
|
}
|
|
|
})
|
|
|
@@ -972,7 +971,7 @@
|
|
|
console.error(err)
|
|
|
})
|
|
|
},
|
|
|
- deleteSearchField(v) {
|
|
|
+ deleteSearchField (v) {
|
|
|
if (v.Name) {
|
|
|
for (let i = 0; i < this.searchTemplates.length; i++) {
|
|
|
if (this.searchTemplates[i].Name == this.currentSearchTemplateName) {
|
|
|
@@ -985,20 +984,20 @@
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
- searchWithTemplate(name) {
|
|
|
+ searchWithTemplate (name) {
|
|
|
console.log(name)
|
|
|
this.searchDialogVisible = false
|
|
|
|
|
|
let params = {
|
|
|
_currentPage: this.currentPage,
|
|
|
- _size: this.size,
|
|
|
+ _size: this.size
|
|
|
|
|
|
}
|
|
|
let _this = this
|
|
|
// request
|
|
|
this.$axios.get('/samplepreinput/search?name=' + name, {
|
|
|
- params
|
|
|
- })
|
|
|
+ params
|
|
|
+ })
|
|
|
.then(res => {
|
|
|
console.log(res.data.items)
|
|
|
// response
|
|
|
@@ -1013,27 +1012,27 @@
|
|
|
console.error(err)
|
|
|
})
|
|
|
},
|
|
|
- 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
|
|
|
})
|
|
|
|
|
|
return data || []
|
|
|
},
|
|
|
- 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)
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
- getAllSearchTab() {
|
|
|
+ getAllSearchTab () {
|
|
|
let _this = this
|
|
|
this.$axios.get('/sampleinput/searchTemplate', {})
|
|
|
.then(res => {
|
|
|
@@ -1056,7 +1055,7 @@
|
|
|
console.error(err)
|
|
|
})
|
|
|
},
|
|
|
- changeSearchField(val) {
|
|
|
+ changeSearchField (val) {
|
|
|
this.searchValue = {
|
|
|
BarCode: '',
|
|
|
SampleCode: '',
|
|
|
@@ -1072,19 +1071,19 @@
|
|
|
Capacity: '',
|
|
|
Location: '',
|
|
|
Extension: '',
|
|
|
- GroupName: '',
|
|
|
+ GroupName: ''
|
|
|
}
|
|
|
},
|
|
|
- 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 ''
|
|
|
},
|
|
|
- //----------------------------------------------------------------
|
|
|
- handleSizeChange(value) {
|
|
|
+ // ----------------------------------------------------------------
|
|
|
+ handleSizeChange (value) {
|
|
|
this.size = value
|
|
|
this.currentPage = 1
|
|
|
if (this.currentSearchTemplate) {
|
|
|
@@ -1093,7 +1092,7 @@
|
|
|
this.initData()
|
|
|
}
|
|
|
},
|
|
|
- jstimehandle(val) {
|
|
|
+ jstimehandle (val) {
|
|
|
if (val === '') {
|
|
|
return '----'
|
|
|
} else if (val === '0001-01-01T08:00:00+08:00') {
|
|
|
@@ -1105,7 +1104,7 @@
|
|
|
return val.substring(0, 19)
|
|
|
}
|
|
|
},
|
|
|
- Jstimehandle(val) {
|
|
|
+ Jstimehandle (val) {
|
|
|
if (val === '') {
|
|
|
return '----'
|
|
|
} else if (val === '0001-01-01T08:00:00+08:00') {
|
|
|
@@ -1117,7 +1116,7 @@
|
|
|
return val.substring(0, 10)
|
|
|
}
|
|
|
},
|
|
|
- handleCurrentChange(value) {
|
|
|
+ handleCurrentChange (value) {
|
|
|
this.currentPage = value
|
|
|
if (this.currentSearchTemplate) {
|
|
|
this.searchWithTemplate(this.currentSearchTemplate)
|
|
|
@@ -1125,8 +1124,8 @@
|
|
|
this.initData()
|
|
|
}
|
|
|
},
|
|
|
- //清空查询数据
|
|
|
- clearSearch() {
|
|
|
+ // 清空查询数据
|
|
|
+ clearSearch () {
|
|
|
this.BarCode = ''
|
|
|
this.SampleCode = ''
|
|
|
this.SourceName = ''
|
|
|
@@ -1142,7 +1141,7 @@
|
|
|
this.currentPage = 1
|
|
|
this.initData()
|
|
|
},
|
|
|
- deletedata(val) {
|
|
|
+ deletedata (val) {
|
|
|
let _this = this
|
|
|
_this.$confirm('此操作将永久删除该数据, 是否继续?', '提示', {
|
|
|
confirmButtonText: '确定',
|
|
|
@@ -1169,8 +1168,8 @@
|
|
|
.catch(() => {})
|
|
|
}).catch(() => {})
|
|
|
},
|
|
|
- //批量删除
|
|
|
- batchdelete() {
|
|
|
+ // 批量删除
|
|
|
+ batchdelete () {
|
|
|
let _this = this
|
|
|
if (_this.multipleSelection.length < 1) {
|
|
|
_this.$message({
|
|
|
@@ -1198,25 +1197,25 @@
|
|
|
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
|
|
|
})
|
|
|
}
|
|
|
}
|
|
|
@@ -1227,20 +1226,20 @@
|
|
|
console.error(err)
|
|
|
})
|
|
|
},
|
|
|
- deleteRow(index, rows) {
|
|
|
+ deleteRow (index, rows) {
|
|
|
rows.splice(index, 1)
|
|
|
},
|
|
|
- handleSelectionChange(val) {
|
|
|
+ handleSelectionChange (val) {
|
|
|
this.multipleSelection = val
|
|
|
},
|
|
|
- handleChange(value) {
|
|
|
+ handleChange (value) {
|
|
|
console.log(value)
|
|
|
},
|
|
|
- openPrintDialog(val) {
|
|
|
+ openPrintDialog (val) {
|
|
|
this.peintitemid = val.Id
|
|
|
this.dialogPrintVisible = true
|
|
|
},
|
|
|
- doprintscheme() {
|
|
|
+ doprintscheme () {
|
|
|
this.dialogPrintVisible = false
|
|
|
// 执行打印操作
|
|
|
window.PrintReport(this.Printscheme,
|
|
|
@@ -1248,7 +1247,6 @@
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
</script>
|
|
|
|
|
|
<style lang="scss">
|