|
|
|
@ -5,27 +5,40 @@
|
|
|
|
|
-->
|
|
|
|
|
<template>
|
|
|
|
|
<div class="ds-pay-apply">
|
|
|
|
|
<BasicTable
|
|
|
|
|
class="ds-table"
|
|
|
|
|
:scroll="{ x: '100%', y: '500px' }"
|
|
|
|
|
@register="registerTable"
|
|
|
|
|
@row-dbClick="edit"
|
|
|
|
|
>
|
|
|
|
|
<BasicTable class="ds-table" @register="registerTable" @row-dbClick="edit">
|
|
|
|
|
<template #toolbar>
|
|
|
|
|
<TableActionBar :selectRow="getSelectRows" :reload="reload" @exportFile="exportFile"></TableActionBar>
|
|
|
|
|
</template>
|
|
|
|
|
<template v-slot:bodyCell="{ column, record }">
|
|
|
|
|
<!-- 复制单号 -->
|
|
|
|
|
<template v-if="column.dataIndex == 'applicationNO'">
|
|
|
|
|
<span @click="copyNo($event, record.applicationNO)" style="cursor: pointer"><span class="iconfont icon-fuzhi" :style="{'fontSize': '12px', 'color': '#419638'}"></span> <span class="ds-green-status">{{ record.applicationNO }}</span></span>
|
|
|
|
|
<span @click="copyNo($event, record.applicationNO)" style="cursor: pointer"><span>{{ record.applicationNO }}</span><span class="iconfont icon-fuzhi11"></span></span>
|
|
|
|
|
</template>
|
|
|
|
|
<!-- 状态 -->
|
|
|
|
|
<template v-if="column.dataIndex == 'status'">
|
|
|
|
|
<span v-if="record.status == 0" class="ds-green-status">● {{ FeeStatus[record.status] }}</span>
|
|
|
|
|
<span v-else-if="record.status == 1" class="ds-blue-status">● {{ FeeStatus[record.status] }}</span>
|
|
|
|
|
<span v-else-if="/^2|3|4|5|6$/.test(record.status)" class="ds-orange-status">● {{ FeeStatus[record.status] }}</span>
|
|
|
|
|
<span v-else-if="/^7|8$/.test(record.status)" class="ds-red-status">● {{ FeeStatus[record.status] }}</span>
|
|
|
|
|
<span v-else class="ds-purple-status">● {{ FeeStatus[record.status] }}</span>
|
|
|
|
|
<template v-if="column.dataIndex == 'statusText'">
|
|
|
|
|
<span v-if="record.status == 0" class="ds-blue-tag">
|
|
|
|
|
{{ record.statusText }}</span>
|
|
|
|
|
<span v-else-if="record.status == 1" class="ds-green-tag">{{
|
|
|
|
|
record.statusText
|
|
|
|
|
}}</span>
|
|
|
|
|
<span v-else-if="/^2|3|4|5|6$/.test(record.status)" class="ds-orange-tag">{{
|
|
|
|
|
record.statusText
|
|
|
|
|
}}</span>
|
|
|
|
|
<span v-else-if="/^7|8$/.test(record.status)" class="ds-red-tag">{{
|
|
|
|
|
record.statusText
|
|
|
|
|
}}</span>
|
|
|
|
|
<span v-else class="ds-purple-tag">{{ record.statusText }}</span>
|
|
|
|
|
</template>
|
|
|
|
|
<template v-if="column.key === 'action'">
|
|
|
|
|
<TableAction :actions="[
|
|
|
|
|
{
|
|
|
|
|
icon: 'clarity:note-edit-line',
|
|
|
|
|
tooltip: '编辑',
|
|
|
|
|
onClick: () => {
|
|
|
|
|
edit(record)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
]" />
|
|
|
|
|
</template>
|
|
|
|
|
</template>
|
|
|
|
|
</BasicTable>
|
|
|
|
@ -33,9 +46,10 @@
|
|
|
|
|
</template>
|
|
|
|
|
<script lang="ts" setup>
|
|
|
|
|
import { onMounted, ref, watch } from 'vue'
|
|
|
|
|
import { BasicTable, useTable } from '/@/components/Table'
|
|
|
|
|
import { BasicTable, useTable, TableAction } from '/@/components/Table'
|
|
|
|
|
import TableActionBar from './components/tableActionBar.vue'
|
|
|
|
|
import { useMessage } from '/@/hooks/web/useMessage'
|
|
|
|
|
import { formatParams } from '/@/hooks/web/common'
|
|
|
|
|
const { createMessage } = useMessage()
|
|
|
|
|
import { GetList } from './api'
|
|
|
|
|
import { columns, searchFormSchema, FeeStatus } from './columns'
|
|
|
|
@ -43,75 +57,54 @@
|
|
|
|
|
import { exportExcel } from '/@/hooks/web/common'
|
|
|
|
|
const go = useGo()
|
|
|
|
|
const params = ref([])
|
|
|
|
|
const [registerTable, { reload, getForm, getPaginationRef, getSelectRows, getColumns }] = useTable({
|
|
|
|
|
const [registerTable, { reload, getSelectRows, getColumns }] = useTable({
|
|
|
|
|
title: '',
|
|
|
|
|
api: async (p) => {
|
|
|
|
|
params.value = p
|
|
|
|
|
const res = await GetList(p)
|
|
|
|
|
const res: API.DataResult = await GetList(p)
|
|
|
|
|
res.data.forEach(item => {
|
|
|
|
|
if (item.amountRMB) item.amountRMB = item.amountRMB.toLocaleString()
|
|
|
|
|
if (item.amountUSD) item.amountUSD = item.amountUSD.toLocaleString()
|
|
|
|
|
if (item.amountOther) item.amountOther = item.amountOther.toLocaleString()
|
|
|
|
|
if (item.settlementRMB) item.settlementRMB = item.settlementRMB.toLocaleString()
|
|
|
|
|
if (item.settlementUSD) item.settlementUSD = item.settlementUSD.toLocaleString()
|
|
|
|
|
if (item.settlementOther) item.settlementOther = item.settlementOther.toLocaleString()
|
|
|
|
|
})
|
|
|
|
|
return new Promise((resolve) => {
|
|
|
|
|
resolve({ data: [...res.data], total: res.count })
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
beforeFetch: () => {
|
|
|
|
|
var currentPageInfo: any = getPaginationRef()
|
|
|
|
|
var data = getForm().getFieldsValue()
|
|
|
|
|
const postParam = {
|
|
|
|
|
queryCondition: '',
|
|
|
|
|
pageCondition: {
|
|
|
|
|
pageIndex: currentPageInfo.current,
|
|
|
|
|
pageSize: currentPageInfo.pageSize,
|
|
|
|
|
sortConditions: [],
|
|
|
|
|
},
|
|
|
|
|
}
|
|
|
|
|
let condition: API.ConditionItem[] = []
|
|
|
|
|
if (!!data.billNO) {
|
|
|
|
|
condition.push({
|
|
|
|
|
FieldName: 'billNO',
|
|
|
|
|
FieldValue: data.billNO,
|
|
|
|
|
ConditionalType: 1,
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
if (!!data.applicationNO) {
|
|
|
|
|
condition.push({
|
|
|
|
|
FieldName: 'applicationNO',
|
|
|
|
|
FieldValue: data.applicationNO,
|
|
|
|
|
ConditionalType: 1,
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
if (!!data.customerId) {
|
|
|
|
|
condition.push({
|
|
|
|
|
FieldName: 'customerId',
|
|
|
|
|
FieldValue: data.customerId,
|
|
|
|
|
ConditionalType: 1,
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
if (!!data.status) {
|
|
|
|
|
condition.push({
|
|
|
|
|
FieldName: 'status',
|
|
|
|
|
FieldValue: data.status,
|
|
|
|
|
ConditionalType: 1,
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
console.log(condition)
|
|
|
|
|
postParam.queryCondition = JSON.stringify(condition)
|
|
|
|
|
return postParam
|
|
|
|
|
beforeFetch: (p) => {
|
|
|
|
|
return formatParams(p)
|
|
|
|
|
},
|
|
|
|
|
columns,
|
|
|
|
|
formConfig: {
|
|
|
|
|
labelWidth: 120,
|
|
|
|
|
schemas: searchFormSchema,
|
|
|
|
|
// 是否显示高级查询(默认否)
|
|
|
|
|
useAdvancedSearch: true
|
|
|
|
|
},
|
|
|
|
|
isTreeTable: false,
|
|
|
|
|
pagination: true,
|
|
|
|
|
striped: false,
|
|
|
|
|
striped: true,
|
|
|
|
|
useSearchForm: true,
|
|
|
|
|
showTableSetting: true,
|
|
|
|
|
bordered: true,
|
|
|
|
|
showIndexColumn: true,
|
|
|
|
|
canResize: false,
|
|
|
|
|
immediate: false,
|
|
|
|
|
id: '0'
|
|
|
|
|
indexColumnProps: {
|
|
|
|
|
width: 60,
|
|
|
|
|
},
|
|
|
|
|
canResize: true,
|
|
|
|
|
resizeHeightOffset: 15,
|
|
|
|
|
immediate: true,
|
|
|
|
|
actionColumn: {
|
|
|
|
|
width: 50,
|
|
|
|
|
title: '操作',
|
|
|
|
|
dataIndex: 'action',
|
|
|
|
|
fixed: 'right'
|
|
|
|
|
},
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
// 导出Excel
|
|
|
|
|
const exportFile = () => {
|
|
|
|
|
exportExcel(GetList, params.value, getColumns(), '费用申请')
|
|
|
|
@ -142,10 +135,13 @@
|
|
|
|
|
|
|
|
|
|
<style lang="less">
|
|
|
|
|
.ds-pay-apply {
|
|
|
|
|
display: fle;
|
|
|
|
|
flex-direction: column;
|
|
|
|
|
.vben-basic-table-header__toolbar {
|
|
|
|
|
justify-content: space-between;
|
|
|
|
|
}
|
|
|
|
|
.icon-fuzhi11 {
|
|
|
|
|
color: #257AFA;
|
|
|
|
|
margin-left: 5px;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
</style>
|