客户对账

szh-new
张同海 6 months ago
parent 5155294e5a
commit 9d36c4079b

@ -13,10 +13,10 @@
<div class="TableBox">
<div class="BoxUnit">
<div class="model-botton-box">
<a-button class="btn" type="primary">新增费用字段</a-button>
<a-button class="btn" type="primary" @click="AddLlist"></a-button>
<a-button class="btn btn-delete">删除费用字段</a-button>
</div>
<div style="position: relative">
<!-- <div style="position: relative">
<input
class="ds-tb-check"
type="checkbox"
@ -24,14 +24,14 @@
:indeterminate="someCheckL"
/>
<hot-table ref="hotTbL" :data="Llist" :settings="Lsettings"></hot-table>
</div>
</div> -->
</div>
<div class="BoxUnit">
<div class="model-botton-box">
<a-button class="btn" type="primary">新增字段</a-button>
<a-button class="btn btn-delete">删除字段</a-button>
</div>
<div style="position: relative">
<!-- <div style="position: relative">
<input
class="ds-tb-check"
type="checkbox"
@ -39,7 +39,7 @@
:indeterminate="someCheckR"
/>
<hot-table ref="hotTbR" :data="Rlist" :settings="Rsettings"></hot-table>
</div>
</div> -->
</div>
</div>
@ -254,7 +254,9 @@
//
afterChange(changes, source) {},
}
function AddLlist() {
Llist.value.push({})
}
// ------------------------------------------------------------------------------
//
const allCheckR = ref(false)

@ -1,118 +0,0 @@
<template>
<div>
<BasicTable @register="registerTable">
<template #bodyCell="{ column, record }">
<template v-if="column.key === 'action'">
<TableAction
:actions="[
{
icon: 'ant-design:profile-outlined',
tooltip: '详情',
onClick: handleAudit.bind(null, record),
},
]"
/>
</template>
</template>
</BasicTable>
<TenantAuditStepModal @register="registerModal" @success="handleSuccess" />
</div>
</template>
<script lang="ts" setup>
import { defineExpose, defineComponent, onMounted, ref } from 'vue'
import { BasicTable, useTable, TableAction, SorterResult } from '/@/components/Table'
import { ApiBasicsList, ApiExistList } from './api'
import { useModal } from '/@/components/Modal'
import TenantAuditStepModal from './TenantAuditStepModal.vue'
import { columns, searchFormSchema } from './columns'
const [registerModal, { openModal }] = useModal()
const [registerTable, { reload, getForm, getPaginationRef, getSelectRows }] = useTable({
// title: '',
maxHeight: 300,
rowSelection: { type: 'checkbox' },
// rowSelection: { type: 'radio' },
api: async (p) => {
const res: API.DataResult = await ApiBasicsList(p)
const res2: API.DataResult = await ApiExistList()
let data = []
res.data.forEach((item) => {
let type = true
res2.data.forEach((item2) => {
if (item.id == item2) {
type = false
}
})
if (type) {
data.push(item)
}
})
console.log(data)
return new Promise((resolve) => {
resolve({ data: [...data] })
})
},
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.CtnName) {
condition.push({
FieldName: 'CtnName',
FieldValue: data.CtnName,
ConditionalType: 1,
})
}
postParam.queryCondition = JSON.stringify(condition)
return postParam
},
columns,
formConfig: {
labelWidth: 120,
schemas: searchFormSchema,
},
pagination: true,
bordered: true,
useSearchForm: true,
showTableSetting: true,
tableSetting: {
redo: false,
size: false,
setting: false,
fullScreen: false,
},
// actionColumn: {
// width: 80,
// title: '',
// dataIndex: 'action',
// fixed: undefined,
// },
})
function handleCreate() {
openModal(true, {
record: {},
})
}
function handleAudit(record: Recordable) {
openModal(true, {
record,
isUpdate: true,
})
}
function handleSuccess() {
reload()
}
function getSelectData() {
return getSelectRows()
}
defineExpose({ getSelectData })
</script>

