import type { VxeGridInstance } from "@/components/VxeTable"
import { CopyParam, CustomerFeeSetAdministratorDto, CustomerFeeSetCompareDto, CustomerGroupParam, LoadOperatingOrganizationFeeParams, PartialCustomerFeeSetCompareDto, StopEndDateParams, SubmitCustomerFeeSetModel } from "@/api/customerfee/CustomerFeeSetModel"
import { CustomerFeeSetType, EditType, RecalculateType } from "@/type/BaseEnum"
import { ref, reactive, shallowReactive, unref, computed, onBeforeMount, h, Ref } from "vue"
import { addCustomerFeeSetApi, editCustomerFeeSetApi, deleteCustomerFeeSetApi, activeCustomerFeeSetApi, customerGroupListApi, api_customerFeeSetCopy, api_customerFeeActiveBeforeCheck, api_addcustomerFeeSetAdministrator, editCustomerFeeSetFeeApi, api_customerFeeSetLoadOperatingOrganizationFee, api_CustomerFeeStopEndDate, api_customerFeeSetProportionCopy, api_customerGroupTreeList } from "@/api/customerfee/customerfeeset"
import { Result } from "@/http/request"
import useInstance from "@/hooks/useInstance"
import { BaseFeesetAction, BaseFieldType } from "@/type/BaseFeesetAction"
import { useMessage } from "@/hooks/useMessage"
import { downloadByUrl } from "@/utils/download"
import { ListIitem } from "@/api/base/BaseDataModel"
import { resCodeSuccess, useReturnData } from "@/utils/useReturnData"
import { useDropDownData } from "@/hooks/useDropDownData"
import { cloneDeep } from "@/utils/cloneDeep"
import { NoticeDto } from "@/api/newsInfo/newsInfoModel"
import { api_EditNotice } from "@/api/newsInfo/newsInfo"
import { isArrayLength } from "@/utils/is"
import { ElMessageBox } from "element-plus"
import { useFeesetList } from "@/store/list_feeset"
import { Department, FeeApprovalStatus, FeeSetAddType, FeeSetFoldingLayer, FeeSetType, GroupOperateType } from "@/type/BaseBusinessFeeseType"
import { api_customerFeeAddApproval, api_customerFeeApprovalRecord } from "@/api/customerFeeApproval/customerFeeApproval"
import timeFiltering from "@/utils/timeFiltering"
import { userStore } from "@/store/user"
import { usePersonnel } from "@/store/list_personnel"

const { createConfirm, createMessage } = useMessage()
const { resData } = useReturnData()

