feat: 对账记录
This commit is contained in:
@@ -0,0 +1,196 @@
|
||||
<!--#
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<el-card shadow="never">
|
||||
<search @search="doSearch">
|
||||
<search-item label="供应商">
|
||||
<el-select clearable filterable placeholder="请选择供应商" style="width: 100%" v-model="pageForm.supplierId">
|
||||
<el-option :key="item.supplierId" :label="item.supplierName" :value="item.supplierId" v-for="item in supplierList"></el-option>
|
||||
</el-select>
|
||||
</search-item>
|
||||
<search-item label="订单ID">
|
||||
<el-input clearable placeholder="请输入订单ID" v-model="pageForm.orderId"></el-input>
|
||||
</search-item>
|
||||
<search-item label="用户ID">
|
||||
<el-input clearable placeholder="请输入用户ID" v-model="pageForm.userId"></el-input>
|
||||
</search-item>
|
||||
<search-item label="批次号">
|
||||
<el-input clearable placeholder="请输入对账批次号" v-model="pageForm.batchNo"></el-input>
|
||||
</search-item>
|
||||
<search-item label="差异类型">
|
||||
<el-select clearable placeholder="请选择差异类型" style="width: 100%" v-model="pageForm.diffType">
|
||||
<el-option label="一致" :value="0"></el-option>
|
||||
<el-option label="异常" :value="1"></el-option>
|
||||
</el-select>
|
||||
</search-item>
|
||||
<search-item label="通知状态">
|
||||
<el-select clearable placeholder="请选择通知状态" style="width: 100%" v-model="pageForm.noticeStatus">
|
||||
<el-option label="未推送" :value="0"></el-option>
|
||||
<el-option label="推送成功" :value="1"></el-option>
|
||||
<el-option label="推送失败" :value="2"></el-option>
|
||||
</el-select>
|
||||
</search-item>
|
||||
</search>
|
||||
</el-card>
|
||||
|
||||
<el-card class="mt10" shadow="never">
|
||||
<table-tool label="对账记录"></table-tool>
|
||||
<el-table :data="tableData" border class="vi-table" size="small" style="width: 100%" v-loading="tableLoading">
|
||||
<el-table-column :index="indexMethod" align="center" label="序号" type="index" width="70"></el-table-column>
|
||||
<el-table-column align="center" label="批次号" min-width="170" prop="batchNo" show-overflow-tooltip></el-table-column>
|
||||
<el-table-column align="center" label="订单ID" min-width="170" prop="orderId" show-overflow-tooltip></el-table-column>
|
||||
<el-table-column align="center" label="供应商" min-width="150" prop="supplierName" show-overflow-tooltip></el-table-column>
|
||||
<el-table-column align="center" label="供应商编码" min-width="130" prop="supplierId" show-overflow-tooltip></el-table-column>
|
||||
<el-table-column align="center" label="用户ID" min-width="120" prop="userId" show-overflow-tooltip></el-table-column>
|
||||
<el-table-column align="center" label="订单总金额(平台)" min-width="140" prop="pTotalPrice"></el-table-column>
|
||||
<el-table-column align="center" label="现金金额(平台)" min-width="130" prop="pCashAmount"></el-table-column>
|
||||
<el-table-column align="center" label="积分金额(平台)" min-width="130" prop="pPointsPrice"></el-table-column>
|
||||
<el-table-column align="center" label="退款金额(平台)" min-width="130" prop="pRefund"></el-table-column>
|
||||
<el-table-column align="center" label="订单总金额(对账)" min-width="140" prop="sTotalPrice"></el-table-column>
|
||||
<el-table-column align="center" label="现金金额(对账)" min-width="130" prop="sCashAmount"></el-table-column>
|
||||
<el-table-column align="center" label="积分金额(对账)" min-width="130" prop="sPointsPrice"></el-table-column>
|
||||
<el-table-column align="center" label="退款金额(对账)" min-width="130" prop="sRefund"></el-table-column>
|
||||
<el-table-column align="center" label="差异类型" min-width="110">
|
||||
<template slot-scope="{row}">
|
||||
<el-tag :type="diffTypeTag(row.diffType)" size="mini">{{ diffTypeName(row.diffType) }}</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="通知状态" min-width="110">
|
||||
<template slot-scope="{row}">
|
||||
<el-tag :type="noticeStatusTag(row.noticeStatus)" size="mini">{{ noticeStatusName(row.noticeStatus) }}</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="推送次数" min-width="90" prop="pushTime"></el-table-column>
|
||||
<el-table-column align="center" label="差异原因" min-width="240" prop="diffReason" show-overflow-tooltip></el-table-column>
|
||||
<el-table-column align="center" fixed="right" label="操作" width="90">
|
||||
<template slot-scope="{row}">
|
||||
<el-button @click="openDetail(row)" size="mini" type="primary">查看</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<el-pagination
|
||||
:current-page="pageForm.pageNumber"
|
||||
:page-size="pageForm.pageSize"
|
||||
:page-sizes="[10, 20, 30, 50]"
|
||||
:total="pageForm.totalCount"
|
||||
@current-change="pageChange"
|
||||
@size-change="sizeChange"
|
||||
layout="total, sizes, prev, pager, next"
|
||||
style="margin-top: 16px; text-align: right"
|
||||
></el-pagination>
|
||||
</el-card>
|
||||
|
||||
<el-dialog :close-on-click-modal="false" title="对账记录详情" :visible.sync="detailDialogVisible" width="820px">
|
||||
<el-descriptions :column="2" border size="small" v-if="currentRecord">
|
||||
<el-descriptions-item label="批次号">{{ currentRecord.batchNo || "-" }}</el-descriptions-item>
|
||||
<el-descriptions-item label="订单ID">{{ currentRecord.orderId || "-" }}</el-descriptions-item>
|
||||
<el-descriptions-item label="供应商">{{ currentRecord.supplierName || currentRecord.supplierId || "-" }}</el-descriptions-item>
|
||||
<el-descriptions-item label="用户ID">{{ currentRecord.userId || "-" }}</el-descriptions-item>
|
||||
<el-descriptions-item label="平台总金额">{{ currentRecord.pTotalPrice || "0" }}</el-descriptions-item>
|
||||
<el-descriptions-item label="对账总金额">{{ currentRecord.sTotalPrice || "0" }}</el-descriptions-item>
|
||||
<el-descriptions-item label="平台现金金额">{{ currentRecord.pCashAmount || "0" }}</el-descriptions-item>
|
||||
<el-descriptions-item label="对账现金金额">{{ currentRecord.sCashAmount || "0" }}</el-descriptions-item>
|
||||
<el-descriptions-item label="平台积分金额">{{ currentRecord.pPointsPrice || "0" }}</el-descriptions-item>
|
||||
<el-descriptions-item label="对账积分金额">{{ currentRecord.sPointsPrice || "0" }}</el-descriptions-item>
|
||||
<el-descriptions-item label="平台退款金额">{{ currentRecord.pRefund || "0" }}</el-descriptions-item>
|
||||
<el-descriptions-item label="对账退款金额">{{ currentRecord.sRefund || "0" }}</el-descriptions-item>
|
||||
<el-descriptions-item label="差异类型">{{ diffTypeName(currentRecord.diffType) }}</el-descriptions-item>
|
||||
<el-descriptions-item label="通知状态">{{ noticeStatusName(currentRecord.noticeStatus) }}</el-descriptions-item>
|
||||
<el-descriptions-item label="推送次数">{{ currentRecord.pushTime || 0 }}</el-descriptions-item>
|
||||
<el-descriptions-item label="差异原因">{{ currentRecord.diffReason || "-" }}</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
<span slot="footer">
|
||||
<el-button @click="detailDialogVisible = false">关闭</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</div>
|
||||
|
||||
<script nonce="${cspNonce!}">
|
||||
new Vue({
|
||||
el: "#app",
|
||||
mixins: [initTableMixins],
|
||||
data() {
|
||||
return {
|
||||
supplierList: [],
|
||||
tableData: [],
|
||||
tableLoading: false,
|
||||
pageForm: {
|
||||
pageNumber: 1,
|
||||
pageSize: 10,
|
||||
totalCount: 0,
|
||||
supplierId: null,
|
||||
orderId: null,
|
||||
userId: null,
|
||||
diffType: null,
|
||||
batchNo: null,
|
||||
noticeStatus: null
|
||||
},
|
||||
detailDialogVisible: false,
|
||||
currentRecord: null
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
indexMethod(index) {
|
||||
return index + 1 + (this.pageForm.pageNumber - 1) * this.pageForm.pageSize
|
||||
},
|
||||
doSearch() {
|
||||
this.pageForm.pageNumber = 1
|
||||
this.pageData()
|
||||
},
|
||||
async pageData() {
|
||||
this.tableLoading = true
|
||||
const resp = await this.$axios.post(loc() + "/pageData", this.pageForm)
|
||||
this.tableLoading = false
|
||||
if (resp.code === 0) {
|
||||
this.tableData = resp.data.list || []
|
||||
this.pageForm.totalCount = resp.data.totalCount || 0
|
||||
} else {
|
||||
this.notifyWarning(resp.msg)
|
||||
}
|
||||
},
|
||||
pageChange(val) {
|
||||
this.pageForm.pageNumber = val
|
||||
this.pageData()
|
||||
},
|
||||
sizeChange(val) {
|
||||
this.pageForm.pageSize = val
|
||||
this.pageForm.pageNumber = 1
|
||||
this.pageData()
|
||||
},
|
||||
async loadSuppliers() {
|
||||
const resp = await this.$axios.post(loc() + "/supplierList")
|
||||
if (resp.code === 0) {
|
||||
this.supplierList = resp.data || []
|
||||
}
|
||||
},
|
||||
openDetail(row) {
|
||||
this.currentRecord = row
|
||||
this.detailDialogVisible = true
|
||||
},
|
||||
diffTypeName(value) {
|
||||
return Number(value) === 0 ? "一致" : "异常"
|
||||
},
|
||||
diffTypeTag(value) {
|
||||
return Number(value) === 0 ? "success" : "danger"
|
||||
},
|
||||
noticeStatusName(value) {
|
||||
const map = { 0: "未推送", 1: "推送成功", 2: "推送失败" }
|
||||
return map[value] || "-"
|
||||
},
|
||||
noticeStatusTag(value) {
|
||||
const map = { 0: "info", 1: "success", 2: "danger" }
|
||||
return map[value] || "info"
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.loadSuppliers()
|
||||
this.pageData()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
Reference in New Issue
Block a user