Browse Source

档案盒-删除

master
xuhuajiao 3 years ago
parent
commit
911aacf0b2
  1. 4
      src/api/archivesManage/caseManage.js
  2. 2
      src/views/archivesManage/archivesList/module/archivesInfo/index.vue
  3. 35
      src/views/archivesManage/caseManage/caseList/index.vue
  4. 2
      src/views/components/BindingTagDlg.vue

4
src/api/archivesManage/caseManage.js

@ -12,10 +12,10 @@ export function edit(parameter) {
data: parameter data: parameter
}) })
} }
// 删除档案盒
export function del(data) { export function del(data) {
return request({ return request({
url: 'api/archives/delete',
url: 'api/case/del',
method: 'post', method: 'post',
data: data data: data
}) })

2
src/views/archivesManage/archivesList/module/archivesInfo/index.vue

@ -98,7 +98,7 @@ export default {
item.context = '待借阅' item.context = '待借阅'
} else if (item.context === 3) { } else if (item.context === 3) {
item.context = '待归还' item.context = '待归还'
} else if (item.context === 4 || item.context === '') {
} else if (item.context === 4 || item.context === '' || item.context === null) {
item.context = '-' item.context = '-'
} }
} }

35
src/views/archivesManage/caseManage/caseList/index.vue

@ -84,6 +84,7 @@
<script> <script>
import caseCrudMethod from '@/api/archivesManage/caseManage' import caseCrudMethod from '@/api/archivesManage/caseManage'
import { del } from '@/api/archivesManage/caseManage'
import BindingTagDlg from '@/views/components/BindingTagDlg' import BindingTagDlg from '@/views/components/BindingTagDlg'
import eForm from './module/form' import eForm from './module/form'
import openCaseDlg from './module/openCaseDlg' import openCaseDlg from './module/openCaseDlg'
@ -184,7 +185,6 @@ export default {
this.$refs.bindingTag.bindingVisible = true this.$refs.bindingTag.bindingVisible = true
}, },
openCase(data) { openCase(data) {
console.log(data)
const isBool = data.every(item => item.storageType === 0) const isBool = data.every(item => item.storageType === 0)
if (isBool) { if (isBool) {
const bool = data.some(item => item.depositNum === 0) const bool = data.some(item => item.depositNum === 0)
@ -203,11 +203,9 @@ export default {
}, },
// //
handleDbClick(row) { handleDbClick(row) {
// console.log(row, 'row')
this.$refs.detailDom.rowData = row this.$refs.detailDom.rowData = row
const params = { const params = {
caseId: row.id caseId: row.id
// caseId: '1716F6C668C83A929C738B'
} }
this.crud.crudMethod.findInCase(params).then(res => { this.crud.crudMethod.findInCase(params).then(res => {
if (res) { if (res) {
@ -230,16 +228,37 @@ export default {
}, },
// //
handleDel(data) { handleDel(data) {
const bool = data.every(item => item.depositNum === 0)
if (bool) {
this.deleteVisible = true
const boolDeposit = data.every(item => item.depositNum === 0)
const boolStorage = data.every(item => item.storageType === 0)
if (boolStorage) {
if (boolDeposit) {
this.deleteVisible = true
} else {
this.$message.error('请清空档案盒后再删除!')
}
} else { } else {
this.$message.error('请清空档案盒后再删除!')
this.$message.error('请操作出库并清空档案盒后才可删除盒!')
} }
}, },
// //
handleDelConfirm(data) { handleDelConfirm(data) {
this.deleteVisible = false
const params = data.map(item => {
return item.id
})
del(params).then(res => {
if (res.doDel.length === 0) {
this.$message.error('删除失败')
} else {
if (res.doDel.length === data.length) {
this.$message.success('全部删除成功')
} else {
this.$message.success('部分删除成功')
}
}
this.deleteVisible = false
this.crud.refresh()
})
} }
} }
} }

2
src/views/components/BindingTagDlg.vue

@ -289,7 +289,7 @@ export default {
async opened() { async opened() {
if (!this.isBinding) { if (!this.isBinding) {
// this.devId = await this.getDevId() // this.devId = await this.getDevId()
this.devId = 'D002'
this.devId = 'D001'
await this.tryConnect({ op: 'RFID_CheckStatus', sDevID: this.devId }) await this.tryConnect({ op: 'RFID_CheckStatus', sDevID: this.devId })
await this.readEpc({ op: 'RFID_ReadEpc', sDevID: this.devId }) await this.readEpc({ op: 'RFID_ReadEpc', sDevID: this.devId })
await this.startBind() await this.startBind()

Loading…
Cancel
Save