|
|
@ -33,7 +33,7 @@ |
|
|
|
</el-button> |
|
|
|
</template> |
|
|
|
<template #action="{ row }"> |
|
|
|
<ButtonBase :Butttondata="butttondata" @button-base-click="buttonTableClick($event,row)" /> |
|
|
|
<ButtonBase :Butttondata="butttondata(row)" @button-base-click="buttonTableClick($event,row)" /> |
|
|
|
</template> |
|
|
|
</Table> |
|
|
|
</ContentWrap> |
|
|
@ -63,7 +63,6 @@ import { SupplierinvoiceInvoiced,SupplierinvoiceInvoicedRules } from './supplier |
|
|
|
import * as SupplierinvoiceInvoicedApi from '@/api/wms/supplierinvoiceInvoiced' |
|
|
|
import * as defaultButtons from '@/utils/disposition/defaultButtons' |
|
|
|
import TableHead from '@/components/TableHead/src/TableHead.vue' |
|
|
|
import ImportForm from '@/components/ImportForm/src/ImportForm.vue' |
|
|
|
import Detail from '@/components/Detail/src/Detail.vue' |
|
|
|
|
|
|
|
defineOptions({ name: 'SupplierinvoiceInvoiced' }) |
|
|
@ -99,9 +98,7 @@ const { getList, setSearchParams } = tableMethods |
|
|
|
|
|
|
|
// 根据状态返回该按钮是否显示 |
|
|
|
const isShowMainButton = (row, val) => { |
|
|
|
console.log("1111111",row.status) |
|
|
|
if (val.indexOf(row.status) > -1) { |
|
|
|
console.log("1111111") |
|
|
|
return false |
|
|
|
} else { |
|
|
|
return true |
|
|
@ -145,7 +142,7 @@ const buttonBaseClick = (val, item) => { |
|
|
|
// 列表-操作按钮 |
|
|
|
const butttondata = (row) =>{ |
|
|
|
return [ |
|
|
|
defaultButtons.mainListEditBtn({hasPermi:'wms:supplierinvoice-invoiced:update'}), // 编辑 |
|
|
|
// defaultButtons.mainListEditBtn({hasPermi:'wms:supplierinvoice-invoiced:update'}), // 编辑 |
|
|
|
// defaultButtons.mainListDeleteBtn({hasPermi:'wms:supplierinvoice-invoiced:delete'}), // 删除 |
|
|
|
// defaultButtons.mainListEditBtn({hasPermi:'wms:supplierinvoice-invoiced:update'}), |
|
|
|
{ |
|
|
@ -175,6 +172,8 @@ const buttonTableClick = async (val, row) => { |
|
|
|
openForm('update', row) |
|
|
|
} else if (val == 'delete') { // 删除 |
|
|
|
handleDelete(row.id) |
|
|
|
} else if(val == 'agree'){ |
|
|
|
handleAgree(row.id) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
@ -227,6 +226,41 @@ const handleDelete = async (id: number) => { |
|
|
|
} catch {} |
|
|
|
} |
|
|
|
|
|
|
|
/** 审批通过按钮操作 */ |
|
|
|
const handleAgree = async (id : number) => { |
|
|
|
try { |
|
|
|
// 审批通过的二次确认 |
|
|
|
await message.confirm('是否审批通过所选中数据?') |
|
|
|
tableObject.loading = true |
|
|
|
// 发起审批通过 |
|
|
|
await SupplierinvoiceInvoicedApi.agreeSupplierinvoiceInvoiced(id) |
|
|
|
message.success(t('审批通过成功!')) |
|
|
|
tableObject.loading = false |
|
|
|
// 刷新列表 |
|
|
|
await getList() |
|
|
|
} catch { }finally{ |
|
|
|
tableObject.loading = false |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** 审批通过按钮操作 */ |
|
|
|
const handleRefuse = async (id : number) => { |
|
|
|
try { |
|
|
|
// 审批通过的二次确认 |
|
|
|
await message.confirm('是否审批拒绝所选中数据?') |
|
|
|
tableObject.loading = true |
|
|
|
// 发起审批通过 |
|
|
|
await SupplierinvoiceInvoicedApi.refuseSupplierinvoiceInvoiced(id) |
|
|
|
message.success(t('审批成功!')) |
|
|
|
tableObject.loading = false |
|
|
|
// 刷新列表 |
|
|
|
await getList() |
|
|
|
} catch { }finally{ |
|
|
|
tableObject.loading = false |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
/** 导出按钮操作 */ |
|
|
|
const exportLoading = ref(false) // 导出的加载中 |
|
|
|
const handleExport = async () => { |
|
|
|