更新发票申请

szh-new
sunzehua 3 months ago
parent c5cf852a9c
commit 863d1c56d6

@ -104,5 +104,21 @@ export function InvoiceApplicationDelete(parameter) {
})
}
export function ApplyAudit(parameter) {
return request({
url: '/feeApi/InvoiceApplication/ApplyAudit',
method: 'post',
data: parameter,
})
}
export function Withdraw(parameter) {
return request({
url: '/feeApi/InvoiceApplication/Withdraw',
method: 'post',
data: parameter,
})
}

@ -1,6 +1,7 @@
import { ref } from 'vue'
import { BasicColumn, FormSchema } from '/@/components/Table'
import { getOptions } from '/@/hooks/dict'
import { GetClientListByCode } from '/@/api/common'
import dayjs from 'dayjs'
export const businessTypeList = [
{ value: 1, label: '海运出口' },
@ -418,14 +419,14 @@ export const detailForm: FormSchema[] = [
},
},
{
field: 'customerName',
field: 'customer',
label: '委托单位',
component: 'Input',
show: false,
colProps: { span: 12 },
},
{
field: 'customer',
field: 'customerId',
label: '委托单位',
component: 'Input',
show: false,
@ -433,28 +434,20 @@ export const detailForm: FormSchema[] = [
},
{
label: '委托单位',
field: 'customerId',
field: 'customerName',
required: true,
component: 'ApiSelect',
dynamicDisabled: false,
colProps: { span: 4 },
componentProps: ({ formModel }) => {
return {
allowClear: true,
showSearch: true,
api: () => {
return new Promise((resolve) => {
const arr = getOptions('controller')
resolve(arr)
})
},
labelField: 'name',
valueField: 'id',
api: GetClientListByCode,
params: { code: 'controller' },
labelField: 'pinYinCode',
valueField: 'shortName',
showName: 'shortName',
resultField: 'data',
filterOption: (input: string, option: any) => {
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
},
immediate: false,
onChange: (e, obj) => {
if (obj) {
const queryStr = [{
@ -476,7 +469,7 @@ export const detailForm: FormSchema[] = [
})
bankList.value = res.data
})
formModel.customerName = obj.label
formModel.customerId = obj.id
customerList.value.forEach(item => {
if (item.id == e) {
formModel.customer = item
@ -486,7 +479,7 @@ export const detailForm: FormSchema[] = [
if (!obj && !e) {
bankList.value = []
formModel.customer = {}
formModel.customerName = ''
formModel.customerId = ''
}
},
}

@ -1,15 +1,10 @@
<template>
<div>
<div class="topTable">
<BasicTable
class="ds-table"
@register="registerTable"
@row-dbClick="
(e) => {
<BasicTable class="ds-table" @register="registerTable" @row-dbClick="(e) => {
GoDetailed(true, e)
}
"
>
">
<template #tableTitle>
<div class="buttonGroup">
<a-button v-repeat type="link">
@ -20,11 +15,11 @@
<span class="iconfont icon-locksuo IconColor"></span>
导出EXCEL
</a-button>
<a-button v-repeat type="link">
<a-button @click="handleApply" v-repeat type="link">
<span class="iconfont icon-locksuo IconColor"></span>
提交审核
</a-button>
<a-button v-repeat type="link">
<a-button @click="handleWithdraw" v-repeat type="link">
<span class="iconfont icon-locksuo IconColor"></span>
撤销审核
</a-button>
@ -35,12 +30,7 @@
<span class="iconfont icon-new_document"></span>
添加
</a-button>
<a-popconfirm
title="确定删除当前选中数据?"
ok-text="是"
cancel-text="否"
@confirm="FnDel"
>
<a-popconfirm title="确定删除当前选中数据?" ok-text="" cancel-text="" @confirm="FnDel">
<a-button type="link">
<span class="iconfont icon-shanchu21"></span>
删除
@ -53,8 +43,7 @@
</template>
<template v-slot:bodyCell="{ column, record }">
<template v-if="column.key === 'action'">
<TableAction
:actions="[
<TableAction :actions="[
{
icon: 'clarity:note-edit-line',
tooltip: '编辑',
@ -62,8 +51,7 @@
GoDetailed(true, record)
},
},
]"
/>
]" />
</template>
</template>
</BasicTable>
@ -81,24 +69,24 @@
</div>
</template>
<script lang="ts" setup>
import { ref } from 'vue'
import { GetList,InvoiceApplicationDelete} from './api.js'
import { BasicTable, useTable, TableAction } from '/@/components/Table'
import { columns, searchFormSchema, billTypeData } from './columns'
import { GetOpenPrintModuleList } from '/@/views/operation/seaexport/api/BookingLedger.js'
import * as XLSX from 'xlsx'
import DsPrint from '/@/components/Print/index.vue'
import { useMessage } from '/@/hooks/web/useMessage'
const { notification } = useMessage()
const { createMessage } = useMessage()
import { useGo } from '/@/hooks/web/usePage'
const go = useGo()
//
import { formatParams } from '/@/hooks/web/common'
import { useAppStore } from '/@/store/modules/app'
const appStore = useAppStore()
//
const [registerTable, { reload, getPaginationRef, getSelectRows, getRawDataSource }] = useTable({
import { ref } from 'vue'
import { GetList, InvoiceApplicationDelete, Withdraw, ApplyAudit } from './api.js'
import { BasicTable, useTable, TableAction } from '/@/components/Table'
import { columns, searchFormSchema, billTypeData } from './columns'
import { GetOpenPrintModuleList } from '/@/views/operation/seaexport/api/BookingLedger.js'
import * as XLSX from 'xlsx'
import DsPrint from '/@/components/Print/index.vue'
import { useMessage } from '/@/hooks/web/useMessage'
const { notification } = useMessage()
const { createMessage } = useMessage()
import { useGo } from '/@/hooks/web/usePage'
const go = useGo()
//
import { formatParams } from '/@/hooks/web/common'
import { useAppStore } from '/@/store/modules/app'
const appStore = useAppStore()
//
const [registerTable, { reload, getPaginationRef, getSelectRows, getRawDataSource }] = useTable({
title: '',
api: async (p) => {
const res: API.DataResult = await GetList(p)
@ -134,31 +122,68 @@
dataIndex: 'action',
fixed: 'right',
},
})
//
function GoDetailed(type, data) {
})
//
function GoDetailed(type, data) {
if (type) {
go(`/invoiceapplyDetail?id=${data.id}`)
} else {
go(`/invoiceapplyDetail`)
}
}
//
function FnDel() {
const ids = getSelectRows().map((item) => {
}
//
function FnDel() {
let ids = []
ids = getSelectRows().map((item) => {
return item.id
})
InvoiceApplicationDelete({ids:ids}).then(res=>{
if(res.succeeded){
if (ids.length == 0) {
createMessage.error('请选择要删除的数据')
return false
}
InvoiceApplicationDelete({ ids: ids }).then(res => {
if (res.succeeded) {
createMessage.success('删除成功')
reload()
}
})
}
function handleApply() {
let ids = []
ids = getSelectRows().map((item) => {
return item.id
})
if (ids.length == 0) {
createMessage.error('请选择数据')
return false
}
ApplyAudit({ ids: ids }).then(res => {
if (res.succeeded) {
createMessage.success('操作成功')
reload()
}
})
}
function handleWithdraw() {
let ids = []
ids = getSelectRows().map((item) => {
return item.id
})
if (ids.length == 0) {
createMessage.error('请选择数据')
return false
}
Withdraw({ ids: ids }).then(res => {
if (res.succeeded) {
createMessage.success('操作成功')
reload()
}
})
}
// EXCEL
function ExportExcel() {
// EXCEL
function ExportExcel() {
let Data: any = []
let DelData = ['id', 'bsno', 'ctnCode']
getRawDataSource().forEach((item, index) => {
@ -208,22 +233,22 @@
URL.revokeObjectURL(url)
document.body.removeChild(a)
}, 0)
}
// ArrayBuffer
function s2ab(s) {
}
// ArrayBuffer
function s2ab(s) {
const buf = new ArrayBuffer(s.length)
const view = new Uint8Array(buf)
for (let i = 0; i !== s.length; ++i) view[i] = s.charCodeAt(i) & 0xff
return buf
}
const dsPrint = ref()
//
async function printFee() {
}
const dsPrint = ref()
//
async function printFee() {
dsPrint.value.init()
}
}
</script>
<style lang="less" scoped>
.topTable {
.topTable {
height: calc(100vh - 145px);
}
}
</style>

Loading…
Cancel
Save