szh-new
张同海 5 months ago
commit 9bafebac15

@ -147,7 +147,7 @@ export function GetFeeCurrencySelectList() {
method: 'get' method: 'get'
}) })
} }
// 获取币别下拉列表 (Auth) // 获取结算单位下拉列表 (Auth)
export function GetClientListByCode(params) { export function GetClientListByCode(params) {
return request<DataResult>({ return request<DataResult>({
url: Api.GetClientListByCode, url: Api.GetClientListByCode,

@ -16,7 +16,8 @@ enum Api {
Withdraw = '/feeApi/FeeRecord/Withdraw', Withdraw = '/feeApi/FeeRecord/Withdraw',
ApplyModification = '/feeApi/FeeRecord/ApplyModification', ApplyModification = '/feeApi/FeeRecord/ApplyModification',
ApplyDeletion = '/feeApi/FeeRecord/ApplyDeletion', ApplyDeletion = '/feeApi/FeeRecord/ApplyDeletion',
GetPrintInfo = '/feeApi/FeeRecord/GetPrintInfo' GetPrintInfo = '/feeApi/FeeRecord/GetPrintInfo',
GetFees = '/feeApi/PaymentApplication/GetFees'
} }
// 列表 (Auth) // 列表 (Auth)
export function GetList(data: PageRequest) { export function GetList(data: PageRequest) {
@ -105,3 +106,11 @@ export function ApplyDeletion(data: PageRequest) {
data data
}) })
} }
// 根据业务编号及类型获取关联费用记录 (Auth)
export function GetFees(data: PageRequest) {
return request<DataResult>({
url: Api.GetFees,
method: 'post',
data
})
}

@ -61,3 +61,73 @@ export const feeColumns = [
dataIndex: 'feeEnName' dataIndex: 'feeEnName'
} }
] ]
// 费用申请的费用列
export const feeApplyColumns = [
{
title: '客户名称',
width: 150,
dataIndex: 'customerName'
}, {
title: '收付',
width: 80,
dataIndex: 'feeType',
customRender: ({ record }) => {
if (record.feeType == 1) {
return "收款"
} else if (record.feeType == 2) {
return "付款"
} else {
return '-'
}
}
}, {
title: '费用名称',
width: 150,
dataIndex: 'feeName'
}, {
title: '金额',
width: 100,
dataIndex: 'amount'
}, {
title: '币别',
width: 100,
dataIndex: 'currency'
}, {
title: '未结金额',
width: 100,
dataIndex: 'restAmount'
}, {
title: '本次申请金额',
width: 130,
dataIndex: 'applyAmount'
}, {
title: '原始汇率',
width: 100,
dataIndex: 'originalRate'
}, {
title: '开票金额',
width: 100,
dataIndex: 'invoiceAmount'
}, {
title: '备注',
width: 150,
dataIndex: 'remark'
}, {
title: '所属分部',
width: 120,
dataIndex: 'saleDeptName'
}, {
title: '录入人',
width: 120,
dataIndex: 'createByName'
}, {
title: '进项/销项税率',
width: 130,
dataIndex: 'taxRate'
}, {
title: '录入方式',
width: 120,
dataIndex: 'inputMethod'
},
]

