Commit 90032027 authored by huangyuanyuan's avatar huangyuanyuan

添加报表跳转

parent 923233d1
...@@ -509,6 +509,7 @@ tr._item_list td:last-child { ...@@ -509,6 +509,7 @@ tr._item_list td:last-child {
:footer="footer" :footer="footer"
:footer-row-height="33" :footer-row-height="33"
:multiple-sort="multipleSort" :multiple-sort="multipleSort"
:row-click="rowClick"
> >
<!-- 多个排序 --> <!-- 多个排序 -->
</v-table> </v-table>
...@@ -646,6 +647,7 @@ export default { ...@@ -646,6 +647,7 @@ export default {
if (!this.msg.TCID) this.msg.TCID = 0; if (!this.msg.TCID) this.msg.TCID = 0;
if (this.msg.QStartDate == "") this.msg.QStartDate = "2019"; if (this.msg.QStartDate == "") this.msg.QStartDate = "2019";
this.apipost('financestatistics_get_GetTravelMonthReportList', this.msg, res=>{ this.apipost('financestatistics_get_GetTravelMonthReportList', this.msg, res=>{
// console.log(res);
if (res.data.resultCode == 1) { if (res.data.resultCode == 1) {
this.DataList = res.data.data; this.DataList = res.data.data;
this.columns = [ this.columns = [
...@@ -850,6 +852,27 @@ export default { ...@@ -850,6 +852,27 @@ export default {
if (field === "FourQuarter") return this.priceFormat(rowData.FourQuarter); if (field === "FourQuarter") return this.priceFormat(rowData.FourQuarter);
if (field === "EndHalf") return this.priceFormat(rowData.EndHalf); if (field === "EndHalf") return this.priceFormat(rowData.EndHalf);
if (field === "Total") return this.priceFormat(rowData.Total ); if (field === "Total") return this.priceFormat(rowData.Total );
},
rowClick(rowIndex,rowData,column){
let field=column.field;
let StartTime=field+"StartTime";
let EndTime=field+`EndTime`;
let LineId=Number(rowData.LineId);
let OutBranchId=this.msg.OutBranchId;
this.$router.push({
path: "TeamRevenueReport",
query: {
LineId:LineId,
StartTime:rowData[StartTime],
EndTime:rowData[EndTime],
OutBranchId:OutBranchId,
blank: 'y',
tab: '营收报表'
}
});
}, },
priceFormat(value) { priceFormat(value) {
if (value == null) { if (value == null) {
...@@ -973,8 +996,10 @@ export default { ...@@ -973,8 +996,10 @@ export default {
"admin_get_BranchGetList", "admin_get_BranchGetList",
this.getCompanyMsg, this.getCompanyMsg,
res => { res => {
console.log("出团公司",res)
if (res.data.resultCode == 1) { if (res.data.resultCode == 1) {
this.CompanyList = res.data.data; this.CompanyList = res.data.data;
this.msg.OutBranchId=this.CompanyList[0].Id;
} else { } else {
} }
}, },
......
...@@ -419,7 +419,7 @@ tr._item_list td:last-child { ...@@ -419,7 +419,7 @@ tr._item_list td:last-child {
v-for="item in CompanyList" v-for="item in CompanyList"
:label="item.BName" :label="item.BName"
:value="item.Id" :value="item.Id"
:key="item.Id" :key="item.BName"
></el-option> ></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
...@@ -432,7 +432,7 @@ tr._item_list td:last-child { ...@@ -432,7 +432,7 @@ tr._item_list td:last-child {
v-for="item in startCityList1" v-for="item in startCityList1"
:label="item.startCityName" :label="item.startCityName"
:value="item.ID" :value="item.ID"
:key="item.ID" :key="item.startCityName"
></el-option> ></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
...@@ -445,7 +445,7 @@ tr._item_list td:last-child { ...@@ -445,7 +445,7 @@ tr._item_list td:last-child {
v-for="item in LineList" v-for="item in LineList"
:label="item.LineName" :label="item.LineName"
:value="item.LineID" :value="item.LineID"
:key="item.LineID" :key="item.LineName"
></el-option> ></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
...@@ -458,7 +458,7 @@ tr._item_list td:last-child { ...@@ -458,7 +458,7 @@ tr._item_list td:last-child {
v-for="item in LineTeamList" v-for="item in LineTeamList"
:label="item.LtName" :label="item.LtName"
:value="item.LtID" :value="item.LtID"
:key="item.LtID" :key="item.LtName"
></el-option> ></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
...@@ -489,21 +489,21 @@ tr._item_list td:last-child { ...@@ -489,21 +489,21 @@ tr._item_list td:last-child {
<el-col :span="4"> <el-col :span="4">
<el-form-item label="状态:"> <el-form-item label="状态:">
<el-select v-model="msg.QueryCondition" filterable class="w150"> <el-select v-model="msg.QueryCondition" filterable class="w150">
<el-option key="-1" value="-1" label="不限"></el-option> <el-option value="-1" label="不限"></el-option>
<el-option key="0" value="0" label="待收"></el-option> <el-option value="0" label="待收"></el-option>
<el-option key="1" value="1" label="退款"></el-option> <el-option value="1" label="退款"></el-option>
<el-option key="2" value="2" label="在途"></el-option> <el-option value="2" label="在途"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="4"> <el-col :span="4">
<el-form-item label="数据类别:"> <el-form-item label="数据类别:">
<el-select v-model="msg.DataType" filterable class="w150"> <el-select v-model="msg.DataType" filterable class="w150">
<el-option key="-1" value="-1" label="不限"></el-option> <el-option value="-1" label="不限"></el-option>
<el-option key="0" value="1" label="团队营收"></el-option> <el-option value="1" label="团队营收"></el-option>
<el-option key="2" value="3" label="单办签证"></el-option> <el-option value="3" label="单办签证"></el-option>
<el-option key="1" value="2" label="国际机票"></el-option> <el-option value="2" label="国际机票"></el-option>
<el-option key="2" value="5" label="散卖机票"></el-option> <el-option value="5" label="散卖机票"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
...@@ -1342,7 +1342,32 @@ export default { ...@@ -1342,7 +1342,32 @@ export default {
AALloading: false AALloading: false
}; };
}, },
created() {}, created() {
this.msg.startDate=this.$route.query.StartTime!=undefined?this.$route.query.StartTime:'';
this.msg.endDate=this.$route.query.EndTime!=undefined?this.$route.query.EndTime:'';
this.msg.LineId=this.$route.query.LineId!=undefined?Number(this.$route.query.LineId):'';
this.productionDate[0]=this.msg.startDate;
this.productionDate[1]=this.msg.endDate;
if(this.msg.LineId>0){
this.msg.DataType="1";
}
if(this.msg.LineId==-1){
this.msg.DataType="-1";
this.msg.OutBranchId=45;
}
if(this.msg.LineId==-2){
this.msg.DataType="2";
}
if(this.msg.LineId==-3){
this.msg.DataType="5";
}
if(this.msg.LineId==-4){
this.msg.DataType="3";
}
// startDate: "",
// endDate: "",
// this.msg.lineID=this.$route.query.lineID;
},
components: {}, components: {},
mounted() { mounted() {
let allH, allW, cH, cW; let allH, allW, cH, cW;
...@@ -1354,10 +1379,10 @@ export default { ...@@ -1354,10 +1379,10 @@ export default {
let userInfo = this.getLocalStorage(); let userInfo = this.getLocalStorage();
this.getCompanyMsg.RB_Group_Id = userInfo.RB_Group_id; //集团ID this.getCompanyMsg.RB_Group_Id = userInfo.RB_Group_id; //集团ID
this.userId = userInfo.EmployeeId; this.userId = userInfo.EmployeeId;
this.getCompanyList(); this.getCompanyList();
this.getPageList();
this.getLineList(); this.getLineList();
this.getStartList1(); this.getStartList1();
this.getPageList();
}, },
methods: { methods: {
goEasyReport: function() { goEasyReport: function() {
...@@ -1509,7 +1534,6 @@ export default { ...@@ -1509,7 +1534,6 @@ export default {
// 组装表格内容 // 组装表格内容
dataSource.forEach((x, index) => { dataSource.forEach((x, index) => {
console.log(index);
let obj = []; let obj = [];
obj.push(x.FrID + " "); obj.push(x.FrID + " ");
obj.push(x.TCNUM); obj.push(x.TCNUM);
...@@ -1602,8 +1626,6 @@ export default { ...@@ -1602,8 +1626,6 @@ export default {
const wb = XLSX.utils.book_new(); const wb = XLSX.utils.book_new();
XLSX.utils.book_append_sheet(wb, ws, xlsxName); XLSX.utils.book_append_sheet(wb, ws, xlsxName);
var dataInfo = wb.Sheets[wb.SheetNames[0]]; var dataInfo = wb.Sheets[wb.SheetNames[0]];
console.log(data[0].length);
console.log(colName.length);
// return // return
data[0].forEach((x, i) => { data[0].forEach((x, i) => {
dataInfo[colName[i] + "1"].s = { dataInfo[colName[i] + "1"].s = {
...@@ -1720,7 +1742,6 @@ export default { ...@@ -1720,7 +1742,6 @@ export default {
if (res.data.resultCode == 1) { if (res.data.resultCode == 1) {
this.startCityList1 = res.data.data; this.startCityList1 = res.data.data;
} else { } else {
console.log(res.data);
} }
} }
); );
...@@ -1785,6 +1806,7 @@ export default { ...@@ -1785,6 +1806,7 @@ export default {
// 数据筛选 // 数据筛选
filterMethod(filters) { filterMethod(filters) {
console.log(filters); console.log(filters);
// let tableData = this.DataList; // let tableData = this.DataList;
// if (filters.FrID && filters.FrID.length>0){ // if (filters.FrID && filters.FrID.length>0){
...@@ -1823,6 +1845,7 @@ export default { ...@@ -1823,6 +1845,7 @@ export default {
if (!this.msg.LineTeamId) this.msg.LineTeamId = 0; if (!this.msg.LineTeamId) this.msg.LineTeamId = 0;
if (!this.msg.TCID) this.msg.TCID = 0; if (!this.msg.TCID) this.msg.TCID = 0;
if (this.msg.startDate == "") this.msg.startDate = "2019-01-01"; if (this.msg.startDate == "") this.msg.startDate = "2019-01-01";
console.log("this.msg",this.msg);
this.apipost( this.apipost(
"financestatistics_post_GetPageList", "financestatistics_post_GetPageList",
this.msg, this.msg,
...@@ -1885,6 +1908,7 @@ export default { ...@@ -1885,6 +1908,7 @@ export default {
"admin_get_BranchGetList", "admin_get_BranchGetList",
this.getCompanyMsg, this.getCompanyMsg,
res => { res => {
console.log("出团gongsi",res)
if (res.data.resultCode == 1) { if (res.data.resultCode == 1) {
this.CompanyList = res.data.data; this.CompanyList = res.data.data;
} else { } else {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment