|
@@ -0,0 +1,333 @@
|
|
|
+<template>
|
|
|
+ <a-modal
|
|
|
+ v-model="opened"
|
|
|
+ :title="title"
|
|
|
+ centered
|
|
|
+ :maskClosable="false"
|
|
|
+ width="80%"
|
|
|
+ :footer="null"
|
|
|
+ @cancel="cancel"
|
|
|
+ >
|
|
|
+ <a-spin :spinning="spinning" tip="Loading...">
|
|
|
+ <a-card size="small" :bordered="false" class="searchBoxNormal">
|
|
|
+ <!-- 搜索条件 -->
|
|
|
+ <div ref="tableSearch" class="table-page-search-wrapper">
|
|
|
+ <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
|
|
|
+ <a-row :gutter="15">
|
|
|
+ <a-col :md="6" :sm="24">
|
|
|
+ <a-form-item label="时间">
|
|
|
+ <rangeDate id="conFrontModal-rangeDate" ref="rangeDate" :value="creatDate" @change="dateChange" />
|
|
|
+ </a-form-item>
|
|
|
+ </a-col>
|
|
|
+ <a-col :md="4" :sm="24">
|
|
|
+ <a-form-item label="业务单号">
|
|
|
+ <a-input id="conFrontModal-bizNo" v-model.trim="queryParam.bizNo" allowClear placeholder="请输入业务单号"/>
|
|
|
+ </a-form-item>
|
|
|
+ </a-col>
|
|
|
+ <a-col :md="4" :sm="24">
|
|
|
+ <a-form-item label="借贷类型">
|
|
|
+ <v-select
|
|
|
+ v-model="queryParam.changeType"
|
|
|
+ ref="changeType"
|
|
|
+ id="conFrontModal-changeType"
|
|
|
+ code="VERIFY_ACCOUNT_CHANGE_TYPE"
|
|
|
+ placeholder="请选择状态"
|
|
|
+ allowClear></v-select>
|
|
|
+ </a-form-item>
|
|
|
+ </a-col>
|
|
|
+ <a-col :md="4" :sm="24">
|
|
|
+ <a-form-item label="业务类型">
|
|
|
+ <v-select
|
|
|
+ v-model="queryParam.bizType"
|
|
|
+ ref="bizType"
|
|
|
+ id="conFrontModal-bizType"
|
|
|
+ code="VERIFY_ACCOUNT_BIZ_TYPE"
|
|
|
+ placeholder="请选择业务类型"
|
|
|
+ allowClear></v-select>
|
|
|
+ </a-form-item>
|
|
|
+ </a-col>
|
|
|
+ <a-col :md="6" :sm="24">
|
|
|
+ <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="conFrontModal-search">查询</a-button>
|
|
|
+ <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="conFrontModal-reset">重置</a-button>
|
|
|
+ <a-button
|
|
|
+ style="margin-left: 10px"
|
|
|
+ type="primary"
|
|
|
+ id="conFrontModal-export"
|
|
|
+ class="button-warning"
|
|
|
+ @click="handleExport"
|
|
|
+ :disabled="disabled"
|
|
|
+ :loading="exportLoading"
|
|
|
+ >导出</a-button>
|
|
|
+ </a-col>
|
|
|
+ </a-row>
|
|
|
+ </a-form>
|
|
|
+ </div>
|
|
|
+ </a-card>
|
|
|
+ <a-card size="small" :bordered="false" class="conFrontModal-wrap">
|
|
|
+ <!-- 列表 -->
|
|
|
+ <s-table
|
|
|
+ class="sTable"
|
|
|
+ ref="table"
|
|
|
+ size="small"
|
|
|
+ :rowKey="(record) => record.id"
|
|
|
+ :columns="columns"
|
|
|
+ :data="loadData"
|
|
|
+ :showPagination="false"
|
|
|
+ :defaultLoadData="false"
|
|
|
+ bordered>
|
|
|
+ </s-table>
|
|
|
+ <div class="conFrontModal-info" v-if="detailData">
|
|
|
+ 备注:{{ detailData.remarks }}
|
|
|
+ </div>
|
|
|
+ <div class="conFrontModal-flex" v-if="detailData">
|
|
|
+ <div class="conFrontModal-subTitle">
|
|
|
+ <div><span>公司名称:</span> 东莞市箭冠汽车配件制造有限公司</div>
|
|
|
+ <div><span>签名:</span>{{ detailData.signName }}</div>
|
|
|
+ <div><span>盖章</span></div>
|
|
|
+ </div>
|
|
|
+ <div class="conFrontModal-subTitle">
|
|
|
+ <div><span>公司名称:</span>{{ detailData.dealerName }}</div>
|
|
|
+ <div><span>签名:</span></div>
|
|
|
+ <div><span>盖章</span></div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="conFrontModal-footer-bar" v-if="detailData">
|
|
|
+ <a-button @click="cancel" style="margin-right: 15px" id="conFrontModal-btn-back">关闭</a-button>
|
|
|
+ </div>
|
|
|
+ </a-card>
|
|
|
+ </a-spin>
|
|
|
+ </a-modal>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script>
|
|
|
+import { commonMixin } from '@/utils/mixin'
|
|
|
+import { STable, VSelect } from '@/components'
|
|
|
+import rangeDate from '@/views/common/rangeDate.vue'
|
|
|
+import { getCurrentDealer } from '@/api/product'
|
|
|
+import {
|
|
|
+ verifyAcountBillDetailQueryList,
|
|
|
+ verifyAcountBillDetail
|
|
|
+} from '@/api/verifyAccount'
|
|
|
+
|
|
|
+export default {
|
|
|
+ name: 'ConFrontModal',
|
|
|
+ mixins: [commonMixin],
|
|
|
+ components: { STable, VSelect, rangeDate },
|
|
|
+ props: {
|
|
|
+ show: [Boolean]
|
|
|
+ },
|
|
|
+ data () {
|
|
|
+ return {
|
|
|
+ opened: this.show,
|
|
|
+ spinning: false,
|
|
|
+ disabled: false,
|
|
|
+ confirmLoading: false,
|
|
|
+ title: '',
|
|
|
+ exportLoading: false,
|
|
|
+ queryParam: {
|
|
|
+ beginDate: '',
|
|
|
+ endDate: '',
|
|
|
+ bizNo: '',
|
|
|
+ changeType: undefined,
|
|
|
+ bizType: undefined
|
|
|
+ },
|
|
|
+ creatDate: [],
|
|
|
+ // 加载数据方法 必须为 Promise 对象
|
|
|
+ loadData: parameter => {
|
|
|
+ this.disabled = true
|
|
|
+ this.spinning = true
|
|
|
+ const params = Object.assign(parameter, this.queryParam)
|
|
|
+ params.verifyAccountBillSn = this.verifyAccountBillSn
|
|
|
+ return verifyAcountBillDetailQueryList(params).then(res => {
|
|
|
+ let data
|
|
|
+ if (res.status == 200) {
|
|
|
+ data = res.data
|
|
|
+ const no = 0
|
|
|
+ for (var i = 0; i < data.length; i++) {
|
|
|
+ data[i].no = no + i + 1
|
|
|
+ const dates = data[i].bizDate.split('-')
|
|
|
+ data[i].year = dates[0]
|
|
|
+ data[i].month = dates[1]
|
|
|
+ data[i].day = dates[2].split(' ')[0]
|
|
|
+ // 正为借方, 负数为贷方
|
|
|
+ if (data[i].bizAmount > 0) {
|
|
|
+ data[i].debitAmount = data[i].bizAmount
|
|
|
+ } else {
|
|
|
+ data[i].creditorAmount = data[i].bizAmount
|
|
|
+ }
|
|
|
+ }
|
|
|
+ // data.push({ no: '备注:' + this.detailData.remarks })
|
|
|
+ // data.push({
|
|
|
+ // no: '公司名称:东莞市箭冠汽车配件制造有限公司\n签名:' + (this.detailData.signName || '') + '\n盖章',
|
|
|
+ // expenseAllocateType: '公司名称:' + this.dealear.dealerName + '\n签名:\n盖章'
|
|
|
+ // })
|
|
|
+ this.total = data.length || 0 + 1
|
|
|
+ this.disabled = false
|
|
|
+ }
|
|
|
+ this.spinning = false
|
|
|
+ return data
|
|
|
+ })
|
|
|
+ },
|
|
|
+ total: 0, // 合计
|
|
|
+ detailData: null,
|
|
|
+ dealear: null,
|
|
|
+ verifyAccountBillSn: undefined,
|
|
|
+ orderType: 0
|
|
|
+ }
|
|
|
+ },
|
|
|
+ computed: {
|
|
|
+ columns () {
|
|
|
+ const _this = this
|
|
|
+ const renderContent = (value, row, index) => {
|
|
|
+ const obj = {
|
|
|
+ children: value || '--',
|
|
|
+ attrs: {}
|
|
|
+ }
|
|
|
+ return obj
|
|
|
+ }
|
|
|
+ return [
|
|
|
+ {
|
|
|
+ title: '箭冠汽配 应收账款明细表',
|
|
|
+ children: [
|
|
|
+ {
|
|
|
+ title: '营业执照名称',
|
|
|
+ children: [
|
|
|
+ { title: '序号',
|
|
|
+ dataIndex: 'no',
|
|
|
+ width: '4%',
|
|
|
+ align: 'center',
|
|
|
+ customRender: renderContent
|
|
|
+ },
|
|
|
+ { title: '年', dataIndex: 'year', width: '4%', align: 'center', customRender: renderContent },
|
|
|
+ { title: '月', dataIndex: 'month', width: '4%', align: 'center', customRender: renderContent },
|
|
|
+ { title: '日', dataIndex: 'day', width: '4%', align: 'center', customRender: renderContent },
|
|
|
+ { title: '业务单号', dataIndex: 'bizNo', width: '8%', align: 'center', customRender: renderContent }
|
|
|
+ ]
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: this.dealear ? this.dealear.dealerName : '--',
|
|
|
+ children: [
|
|
|
+ { title: '业务类型', dataIndex: 'bizTypeDictValue', width: '8%', align: 'center', customRender: renderContent },
|
|
|
+ { title: '费用/调拨类型',
|
|
|
+ dataIndex: 'expenseAllocateType',
|
|
|
+ width: '8%',
|
|
|
+ align: 'center',
|
|
|
+ customRender: renderContent
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '系统名称',
|
|
|
+ children: [
|
|
|
+ { title: '摘要', dataIndex: 'digestInfo', width: '10%', align: 'center', customRender: renderContent },
|
|
|
+ { title: '客诉索赔编码', dataIndex: 'productCode', width: '8%', align: 'center', customRender: renderContent },
|
|
|
+ { title: '借方', dataIndex: 'debitAmount', width: '6%', align: 'right', customRender: renderContent }
|
|
|
+ ]
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: this.dealear ? this.dealear.dealerAlias : '--',
|
|
|
+ children: [
|
|
|
+ { title: '贷方', dataIndex: 'creditorAmount', width: '6%', align: 'right', customRender: renderContent },
|
|
|
+ { title: '余额', dataIndex: 'totalAmount', width: '6%', align: 'right', customRender: renderContent },
|
|
|
+ { title: '备注', dataIndex: 'remarks', width: '15%', align: 'center', customRender: renderContent }
|
|
|
+ ]
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ }
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ // 创建时间 change
|
|
|
+ dateChange (date) {
|
|
|
+ this.queryParam.beginDate = date[0] ? date[0] : ''
|
|
|
+ this.queryParam.endDate = date[1] ? date[1] : ''
|
|
|
+ },
|
|
|
+ // 重置
|
|
|
+ resetSearchForm () {
|
|
|
+ this.creatDate = []
|
|
|
+ if (this.$refs.rangeDate) {
|
|
|
+ this.$refs.rangeDate.resetDate(this.creatDate)
|
|
|
+ }
|
|
|
+ this.queryParam.beginDate = ''
|
|
|
+ this.queryParam.endDate = ''
|
|
|
+ this.queryParam.bizNo = ''
|
|
|
+ this.queryParam.changeType = undefined
|
|
|
+ this.queryParam.bizType = undefined
|
|
|
+ this.$refs.table.refresh(true)
|
|
|
+ },
|
|
|
+ // 详情
|
|
|
+ getDetail () {
|
|
|
+ this.spinning = true
|
|
|
+ verifyAcountBillDetail({ sn: this.verifyAccountBillSn }).then(res => {
|
|
|
+ this.detailData = res.data
|
|
|
+ this.spinning = false
|
|
|
+ this.resetSearchForm()
|
|
|
+ })
|
|
|
+ },
|
|
|
+ // 关闭弹框
|
|
|
+ cancel () {
|
|
|
+ this.opened = false
|
|
|
+ this.$emit('cancel')
|
|
|
+ },
|
|
|
+ // 导出
|
|
|
+ handleExport () {
|
|
|
+
|
|
|
+ },
|
|
|
+ // 初始化
|
|
|
+ async pageInit (row) {
|
|
|
+ this.orderType = 0
|
|
|
+ this.verifyAccountBillSn = row.verifyAccountBillSn
|
|
|
+ const dealearData = await getCurrentDealer().then(res => res.data)
|
|
|
+ this.dealear = dealearData
|
|
|
+ this.title = this.orderType ? '对单' : '单据明细(对账单号:' + row.verifyAccountBillNo + ')'
|
|
|
+ this.getDetail()
|
|
|
+ }
|
|
|
+ },
|
|
|
+ watch: {
|
|
|
+ show (newValue, oldValue) {
|
|
|
+ this.opened = newValue
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
+</script>
|
|
|
+<style lang="less">
|
|
|
+ .conFrontModal-title{
|
|
|
+ font-size: 16px;
|
|
|
+ font-weight: bold;
|
|
|
+ text-align: center;
|
|
|
+ margin-bottom: 10px;
|
|
|
+ }
|
|
|
+ .conFrontModal-flex{
|
|
|
+ display: flex;
|
|
|
+ justify-content: space-between;
|
|
|
+ align-items: center;
|
|
|
+ flex-wrap: wrap;
|
|
|
+ }
|
|
|
+ .conFrontModal-subTitle{
|
|
|
+ width: 50%;
|
|
|
+ padding: 5px;
|
|
|
+ > span{
|
|
|
+ display: block;
|
|
|
+ font-size: 14px;
|
|
|
+ width: 100px;
|
|
|
+ }
|
|
|
+ > div{
|
|
|
+ display: block;
|
|
|
+ font-size: 14px;
|
|
|
+ width: 100%;
|
|
|
+ word-break: break-all;
|
|
|
+ margin: 5px 0;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .conFrontModal-info{
|
|
|
+ font-size: 14px;
|
|
|
+ padding: 15px 5px 10px;
|
|
|
+ line-height: 20px;
|
|
|
+ color: #333;
|
|
|
+ }
|
|
|
+ .conFrontModal-footer-bar{
|
|
|
+ text-align: center;
|
|
|
+ padding: 30px 0 20px;
|
|
|
+ }
|
|
|
+</style>
|