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

@ -134,16 +134,132 @@ export const businessColumns: BasicColumn[] = [
// 费用表格 // 费用表格
export const feeColumns: 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[] = [ export const formSchema: FormSchema[] = [
{ {
field: 'id', field: 'id',
label: 'id', label: '',
component: 'Input', component: 'Input',
show: false show: false
}, },
{
field: 'billType',
label: '',
component: 'Input',
show: false,
defaultValue: 2
},
{
field: 'mode',
label: '',
component: 'Input',
show: false,
defaultValue: 1
},
{ {
field: 'customerName', field: 'customerName',
label: '结算单位', label: '结算单位',
@ -439,51 +555,46 @@ export const searchFormSchema: FormSchema[] = [
} }
}, },
{ {
label: '编号查询', label: '编号检索',
field: 'mblno:hblno:debitNo:hblno:bookingNO:customerNo', field: 'mblno:hblno:debitNo:hblno:bookingNO:customerNo',
component: 'Input', component: 'Input',
dynamicDisabled: false, dynamicDisabled: false,
colProps: { span: 4 } colProps: { span: 4 }
}, },
{ {
label: '编号查询', field: 'createTime',
field: 'mblno:hblno:debitNo', label: '申请日期',
component: 'Input', component: 'RangePicker',
dynamicDisabled: false,
colProps: { span: 4 }
},
{
field: 'accountDate',
label: '会计期间',
component: 'DatePicker',
colProps: { span: 4 }, colProps: { span: 4 },
componentProps: { componentProps: {
allowClear: true, allowClear: true,
valueFormat: 'YYYY-MM' valueFormat: 'YYYY-MM-DD'
} }
}, },
{ {
field: 'isInvoice', field: 'loadPort:dischargePort',
label: '是否开票', label: '装货港/卸货港',
component: 'Select', component: 'Input',
colProps: { span: 4 }, colProps: { span: 4 }
componentProps: {
options: [
{ label: '是', value: true },
{ label: '否', value: false }
]
}
}, },
{ {
field: 'isAdvancedPay', field: 'currency',
label: '是否垫付', label: '结算币别:',
component: 'Select', defaultValue: null,
component: 'ApiSelect',
colProps: { span: 4 }, colProps: { span: 4 },
componentProps: { placeholder: '原币结算',
options: [ componentProps: () => {
{ label: '是', value: true }, return {
{ label: '否', value: false } 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 immediate: false
} }
} }
},
{
label: '仅未结申请',
field: 'unsettledOnly',
component: 'Switch',
required: false,
colProps: { span: 4 }
} }
] ]

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

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

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

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

@ -61,14 +61,14 @@
import { onMounted } from 'vue' import { onMounted } from 'vue'
import { BasicTable, useTable, TableAction } from '/@/components/Table' import { BasicTable, useTable, TableAction } from '/@/components/Table'
import { Divider } from 'ant-design-vue' import { Divider } from 'ant-design-vue'
import { GetList } from './api' import { GetList, Delete } from './api'
import { formatParams } from '/@/hooks/web/common' import { formatParams } from '/@/hooks/web/common'
import { useGo } from '/@/hooks/web/usePage' import { useGo } from '/@/hooks/web/usePage'
import { columns, searchFormSchema } from './columns' import { columns, searchFormSchema } from './columns'
import { useMessage } from '/@/hooks/web/useMessage' import { useMessage } from '/@/hooks/web/useMessage'
const { createMessage } = useMessage() const { createMessage } = useMessage()
const go = useGo() const go = useGo()
const [registerTable, { reload, getForm, getPaginationRef }] = useTable({ const [registerTable, { reload, getForm, getSelectRows }] = useTable({
title: '', title: '',
api: async (p) => { api: async (p) => {
const res: API.DataResult = await GetList(p) const res: API.DataResult = await GetList(p)
@ -77,6 +77,7 @@
}) })
}, },
beforeFetch: (p) => { beforeFetch: (p) => {
p['billType'] = 2
return formatParams(p) return formatParams(p)
}, },
columns, columns,
@ -108,6 +109,19 @@
}) })
// //
function deleteRow() { 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() { function exportFile() {

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

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

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

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

Loading…
Cancel
Save