|
@@ -3,10 +3,14 @@ import { Search } from '@element-plus/icons-vue'
|
|
|
import {useRouter,useRoute} from 'vue-router'
|
|
|
import {getServiceList,getRegisterList,updateRegisterStatus,
|
|
|
registerDelete,registerListExport} from '@/api/financialMana'
|
|
|
+import {downloadByFlow} from '@/utils/common-methods'
|
|
|
|
|
|
const router = useRouter()
|
|
|
const route = useRoute()
|
|
|
- const changeStatusForm=ref(null)
|
|
|
+const changeStatusForm=ref(null)
|
|
|
+const contractTypeArray=[{id:1,label:"新签"},{id:2,label:"续约"}]
|
|
|
+const contractStatusArray=[{id:1,label:"已审批"},{id:2,label:"单章寄回"},{id:3,label:"已签回"}]
|
|
|
+const statusArray=[{id:1,label:"进行中"},{id:2,label:"已完成"}]
|
|
|
|
|
|
const financial=reactive({
|
|
|
searchParams:{
|
|
@@ -19,7 +23,8 @@ const route = useRoute()
|
|
|
page_size:10,
|
|
|
current:1,
|
|
|
},
|
|
|
- // updateTime:'',
|
|
|
+ // 创建时间数组
|
|
|
+ createtime:[],
|
|
|
tableData:[],
|
|
|
serviceTypeArray:[],
|
|
|
total:100,
|
|
@@ -45,12 +50,9 @@ const route = useRoute()
|
|
|
},
|
|
|
currentStatusRow:{}
|
|
|
})
|
|
|
- const contractTypeArray=[{id:1,label:"新签"},{id:2,label:"续约"}]
|
|
|
- const contractStatusArray=[{id:1,label:"已审批"},{id:2,label:"单章寄回"},{id:3,label:"已签回"}]
|
|
|
- const statusArray=[{id:1,label:"进行中"},{id:2,label:"已完成"}]
|
|
|
|
|
|
// 监听
|
|
|
- watch(()=>financial.updateTime,(newVal)=>{
|
|
|
+ watch(()=>financial.createtime,(newVal)=>{
|
|
|
if(!newVal){
|
|
|
financial.searchParams.start_date=''
|
|
|
financial.searchParams.end_date=''
|
|
@@ -68,7 +70,7 @@ const route = useRoute()
|
|
|
financial.serviceTypeArray=res.data || []
|
|
|
})
|
|
|
}
|
|
|
-
|
|
|
+ // 请求财务列表
|
|
|
const financialList=()=>{
|
|
|
// console.log(financial.searchParams);
|
|
|
getRegisterList(financial.searchParams).then(res=>{
|
|
@@ -100,41 +102,13 @@ const route = useRoute()
|
|
|
}
|
|
|
|
|
|
// 合规、开票、到账登记
|
|
|
- const registration=(type,id)=>{
|
|
|
- // console.log(type,id);
|
|
|
-
|
|
|
+ const registration=(type,id)=>{
|
|
|
router.push({path:'/financial/list/contractProgress',query:{type,complianceId:id}})
|
|
|
}
|
|
|
// 导出数据
|
|
|
const exportData=()=>{
|
|
|
registerListExport(financial.searchParams).then(res=>{
|
|
|
- // switch (mime) { // 获取后缀对应的 mime
|
|
|
- // case 'png': fileTypeMime = 'image/png'; break;
|
|
|
- // case 'doc': fileTypeMime = 'application/msword'; break;
|
|
|
- // case 'docx': fileTypeMime = 'application/vnd.openxmlformats-officedocument.wordprocessingml.document'; break;
|
|
|
- // case 'jpg': case 'jpeg': fileTypeMime = 'image/jpeg'; break;
|
|
|
- // case 'gif': fileTypeMime = 'image/gif'; break;
|
|
|
- // case 'svg': fileTypeMime = 'image/svg+xml'; break;
|
|
|
- // case 'tif': case 'tiff': fileTypeMime = 'image/tiff'; break;
|
|
|
- // case 'txt': fileTypeMime = 'text/plain'; break;
|
|
|
- // case 'ppt': fileTypeMime = 'application/vnd.ms-powerpoint'; break;
|
|
|
- // case 'pptx': fileTypeMime = 'application/vnd.openxmlformats-officedocument.presentationml.presentation'; break;
|
|
|
- // case 'xls': fileTypeMime = 'application/vnd.ms-excel'; break;
|
|
|
- // case 'xlsx': fileTypeMime = 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'; break;
|
|
|
- // case 'zip': fileTypeMime = 'application/zip'; break;
|
|
|
- // case '7z': fileTypeMime = 'application/x-7z-compressed'; break;
|
|
|
- // }
|
|
|
- let blob = window.URL.createObjectURL(new Blob([res], {
|
|
|
- 'type': 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'
|
|
|
- }))
|
|
|
- let link = document.createElement('a')
|
|
|
- link.style.display = 'none'
|
|
|
- link.href = blob
|
|
|
- link.setAttribute('download', `财务列表.xlsx`)
|
|
|
- document.body.appendChild(link)
|
|
|
- link.click()
|
|
|
- document.body.removeChild(link) //下载完成移除元素
|
|
|
- window.URL.revokeObjectURL(blob) //释放掉 blob 对象
|
|
|
+ downloadByFlow(res,'xlsx','财务列表')
|
|
|
})
|
|
|
}
|
|
|
// 显示开票详情
|
|
@@ -202,7 +176,7 @@ const route = useRoute()
|
|
|
<div class="financial-search-zone">
|
|
|
<el-input v-model="financial.searchParams.keyword" placeholder="合同编号/客户姓名/销售" :prefix-icon="Search"
|
|
|
style="width: 286px;margin-bottom: 8px;" @input="searchFinancial" clearable />
|
|
|
- <el-date-picker v-model="financial.updateTime" start-placeholder="合同创建日期"
|
|
|
+ <el-date-picker v-model="financial.createtime" start-placeholder="合同创建日期"
|
|
|
end-placeholder="合同创建日期" style="margin-right: 30px;max-width: 286px;margin-bottom: 8px;"
|
|
|
value-format="YYYY-MM-DD" type="daterange"></el-date-picker>
|
|
|
<el-select v-model="financial.searchParams.service_type" placeholder="请选择套餐类型" clearable
|
|
@@ -256,8 +230,6 @@ const route = useRoute()
|
|
|
{{contractStatusArray[row.contract_status-1].label}}
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <!-- <el-table-column label="合同状态更新时间" align="center" width="170" prop="contractStatusTime"
|
|
|
- v-if="financial.tabelColumnShowArr.includes('contractStatusTime')"></el-table-column> -->
|
|
|
<el-table-column label="已开票金额" align="center" prop="invoiced_amount" width="100">
|
|
|
<template #default="{row}">
|
|
|
<span style="color: var(--themeColor);cursor: pointer;" @click="invoiceDetail(row)">{{row.invoiced_amount}}</span>
|
|
@@ -290,7 +262,6 @@ const route = useRoute()
|
|
|
<el-checkbox label="contractDate">合同有效期</el-checkbox>
|
|
|
<el-checkbox label="agreed_pay_time">约定付款时间</el-checkbox>
|
|
|
<el-checkbox label="sign_date">签订日</el-checkbox>
|
|
|
- <!-- <el-checkbox label="contractStatusTime">合同状态更新时间</el-checkbox> -->
|
|
|
<el-checkbox label="remark">备注</el-checkbox>
|
|
|
</el-checkbox-group>
|
|
|
<el-button style="float: right;" @click="checkedConfirm">确认</el-button>
|
|
@@ -376,7 +347,7 @@ const route = useRoute()
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
.financial-list-container{
|
|
|
- height: 100%;
|
|
|
+ min-height: 100%;
|
|
|
.financial-search-zone{
|
|
|
display: flex;
|
|
|
align-items: center;
|