Commit 86b9f1bc by chenwq

feat(财务管理系统): 添加支付凭证预览功能并优化账单详情显示

- 在SystemBillDialog和SystemBillDetailDialog组件中添加支付凭证图片预览功能
- 优化账单详情页显示,新增订单总数、总产值等统计信息
- 为交易号字段添加蓝色样式和点击预览功能
- 调整总计信息布局为flex布局
1 parent 3faae5ce
...@@ -17,20 +17,28 @@ ...@@ -17,20 +17,28 @@
</div> </div>
<!-- 普通文本显示 --> <!-- 普通文本显示 -->
<div v-else> <div v-else>
<span v-if="scope.row[subItem.extInfo.source || 'ORDER'][subItem.fieldCode] === 0">0</span> <div v-if="subItem.fieldCode == 'orderCode' && scope.row.ORDER.sourceType == 2" class="refund-txt">退</div>
<span v-if="subItem.fieldCode == 'tradeNo'" :class="scope.row.ORDER.payVoucherList && scope.row.ORDER.payVoucherList.length ? 'txt-blue': '' ">
<el-image v-if="scope.row.ORDER.payVoucherList && scope.row.ORDER.payVoucherList.length" style="width: 20px; height: 20px" :src="scope.row.ORDER.payVoucherList[0].payVoucher" :preview-src-list="srcList" @click="handleReviewImg(scope.row)"></el-image>
{{ scope.row[subItem.extInfo.source || 'ORDER'][subItem.fieldCode] || '-' }}</span>
<span v-else-if="scope.row[subItem.extInfo.source || 'ORDER'][subItem.fieldCode] === 0">0</span>
<span v-else>{{ scope.row[subItem.extInfo.source || 'ORDER'][subItem.fieldCode] || '-' }}</span> <span v-else>{{ scope.row[subItem.extInfo.source || 'ORDER'][subItem.fieldCode] || '-' }}</span>
</div> </div>
</div> </div>
</el-table-column> </el-table-column>
</el-table-column> </el-table-column>
</el-table> </el-table>
<el-pagination background @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="page.pageNum" :page-size="page.pageSize" :total="page.total" :page-sizes="[10, 20, 30, 40]" layout="sizes,total,->,prev,pager,next,jumper"> <!-- <el-pagination background @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="page.pageNum" :page-size="page.pageSize" :total="page.total" :page-sizes="[10, 20, 30, 40]" layout="sizes,total,->,prev,pager,next,jumper">
</el-pagination> </el-pagination> -->
<DynamicAddTable v-if="billTypeStr == 'traffic'" ref="dynamicReceiveAdd" :configObj="{'title': '应收'}" :receivableAdjustments="receivableAdjustments" @handleInputBlur="billCompute" :isEdit="isEdit"></DynamicAddTable> <DynamicAddTable v-if="billTypeStr == 'traffic'" ref="dynamicReceiveAdd" :configObj="{'title': '应收'}" :receivableAdjustments="receivableAdjustments" @handleInputBlur="billCompute" :isEdit="isEdit"></DynamicAddTable>
<DynamicAddTable ref="dynamicAdd" :adjustments="payableAdjustments" @handleInputBlur="billCompute" :isEdit="isEdit"></DynamicAddTable> <DynamicAddTable ref="dynamicAdd" :adjustments="payableAdjustments" @handleInputBlur="billCompute" :isEdit="isEdit"></DynamicAddTable>
<div class="total-box"> <div class="total-box">
<div>订单总数:{{ totalAmount }}</div>
<div>总产值:{{ totalOrderCount }}</div>
<div v-if="billTypeStr == 'traffic'">应收总额:{{ totalReceivable }}元</div> <div v-if="billTypeStr == 'traffic'">应收总额:{{ totalReceivable }}元</div>
<div>应付总额:{{ totalPayable }}元</div> <div>应付总额:{{ totalPayable }}元</div>
<div>线上分账总额:{{ totalSplitPaidAmount }}</div>
<div>线下已付总额:{{ totalOfflinePaidAmount }}</div>
<div v-if="billTypeStr == 'traffic'">线下对账总额:{{ totalOfflineReconciliation }}元</div> <div v-if="billTypeStr == 'traffic'">线下对账总额:{{ totalOfflineReconciliation }}元</div>
</div> </div>
</d2-dialog> </d2-dialog>
...@@ -242,8 +250,12 @@ export default { ...@@ -242,8 +250,12 @@ export default {
"coverReceiverType" "coverReceiverType"
], ],
serviceEditList: ["partnerFeeCalculateType,partnerFeeCalculateValue", "partnerFeeCalculateCoefficient", "coverReceiverType"], serviceEditList: ["partnerFeeCalculateType,partnerFeeCalculateValue", "partnerFeeCalculateCoefficient", "coverReceiverType"],
totalAmount: 0,
totalOrderCount: 0,
totalReceivable: 0, totalReceivable: 0,
totalPayable: 0, totalPayable: 0,
totalSplitPaidAmount: 0,
totalOfflinePaidAmount: 0,
totalOfflineReconciliation: 0, totalOfflineReconciliation: 0,
changeFieldCodeList: [{ changeFieldCodeList: [{
old: 'platformMerchantName', old: 'platformMerchantName',
...@@ -350,7 +362,8 @@ export default { ...@@ -350,7 +362,8 @@ export default {
suffix: '元' suffix: '元'
}] }]
}, },
defaultWidth: '180px' defaultWidth: '180px',
srcList: []
} }
}, },
mounted() { mounted() {
...@@ -366,8 +379,12 @@ export default { ...@@ -366,8 +379,12 @@ export default {
this.originalOrderList = this.billTmplInfo?.orderPage?.list || [] this.originalOrderList = this.billTmplInfo?.orderPage?.list || []
this.orderId = this.billTmplInfo.id this.orderId = this.billTmplInfo.id
this.sceneType = this.billTmplInfo.sceneType this.sceneType = this.billTmplInfo.sceneType
this.totalAmount = this.billTmplInfo.totalAmount
this.totalOrderCount = this.billTmplInfo.totalOrderCount
this.totalReceivable = this.billTmplInfo.totalReceivable this.totalReceivable = this.billTmplInfo.totalReceivable
this.totalPayable = this.billTmplInfo.totalPayable this.totalPayable = this.billTmplInfo.totalPayable
this.totalSplitPaidAmount = this.billTmplInfo.totalSplitPaidAmount
this.totalOfflinePaidAmount = this.billTmplInfo.totalOfflinePaidAmount
this.totalOfflineReconciliation = this.billTmplInfo.totalOfflineReconciliation this.totalOfflineReconciliation = this.billTmplInfo.totalOfflineReconciliation
this.page.pageNum = this.billTmplInfo?.orderPage?.pageNum || 1 this.page.pageNum = this.billTmplInfo?.orderPage?.pageNum || 1
this.page.pageSize = this.billTmplInfo?.orderPage?.pageSize || 10 this.page.pageSize = this.billTmplInfo?.orderPage?.pageSize || 10
...@@ -543,6 +560,13 @@ export default { ...@@ -543,6 +560,13 @@ export default {
this.modifyDelete(orderCode) this.modifyDelete(orderCode)
}, },
handleReviewImg(row) {
this.srcList = []
row.ORDER.payVoucherList.forEach(item => {
this.srcList.push(item.payVoucher)
})
},
billCompute() { billCompute() {
this.loading = true this.loading = true
const dynamicForm = { const dynamicForm = {
...@@ -557,8 +581,12 @@ export default { ...@@ -557,8 +581,12 @@ export default {
// console.log(dynamicForm, 'dynamicForm') // console.log(dynamicForm, 'dynamicForm')
billComputePage({ json: JSON.stringify(dynamicForm) }).then(res => { billComputePage({ json: JSON.stringify(dynamicForm) }).then(res => {
this.originalOrderList = res.orderPage?.list || [] this.originalOrderList = res.orderPage?.list || []
this.totalAmount = res.totalAmount
this.totalOrderCount = res.totalOrderCount
this.totalReceivable = res.totalReceivable this.totalReceivable = res.totalReceivable
this.totalPayable = res.totalPayable this.totalPayable = res.totalPayable
this.totalPayable = res.totalPayable
this.totalSplitPaidAmount = res.totalSplitPaidAmount
this.totalOfflineReconciliation = res.totalOfflineReconciliation this.totalOfflineReconciliation = res.totalOfflineReconciliation
this.orderTotalStat = res.orderTotalStat this.orderTotalStat = res.orderTotalStat
this.page.pageNum = res.orderPage?.pageNum || 1 this.page.pageNum = res.orderPage?.pageNum || 1
...@@ -655,6 +683,13 @@ export default { ...@@ -655,6 +683,13 @@ export default {
padding: 14px; padding: 14px;
text-align: center; text-align: center;
} }
.total-box {
display: flex;
flex-wrap: wrap;
div {
flex: 1;
}
}
.batch-box { .batch-box {
margin: 10px 36px; margin: 10px 36px;
} }
...@@ -663,4 +698,8 @@ export default { ...@@ -663,4 +698,8 @@ export default {
font-size: 14px; font-size: 14px;
margin: 8px 0; margin: 8px 0;
} }
.txt-blue {
cursor: pointer;
color: #2a58ad;
}
</style> </style>
...@@ -82,7 +82,10 @@ ...@@ -82,7 +82,10 @@
<div v-else class="flex-center"> <div v-else class="flex-center">
<!-- {{subItem.extInfo.source || 'ORDER'}}{{subItem.fieldCode}} --> <!-- {{subItem.extInfo.source || 'ORDER'}}{{subItem.fieldCode}} -->
<div v-if="subItem.fieldCode == 'orderCode' && scope.row.ORDER.sourceType == 2" class="refund-txt">退</div> <div v-if="subItem.fieldCode == 'orderCode' && scope.row.ORDER.sourceType == 2" class="refund-txt">退</div>
<span v-if="scope.row[subItem.extInfo.source || 'ORDER'][subItem.fieldCode] === 0">0</span> <span v-if="subItem.fieldCode == 'tradeNo'" :class="scope.row.ORDER.payVoucherList && scope.row.ORDER.payVoucherList.length ? 'txt-blue': '' ">
<el-image v-if="scope.row.ORDER.payVoucherList && scope.row.ORDER.payVoucherList.length" style="width: 20px; height: 20px" :src="scope.row.ORDER.payVoucherList[0].payVoucher" :preview-src-list="srcList" @click="handleReviewImg(scope.row)"></el-image>
{{ scope.row[subItem.extInfo.source || 'ORDER'][subItem.fieldCode] || '-' }}</span>
<span v-else-if="scope.row[subItem.extInfo.source || 'ORDER'][subItem.fieldCode] === 0">0</span>
<span v-else>{{ scope.row[subItem.extInfo.source || 'ORDER'][subItem.fieldCode] || '-' }}</span> <span v-else>{{ scope.row[subItem.extInfo.source || 'ORDER'][subItem.fieldCode] || '-' }}</span>
</div> </div>
</div> </div>
...@@ -151,6 +154,7 @@ ...@@ -151,6 +154,7 @@
<tmpl-drawer v-if="tmplDrawerVisible" :tmplDrawerVisible="tmplDrawerVisible" :type="tmplInfo.type" :tmplSelectList="tmplInfo.tmplSelectList" @handleConfirm="handleCustConfirm" @handleClose="handleCustVisible"></tmpl-drawer> <tmpl-drawer v-if="tmplDrawerVisible" :tmplDrawerVisible="tmplDrawerVisible" :type="tmplInfo.type" :tmplSelectList="tmplInfo.tmplSelectList" @handleConfirm="handleCustConfirm" @handleClose="handleCustVisible"></tmpl-drawer>
<choose-refund-order-dialog v-if="chooseVisible" :chooseVisible="chooseVisible" :infoForm="refundInfo" @chooseOrderConfirm="chooseOrderConfirm" @dialogClose="changeChooseVisible"></choose-refund-order-dialog> <choose-refund-order-dialog v-if="chooseVisible" :chooseVisible="chooseVisible" :infoForm="refundInfo" @chooseOrderConfirm="chooseOrderConfirm" @dialogClose="changeChooseVisible"></choose-refund-order-dialog>
<glsk-form-dialog v-if="searchVisible" :selectVisible="searchVisible" :dialogConfig="searchDialogConfig" label-width="200px" :formRules="searchRules" :editData="searchForm" :editFormData="searchEditFormData" :baseData="baseData" @handleClose="searchDialogVisible" @handleConfirm="handleSearchConfirm"></glsk-form-dialog> <glsk-form-dialog v-if="searchVisible" :selectVisible="searchVisible" :dialogConfig="searchDialogConfig" label-width="200px" :formRules="searchRules" :editData="searchForm" :editFormData="searchEditFormData" :baseData="baseData" @handleClose="searchDialogVisible" @handleConfirm="handleSearchConfirm"></glsk-form-dialog>
</el-image>
</div> </div>
</template> </template>
...@@ -829,7 +833,8 @@ export default { ...@@ -829,7 +833,8 @@ export default {
}, },
// 选择退款订单 // 选择退款订单
chooseVisible: '', chooseVisible: '',
refundInfo: {} refundInfo: {},
srcList: []
} }
}, },
mounted() { mounted() {
...@@ -1203,6 +1208,10 @@ export default { ...@@ -1203,6 +1208,10 @@ export default {
}, },
handleChooseRefundOrder() { handleChooseRefundOrder() {
this.refundInfo = {
sceneType: this.sceneType,
shopMerchantId: this.billTmplInfo.shopMerchantId
}
this.changeChooseVisible() this.changeChooseVisible()
}, },
...@@ -1545,6 +1554,12 @@ export default { ...@@ -1545,6 +1554,12 @@ export default {
} }
return isValid; return isValid;
}, },
handleReviewImg(row) {
this.srcList = []
row.ORDER.payVoucherList.forEach(item => {
this.srcList.push(item.payVoucher)
})
},
handelBatchVisible() { handelBatchVisible() {
this.batchVisible = !this.batchVisible this.batchVisible = !this.batchVisible
}, },
...@@ -1817,4 +1832,8 @@ export default { ...@@ -1817,4 +1832,8 @@ export default {
font-size: 14px; font-size: 14px;
margin: 8px 0; margin: 8px 0;
} }
.txt-blue {
cursor: pointer;
color: #2a58ad;
}
</style> </style>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!