@ -6,93 +6,55 @@
<template> <template>
<div class="ds-fee-table"> <div class="ds-fee-table">
<a-table <a-table
:loading="loading"
:row-selection="{ selectedRowKeys: state.infoRowKeys, onChange: infoChange }" :row-selection="{ selectedRowKeys: state.infoRowKeys, onChange: infoChange }"
rowKey="id" rowKey="id"
:scroll="{ x: '100%', y: 300 }" :scroll="{ x: '100%', y: 300 }"
:columns="feeColumns" :columns="nowFeeColumns"
:data-source="feeData" :data-source="feeData"
:pagination="false" :pagination="false"
:customRow="onRowClick" :customRow="onRowClick"
/> >
<template #bodyCell="{ column, record }">
<template v-if="column.dataIndex === 'applyAmount'">
<a-input-number
v-model:value="record.applyAmount"
@change="amountChange($event, record)"
:min="0"
:step="0.000001"
string-mode
/>
</template>
</template>
</a-table>
<!-- 费用申请显示币别合计 -->
<div v-if="page == 'apply'">
选中金额<span v-for="(value, key) in currencyList" class="ml10" :key="value">{{ key }}: {{ value }}</span>
</div>
</div> </div>
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
import { defineEmits, defineProps, ref, reactive, onMounted, defineExpose, watchEffect } from 'vue' import { ref, reactive, defineExpose, watch } from 'vue'
import { useMessage } from '/@/hooks/web/useMessage'
import { BasicTable, useTable } from '/@/components/Table'
//
import { columns, searchFormSchema } from './history'
// //
import { feeColumns } from './feeColumns' import { feeColumns, feeApplyColumns } from './feeColumns'
import { feeStatusList } from '../columns'
// id // id
import { GetList } from '../api' import { GetList, GetFees } from '../api'
// id // id
import { GetFeeTemplateDetailList } from '/@/views/fee/template/api' import { GetFeeTemplateDetailList } from '/@/views/fee/template/api'
import { PageDataByBooking } from '/@/views/operation/seaexport/api/bookingLedger.js' import { number } from 'vue-types'
import { feeStatusList } from '../columns'
const { createMessage } = useMessage()
const [registerTable, { reload, getForm, getPaginationRef }] = useTable({
api: async (p) => {
const res: API.DataResult = await PageDataByBooking(p)
console.log(res)
return new Promise((resolve) => {
resolve({ data: [...res.data], total: res.count })
})
},
beforeFetch: () => {
var currentPageInfo: any = getPaginationRef()
var data = getForm().getFieldsValue()
const postParam: API.PageRequest = {
queryCondition: '',
pageCondition: {
pageIndex: currentPageInfo.current,
pageSize: currentPageInfo.pageSize,
sortConditions: [],
},
}
let condition: API.ConditionItem[] = []
if (!!data.UserName) {
condition.push({
FieldName: 'UserName',
FieldValue: data.UserName,
ConditionalType: 1,
})
}
if (!!data.UserCode) {
condition.push({
FieldName: 'UserCode',
FieldValue: data.UserCode,
ConditionalType: 1,
})
}
postParam.queryCondition = JSON.stringify(condition)
// console.log(postParam);
return postParam
},
columns,
formConfig: {
labelWidth: 120,
schemas: searchFormSchema
},
isTreeTable: false,
pagination: true,
striped: true,
useSearchForm: true,
showTableSetting: false,
bordered: true,
showIndexColumn: true,
canResize: false
})
// //
const state = reactive({ const state = reactive({
infoRowKeys: [] infoRowKeys: []
}) })
const nowFeeColumns = ref([])
// //
const list = ref([]) const list = ref([])
// //
const feeData = ref([]) const selectfeeData = ref([])
const loading = ref(false)
// id // id
const getFeeListByTem = (id) => { const getFeeListByTem = async (id) => {
const postData = { const postData = {
pageCondition: { pageCondition: {
pageIndex: 1, pageIndex: 1,
@ -103,7 +65,9 @@
{ FieldName: 'TemplateId', FieldValue: id, ConditionalType: 1 } { FieldName: 'TemplateId', FieldValue: id, ConditionalType: 1 }
]) ])
} }
GetFeeTemplateDetailList(postData).then(res => { loading.value = true
await GetFeeTemplateDetailList(postData).then(res => {
loading.value = false
const { data } = res const { data } = res
data.forEach((item, index) => { data.forEach((item, index) => {
item['feeStatusText'] = feeStatusList[item.feeStatus] item['feeStatusText'] = feeStatusList[item.feeStatus]
@ -114,8 +78,32 @@
}).catch(() => { }).catch(() => {
}) })
} }
//
const amountChange = (e, row) => {
row.amount = Number(e * row.originalRate).toFixed(6)
}
// (Auth)
const getFees = async (id, businessType) => {
const postData = [{
id,
businessType
}]
loading.value = true
await GetFees(postData).then(res => {
const { data } = res
loading.value = false
data.items.forEach((item, index) => {
item['feeStatusText'] = feeStatusList[item.feeStatus]
item['id'] = item.recordId
if (item.createTime) item.createTime = item.createTime.split(' ')[0]
if (item.auditDate) item.auditDate = item.auditDate.split(' ')[0]
})
feeData.value = data.items
}).catch(() => {
})
}
// id // id
const getFeeList = (id) => { const getFeeList = async (id) => {
const postData = { const postData = {
pageCondition: { pageCondition: {
pageIndex: 1, pageIndex: 1,
@ -127,8 +115,10 @@
{ FieldName: 'FeeType', FieldValue: 1, ConditionalType: 1 } { FieldName: 'FeeType', FieldValue: 1, ConditionalType: 1 }
]) ])
} }
GetList(postData).then(res => { loading.value = true
await GetList(postData).then(res => {
const { data } = res const { data } = res
loading.value = false
data.forEach((item, index) => { data.forEach((item, index) => {
item['feeStatusText'] = feeStatusList[item.feeStatus] item['feeStatusText'] = feeStatusList[item.feeStatus]
if (item.createTime) item.createTime = item.createTime.split(' ')[0] if (item.createTime) item.createTime = item.createTime.split(' ')[0]
@ -138,61 +128,111 @@
}).catch(() => { }).catch(() => {
}) })
} }
let currencyList = reactive({})
const feeData = ref([])
// //
const infoChange = (v) => { const infoChange = (v) => {
state.infoRowKeys = v state.infoRowKeys = v
list.value = [] list.value = []
currencyList = {}
selectfeeData.value = []
const feeCopy = JSON.parse(JSON.stringify(feeData.value)) const feeCopy = JSON.parse(JSON.stringify(feeData.value))
v.forEach(item => { v.forEach(item => {
feeCopy.forEach(row => { feeCopy.forEach(row => {
if (item == row.id) { if (item == row.id) {
row.id = '' selectfeeData.value.push(row)
row.feeStatus = 1 if (page.value != 'apply') {
row['feeStatusText'] = '录入状态' row.id = ''
list.value.push(row) row.feeStatus = 1
row['feeStatusText'] = '录入状态'
list.value.push(row)
}
if (currencyList[row.currency]) {
currencyList[row.currency] = currencyList[row.currency] + Number(row.amount) || 0
} else {
currencyList[row.currency] = row.amount
}
} }
}) })
}) })
} }
const init = (ids, source) => { const page = ref()
const init = async (ids, source, businessType) => {
page.value = source
if (ids.length) { if (ids.length) {
if (ids[0] == undefined) { if (ids[0] == undefined) {
nowFeeColumns.value = feeColumns
feeData.value = [] feeData.value = []
return return
} }
if (source == 'history') { if (source == 'history') {
getFeeList(ids[0]) nowFeeColumns.value = feeColumns
await getFeeList(ids[0])
return feeData.value
} }
if (source == 'tem') { if (source == 'tem') {
getFeeListByTem(ids[0]) nowFeeColumns.value = feeColumns
await getFeeListByTem(ids[0])
return feeData.value
}
if (source == 'apply') {
nowFeeColumns.value = feeApplyColumns
await getFees(ids[0], businessType)
return feeData.value
} }
} }
} }
const onRowClick = (record, index) => { const onRowClick = (record, index) => {
return { return {
onClick: () => { onClick: () => {
// setTimeout(() => {
const newSelectedRowKeys = [...state.infoRowKeys]; //
if (newSelectedRowKeys.includes(record.id)) { console.log(state.infoRowKeys)
newSelectedRowKeys.splice(newSelectedRowKeys.indexOf(record.id), 1); const newSelectedRowKeys = [...state.infoRowKeys];
} else { if (newSelectedRowKeys.includes(record.id)) {
newSelectedRowKeys.push(record.id); newSelectedRowKeys.splice(newSelectedRowKeys.indexOf(record.id), 1);
} } else {
state.infoRowKeys = newSelectedRowKeys newSelectedRowKeys.push(record.id);
}
list.value = []
currencyList = {}
const feeCopy = JSON.parse(JSON.stringify(feeData.value))
newSelectedRowKeys.forEach(item => {
feeCopy.forEach(row => {
if (item == row.id) {
selectfeeData.value.push(row)
if (page.value != 'apply') {
row.id = ''
row.feeStatus = 1
row['feeStatusText'] = '录入状态'
list.value.push(row)
}
if (currencyList[row.currency]) {
currencyList[row.currency] = currencyList[row.currency] + Number(row.amount) || 0
} else {
currencyList[row.currency] = row.amount
}
}
})
})
state.infoRowKeys = newSelectedRowKeys
}, 100)
console.log(state.infoRowKeys) console.log(state.infoRowKeys)
} }
} }
} }
defineExpose({ defineExpose({
list, list,
feeData, feeData,
init init,
selectfeeData
}) })
</script> </script>
<style lang="scss"> <style lang="scss">
.ds-fee-table { .ds-fee-table {
padding: 0 20px; padding: 0;
.ant-table-cell { .ant-table-cell {
padding: 5px 12px; padding: 5px 12px;
} }

@ -146,6 +146,9 @@
// //
const openFileModel = () => { const openFileModel = () => {
if (!props.id) {
return createMessage.warning('未检索到业务id请先保存数据')
}
init() init()
} }
const fileForm = ref(null) const fileForm = ref(null)

@ -105,7 +105,9 @@
color: #262626!important; color: #262626!important;
} }
} }
.ant-table-cell {
font-size: 12px;
}
.ds-approve-mian-action-bar { .ds-approve-mian-action-bar {
.ant-btn-link, .ant-checkbox-wrapper { .ant-btn-link, .ant-checkbox-wrapper {
@ -140,6 +142,7 @@
} }
.ant-picker { .ant-picker {
height: 28px; height: 28px;
width: 100%;
} }
.ant-btn { .ant-btn {
height: 30px; height: 30px;

@ -23,7 +23,8 @@ import {
GetFactorySelectList, GetFactorySelectList,
} from '/@/views/operation/seaexport/api/BookingLedger' } from '/@/views/operation/seaexport/api/BookingLedger'
import { getList } from '/@/views/flowcenter/flowInstances/api' import { getList } from '/@/views/flowcenter/flowInstances/api'
import { GetFeeCurrencySelectList } from '/@/api/common/index' import { GetFeeCurrencySelectList, GetClientListByCode } from '/@/api/common/index'
import { getClientBankList } from '/@/views/baseinfo/infoclient/api'
export default { export default {
// 业务来源 // 业务来源
GetClientSourceSelectList: () => { GetClientSourceSelectList: () => {
@ -127,6 +128,18 @@ export default {
return res.data return res.data
}) })
}, },
// 结算单位
GetClientListByCode: () => {
return GetClientListByCode().then((res) => {
return res.data
})
},
// 银行信息
getClientBankList: () => {
return getClientBankList().then((res) => {
return res.data
})
},
//派车调度人员 //派车调度人员
GetDispatcherList: () => { GetDispatcherList: () => {
return GetDispatcherList().then((res) => { return GetDispatcherList().then((res) => {
@ -138,5 +151,5 @@ export default {
return GetFactorySelectList().then((res) => { return GetFactorySelectList().then((res) => {
return res.data return res.data
}) })
}, }
} }

@ -42,8 +42,12 @@ export const useOptionsStore = defineStore({
GetFeeCurrencySelectList: null, GetFeeCurrencySelectList: null,
// 用户表 // 用户表
GetUserList: null, GetUserList: null,
// 币别 // 车队
GetTruckClientList: null, GetTruckClientList: null,
// 结算单位/结算对象
GetClientListByCode: null,
// 银行信息
getClientBankList: null,
// 派车调度人员 // 派车调度人员
GetDispatcherList:null, GetDispatcherList:null,
// 工厂 // 工厂

@ -82,7 +82,7 @@ export function getClientBankList(parameter) {
queryCondition: JSON.stringify([ queryCondition: JSON.stringify([
{ {
FieldName: 'ClientId', FieldName: 'ClientId',
FieldValue: parameter.clientId, FieldValue: parameter?.clientId || '',
ConditionalType: 1, ConditionalType: 1,
}, },
]), ]),

@ -9,7 +9,10 @@ import { DataResult, PageRequest } from '/@/api/model/baseModel'
enum Api { enum Api {
list = '/feeApi/PaymentApplication/GetList', list = '/feeApi/PaymentApplication/GetList',
edit = '/feeApi/FeeCurrency/EditFeeCurrency', edit = '/feeApi/FeeCurrency/EditFeeCurrency',
info = '/feeApi/FeeCurrency/GetFeeCurrencyInfo' info = '/feeApi/FeeCurrency/GetFeeCurrencyInfo',
GetBizList = '/feeApi/PaymentApplication/GetBizList',
Save = '/feeApi/PaymentApplication/Save',
Get = '/feeApi/PaymentApplication//Get'
} }
// 列表 (Auth) // 列表 (Auth)
export function GetList(data: PageRequest) { export function GetList(data: PageRequest) {
@ -35,3 +38,27 @@ export function getFeeCurrencyInfo(query) {
params: query params: query
}) })
} }
// 获取待付费的业务列表
export function GetBizList(data: PageRequest) {
return request<DataResult>({
url: Api.GetBizList,
method: 'post',
data
})
}
// 提交申请单
export function Save(data: PageRequest) {
return request<DataResult>({
url: Api.Save,
method: 'post',
data
})
}
// 获取申请单详情
export function Get(query) {
return request<DataResult>({
url: Api.Get,
method: 'get',
params: query
})
}

@ -303,4 +303,3 @@ export const searchFormSchema: FormSchema[] = [
} }
}, },
] ]

