|
|
@ -138,7 +138,7 @@ |
|
|
|
</template> |
|
|
|
|
|
|
|
<script> |
|
|
|
import { basefinbankExportExcel, deleteBySids, pagerList } from '@/api/cheliang/basevehiclecertificate' |
|
|
|
import { basefinbankExportExcel, deleteBySids, pagerList, certificateYJ } from '@/api/cheliang/basevehiclecertificate' |
|
|
|
import { typeValues, getOrgSidByPath } from '@/api/cheliang/dictcommons' |
|
|
|
import Pagination from '@/components/pagination' |
|
|
|
import pageye from '@/components/pagination/pageye' |
|
|
@ -223,6 +223,13 @@ export default { |
|
|
|
btnKey: 'doDel', |
|
|
|
btnLabel: '删除' |
|
|
|
}, |
|
|
|
{ |
|
|
|
type: 'primary', |
|
|
|
size: 'small', |
|
|
|
icon: '', |
|
|
|
btnKey: 'handOver', |
|
|
|
btnLabel: '移交' |
|
|
|
}, |
|
|
|
{ |
|
|
|
type: 'success', |
|
|
|
size: 'small', |
|
|
@ -254,6 +261,7 @@ export default { |
|
|
|
// list: null, |
|
|
|
list: [], |
|
|
|
sids: [], |
|
|
|
state_list: [], |
|
|
|
FormLoading: false, |
|
|
|
listLoading: false, |
|
|
|
useOrg: '', |
|
|
@ -321,6 +329,9 @@ export default { |
|
|
|
case 'doDel': |
|
|
|
this.doDel() |
|
|
|
break |
|
|
|
case 'handOver': |
|
|
|
this.handOver() |
|
|
|
break |
|
|
|
case 'doExport': |
|
|
|
this.doExport() |
|
|
|
break |
|
|
@ -400,10 +411,16 @@ export default { |
|
|
|
}, |
|
|
|
handleSelectionChange(row) { |
|
|
|
const aa = [] |
|
|
|
const bb = [] |
|
|
|
row.forEach((element) => { |
|
|
|
aa.push(element.sid) |
|
|
|
bb.push({ |
|
|
|
transferStateValue: element.transferStateValue, |
|
|
|
certificateStateValue: element.certificateStateValue |
|
|
|
}) |
|
|
|
}) |
|
|
|
this.sids = aa |
|
|
|
this.state_list = bb |
|
|
|
}, |
|
|
|
// 打开添加 |
|
|
|
toAdd() { |
|
|
@ -431,17 +448,10 @@ export default { |
|
|
|
const sid = this.sids[0] |
|
|
|
const row = this.row |
|
|
|
this.$refs['divadd'].showEdit(sid, row, this.useOrg) |
|
|
|
} else if (this.sids.length > 1) { |
|
|
|
this.$notify({ |
|
|
|
title: '提示', |
|
|
|
message: '不能选中多个合格证台账修改!!', |
|
|
|
type: 'info', |
|
|
|
duration: 2000 |
|
|
|
}) |
|
|
|
} else { |
|
|
|
this.$notify({ |
|
|
|
title: '提示', |
|
|
|
message: '没有选择合格证台账!!', |
|
|
|
message: '请选择一条记录进行编辑操作', |
|
|
|
type: 'error', |
|
|
|
duration: 2000 |
|
|
|
}) |
|
|
@ -454,6 +464,31 @@ export default { |
|
|
|
const sid = row.sid |
|
|
|
this.$refs['divinfo'].showInfo(sid) |
|
|
|
}, |
|
|
|
// 移交 |
|
|
|
handOver() { |
|
|
|
if (this.sids.length === 0) { |
|
|
|
this.$message({ showClose: true, type: 'error', message: '请选择至少一条记录进行移交操作' }) |
|
|
|
return |
|
|
|
} else { |
|
|
|
for (var i = 0; i < this.state_list.length; i++) { |
|
|
|
if (this.state_list[i].transferStateValue !== '待移交' || this.state_list[i].certificateStateValue === '虚拟') { |
|
|
|
this.$message({ showClose: true, type: 'error', message: '请选择合格证状态为正式且移交状态为待移交的记录进行操作' }) |
|
|
|
return |
|
|
|
} |
|
|
|
} |
|
|
|
const params = { |
|
|
|
orgPath: window.sessionStorage.getItem('defaultOrgPath'), |
|
|
|
transferSid: window.sessionStorage.getItem('userSid'), |
|
|
|
sids: this.sids |
|
|
|
} |
|
|
|
certificateYJ(params).then((res) => { |
|
|
|
if (res.success) { |
|
|
|
this.$message({ showClose: true, type: 'success', message: '移交成功' }) |
|
|
|
this.getList() |
|
|
|
} |
|
|
|
}) |
|
|
|
} |
|
|
|
}, |
|
|
|
// 根据本行ID删除数据 |
|
|
|
doDel() { |
|
|
|
if (this.sids.length > 0) { |
|
|
|