fix:财税管理-报销单 问题优化

feature-JimuReport-1106-yjl
yujinlong 4 weeks ago
parent 14a84862ca
commit 0c0a275e0d

@ -139,7 +139,7 @@
const calcSelectedAmount = computed(() => { const calcSelectedAmount = computed(() => {
let totalAmount = 0 let totalAmount = 0
totalAmount = [...props.hasSelectedRows, ...getSelectRows()].reduce((pre, cur) => { totalAmount = [...props.hasSelectedRows, ...getSelectRows()].reduce((pre, cur) => {
return plus(pre + Number(cur?.totalAmount || 0)) return plus(pre + Number(cur?.totalWithTax || 0))
}, 0) }, 0)
return numberThousandFormat(totalAmount) return numberThousandFormat(totalAmount)
}) })

@ -154,7 +154,7 @@
const calcSumAmount = computed(() => { const calcSumAmount = computed(() => {
return billTableData.value?.reduce((acc, cur) => { return billTableData.value?.reduce((acc, cur) => {
return plus(acc, cur?.amount || 0) return plus(acc, cur?.totalWithTax || 0)
}, 0) }, 0)
}) })
@ -218,9 +218,12 @@
// Query // Query
const getActionExtraQuery = (index) => { const getActionExtraQuery = (index) => {
const obj = appStore.getIdsData const obj = appStore.getIdsData
console.log('expenseAccount', obj['expenseAccount'])
console.log('index', index)
if (obj && obj['expenseAccount']) { if (obj && obj['expenseAccount']) {
const preData = obj['expenseAccount'][index] const preData = obj['expenseAccount'][index]
const pageType = [0, 2, 4].includes(preData.reimbursementType) ? 'EDIT' : 'VIEW' const pageType = [0, 4].includes(preData.reimbursementType) ? 'EDIT' : 'VIEW'
return { return {
type: pageType, type: pageType,

@ -119,7 +119,7 @@
} }
const getActionOptList = (record: BillItem): ActionItem[] => { const getActionOptList = (record: BillItem): ActionItem[] => {
const canEditable = [0, 2, 4].includes(record.reimbursementType) const canEditable = [0, 4].includes(record.reimbursementType)
return [ return [
{ {
customIcon: h('i', { customIcon: h('i', {
@ -173,7 +173,7 @@
}) })
} }
function GoDetailed(row: BillItem) { function GoDetailed(row: BillItem) {
const pageType = [0, 2, 4].includes(row.reimbursementType) ? 'EDIT' : 'VIEW' const pageType = [0, 4].includes(row.reimbursementType) ? 'EDIT' : 'VIEW'
go({ go({
path: '/expenseAccountDetail', path: '/expenseAccountDetail',
query: { query: {

Loading…
Cancel
Save