Browse Source

待开票修改

master_hella_20240701
zhaoxuebing 8 months ago
parent
commit
1961a4b711
  1. 10
      src/api/wms/supplierinvoiceInvoiced/index.ts
  2. 44
      src/views/wms/supplierManage/supplierinvoiceInvoiced/index.vue
  3. 2
      src/views/wms/supplierManage/supplierinvoiceInvoiced/supplierinvoiceInvoiced.data.ts

10
src/api/wms/supplierinvoiceInvoiced/index.ts

@ -63,3 +63,13 @@ export const exportSupplierinvoiceInvoiced = async (params) => {
export const importTemplate = () => { export const importTemplate = () => {
return request.download({ url: '/wms/supplierinvoice-invoiced/get-import-template' }) return request.download({ url: '/wms/supplierinvoice-invoiced/get-import-template' })
} }
// 审批通过待开票
export const agreeSupplierinvoiceInvoiced = async (id: number) => {
return await request.post({ url: `/wms/supplierinvoice-invoiced/agree?id=` + id })
}
// 审批拒绝待开票
export const refuseSupplierinvoiceInvoiced = async (id: number) => {
return await request.post({ url: `/wms/supplierinvoice-invoiced/refuse?id=` + id })
}

44
src/views/wms/supplierManage/supplierinvoiceInvoiced/index.vue

@ -33,7 +33,7 @@
</el-button> </el-button>
</template> </template>
<template #action="{ row }"> <template #action="{ row }">
<ButtonBase :Butttondata="butttondata" @button-base-click="buttonTableClick($event,row)" /> <ButtonBase :Butttondata="butttondata(row)" @button-base-click="buttonTableClick($event,row)" />
</template> </template>
</Table> </Table>
</ContentWrap> </ContentWrap>
@ -63,7 +63,6 @@ import { SupplierinvoiceInvoiced,SupplierinvoiceInvoicedRules } from './supplier
import * as SupplierinvoiceInvoicedApi from '@/api/wms/supplierinvoiceInvoiced' import * as SupplierinvoiceInvoicedApi from '@/api/wms/supplierinvoiceInvoiced'
import * as defaultButtons from '@/utils/disposition/defaultButtons' import * as defaultButtons from '@/utils/disposition/defaultButtons'
import TableHead from '@/components/TableHead/src/TableHead.vue' import TableHead from '@/components/TableHead/src/TableHead.vue'
import ImportForm from '@/components/ImportForm/src/ImportForm.vue'
import Detail from '@/components/Detail/src/Detail.vue' import Detail from '@/components/Detail/src/Detail.vue'
defineOptions({ name: 'SupplierinvoiceInvoiced' }) defineOptions({ name: 'SupplierinvoiceInvoiced' })
@ -99,9 +98,7 @@ const { getList, setSearchParams } = tableMethods
// //
const isShowMainButton = (row, val) => { const isShowMainButton = (row, val) => {
console.log("1111111",row.status)
if (val.indexOf(row.status) > -1) { if (val.indexOf(row.status) > -1) {
console.log("1111111")
return false return false
} else { } else {
return true return true
@ -145,7 +142,7 @@ const buttonBaseClick = (val, item) => {
// - // -
const butttondata = (row) =>{ const butttondata = (row) =>{
return [ return [
defaultButtons.mainListEditBtn({hasPermi:'wms:supplierinvoice-invoiced:update'}), // // defaultButtons.mainListEditBtn({hasPermi:'wms:supplierinvoice-invoiced:update'}), //
// defaultButtons.mainListDeleteBtn({hasPermi:'wms:supplierinvoice-invoiced:delete'}), // // defaultButtons.mainListDeleteBtn({hasPermi:'wms:supplierinvoice-invoiced:delete'}), //
// defaultButtons.mainListEditBtn({hasPermi:'wms:supplierinvoice-invoiced:update'}), // defaultButtons.mainListEditBtn({hasPermi:'wms:supplierinvoice-invoiced:update'}),
{ {
@ -175,6 +172,8 @@ const buttonTableClick = async (val, row) => {
openForm('update', row) openForm('update', row)
} else if (val == 'delete') { // } else if (val == 'delete') { //
handleDelete(row.id) handleDelete(row.id)
} else if(val == 'agree'){
handleAgree(row.id)
} }
} }
@ -227,6 +226,41 @@ const handleDelete = async (id: number) => {
} catch {} } 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 exportLoading = ref(false) //
const handleExport = async () => { const handleExport = async () => {

2
src/views/wms/supplierManage/supplierinvoiceInvoiced/supplierinvoiceInvoiced.data.ts

@ -161,7 +161,7 @@ export const SupplierinvoiceInvoiced = useCrudSchemas(reactive<CrudSchema[]>([
field: 'action', field: 'action',
isForm: false, isForm: false,
table: { table: {
width: 150, width: 200,
fixed: 'right' fixed: 'right'
} }
} }

Loading…
Cancel
Save