Commit 439a7221 by lichengming

修改了试样管理的历史记录删除按钮

parent 4d1c7d15
...@@ -107,6 +107,11 @@ export default { ...@@ -107,6 +107,11 @@ export default {
type: 'ios-clock', type: 'ios-clock',
id: '', id: '',
name: '操作日志' name: '操作日志'
},
{
type: 'md-trash',
id: '',
name: '删除'
} }
], ],
formObj: { formObj: {
...@@ -306,7 +311,7 @@ export default { ...@@ -306,7 +311,7 @@ export default {
} }
}, },
_delete: async function(ids) { _delete: async function(ids) {
const result = await soilAptitude.deleteById(ids) const result = await soilEntrust.deleteById(ids)
if (result) { if (result) {
this._formSearch() this._formSearch()
this.$Message.success('删除成功!') this.$Message.success('删除成功!')
......
...@@ -110,6 +110,11 @@ export default { ...@@ -110,6 +110,11 @@ export default {
type: 'ios-clock', type: 'ios-clock',
id: '', id: '',
name: '操作日志' name: '操作日志'
},
{
type: 'md-trash',
id: '',
name: '删除'
} }
], ],
formObj: { formObj: {
...@@ -310,7 +315,7 @@ export default { ...@@ -310,7 +315,7 @@ export default {
} }
}, },
_delete: async function(ids) { _delete: async function(ids) {
const result = await soilAptitude.deleteById(ids) const result = await soilEntrust.deleteById(ids)
if (result) { if (result) {
this._formSearch() this._formSearch()
this.$Message.success('删除成功!') this.$Message.success('删除成功!')
......
...@@ -95,6 +95,11 @@ export default { ...@@ -95,6 +95,11 @@ export default {
type: 'ios-clock', type: 'ios-clock',
id: '', id: '',
name: '操作日志' name: '操作日志'
},
{
type: 'md-trash',
id: '',
name: '删除'
} }
], ],
getPage: {}, getPage: {},
...@@ -173,6 +178,9 @@ export default { ...@@ -173,6 +178,9 @@ export default {
case '管理样品': case '管理样品':
this._editModal(data.id, data.type, data.entrustCode) this._editModal(data.id, data.type, data.entrustCode)
break break
case '删除':
this._deleteByIds([data.id])
break
case '附件': case '附件':
this._upload(data.id) this._upload(data.id)
break break
...@@ -182,6 +190,23 @@ export default { ...@@ -182,6 +190,23 @@ export default {
} }
}) })
}, },
// 删除
_deleteByIds(ids, content) {
this.$Modal.confirm({
title: '提示',
content: content || '确定删除该记录?',
onOk: () => {
this._delete(ids)
}
})
},
_delete: async function(ids) {
const result = await soilEntrust.deleteById(ids)
if (result) {
this._formSearch()
this.$Message.success('删除成功!')
}
},
_editModal(id, type, name) { _editModal(id, type, name) {
this.currentComponent = 'SampleManage' this.currentComponent = 'SampleManage'
this.$nextTick(() => { this.$nextTick(() => {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment