客户对账

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

@ -13,10 +13,10 @@
<div class="TableBox"> <div class="TableBox">
<div class="BoxUnit"> <div class="BoxUnit">
<div class="model-botton-box"> <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> <a-button class="btn btn-delete">删除费用字段</a-button>
</div> </div>
<div style="position: relative"> <!-- <div style="position: relative">
<input <input
class="ds-tb-check" class="ds-tb-check"
type="checkbox" type="checkbox"
@ -24,14 +24,14 @@
:indeterminate="someCheckL" :indeterminate="someCheckL"
/> />
<hot-table ref="hotTbL" :data="Llist" :settings="Lsettings"></hot-table> <hot-table ref="hotTbL" :data="Llist" :settings="Lsettings"></hot-table>
</div> </div> -->
</div> </div>
<div class="BoxUnit"> <div class="BoxUnit">
<div class="model-botton-box"> <div class="model-botton-box">
<a-button class="btn" type="primary">新增字段</a-button> <a-button class="btn" type="primary">新增字段</a-button>
<a-button class="btn btn-delete">删除字段</a-button> <a-button class="btn btn-delete">删除字段</a-button>
</div> </div>
<div style="position: relative"> <!-- <div style="position: relative">
<input <input
class="ds-tb-check" class="ds-tb-check"
type="checkbox" type="checkbox"
@ -39,7 +39,7 @@
:indeterminate="someCheckR" :indeterminate="someCheckR"
/> />
<hot-table ref="hotTbR" :data="Rlist" :settings="Rsettings"></hot-table> <hot-table ref="hotTbR" :data="Rlist" :settings="Rsettings"></hot-table>
</div> </div> -->
</div> </div>
</div> </div>
@ -254,7 +254,9 @@
// //
afterChange(changes, source) {}, afterChange(changes, source) {},
} }
function AddLlist() {
Llist.value.push({})
}
// ------------------------------------------------------------------------------ // ------------------------------------------------------------------------------
// //
const allCheckR = ref(false) 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' import { request } from '/@/utils/request'
// 客户对账列表 (Auth) // 客户对账列表 (Auth) #
export function GetCheckBillList(parameter) { export function GetCheckBillList(parameter) {
return request({ return request({
url: '/checkApi/CheckBill/GetCheckBillList', url: '/checkApi/CheckBill/GetCheckBillList',
@ -9,7 +9,7 @@ export function GetCheckBillList(parameter) {
}) })
} }
// 客户对账编辑 (Auth) // 客户对账编辑 (Auth) #
export function EditCheckBill(parameter) { export function EditCheckBill(parameter) {
return request({ return request({
url: '/checkApi/CheckBill/EditCheckBill', url: '/checkApi/CheckBill/EditCheckBill',
@ -17,7 +17,7 @@ export function EditCheckBill(parameter) {
data: parameter, data: parameter,
}) })
} }
// 客户对账详情 (Auth) // 客户对账详情 (Auth) #
export function GetCheckBillInfo(parameter) { export function GetCheckBillInfo(parameter) {
return request({ return request({
url: '/checkApi/CheckBill/GetCheckBillInfo', url: '/checkApi/CheckBill/GetCheckBillInfo',
@ -25,7 +25,7 @@ export function GetCheckBillInfo(parameter) {
params: parameter, params: parameter,
}) })
} }
// 客户对账明细列表 (Auth) // 客户对账明细列表 (Auth) #
export function GetCheckBillBusinessList(parameter) { export function GetCheckBillBusinessList(parameter) {
return request({ return request({
url: '/checkApi/CheckBill/GetCheckBillBusinessList', url: '/checkApi/CheckBill/GetCheckBillBusinessList',
@ -33,7 +33,7 @@ export function GetCheckBillBusinessList(parameter) {
data: parameter, data: parameter,
}) })
} }
// 客户对账明细对应费用列表 (Auth) // 客户对账明细对应费用列表 (Auth) #
export function GetCheckBillFeeRecordsList(parameter) { export function GetCheckBillFeeRecordsList(parameter) {
return request({ return request({
url: '/checkApi/CheckBill/GetCheckBillFeeRecordsList', url: '/checkApi/CheckBill/GetCheckBillFeeRecordsList',
@ -41,7 +41,7 @@ export function GetCheckBillFeeRecordsList(parameter) {
data: parameter, data: parameter,
}) })
} }
// 对账明细批量删除 (Auth) // 对账明细批量删除 (Auth) #
export function BatchDelCheckBillDetail(parameter) { export function BatchDelCheckBillDetail(parameter) {
return request({ return request({
url: '/checkApi/CheckBill/BatchDelCheckBillDetail', url: '/checkApi/CheckBill/BatchDelCheckBillDetail',
@ -49,7 +49,7 @@ export function BatchDelCheckBillDetail(parameter) {
data: parameter, data: parameter,
}) })
} }
// 对账明细费用批量删除 (Auth) // 对账明细费用批量删除 (Auth) #
export function BatchDelCheckBillFeeRecords(parameter) { export function BatchDelCheckBillFeeRecords(parameter) {
return request({ return request({
url: '/checkApi/CheckBill/BatchDelCheckBillFeeRecords', url: '/checkApi/CheckBill/BatchDelCheckBillFeeRecords',
@ -57,7 +57,7 @@ export function BatchDelCheckBillFeeRecords(parameter) {
data: parameter, data: parameter,
}) })
} }
// 对账明细添加 (Auth) // 对账明细添加 (Auth) #
export function AddCheckBillDetail(parameter) { export function AddCheckBillDetail(parameter) {
return request({ return request({
url: '/checkApi/CheckBill/AddCheckBillDetail', url: '/checkApi/CheckBill/AddCheckBillDetail',
@ -65,7 +65,7 @@ export function AddCheckBillDetail(parameter) {
data: parameter, data: parameter,
}) })
} }
// 对账明细费用添加 (Auth) // 对账明细费用添加 (Auth) #
export function AddCheckBillFeeRecords(parameter) { export function AddCheckBillFeeRecords(parameter) {
return request({ return request({
url: '/checkApi/CheckBill/AddCheckBillFeeRecords', url: '/checkApi/CheckBill/AddCheckBillFeeRecords',
@ -73,7 +73,7 @@ export function AddCheckBillFeeRecords(parameter) {
data: parameter, data: parameter,
}) })
} }
// 客户对账明细查询列表 (Auth) // 客户对账明细查询列表 (Auth) #
export function GetBusinessQueryList(parameter) { export function GetBusinessQueryList(parameter) {
return request({ return request({
url: '/checkApi/CheckBill/GetBusinessQueryList', url: '/checkApi/CheckBill/GetBusinessQueryList',
@ -81,7 +81,7 @@ export function GetBusinessQueryList(parameter) {
data: parameter, data: parameter,
}) })
} }
// 客户对账明细查询费用明细 (Auth) // 客户对账明细查询费用明细 (Auth) #
export function GetFeeRecordQueryList(parameter) { export function GetFeeRecordQueryList(parameter) {
return request({ return request({
url: '/checkApi/CheckBill/GetFeeRecordQueryList', url: '/checkApi/CheckBill/GetFeeRecordQueryList',
@ -90,7 +90,7 @@ export function GetFeeRecordQueryList(parameter) {
}) })
} }
// 锁定 (Auth) // 锁定 (Auth) #
export function CheckBillLocking(parameter) { export function CheckBillLocking(parameter) {
return request({ return request({
url: '/checkApi/CheckBill/CheckBillLocking', url: '/checkApi/CheckBill/CheckBillLocking',
@ -98,7 +98,7 @@ export function CheckBillLocking(parameter) {
data: parameter, data: parameter,
}) })
} }
// 解除锁定 (Auth) // 解除锁定 (Auth) #
export function CheckBillUnLocking(parameter) { export function CheckBillUnLocking(parameter) {
return request({ return request({
url: '/checkApi/CheckBill/CheckBillUnLocking', url: '/checkApi/CheckBill/CheckBillUnLocking',

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

Loading…
Cancel
Save