|
@@ -1,25 +1,27 @@
|
|
|
<script setup>
|
|
|
import {getSellerList} from '@/api/crm'
|
|
|
+ import {getWaitInvoiceList} from '@/api/financialStatistics'
|
|
|
+
|
|
|
import currencyAmountBox from './components/currencyAmountBox.vue';
|
|
|
+ import {downloadByFlow} from '@/utils/common-methods'
|
|
|
|
|
|
const searchParams=reactive({
|
|
|
keyword:'',
|
|
|
- service_type:'',
|
|
|
+ list_param:'',
|
|
|
seller_ids:'',
|
|
|
- currentIndex:1,
|
|
|
- pageSize:10,
|
|
|
- sortParam:'',
|
|
|
- sortType:''
|
|
|
+ current:1,
|
|
|
+ page_size:10,
|
|
|
+ sort_param:'',
|
|
|
+ sort_type:'',
|
|
|
+ is_export:0
|
|
|
})
|
|
|
|
|
|
const tableData=reactive({
|
|
|
list:[],
|
|
|
total:0,
|
|
|
rowMergeArray:[],
|
|
|
- currencyList:[{amount: 9100,code:"CNY",flag_img:"https://hzstatic.hzinsights.com/static/fms/imgs/China.svg",name: "人民币",unit_name: "元"},
|
|
|
- {amount: 100,code:"USD",flag_img:"https://hzstatic.hzinsights.com/static/fms/imgs/America.svg",name: "美元",unit_name: "美元"},
|
|
|
- {amount: 0,code:"SGD",flag_img:"https://hzstatic.hzinsights.com/static/fms/imgs/Singapore.svg",name: "新加坡元",unit_name: "新元"}],
|
|
|
- currencyTotal:569787.76,
|
|
|
+ currencyList:[],
|
|
|
+ currencyTotal:0,
|
|
|
})
|
|
|
// ---------------------------------销售模块
|
|
|
const sellerArray=ref([])
|
|
@@ -35,64 +37,48 @@
|
|
|
}
|
|
|
|
|
|
const searchList=()=>{
|
|
|
- console.log(searchParams);
|
|
|
- // TODO 请求列表的方法
|
|
|
+ searchParams.current=1
|
|
|
getList()
|
|
|
}
|
|
|
|
|
|
const sortChange=({prop,order})=>{
|
|
|
// console.log({prop,order});
|
|
|
- searchParams.sortParam = order?prop:''
|
|
|
- searchParams.sortType=order=='descending'?'desc':order=='ascending'?'asc':''
|
|
|
+ searchParams.sort_param = order?prop:''
|
|
|
+ searchParams.sort_type=order=='descending'?'desc':order=='ascending'?'asc':''
|
|
|
getList()
|
|
|
}
|
|
|
|
|
|
const getList=()=>{
|
|
|
- tableData.rowMergeArray=[]
|
|
|
- // TODO 请求列表接口对接
|
|
|
- let dataTemp=[{id:1,company_name:'集诚实业',contract_code:'001',start_date:'2021-02-01',end_date:'2023-01-31',origin_amount:45000,
|
|
|
- unit_name:'元',wait_invoice_amount:50000,service_type:'FICC套餐',invoiceList:[{seller_name:'张三',seller_group:'无',seller_type:'FICC销售'},
|
|
|
- {seller_name:'张三',seller_group:'无',seller_type:'FICC销售'},{seller_name:'张三',seller_group:'无',seller_type:'FICC销售'}]},
|
|
|
- {id:1,company_name:'集诚实业',contract_code:'001',start_date:'2021-02-01',end_date:'2023-01-31',origin_amount:45000,
|
|
|
- unit_name:'元',wait_invoice_amount:50000,service_type:'FICC套餐',invoiceList:[{seller_name:'张三',seller_group:'无',seller_type:'FICC销售'},
|
|
|
- {seller_name:'张三',seller_group:'无',seller_type:'FICC销售'},{seller_name:'张三',seller_group:'无',seller_type:'FICC销售'}]},
|
|
|
- {id:1,company_name:'集诚实业',contract_code:'001',start_date:'2021-02-01',end_date:'2023-01-31',origin_amount:45000,
|
|
|
- unit_name:'元',wait_invoice_amount:50000,service_type:'FICC套餐',invoiceList:[{seller_name:'张三',seller_group:'无',seller_type:'FICC销售'},
|
|
|
- {seller_name:'张三',seller_group:'无',seller_type:'FICC销售'},{seller_name:'张三',seller_group:'无',seller_type:'FICC销售'}]},
|
|
|
- {id:1,company_name:'集诚实业',contract_code:'001',start_date:'2021-02-01',end_date:'2023-01-31',origin_amount:45000,
|
|
|
- unit_name:'元',wait_invoice_amount:50000,service_type:'FICC套餐',invoiceList:[{seller_name:'张三',seller_group:'无',seller_type:'FICC销售'},
|
|
|
- {seller_name:'张三',seller_group:'无',seller_type:'FICC销售'},{seller_name:'张三',seller_group:'无',seller_type:'FICC销售'}]},
|
|
|
- {id:1,company_name:'集诚实业',contract_code:'001',start_date:'2021-02-01',end_date:'2023-01-31',origin_amount:45000,
|
|
|
- unit_name:'元',wait_invoice_amount:50000,service_type:'FICC套餐',invoiceList:[{seller_name:'张三',seller_group:'无',seller_type:'FICC销售'},
|
|
|
- {seller_name:'张三',seller_group:'无',seller_type:'FICC销售'},{seller_name:'张三',seller_group:'无',seller_type:'FICC销售'}]},
|
|
|
- {id:1,company_name:'集诚实业',contract_code:'001',start_date:'2021-02-01',end_date:'2023-01-31',origin_amount:45000,
|
|
|
- unit_name:'元',wait_invoice_amount:50000,service_type:'FICC套餐',invoiceList:[{seller_name:'张三',seller_group:'无',seller_type:'FICC销售'},
|
|
|
- {seller_name:'张三',seller_group:'无',seller_type:'FICC销售'},{seller_name:'张三',seller_group:'无',seller_type:'FICC销售'}]},
|
|
|
- {id:1,company_name:'集诚实业',contract_code:'001',start_date:'2021-02-01',end_date:'2023-01-31',origin_amount:45000,
|
|
|
- unit_name:'元',wait_invoice_amount:50000,service_type:'FICC套餐',invoiceList:[{seller_name:'张三',seller_group:'无',seller_type:'FICC销售'},
|
|
|
- {seller_name:'张三',seller_group:'无',seller_type:'FICC销售'},{seller_name:'张三',seller_group:'无',seller_type:'FICC销售'}]}]
|
|
|
-
|
|
|
- // console.log(dataTemp);
|
|
|
- dataTemp.map((item,index) =>{
|
|
|
- tableData.rowMergeArray.push(item.invoiceList.length)
|
|
|
- item.invoiceList.map((it,ind) =>{
|
|
|
- if(ind>0){
|
|
|
- tableData.rowMergeArray.push(0)
|
|
|
- }
|
|
|
- tableData.list.push({
|
|
|
- serial_number:searchParams.pageSize*(searchParams.currentIndex-1)+index+1,
|
|
|
- ...item,...it
|
|
|
+ getWaitInvoiceList(searchParams).then(res=>{
|
|
|
+ // console.log(res);
|
|
|
+ tableData.total = res.data.page?.total || 0
|
|
|
+ let dataTemp=res.data?.list?.data_list||[]
|
|
|
+ tableData.rowMergeArray=[]
|
|
|
+ tableData.list=[]
|
|
|
+ dataTemp.map((item,index) =>{
|
|
|
+ tableData.rowMergeArray.push(item.invoice_payment_list.length)
|
|
|
+ item.invoice_payment_list.map((it,ind) =>{
|
|
|
+ if(ind>0){
|
|
|
+ tableData.rowMergeArray.push(0)
|
|
|
+ }
|
|
|
+ tableData.list.push({
|
|
|
+ serial_number:searchParams.page_size*(searchParams.current-1)+index+1,
|
|
|
+ ...item,...it
|
|
|
+ })
|
|
|
})
|
|
|
})
|
|
|
+
|
|
|
+ tableData.currencyList = res.data?.list?.not_invoice_currency_total || []
|
|
|
+ tableData.currencyTotal = res.data?.list?.not_invoice_total||0
|
|
|
+
|
|
|
})
|
|
|
- tableData.total=dataTemp.length
|
|
|
}
|
|
|
const changePageSize=(pageSize)=>{
|
|
|
- searchParams.pageSize = pageSize
|
|
|
+ searchParams.page_size = pageSize
|
|
|
getList()
|
|
|
}
|
|
|
const changePageNo = (pageNo)=>{
|
|
|
- searchParams.currentIndex = pageNo
|
|
|
+ searchParams.current = pageNo
|
|
|
getList()
|
|
|
}
|
|
|
// 合并单元格
|
|
@@ -108,8 +94,9 @@
|
|
|
|
|
|
// 导出
|
|
|
const watiInvoiceExport=()=>{
|
|
|
- console.log('导出');
|
|
|
- //TODO 导出接口对接
|
|
|
+ getWaitInvoiceList({...searchParams,is_export:1}).then(res=>{
|
|
|
+ downloadByFlow(res,'xlsx',`未开票统计表`)
|
|
|
+ })
|
|
|
}
|
|
|
|
|
|
// --------------------------------created
|
|
@@ -121,11 +108,11 @@
|
|
|
<div class="wait-invoice-container" id="wait-invoice-container">
|
|
|
<div class="wait-invoice-searchZone">
|
|
|
<el-input v-model="searchParams.keyword" placeholder="请输入客户名称/合同编号"
|
|
|
- clearable @input="searchList" class="statistics-search-item" style="width: 323px;"></el-input>
|
|
|
- <el-select v-model="searchParams.service_type" placeholder="请选择销售类型" style="width: 308px;"
|
|
|
+ clearable @input="searchList" class="statistics-search-item" style="width: 308px;"></el-input>
|
|
|
+ <el-select v-model="searchParams.list_param" placeholder="请选择套餐类型" style="width: 308px;"
|
|
|
@change="searchList" class="statistics-search-item" clearable >
|
|
|
- <el-option label="FICC销售" :value="1"></el-option>
|
|
|
- <el-option label="权益销售" :value="2"></el-option>
|
|
|
+ <el-option label="FICC套餐" :value="1"></el-option>
|
|
|
+ <el-option label="权益套餐" :value="2"></el-option>
|
|
|
</el-select>
|
|
|
<el-cascader :options="sellerArray" style="margin-left: 30px;margin-bottom: 8px;z-index: 100;min-width: 308px;" filterable collapse-tags-tooltip
|
|
|
@change="sellerChange" placeholder="请选择销售" clearable collapse-tags :show-all-levels="false"
|
|
@@ -139,22 +126,25 @@
|
|
|
<el-button class="element-common-button" style="margin-bottom: 10px;width: 118px;" size="large" @click="watiInvoiceExport">导出</el-button>
|
|
|
</div>
|
|
|
<el-table :data="tableData.list" border max-height="579px" @sort-change="sortChange" :span-method="cellMerge">
|
|
|
- <el-table-column label="序号" prop="serial_number" width="70px"></el-table-column>
|
|
|
+ <el-table-column label="序号" prop="serial_number" width="70px" align="center"></el-table-column>
|
|
|
<el-table-column label="客户名称" align="center" prop="company_name" show-overflow-tooltip></el-table-column>
|
|
|
<el-table-column label="合同编号" align="center" prop="contract_code" show-overflow-tooltip></el-table-column>
|
|
|
<el-table-column label="合同开始时间" align="center" prop="start_date" sortable="custom"></el-table-column>
|
|
|
<el-table-column label="合同结束时间" align="center" prop="end_date" sortable="custom"></el-table-column>
|
|
|
- <el-table-column label="合同金额" align="center" prop="origin_amount"></el-table-column>
|
|
|
+ <el-table-column label="合同金额" align="center" prop="contract_amount"></el-table-column>
|
|
|
<el-table-column label="金额单位" align="center" prop="unit_name"></el-table-column>
|
|
|
- <el-table-column label="未开票金额" align="center" prop="wait_invoice_amount"></el-table-column>
|
|
|
+ <el-table-column label="未开票金额" align="center" prop="not_invoice_total"></el-table-column>
|
|
|
<el-table-column label="套餐类型" align="center" prop="service_type">
|
|
|
<template #header>
|
|
|
- <el-tooltip content="未开票的合同套餐类型" placement="top">
|
|
|
+ <el-tooltip content="合同套餐类型" placement="top">
|
|
|
<span style="display: inline-flex;align-items: center;">套餐类型
|
|
|
<svg-Icon name="svgIcon-financial-info" size="18" style="margin-left: 5px;color: white;" />
|
|
|
</span>
|
|
|
</el-tooltip>
|
|
|
</template>
|
|
|
+ <template #default="{row}">
|
|
|
+ {{ row.product_ids=='1'?'FICC套餐':row.product_ids=='2'?'权益套餐':row.product_ids=='1,2'?'FICC套餐、权益套餐':'--' }}
|
|
|
+ </template>
|
|
|
</el-table-column>
|
|
|
<el-table-column label="销售" align="center" prop="seller_name" >
|
|
|
<template #header>
|
|
@@ -165,8 +155,12 @@
|
|
|
</el-tooltip>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column label="销售组别" align="center" prop="seller_group" ></el-table-column>
|
|
|
- <el-table-column label="销售类型" align="center" prop="seller_type" ></el-table-column>
|
|
|
+ <el-table-column label="销售组别" align="center" prop="seller_group_name" ></el-table-column>
|
|
|
+ <el-table-column label="销售类型" align="center" prop="seller_type" >
|
|
|
+ <template #default="{row}">
|
|
|
+ {{ row.seller_type==1?'FICC销售':row.seller_type==2?'权益销售':'--' }}
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
<template #empty>
|
|
|
<div class="table-no-data">
|
|
|
<img src="@/assets/img/icon/empty-data.png" />
|
|
@@ -175,7 +169,7 @@
|
|
|
</template>
|
|
|
</el-table>
|
|
|
<!-- 分页 -->
|
|
|
- <m-page :pageSize="searchParams.pageSize" :page_no="searchParams.currentIndex"
|
|
|
+ <m-page :pageSize="searchParams.page_size" :page_no="searchParams.current"
|
|
|
style="display: flex;justify-content: flex-end;margin-top: 20px;"
|
|
|
:total="tableData.total" @handleCurrentChange="changePageNo" @handleSizeChange="changePageSize"/>
|
|
|
</div>
|