|
|
@ -18,6 +18,8 @@
|
|
|
|
@refresh="init"
|
|
|
|
@refresh="init"
|
|
|
|
@history="history"
|
|
|
|
@history="history"
|
|
|
|
@selectInsert="selectInsert"
|
|
|
|
@selectInsert="selectInsert"
|
|
|
|
|
|
|
|
@revoke="revoke"
|
|
|
|
|
|
|
|
@submit="submit"
|
|
|
|
></ActionBar>
|
|
|
|
></ActionBar>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div>
|
|
|
|
<div>
|
|
|
@ -52,7 +54,7 @@
|
|
|
|
import { feeStatusList } from './columns'
|
|
|
|
import { feeStatusList } from './columns'
|
|
|
|
// 引入计费标准字典
|
|
|
|
// 引入计费标准字典
|
|
|
|
import { feeUnitDict } from '/@/hooks/dict/index'
|
|
|
|
import { feeUnitDict } from '/@/hooks/dict/index'
|
|
|
|
import { GetList, SubmitFee, DeleteFee } from './api'
|
|
|
|
import { GetList, SubmitFee, DeleteFee, ApplyAudit, Withdraw } from './api'
|
|
|
|
import { useMessage } from '/@/hooks/web/useMessage'
|
|
|
|
import { useMessage } from '/@/hooks/web/useMessage'
|
|
|
|
const { createMessage } = useMessage()
|
|
|
|
const { createMessage } = useMessage()
|
|
|
|
defineComponent({
|
|
|
|
defineComponent({
|
|
|
@ -96,7 +98,8 @@
|
|
|
|
feeCode: '',
|
|
|
|
feeCode: '',
|
|
|
|
feeName: '',
|
|
|
|
feeName: '',
|
|
|
|
feeEnName: '',
|
|
|
|
feeEnName: '',
|
|
|
|
feeType: props.tbType == 'receive' ? 1 : 2,
|
|
|
|
quantity: 1,
|
|
|
|
|
|
|
|
feeType: props.tbType == 'receive' ? 1 : 2
|
|
|
|
}
|
|
|
|
}
|
|
|
|
// 表格绑定数据
|
|
|
|
// 表格绑定数据
|
|
|
|
const list = ref([])
|
|
|
|
const list = ref([])
|
|
|
@ -311,10 +314,9 @@
|
|
|
|
{
|
|
|
|
{
|
|
|
|
title: '录入人',
|
|
|
|
title: '录入人',
|
|
|
|
width: 100,
|
|
|
|
width: 100,
|
|
|
|
data: 'submitBy',
|
|
|
|
data: 'createByName',
|
|
|
|
readOnly: true,
|
|
|
|
readOnly: true
|
|
|
|
},
|
|
|
|
}, {
|
|
|
|
{
|
|
|
|
|
|
|
|
title: '录入日期',
|
|
|
|
title: '录入日期',
|
|
|
|
width: 100,
|
|
|
|
width: 100,
|
|
|
|
data: 'createTime',
|
|
|
|
data: 'createTime',
|
|
|
@ -341,16 +343,14 @@
|
|
|
|
{
|
|
|
|
{
|
|
|
|
title: '修改人',
|
|
|
|
title: '修改人',
|
|
|
|
width: 100,
|
|
|
|
width: 100,
|
|
|
|
data: 'submitBy',
|
|
|
|
data: 'updateByName',
|
|
|
|
readOnly: true,
|
|
|
|
readOnly: true
|
|
|
|
},
|
|
|
|
}, {
|
|
|
|
{
|
|
|
|
|
|
|
|
title: '修改日期',
|
|
|
|
title: '修改日期',
|
|
|
|
width: 100,
|
|
|
|
width: 100,
|
|
|
|
data: 'createTime',
|
|
|
|
data: 'updateTime',
|
|
|
|
readOnly: true,
|
|
|
|
readOnly: true
|
|
|
|
},
|
|
|
|
}, {
|
|
|
|
{
|
|
|
|
|
|
|
|
title: '发票申请金额',
|
|
|
|
title: '发票申请金额',
|
|
|
|
width: 100,
|
|
|
|
width: 100,
|
|
|
|
data: 'orderInvoiceAmount',
|
|
|
|
data: 'orderInvoiceAmount',
|
|
|
@ -386,8 +386,8 @@
|
|
|
|
fixedColumnsLeft: 1,
|
|
|
|
fixedColumnsLeft: 1,
|
|
|
|
// 需要隐藏的列
|
|
|
|
// 需要隐藏的列
|
|
|
|
hiddenColumns: {
|
|
|
|
hiddenColumns: {
|
|
|
|
columns: [1],
|
|
|
|
columns: [1, 2],
|
|
|
|
indicators: true,
|
|
|
|
indicators: true
|
|
|
|
},
|
|
|
|
},
|
|
|
|
// 控制回车移动
|
|
|
|
// 控制回车移动
|
|
|
|
enterMoves: 'row',
|
|
|
|
enterMoves: 'row',
|
|
|
@ -519,14 +519,59 @@
|
|
|
|
}),
|
|
|
|
}),
|
|
|
|
}
|
|
|
|
}
|
|
|
|
loading.value = true
|
|
|
|
loading.value = true
|
|
|
|
SubmitFee(postData)
|
|
|
|
SubmitFee(postData).then(res => {
|
|
|
|
.then((res) => {
|
|
|
|
loading.value = false
|
|
|
|
|
|
|
|
init()
|
|
|
|
|
|
|
|
createMessage.success(res.message)
|
|
|
|
|
|
|
|
}).catch(() => {
|
|
|
|
|
|
|
|
loading.value = false
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
// 提交审核
|
|
|
|
|
|
|
|
const submit = (arr) => {
|
|
|
|
|
|
|
|
loading.value = true
|
|
|
|
|
|
|
|
const ids = []
|
|
|
|
|
|
|
|
arr.forEach(res => {
|
|
|
|
|
|
|
|
if (res.id) ids.push(res.id)
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
if (ids.length == arr.length) {
|
|
|
|
|
|
|
|
ApplyAudit({ id: '', ids }).then(res => {
|
|
|
|
loading.value = false
|
|
|
|
loading.value = false
|
|
|
|
createMessage.success(res.message)
|
|
|
|
createMessage.success(res.message)
|
|
|
|
})
|
|
|
|
init()
|
|
|
|
.catch(() => {
|
|
|
|
}).catch(() => {
|
|
|
|
loading.value = false
|
|
|
|
loading.value = false
|
|
|
|
})
|
|
|
|
})
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
const postData = {
|
|
|
|
|
|
|
|
BusinessId: '1780891904372772864',
|
|
|
|
|
|
|
|
items: arr
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
SubmitFee(postData).then(res => {
|
|
|
|
|
|
|
|
const { data } = res
|
|
|
|
|
|
|
|
const ids = data.map(item => {
|
|
|
|
|
|
|
|
return item.id
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
ApplyAudit({ ids }).then(res => {
|
|
|
|
|
|
|
|
loading.value = false
|
|
|
|
|
|
|
|
createMessage.success(res.message)
|
|
|
|
|
|
|
|
init()
|
|
|
|
|
|
|
|
}).catch(() => {
|
|
|
|
|
|
|
|
loading.value = false
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
// 撤销提交
|
|
|
|
|
|
|
|
const revoke = (ids) => {
|
|
|
|
|
|
|
|
loading.value = true
|
|
|
|
|
|
|
|
Withdraw(ids).then(res => {
|
|
|
|
|
|
|
|
loading.value = false
|
|
|
|
|
|
|
|
createMessage.success(res.message)
|
|
|
|
|
|
|
|
init()
|
|
|
|
|
|
|
|
}).catch(() => {
|
|
|
|
|
|
|
|
loading.value = false
|
|
|
|
|
|
|
|
})
|
|
|
|
}
|
|
|
|
}
|
|
|
|
// 取消编辑
|
|
|
|
// 取消编辑
|
|
|
|
const cancelEdit = () => {
|
|
|
|
const cancelEdit = () => {
|
|
|
@ -601,40 +646,53 @@
|
|
|
|
{ FieldName: 'FeeType', FieldValue: props.tbType == 'receive' ? 1 : 2, ConditionalType: 1 },
|
|
|
|
{ FieldName: 'FeeType', FieldValue: props.tbType == 'receive' ? 1 : 2, ConditionalType: 1 },
|
|
|
|
]),
|
|
|
|
]),
|
|
|
|
}
|
|
|
|
}
|
|
|
|
GetList(postData)
|
|
|
|
GetList(postData).then(res => {
|
|
|
|
.then((res) => {
|
|
|
|
loading.value = false
|
|
|
|
loading.value = false
|
|
|
|
const { data } = res
|
|
|
|
const { data } = res
|
|
|
|
data.forEach((item, index) => {
|
|
|
|
data.forEach((item, index) => {
|
|
|
|
item['feeStatusText'] = feeStatusList[item.feeStatus]
|
|
|
|
item['feeStatusText'] = feeStatusList[item.feeStatus]
|
|
|
|
if (item.createTime) item.createTime = item.createTime.split(' ')[0]
|
|
|
|
if (item.createTime) item.createTime = item.createTime.split(' ')[0]
|
|
|
|
if (item.auditDate) item.auditDate = item.auditDate.split(' ')[0]
|
|
|
|
if (item.auditDate) item.auditDate = item.auditDate.split(' ')[0]
|
|
|
|
if (item.updateTime) item.updateTime = item.updateTime.split(' ')[0]
|
|
|
|
})
|
|
|
|
|
|
|
|
list.value = data
|
|
|
|
|
|
|
|
// 设置原始数据,取消使用
|
|
|
|
|
|
|
|
oldData = JSON.parse(JSON.stringify(data))
|
|
|
|
|
|
|
|
if (data.length != 0) {
|
|
|
|
|
|
|
|
hotTb.value.hotInstance.updateSettings({
|
|
|
|
|
|
|
|
cells: function (row, col) {
|
|
|
|
|
|
|
|
// 设置费用状态不是录入状态的行为只读
|
|
|
|
|
|
|
|
const props = { readOnly: true }
|
|
|
|
|
|
|
|
if (data[row]?.feeStatus != 1 && col != 0) {
|
|
|
|
|
|
|
|
// 配置不同状态的行颜色
|
|
|
|
|
|
|
|
if (data[row]?.feeStatus == 0) {
|
|
|
|
|
|
|
|
props['className'] = 'hot-green'
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
return props
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
return
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
hotTb.value.hotInstance.loadData(data)
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
.catch(() => {
|
|
|
|
|
|
|
|
loading.value = false
|
|
|
|
|
|
|
|
})
|
|
|
|
})
|
|
|
|
|
|
|
|
list.value = data
|
|
|
|
|
|
|
|
// 设置原始数据,取消使用
|
|
|
|
|
|
|
|
oldData = JSON.parse(JSON.stringify(data))
|
|
|
|
|
|
|
|
if (data.length != 0) {
|
|
|
|
|
|
|
|
hotTb.value.hotInstance.updateSettings({
|
|
|
|
|
|
|
|
cells: function(row, col) {
|
|
|
|
|
|
|
|
// 设置费用状态不是录入状态的行为只读
|
|
|
|
|
|
|
|
const props = { readOnly: true }
|
|
|
|
|
|
|
|
// 审核通过(STATUS=0)
|
|
|
|
|
|
|
|
// 录入状态(STATUS=1)
|
|
|
|
|
|
|
|
// 提交审核(STATUS=2)
|
|
|
|
|
|
|
|
// 申请修改 (STATUS=3)
|
|
|
|
|
|
|
|
// 申请删除 (STATUS=4)
|
|
|
|
|
|
|
|
// 撤销申请 (STATUS=5)
|
|
|
|
|
|
|
|
// 驳回提交(STATUS=6)
|
|
|
|
|
|
|
|
// 驳回申请(STATUS=7)
|
|
|
|
|
|
|
|
// 部分结算(STATUS=8)
|
|
|
|
|
|
|
|
// 结算完毕(STATUS=9)
|
|
|
|
|
|
|
|
if (data[row]?.feeStatus != 1 && col != 0) {
|
|
|
|
|
|
|
|
// 配置不同状态的行颜色
|
|
|
|
|
|
|
|
if (data[row]?.feeStatus == 0) {
|
|
|
|
|
|
|
|
props['className'] = 'hot-green'
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if (data[row]?.feeStatus == 2) {
|
|
|
|
|
|
|
|
props['className'] = 'hot-yellow'
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
return props
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
return
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
hotTb.value.hotInstance.loadData(data)
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
.catch(() => {
|
|
|
|
|
|
|
|
loading.value = false
|
|
|
|
|
|
|
|
})
|
|
|
|
}
|
|
|
|
}
|
|
|
|
onMounted(() => {
|
|
|
|
onMounted(() => {
|
|
|
|
const hot = hotTb.value.hotInstance
|
|
|
|
const hot = hotTb.value.hotInstance
|
|
|
@ -642,7 +700,7 @@
|
|
|
|
hot.addHook('beforeKeyDown', function (event) {
|
|
|
|
hot.addHook('beforeKeyDown', function (event) {
|
|
|
|
// 检查按下的是否是特定的键(例如 'Enter')
|
|
|
|
// 检查按下的是否是特定的键(例如 'Enter')
|
|
|
|
if (event.key === 'ArrowDown') {
|
|
|
|
if (event.key === 'ArrowDown') {
|
|
|
|
if (hot.getSelected()[0][0] == list.value.length - 1) {
|
|
|
|
if (hot.getSelected()[0][0] == list.value.length - 1 && !hot.getActiveEditor()?._opened) {
|
|
|
|
list.value.push(JSON.parse(JSON.stringify(row)))
|
|
|
|
list.value.push(JSON.parse(JSON.stringify(row)))
|
|
|
|
nextTick(() => {
|
|
|
|
nextTick(() => {
|
|
|
|
hot.selectCell(list.value.length - 1, 3)
|
|
|
|
hot.selectCell(list.value.length - 1, 3)
|
|
|
@ -715,4 +773,15 @@
|
|
|
|
.handsontableInput {
|
|
|
|
.handsontableInput {
|
|
|
|
line-height: 30px;
|
|
|
|
line-height: 30px;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
.hot-yellow {
|
|
|
|
|
|
|
|
background: #FFE37E;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
.hot-green, .hot-yellow {
|
|
|
|
|
|
|
|
.htAutocompleteArrow {
|
|
|
|
|
|
|
|
display: none;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
.handsontableInput {
|
|
|
|
|
|
|
|
line-height: 30px;
|
|
|
|
|
|
|
|
}
|
|
|
|
</style>
|
|
|
|
</style>
|
|
|
|