更新发票申请

szh-new
sunzehua 4 months ago
parent 42aa4ca14e
commit b5adb9da27

@ -14,14 +14,16 @@
</BasicForm> </BasicForm>
</div> </div>
<div class="ctn-box"> <div class="ctn-box">
<div style="margin-bottom: 10px;">服务项目</div> <a-spin :spinning="serverLoad">
<div class="project-list"> <div style="margin-bottom: 10px;">服务项目</div>
<div @click="handleClickPro(index)" :class="{ active: item.active }" class="project-item" <div class="project-list">
v-for="(item, index) in projectList" :key="index">{{ <div @click="handleClickPro(index)" :class="{ active: item.active }" class="project-item"
item.name }}</div> v-for="(item, index) in projectList" :key="index">{{
</div> item.name }}</div>
</div>
</a-spin>
</div> </div>
<div class="ctn-box" v-if="generationType=='cabin'" > <div class="ctn-box" v-if="generationType == 'cabin'">
<div style="margin-bottom: 10px;">选择箱型</div> <div style="margin-bottom: 10px;">选择箱型</div>
<div class="list"> <div class="list">
<div class="item" v-for="item in CtnList" :key="item.gid"> <div class="item" v-for="item in CtnList" :key="item.gid">
@ -51,7 +53,7 @@
import { ref, watch, onMounted } from 'vue' import { ref, watch, onMounted } from 'vue'
import { BasicModal, useModalInner } from '/@/components/Modal' import { BasicModal, useModalInner } from '/@/components/Modal'
import { BasicForm, useForm } from '/@/components/Form/index' import { BasicForm, useForm } from '/@/components/Form/index'
import { getAvailableCtnsBySlot, CreateBookingOrder, GetEnableProjectDictTreeList,CreateBookingAndSlot } from './api' import { getAvailableCtnsBySlot, CreateBookingOrder, GetEnableProjectDictTreeList, CreateBookingAndSlot } from './api'
import { useMessage } from '/@/hooks/web/useMessage' import { useMessage } from '/@/hooks/web/useMessage'
import { getOptions } from '/@/hooks/dict' import { getOptions } from '/@/hooks/dict'
const { createMessage } = useMessage() const { createMessage } = useMessage()
@ -91,12 +93,12 @@ const formSchema: FormSchema[] = [
}, },
componentProps: ({ formModel }) => { componentProps: ({ formModel }) => {
return { return {
options:[ options: [
{label: '更新订舱', value: 'UPD_BOOKING' }, { label: '更新订舱', value: 'UPD_BOOKING' },
{label: '直接生成舱位和订舱', value: 'GEN_BOOKING_SLOT' }, { label: '直接生成舱位和订舱', value: 'GEN_BOOKING_SLOT' },
{label: '只生成订舱', value: 'GEN_BOOKING' }, { label: '只生成订舱', value: 'GEN_BOOKING' },
{label: '只生成舱位', value: 'GEN_SLOT' }, { label: '只生成舱位', value: 'GEN_SLOT' },
{label: '匹配已有订舱', value: 'GEN_EXIST_BOOKING' } { label: '匹配已有订舱', value: 'GEN_EXIST_BOOKING' }
] ]
} }
}, },
@ -112,8 +114,8 @@ const formSchema: FormSchema[] = [
}, },
componentProps: ({ formModel }) => { componentProps: ({ formModel }) => {
return { return {
options:[ options: [
{label: '是否直接发送邮件给订舱联系人', value: 'isDirectSend' }, { label: '是否直接发送邮件给订舱联系人', value: 'isDirectSend' },
] ]
} }
}, },
@ -438,6 +440,7 @@ const [registerForm, { resetFields, setFieldsValue, getFieldsValue }] = useForm(
schemas: formSchema, schemas: formSchema,
showActionButtonGroup: false, showActionButtonGroup: false,
}) })
const serverLoad = ref(false)
const generationType = ref('') const generationType = ref('')
const taskId = ref('') const taskId = ref('')
const [registerModal, { setModalProps, closeModal }] = useModalInner((data) => { const [registerModal, { setModalProps, closeModal }] = useModalInner((data) => {
@ -451,9 +454,7 @@ const [registerModal, { setModalProps, closeModal }] = useModalInner((data) => {
taskInit() taskInit()
taskId.value = data.taskId taskId.value = data.taskId
} }
}) serverLoad.value = true
const projectList = ref([]) as any
onMounted(() => {
GetEnableProjectDictTreeList({ isAvoidCache: false }).then(res => { GetEnableProjectDictTreeList({ isAvoidCache: false }).then(res => {
if (res.success) { if (res.success) {
if (res.data) { if (res.data) {
@ -465,7 +466,12 @@ onMounted(() => {
} else { } else {
createMessage.error(res.message) createMessage.error(res.message)
} }
serverLoad.value = false
}) })
})
const projectList = ref([]) as any
onMounted(() => {
}) })
function handleClickPro(index) { function handleClickPro(index) {
projectList.value[index].active = !projectList.value[index].active projectList.value[index].active = !projectList.value[index].active
@ -530,7 +536,7 @@ function cabinInit(row) {
} }
// //
function taskInit() { function taskInit() {
setFieldsValue({generateMethod:'GEN_BOOKING'}) setFieldsValue({ generateMethod: 'GEN_BOOKING' })
} }
function handleSave() { function handleSave() {
if (generationType.value === 'cabin') { if (generationType.value === 'cabin') {
@ -581,7 +587,7 @@ function handleSaveCabin() {
}) })
} }
// //
function handleSaveTask(){ function handleSaveTask() {
const projectArr = [] as any const projectArr = [] as any
projectList.value.forEach(item => { projectList.value.forEach(item => {
if (item.active) { if (item.active) {
@ -658,6 +664,7 @@ function handleSaveTask(){
.project-list { .project-list {
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
.project-item { .project-item {
background-color: rgb(255, 255, 255); background-color: rgb(255, 255, 255);
color: rgb(37, 122, 250); color: rgb(37, 122, 250);

@ -31,6 +31,14 @@ export function GetInvoiceCodeList() {
}) })
} }
export function InvoiceApplicationGet(parameter) {
return request({
url: '/feeApi/InvoiceApplication/Get',
method: 'get',
params:parameter
})
}
export function InvoiceApplicationSave(parameter) { export function InvoiceApplicationSave(parameter) {
return request({ return request({
url: '/feeApi/InvoiceApplication/Save', url: '/feeApi/InvoiceApplication/Save',
@ -54,4 +62,28 @@ export function InvoiceApplicationGetFees(parameter) {
method: 'post', method: 'post',
data: parameter, data: parameter,
}) })
}
export function GetTemplateFields(parameter) {
return request({
url: '/feeApi/InvoiceApplication/GetTemplateFields',
method: 'get',
params:parameter
})
}
export function SaveTemplate(parameter) {
return request({
url: '/feeApi/InvoiceApplication/SaveTemplate',
method: 'post',
data: parameter,
})
}
export function GetTemplateList(parameter) {
return request({
url: '/feeApi/InvoiceApplication/GetTemplateList',
method: 'get',
params:parameter
})
} }

@ -275,6 +275,12 @@ export const columns: BasicColumn[] = [
] ]
export const detailForm: FormSchema[] = [ export const detailForm: FormSchema[] = [
{
field: 'id',
label: 'id',
component: 'Input',
show: false,
},
{ {
field: 'applicationNO', field: 'applicationNO',
label: '申请单号', label: '申请单号',
@ -388,7 +394,7 @@ export const detailForm: FormSchema[] = [
}, },
}, },
{ {
field: 'Category', field: 'category',
label: '申请类型', label: '申请类型',
component: 'Select', component: 'Select',
colProps: { span: 4 }, colProps: { span: 4 },
@ -428,8 +434,8 @@ export const detailForm: FormSchema[] = [
{ {
label: '委托单位', label: '委托单位',
field: 'customerId', field: 'customerId',
required: true,
component: 'ApiSelect', component: 'ApiSelect',
required: false,
dynamicDisabled: false, dynamicDisabled: false,
colProps: { span: 4 }, colProps: { span: 4 },
componentProps: ({ formModel }) => { componentProps: ({ formModel }) => {
@ -550,17 +556,13 @@ export const detailForm: FormSchema[] = [
}, },
{ {
field: 'note', field: 'note',
label: '备注', label: '',
component: 'InputTextArea', component: 'InputTextArea',
colProps: { span: 12 }, colProps: { span: 12 },
componentProps: () => { slot: 'note',
return {
autoSize: { minRows: 4, maxRows: 7 }
}
},
}, },
{ {
field: 'note', field: 'invoiceRemark',
label: '开票要求', label: '开票要求',
component: 'InputTextArea', component: 'InputTextArea',
colProps: { span: 12 }, colProps: { span: 12 },

@ -42,7 +42,7 @@
添加 添加
</a-button> </a-button>
</div> </div>
<a-table rowKey="feeId" :row-selection="{ selectedRowKeys: selectedRowKeysDetial, onChange: onSelectChangeDetail }" <a-table rowKey="recordId" :row-selection="{ selectedRowKeys: selectedRowKeysDetial, onChange: onSelectChangeDetail }"
:loading="loading" :columns="columns" :data-source="dataSource" bordered> :loading="loading" :columns="columns" :data-source="dataSource" bordered>
<template v-slot:bodyCell="{ column, record }"> <template v-slot:bodyCell="{ column, record }">
<template v-if="column.dataIndex == 'applyAmount'"> <template v-if="column.dataIndex == 'applyAmount'">
@ -196,22 +196,23 @@ function onSelectChange(selectedRowKeys) {
}) })
}) })
} }
const emits = defineEmits(['updateList'])
function handleAddDetial() { function handleAddDetial() {
const arr = [] as any const arr = [] as any
dataSource.value.forEach(item=>{ dataSource.value.forEach(item=>{
selectedRowKeysDetial.value.forEach(ite=>{ selectedRowKeysDetial.value.forEach(ite=>{
if(item.feeId == ite){ if(item.recordId == ite){
arr.push(item) arr.push(item)
} }
}) })
}) })
const data = { arr.forEach(item=>{
details:arr item.originalCurrency = item.currency
} item.originalAmount = item.applyAmount
InvoiceApplicationSave(data).then(res=>{ item.originalProcessedAmount = item.processedAmount ? item.processedAmount : 0
}) })
emits('updateList', arr)
} }
const selectedRowKeysDetial = ref([]) as any const selectedRowKeysDetial = ref([]) as any
function onSelectChangeDetail(selectedRowKeys) { function onSelectChangeDetail(selectedRowKeys) {

@ -54,7 +54,7 @@
</span> </span>
</div> </div>
</div> </div>
<InvoiceDetails ref="InvoiceDetailsRef"></InvoiceDetails> <InvoiceDetails @updateList="updateList" ref="InvoiceDetailsRef"></InvoiceDetails>
</a-spin> </a-spin>
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
@ -112,7 +112,10 @@ const props = defineProps({
default: '300' default: '300'
} }
}) })
const emits = defineEmits(['updateAmount']) const emits = defineEmits(['updateAmount','updateListSave'])
function updateList(val){
emits('updateListSave',val)
}
// //
const feeDict = ref([]) const feeDict = ref([])
// //

@ -1,53 +1,180 @@
<template> <template>
<div class="main"> <div class="main">
<div> <a-spin :spinning="loading">
<a-button type="link" @click="handleSave" > <i class="iconfont icon-zhcc_tidan"></i>保存</a-button> <div>
<a-button type="link" ><i class="iconfont icon-return"></i>撤销审核</a-button> <a-button type="link" @click="handleSave"> <i class="iconfont icon-zhcc_tidan"></i>保存</a-button>
</div> <a-button type="link"><i class="iconfont icon-return"></i>撤销审核</a-button>
<BasicForm @register="registerForm" /> </div>
<feeTable @updateAmount="updateAmount" ref="feeTableRef"></feeTable> <BasicForm @register="registerForm">
<template #note="{ model, field }">
<div style="display: flex;align-items: center;height: 22px;line-height: 22px;">
备注:
<a-button @click="openTempName" style="margin: 0 15px 0 20px;" type="link"> <i class="icon-a-17Btuichu iconfont"></i>
提取备注</a-button>
<a-button type="link" @click="openTemp"><i class="icon-jichupeizhi iconfont"></i>模板设置</a-button>
</div>
<a-textarea v-model:value="model[field]" :auto-size="{ minRows: 4, maxRows: 7 }" />
</template>
</BasicForm>
<feeTable @updateListSave=updateListSave @updateAmount="updateAmount" ref="feeTableRef"></feeTable>
<a-modal @cancel="open = false" width="700px" :visible="open" title="模板设置" @ok="handleSaveTemp">
<div style="display: flex;">
<div class="label-list">
<div class="label-item" @click="handleAddLabel(item)" v-for="item in labelList"
:key="item.fieldName">{{
item.displayName }}
</div>
</div>
<div style="width: 80%;margin-left: 10px">
<a-textarea style="height: 90%;" v-model:value="tempContent" />
<div style="margin-top: 15px;">
<span>发票备注模板</span>
<el-autocomplete v-model="tempName" style="width: 81%;margin-left: 10px;"
:fetch-suggestions="querySearch" clearable @select="handleSelect" />
</div>
</div>
</div>
</a-modal>
</a-spin>
</div> </div>
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
import { ref, onMounted, unref } from 'vue' import { ref, onMounted, unref } from 'vue'
import { BasicForm, useForm } from '/@/components/Form/index' import { BasicForm, useForm } from '/@/components/Form/index'
import { AutoComplete } from 'ant-design-vue'
import { detailForm } from '../columns' import { detailForm } from '../columns'
import feeTable from './feeTable.vue'; import feeTable from './feeTable.vue';
import { InvoiceApplicationSave } from '../api' import { InvoiceApplicationSave, InvoiceApplicationGet, GetTemplateFields, SaveTemplate, GetTemplateList } from '../api'
import { useMessage } from '/@/hooks/web/useMessage'
import { useRoute } from 'vue-router'
const route = useRoute()
const { createMessage } = useMessage()
const id = ref(route.query.id)
const [registerForm, { resetFields, setFieldsValue, validate }] = useForm({ const [registerForm, { resetFields, setFieldsValue, validate }] = useForm({
labelWidth: 100, labelWidth: 100,
schemas: detailForm, schemas: detailForm,
showActionButtonGroup: false, showActionButtonGroup: false,
}) })
const feeTableRef = ref(null) as any const feeTableRef = ref(null) as any
async function handleSave(){ const open = ref(false)
const values = await validate() async function handleSave() {
const values = await validate()
const data = { const data = {
...values, ...values,
invoiceDetails: feeTableRef.value.list invoiceDetails: feeTableRef.value.list
} }
InvoiceApplicationSave(data).then(res=>{ loading.value = true
InvoiceApplicationSave(data).then(res => {
if (res.succeeded) {
createMessage.success('保存成功')
} else {
createMessage.error(res.message)
}
loading.value = false
}).catch(err => {
loading.value = false
}) })
console.log(feeTableRef.value.list)
} }
function updateAmount(val){ const loading = ref(false)
function updateAmount(val) {
setFieldsValue({ setFieldsValue({
invoiceAmount:val invoiceAmount: val
})
}
const tempContent = ref('')
function handleSaveTemp() {
const data = {
name: tempName.value,
content: tempContent.value,
id: ''
}
if (tempId.value) {
data.id = tempId.value
}
SaveTemplate([data]).then(res => {
if (res.succeeded) {
createMessage.success('保存成功')
GetTemplateList().then(res => {
tempList.value = res.data
tempList.value.forEach(item => {
item.value = item.name
})
})
} else {
createMessage.error(res.message)
}
}) })
} }
onMounted(() => { onMounted(() => {
init() init()
}) })
function init(){ const labelList = ref([]) as any
setFieldsValue({ const tempList = ref([]) as any
statusText:'未提交' function openTemp() {
open.value = true
GetTemplateFields().then(res => {
labelList.value = res.data
})
GetTemplateList().then(res => {
tempList.value = res.data
tempList.value.forEach(item => {
item.value = item.name
})
})
}
function init() {
if (id.value) {
getDetail()
} else {
setFieldsValue({
statusText: '未提交'
})
}
}
function handleAddLabel(val) {
tempContent.value += '[' + val.displayName + ']'
}
function getDetail() {
InvoiceApplicationGet({ id: id.value }).then(res => {
if (res.succeeded) {
setFieldsValue(res.data)
}
}) })
} }
function openTempName(){
}
function updateListSave() {
}
const tempName = ref('')
const tempId = ref('')
const querySearch = (queryString: string, cb: any) => {
cb(tempList.value)
}
function handleSelect(value) {
tempId.value = value.id
tempContent.value = value.content
}
</script> </script>
<style lang="less" scoped > <style lang="less" scoped>
.main{ .main {
padding: 20px; padding: 20px;
padding-top: 5px; padding-top: 5px;
} }
/deep/ .ant-btn-link {
padding: 0px !important;
}
.label-list {
max-height: 400px;
width: 20%;
overflow-y: scroll;
.label-item {
margin-bottom: 5px;
cursor: pointer;
}
}
</style> </style>

@ -8,12 +8,18 @@
<p> <p>
<i class="icon-PC_gangkou iconfont" <i class="icon-PC_gangkou iconfont"
style="color: red;margin-right: 10px;font-size: 16px"></i> style="color: red;margin-right: 10px;font-size: 16px"></i>
截止时间变更通知({{ taskData.carrier }}) 截止时间变更通知({{ carrier }})
</p> </p>
<p>时间{{ taskData.createTime }}</p> <p>时间{{ createTime }}</p>
</div> </div>
<a-table :pagination="false" size="small" :scroll="{ x: 1500, y: 300 }" :columns="columns" <a-table :pagination="false" size="small" :scroll="{ x: 1500, y: 300 }" :columns="columns"
:data-source="taskData" bordered> :data-source="taskData" bordered>
<template #bodyCell="{ column, record }">
<span v-if="column.key === 'bookingId'">
<div v-if="record.bookingId > 0" class="point"></div>
<div v-if="record.bookingId == 0">-</div>
</span>
</template>
</a-table> </a-table>
</div> </div>
</div> </div>
@ -31,6 +37,8 @@ import taskButton from '../components/taskButton.vue'
const { createMessage } = useMessage() const { createMessage } = useMessage()
import { useRoute } from 'vue-router' import { useRoute } from 'vue-router'
const route = useRoute() const route = useRoute()
const carrier = ref('')
const createTime = ref('')
const spinning = ref(false) const spinning = ref(false)
const taskData = ref([]) as any const taskData = ref([]) as any
const taskPKId = ref(route.query.taskPKId) const taskPKId = ref(route.query.taskPKId)
@ -48,14 +56,14 @@ const columns = [
{ {
title: '船名/航次', title: '船名/航次',
dataIndex: 'vessel', dataIndex: 'vessel',
width: 100, width: 150,
key: 'vessel', key: 'vessel',
align: 'center', align: 'center',
}, },
{ {
title: '样单截止时间', title: '样单截止时间',
dataIndex: 'siCutDateTxt', dataIndex: 'siCutDateTxt',
width: 100, width: 150,
key: 'siCutDateTxt', key: 'siCutDateTxt',
align: 'center' align: 'center'
}, },
@ -70,7 +78,7 @@ const columns = [
title: '截港时间', title: '截港时间',
dataIndex: 'cyCutoffTimeTxt', dataIndex: 'cyCutoffTimeTxt',
key: 'cyCutoffTimeTxt', key: 'cyCutoffTimeTxt',
width: 100, width: 150,
align: 'center' align: 'center'
}, },
{ {
@ -88,7 +96,7 @@ const columns = [
{ {
title: 'VGM截止时间', title: 'VGM截止时间',
dataIndex: 'vgmCutoffTimeTxt', dataIndex: 'vgmCutoffTimeTxt',
width: 100, width: 150,
key: 'vgmCutoffTimeTxt', key: 'vgmCutoffTimeTxt',
align: 'center' align: 'center'
}, },
@ -115,8 +123,16 @@ const columns = [
] ]
function getInfo() { function getInfo() {
spinning.value = true
CutDateGetInfoByTaskId({ taskPKId: taskPKId.value }).then(res => { CutDateGetInfoByTaskId({ taskPKId: taskPKId.value }).then(res => {
if (res.succeeded) {
taskData.value = res.data
carrier.value = res.data[0].carrier
createTime.value = res.data[0].noticeDate
} else {
createMessage.error(res.message)
}
spinning.value = false
}) })
} }
@ -130,4 +146,11 @@ function loadingStop() {
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
@import url('./taskStyle.less'); @import url('./taskStyle.less');
.point {
height: 10px;
width: 10px;
border-radius: 50%;
margin: 0 auto;
background: green;
}
</style> </style>

@ -158,6 +158,11 @@ function getInfoBasic(){
if (res.succeeded) { if (res.succeeded) {
if (res.data.length > 0) { if (res.data.length > 0) {
const arr = JSON.parse(res.data[0].content) const arr = JSON.parse(res.data[0].content)
basicList.value.forEach((item,index) => {
arr[index].title = item.title
arr[index].width = item.width
arr[index].dataIndex = item.dataIndex
})
basicList.value = arr basicList.value = arr
} else { } else {
basicList.value.forEach(item => { basicList.value.forEach(item => {

Loading…
Cancel
Save