对账 接口对接

szh-new
张同海 6 months ago
parent 92233e6236
commit 313f9e06c4

@ -1,6 +1,6 @@
.nav {
display: inline-block;
margin-right: 8px;
margin: 0 8px 0 0;
cursor: pointer;
border: 1px solid rgba(255, 255, 255, 0);
padding: 0 10px;

@ -1,18 +1,99 @@
import { request } from '/@/utils/request'
// 客户对账列表 (Auth)
export function GetCheckBillList(parameter) {
return request({
url: '/checkApi/CheckBill/GetCheckBillList',
method: 'post',
data: parameter,
})
}
// 客户对账详情 (Auth)
export function GetCheckBillInfo(parameter) {
return request({
url: '/checkApi/CheckBill/GetCheckBillInfo',
method: 'get',
params: parameter,
})
}
// 客户对账明细列表 (Auth)
export function GetCheckBillBusinessList(parameter) {
return request({
url: '/checkApi/CheckBill/GetCheckBillBusinessList',
method: 'post',
data: parameter,
})
}
// 客户对账明细对应费用列表 (Auth)
export function GetCheckBillFeeRecordsList(parameter) {
return request({
url: '/checkApi/CheckBill/GetCheckBillFeeRecordsList',
method: 'post',
data: parameter,
})
}
// 对账明细批量删除 (Auth)
export function BatchDelCheckBillDetail(parameter) {
return request({
url: '/checkApi/CheckBill/BatchDelCheckBillDetail',
method: 'post',
data: parameter,
})
}
// 对账明细费用批量删除 (Auth)
export function BatchDelCheckBillFeeRecords(parameter) {
return request({
url: '/checkApi/CheckBill/BatchDelCheckBillFeeRecords',
method: 'post',
data: parameter,
})
}
// 对账明细添加 (Auth)
export function AddCheckBillDetail(parameter) {
return request({
url: '/checkApi/CheckBill/AddCheckBillDetail',
method: 'post',
data: parameter,
})
}
// 对账明细费用添加 (Auth)
export function AddCheckBillFeeRecords(parameter) {
return request({
url: '/checkApi/CheckBill/AddCheckBillFeeRecords',
method: 'post',
data: parameter,
})
}
// 客户对账明细查询列表 (Auth)
export function GetCheckBillDetailList(parameter) {
export function GetBusinessQueryList(parameter) {
return request({
url: '/checkApi/CheckBill/GetBusinessQueryList',
method: 'post',
data: parameter,
})
}
// 客户对账明细查询费用明细 (Auth)
export function GetFeeRecordQueryList(parameter) {
return request({
url: '/checkApi/CheckBill/GetFeeRecordQueryList',
method: 'post',
data: parameter,
})
}
// 锁定 (Auth)
export function CheckBillLocking(parameter) {
return request({
url: '/checkApi/CheckBill/CheckBillLocking',
method: 'post',
data: parameter,
})
}
// 解除锁定 (Auth)
export function CheckBillUnLocking(parameter) {
return request({
url: '/checkApi/CheckBill/GetCheckBillDetailList',
url: '/checkApi/CheckBill/CheckBillUnLocking',
method: 'post',
data: parameter,
})
}
// // 详情 (Auth)
// export function BookingOrderGet(parameter) {
// return request({
// url: '/opApi/SeaExport/GetSeaExportInfo',
// method: 'get',
// params: parameter,
// })
// }

@ -74,21 +74,38 @@ export const searchFormSchema: FormSchema[] = [
// colProps: { span: 2 },
// },
]
const billTypeData = [
{ code: 0, value: '全部' },
{ code: 1, value: '应收' },
{ code: 2, value: '应付' },
]
//列表
export const columns: BasicColumn[] = [
{ title: '对账编号', dataIndex: 'testInput', align: 'left' },
{ title: '客户名称', dataIndex: 'testTextarea1', align: 'left' },
{ title: '对账日期', dataIndex: 'testTextarea2', align: 'left' },
{ title: '对账人', dataIndex: 'testTextarea3', align: 'left' },
{ title: '状态', dataIndex: 'testTextarea4', align: 'left' },
{ title: '已开发票', dataIndex: 'testTextarea5', align: 'left' },
{ title: '应收RMB', dataIndex: 'testTextarea6', align: 'left' },
{ title: '未收RMB', dataIndex: 'testTextarea7', align: 'left' },
{ title: '应收USD', dataIndex: 'testTextarea8', align: 'left' },
{ title: 'USD未收', dataIndex: 'testTextarea9', align: 'left' },
{ title: '应付RBM', dataIndex: 'testTextarea10', align: 'left' },
{ title: '未付RMB', dataIndex: 'testTextarea11', align: 'left' },
{ title: '应付USD', dataIndex: 'testTextarea12', align: 'left' },
{ title: '未付USD', dataIndex: 'testTextarea13', align: 'left' },
{ title: '说明', dataIndex: 'testTextarea14', align: 'left' },
{ title: '对账编号', dataIndex: 'billNo', align: 'left' },
{ title: '对账单名称', dataIndex: 'billName', align: 'left' },
{
title: '收付类型',
dataIndex: 'billType',
align: 'left',
customRender: ({ text }) => {
let RData = '-'
billTypeData.forEach((e) => {
if (e.code == text) {
RData = e.value
}
})
return RData
},
},
{ title: '对账客户名称', dataIndex: 'customerName', align: 'left' },
{ title: '账单状态', dataIndex: 'isLocking', align: 'left' },
{ title: '是否不含税', dataIndex: 'isNoTax', align: 'left' },
{ title: '应收RMB', dataIndex: 'rmbdr', align: 'left' },
{ 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: 'balrmbcr', align: 'left' },
{ title: '应付USD', dataIndex: 'usdcr', align: 'left' },
{ title: '未付USD', dataIndex: 'balusdcr', align: 'left' },
]

@ -6,8 +6,14 @@
<div class="nav"> <i class="iconfont icon-dayinxiaopiao"></i>模板打印</div>
<div class="nav"> <i class="iconfont icon-icon_baocun"></i>保存并关闭</div>
<div class="nav"> <i class="iconfont icon-icon_baocun"></i>保存并新建</div>
<div class="nav"> <Icon icon="ant-design:lock-outlined" class="iconfont" /> 锁定</div>
<div class="nav"> <Icon icon="ant-design:unlock-outlined" class="iconfont" />撤销锁定</div>
<div class="nav" @click="Lock">
<Icon icon="ant-design:lock-outlined" class="iconfont" />
锁定
</div>
<div class="nav" @click="UnLock">
<Icon icon="ant-design:unlock-outlined" class="iconfont" />
撤销锁定
</div>
<div class="nav"> <i class="iconfont icon-jiahao2fill"></i>费用提交审核</div>
</div>
<a-tabs v-model:activeKey="activeKey" type="card" class="CsTabs">
@ -29,10 +35,18 @@
<div class="nav" @click="addDetail">
<i class="iconfont icon-jiahao2fill"></i>增加账单明细
</div>
<div class="nav">
<i class="iconfont icon-shanchu2"></i>
删除账单明细
</div>
<a-popconfirm
title="是否要删除选中数据?"
ok-text="是"
cancel-text="否"
@confirm="DelDetailL"
>
<div class="nav">
<i class="iconfont icon-shanchu2"></i>
删除账单明细
</div>
</a-popconfirm>
<div class="nav" @click="RowClick">
<i class="iconfont icon-bianjiwenjian"></i>
测试 后期改为双击
@ -45,10 +59,17 @@
<BasicTable @register="registerTableR">
<template #toolbar>
<div class="buttonGroup">
<div class="nav">
<i class="iconfont icon-shanchu2"></i>
删除账单费用明细
</div>
<a-popconfirm
title="是否要删除选中数据?"
ok-text="是"
cancel-text="否"
@confirm="DelDetailR"
>
<div class="nav">
<i class="iconfont icon-shanchu2"></i>
删除账单费用明细
</div>
</a-popconfirm>
</div>
</template>
</BasicTable>
@ -83,14 +104,48 @@
</template>
<script lang="ts" setup>
import { ref } from 'vue'
import { BasicForm, FormSchema, useForm } from '/@/components/Form/index'
import { useRoute } from 'vue-router'
const route = useRoute()
import { useMessage } from '/@/hooks/web/useMessage'
const { notification } = useMessage()
import { BasicForm, useForm } from '/@/components/Form/index'
import { BasicTable, useTable } from '/@/components/Table'
import { BasicModal, useModal } from '/@/components/Modal'
import Info from './info/index.vue'
import ShowData from './showData/index.vue'
import { columnsL, columnsR, columnsFile, schemas, schemasFile } from './detailColumns'
import {
GetCheckBillInfo,
GetCheckBillBusinessList,
GetCheckBillFeeRecordsList,
BatchDelCheckBillDetail,
BatchDelCheckBillFeeRecords,
CheckBillLocking,
CheckBillUnLocking,
} from '/@/views/operation/CustomerReconciliation/api.js'
const id = ref(route.query.id)
init()
function init() {
if (id.value) {
let ApiData = {
queryCondition: `[{"FieldName":"businessId","FieldValue":"${id.value}","ConditionalType":1}]`,
pageCondition: {
sortConditions: [],
},
}
GetCheckBillInfo({ id: id.value }).then((res) => {
console.log(res, '详情数据暂未填写')
})
GetCheckBillBusinessList(ApiData).then((res) => {
console.log(res, '详情数据暂未填写')
})
GetCheckBillFeeRecordsList(ApiData).then((res) => {
console.log(res, '详情数据暂未填写')
})
}
}
//
const [registerForm, methods] = useForm({
const [registerForm] = useForm({
labelWidth: 120,
schemas,
showActionButtonGroup: false,
@ -101,36 +156,28 @@
disabled: false,
})
//
const [registerTableL] = useTable({
const [registerTableL, { getSelectRows: getSelectRowsL }] = useTable({
title: '',
// api: async (p) => {
// const res: API.DataResult = await ApiList(p)
// return new Promise((resolve) => {
// resolve({ data: [...res.data], total: res.count })
// })
// },
rowSelection: { type: 'checkbox' },
columns: columnsL,
pagination: true,
striped: true,
showTableSetting: true,
showTableSetting: false,
bordered: true,
showIndexColumn: true,
canResize: false,
immediate: false,
})
//
const [registerTableR] = useTable({
const [registerTableR, { getSelectRows: getSelectRowsR }] = useTable({
title: '',
// api: async (p) => {
// const res: API.DataResult = await ApiList(p)
// return new Promise((resolve) => {
// resolve({ data: [...res.data], total: res.count })
// })
// },
rowSelection: { type: 'checkbox' },
columns: columnsR,
pagination: true,
striped: true,
showTableSetting: true,
showTableSetting: false,
bordered: true,
showIndexColumn: true,
canResize: false,
@ -139,16 +186,11 @@
//
const [registerTableFile] = useTable({
title: '',
// api: async (p) => {
// const res: API.DataResult = await ApiList(p)
// return new Promise((resolve) => {
// resolve({ data: [...res.data], total: res.count })
// })
// },
rowSelection: { type: 'checkbox' },
columns: columnsFile,
pagination: true,
striped: true,
showTableSetting: true,
showTableSetting: false,
bordered: true,
showIndexColumn: true,
canResize: false,
@ -160,6 +202,38 @@
function addDetail() {
openModalAdd(true, {})
}
//
function DelDetailL() {
if (getSelectRowsL().length) {
let Apidata: any = {
ids: [],
}
getSelectRowsL().forEach((item) => {
Apidata.ids.push(item.id)
})
BatchDelCheckBillDetail(Apidata).then((res) => {
console.log(res)
})
} else {
notification.warning({ message: '请至少选择一条数据', duration: 3 })
}
}
//
function DelDetailR() {
if (getSelectRowsR().length) {
let Apidata: any = {
ids: [],
}
getSelectRowsR().forEach((item) => {
Apidata.ids.push(item.id)
})
BatchDelCheckBillFeeRecords(Apidata).then((res) => {
console.log(res)
})
} else {
notification.warning({ message: '请至少选择一条数据', duration: 3 })
}
}
//
const [registerEdit, { openModal: openModalEdit }] = useModal()
//
@ -184,6 +258,24 @@
disabled: false,
})
const activeKey = ref('1')
//
function Lock() {
let ApiData = {
id: id.value,
}
CheckBillLocking(ApiData).then((res) => {
console.log(res)
})
}
//
function UnLock() {
let ApiData = {
id: id.value,
}
CheckBillUnLocking(ApiData).then((res) => {
console.log(res)
})
}
</script>
<style lang="less">
@ -195,6 +287,7 @@
.buttonBox {
background: #fff;
padding: 5px 10px;
margin-bottom: 5px;
}
.CsTabs {
.ant-tabs-nav {

@ -15,22 +15,35 @@
</a-row>
<a-row class="p-4 CsBottom" :gutter="5">
<a-col :span="17" class="bottomTableL">
<BasicTable @register="registerTableL">
<BasicTable @register="registerTableL" @selection-change="selectionChange">
<template #toolbar>
<a-button size="small" type="primary" @click="addDetail"> </a-button>
<a-button size="small" type="primary" @click="addDetailL"> </a-button>
</template>
</BasicTable>
</a-col>
<a-col :span="7" class="bottomTableR">
<BasicTable @register="registerTableRT">
<BasicTable @register="registerTableRT" rowKey="id" :maxHeight="300">
<template #toolbar>
<a-button size="small" type="primary" @click="addDetail"> </a-button>
<a-button size="small" type="primary" @click="addDetailR">
增加账单费用明细
</a-button>
</template>
</BasicTable>
<BasicTable style="height: '50%'" @register="registerTableRB"></BasicTable>
</a-col>
</a-row>
</div>
<template #footer>
<a-button
pre-icon="ant-design:close-outlined"
type="warning"
ghost
style="margin-right: 0.8rem"
@click="closeModal"
>
取消
</a-button>
</template>
</BasicModal>
</template>
<script lang="ts" setup>
@ -39,7 +52,12 @@
import { BasicTable, useTable } from '/@/components/Table'
import { BasicModal, useModalInner } from '/@/components/Modal'
import { columnsL, columnsRT, columnsRB, schemas } from './infoColumns'
import { GetCheckBillDetailList } from '/@/views/operation/CustomerReconciliation/api.js'
import {
GetBusinessQueryList,
GetFeeRecordQueryList,
AddCheckBillDetail,
AddCheckBillFeeRecords,
} from '/@/views/operation/CustomerReconciliation/api.js'
//
const [registerForm, methods] = useForm({
labelWidth: 120,
@ -54,45 +72,37 @@
})
const dataSourceL = ref<any>([])
//
const [registerTableL, { getPaginationRef, setTableData, getDataSource }] = useTable({
const [
registerTableL,
{ getPaginationRef, setTableData, getSelectRows: getSelectRowsL, getDataSource },
] = useTable({
title: '',
dataSource: dataSourceL.value,
// api: async (p) => {
// const res: API.DataResult = await GetCheckBillDetailList(p)
// 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.mblno) {
// condition.push({
// FieldName: 'mblno',
// FieldValue: data.mblno,
// ConditionalType: 1,
// })
// }
// postParam.queryCondition = JSON.stringify(condition)
// return postParam
// },
rowSelection: { type: 'checkbox' },
clickToRowSelect: true,
columns: columnsL,
pagination: true,
striped: true,
showTableSetting: true,
showTableSetting: false,
bordered: true,
canResize: false,
immediate: true,
})
//
function selectionChange(e) {
let ApiData = {
queryCondition: `[{"FieldName":"businessId","FieldValue":"${
e.rows[e.rows.length - 1].id
}","ConditionalType":1}]`,
pageCondition: {
sortConditions: [],
},
}
GetFeeRecordQueryList(ApiData).then((res) => {
setTableDataRT(res.data)
console.log(res)
})
}
function beforeFetch() {
var currentPageInfo: any = getPaginationRef()
const postParam: API.PageRequest = {
@ -109,12 +119,10 @@
}
//
const [registerModal, { setModalProps, closeModal }] = useModalInner(async (data) => {
console.log('????????????????????', data)
dataSourceL.value = []
setTableData([])
setModalProps({ confirmLoading: true, loading: true })
console.log()
const res: API.DataResult = await GetCheckBillDetailList(beforeFetch())
const res: API.DataResult = await GetBusinessQueryList(beforeFetch())
if (res.succeeded) {
dataSourceL.value = res.data
setTableData([...res.data])
@ -122,23 +130,19 @@
setModalProps({ confirmLoading: false, loading: false })
})
//
const [registerTableRT] = useTable({
title: '',
// api: async (p) => {
// const res: API.DataResult = await ApiList(p)
// return new Promise((resolve) => {
// resolve({ data: [...res.data], total: res.count })
// })
// },
columns: columnsRT,
pagination: true,
striped: true,
showTableSetting: true,
bordered: true,
showIndexColumn: true,
canResize: false,
immediate: false,
})
const [registerTableRT, { setTableData: setTableDataRT, getSelectRows: getSelectRowsR }] =
useTable({
title: '',
rowSelection: { type: 'checkbox' },
columns: columnsRT,
pagination: false,
striped: true,
showTableSetting: false,
bordered: true,
showIndexColumn: true,
canResize: false,
immediate: false,
})
//
const [registerTableRB] = useTable({
title: '',
@ -157,11 +161,32 @@
canResize: false,
immediate: false,
})
function addDetail() {
console.log('添加')
// openModal(true)
// id id idsid
//
function addDetailL() {
let Apidata: any = {
ids: [],
}
getSelectRowsL().forEach((item) => {
console.log(item)
Apidata.ids.push(item.id)
})
AddCheckBillDetail(Apidata).then((res) => {
console.log(res)
})
}
//
function addDetailR() {
let Apidata: any = {
ids: [],
}
getSelectRowsR().forEach((item) => {
console.log(item)
Apidata.ids.push(item.id)
})
AddCheckBillFeeRecords(Apidata).then((res) => {
console.log(res)
})
}
</script>

@ -11,21 +11,22 @@ export const schemas: FormSchema[] = [
{ field: 'field4', component: 'DatePicker', label: '从费用日期', colProps: { span: 3 } },
{ field: 'field5', component: 'DatePicker', label: '到费用日期', colProps: { span: 3 } },
{
field: '',
field: 'CZ',
component: 'Button',
label: '',
colProps: { span: 2 },
componentProps: ({ formModel }) => {
componentProps: ({ formActionType }) => {
return {
text: '重置条件',
icon: 'icon-guanbi',
onClick: (e) => {
console.log(e)
if (e && formActionType) {
formActionType.resetFields()
}
},
}
},
},
{ field: 'field7', component: 'Select', label: '收付', colProps: { span: 2 } },
{ field: 'field8', component: 'Select', label: '币别', colProps: { span: 2 } },
{ field: 'field7', component: 'Select', label: 'FRT', colProps: { span: 2 } },
@ -36,7 +37,7 @@ export const schemas: FormSchema[] = [
{ field: 'field9', component: 'Select', label: '费用名称', colProps: { span: 3 } },
{ field: 'field9', component: 'Select', label: '费用范围', colProps: { span: 3 } },
{
field: '',
field: 'CS',
component: 'Button',
label: '',
colProps: { span: 2 },
@ -85,16 +86,17 @@ export const columnsL: BasicColumn[] = [
]
//右上列表
export const columnsRT: BasicColumn[] = [
{ title: '客户名称', width: '80px', dataIndex: 'testInput', align: 'left' },
{ title: '收付', width: '80px', dataIndex: 'testTextarea1', align: 'left' },
{ title: '费用名称', width: '80px', dataIndex: 'testTextarea2', align: 'left' },
{ title: '金额', width: '80px', dataIndex: 'testTextarea3', align: 'left' },
{ title: '币别', width: '80px', dataIndex: 'testTextarea4', align: 'left' },
{ title: '未结金额', width: '80px', dataIndex: 'testTextarea5', align: 'left' },
{ title: '不含税金额', width: '120px', dataIndex: 'testTextarea7', align: 'left' },
{ title: '汇率', width: '80px', dataIndex: 'testTextarea8', align: 'left' },
{ title: '单价', width: '80px', dataIndex: 'testTextarea9', align: 'left' },
{ title: '费用备注', width: '80px', dataIndex: 'testTextarea10', align: 'left' },
// { title: '客户名称', width: '80px', dataIndex: 'testInput', align: 'left' },
{ title: '收付', width: '80px', dataIndex: 'feeTypeText', align: 'left' },
{ title: '费用名称', width: '80px', dataIndex: 'feeName', align: 'left' },
{ title: '金额', width: '80px', dataIndex: 'amount', align: 'left' },
{ title: '币别', width: '80px', dataIndex: 'currency', align: 'left' },
{ title: '结算金额', width: '80px', dataIndex: 'settlementAmount', align: 'left' },
{ title: '未结金额', width: '80px', dataIndex: 'noSettlementAmount', align: 'left' },
{ title: '不含税金额', width: '120px', dataIndex: 'noTaxAmount', align: 'left' },
{ title: '汇率', width: '80px', dataIndex: 'exchangeRate', align: 'left' },
{ title: '单价', width: '80px', dataIndex: 'unitPrice', align: 'left' },
{ title: '费用备注', width: '80px', dataIndex: 'remark', align: 'left' },
]
//右下列表
export const columnsRB: BasicColumn[] = [

@ -1,6 +1,13 @@
<template>
<div class="ds-sea-export-table">
<BasicTable @register="registerTable">
<BasicTable
@register="registerTable"
@row-dbClick="
(e) => {
GoDetailed(true, e)
}
"
>
<!-- <template #form-more>
<a-button type="link">多提单号查询</a-button>
<a-button type="link">高级查询</a-button>
@ -8,7 +15,7 @@
<template #toolbar>
<!-- <a-button type="primary" @click="addReconciliation"> </a-button> -->
<div class="buttonGroup">
<div class="nav" @click="addReconciliation">
<div class="nav" @click="GoDetailed(false, null)">
<i class="iconfont icon-jiahao2fill"></i>新建
</div>
</div>
@ -17,7 +24,7 @@
</div>
</template>
<script lang="ts" setup>
import { GetCheckBillDetailList } from './api.js'
import { GetCheckBillList } from './api.js'
import { BasicTable, useTable } from '/@/components/Table'
import { columns, searchFormSchema } from './columns'
import { useGo } from '/@/hooks/web/usePage'
@ -26,7 +33,7 @@
const [registerTable, { reload, getForm, getPaginationRef, getSelectRows }] = useTable({
title: '',
api: async (p) => {
const res: API.DataResult = await GetCheckBillDetailList(p)
const res: API.DataResult = await GetCheckBillList(p)
return new Promise((resolve) => {
resolve({ data: [...res.data], total: res.count })
})
@ -66,10 +73,15 @@
bordered: true,
showIndexColumn: true,
canResize: false,
immediate: false,
immediate: true,
})
function addReconciliation() {
go(`/CustomerReconciliationDetails?type=Add`)
function GoDetailed(type, data) {
if (type) {
console.log(data)
go(`/CustomerReconciliationDetails?id=${data.record.id}`)
} else {
go(`/CustomerReconciliationDetails`)
}
}
</script>

Loading…
Cancel
Save