@ -5,7 +5,7 @@
--> -->
<template> <template>
<div class="ds-table-action-bar"> <div class="ds-table-action-bar">
<div class="nav" @click="addBooking"> <div class="nav" @click="create">
<i class="iconfont icon-jiahao2fill"></i>新建 <i class="iconfont icon-jiahao2fill"></i>新建
</div> </div>
<div class="nav"> <div class="nav">
@ -50,9 +50,8 @@
} }
}) })
// //
function addBooking() { function create() {
const addNum = Math.round(Math.random() * 1000) go(`/paid-apply/create`)
go(`/BookingDetail?addNum=${addNum}`)
} }
// //
function copyBooking() { function copyBooking() {

@ -0,0 +1,416 @@
/*
* @Description: tsx
* @Author: lijj
* @Date: 2024-04-25 15:48:33
*/
import { ref, h, ComponentOptions, resolveComponent } from 'vue'
import { BasicColumn, FormSchema } from '/@/components/Table'
import { useOptionsStore } from '/@/store/modules/options'
const optionsStore = useOptionsStore()
// 引入字典数据
import { getDictOption } from '/@/utils/dictUtil'
// 业务表格列
export const businessColumns: BasicColumn[] = [
{
title: '委托编号',
dataIndex: 'customerNo',
width: 120,
align: 'left'
},
{
title: '主提单号',
dataIndex: 'mblno',
width: 120,
align: 'left'
},
{
title: '结算单位',
dataIndex: 'customerName',
width: 150,
align: 'left'
},
{
title: 'RMB未付',
dataIndex: 'unpaidRMB',
width: 120,
align: 'left'
},
{
title: 'USD未付',
dataIndex: 'unpaidUSD',
width: 120,
align: 'left'
},
{
title: '其他未付',
dataIndex: 'unpaidOther',
width: 120,
align: 'left'
},
{
title: 'RMB未收',
dataIndex: 'unpaidOther',
width: 120,
align: 'left'
},
{
title: 'USD未收',
dataIndex: 'unpaidOther',
width: 120,
align: 'left'
},
{
title: '其他未收',
dataIndex: 'unpaidOther',
width: 120,
align: 'left'
},
{
title: '订舱编号',
dataIndex: 'unpaidOther',
width: 120,
align: 'left'
},
{
title: 'RMB付未开票',
dataIndex: 'unBilledRMB',
width: 120,
align: 'left'
},
{
title: 'USD付未开票',
dataIndex: 'unBilledUSD',
width: 120,
align: 'left'
},
{
title: '合计未收',
dataIndex: 'unreceivedTotal',
width: 120,
align: 'left'
},
{
title: '业务类别',
dataIndex: 'businessType',
width: 120,
align: 'left'
},
{
title: '分提单号',
dataIndex: 'hblno',
width: 120,
align: 'left'
},
{/////////////
title: '委托单位',
dataIndex: 'unreceivedTotal',
width: 120,
align: 'left'
},
{
title: '开船日期',
dataIndex: 'etd',
width: 120,
align: 'left'
},
{
title: '揽货人',
dataIndex: 'saleName',
width: 120,
align: 'left'
},
{
title: '更改单',
dataIndex: 'changeOrder',
width: 120,
align: 'left'
},
{/////////////
title: '会计日期',
dataIndex: 'changeOrder',
width: 120,
align: 'left'
},
{
title: '操作',
dataIndex: 'operator',
width: 120,
align: 'left'
},
{
title: '集装箱',
dataIndex: 'cntrTotal',
width: 120,
align: 'left'
},
{////////////////
title: 'RMB收费状态',
dataIndex: 'cntrTotal',
width: 120,
align: 'left'
},
{//////////////////
title: 'USD收费状态',
dataIndex: 'cntrTotal',
width: 120,
align: 'left'
},
{
title: '起运港',
dataIndex: 'loadPort',
width: 120,
align: 'left'
},
{
title: '卸货港',
dataIndex: 'dischargePort',
width: 120,
align: 'left'
},
{
title: '船名',
dataIndex: 'vessel',
width: 120,
align: 'left'
},
{
title: '航次',
dataIndex: 'voyage',
width: 120,
align: 'left'
},
{
title: '结费方式',
dataIndex: 'stlName',
width: 120,
align: 'left'
}
]
export const formSchema: FormSchema[] = [
{
field: 'applicationNO',
label: '申请编号',
component: 'Input',
dynamicDisabled: true,
colProps: { span: 3 },
// render: ({ model, field }) => {
// return h(resolveComponent('span') as ComponentOptions, {
// value: model[field]
// })
// }
},
{
field: 'statusText',
label: '状态',
component: 'Input',
dynamicDisabled: true,
colProps: { span: 3 },
// render: ({ model, field }) => {
// return h(resolveComponent('span') as ComponentOptions, {
// value: model[field]
// })
// }
},
{
field: 'customerId',
label: '结算对象',
component: 'ApiSelect',
required: false,
dynamicDisabled: false,
colProps: { span: 3 },
componentProps: () => {
return {
option: optionsStore.getOptionsByCode('GetClientListByCode'),
labelField: 'shortName',
valueField: 'id',
resultField: 'data',
immediate: false,
filterOption: (input: string, option: any) => {
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
}
}
}
},
{
field: 'customerBankId',
label: '结算对象账户',
component: 'ApiSelect',
required: false,
dynamicDisabled: false,
colProps: { span: 3 },
componentProps: () => {
return {
option: optionsStore.getOptionsByCode('getClientBankList'),
labelField: 'bankName',
valueField: 'id',
resultField: 'data',
immediate: false,
filterOption: (input: string, option: any) => {
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
}
}
}
},
{
field: 'customerBank',
label: '结算对象账号',
component: 'Input',
required: false,
dynamicDisabled: false,
colProps: { span: 3 }
},
{
field: 'createTime',
label: '申请日期',
component: 'DatePicker',
dynamicDisabled: false,
colProps: { span: 3 }
},
{
field: 'currency',
label: '币别',
component: 'ApiSelect',
required: false,
dynamicDisabled: false,
colProps: { span: 3 },
componentProps: () => {
return {
option: optionsStore.getOptionsByCode('GetFeeCurrencySelectList'),
labelField: 'name',
valueField: 'codeName',
resultField: 'data',
immediate: false,
filterOption: (input: string, option: any) => {
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
}
}
}
},
{
field: 'amountRMB',
label: 'RMB金额',
component: 'InputNumber',
colProps: { span: 3 },
componentProps: {
min: 0,
precision: 6
}
},
{
field: 'amountUSD',
label: 'USD金额',
component: 'InputNumber',
colProps: { span: 3 },
componentProps: {
min: 0,
precision: 6
}
},
{
field: 'amountOther',
label: '其他外币金额',
component: 'InputNumber',
colProps: { span: 3 },
componentProps: {
min: 0,
precision: 6
}
},
{
field: 'amountUSD',
label: '计划结算RMB',
component: 'InputNumber',
colProps: { span: 3 }
},
{
field: 'amountOther',
label: '计划结算USD',
component: 'InputNumber',
colProps: { span: 3 }
},
{
field: 'settlementType',
label: '结算方式',
component: 'ApiSelect',
required: false,
dynamicDisabled: false,
colProps: { span: 3 },
componentProps: () => {
return {
option: optionsStore.getOptionsByCode('GetClientStlModeSelectList'),
labelField: 'stlName',
valueField: 'id',
resultField: 'data',
immediate: false,
filterOption: (input: string, option: any) => {
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
}
}
}
},
{
field: 'paymentDate',
label: '申请支付日期',
component: 'DatePicker',
dynamicDisabled: false,
colProps: { span: 3 }
},
// {
// field: 'createBy',
// label: '申请人',
// component: 'Input',
// dynamicDisabled: false,
// colProps: { span: 3 }
// },
// {
// field: 'createBy',
// label: '计划结算其他',
// component: 'Input',
// dynamicDisabled: false,
// colProps: { span: 3 }
// },
]
export const searchFormSchema: FormSchema[] = [
{
label: '结算单位',
field: 'customerId',
component: 'ApiSelect',
dynamicDisabled: false,
colProps: { span: 4 },
componentProps: () => {
return {
option: optionsStore.getOptionsByCode('GetClientListByCode'),
immediate: false,
labelField: 'shortName',
valueField: 'codeName',
resultField: 'data',
filterOption: (input: string, option: any) => {
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
}
}
}
},
{
label: '主提单号',
field: 'mblno',
component: 'Input',
dynamicDisabled: false,
colProps: { span: 4 }
},
{
label: '分提单号',
field: 'hblno',
component: 'Input',
dynamicDisabled: false,
colProps: { span: 4 }
},
{
label: '对账编号',
field: 'debitNo',
component: 'Input',
dynamicDisabled: false,
colProps: { span: 4 }
}
]

@ -0,0 +1,127 @@
<!--
* @Description: 操作管理 -> 付费申请 -> 申请明细
* @Author: lijj
* @Date: 2024-06-20 11:54:04
-->
<template>
<div class="ds-pay-apply-detail-fee-info">
<a-tabs v-model:activeKey="activeKey">
<a-tab-pane key="2" tab="费用明细">
<div>
<BasicTable @register="registerTable">
<template #toolbar>
<a-button type="link" @click="add"> </a-button>
</template>
</BasicTable>
</div>
</a-tab-pane>
<a-tab-pane key="3" tab="附件上传" force-render>
<div style="width: 400px;">
<DsFile
ref="dsFile"
:id='route?.query?.id'
/>
</div>
</a-tab-pane>
</a-tabs>
</div>
</template>
<script lang="ts" setup>
import { onMounted, ref, defineEmits, defineProps, watch, defineExpose } from 'vue'
import { BasicTable, useTable } from '/@/components/Table'
import { useMessage } from '/@/hooks/web/useMessage'
import { columns, searchFormSchema } from './applyInfoColumns'
//
import DsFile from "/@/components/File/index.vue"
import { useRoute } from 'vue-router'
const route = useRoute()
const { createMessage } = useMessage()
const emit = defineEmits(['add'])
const activeKey = ref('2')
const props = defineProps({
feeData: {
type: Array
},
// id
id: {
type: String
}
})
const [registerTable, { reload, getForm, getPaginationRef, getSelectRows, getDataSource, setTableData }] = useTable({
title: '',
api: async (p) => {
const res = await GetList(p)
return new Promise((resolve) => {
resolve({ data: [...res.data], total: res.count })
})
},
beforeFetch: () => {
var currentPageInfo: any = getPaginationRef()
var data = getForm().getFieldsValue()
const postParam = {
queryCondition: '',
pageCondition: {
pageIndex: currentPageInfo.current,
pageSize: currentPageInfo.pageSize,
sortConditions: [],
},
}
let condition: API.ConditionItem[] = []
if (!!data.UserName) {
condition.push({
FieldName: 'UserName',
FieldValue: data.UserName,
ConditionalType: 1,
})
}
if (!!data.UserCode) {
condition.push({
FieldName: 'UserCode',
FieldValue: data.UserCode,
ConditionalType: 1,
})
}
postParam.queryCondition = JSON.stringify(condition)
// console.log(postParam);
return postParam
},
columns,
isTreeTable: false,
pagination: true,
striped: false,
useSearchForm: false,
showTableSetting: true,
bordered: true,
showIndexColumn: true,
canResize: false,
rowSelection: { type: 'checkbox' },
immediate: false
})
//
const add = () => {
emit('add')
}
const tableData = ref([])
watch(
() => props.feeData,
(list) => {
console.log(list)
setTableData([...list])
}
)
onMounted(() => {
//
reload()
})
defineExpose({
reload
})
</script>
<style lang="less">
.ds-pay-apply-detail-fee-info {
.vben-basic-table-header__toolbar {
justify-content: space-between;
}
}
</style>

@ -0,0 +1,97 @@
/*
* @Author: lijingjia lijj_xl@163.com
* @Date: 2024-06-21 16:59:01
* @Description:
*/
import { BasicColumn, FormSchema } from '/@/components/Table'
export const columns: BasicColumn[] = [
{
title: '委托编号',
dataIndex: 'customerNo',
width: 130,
},
{
title: '主提单号',
dataIndex: 'mblno',
width: 130,
},
{
title: '委托单位',
dataIndex: 'customerName',
width: 150,
},
{
title: '开船日期',
dataIndex: 'etd',
width: 120,
},
{
title: '业务来源',
dataIndex: 'sourceName',
width: 130,
},
{
title: '费用名称',
dataIndex: 'feeName',
width: 150,
},
{
title: '收付',
dataIndex: 'billType',
width: 120,
},
{
title: '费用对象',
dataIndex: 'customerName',
width: 110,
},
{
title: '申请金额',
dataIndex: 'amount',
width: 100,
},
{
title: '原始币别',
dataIndex: 'originalCurrency',
width: 100,
},
// {
// title: '原始汇率',
// dataIndex: 'originalCurrency',
// width: 200,
// },
{
title: '折算汇率',
dataIndex: 'exchangeRate',
width: 200,
},
{
title: '原始金额',
dataIndex: 'originalAmount',
width: 100,
},
// {
// title: '进项/销项税率',
// dataIndex: 'originalCurrency',
// width: 200,
// },
{
title: '揽货人',
dataIndex: 'note',
width: 110,
},
{
title: '所属分部',
dataIndex: 'createTime',
width: 120,
},
]
export const searchFormSchema: FormSchema[] = [
{
field: 'CountryName',
label: '国家名称',
component: 'Input',
colProps: { span: 6 }
}
]

@ -0,0 +1,243 @@
<!--
* @Author: lijingjia lijj_xl@163.com
* @Date: 2024-06-24 10:08:36
* @Description:
-->
<template>
<div class="ds-bus-table">
<BasicTable
:canRowSelect="true"
:scroll="{ x: '100%', y: 188 }"
:row-selection="{ selectedRowKeys: state.historyRowKeys, onChange: historyChange }"
rowKey="id"
@register="registerTable"
@row-click="onRowClick"
>
<template #toolbar>
<a-button type="link" @click="addInfos"></a-button>
</template>
</BasicTable>
<div class="info">
<div>
<a-button @click="save" type="link">添加申请费用明细</a-button>
</div>
<feeTable
ref="feeTabel"
></feeTable>
</div>
</div>
</template>
<script lang="ts" setup>
import { onMounted, ref, reactive, watch, defineExpose, defineProps, defineEmits } from 'vue'
import { BasicTable, useTable } from '/@/components/Table'
import { GetBizList } from '../../api'
import { businessColumns, searchFormSchema } from '../columns'
import feeTable from '/@/components/CostEntry/components/feeTable.vue'
//
import { useMessage } from '/@/hooks/web/useMessage'
const emit = defineEmits(['save'])
const { createMessage } = useMessage()
const props = defineProps({
//
formData: {
type: Object
},
//
setFieldsValue: {
type: Function
}
})
const [registerTable, { reload, getForm, getPaginationRef, getSelectRows, setSelectedRows }] = useTable({
api: async (p) => {
const res = await GetBizList(p)
if (res?.data?.length) state.historyRowKeys = [res.data[0].id]
setSelectedRows([res.data[0]])
return new Promise((resolve) => {
resolve({ data: [...res.data], total: res.count })
})
},
beforeFetch: () => {
var currentPageInfo: any = getPaginationRef()
var data = getForm().getFieldsValue()
const postParam = {
queryCondition: '',
pageCondition: {
pageIndex: currentPageInfo.current,
pageSize: currentPageInfo.pageSize,
sortConditions: [],
},
}
let condition: API.ConditionItem[] = []
if (!!data.customerNo) {
condition.push({
FieldName: 'customerNo',
FieldValue: data.customerNo,
ConditionalType: 1
})
}
if (!!data.Etd) {
condition.push({
FieldName: 'Etd',
FieldValue: data.Etd[0],
ConditionalType: 3
})
condition.push({
FieldName: 'Etd',
FieldValue: data.Etd[1],
ConditionalType: 5
})
}
if (!!data.loadPort) {
condition.push({
FieldName: 'loadPort',
FieldValue: data.loadPort,
ConditionalType: 1
})
}
if (!!data.dischargePort) {
condition.push({
FieldName: 'dischargePort',
FieldValue: data.dischargePort,
ConditionalType: 1
})
}
postParam.queryCondition = JSON.stringify(condition)
return postParam
},
columns: businessColumns,
formConfig: {
labelWidth: 120,
schemas: searchFormSchema
},
isTreeTable: false,
pagination: true,
striped: false,
useSearchForm: true,
showTableSetting: false,
bordered: true,
showIndexColumn: true,
canResize: false,
immediate: false
})
//
const state = reactive({
historyRowKeys: []
})
// 2
const findDifferentElements = (arr1, arr2) => {
return [
...arr1.filter(item => !arr2.includes(item)),
...arr2.filter(item => !arr1.includes(item))
]
}
// id
const allFeeData = {}
const feeTabel = ref(null)
const historyChange = async (v) => {
state.historyRowKeys = v
}
//
const onRowClick = (record) => {
state.historyRowKeys = [record?.id]
setSelectedRows([record])
}
const feeData = () => {
return feeTabel.value.selectfeeData
}
//
const save = () => {
const data = feeTabel.value.selectfeeData
emit('save', data)
}
const addInfos = () => {
const selectRows = getSelectRows()
console.log(selectRows)
// console.log(props.formData.currency)
return
if (props.formData.customerId) {
let flag = false
selectRows.forEach(item => {
if (item.customerId == props.formData.customerId) {
flag = true
}
})
if (!flag) {
return createMessage.warning('没有选择要添加的业务!')
}
selectRows
} else {
if (state.historyRowKeys.length == 0 ) {
return createMessage.warning('没有选择要添加的业务!')
}
}
console.log(allFeeData)
//
let feeList = []
for(var key in allFeeData) {
feeList = [...feeList, ...allFeeData[key]]
}
console.log(props.formData)
feeList.forEach(item => {
if (props.formData.currency && props.formData.currency != item.currency) {
}
})
}
watch(
() => state.historyRowKeys, (v, old) => {
// id
const diffIds = findDifferentElements(v, old)
const rows = getSelectRows()
if (v.length > old.length) {
//
diffIds.forEach(item => {
//
let btype = rows.filter(row => {
return item == row.id
})
btype = btype[0]?.businessType
feeTabel.value.init([item], 'apply', btype).then(res => {
allFeeData[item] = res
})
})
} else if (v.length < old.length) {
//
diffIds.forEach(item => {
delete allFeeData[item]
})
if (v.length) {
//
let btype = rows[0].businessType
feeTabel.value.init([v[v.length - 1]], 'apply', btype)
}
} else {
//
let btype = rows[0].businessType
feeTabel.value.init(v, 'apply', btype)
}
})
onMounted(() => {
//
reload()
})
defineExpose({
feeData
})
</script>
<style lang="less">
.ds-bus-table {
.vben-basic-table-header__toolbar {
justify-content: space-between;
}
.vben-basic-table {
padding: 0;
}
.ant-form {
margin-bottom: 0;
padding-bottom: 0;
}
}
</style>

@ -0,0 +1,179 @@
<!--
* @Description: 操作管理 -> 付费申请 -> 详情布局
* @Author: lijj
* @Date: 2024-06-20 11:54:04
-->
<template>
<div class="ds-pay-apply-detail ds-detail-box">
<a-spin :spinning="dloading">
<div>
<a-button @click="save"></a-button>
</div>
<!-- 表单区域 -->
<div class="form-area">
<BasicForm @register="registerForm" />
</div>
<!-- 申请明细 -->
<div>
<ApplyInfo
ref="applyInfo"
@add="add"
:feeData="feeData"
></ApplyInfo>
</div>
</a-spin>
<a-modal
class="fee-modal"
v-model:visible="visible"
title="添加支付结算明细"
width="90%"
@ok="handleOk"
>
<a-spin :spinning="loading">
<!-- 业务表格 -->
<BusinessTable
ref="busTable"
:formData="getFieldsValue()"
:setFieldsValue="setFieldsValue"
@save="save"
></BusinessTable>
</a-spin>
</a-modal>
</div>
</template>
<script lang="ts" setup>
import { onMounted, ref } from 'vue'
import { BasicTable, useTable } from '/@/components/Table'
import { useMessage } from '/@/hooks/web/useMessage'
import { BasicForm, useForm } from '/@/components/Form'
import ApplyInfo from './components/applyInfo.vue'
//
import BusinessTable from './components/businessTable.vue'
const { createMessage } = useMessage()
import { useRoute } from 'vue-router'
const route = useRoute()
const visible = ref(false)
import { formSchema } from './columns'
import { Save, Get } from '../api'
const [registerForm, { validate, getFieldsValue, setFieldsValue }] = useForm({
labelWidth: 150,
schemas: formSchema,
showActionButtonGroup: false
})
// loading
const loading = ref(false)
// loading
const dloading = ref(false)
const busTable = ref(null)
const feeData = ref([])
const handleOk = () => {
feeData.value = busTable.value.feeData()
visible.value = false
}
// const [registerTable, { reload, getForm, getPaginationRef, getSelectRows }] = useTable({
// title: '',
// api: async (p) => {
// const res = await GetList(p)
// return new Promise((resolve) => {
// resolve({ data: [...res.data], total: res.count })
// })
// },
// beforeFetch: () => {
// var currentPageInfo: any = getPaginationRef()
// var data = getForm().getFieldsValue()
// const postParam = {
// queryCondition: '',
// pageCondition: {
// pageIndex: currentPageInfo.current,
// pageSize: currentPageInfo.pageSize,
// sortConditions: [],
// },
// }
// let condition: API.ConditionItem[] = []
// if (!!data.UserName) {
// condition.push({
// FieldName: 'UserName',
// FieldValue: data.UserName,
// ConditionalType: 1,
// })
// }
// if (!!data.UserCode) {
// condition.push({
// FieldName: 'UserCode',
// FieldValue: data.UserCode,
// ConditionalType: 1,
// })
// }
// postParam.queryCondition = JSON.stringify(condition)
// // console.log(postParam);
// return postParam
// },
// columns,
// formConfig: {
// labelWidth: 120,
// schemas: searchFormSchema,
// },
// isTreeTable: false,
// pagination: true,
// striped: false,
// useSearchForm: true,
// showTableSetting: true,
// bordered: true,
// showIndexColumn: true,
// canResize: false,
// rowSelection: { type: 'checkbox' },
// immediate: false
// })
//
const add = () => {
visible.value = true
}
const applyInfo = ref(null)
//
const save = async (feeInfo) => {
const postData = await validate()
postData['details'] = feeInfo
loading.value = true
Save(postData).then(res => {
console.log(res)
loading.value = false
applyInfo.value.reload()
})
}
//
const init = () => {
const id = route.query.id
if (id) {
dloading.value = true
Get({ id }).then(res => {
dloading.value = false
setFieldsValue(res.data)
feeData.value = res.data.details
})
}
}
onMounted(() => {
//
// reload()
init()
})
function handleSuccess() {
// reload()
}
</script>
<style lang="less">
.form-area {
padding: 10px;
background: #ffffff;
}
.fee-modal {
.ant-modal-body {
padding-top: 0 10px;
border-radius: 4px;
}
.ant-modal-footer {
display: none;
}
}
</style>

@ -5,7 +5,7 @@
--> -->
<template> <template>
<div class="ds-pay-apply"> <div class="ds-pay-apply">
<BasicTable @register="registerTable"> <BasicTable @register="registerTable" @row-dbClick="edit">
<template #toolbar> <template #toolbar>
<TableActionBar :selectRow="getSelectRows" :reload="reload"></TableActionBar> <TableActionBar :selectRow="getSelectRows" :reload="reload"></TableActionBar>
</template> </template>
@ -34,6 +34,8 @@
const { createMessage } = useMessage() const { createMessage } = useMessage()
import { GetList } from './api' import { GetList } from './api'
import { columns, searchFormSchema, FeeStatus } from './columns' import { columns, searchFormSchema, FeeStatus } from './columns'
import { useGo } from '/@/hooks/web/usePage'
const go = useGo()
const [registerTable, { reload, getForm, getPaginationRef, getSelectRows }] = useTable({ const [registerTable, { reload, getForm, getPaginationRef, getSelectRows }] = useTable({
title: '', title: '',
api: async (p) => { api: async (p) => {
@ -93,6 +95,10 @@
navigator.clipboard.writeText(v) navigator.clipboard.writeText(v)
createMessage.success("复制成功") createMessage.success("复制成功")
} }
//
const edit = (row) => {
go(`/paid-apply/create?id=${row.id}`)
}
onMounted(() => { onMounted(() => {
// //
reload() reload()

Loading…
Cancel
Save