@ -1,6 +1,6 @@
import { request } from '/@/utils/request'
// 客户对账列表 (Auth)
// 客户对账列表 (Auth) #
export function GetCheckBillList(parameter) {
return request({
url: '/checkApi/CheckBill/GetCheckBillList',
@ -9,7 +9,7 @@ export function GetCheckBillList(parameter) {
})
}
// 客户对账编辑 (Auth)
// 客户对账编辑 (Auth) #
export function EditCheckBill(parameter) {
return request({
url: '/checkApi/CheckBill/EditCheckBill',
@ -17,7 +17,7 @@ export function EditCheckBill(parameter) {
data: parameter,
})
}
// 客户对账详情 (Auth)
// 客户对账详情 (Auth) #
export function GetCheckBillInfo(parameter) {
return request({
url: '/checkApi/CheckBill/GetCheckBillInfo',
@ -25,7 +25,7 @@ export function GetCheckBillInfo(parameter) {
params: parameter,
})
}
// 客户对账明细列表 (Auth)
// 客户对账明细列表 (Auth) #
export function GetCheckBillBusinessList(parameter) {
return request({
url: '/checkApi/CheckBill/GetCheckBillBusinessList',
@ -33,7 +33,7 @@ export function GetCheckBillBusinessList(parameter) {
data: parameter,
})
}
// 客户对账明细对应费用列表 (Auth)
// 客户对账明细对应费用列表 (Auth) #
export function GetCheckBillFeeRecordsList(parameter) {
return request({
url: '/checkApi/CheckBill/GetCheckBillFeeRecordsList',
@ -41,7 +41,7 @@ export function GetCheckBillFeeRecordsList(parameter) {
data: parameter,
})
}
// 对账明细批量删除 (Auth)
// 对账明细批量删除 (Auth) #
export function BatchDelCheckBillDetail(parameter) {
return request({
url: '/checkApi/CheckBill/BatchDelCheckBillDetail',
@ -49,7 +49,7 @@ export function BatchDelCheckBillDetail(parameter) {
data: parameter,
})
}
// 对账明细费用批量删除 (Auth)
// 对账明细费用批量删除 (Auth) #
export function BatchDelCheckBillFeeRecords(parameter) {
return request({
url: '/checkApi/CheckBill/BatchDelCheckBillFeeRecords',
@ -57,7 +57,7 @@ export function BatchDelCheckBillFeeRecords(parameter) {
data: parameter,
})
}
// 对账明细添加 (Auth)
// 对账明细添加 (Auth) #
export function AddCheckBillDetail(parameter) {
return request({
url: '/checkApi/CheckBill/AddCheckBillDetail',
@ -65,7 +65,7 @@ export function AddCheckBillDetail(parameter) {
data: parameter,
})
}
// 对账明细费用添加 (Auth)
// 对账明细费用添加 (Auth) #
export function AddCheckBillFeeRecords(parameter) {
return request({
url: '/checkApi/CheckBill/AddCheckBillFeeRecords',
@ -73,7 +73,7 @@ export function AddCheckBillFeeRecords(parameter) {
data: parameter,
})
}
// 客户对账明细查询列表 (Auth)
// 客户对账明细查询列表 (Auth) #
export function GetBusinessQueryList(parameter) {
return request({
url: '/checkApi/CheckBill/GetBusinessQueryList',
@ -81,7 +81,7 @@ export function GetBusinessQueryList(parameter) {
data: parameter,
})
}
// 客户对账明细查询费用明细 (Auth)
// 客户对账明细查询费用明细 (Auth) #
export function GetFeeRecordQueryList(parameter) {
return request({
url: '/checkApi/CheckBill/GetFeeRecordQueryList',
@ -90,7 +90,7 @@ export function GetFeeRecordQueryList(parameter) {
})
}
// 锁定 (Auth)
// 锁定 (Auth) #
export function CheckBillLocking(parameter) {
return request({
url: '/checkApi/CheckBill/CheckBillLocking',
@ -98,7 +98,7 @@ export function CheckBillLocking(parameter) {
data: parameter,
})
}
// 解除锁定 (Auth)
// 解除锁定 (Auth) #
export function CheckBillUnLocking(parameter) {
return request({
url: '/checkApi/CheckBill/CheckBillUnLocking',

@ -188,22 +188,28 @@
)
const spinningR = ref(false)
//
let LeftSelectData = ref<any>()
function selectionChange(e) {
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: [],
},
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) => {
setTableDataR(res.data)
spinningR.value = false
})
} else {
setTableDataR([])
}
GetCheckBillFeeRecordsList(ApiData).then((res) => {
setTableDataR(res.data)
spinningR.value = false
})
}
//
const [registerTableR, { getSelectRows: getSelectRowsR, setTableData: setTableDataR }] = useTable(
@ -241,15 +247,21 @@
}
//
function DelDetailL() {
// businessId
// checkId
if (getSelectRowsL().length) {
let Apidata: any = {
id: id.value,
ids: [],
}
getSelectRowsL().forEach((item) => {
Apidata.ids.push(item.id)
Apidata.ids.push(item.businessId)
})
BatchDelCheckBillDetail(Apidata).then((res) => {
console.log(res)
if (res.succeeded) {
notification.success({ message: '删除成功', duration: 3 })
init()
}
})
} else {
notification.warning({ message: '请至少选择一条数据', duration: 3 })
@ -259,13 +271,17 @@
function DelDetailR() {
if (getSelectRowsR().length) {
let Apidata: any = {
id: id.value,
ids: [],
}
getSelectRowsR().forEach((item) => {
Apidata.ids.push(item.id)
Apidata.ids.push(item.feeRecordId)
})
BatchDelCheckBillFeeRecords(Apidata).then((res) => {
console.log(res)
if (res.succeeded) {
notification.success({ message: '删除成功', duration: 3 })
selectionChange(LeftSelectData.value)
}
})
} else {
notification.warning({ message: '请至少选择一条数据', duration: 3 })

Loading…
Cancel
Save