export default function userCustomerFeeSet(getCustomerFeeSetList, clearCheckboxRow, customerFeeSetList, customerFeeSetGridRef: Ref<VxeGridInstance | undefined>, getproductSelectList: Fn) {
    const { global } = useInstance();
    const { storeDropDownData, feeSetTypeList } = useDropDownData()
    const storeFeeset = useFeesetList();
    const sysUserList = computed(() => storeFeeset.getSysUserList)
    const storePersonnel = usePersonnel()
    // 业务员
    const getSalesmanUsesList = computed(() => storePersonnel.getSalesmanUsesList)
    const feeApprovalStatusList = computed(() => storeFeeset.getFeeApprovalStatusList)
    // 判断是否为业务员
    const getIsSell = computed(() => unref(getSysUserRoleDto).roleId !== Department.SELL)
    // 用户信息
    const userstore = userStore()
    const getSysUserRoleDto = computed(() => userstore.sysUserRoleDto)
    //定义弹框的 ref属性
    const adCustomerFeeSetRef = ref<{ show: (type: string, row?: SubmitCustomerFeeSetModel) => void }>()
    // 费用设置详情-定义弹框的 ref属性
    const adCustomerFeeSetDetailRef = ref<{ show: (row: Recordable, type?: number) => void }>()
    // 客户费用异常提示
    const feeNoticeShowRef = ref<{ show: Fn }>()
    // 客户费用接管
    const addEditAdministratorRef = ref<{ show: Fn }>()
    // 审批流程
    const customerFeeApprovalRef = ref<{ show: Fn }>()
    // 按比例拷贝弹窗
    const customerProportionCopyRef = ref<{ show: Fn }>()
    // 费用分组信息弹窗
    const customerGroupRepeatInfoRef = ref<{ show: Fn }>()
    // 终止生效时间
    const stopEndDateRef = ref<{ show: Fn }>()
    // 列表信息
    const stateSelectList = reactive({
        list: [] as ListIitem[],//分组
        disabledArr: [] as number[],//按钮组禁用
        isShowArr: [] as number[],//隐藏组禁用
    });
    // 浅层响应式数据
    const customerFeeSetCompare = shallowReactive<{ list: PartialCustomerFeeSetCompareDto[] }>({
        list: []
    })
    // 父与子复选框内容
    const getSelectionDataSource = computed(() => {
        return [...customerFeeSetList.selectionDataSource, ...customerFeeSetList.selectionSonDataSource]
    })
    //新增
    const addBtn = () => {
        getproductSelectList()
        stateSelectList.list = []
        // intiGroupList({
        //     groupOperateType: GroupOperateType.ADD_FEE
        // })
        adCustomerFeeSetRef.value?.show(EditType.ADD)
    }
    //编辑
    const editBtn = (type: string, row: SubmitCustomerFeeSetModel, groupOperateType?: number) => {
        stateSelectList.list = []
        getproductSelectList()
        // 是客户价获取分组数据
        row.groupId && row.feeSetType === FeeSetType.CUSTOMER && intiGroupList({ id: row.groupId, orgId: row.orgId, productId: row.productId, groupOperateType })
        adCustomerFeeSetRef.value?.show(type, row)
    }
    //删除
    const deleteBtn = async (id: number) => {
        let parm = {
            id: id
        }
        //信息确认
        let confirm = await global.$myconfirm('确定删除该数据吗?')
        if (confirm) {
            let res = await deleteCustomerFeeSetApi(parm)
            if (res && res.code == 200) {
                //信息提示
                global.$message({ message: res.msg, type: 'success' })
                //刷新表格
                getCustomerFeeSetList();

            }
        }
    }
    //保存
    const save = async (parm: SubmitCustomerFeeSetModel, onclose: Fn, setLoading: Fn) => {
        const params = cloneDeep(parm)
        // console.log("---------参数---------", params)
        switch (parm.type) {
            case EditType.EDIT:
                params.type = BaseFieldType.EDIT
                break;
            case EditType.VERSION:
                params.type = BaseFieldType.ADDVERSION
                params.feeSetAddType = FeeSetAddType.VERSION_ADD
                break;
            case EditType.RECALCULATE:
                params.type = BaseFieldType.ADDRECALCULATE
                params.feeSetAddType = FeeSetAddType.RECOUNT_ADD
                break;
            default:
                params.type = BaseFieldType.ADD
                params.feeSetAddType = FeeSetAddType.ADD
                break;
        }
        try {
            let res: Result;
            if (parm.type === EditType.ADD || parm.type === EditType.VERSION || parm.type === EditType.RECALCULATE) {
                res = await addCustomerFeeSetApi(params)
            } else {
                res = await editCustomerFeeSetApi(params)
            }
            if (res && res.code == 200) {
                if (res.msg === 'error') {
                    isArrayLength(res.data) && unref(customerGroupRepeatInfoRef)?.show(res.data)
                    return
                }
                onclose()
                //信息提示
                createMessage.success('操作成功')
                // global.$message({ message: res.msg, type: '操作成功' })
                //刷新表格
                getCustomerFeeSetList();
            }
        } finally {
            setLoading(false)
        }
    }

    // 费用设置保存
    const hanleSaveFeeBase = async (customerFeeSetDto, onclose) => {
        try {
            const res = await editCustomerFeeSetFeeApi(customerFeeSetDto)
            const codeData = resData(res)
            if (codeData !== 500) {
                onclose()
                //刷新表格
                getCustomerFeeSetList();
            }
        } catch (error) {
            console.error(error);
        }
    }
    // 停用与激活
    const initActiveAndStop = async (row) => {
        const activeParams = {
            id: row.id,
            activeFlag: !row.activeFlag
        }
        const res = await activeCustomerFeeSetApi(activeParams)
        const codeData = resData(res)
        //刷新表格
        if (codeData !== 500) getCustomerFeeSetList();
    }
    // 客户费用停用与激活
    const initCustomerFeeActiveFlag = async (row: Recordable) => {
        // 停用
        if (row.activeFlag) {
            initActiveAndStop(row)
            return false
        }
        // 只有客户价时才校验、是否重算
        if (
            row.feeSetTypeName === '客户价'
            && row.feeApprovalStatus !== FeeApprovalStatus.APPROVAL_BY
            && row.recalculate !== RecalculateType.YES
        ) {
            // 激活费用对比明细弹窗
            const resBeforeCheck = await api_customerFeeActiveBeforeCheck({
                id: row.id,
                productId: row.productId,
                beginDate: row.beginDate,
                endDate: row.endDate
            })
            if (resBeforeCheck.code === 500) return
            const beforeCheckData = resData(resBeforeCheck)
            if (beforeCheckData !== 500 && isArrayLength(beforeCheckData)) {
                unref(feeNoticeShowRef)?.show(row)
                customerFeeSetCompare.list = beforeCheckData || []
            } else {
                initActiveAndStop(row)
            }
            return false
        }
        initActiveAndStop(row)
    }
    // 激活
    const onFeeNoticeConfirm = async (row: Recordable, onclose: Fn, setLoading: Fn) => {
        try {
            await initActiveAndStop(row)
        } finally {
            setLoading(false)
            onclose()
        }
    }
    // 申请
    const onFeeNoticeApply = async (row: Recordable, onclose: Fn, setLoading: Fn) => {
        const params = {
            feeId: row.id,
            feeSetName: row.feeSetName,
            productId: row.productId,
            productName: row.productName,
            groupName: row.groupName,
            orgName: row.orgName,
            customerName: row.customerName,
            feeSetTypeName: row.feeSetTypeName,
            beginDate: row.beginDate,
            endDate: row.endDate,
        }
        const res = await api_customerFeeAddApproval(params)
        const codeData = resData(res, "操作成功")
        //刷新表格
        if (codeData !== 500) {
            setLoading(false)
            onclose()
            getCustomerFeeSetList();
            return false
        }
        setLoading(false)
    }
    // 查询审批结果
    const onApprovalRecord = async (row) => {
        unref(customerFeeApprovalRef)?.show({ ...row, feeId: row.id })
    }

    /**
     * 费用设置详情
     */
    const editFeeSetDetail = (row: Recordable, type = BaseFeesetAction.FEESET_SETING) => adCustomerFeeSetDetailRef.value?.show(row, type)

    // 操作类型
    const hanleChangeAction = async (data: Recordable, layer: string) => {
        const row = cloneDeep(data)
        delete row.customerFeeSetList
        const types = row.types;
        // 费用操作列表
        // console.log(types, ":费用操作类型", row);

        switch (types) {
            // 费用设置-编辑
            case BaseFeesetAction.EDIT:
                editBtn(EditType.EDIT, row as SubmitCustomerFeeSetModel, GroupOperateType.EDIT_FEE)
                break;
            // 费用设置-删除
            case BaseFeesetAction.DELETE:
                deleteBtn(row.id)
                break;
            // 新版本
            case BaseFeesetAction.VERSION:
                editBtn(EditType.VERSION, row as SubmitCustomerFeeSetModel, GroupOperateType.ADD_FEE_VERSION)
                break;
            // 设置费用
            case BaseFeesetAction.FEESET_SETING:
                editFeeSetDetail(row)
                break;
            // 查看设置费用
            case BaseFeesetAction.VIEW:
                editFeeSetDetail(row, BaseFeesetAction.VIEW)
                break;
            // 费用模板导入
            // case BaseFeesetAction.FEESET_IMPORT:
            //     baseUploadRef.value?.show()
            //     break;
            // 费用模板
            case BaseFeesetAction.FEESET_EXPORT:
                createConfirm({
                    type: "warning",
                    message: "系统提示",
                    cancelButtonText: "取消",
                    confirmButtonText: "确定",
                    beforeClose: (action, instance, done) => {
                        // console.log(action,"==> cancel , confirm ", instance, ";action, instance");
                        if (action === "confirm") {
                            // 下载文件
                            downloadByUrl({
                                url: 'https://vebn.oss-cn-beijing.aliyuncs.com/vben/logo.png',
                                target: '_self',
                            })
                        }
                        done()
                    },
                })
                break;
            // 是否禁用
            case BaseFeesetAction.FEESET_ACTIVE:
                initCustomerFeeActiveFlag(row)
                break
            // 设置接管
            case BaseFeesetAction.PERSONNEL:
                unref(addEditAdministratorRef)?.show(row)
                break;
            // 重算设置
            case BaseFeesetAction.RECALCULATE:
                editBtn(EditType.RECALCULATE, row as SubmitCustomerFeeSetModel, GroupOperateType.RE_COUNT_FEE)
                break;
            // 客户费用拷贝
            case BaseFeesetAction.COPY:
                // 目标费用编号数据
                initFeesetCopy(row, false, (id, targetIds) => {
                    getCustomerFeeSetCopy(id, targetIds)
                })
                break;
            // 加载结算价
            case BaseFeesetAction.LOAD_SETTLEMENT_PRICE:
                initLoadSettlementPrice(data, layer, { 
                    feeSetType: FeeSetType.OPERATING_ORGANIZATION, 
                    recommendFeeSet: data.recommendFeeSet 
                })
                break;
            // 加载公布价
            case BaseFeesetAction.LOAD_ANNOUNCED_PRICE:
                initLoadSettlementPrice(data, layer, { 
                    feeSetType: FeeSetType.PUBLIC, 
                    recommendFeeSet: data.recommendFeeSet 
                })
                break;
            // 加载建议价
            case BaseFeesetAction.LOAD_SUGGESTED_PRICE:
                initLoadSettlementPrice(data, layer, { 
                    recommendFeeSet: data.recommendFeeSet, 
                    loadRecommendFeeSet: true 
                })
                break;
            // 终止生效
            case BaseFeesetAction.TERMINATION_TAKES_EFFECT:
                unref(stopEndDateRef)?.show(data)
                break;
            // 客户费用按比例拷贝
            case BaseFeesetAction.COPY_PROPORTION:
                initFeesetCopy(row, true, (id, targetIds, promptText) => {
                    unref(customerProportionCopyRef)?.show(id, targetIds, promptText)
                })
                break;
            default:
                break;
        }
    }
    // 终止生效
    const hanleStopEndDate = async (parmas: StopEndDateParams, onclose: Fn, setLoading: Fn) => {
        try {
            const resStopEndDate = await api_CustomerFeeStopEndDate(parmas)
            const codeStopEndDate = resData(resStopEndDate, "操作成功");
            if (codeStopEndDate !== 500) {
                getCustomerFeeSetList();
                onclose()
            }
        } finally {
            setLoading(false)
        }
    }
    /**
     * 加载结算价、公布价、建议价
     * @param row 当前数据
     * @param layer 层数
     * @returns 
     */
    const initLoadSettlementPrice = async (row, layer: string, parmData: Recordable) => {
        const params: LoadOperatingOrganizationFeeParams = {
            productId: row.productId,
            beginDate: row.beginDate,
            endDate: row.endDate,
            orgId: row.orgId,
            customerId: row.customerId,
            customerIdList: row.customerIdList,
            ...parmData
        }
        const resPrece = await api_customerFeeSetLoadOperatingOrganizationFee(params)
        const customerFeeSetList = resData(resPrece);
        const customerFeeSetGrid = unref(customerFeeSetGridRef)
        // 添加加载结算价标识
        row.isLoadSettlementPrice = true
        switch (layer) {
            case FeeSetFoldingLayer.GOLDEN_DATA:
                // 当前是第一级外层数据
                row.customerFeeSetList = customerFeeSetList
                if (isArrayLength(row.customerFeeSetList) && customerFeeSetGrid) {
                    row.haveSumRecord = true
                    customerFeeSetGrid.setRowExpand(row, true)
                }
                break;
            case FeeSetFoldingLayer.SUBDATA:
                // 临时更新是否展示图标
                const getRowExpandData = await customerFeeSetGrid?.getRowExpandRecords()
                const currentExpandData = getRowExpandData?.find(item => item.parentId === row.parentId)
                if (currentExpandData && customerFeeSetGrid) {
                    const list1 = isArrayLength(currentExpandData.customerFeeSetList) ? currentExpandData.customerFeeSetList : []
                    const listFilter = list1.filter(item => item.feeSetType !== FeeSetType.OPERATING_ORGANIZATION)
                    const list2 = isArrayLength(customerFeeSetList) ? customerFeeSetList : []
                    const newCustomerFeeSetList = [...listFilter, ...list2]
                    currentExpandData.customerFeeSetList = newCustomerFeeSetList
                    return
                }
                break;
        }
    }

    // 客户费用拷贝
    const initFeesetCopy = (data, isFeesetText: boolean, fn: Fn) => {
        // 激活不能拷贝，并且提示对应已激活的费用名称
        const checkboxDataSource = unref(getSelectionDataSource)
        if (checkboxDataSource.length > 1) {
            createMessage.warning("只能拷贝一条数据！")
            return
        }
        const isActiveFlag = checkboxDataSource.some(item => item.activeFlag)
        if (isActiveFlag) {
            const activeFlagList = checkboxDataSource.filter(item => item.activeFlag)
            const textArr = activeFlagList.map(item => item.feeSetName)
            ElMessageBox.alert(
                `当前费用已激活，禁止拷贝：<br/> ${textArr.join("<br/>")}`,
                { dangerouslyUseHTMLString: true }
            );
            return
        }
        if (data && !data.activeFlag && data.feeSetType === FeeSetType.OPERATING_ORGANIZATION) {
            createMessage.error("结算价尚未激活，请勿拷贝！")
            return
        }

        const fristCheckboxData = checkboxDataSource[0]
        // 禁止非结算价向结算价拷贝
        if (
            fristCheckboxData.feeSetTypeName === CustomerFeeSetType.SETTLEMENT_PRICE
            && data.feeSetTypeName === CustomerFeeSetType.CUSTOMER_PRICE
        ) {
            createMessage.warning("禁止非结算价向结算价拷贝！")
            return
        }
        const targetIds = checkboxDataSource.map(item => item.id)
        const sourceText = `${data.feeSetName}_${timeFiltering(data.beginDate)}_${timeFiltering(data.endDate)}            
        `
        const targetText = `${fristCheckboxData.feeSetName}_${timeFiltering(fristCheckboxData.beginDate)}_${timeFiltering(fristCheckboxData.endDate)}            
        `
        // 系统提示
        if (isFeesetText) {
            const promptText = {
                sourceText,
                targetText
            }
            // 按比例提示
            fn(data.id, targetIds, promptText)
        } else {
            createConfirm({
                title: '系统提示',
                type: "warning",
                message: h('div', [
                    h('div', '是否确定将费用:'),
                    h('p', { style: 'color: #ff0000;padding: 5px 0;' }, sourceText),
                    h('div', '拷贝到:'),
                    h('p', { style: 'color: #67C23A;padding: 5px 0;' }, targetText),
                    h('div', '原数据将被覆盖!')
                ]),
                cancelButtonText: "取消",
                confirmButtonText: "确定",
                dangerouslyUseHTMLString: true,
                beforeClose: (action, instance, done) => {
                    if (action === "confirm") {
                        // getCustomerFeeSetCopy(data.id, targetIds)
                        fn(data.id, targetIds)
                    }
                    done()
                },
            })
        }
    }
    // 拷贝接口
    const customerFeeSetCopyLoading = ref(true)
    const getCustomerFeeSetCopy = async (id: string, targetIds: string[]) => {
        if (!unref(customerFeeSetCopyLoading)) return
        try {
            const resCopy = await api_customerFeeSetCopy({ id, targetIds })
            const codeCopy = resData(resCopy, "操作成功")
            if (codeCopy !== 500) getCustomerFeeSetList();
        } finally {
            customerFeeSetCopyLoading.value = true
        }
    }
    // 按比例拷贝
    const hanleConfirmProportionCopy = async (copyParams: CopyParam, onclose: Fn, setLoading: Fn) => {
        try {
            const resCopy = await api_customerFeeSetProportionCopy(copyParams)
            const codeCopy = resData(resCopy, "操作成功")
            if (codeCopy !== 500) {
                onclose()
                getCustomerFeeSetList();
            }
        } finally {
            setLoading(false)
        }
    }

    // 禁用对应的操作
    const getForbiddenActionTypes = (val, scope) => {
        /**
         * isOwnRecord 判断是否用户自己数据
         */
        if(val && scope.row && !scope.row.isOwnRecord) {
            /**
             * 编辑、删除、新增版本、设置费用、是否禁用、设置人员
             */
            // !scope.row.isOwnRecord
            const actionTypes = [
                BaseFeesetAction.EDIT, 
                BaseFeesetAction.DELETE,
                BaseFeesetAction.VERSION,
                BaseFeesetAction.FEESET_SETING,
                BaseFeesetAction.FEESET_ACTIVE,
                BaseFeesetAction.TERMINATION_TAKES_EFFECT
            ]
            return actionTypes
        } else {
            return []
        }
    }

    // 下拉按钮显示事件
    const changeVisibleChange = (val, scope) => {
        // 不是结算价的时候才显示
        scope.row.feeSetTypeName === CustomerFeeSetType.SETTLEMENT_PRICE ?
            stateSelectList.isShowArr = [BaseFeesetAction.LOAD_SETTLEMENT_PRICE] : stateSelectList.isShowArr = []
        if (val) {
            // 是否禁用编辑
            // const edit = scope.row.activeFlag ? BaseFeesetAction.EDIT : -1
            let deleteFee = scope.row.activeFlag ? BaseFeesetAction.DELETE : -1
            // 是否激活状态
            let seting = scope.row.activeFlag ? BaseFeesetAction.FEESET_SETING : -1
            // 审核状态
            if (
                scope.row.feeApprovalStatus === FeeApprovalStatus.PENDING_APPROVAL ||
                scope.row.feeApprovalStatus === FeeApprovalStatus.APPROVAL_BY
            ) {
                seting = BaseFeesetAction.FEESET_SETING
                deleteFee = BaseFeesetAction.DELETE
            }
            // 拷贝的禁用
            const isId = isArrayLength(unref(getSelectionDataSource)) ?
                unref(getSelectionDataSource).some(item => item.id === scope.row.id) : true
            const copy = isId ? BaseFeesetAction.COPY : -1
            const proportionCopy = isId ? BaseFeesetAction.COPY_PROPORTION : -1
            const forbiddenActionTypes = getForbiddenActionTypes(val, scope)
            const nweDisabledArr = [...new Set([copy, proportionCopy, seting, deleteFee, ...forbiddenActionTypes])]
            stateSelectList.disabledArr = nweDisabledArr
        }
    }

    // 初始化分组数据
    const intiGroupList = async (data: Partial<CustomerGroupParam>) => {
        // 产品编号不能为空、销售人员公司编号不能为空
        if (!data.productId || (unref(getSysUserRoleDto).roleId === Department.SELL && !data.orgId)) {
            stateSelectList.list = []
            return
        } 
        const res = await api_customerGroupTreeList({ ...data })
        const list = resData(res)
        stateSelectList.list = list !== 500 ? list : []
    }
    onBeforeMount(() => {
        storeDropDownData.addFeeSetTypeList()
        storeDropDownData.addCountryList()
        storeDropDownData.addFeeItemList()
        storeFeeset.addCustomerFeeSetNameList();
        storeFeeset.addNotifyUserTypeList();
        storeFeeset.addSysUserList()
        storeFeeset.addFeeApprovalStatusList()
        storePersonnel.addGetSalesmanUserList()
    })

    // 刷新分组数据
    const hanleChangeSelect = (data: Partial<CustomerGroupParam>) => {
        intiGroupList({ ...data })
    }

    // 客户费用修改通知
    const hanleSaveNotice = async (params: NoticeDto) => {
        // console.log(params);
        const res = await api_EditNotice(params)
        resData(res)
        clearCheckboxRow()
    }

    // 设置接管
    const hanleConfirmAdministrator = async (params: Partial<CustomerFeeSetAdministratorDto>, onclose: Fn) => {
        try {
            const res = await api_addcustomerFeeSetAdministrator(params)
            const codeData = resData(res)
            if (codeData !== 500) getCustomerFeeSetList();
        } finally {
            onclose()
        }
    }

    return {
        addBtn,
        editBtn,
        deleteBtn,
        save,
        hanleSaveFeeBase,
        hanleChangeSelect,
        hanleSaveNotice,
        hanleChangeAction,
        changeVisibleChange,
        editFeeSetDetail,
        adCustomerFeeSetRef,
        adCustomerFeeSetDetailRef,
        customerFeeApprovalRef,
        feeNoticeShowRef,
        addEditAdministratorRef,
        customerProportionCopyRef,
        customerGroupRepeatInfoRef,
        stopEndDateRef,
        stateSelectList,
        customerFeeSetCompare,
        onFeeNoticeConfirm,
        onFeeNoticeApply,
        onApprovalRecord,
        sysUserList,
        feeSetTypeList,
        feeApprovalStatusList,
        getSalesmanUsesList,
        hanleConfirmAdministrator,
        hanleStopEndDate,
        hanleConfirmProportionCopy,
        getIsSell
    }
}