|
@@ -28,7 +28,7 @@
|
|
|
<div class="table-operator">
|
|
|
<a-button v-if="$hasPermissions('B_sparePartsNew')" id="bulkWarehousingOrderList-add" type="primary" class="button-error" @click="handleAdd">新增</a-button>
|
|
|
<a-button
|
|
|
- v-if="$hasPermissions('B_sparePartsAudit')"
|
|
|
+ v-if="$hasPermissions('B_sparePartsBatchAudit')"
|
|
|
id="bulkWarehousingOrderList-batchAudit"
|
|
|
type="primary"
|
|
|
class="button-warning"
|
|
@@ -49,7 +49,7 @@
|
|
|
:rowKey="(record) => record.sparePartsSn"
|
|
|
:columns="columns"
|
|
|
:data="loadData"
|
|
|
- :scroll="{ x: 1350, y: tableHeight }"
|
|
|
+ :scroll="{ x: 1390, y: tableHeight }"
|
|
|
:defaultLoadData="false"
|
|
|
bordered>
|
|
|
<!-- 入库单号 -->
|
|
@@ -58,6 +58,13 @@
|
|
|
</template>
|
|
|
<!-- 操作 -->
|
|
|
<template slot="action" slot-scope="text, record">
|
|
|
+ <a-button
|
|
|
+ size="small"
|
|
|
+ type="link"
|
|
|
+ v-if="record.state == 'WAIT_AUDIT' && $hasPermissions('B_sparePartsAudit')"
|
|
|
+ class="button-warning"
|
|
|
+ @click="handleAudit(record)"
|
|
|
+ id="allocateBillList-examine-btn">审核</a-button>
|
|
|
<a-button
|
|
|
size="small"
|
|
|
type="link"
|
|
@@ -72,7 +79,7 @@
|
|
|
@click="handleDel(record)"
|
|
|
class="button-error"
|
|
|
id="bulkWarehousingOrderList-del-btn">删除</a-button>
|
|
|
- <span v-if="record.state != 'WAIT_AUDIT'||(!$hasPermissions('B_sparePartsEdit') && !$hasPermissions('B_sparePartsDel'))">--</span>
|
|
|
+ <span v-if="!(record.state == 'WAIT_AUDIT'&&($hasPermissions('B_sparePartsEdit') || $hasPermissions('B_sparePartsDel') || $hasPermissions('B_sparePartsAudit')))">--</span>
|
|
|
</template>
|
|
|
</s-table>
|
|
|
</a-spin>
|
|
@@ -112,7 +119,7 @@ export default {
|
|
|
{ title: '金蝶单号', dataIndex: 'kingdeeNo', width: 150, align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
{ title: '状态', dataIndex: 'stateDictValue', width: 60, align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
{ title: '备注', dataIndex: 'remark', width: 150, align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
|
- { title: '操作', scopedSlots: { customRender: 'action' }, width: 100, align: 'center', fixed: 'right' }
|
|
|
+ { title: '操作', scopedSlots: { customRender: 'action' }, width: 140, align: 'center', fixed: 'right' }
|
|
|
],
|
|
|
selectedRowKeys: [], // Check here to configure the default column
|
|
|
selectedRows: [],
|
|
@@ -141,7 +148,7 @@ export default {
|
|
|
return this.selectedRowKeys.length > 0
|
|
|
},
|
|
|
rowSelection () {
|
|
|
- if (this.$hasPermissions('B_sparePartsAudit')) {
|
|
|
+ if (this.$hasPermissions('B_sparePartsBatchAudit')) {
|
|
|
return {
|
|
|
selectedRowKeys: this.selectedRowKeys,
|
|
|
onChange: (selectedRowKeys, selectedRows) => {
|
|
@@ -244,20 +251,25 @@ export default {
|
|
|
this.queryParam.relationNo = ''
|
|
|
this.$refs.table.refresh(true)
|
|
|
},
|
|
|
- // 批量审核
|
|
|
- handleBatchAudit () {
|
|
|
+ // 单条审核
|
|
|
+ handleAudit (row, isBatch) {
|
|
|
const _this = this
|
|
|
- if (_this.selectedRowKeys.length < 1) {
|
|
|
- _this.$message.warning('请在列表勾选后再进行批量操作!')
|
|
|
- return
|
|
|
+ let content = ''
|
|
|
+ let params = []
|
|
|
+ if (isBatch) { // 批量
|
|
|
+ content = '确认要批量审核吗?'
|
|
|
+ params = row
|
|
|
+ } else { // 单条
|
|
|
+ content = '确认要审核通过吗?'
|
|
|
+ params = [row.sparePartsSn]
|
|
|
}
|
|
|
this.$confirm({
|
|
|
title: '提示',
|
|
|
- content: '确认要批量审核吗?',
|
|
|
+ content: content,
|
|
|
centered: true,
|
|
|
onOk () {
|
|
|
_this.spinning = true
|
|
|
- sparePartsAudit(_this.selectedRowKeys).then(res => {
|
|
|
+ sparePartsAudit(params).then(res => {
|
|
|
if (res.status == 200) {
|
|
|
_this.selectedRowKeys = []
|
|
|
_this.selectedRows = []
|
|
@@ -271,6 +283,14 @@ export default {
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
+ // 批量审核
|
|
|
+ handleBatchAudit () {
|
|
|
+ if (this.selectedRowKeys.length < 1) {
|
|
|
+ this.$message.warning('请在列表勾选后再进行批量操作!')
|
|
|
+ return
|
|
|
+ }
|
|
|
+ this.handleAudit(this.selectedRowKeys, 'batch')
|
|
|
+ },
|
|
|
pageInit () {
|
|
|
const _this = this
|
|
|
this.$nextTick(() => { // 页面渲染完成后的回调
|