Commit 391573e5 by chenwq

feat(financeManage): 优化系统对账单组件样式和功能

- 调整按钮和内边距样式
- 重构图片预览功能使用el-image-viewer组件
- 优化对账单抽屉布局和样式
- 添加加载状态处理
- 统一详情和主组件样式结构
1 parent 274ae0f5
...@@ -401,9 +401,12 @@ export default { ...@@ -401,9 +401,12 @@ export default {
// orderPageSize: 10, // orderPageSize: 10,
overwriteFiledJson: true overwriteFiledJson: true
} }
this.loading = true
billDetailPage(params).then(res => { billDetailPage(params).then(res => {
this.billTmplInfo = deepClone(res) this.billTmplInfo = deepClone(res)
this.handleBillVisible() this.handleBillVisible()
}).finally(() => {
this.loading = false
}) })
}, },
splitDialogVisible() { splitDialogVisible() {
...@@ -520,9 +523,12 @@ export default { ...@@ -520,9 +523,12 @@ export default {
// orderPageSize: 10, // orderPageSize: 10,
overwriteFiledJson: false overwriteFiledJson: false
} }
this.loading = true
billDetailPage(params).then(res => { billDetailPage(params).then(res => {
this.billTmplInfo = deepClone(res) this.billTmplInfo = deepClone(res)
this.handleChangeDetailVisible() this.handleChangeDetailVisible()
}).finally(() => {
this.loading = false
}) })
}, },
......
<template> <template>
<div class="dynamic-table-container"> <div class="dynamic-table-container">
{{configObj.title}}调整:<el-button type="default" v-if="isEdit" @click="addRow"> {{configObj.title}}调整:<el-button type="default" style="padding: 8px 20px;" v-if="isEdit" @click="addRow">
添加事由 添加事由
</el-button> </el-button>
<el-form :model="dynamicForm" ref="dynamicForm"> <el-form :model="dynamicForm" ref="dynamicForm">
<el-table :data="tableData" border style="width: 100%; margin-top: 20px"> <el-table :data="tableData" border style="width: 100%; margin-top: 20px !important;">
<el-table-column prop="index" label="序号" width="80" align="center"> <el-table-column prop="index" label="序号" width="80" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.$index + 1 }} {{ scope.$index + 1 }}
......
<template> <template>
<div> <div>
<el-drawer title="系统对账单" :visible.sync="billVisible" size="100%" :before-close="handleClose"> <el-drawer :visible.sync="billVisible" size="100%" class="bill-drawer" :before-close="handleClose">
<div slot="title" class="drawer-title">系统对账单</div>
<div class="privacyDrawer"> <div class="privacyDrawer">
<div class="flex"> <div class="flex">
<div> <div>
...@@ -9,12 +10,12 @@ ...@@ -9,12 +10,12 @@
</div> </div>
<!-- <div>适用对象:{{billTmplInfo.billMerchantName}}</div> --> <!-- <div>适用对象:{{billTmplInfo.billMerchantName}}</div> -->
<el-form ref="accountForm" :model="infoForm" :rules="formRules" label-width="120px" class="flex"> <el-form ref="accountForm" :model="infoForm" :rules="formRules" label-width="120px" class="flex">
<el-form-item label="对账模版:" prop="templateId"> <el-form-item label="对账模版:" prop="templateId" style="margin-bottom: 10px;">
<el-select v-model="infoForm.templateId" style="width:120px" @change="handleTmplChange"> <el-select v-model="infoForm.templateId" style="width:120px" @change="handleTmplChange">
<el-option v-for="item in baseData[billTypeStr + 'TemplateList']" :key="item.id" :label="item.templateName" :value="item.id" /> <el-option v-for="item in baseData[billTypeStr + 'TemplateList']" :key="item.id" :label="item.templateName" :value="item.id" />
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item prop="fieldsJson" label-width="8px"> <el-form-item prop="fieldsJson" label-width="8px" style="margin-bottom: 10px;">
<div class="tmpl-box"> <div class="tmpl-box">
<el-tooltip v-show="infoForm.fieldsTxt" effect="dark" placement="top" :content="infoForm.fieldsTxt"> <el-tooltip v-show="infoForm.fieldsTxt" effect="dark" placement="top" :content="infoForm.fieldsTxt">
<span class="fields-txt">{{infoForm.fieldsTxt}}</span> <span class="fields-txt">{{infoForm.fieldsTxt}}</span>
...@@ -76,17 +77,14 @@ ...@@ -76,17 +77,14 @@
</div> </div>
</div> </div>
<div v-else-if="subItem.txtType == 'selectInput'"> <div v-else-if="subItem.txtType == 'selectInput'">
<!-- {{subItem.extInfo.source || 'ORDER'}}{{subItem.fieldCode}} -->
{{scope.row[subItem.extInfo.source || 'ORDER'][subItem.txtObj.selectField] ? (scope.row[subItem.extInfo.source || 'ORDER'][subItem.txtObj.selectField] + (scope.row[subItem.extInfo.source || 'ORDER'][subItem.txtObj.inputField] + '')) : '-'}} {{scope.row[subItem.extInfo.source || 'ORDER'][subItem.txtObj.selectField] ? (scope.row[subItem.extInfo.source || 'ORDER'][subItem.txtObj.selectField] + (scope.row[subItem.extInfo.source || 'ORDER'][subItem.txtObj.inputField] + '')) : '-'}}
</div> </div>
<!-- 普通文本显示 --> <!-- 普通文本显示 -->
<div v-else class="flex-center"> <div v-else class="flex-center">
<!-- {{subItem.extInfo.source || 'ORDER'}}{{subItem.fieldCode}} -->
<div v-if="subItem.fieldCode == 'orderCode' && scope.row.ORDER.sourceType != 1"> <div v-if="subItem.fieldCode == 'orderCode' && scope.row.ORDER.sourceType != 1">
<div class="refund-txt">退</div>{{ scope.row[subItem.extInfo.source || 'ORDER'][subItem.fieldCode] || '-' }} <div class="refund-txt">退</div>{{ scope.row[subItem.extInfo.source || 'ORDER'][subItem.fieldCode] || '-' }}
</div> </div>
<span v-else-if="subItem.fieldCode == 'tradeNo'" :class="['trade-no', scope.row.ORDER.payVoucherList && scope.row.ORDER.payVoucherList.length ? 'txt-blue': '' ]" @click="handleReviewImg(scope.row)"> <span v-else-if="subItem.fieldCode == 'tradeNo'" :class="['trade-no', scope.row.ORDER.payVoucherList && scope.row.ORDER.payVoucherList.length ? 'txt-blue': '' ]" @click="handleReviewImg(scope.row)">
<el-image v-if="scope.row.ORDER.payVoucherList && scope.row.ORDER.payVoucherList.length && isShowPayVoucher != 0" class="pay-voucher-img" :src="scope.row.ORDER.payVoucherList[0].payVoucher" :preview-src-list="srcList" @preview-close="handlePreviewClose"></el-image>
{{ scope.row[subItem.extInfo.source || 'ORDER'][subItem.fieldCode] || '-' }} {{ scope.row[subItem.extInfo.source || 'ORDER'][subItem.fieldCode] || '-' }}
</span> </span>
<span v-else-if="scope.row[subItem.extInfo.source || 'ORDER'][subItem.fieldCode] === 0">0</span> <span v-else-if="scope.row[subItem.extInfo.source || 'ORDER'][subItem.fieldCode] === 0">0</span>
...@@ -106,18 +104,20 @@ ...@@ -106,18 +104,20 @@
<DynamicAddTable v-if="billTypeStr == 'traffic'" ref="dynamicReceiveAdd" :configObj="{'title': '应收'}" :adjustments="receivableAdjustments" @handleInputBlur="billCompute"></DynamicAddTable> <DynamicAddTable v-if="billTypeStr == 'traffic'" ref="dynamicReceiveAdd" :configObj="{'title': '应收'}" :adjustments="receivableAdjustments" @handleInputBlur="billCompute"></DynamicAddTable>
<DynamicAddTable ref="dynamicAdd" :adjustments="payableAdjustments" @handleInputBlur="billCompute"></DynamicAddTable> <DynamicAddTable ref="dynamicAdd" :adjustments="payableAdjustments" @handleInputBlur="billCompute"></DynamicAddTable>
</div> </div>
<div class="total-box">
<div>订单总数:{{ totalOrderCount }}</div>
<div>总产值:{{ totalAmount }}</div>
<div v-if="billTypeStr == 'traffic'">应收总额:{{ totalReceivable }}元</div>
<div>应付总额:{{ totalPayable }}元</div>
<div>线上分账总额:{{ totalSplitPaidAmount }}</div>
<div>线下已付总额:{{ totalOfflinePaidAmount }}</div>
<div v-if="billTypeStr == 'traffic'">线下对账总额:{{ totalOfflineReconciliation }}元</div>
</div>
<div class="footer"> <div class="footer">
<el-button @click="handleClose">取消</el-button> <div class="total-box">
<el-button type="primary" :loading="loading" @click="handleConfirm">确定</el-button> <div>订单总数:{{ totalOrderCount }}</div>
<div>总产值:{{ totalAmount }}</div>
<div v-if="billTypeStr == 'traffic'">应收总额:{{ totalReceivable }}元</div>
<div>应付总额:{{ totalPayable }}元</div>
<div>线上分账总额:{{ totalSplitPaidAmount }}</div>
<div>线下已付总额:{{ totalOfflinePaidAmount }}</div>
<div v-if="billTypeStr == 'traffic'">线下对账总额:{{ totalOfflineReconciliation }}元</div>
</div>
<div class="btn-box">
<el-button class="btn" @click="handleClose">取消</el-button>
<el-button class="btn" type="primary" :loading="loading" @click="handleConfirm">确定</el-button>
</div>
</div> </div>
</el-drawer> </el-drawer>
...@@ -164,7 +164,7 @@ ...@@ -164,7 +164,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-viewer style="z-index: 9999;" v-if="imgVisible" :on-close="closeImgViewer" :url-list="imgList" :initial-index="initialIndex" />
</div> </div>
</template> </template>
...@@ -192,12 +192,16 @@ export default { ...@@ -192,12 +192,16 @@ export default {
components: { components: {
DynamicAddTable, DynamicAddTable,
tmplDrawer, tmplDrawer,
ChooseRefundOrderDialog ChooseRefundOrderDialog,
"el-image-viewer": () =>
import("element-ui/packages/image/src/image-viewer")
}, },
data() { data() {
return { return {
loading: false, loading: false,
isShowPayVoucher: false, imgVisible: false,
initialIndex: 0,
imgList: [],
billTypeStr: 'traffic', billTypeStr: 'traffic',
dateStr: '', dateStr: '',
tmplFieldsList: [], tmplFieldsList: [],
...@@ -872,8 +876,7 @@ export default { ...@@ -872,8 +876,7 @@ export default {
}, },
// 选择退款订单 // 选择退款订单
chooseVisible: '', chooseVisible: '',
refundInfo: {}, refundInfo: {}
srcList: []
} }
}, },
mounted() { mounted() {
...@@ -1619,15 +1622,15 @@ export default { ...@@ -1619,15 +1622,15 @@ export default {
} }
return isValid; return isValid;
}, },
closeImgViewer() {
this.imgVisible = false
},
handleReviewImg(row) { handleReviewImg(row) {
this.srcList = [] this.imgList = []
row.ORDER.payVoucherList.forEach(item => { row.ORDER.payVoucherList.forEach(item => {
this.srcList.push(item.payVoucher) this.imgList.push(item.payVoucher)
}) })
this.isShowPayVoucher = ++this.isShowPayVoucher this.imgVisible = !this.imgVisible
if (this.isShowPayVoucher == 3) {
this.isShowPayVoucher = 0
}
}, },
handlePreviewClose() { handlePreviewClose() {
console.log(111) console.log(111)
...@@ -1772,7 +1775,7 @@ export default { ...@@ -1772,7 +1775,7 @@ export default {
maxLengthInput(e, item) { maxLengthInput(e, item) {
// 处理输入长度限制 // 处理输入长度限制
}, }
// handleSizeChange(value) { // handleSizeChange(value) {
// this.page.pageSize = value // this.page.pageSize = value
...@@ -1787,10 +1790,25 @@ export default { ...@@ -1787,10 +1790,25 @@ export default {
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
::v-deep.bill-drawer {
.el-drawer__header {
padding: 0;
margin: 0;
border-bottom: 1px solid #e5e5e5;
}
.drawer-title {
height: 26px;
line-height: 26px;
color: #333333;
font-size: 18px;
padding: 17px 20px;
font-weight: bold;
}
}
.privacyDrawer { .privacyDrawer {
padding: 20px; padding: 20px;
overflow: scroll; overflow: scroll;
height: calc(100% - 150px); height: calc(100% - 120px);
} }
.flex { .flex {
display: flex; display: flex;
...@@ -1896,7 +1914,8 @@ export default { ...@@ -1896,7 +1914,8 @@ export default {
} }
.total-box { .total-box {
display: flex; display: flex;
flex-wrap: wrap; // flex-wrap: wrap;
width: calc(100% - 200px);
div { div {
flex: 1; flex: 1;
} }
...@@ -1928,7 +1947,21 @@ export default { ...@@ -1928,7 +1947,21 @@ export default {
position: absolute; position: absolute;
bottom: 0; bottom: 0;
right: 0; right: 0;
text-align: right; box-sizing: border-box;
margin-right: 30px; width: 100%;
height: 84px;
display: flex;
justify-content: space-between;
align-items: center;
// text-align: right;
padding: 0 30px;
.btn-box {
width: 200px;
text-align: right;
}
.btn {
height: 32px;
padding: 8px 20px;
}
} }
</style> </style>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!