|
@@ -0,0 +1,311 @@
|
|
|
|
|
+<!-- @desc:客户往来账查询 @auth:宋扬 @time:2024-05-09 16:28 -->
|
|
|
|
|
+<template>
|
|
|
|
|
+ <div class="main-div" ref="mainDiv">
|
|
|
|
|
+ <!--加载中-->
|
|
|
|
|
+ <loading :loading="loading" v-if="!modalVisible"></loading>
|
|
|
|
|
+ <BaseIndexButtonGroup id="BaseIndexButtonGroup">
|
|
|
|
|
+ <template #left>
|
|
|
|
|
+ <!-- 查询 -->
|
|
|
|
|
+ <BaseIndexButton right-button="user-select" ref="search" name="search"></BaseIndexButton>
|
|
|
|
|
+ <!-- 清空条件 -->
|
|
|
|
|
+ <BaseIndexButton ref="clear" name="clear"></BaseIndexButton>
|
|
|
|
|
+ </template>
|
|
|
|
|
+
|
|
|
|
|
+ </BaseIndexButtonGroup>
|
|
|
|
|
+
|
|
|
|
|
+ <!-- 查询条件区域 -->
|
|
|
|
|
+ <div id="search-cond-div" ref="search-cond-div" class="search-cond-class">
|
|
|
|
|
+ <SearchCond ref="searchCond" v-model="searchCond"
|
|
|
|
|
+ @collapse-change="collapseChange" :setFlag="false"
|
|
|
|
|
+ :searchContent="searchContent"
|
|
|
|
|
+ ></SearchCond>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <!-- 表格部分 -->
|
|
|
|
|
+ <div slot="bottom">
|
|
|
|
|
+ <DkTabs v-model="detailModel" :options="detailOptions" @on-click="detailTabsClick"></DkTabs>
|
|
|
|
|
+ <div v-show="visCustomerFlag">
|
|
|
|
|
+ <DkTable :id="'table-'+$options.name"
|
|
|
|
|
+ ref="table-select"
|
|
|
|
|
+ :data="tableData"
|
|
|
|
|
+ showFooter
|
|
|
|
|
+ :height="this.tableHeight-35"
|
|
|
|
|
+ primaryKey="objectId"
|
|
|
|
|
+ @pageChange="pageSizeChange"
|
|
|
|
|
+ :page-total="pageInfo.total"
|
|
|
|
|
+ :current-page="pageInfo.currentPage"
|
|
|
|
|
+ :choose-flag="false"
|
|
|
|
|
+ :page-size-opts="pageSizeOpts"
|
|
|
|
|
+ :page-size="pageInfo.pageSize"
|
|
|
|
|
+ name="table">
|
|
|
|
|
+ <DkTableColumn field="cusName"/>
|
|
|
|
|
+ <DkTableColumn field="cusPhone"/>
|
|
|
|
|
+ <DkTableColumn field="cusContactName" :title="$t('contactName')"/>
|
|
|
|
|
+ <DkTableColumn field="cusAddressFull" :title="$t('addressFull')" />
|
|
|
|
|
+ <DkTableColumn field="cusFromName" />
|
|
|
|
|
+ <DkTableColumn field="channelName" />
|
|
|
|
|
+ <DkTableColumn field="orgName" />
|
|
|
|
|
+ <DkTableColumn field="recOpening"dataType="number" :sum="true" />
|
|
|
|
|
+ <DkTableColumn field="recHandleOpening"dataType="number" :sum="true" />
|
|
|
|
|
+ <DkTableColumn field="recCurrent" dataType="number" type="link" @on-link="currentRecRights()"></DkTableColumn>
|
|
|
|
|
+ <DkTableColumn field="recHandleCurrent" dataType="number" type="link" @on-link="currentHandleRights()"></DkTableColumn>
|
|
|
|
|
+ <DkTableColumn field="recEnding"dataType="number" :sum="true" />
|
|
|
|
|
+ <DkTableColumn field="recHandleEnding"dataType="number" :sum="true" />
|
|
|
|
|
+ </DkTable>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div v-show="visCusRecFlag">
|
|
|
|
|
+ <DkTable :id="'table-'+$options.name" ref="detail-select" :data="recDetailData" showFooter
|
|
|
|
|
+ :height="this.tableHeight-35"
|
|
|
|
|
+ primaryKey="objectId"
|
|
|
|
|
+ @pageChange="pageSizeChange"
|
|
|
|
|
+ :page-total="pageInfo.total"
|
|
|
|
|
+ :current-page="pageInfo.currentPage"
|
|
|
|
|
+ :choose-flag="false"
|
|
|
|
|
+ :page-size-opts="pageSizeOpts"
|
|
|
|
|
+ :page-size="pageInfo.pageSize"
|
|
|
|
|
+ name="table">
|
|
|
|
|
+ <DkTableColumn field="cusName"/>
|
|
|
|
|
+ <DkTableColumn field="cusPhone"/>
|
|
|
|
|
+ <DkTableColumn field="contactName" />
|
|
|
|
|
+ <DkTableColumn field="addressFull" />
|
|
|
|
|
+ <DkTableColumn field="orgName" />
|
|
|
|
|
+ <DkTableColumn field="accDate" width="auto" :dataType="$config.columnType.date"/>
|
|
|
|
|
+ <!-- 来源类型-->
|
|
|
|
|
+ <DkTableColumn field="biznisTypeName" />
|
|
|
|
|
+ <!-- 来源单号-->
|
|
|
|
|
+ <DkTableColumn field="biznisNo" />
|
|
|
|
|
+ <!-- 收款金额-->
|
|
|
|
|
+ <DkTableColumn field="amtRec" :sum="true" dataType="number" ></DkTableColumn>
|
|
|
|
|
+ <!-- 核销金额-->
|
|
|
|
|
+ <DkTableColumn field="amtHandle" :sum="true" dataType="number"></DkTableColumn>
|
|
|
|
|
+ <!--制单人-->
|
|
|
|
|
+ <DkTableColumn field="makeStaffName" :filter="false"></DkTableColumn>
|
|
|
|
|
+ <!-- 备注-->
|
|
|
|
|
+ <DkTableColumn field="remarks" :filter="false"></DkTableColumn>
|
|
|
|
|
+ </DkTable>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div v-show="visCusRecHandleFlag">
|
|
|
|
|
+ <DkTable :id="'table-'+$options.name" ref="detail-select" :data="handleDetailData" showFooter
|
|
|
|
|
+ :height="this.tableHeight -35"
|
|
|
|
|
+ primaryKey="objectId"
|
|
|
|
|
+ @pageChange="pageSizeChange"
|
|
|
|
|
+ :page-total="pageInfo.total"
|
|
|
|
|
+ :current-page="pageInfo.currentPage"
|
|
|
|
|
+ :choose-flag="false"
|
|
|
|
|
+ :page-size-opts="pageSizeOpts"
|
|
|
|
|
+ :page-size="pageInfo.pageSize"
|
|
|
|
|
+ name="table">
|
|
|
|
|
+ <DkTableColumn field="cusName"/>
|
|
|
|
|
+ <DkTableColumn field="cusPhone"/>
|
|
|
|
|
+ <DkTableColumn field="contactName" />
|
|
|
|
|
+ <DkTableColumn field="addressFull" />
|
|
|
|
|
+ <DkTableColumn field="orgName" />
|
|
|
|
|
+ <DkTableColumn field="accDate" width="auto" :dataType="$config.columnType.date"/>
|
|
|
|
|
+ <!-- 来源类型-->
|
|
|
|
|
+ <DkTableColumn field="biznisTypeName" />
|
|
|
|
|
+ <!-- 来源单号-->
|
|
|
|
|
+ <DkTableColumn field="biznisNo" />
|
|
|
|
|
+ <!-- 应收金额-->
|
|
|
|
|
+ <DkTableColumn field="amtShould" :sum="true" dataType="number" ></DkTableColumn>
|
|
|
|
|
+ <!-- 核销金额-->
|
|
|
|
|
+ <DkTableColumn field="amtHandle" :sum="true" dataType="number"></DkTableColumn>
|
|
|
|
|
+ <!-- 剩余金额-->
|
|
|
|
|
+ <DkTableColumn field="amtResidue" :sum="true" dataType="number"></DkTableColumn>
|
|
|
|
|
+ <!-- 优惠金额-->
|
|
|
|
|
+ <DkTableColumn field="amtWaive" :sum="true" dataType="number"></DkTableColumn>
|
|
|
|
|
+ <!--制单人-->
|
|
|
|
|
+ <DkTableColumn field="makeStaffName" :filter="false"></DkTableColumn>
|
|
|
|
|
+ <!-- 备注-->
|
|
|
|
|
+ <DkTableColumn field="remarks" :filter="false"></DkTableColumn>
|
|
|
|
|
+ </DkTable>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+</template>
|
|
|
|
|
+
|
|
|
|
|
+<script>
|
|
|
|
|
+import {indexMixin} from '@/mixins'
|
|
|
|
|
+import Config from "@/config";
|
|
|
|
|
+export default {
|
|
|
|
|
+ name: "index",
|
|
|
|
|
+ mixins: [indexMixin],
|
|
|
|
|
+ data() {
|
|
|
|
|
+ let self = this
|
|
|
|
|
+ return {
|
|
|
|
|
+ detailModel: 'recCusDetail',
|
|
|
|
|
+ detailOptions: [
|
|
|
|
|
+ {label: self.$t('recCusDetail'), name: 'recCusDetail'}, //客户账款
|
|
|
|
|
+ {label: self.$t('recDetail'), name: 'recDetail'}, //收款明细
|
|
|
|
|
+ {label: self.$t('handleDetail'), name: 'handleDetail'}, //应收明细
|
|
|
|
|
+ ],
|
|
|
|
|
+ tableData:[], // 客户账款
|
|
|
|
|
+ recDetailData:[], // 收款明细
|
|
|
|
|
+ handleDetailData: [], // 应收明细
|
|
|
|
|
+ visCustomerFlag: true,
|
|
|
|
|
+ visCusRecHandleFlag: false,
|
|
|
|
|
+ visCusRecFlag: false,
|
|
|
|
|
+ searchContent:
|
|
|
|
|
+ [
|
|
|
|
|
+ {
|
|
|
|
|
+ itemCode: 'cusName',
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ itemCode: 'accDate',
|
|
|
|
|
+ valueFormat: {
|
|
|
|
|
+ code: 'accDate',
|
|
|
|
|
+ default: [new Date().addMonths(-1).format('yyyy-MM-dd'), new Date().format('yyyy-MM-dd')]
|
|
|
|
|
+ },
|
|
|
|
|
+ valueKind: 'DATE_RANGE',
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ itemCode: 'isOrgFlag',
|
|
|
|
|
+ valueFormat: {code: 'isOrgFlag', default: false},
|
|
|
|
|
+ valueKind: 'SWITCH'
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ itemCode: 'isNoCurrentFilter',
|
|
|
|
|
+ valueFormat: {code: 'isNoCurrentFilter', default: false},
|
|
|
|
|
+ valueKind: 'SWITCH'
|
|
|
|
|
+ },
|
|
|
|
|
+ ],
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+ methods: {
|
|
|
|
|
+ /**
|
|
|
|
|
+ * @desc : 查询数据
|
|
|
|
|
+ * @author : 宋扬
|
|
|
|
|
+ * @date : 2024/3/13 10:42
|
|
|
|
|
+ */
|
|
|
|
|
+ getData(params) {
|
|
|
|
|
+ // 清空数据
|
|
|
|
|
+ this.tableData = [];
|
|
|
|
|
+ this.recDetailData = [];
|
|
|
|
|
+ this.handleDetailData = [];
|
|
|
|
|
+ // 自动显示收发存数据
|
|
|
|
|
+ this.visCustomerFlag = true
|
|
|
|
|
+ this.visCusRecHandleFlag = false
|
|
|
|
|
+ this.visCusRecFlag = false
|
|
|
|
|
+ return this.excute(this.$service.detailReportService, this.$service.detailReportService.getMacRecCurrentReport, params)
|
|
|
|
|
+ },
|
|
|
|
|
+
|
|
|
|
|
+ /**
|
|
|
|
|
+ * @desc : 点击Tab进行切换
|
|
|
|
|
+ * @author : 宋扬
|
|
|
|
|
+ * @date : 2024/4/3 16:24
|
|
|
|
|
+ */
|
|
|
|
|
+ detailTabsClick(val) {
|
|
|
|
|
+ if (val === 'recCusDetail') {
|
|
|
|
|
+ this.detailModel = val
|
|
|
|
|
+ this.visCustomerFlag = true
|
|
|
|
|
+ this.visCusRecHandleFlag = false
|
|
|
|
|
+ this.visCusRecFlag = false
|
|
|
|
|
+ } else if (val === 'recDetail' && this.recDetailData.length > 0) {
|
|
|
|
|
+ this.detailModel = val
|
|
|
|
|
+ this.visCustomerFlag = false
|
|
|
|
|
+ this.visCusRecHandleFlag = true
|
|
|
|
|
+ this.visCusRecFlag = false
|
|
|
|
|
+ }else if (val === 'handleDetail' && this.handleDetailData > 0) {
|
|
|
|
|
+ this.detailModel = val
|
|
|
|
|
+ this.visCustomerFlag = false
|
|
|
|
|
+ this.visCusRecHandleFlag = false
|
|
|
|
|
+ this.visCusRecFlag = true
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+ /**
|
|
|
|
|
+ * @desc : 赋值查询条件
|
|
|
|
|
+ * @author : 宋扬
|
|
|
|
|
+ * @date : 2024/4/23 10:44
|
|
|
|
|
+ */
|
|
|
|
|
+ setSearchParams(params){
|
|
|
|
|
+ // 赋值JSON查询条件
|
|
|
|
|
+ let skuquerys = {}
|
|
|
|
|
+ if(this.searchCond && this.searchCond._value){
|
|
|
|
|
+ Object.assign(skuquerys,this.searchCond._value)
|
|
|
|
|
+ }
|
|
|
|
|
+ let skuQuerystr = JSON.stringify(skuquerys);
|
|
|
|
|
+ if(skuQuerystr && skuQuerystr !='{}'){
|
|
|
|
|
+ params['querys']= skuQuerystr;
|
|
|
|
|
+ }
|
|
|
|
|
+ return params;
|
|
|
|
|
+ },
|
|
|
|
|
+
|
|
|
|
|
+ /**
|
|
|
|
|
+ * @desc : 收款点击跳转事件
|
|
|
|
|
+ * @author : 宋扬
|
|
|
|
|
+ * @date : 2024/4/23 13:22
|
|
|
|
|
+ */
|
|
|
|
|
+ currentRecRights(row){
|
|
|
|
|
+ this.recDetailData = [];
|
|
|
|
|
+ if (!row) {
|
|
|
|
|
+ row = [this.$refs['table-select'].getCurrentRow()]
|
|
|
|
|
+ }
|
|
|
|
|
+ let searchParams = {...this.searchParams};
|
|
|
|
|
+ let params={}
|
|
|
|
|
+ if (row != null) {
|
|
|
|
|
+ // 赋值入库查询条件
|
|
|
|
|
+ params = {
|
|
|
|
|
+ objectId:row[0].objectId,
|
|
|
|
|
+ macType:1,
|
|
|
|
|
+ accDateStart:searchParams.accDateStart,
|
|
|
|
|
+ accDateEnd:searchParams.accDateEnd,
|
|
|
|
|
+ currentPage:searchParams.currentPage,
|
|
|
|
|
+ pageSize:searchParams.pageSize
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ // 查询入库明细
|
|
|
|
|
+ this.excute(this.$service.detailReportService, this.$service.detailReportService.getMacRecCurrentItemReport, params).then(res => {
|
|
|
|
|
+ if (res.code === this.$config.SUCCESS_CODE) {
|
|
|
|
|
+ this.recDetailData = res.data.list;
|
|
|
|
|
+ // 显示收款明细信息页面
|
|
|
|
|
+ this.detailModel = 'recDetail'
|
|
|
|
|
+ this.visCustomerFlag = false
|
|
|
|
|
+ this.visCusRecHandleFlag = false
|
|
|
|
|
+ this.visCusRecFlag = true
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
|
|
+ },
|
|
|
|
|
+
|
|
|
|
|
+ /**
|
|
|
|
|
+ * @desc : 应收点击跳转事件
|
|
|
|
|
+ * @author : 宋扬
|
|
|
|
|
+ * @date : 2024/4/23 13:22
|
|
|
|
|
+ */
|
|
|
|
|
+ currentHandleRights(row){
|
|
|
|
|
+ this.handleDetailData = [];
|
|
|
|
|
+ if (!row) {
|
|
|
|
|
+ row = [this.$refs['table-select'].getCurrentRow()]
|
|
|
|
|
+ }
|
|
|
|
|
+ let searchParams = {...this.searchParams};
|
|
|
|
|
+ let params={}
|
|
|
|
|
+ if (row != null) {
|
|
|
|
|
+ // 赋值出库查询条件
|
|
|
|
|
+ params = {
|
|
|
|
|
+ objectId:row[0].objectId,
|
|
|
|
|
+ macType:0,
|
|
|
|
|
+ accDateStart:searchParams.accDateStart,
|
|
|
|
|
+ accDateEnd:searchParams.accDateEnd,
|
|
|
|
|
+ currentPage:searchParams.currentPage,
|
|
|
|
|
+ pageSize:searchParams.pageSize
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ // 查询出库明细
|
|
|
|
|
+ this.excute(this.$service.detailReportService, this.$service.detailReportService.getMacRecCurrentItemReport, params).then(res => {
|
|
|
|
|
+ if (res.code === this.$config.SUCCESS_CODE) {
|
|
|
|
|
+ this.handleDetailData = res.data.list;
|
|
|
|
|
+ // 显示出库明细信息页面
|
|
|
|
|
+ this.detailModel = 'handleDetail'
|
|
|
|
|
+ this.visCustomerFlag = false
|
|
|
|
|
+ this.visCusRecHandleFlag = true
|
|
|
|
|
+ this.visCusRecFlag = false
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
|
|
+ },
|
|
|
|
|
+
|
|
|
|
|
+ },
|
|
|
|
|
+ created() {
|
|
|
|
|
+ this.primaryKey = 'objectId' // 设置主键Id
|
|
|
|
|
+ this.routeObjName = 'detailReport' // 设置路由名称
|
|
|
|
|
+ }
|
|
|
|
|
+}
|
|
|
|
|
+</script>
|
|
|
|
|
+
|
|
|
|
|
+
|