lijingjia 2 weeks ago
commit 1f40b27971

@ -24,10 +24,21 @@
<div>
<BasicTable class="ds-table" @register="registerTableBotton"> </BasicTable>
</div>
<a-modal
v-model:visible="visible"
title="驳回"
width="40%"
@cancel="handleCancel"
@ok="handleOk"
>
<BasicForm @register="modalRegisterForml" />
</a-modal>
</div>
</template>
<script lang="ts" setup>
import { ref } from 'vue'
import { BasicTable, useTable } from '/@/components/Table'
import { BasicForm, useForm } from '/@/components/Form/index'
import { ApiList, ApiDetailList, ApiConfirm, ApiCancel } from './api'
import { columns, searchFormSchema, detailColumns } from './columns'
import { useMessage } from '/@/hooks/web/useMessage'
@ -109,40 +120,93 @@
resizeHeightOffset: 35,
immediate: false,
})
async function FnAudit(type, state) {
const Ctype = ref(true)
const CApiData = ref('')
function FnAudit(type, state) {
let ApiData: any = {
id: '',
ids: [],
businessType: '',
}
if (type) {
if (getSelectRows()[0].id) {
ApiData.id = getSelectRows()[0].id
try {
if (type) {
if (getSelectRows()[0]?.id) {
ApiData.id = getSelectRows()[0].id
} else {
notification.warning({ message: '请选择一条数据', duration: 3 })
throw new Error('请选择一条数据')
}
} else {
notification.warning({ message: '请选择一条数据', duration: 3 })
if (getSelectRowsBotton().length) {
getSelectRowsBotton().forEach((item) => {
ApiData.ids.push(item.id)
})
ApiData.id = getSelectRows()[0].id
} else {
notification.warning({ message: '请至少选择一条数据', duration: 3 })
throw new Error('请至少选择一条数据')
}
}
} else {
if (getSelectRowsBotton().length) {
getSelectRowsBotton().forEach((item) => {
ApiData.ids.push(item.id)
})
ApiData.id = getSelectRows()[0].id
ApiData.businessType = getSelectRows()[0]?.ctnBizStateId
if (state == 'cancel') {
Ctype.value = type
CApiData.value = JSON.stringify(ApiData)
visible.value = true
} else {
notification.warning({ message: '请至少选择一条数据', duration: 3 })
FnExamine(type, state, ApiData)
}
} catch (error) {
// console.log(error)
}
}
async function FnExamine(type, state, ApiData) {
let res: any = state == 'confirm' ? await ApiConfirm(ApiData) : await ApiCancel(ApiData)
if (res.succeeded) {
notification.success({ message: res.message, duration: 3 })
console.log(type)
if (type) {
reload()
} else {
Ctype.value = true
CApiData.value = ''
modalResetFields()
visible.value = false
reloadBotton()
}
}
}
const visible = ref(false)
const modalFormSchema = [
{
field: 'remark',
label: '驳回原因',
defaultValue: '',
component: 'InputTextArea',
required: true,
colProps: { span: 24 },
componentProps: {
autoSize: {
minRows: 4,
maxRows: 4,
},
disTrans: true,
},
},
]
const [modalRegisterForml, { resetFields: modalResetFields, validate: modalValidate }] = useForm({
labelWidth: 150,
schemas: modalFormSchema,
showActionButtonGroup: false,
})
const handleOk = async () => {
const res = await modalValidate()
FnExamine(Ctype.value, 'cancel', { ...JSON.parse(CApiData.value), remark: res.remark })
}
const handleCancel = () => {
Ctype.value = true
CApiData.value = ''
modalResetFields()
visible.value = false
}
</script>
<style lang="less" scoped>
.OfflineAudit {

@ -1,8 +1,8 @@
import { BasicColumn, FormSchema } from '/@/components/Table'
export const billTypeData = [
{ code: 0, value: '全部' },
{ code: 1, value: '应收' },
{ code: 2, value: '应付' },
{ value: 0, label: '全部' },
{ value: 1, label: '应收' },
{ value: 2, label: '应付' },
]
export const searchFormSchema: FormSchema[] = [
{ field: 'billNo', label: '对账编号', component: 'Input', colProps: { span: 4 } },
@ -72,7 +72,7 @@ export const searchFormSchema: FormSchema[] = [
},
{
field: 'rmbcr',
label: '应付RBM',
label: '应付RMB',
component: 'InputNumber',
colProps: { span: 4 },
componentProps: () => {
@ -155,7 +155,7 @@ export const columns: BasicColumn[] = [
align: 'left',
customRender: ({ text }) => {
let RData = '-'
if (text) {
if (text == 'true') {
RData = '是'
} else {
RData = '否'
@ -167,7 +167,7 @@ export const columns: BasicColumn[] = [
{ title: '未收RMB', dataIndex: 'balrmbdr', align: 'left' },
{ title: '应收USD', dataIndex: 'usddr', align: 'left' },
{ title: '未收USD', dataIndex: 'balusddr', align: 'left' },
{ title: '应付RBM', dataIndex: 'rmbcr', align: 'left' },
{ title: '应付RMB', dataIndex: 'rmbcr', align: 'left' },
{ title: '未付RMB', dataIndex: 'balrmbcr', align: 'left' },
{ title: '应付USD', dataIndex: 'usdcr', align: 'left' },
{ title: '未付USD', dataIndex: 'balusdcr', align: 'left' },

@ -383,7 +383,7 @@
dataIndex: 'rmbdr',
},
// {
// title: 'RBM',
// title: 'RMB',
// dataIndex: 'rmbcr',
// },
{

@ -15,23 +15,24 @@ import {
GetAgentCnClientList,
GetClientPortSelectList,
} from '/@/views/operation/seaexport/api/BookingLedger.js'
import { GetClientListByCode } from '/@/api/common'
import { GetClientListByCode, GetSupplierListByCode } from '/@/api/common'
import { billTypeData } from '/@/views/operation/CustomerReconciliation/detail/detailColumns'
export const TFData = [
{ value: true, label: '是' },
{ value: false, label: '否' },
]
export const RQueryArr = [
'customerId',
'createTime',
'billType',
// 'customerId',
'isDebit',
'stlName',
'currency',
'feeName',
'forwarderId',
'dischargePortId',
'loadPortId',
'currency',
// 'createTime',
// // 'billType',
// 'isDebit',
// 'stlName',
// 'forwarderId',
// // 'dischargePortId',
// // 'loadPortId',
]
// 表单
export const schemas: FormSchema[] = [
@ -90,13 +91,13 @@ export const schemas: FormSchema[] = [
colProps: { span: 4 },
show: false,
},
{
field: 'customNo',
component: 'Input',
label: '编号检索',
dynamicDisabled: false,
colProps: { span: 4 },
},
// {
// field: 'customNo',
// component: 'Input',
// label: '编号检索',
// dynamicDisabled: false,
// colProps: { span: 4 },
// },
{
field: 'etd',
label: '业务日期',
@ -139,26 +140,26 @@ export const schemas: FormSchema[] = [
options: TFData,
},
},
{
label: '结算方式',
field: 'stlName',
component: 'ApiSelect',
required: false,
dynamicDisabled: false,
colProps: { span: 4 },
componentProps: () => {
return {
api: GetClientStlModeSelectList,
immediate: true,
labelField: 'stlName',
valueField: 'id',
resultField: 'data',
filterOption: (input: string, option: any) => {
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
},
}
},
},
// {
// label: '结算方式',
// field: 'stlName',
// component: 'ApiSelect',
// required: false,
// dynamicDisabled: false,
// colProps: { span: 4 },
// componentProps: () => {
// return {
// api: GetClientStlModeSelectList,
// immediate: true,
// labelField: 'stlName',
// valueField: 'id',
// resultField: 'data',
// filterOption: (input: string, option: any) => {
// return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
// },
// }
// },
// },
{
label: '币别',
field: 'currency',
@ -199,7 +200,7 @@ export const schemas: FormSchema[] = [
})
},
immediate: true,
valueField: 'id',
valueField: 'name',
resultField: 'data',
// mode: 'multiple',
filterOption: (input: string, option: any) => {
@ -208,26 +209,26 @@ export const schemas: FormSchema[] = [
}
},
},
{
field: 'isSeaFreight',
component: 'Select',
label: '是否海运费',
dynamicDisabled: false,
colProps: { span: 4 },
componentProps: ({ formModel }) => {
return {
options: TFData,
onchange: (e) => {
if (e) {
formModel.feeName = '海运费'
}
},
}
},
},
// {
// field: 'isSeaFreight',
// component: 'Select',
// label: '是否海运费',
// dynamicDisabled: false,
// colProps: { span: 4 },
// componentProps: ({ formModel }) => {
// return {
// options: TFData,
// onchange: (e) => {
// if (e) {
// formModel.feeName = '海运费'
// }
// },
// }
// },
// },
{
label: '船名',
field: 'vessel',
field: 'vesselId',
component: 'ApiSelect',
required: false,
dynamicDisabled: false,
@ -256,42 +257,43 @@ export const schemas: FormSchema[] = [
api: GetVoynoSelectList,
immediate: true,
labelField: 'voyNo',
valueField: 'id',
resultField: 'data',
filterOption: (input: string, option: any) => {
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
},
}
},
},
{
label: '国外代理',
field: 'forwarderId',
component: 'ApiSelect',
required: false,
dynamicDisabled: false,
colProps: { span: 4 },
componentProps: ({ formModel }) => {
return {
api: GetAgentCnClientList,
labelField: 'shortName',
valueField: 'id',
valueField: 'voyNo',
resultField: 'data',
filterOption: (input: string, option: any) => {
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
},
onChange: (e, obj) => {
if (e) {
formModel.forwarder = obj.label
} else {
formModel.forwarder = ''
}
},
}
},
},
// {
// label: '国外代理',
// field: 'forwarderId',
// component: 'ApiSelect',
// required: false,
// dynamicDisabled: false,
// colProps: { span: 4 },
// componentProps: ({ formModel }) => {
// return {
// api: GetSupplierListByCode,
// params: { code: 'agent' },
// labelField: 'shortName',
// valueField: 'id',
// resultField: 'data',
// filterOption: (input: string, option: any) => {
// return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
// },
// onChange: (e, obj) => {
// if (e) {
// formModel.forwarder = obj.label
// } else {
// formModel.forwarder = ''
// }
// },
// }
// },
// },
{
label: '港口(国外)',
label: '卸货港',
field: 'dischargePortId',
component: 'ApiSelect',
required: false,
@ -303,7 +305,8 @@ export const schemas: FormSchema[] = [
return new Promise((resolve) => {
GetClientPortSelectList().then((res) => {
res.data.forEach((item) => {
if (item.ediCode) item.cnName = item.ediCode + '/' + item.cnName
if (item.ediCode)
item.cnName = item.ediCode + '/' + item.cnName + '/' + item.portName
})
resolve(res)
})
@ -320,7 +323,7 @@ export const schemas: FormSchema[] = [
},
},
{
label: '口(国内)',
label: '装货港',
field: 'loadPortId',
component: 'ApiSelect',
required: false,
@ -332,7 +335,8 @@ export const schemas: FormSchema[] = [
return new Promise((resolve) => {
GetClientPortSelectList().then((res) => {
res.data.forEach((item) => {
if (item.ediCode) item.cnName = item.ediCode + '/' + item.cnName
if (item.ediCode)
item.cnName = item.ediCode + '/' + item.cnName + '/' + item.portName
})
resolve(res)
})

@ -1,49 +1,48 @@
<template>
<div>
<div class="topTable">
<BasicTable
class="ds-table"
@register="registerTable"
@row-dbClick="
(e) => {
GoDetailed(true, e)
}
"
>
<template #tableTitle>
<div class="ds-h-aciton-btns-fee">
<a-tooltip placement="top" :mouseEnterDelay="0.5">
<template #title>
<span>新增</span>
</template>
<span @click="GoDetailed(false, null)" class="ds-action-svg-btn">
<img src="../../../assets/svg/infoclient/xinjian.svg" class="SvgImg" />
</span>
</a-tooltip>
<a-tooltip placement="top" :mouseEnterDelay="0.5">
<template #title>
<span>删除</span>
</template>
<a-popconfirm
title="确定删除当前选中数据?"
@confirm="FnDel"
ok-text="是"
cancel-text="否"
>
<span class="ds-action-svg-btn">
<img src="../../../assets/svg/infoclient/shanchu.svg" class="SvgImg" />
</span>
</a-popconfirm>
</a-tooltip>
<a-tooltip placement="top" :mouseEnterDelay="0.5">
<template #title>
<span>打印</span>
</template>
<span @click="printFee" class="ds-action-svg-btn">
<img src="../../../assets/svg/infoclient/dayin.svg" class="SvgImg" />
<div class="topTable">
<BasicTable
class="ds-table"
@register="registerTable"
@row-dbClick="
(e) => {
GoDetailed(true, e)
}
"
>
<template #tableTitle>
<div class="ds-h-aciton-btns-fee">
<a-tooltip placement="top" :mouseEnterDelay="0.5">
<template #title>
<span>新增</span>
</template>
<span @click="GoDetailed(false, null)" class="ds-action-svg-btn">
<img src="../../../assets/svg/infoclient/xinjian.svg" class="SvgImg" />
</span>
</a-tooltip>
<a-tooltip placement="top" :mouseEnterDelay="0.5">
<template #title>
<span>删除</span>
</template>
<a-popconfirm
title="确定删除当前选中数据?"
@confirm="FnDel"
ok-text="是"
cancel-text="否"
>
<span class="ds-action-svg-btn">
<img src="../../../assets/svg/infoclient/shanchu.svg" class="SvgImg" />
</span>
</a-tooltip>
<!-- <a-tooltip placement="top" :mouseEnterDelay="0.5">
</a-popconfirm>
</a-tooltip>
<a-tooltip placement="top" :mouseEnterDelay="0.5">
<template #title>
<span>打印</span>
</template>
<span @click="printFee" class="ds-action-svg-btn">
<img src="../../../assets/svg/infoclient/dayin.svg" class="SvgImg" />
</span>
</a-tooltip>
<!-- <a-tooltip placement="top" :mouseEnterDelay="0.5">
<template #title>
<span>分享</span>
</template>
@ -51,73 +50,72 @@
<img src="../../../assets/svg/infoclient/tijiao.svg" class="SvgImg" />
</span>
</a-tooltip> -->
<a-tooltip placement="top" :mouseEnterDelay="0.5">
<template #title>
<span>导出excel</span>
</template>
<span @click="ExportExcel" class="ds-action-svg-btn" style="padding-top: 4px">
<SvgIcon size="16" name="export" />
</span>
</a-tooltip>
<a-tooltip placement="top" :mouseEnterDelay="0.5">
<template #title>
<span>提交锁定</span>
</template>
<span @click="Lock" class="ds-action-svg-btn">
<img src="../../../assets/icons/lock.svg" class="SvgImg" />
</span>
</a-tooltip>
<a-tooltip placement="top" :mouseEnterDelay="0.5">
<template #title>
<span>解除锁定</span>
</template>
<span @click="UnLock" class="ds-action-svg-btn">
<img src="../../../assets/icons/openLock.svg" class="SvgImg" />
</span>
</a-tooltip>
</div>
<div class="buttonGroup">
<!-- <a-button v-repeat type="link" @click="generated">
<a-tooltip placement="top" :mouseEnterDelay="0.5">
<template #title>
<span>导出excel</span>
</template>
<span @click="ExportExcel" class="ds-action-svg-btn" style="padding-top: 4px">
<SvgIcon size="16" name="export" />
</span>
</a-tooltip>
<a-tooltip placement="top" :mouseEnterDelay="0.5">
<template #title>
<span>提交锁定</span>
</template>
<span @click="Lock" class="ds-action-svg-btn">
<img src="../../../assets/icons/lock.svg" class="SvgImg" />
</span>
</a-tooltip>
<a-tooltip placement="top" :mouseEnterDelay="0.5">
<template #title>
<span>解除锁定</span>
</template>
<span @click="UnLock" class="ds-action-svg-btn">
<img src="../../../assets/icons/openLock.svg" class="SvgImg" />
</span>
</a-tooltip>
</div>
<div class="buttonGroup">
<!-- <a-button v-repeat type="link" @click="generated">
<span class="iconfont icon-renwu_ IconColor"></span>
生成发票申请
</a-button> -->
</div>
</template>
<template v-slot:bodyCell="{ column, record }">
<template v-if="column.dataIndex == 'billNo'">
<div class="billNo">
<span
v-if="record.billNo"
@click="FnCopy(record.billNo)"
class="iconfont icon-fuzhi3"
></span>
<span>{{ record.billNo }}</span>
</div>
</template>
<template v-slot:bodyCell="{ column, record }">
<template v-if="column.dataIndex == 'billNo'">
<div class="billNo">
<span
v-if="record.billNo"
@click="FnCopy(record.billNo)"
class="iconfont icon-fuzhi3"
></span>
<span>{{ record.billNo }}</span>
</div>
</template>
<template v-if="column.key === 'action'">
<TableAction
:actions="[
{
icon: 'clarity:note-edit-line',
tooltip: '编辑',
onClick: () => {
GoDetailed(true, record)
},
<template v-if="column.key === 'action'">
<TableAction
:actions="[
{
icon: 'clarity:note-edit-line',
tooltip: '编辑',
onClick: () => {
GoDetailed(true, record)
},
]"
/>
</template>
<template v-if="column.dataIndex == 'isLocking'">
<span v-if="record.isLocking">
<i class="iconfont icon-locksuo"></i>
</span>
<span v-else> <i class="iconfont icon-a-jiesuo1_jiesuo"></i> </span>
</template>
},
]"
/>
</template>
</BasicTable>
</div>
<template v-if="column.dataIndex == 'isLocking'">
<span v-if="record.isLocking">
<i class="iconfont icon-locksuo"></i>
</span>
<span v-else> <i class="iconfont icon-a-jiesuo1_jiesuo"></i> </span>
</template>
</template>
</BasicTable>
<!-- 合计 -->
<div>
<div class="static-box">
<a-table
class="ds-table"
:columns="calcColumns"
@ -150,6 +148,7 @@
import { formatParams } from '/@/hooks/web/common'
import { useAppStore } from '/@/store/modules/app'
const appStore = useAppStore()
const tbHeight = window.innerHeight - 350
//
const [registerTable, { reload, getForm, getPaginationRef, getSelectRows, getRawDataSource }] =
useTable({
@ -164,7 +163,7 @@
})
appStore.setIds(ids, 'khdz')
}
resolve({ data: [...res.data.list], total: res.count })
resolve({ data: [...res.data.list], total: res.data.totalCount })
})
},
//
@ -225,6 +224,9 @@
canResize: true,
resizeHeightOffset: 90,
immediate: true,
tableComponent: 'vxe',
autoHeight: tbHeight,
id: '1',
actionColumn: {
width: 80,
title: '操作',
@ -375,7 +377,7 @@
width: 110,
},
{
title: '应付RBM',
title: '应付RMB',
dataIndex: 'rmbcr',
width: 110,
},
@ -479,7 +481,12 @@
cursor: pointer;
}
.topTable {
height: calc(100vh - 145px);
// height: calc(100vh - 145px);
.static-box {
position: fixed;
bottom: 0;
padding-left: 20px;
}
}
.ds-h-aciton-btns-fee {
display: flex;

Loading…
Cancel
Save