|
|
|
@ -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>
|
|
|
|
|