9.24禅道bug修复

szh-new
lijingjia 2 months ago
parent 2beec57366
commit c2ecebb111

@ -8,9 +8,9 @@ import { request } from '/@/utils/request'
import { DataResult, PageRequest } from '/@/api/model/baseModel'
enum Api {
list = '/feeApi/PaymentSettlement/GetList',
edit = '/mainApi/MappingYard/EditMappingYard',
Save = '/feeApi/PaymentSettlement/Save',
info = '/feeApi/PaymentSettlement/Get',
delete = '/mainApi/MappingYard/BatchDelMappingYard',
delete = '/feeApi/PaymentSettlement/Delete',
GetApplicationList = '/feeApi/PaymentSettlement/GetApplicationList',
GetApplicationDetailsById = '/feeApi/PaymentSettlement/GetApplicationDetailsById'
}
@ -23,9 +23,9 @@ export function GetList(data: PageRequest) {
})
}
// 编辑 (Auth)
export function EditMappingYard(data: PageRequest) {
export function Save(data: PageRequest) {
return request<DataResult>({
url: Api.edit,
url: Api.Save,
method: 'post',
data
})
@ -40,7 +40,7 @@ export function Get(params) {
}
// 删除 (Auth)
export function BatchDelMappingYard(data: PageRequest) {
export function Delete(data: PageRequest) {
return request<DataResult>({
url: Api.delete,
method: 'post',

@ -134,16 +134,132 @@ export const businessColumns: BasicColumn[] = [
// 费用表格
export const feeColumns: BasicColumn[] = [
{
dataIndex: 'customerNo',
title: '委托编号',
sorter: true,
width: 110,
},
{
dataIndex: 'mblno',
title: '主提单号',
sorter: true,
width: 110,
},
{
title: '委托单位',
dataIndex: 'customerName',
sorter: true,
width: 120,
},
{
dataIndex: 'etd',
sorter: true,
title: '开船日期',
width: 100,
},
{
title: '业务来源',
dataIndex: 'sourceCode',
sorter: true,
width: 100,
},
{
title: '费用名称',
dataIndex: 'feeName',
sorter: true,
width: 100,
},
{
title: '收付',
dataIndex: 'feeType',
width: 80,
customRender: ({ text }) => {
if (text === 1) {
return '应收'
} else if (text === 2) {
return '应付'
}
return text
}
},
{
title: '结算金额',
dataIndex: 'settlementAmount',
width: 100,
sorter: true
},
{
title: '原始币别',
dataIndex: 'originalCurrency',
width: 100,
sorter: true
},
{
title: '原始汇率',
dataIndex: 'originalRate',
width: 100,
sorter: true
},
{
title: '原始金额',
dataIndex: 'originalAmount',
width: 100,
sorter: true
},
{
title: '发票号',
dataIndex: 'invoiceNO',
width: 100,
sorter: true
},
{
title: '揽货人',
dataIndex: 'saleName',
width: 100,
sorter: true
},
{
title: '会计期间',
dataIndex: 'accountDate',
width: 100,
sorter: true
},
{
title: '船名',
dataIndex: 'vessel',
width: 100,
sorter: true
},
{
title: '航次',
dataIndex: 'voyage',
width: 100,
sorter: true
},
]
export const formSchema: FormSchema[] = [
{
field: 'id',
label: 'id',
label: '',
component: 'Input',
show: false
},
{
field: 'billType',
label: '',
component: 'Input',
show: false,
defaultValue: 2
},
{
field: 'mode',
label: '',
component: 'Input',
show: false,
defaultValue: 1
},
{
field: 'customerName',
label: '结算单位',
@ -439,51 +555,46 @@ export const searchFormSchema: FormSchema[] = [
}
},
{
label: '编号查询',
label: '编号检索',
field: 'mblno:hblno:debitNo:hblno:bookingNO:customerNo',
component: 'Input',
dynamicDisabled: false,
colProps: { span: 4 }
},
{
label: '编号查询',
field: 'mblno:hblno:debitNo',
component: 'Input',
dynamicDisabled: false,
colProps: { span: 4 }
},
{
field: 'accountDate',
label: '会计期间',
component: 'DatePicker',
field: 'createTime',
label: '申请日期',
component: 'RangePicker',
colProps: { span: 4 },
componentProps: {
allowClear: true,
valueFormat: 'YYYY-MM'
valueFormat: 'YYYY-MM-DD'
}
},
{
field: 'isInvoice',
label: '是否开票',
component: 'Select',
colProps: { span: 4 },
componentProps: {
options: [
{ label: '是', value: true },
{ label: '否', value: false }
]
}
field: 'loadPort:dischargePort',
label: '装货港/卸货港',
component: 'Input',
colProps: { span: 4 }
},
{
field: 'isAdvancedPay',
label: '是否垫付',
component: 'Select',
field: 'currency',
label: '结算币别:',
defaultValue: null,
component: 'ApiSelect',
colProps: { span: 4 },
componentProps: {
options: [
{ label: '是', value: true },
{ label: '否', value: false }
]
placeholder: '原币结算',
componentProps: () => {
return {
allowClear: true,
showSearch: true,
option: optionsStore.getOptionsByCode('GetFeeCurrencySelectList'),
labelField: 'codeName',
valueField: 'codeName',
filterOption: (input: string, option: any) => {
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
}
}
}
},
{
@ -501,6 +612,13 @@ export const searchFormSchema: FormSchema[] = [
immediate: false
}
}
},
{
label: '仅未结申请',
field: 'unsettledOnly',
component: 'Switch',
required: false,
colProps: { span: 4 }
}
]

@ -41,8 +41,6 @@
/>
<div class="info">
<feeTable
style="width: 350px;"
:tHeight="364"
ref="feeTabel"
></feeTable>
</div>
@ -71,10 +69,11 @@
import { columns } from './applyInfoColumns'
//
import DsFile from "/@/components/File/index.vue"
import { BatchDelMappingYard } from '../../api'
import { Divider } from 'ant-design-vue'
// import { BatchDelMappingYard } from '../../api'
import { exportExcelByData } from '/@/hooks/web/common'
import { useMessage } from '/@/hooks/web/useMessage'
import feeTable from '/@/components/CostEntry/components/feeTable.vue'
import feeTable from './feeTable.vue'
const { createMessage } = useMessage()
import { useRoute } from 'vue-router'
const route = useRoute()
@ -129,12 +128,12 @@
ids
}
deleteFlag.value = false
BatchDelMappingYard(postData).then(res => {
if (res.succeeded) {
createMessage.success('删除成功!')
emit('del')
}
})
// BatchDelMappingYard(postData).then(res => {
// if (res.succeeded) {
// createMessage.success('')
// emit('del')
// }
// })
}
//
const exportExcel = () => {
@ -177,6 +176,11 @@
h4 {
margin-bottom: 0;
}
.ant-divider-vertical {
margin: 48px 20px 0;
height: auto;
background: #E8EBED;
}
.flex {
align-items: center;
}

@ -11,7 +11,7 @@
:canRowSelect="true"
:scroll="{ x: '100%', y: 400 }"
:row-selection="{ selectedRowKeys: state.historyRowKeys, onChange: historyChange }"
rowKey="idIndex"
rowKey="id"
@register="registerTable"
@row-click="onRowClick"
>
@ -30,6 +30,16 @@
/>
</div>
</template>
<template v-slot:bodyCell="{ column, record }">
<!-- RMB本次结算 -->
<template v-if="column.dataIndex == 'settlementRMB'">
<a-input-number v-model:value="record.settlementRMB" size="small" :min="0.01" :max="record.unSettledRMB" />
</template>
<!-- USD本次结算 -->
<template v-if="column.dataIndex == 'settlementUSD'">
<a-input-number v-model:value="record.settlementUSD" size="small" :min="0.01" :max="record.unSettledUSD" />
</template>
</template>
<template #right>
<Divider
type="vertical"
@ -58,7 +68,7 @@
<script lang="ts" setup>
import { onMounted, ref, reactive, watch, defineExpose, defineProps, defineEmits, h } from 'vue'
import { BasicTable, useTable } from '/@/components/Table'
import { GetApplicationList } from '../../api'
import { GetApplicationList, Save } from '../../api'
import { businessColumns, searchFormSchema, currencyFormSchema } from '../columns'
import feeTable from './feeTable.vue'
import { BasicForm, useForm } from '/@/components/Form'
@ -80,26 +90,11 @@
type: Function
}
})
// rmb
const rrmb = ref(0)
// rmb
const prmb = ref(0)
// usd
const rusd = ref(0)
// usd
const pusd = ref(0)
//
const rother = ref(0)
//
const pother = ref(0)
const loading = ref(false)
const [registerTable, { reload, getForm, getSelectRowKeys, getPaginationRef, getSelectRows, setSelectedRows, getDataSource }] = useTable({
api: async (p) => {
const res = await GetApplicationList(p)
res.data.forEach((item, index) => {
item['idIndex'] = item.id + index
})
if (res?.data?.length) state.historyRowKeys = [res.data[0].id + 0]
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 })
@ -147,6 +142,7 @@
const historyChange = async (v) => {
console.log(v)
if (v.length > 1) {
console.log(getDataSource())
const a = getDataSource().filter(item => {
return item.id == v[0]
})[0]
@ -161,8 +157,10 @@
}
//
const onRowClick = (record) => {
state.historyRowKeys = [record?.idIndex]
state.historyRowKeys = [record?.id]
setSelectedRows([record])
//
feeTabel.value.init(record.id)
}
const feeData = () => {
return feeTabel.value.selectfeeData
@ -255,25 +253,25 @@
if (!props.formData.currency) {
//
const postData = {
description: '按业务增加添加费用明细',
application: {
id: 0,
customerId: selectRows[0]?.customerId
},
items: [{
id: selectRows[0]?.id,
businessType: selectRows[0]?.businessType,
customerId: selectRows[0]?.customerId
}]
description: '按申请单增加添加费用明细',
settlement: props.formData,
documents: getSelectRows()
}
// loading.value = true
// BizSave(postData).then(res => {
// loading.value = false
// if (res.succeeded) {
// createMessage.success('')
// emit('refresh')
// }
// })
loading.value = true
Save(postData).then(res => {
loading.value = false
if (res.succeeded) {
createMessage.success('添加成功!')
if (res?.data?.id) {
props.setFieldsValue({
...res.data
})
}
emit('refresh')
}
}).catch(() => {
loading.value = false
})
} else {
//
//
@ -304,11 +302,6 @@
exchangeRate.value.init(props.formData.currency, currencyList)
}
}
watch(
() => state.historyRowKeys, (v, old) => {
// id
const diffIds = findDifferentElements(v, old)
})
onMounted(async () => {
//
@ -353,6 +346,7 @@
}
.vben-basic-table-header__toolbar {
padding: 4px;
height: 48px;
justify-content: space-between;
}
.vben-basic-table {

@ -24,19 +24,16 @@
import { GetFeeTemplateDetailList } from '/@/views/fee/template/api'
import { BasicTable, useTable } from '/@/components/Table'
// id, id
const id = ref(null)
const aid = ref('')
const [registerTable, { reload, getForm, getSelectRowKeys, getPaginationRef, getSelectRows, setSelectedRows, getDataSource }] = useTable({
api: async (p) => {
const res = await GetApplicationDetailsById(p)
res.data.forEach((item, index) => {
item['idIndex'] = item.id + index
})
return new Promise((resolve) => {
resolve({ data: [...res.data], total: res.count })
})
},
beforeFetch: () => {
return { id: id.value }
return { id: aid.value }
},
columns: feeColumns,
pagination: false,
@ -49,7 +46,7 @@
immediate: false
})
const init = (id) => {
id.value = id
aid.value = id
reload()
}
const loading = ref(false)

@ -12,6 +12,7 @@
name="hyck"
:save="save"
:delete="deleteRow"
:create="create"
:showBtns="['create', 'save', 'delete', 'print']"
layout="horizontal"
></ActionBar>
@ -75,9 +76,6 @@
@refresh="refresh"
></BusinessTable>
<template #footer>
<div class="main-statistic">
<span>合计</span>
</div>
</template>
</a-modal>
</div>
@ -95,9 +93,10 @@
import { formSchema } from './columns'
import { useMessage } from '/@/hooks/web/useMessage'
const { createMessage } = useMessage()
import { useRoute } from 'vue-router'
import { useRoute, useRouter } from 'vue-router'
const route = useRoute()
const [registerForm, { validate, getFieldsValue, setFieldsValue }] = useForm({
const router = useRouter()
const [registerForm, { validate, getFieldsValue, setFieldsValue, getSelectRows }] = useForm({
labelWidth: 150,
schemas: formSchema,
// readonly: route.path != '/paid-apply/create',
@ -113,10 +112,20 @@
}
//
function deleteRow() {
}
//
const create = () => {
router.go(0)
}
//
function exportFile() {
}
//
const refresh = () => {
visible.value = false
init()
}
//
const save = () => {
@ -129,6 +138,7 @@
//
} else {
//
visible.value = true
}
}
onMounted(() => {

@ -61,14 +61,14 @@
import { onMounted } from 'vue'
import { BasicTable, useTable, TableAction } from '/@/components/Table'
import { Divider } from 'ant-design-vue'
import { GetList } from './api'
import { GetList, Delete } from './api'
import { formatParams } from '/@/hooks/web/common'
import { useGo } from '/@/hooks/web/usePage'
import { columns, searchFormSchema } from './columns'
import { useMessage } from '/@/hooks/web/useMessage'
const { createMessage } = useMessage()
const go = useGo()
const [registerTable, { reload, getForm, getPaginationRef }] = useTable({
const [registerTable, { reload, getForm, getSelectRows }] = useTable({
title: '',
api: async (p) => {
const res: API.DataResult = await GetList(p)
@ -77,6 +77,7 @@
})
},
beforeFetch: (p) => {
p['billType'] = 2
return formatParams(p)
},
columns,
@ -108,6 +109,19 @@
})
//
function deleteRow() {
const rows = getSelectRows()
if (rows.length == 0) return createMessage.warning('请勾选要删除的结算申请单!')
const ids = rows.map(item => {
return item.id
})
Delete({ ids }).then(res => {
if (res.succeeded) {
createMessage.success('删除成功!')
}
reload()
}).catch(() => {
})
}
//
function exportFile() {

@ -335,6 +335,7 @@
}
})
}
onMounted(() => {
// tab
if (source.value != 'edit') document.getElementsByClassName('main-tab')[0].getElementsByClassName('ant-tabs-nav-wrap')[0].style.display = 'none'

@ -14,7 +14,6 @@
<OpBusinessYardEdit
ref="YardEdit"
:business-id="businessId"
@success="handleSuccess"
/>
<template #footer>
</template>
@ -33,7 +32,7 @@
//
const YardEdit = ref(null)
//
const handleSuccess = async () => {
closeModal()
}
// const handleSuccess = async () => {
// closeModal()
// }
</script>

@ -173,8 +173,10 @@
setFieldsValue({
...res.data
})
}).catch(() => {
loading.value = false
})
emit('success')
// emit('success')
}
}
//

@ -1168,6 +1168,7 @@
case 'WAIT_TUOCHE':
case 'WAIT_Insurance':
case 'ORDER_AUDIT_REJECTED':
case 'RETURN_CABIN_AUDIT':
//
go({
path: '/taskmanage/booking-approval',

Loading…
Cancel
Save