箱管调整 自动对账应付

dev
张同海 2 weeks ago
parent 2effd70e4f
commit 831d6ae746

@ -86,7 +86,7 @@
}
function GetState() {
let RData: any = null
if (state.value || state.value === false) {
if (state.value || state.value === false || state.value === 0) {
if (props.treeData.length) {
let FnFor = (Data) => {
Data.forEach((item: any) => {

@ -46,7 +46,7 @@
const refInfoModal = ref()
const [registerModal, { openModal }] = useModal()
const [registerInfoModal, { openModal: openInfoModal }] = useModal()
const [registerTable, { reload, getVxeSelectRows }] = useTable({
const [registerTable, { reload, getDataSource }] = useTable({
title: '集装箱信息列表',
api: async (p) => {
const res: API.DataResult = await ApiList(p)
@ -103,7 +103,6 @@
CM_ctnSize = item
}
if (item.FieldName == 'stateTime') {
console.log(item)
item.FieldValue = moment().subtract(item.FieldValue, 'days').format('YYYY-MM-DD')
item.ConditionalType = 4
}
@ -182,14 +181,7 @@
id: '0',
autoHeight: window.innerHeight - 325.5,
})
function handleCreate() {
const select = getVxeSelectRows()
openModal(true, {
isParent: false,
isUpdate: false,
select,
})
}
function handleAudit(record: Recordable) {
openInfoModal(true, {
cntrno: record.cntrno,
@ -211,11 +203,7 @@
visible: true,
})
})
console.log(getVxeSelectRows())
getVxeSelectRows().forEach((item: any) => {
console.log(item, item.isOnlineId)
getDataSource().forEach((item: any) => {
if (item.isOnlineId === 0) {
item.isHeavy = item.isHeavy ? '重箱' : '空箱'
ApiData.jsonDataStr.push(item)

@ -5,6 +5,13 @@ enum Api {
edit = '/checkApi/CheckBillAuto/EditCheckBillAutoInfo',
info = '/checkApi/CheckBillAuto/GetCheckBillAutoInfo',
Del = '/checkApi/CheckBillAuto/BatchDelCheckBillAuto',
delDetail = '/checkApi/CheckBillAuto/BatchDelCheckBillAutoDetail',
BasicsList = '/checkApi/CheckBillAuto/GetCheckBillAutoDetailList',
recount = '/checkApi/CheckBillAuto/RecountCheckBillAuto',
create = '/checkApi/CheckBillAuto/CreateCheckBill',
cancel = '/checkApi/CheckBillAuto/CancelCheckBill',
Import = '/checkApi/CheckBillAuto/ImportExcel',
}
// 列表 (Auth)
export function ApiList(data: PageRequest) {
@ -39,3 +46,52 @@ export function ApiDel(data: PageRequest) {
data,
})
}
// 自动对账明细列表 (Auth)
export function ApiBasicsList(data: PageRequest) {
return request<DataResult>({
url: Api.BasicsList,
method: 'post',
data,
})
}
// 自动对账重新匹配 (Auth)
export function ApiRecount(data) {
return request<DataResult>({
url: Api.recount,
method: 'post',
data: data,
})
}
// 生成对账单 (Auth)
export function ApiCreate(data) {
return request<DataResult>({
url: Api.create,
method: 'post',
data: data,
})
}
// 取消生成的对账单 (Auth)
export function ApiCancel(data) {
return request<DataResult>({
url: Api.cancel,
method: 'post',
data: data,
})
}
// 导入对账excel (Auth)
export function ApiImport(data) {
return request<DataResult>({
url: Api.Import,
method: 'post',
data: data.data,
})
}
// 对账明细批量删除 (Auth)
export function ApiDelDetail(data) {
return request<DataResult>({
url: Api.delDetail,
method: 'post',
data: data,
})
}

@ -1,5 +1,14 @@
import { BasicColumn, FormSchema } from '/@/components/Table'
import { GetClientListByCode } from '/@/api/common'
import { GetAllClientList } from '/@/api/common'
import { GetOperatorUserList } from '/@/views/operation/seaexport/api/BookingLedger'
let customerData: any = []
const res11: API.DataResult = await GetAllClientList()
if (res11.succeeded) {
customerData = []
res11.data.forEach((e) => {
customerData.push({ label: e.shortName, value: e.id })
})
}
export const columns: BasicColumn[] = [
{
title: '自动对账编号',
@ -482,66 +491,7 @@ export const formSchema: FormSchema[] = [
// },
// },
]
//左侧列表
export const columnsL: BasicColumn[] = [
// { title: '对账Id', dataIndex: 'checkId', align: 'left' },
// { title: '业务Id', dataIndex: 'businessId', align: 'left' },
// { title: '业务类型', dataIndex: 'businessType', align: 'left' },
{ title: '业务类型', dataIndex: 'businessTypeName', align: 'left' },
{ title: '委托编号', dataIndex: 'customerNo', align: 'left' },
// { title: '委托单位Id', dataIndex: 'customerId', align: 'left' },
{ title: '委托单位', dataIndex: 'customerName', align: 'left' },
{ title: '船名', dataIndex: 'vessel', align: 'left' },
// { title: '船名Id', dataIndex: 'vesselId', align: 'left' },
{ title: '航次', dataIndex: 'voyno', align: 'left' },
{ title: '开船日期', dataIndex: 'etd', align: 'left' },
{ title: '卸货港', dataIndex: 'dischargePort', align: 'left' },
{ title: '集装箱', dataIndex: 'cntrTotal', align: 'left' },
{ title: '财务日期', dataIndex: 'accountDate', align: 'left' },
{ title: '报关单号', dataIndex: 'customNo', align: 'left' },
{ title: '销售人', dataIndex: 'saleName', align: 'left' },
{ title: '操作人员', dataIndex: 'operatorName', align: 'left' },
{ title: '订舱编号', dataIndex: 'orderNo', align: 'left' },
{ title: '主提单号', dataIndex: 'mblno', align: 'left' },
{ title: '分提单号', dataIndex: 'hblno', align: 'left' },
{ title: '约号', dataIndex: 'serviceContractNo', align: 'left' },
{ title: 'RMB应收', dataIndex: 'rmbdr', align: 'left' },
{ title: 'RMB应付', dataIndex: 'rmbcr', align: 'left' },
{ title: 'RMB未收', dataIndex: 'balrmbdr', align: 'left' },
{ title: 'RMB未付', dataIndex: 'balrmbcr', align: 'left' },
{ title: 'USD应收', dataIndex: 'usddr', align: 'left' },
{ title: 'USD应付', dataIndex: 'usdcr', align: 'left' },
{ title: 'USD未收', dataIndex: 'balusddr', align: 'left' },
{ title: 'USD未付', dataIndex: 'balusdcr', align: 'left' },
{ title: '其他应收', dataIndex: 'otherDR', align: 'left' },
{ title: '其他应付', dataIndex: 'otherCR', align: 'left' },
{ title: '其他未收', dataIndex: 'balOtherDR', align: 'left' },
{ title: '其他未付', dataIndex: 'balOtherCR', align: 'left' },
{ title: 'TTL应收', dataIndex: 'ttldr', align: 'left' },
{ title: 'TTL应付', dataIndex: 'ttlcr', align: 'left' },
{ title: 'TTL未收', dataIndex: 'balttldr', align: 'left' },
{ title: 'TTL未付', dataIndex: 'balttlcr', align: 'left' },
{ title: '开票RMB应收', dataIndex: 'orderInvoiceRMBDR', align: 'left' },
{ title: '开票USD应收', dataIndex: 'orderInvoiceUSDDR', align: 'left' },
{ title: '开票RMB应付', dataIndex: 'orderInvoiceRMBCR', align: 'left' },
{ title: '开票USD应付', dataIndex: 'orderInvoiceUSDCR', 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: '费用状态', dataIndex: 'testTextarea6', align: 'left' },
// { title: '应收RMB', dataIndex: 'testTextarea7', align: 'left' },
// { title: '未收RMB', dataIndex: 'testTextarea8', align: 'left' },
// { title: '应收USD', dataIndex: 'testTextarea9', align: 'left' },
// { title: 'USD未收', dataIndex: 'testTextarea10', align: 'left' },
// { title: '应收合计', dataIndex: 'testTextarea11', align: 'left' },
// { title: '未收合计', dataIndex: 'testTextarea12', align: 'left' },
// { title: '应付合计', dataIndex: 'testTextarea13', align: 'left' },
// { title: 'RMB发票申请', dataIndex: 'testTextarea14', align: 'left' },
// { title: 'USD发票申请', dataIndex: 'testTextarea14', align: 'left' },
// { title: '卸货港', dataIndex: 'testTextarea14', align: 'left' },
]
let businessTypeData = [
{ label: '全部', value: 0 },
{ label: '海运出口', value: 1 },
@ -572,31 +522,34 @@ export const schemas: FormSchema[] = [
colProps: { span: 4 },
},
{
label: '结算人名称',
field: 'settlerName',
label: '结算人',
field: 'settlerId',
component: 'Input',
show: false,
},
{
field: 'settlerName',
label: '结算人',
field: 'settlerId',
component: 'ApiSelect',
required: false,
dynamicDisabled: false,
// defaultValue: '',
colProps: { span: 4 },
componentProps: (a) => {
componentProps: ({ formModel }) => {
return {
api: GetClientListByCode,
params: { code: '' },
labelField: 'shortName',
valueField: 'id',
showName: 'description',
resultField: 'data',
api: GetOperatorUserList,
labelField: 'pinYinCode',
valueField: 'userName',
showName: 'userName',
allowClear: true,
showSearch: true,
immediate: false,
resultField: 'data',
onChange: (e, obj) => {
if (e && obj) {
a.formModel.settlerName = obj.shortName
formModel.settlerId = obj.id
formModel.settlerName = obj.pinYinCode
}
if (!e && !obj) {
formModel.settlerId = ''
formModel.settlerName = ''
}
},
}
@ -723,37 +676,39 @@ export const schemas: FormSchema[] = [
},
},
{
label: '对账客户Nmae',
field: 'customerName',
label: '对账客户',
field: 'customerId',
component: 'Input',
show: false,
},
{
field: 'customerName',
label: '对账客户',
field: 'customerId',
component: 'ApiSelect',
required: false,
dynamicDisabled: false,
// defaultValue: '',
colProps: { span: 4 },
componentProps: (a) => {
componentProps: ({ formModel }) => {
return {
api: GetClientListByCode,
params: { code: '' },
api: GetAllClientList,
labelField: 'shortName',
valueField: 'id',
showName: 'description',
resultField: 'data',
showName: 'shortName',
allowClear: true,
showSearch: true,
immediate: false,
resultField: 'data',
onChange: (e, obj) => {
if (e && obj) {
a.formModel.customerName = obj.shortName
formModel.customerId = obj.id
formModel.customerName = obj.pinYinCode
}
if (!e && !obj) {
formModel.customerId = ''
formModel.customerName = ''
}
},
}
},
},
{
field: 'settlementTime',
label: '结算日期',
@ -772,6 +727,13 @@ export const schemas: FormSchema[] = [
component: 'Input',
colProps: { span: 4 },
},
// ---------------
{
field: 'note',
label: '备注',
component: 'Input',
colProps: { span: 4 },
},
]
// 表单
export const Editschemas: FormSchema[] = [
@ -923,18 +885,17 @@ export const Editschemas: FormSchema[] = [
dynamicDisabled: false,
// defaultValue: '',
colProps: { span: 4 },
componentProps: (e) => {
componentProps: (a) => {
return {
api: GetClientListByCode,
params: { code: '' },
labelField: 'shortName',
valueField: 'id',
showName: 'description',
resultField: 'data',
immediate: false,
options: customerData,
allowClear: true,
showSearch: true,
filterOption: (input: string, option: any) => {
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
},
onChange: (e, obj) => {
if (e && obj) {
e.formModel.customerName = obj.shortName
a.formModel.customerName = obj.label
}
},
onEdit: () => {
@ -944,12 +905,33 @@ export const Editschemas: FormSchema[] = [
}
},
},
{
field: 'feeScope',
label: '费用范围',
component: 'DEdit',
required: false,
dynamicDisabled: false,
colProps: { span: 4 },
componentProps: (e) => {
componentProps: {
options: billTypeData,
allowClear: true,
showSearch: true,
filterOption: (input: string, option: any) => {
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
},
onEdit: () => {
const { formActionType } = e
formActionType ? formActionType.linkageForm(e) : null
},
},
},
{
label: '结算人',
field: 'settlerId',
component: 'DEdit',
show: false,
componentProps: ({ formModel }) => {
return {
onEdit: () => {
const { formActionType } = e
@ -959,31 +941,29 @@ export const Editschemas: FormSchema[] = [
},
},
{
label: '结算人名称',
field: 'settlerName',
component: 'Input',
show: false,
},
{
label: '结算人',
field: 'settlerId',
component: 'DEdit',
required: false,
dynamicDisabled: false,
// defaultValue: '',
colProps: { span: 4 },
componentProps: (e) => {
return {
api: GetClientListByCode,
params: { code: '' },
labelField: 'shortName',
valueField: 'id',
showName: 'description',
resultField: 'data',
api: GetOperatorUserList,
labelField: 'pinYinCode',
valueField: 'userName',
showName: 'userName',
allowClear: true,
showSearch: true,
immediate: false,
resultField: 'data',
onChange: (e, obj) => {
const { formModel } = e
if (e && obj) {
a.formModel.settlerName = obj.shortName
formModel.settlerId = obj.id
formModel.settlerName = obj.pinYinCode
}
if (!e && !obj) {
formModel.settlerId = ''
formModel.settlerName = ''
}
},
onEdit: () => {
@ -993,6 +973,7 @@ export const Editschemas: FormSchema[] = [
}
},
},
{
field: 'settlementTime',
label: '结算日期',
@ -1054,3 +1035,90 @@ export const Editschemas: FormSchema[] = [
},
},
]
// 详情 明细表格
export const formcolumns: BasicColumn[] = [
{
title: '主提单号',
dataIndex: 'mblno',
sorter: true,
width: 150,
},
{
title: '本地RMB金额',
dataIndex: 'rmbLocalAmount',
sorter: true,
width: 150,
},
{
title: '本地USD金额',
dataIndex: 'usdLocalAmount',
sorter: true,
width: 150,
},
{
title: '对账RMB金额',
dataIndex: 'rmbCheckAmount',
sorter: true,
width: 150,
},
{
title: '对账USD金额',
dataIndex: 'usdCheckAmount',
sorter: true,
width: 150,
},
{
title: 'RMB差异金额',
dataIndex: 'rmbDifferenceAmount',
sorter: true,
width: 150,
},
{
title: 'USD差异金额',
dataIndex: 'usdDifferenceAmount',
sorter: true,
width: 150,
},
{
title: '结算单位',
dataIndex: 'customerName',
sorter: true,
width: 150,
},
{
title: '开船日期',
dataIndex: 'etd',
sorter: true,
width: 150,
},
{
title: '船名',
dataIndex: 'vessel',
sorter: true,
width: 150,
},
{
title: '海关航次',
dataIndex: 'voyno',
sorter: true,
width: 150,
},
{
title: '操作员',
dataIndex: 'operatorName',
sorter: true,
width: 150,
},
{
title: '揽货人',
dataIndex: 'saleName',
sorter: true,
width: 150,
},
{
title: '是否一致',
dataIndex: 'isEqual',
sorter: true,
width: 150,
},
]

@ -12,188 +12,159 @@
<a-select-option value="B">根据区间对账</a-select-option>
</a-select>
</div>
<div class="TopUnit"> <SaveSvg class="svg" /> </div>
<div class="TopUnit">
<div class="TopUnit" @click="handleSave"> <SaveSvg class="svg" /> </div>
<!-- <div class="TopUnit">
<PrintSvg class="svg" />
</div>
<div class="TopUnit">
<ExcelSvg class="svg" />
</div>
<div class="TopUnit">
</div> -->
<a-upload
:file-list="fileList"
:before-upload="beforeUpload"
name="file"
:custom-request="uploadFile"
>
<div class="TopUnit Excel">
<ExcelSvg class="svg" />
</div>
</a-upload>
<div class="TopUnit" @click="Recount">
<span class="iconfont icon-gengxinheji-danse"></span>
<span>重新对账</span>
</div>
<div class="TopUnit">
<!-- <div class="TopUnit">
<span class="iconfont icon-fendan-danse"></span>
<span>拆分</span>
</div>
</div> -->
<div class="TopUnit">
<span class="iconfont icon-fapiao-danse"></span>
<a-select class="Select normal" :bordered="false" v-model:value="grade">
<a-select-option value="A">生成对账单</a-select-option>
<a-select-option value="B">取消生成</a-select-option>
</a-select>
<a-dropdown class="Dropdown">
<template #overlay>
<a-menu>
<a-menu-item key="1" @click="Cancel"></a-menu-item>
<a-menu-item key="2" @click="Create"></a-menu-item>
</a-menu>
</template>
<a-button>
对账单
<span class="iconfont icon-xia1"></span>
</a-button>
</a-dropdown>
</div>
<div class="TopUnit">
<!-- <div class="TopUnit">
<span class="iconfont icon-feiyongmingxi-danse"></span>
<span>生成付费申请</span>
</div>
</div> -->
</div>
<div class="TopForm">
<BasicForm @register="registerForm" @linkageForm="linkageForm" />
</div>
<div class="bottomBox">
<div class="bottonLeftBox">
<BasicTable class="ds-table" @register="registerTable">
<template #tableTitle>
<TableButton :show="{ add: false, del: null }" @del="DelDetail"> </TableButton>
</template>
</BasicTable>
</div>
<!-- <div class="bottonRightBox"> </div> -->
</div>
</div>
<!-- <div class="CsMain p-4" id="detail">
<a-row class="CsHeader" :gutter="5">
<a-col :span="24" class="headerForm">
<a-spin :spinning="spinningT">
<BasicForm @register="registerForm" @linkageForm="linkageForm" class="ds-form-detail" />
</a-spin>
</a-col>
</a-row>
<a-row class="CsBottom">
<a-col :span="16" class="bottomTableL">
<a-spin :spinning="spinningL">
<BasicTable
class="ds-table-detail"
@register="registerTable"
@selection-change="selectionChange"
>
<template #tableTitle>
<p class="tableTitle">账单明细</p>
<a-button v-repeat type="link" @click="addDetail">
<span class="iconfont icon-new_document"></span>
添加
</a-button>
<a-popconfirm
title="确定删除选中数据?"
ok-text="是"
cancel-text="否"
@confirm="DelDetailL"
>
<a-button v-repeat type="link">
<span class="iconfont icon-shanchu21"></span>
删除
</a-button>
</a-popconfirm>
<a-button v-repeat type="link" @click="OpenFileModel">
<span class="iconfont icon-fujian"></span>
附件
</a-button>
</template>
</BasicTable>
<div class="totalBox">
<div class="unitBox">
<a-table
class="ds-table"
:columns="calcColumns"
:data-source="[Ldata]"
:pagination="false"
></a-table>
</div>
</div>
</a-spin>
</a-col>
<a-col :span="8" class="bottomTableR">
<a-spin :spinning="spinningR">
<h3>右侧</h3>
</a-spin>
</a-col>
</a-row>
</div> -->
</div>
</template>
<script lang="ts" setup>
import { ref } from 'vue'
import { Divider } from 'ant-design-vue'
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 { useGo } from '/@/hooks/web/usePage'
const go = useGo()
import { columnsL, Editschemas, schemas } from './columns'
import { Editschemas, schemas, formcolumns } from './columns'
import SaveSvg from './SVG/SaveSvg.vue'
import PrintSvg from './SVG/PrintSvg.vue'
import ExcelSvg from './SVG/ExcelSvg.vue'
import {
EditCheckBill,
GetCheckBillBusinessList,
GetCheckBillFeeRecordsList,
BatchDelCheckBillDetail,
BatchDelCheckBillFeeRecords,
CheckBillLocking,
CheckBillUnLocking,
AddCheckBillDetail,
AddCheckBillFeeRecords,
} from '/@/views/operation/CustomerReconciliation/api.js'
import { ApiInfo } from './api'
ApiInfo,
ApiBasicsList,
ApiEdit,
ApiRecount,
ApiCreate,
ApiCancel,
ApiImport,
ApiDelDetail,
} from './api'
const id = ref(route.query.id)
const spinningL = ref(false)
const spinningT = ref(false)
const billNo = ref()
const isLocking = ref(false)
const calcData = ref([])
//
const [registerAdd, { openModal: openModalAdd }] = useModal()
//
const [registerTable, { reload, getVxeSelectRows }] = useTable({
title: '',
api: async (p) => {
const res: API.DataResult = await ApiBasicsList(p)
return new Promise((resolve) => {
resolve({ data: [...res.data], total: res.count })
})
},
beforeFetch: (p) => {
let postParam: any = {
queryCondition: JSON.stringify([
{
FieldName: 'checkId',
FieldValue: id.value,
ConditionalType: 1,
},
]),
pageCondition: {
pageIndex: p.page,
pageSize: p.pageSize,
sortConditions: [],
},
}
if (p.field) {
postParam.pageCondition.sortConditions = [
{
sortField: p.field,
listSortDirection: p.order == 'ascend' ? 0 : 1,
},
]
} else {
postParam.pageCondition.sortConditions = []
}
return postParam
},
columns: formcolumns,
isTreeTable: false,
pagination: true,
striped: true,
useSearchForm: false,
showTableSetting: false,
bordered: true,
showIndexColumn: true,
rowSelection: { type: 'checkbox' },
indexColumnProps: {
width: 60,
},
canResize: true,
immediate: false,
resizeHeightOffset: 45,
tableComponent: 'vxe',
id: '0',
autoHeight: window.innerHeight - (id.value ? 410 : 460),
})
setTimeout(() => {
init()
}, 100)
const Ldata = ref({})
const grade = ref('A')
const InfoData = ref<any>({})
function init() {
if (id.value) {
spinningL.value = true
spinningT.value = true
// businessId
let ApiData = {
queryCondition: `[{"FieldName":"checkId","FieldValue":"${id.value}","ConditionalType":1}]`,
pageCondition: {
sortConditions: [],
},
}
ApiInfo({ id: id.value }).then((res) => {
setFieldsValue(res.data)
InfoData.value = res.data
spinningT.value = false
billNo.value = res.data.billNo
isLocking.value = res.data.isLocking
})
GetCheckBillBusinessList(ApiData).then((res) => {
setTableData(res.data.list)
Ldata.value = res.data.dataTotal
spinningL.value = false
})
// GetCheckBillFeeRecordsList(ApiData).then((res) => {
// setTableDataR(res.data)
// })
} else {
addDetail()
}
}
function RauditClass() {
let RData = ''
switch (isLocking.value) {
case true:
RData = 'active'
break
default:
RData = 'rejected'
break
reload()
}
return RData
}
//
const [registerForm, { getFieldsValue, validate, setFieldsValue, updateSchema }] = useForm({
//
const [registerForm, { validate, setFieldsValue, updateSchema }] = useForm({
labelWidth: 120,
schemas: id.value ? Editschemas : schemas,
showActionButtonGroup: false,
@ -210,284 +181,105 @@
}
})
}
//
const [registerTable, { getSelectRows, setTableData }] = useTable({
title: '',
rowSelection: { type: 'checkbox' },
columns: columnsL,
pagination: true,
striped: true,
showTableSetting: false,
bordered: true,
showIndexColumn: true,
immediate: false,
canResize: true,
resizeHeightOffset: 105,
})
const spinningR = ref(false)
//
let LeftSelectData = ref<any>()
function selectionChange(e) {
LeftSelectData.value = e
if (e.rows.length) {
spinningR.value = true
let ApiData = {
queryCondition: `[{"FieldName":"businessId","FieldValue":"${
e.rows[e.rows.length - 1].businessId
}","ConditionalType":1},{"FieldName":"checkId","FieldValue":"${
e.rows[e.rows.length - 1].checkId
}","ConditionalType":1}]`,
pageCondition: {
sortConditions: [],
},
}
GetCheckBillFeeRecordsList(ApiData).then((res) => {
spinningR.value = false
})
} else {
}
}
//
const calcColumns = [
{
title: '应收RMB',
dataIndex: 'rmbdr',
},
// {
// title: 'RMB',
// dataIndex: 'rmbcr',
// },
{
title: '应收USD',
dataIndex: 'usddr',
},
// {
// title: 'USD',
// dataIndex: 'usdcr',
// },
{
title: '未收RMB',
dataIndex: 'balrmbdr',
},
// {
// title: 'RMB',
// dataIndex: 'balrmbcr',
// },
{
title: '未收USD',
dataIndex: 'balusddr',
},
// {
// title: 'USD',
// dataIndex: 'balusdcr',
// },
// {
// title: '',
// dataIndex: 'otherDR',
// },
// {
// title: '',
// dataIndex: 'otherCR',
// },
// {
// title: '',
// dataIndex: 'balOtherDR',
// },
// {
// title: '',
// dataIndex: 'balOtherCR',
// },
// {
// title: 'TTL',
// dataIndex: 'ttldr',
// },
// {
// title: 'TTL',
// dataIndex: 'ttlcr',
// },
// {
// title: 'TTL',
// dataIndex: 'balttldr',
// },
// {
// title: 'TTL',
// dataIndex: 'balttlcr',
// },
{
title: '开票RMB应收',
dataIndex: 'orderInvoiceRMBDR',
},
{
title: '开票USD应收',
dataIndex: 'orderInvoiceUSDDR',
},
{
title: '订单金额RMB应付',
dataIndex: 'orderAmountRMBCR',
},
{
title: '订单金额USD应付',
dataIndex: 'orderAmountUSDCR',
},
]
//
function addDetail() {
openModalAdd(true, {
customerId: getFieldsValue().customerId,
customerName: getFieldsValue().customerName,
})
}
//
function GoDetailed() {
go(`/CustomerReconciliationDetails`)
}
//
function DelDetailL() {
// businessId
// checkId
if (getSelectRows().length) {
let Apidata: any = {
id: id.value,
ids: [],
}
getSelectRows().forEach((item) => {
Apidata.ids.push(item.businessId)
})
BatchDelCheckBillDetail(Apidata).then((res) => {
if (res.succeeded) {
notification.success({ message: '删除成功', duration: 3 })
init()
}
})
//
async function handleSave() {
const values = await validate()
values.id = id.value ? id.value : ''
const res: any = await ApiEdit(values)
console.log(res)
if (res.succeeded) {
notification.success({ message: res.message, duration: 3 })
id.value = res.data
} else {
notification.warning({ message: '请至少选择一条数据', duration: 3 })
notification.error({ message: res.message, duration: 3 })
}
}
//
const [registerEdit, { openModal: openModalEdit }] = useModal()
//
function RowClick() {
openModalEdit(true)
}
//
const [registerFile, { openModal: openModalFile }] = useModal()
//
const [registerFileModel, { openModal: openModalFileModel }] = useModal()
function OpenFileModel() {
openModalFileModel(true)
}
//
function OpenFileModal() {
openModalFile(true)
}
const activeKey = ref('1')
//
function Lock() {
let ApiData = {
ids: [id.value],
//
function Recount() {
const ApiData = {
id: id.value,
}
CheckBillLocking(ApiData).then((res) => {
ApiRecount(ApiData).then((res) => {
if (res.succeeded) {
notification.success({ message: '锁定成功', duration: 3 })
notification.success({ message: res.message, duration: 3 })
reload()
}
})
}
//
function UnLock() {
let ApiData = {
ids: [id.value],
//
function Create() {
const ApiData = {
id: id.value,
}
CheckBillUnLocking(ApiData).then((res) => {
ApiCreate(ApiData).then((res) => {
if (res.succeeded) {
notification.success({ message: '解除锁定成功', duration: 3 })
notification.success({ message: res.message, duration: 3 })
reload()
}
})
}
//
async function Save() {
const values = await validate()
let ApiData = {
...values,
businessIds: [],
}
let res = await EditCheckBill(ApiData)
if (res.succeeded) {
notification.success({ message: res.message, duration: 3 })
//
function Cancel() {
const ApiData = {
id: id.value,
}
id.value = res.data
}
function waitFor() {
notification.warning({ message: '暂未开发', duration: 3 })
}
const RefInfo = ref()
//
async function AddDetailL(e) {
if (!id.value) {
setFieldsValue({
...getFieldsValue(),
customerId: e.customerId,
customerName: e.customerName,
})
await Save()
}
e.id = id.value
AddCheckBillDetail(e).then(async (res) => {
ApiCancel(ApiData).then((res) => {
if (res.succeeded) {
notification.success({ message: '添加成功', duration: 3 })
init()
RefInfo.value.handleSubmit()
RefInfo.value.closeModal()
notification.success({ message: res.message, duration: 3 })
reload()
}
})
}
//
async function AddDetailR(e) {
console.log(e)
if (!id.value) {
setFieldsValue({
...getFieldsValue(),
customerId: e.customerId,
customerName: e.customerName,
})
await Save()
}
console.log(
getSelectRows(),
getSelectRows().length,
// getSelectRows()[getSelectRows().length - 1].checkId,
)
// e.id = getSelectRows()[getSelectRows().length - 1].checkId
e.id = id.value
AddCheckBillFeeRecords(e).then((res) => {
// EXCEL
const fileList = ref([])
function beforeUpload(file) {
console.log(file)
}
function uploadFile(file) {
const formData = new FormData()
let Did: any = id.value
formData.append('id', Did)
formData.append('file', file.file)
ApiImport({
data: formData,
}).then(async (res) => {
if (res.succeeded) {
notification.success({ message: '添加成功', duration: 3 })
init()
RefInfo.value.closeModal()
await reload()
} else {
notification.error({ message: res.message, duration: 3 })
}
})
}
const dsPrint = ref()
//
async function printFee() {
dsPrint.value.init()
//
function DelDetail() {
if (getVxeSelectRows().length) {
const ids = getVxeSelectRows().map((res) => {
return res.id
})
const ApiData = {
id: id.value,
ids,
}
ApiDelDetail(ApiData).then((res) => {
if (res.succeeded) {
notification.success({ message: res.message, duration: 3 })
reload()
}
})
} else {
notification.warning({ message: '请至少选择一条数据', duration: 3 })
}
}
</script>
<style lang="less" scoped>
// ----------------------
.infoclientBox {
// height: 100%;
height: 100%;
display: flex;
flex-direction: column;
background: #f0f2f5;
padding: 8px 20px;
.buttonBox {
flex: 1;
display: flex;
align-items: center;
height: 32px;
@ -503,6 +295,7 @@
color: rgba(18, 24, 38, 1);
text-align: left;
vertical-align: top;
cursor: pointer;
&.blue {
background: #4ba1a5;
}
@ -516,6 +309,9 @@
.iconfont {
color: rgba(255, 102, 0, 1);
}
&.Excel {
margin-top: 5px;
}
:deep(.Select) {
color: rgba(255, 255, 255, 1);
.ant-select-selector {
@ -545,6 +341,15 @@
}
}
}
.Dropdown {
border: none;
padding: 0;
height: 14px;
color: #000;
.iconfont {
margin-left: 5px;
}
}
}
}
.TopForm {
@ -554,5 +359,22 @@
background: rgba(255, 255, 255, 1);
border: 1px solid rgba(204, 214, 223, 1);
}
.bottomBox {
// display: flex;
margin-top: 20px;
.bottonLeftBox {
// width: calc(100% - 280px);
// margin-right: 20px;
.ds-table {
padding-top: 0 !important;
}
}
// .bottonRightBox {
// width: 260px;
// border-radius: 6px;
// background: rgba(255, 255, 255, 1);
// border: 1px solid rgba(204, 214, 223, 1);
// }
}
}
</style>

@ -21,7 +21,7 @@
const { notification } = useMessage()
import { useGo } from '/@/hooks/web/usePage'
const go = useGo()
const [registerTable, { reload, getForm, getSelectRows }] = useTable({
const [registerTable, { reload, getForm, getVxeSelectRows }] = useTable({
title: '',
rowSelection: { type: 'checkbox' },
clickToRowSelect: false,
@ -59,7 +59,7 @@
go(`/checkBillAutoDetail`)
}
function handleDel() {
const select = getSelectRows()
const select = getVxeSelectRows()
if (select.length === 0) {
notification.error({ message: '请选择一条数据', duration: 3 })
return false

Loading…
Cancel
Save