Commit 391573e5 by chenwq

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

- 调整按钮和内边距样式
- 重构图片预览功能使用el-image-viewer组件
- 优化对账单抽屉布局和样式
- 添加加载状态处理
- 统一详情和主组件样式结构
1 parent 274ae0f5
......@@ -401,9 +401,12 @@ export default {
// orderPageSize: 10,
overwriteFiledJson: true
}
this.loading = true
billDetailPage(params).then(res => {
this.billTmplInfo = deepClone(res)
this.handleBillVisible()
}).finally(() => {
this.loading = false
})
},
splitDialogVisible() {
......@@ -520,9 +523,12 @@ export default {
// orderPageSize: 10,
overwriteFiledJson: false
}
this.loading = true
billDetailPage(params).then(res => {
this.billTmplInfo = deepClone(res)
this.handleChangeDetailVisible()
}).finally(() => {
this.loading = false
})
},
......
<template>
<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-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">
<template slot-scope="scope">
{{ scope.$index + 1 }}
......
<template>
<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="flex">
<div>
......@@ -9,12 +10,12 @@
</div>
<!-- <div>适用对象:{{billTmplInfo.billMerchantName}}</div> -->
<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-option v-for="item in baseData[billTypeStr + 'TemplateList']" :key="item.id" :label="item.templateName" :value="item.id" />
</el-select>
</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">
<el-tooltip v-show="infoForm.fieldsTxt" effect="dark" placement="top" :content="infoForm.fieldsTxt">
<span class="fields-txt">{{infoForm.fieldsTxt}}</span>
......@@ -76,17 +77,14 @@
</div>
</div>
<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] + '')) : '-'}}
</div>
<!-- 普通文本显示 -->
<div v-else class="flex-center">
<!-- {{subItem.extInfo.source || 'ORDER'}}{{subItem.fieldCode}} -->
<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>
<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] || '-' }}
</span>
<span v-else-if="scope.row[subItem.extInfo.source || 'ORDER'][subItem.fieldCode] === 0">0</span>
......@@ -106,18 +104,20 @@
<DynamicAddTable v-if="billTypeStr == 'traffic'" ref="dynamicReceiveAdd" :configObj="{'title': '应收'}" :adjustments="receivableAdjustments" @handleInputBlur="billCompute"></DynamicAddTable>
<DynamicAddTable ref="dynamicAdd" :adjustments="payableAdjustments" @handleInputBlur="billCompute"></DynamicAddTable>
</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">
<el-button @click="handleClose">取消</el-button>
<el-button type="primary" :loading="loading" @click="handleConfirm">确定</el-button>
<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="btn-box">
<el-button class="btn" @click="handleClose">取消</el-button>
<el-button class="btn" type="primary" :loading="loading" @click="handleConfirm">确定</el-button>
</div>
</div>
</el-drawer>
......@@ -164,7 +164,7 @@
<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>
<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>
</template>
......@@ -192,12 +192,16 @@ export default {
components: {
DynamicAddTable,
tmplDrawer,
ChooseRefundOrderDialog
ChooseRefundOrderDialog,
"el-image-viewer": () =>
import("element-ui/packages/image/src/image-viewer")
},
data() {
return {
loading: false,
isShowPayVoucher: false,
imgVisible: false,
initialIndex: 0,
imgList: [],
billTypeStr: 'traffic',
dateStr: '',
tmplFieldsList: [],
......@@ -872,8 +876,7 @@ export default {
},
// 选择退款订单
chooseVisible: '',
refundInfo: {},
srcList: []
refundInfo: {}
}
},
mounted() {
......@@ -1619,15 +1622,15 @@ export default {
}
return isValid;
},
closeImgViewer() {
this.imgVisible = false
},
handleReviewImg(row) {
this.srcList = []
this.imgList = []
row.ORDER.payVoucherList.forEach(item => {
this.srcList.push(item.payVoucher)
this.imgList.push(item.payVoucher)
})
this.isShowPayVoucher = ++this.isShowPayVoucher
if (this.isShowPayVoucher == 3) {
this.isShowPayVoucher = 0
}
this.imgVisible = !this.imgVisible
},
handlePreviewClose() {
console.log(111)
......@@ -1772,7 +1775,7 @@ export default {
maxLengthInput(e, item) {
// 处理输入长度限制
},
}
// handleSizeChange(value) {
// this.page.pageSize = value
......@@ -1787,10 +1790,25 @@ export default {
</script>
<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 {
padding: 20px;
overflow: scroll;
height: calc(100% - 150px);
height: calc(100% - 120px);
}
.flex {
display: flex;
......@@ -1896,7 +1914,8 @@ export default {
}
.total-box {
display: flex;
flex-wrap: wrap;
// flex-wrap: wrap;
width: calc(100% - 200px);
div {
flex: 1;
}
......@@ -1928,7 +1947,21 @@ export default {
position: absolute;
bottom: 0;
right: 0;
text-align: right;
margin-right: 30px;
box-sizing: border-box;
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>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!