|
@@ -2,28 +2,33 @@
|
|
|
<div>
|
|
|
<el-dialog class="dialogClass" append-to-body title="预览报表" :visible.sync="previewDialog" width="60%"
|
|
|
:close-on-click-modal="false" :destroy-on-close="true" :close-on-press-escape="false" v-dialog-drag>
|
|
|
- <avue-crud :option="selecList.length || type == 1 ? optionBack : optionPrinting" :table-loading="loading"
|
|
|
- :data="data" :page.sync="page" :permission="permissionList" v-model="form" ref="crud" id="out-table"
|
|
|
- :header-cell-class-name="headerClassName" :search.sync="query" @search-change="searchChange"
|
|
|
- @search-reset="searchReset" @selection-change="selectionChange" @current-change="currentChange"
|
|
|
- @size-change="sizeChange" @refresh-change="refreshChange">
|
|
|
- <template slot-scope="scope" slot="menu">
|
|
|
- <el-link type="primary" :disabled="scope.row.status == 1"
|
|
|
- @click="reportsGetReportDatafun(scope.row.url, scope.row)">预览报表</el-link>
|
|
|
- </template>
|
|
|
- <template slot="curCode" slot-scope="{ row }">
|
|
|
- <dic-select v-model="row.curCode" placeholder="币别" key="id" keyValue="key" label="code"
|
|
|
- :mockData="curCodeList" :filterable="true" :activateCreated="false"></dic-select>
|
|
|
- </template>
|
|
|
- <template slot="type" slot-scope="{ row }">
|
|
|
- <!-- <dic-select v-model="row.type" placeholder="报表类型" key="id" keyValue="cnName" label="enName"
|
|
|
- :mockData="typeList" :filterable="true" :activateCreated="false"></dic-select> -->
|
|
|
- <el-select v-model="row.type" placeholder="请选择" size="small">
|
|
|
- <el-option v-for="item in typeList" :key="item.id" :label="item.cnName" :value="item.cnName">
|
|
|
- </el-option>
|
|
|
- </el-select>
|
|
|
- </template>
|
|
|
- </avue-crud>
|
|
|
+ <el-row>
|
|
|
+ <el-col :span="selecList.length?0:5">
|
|
|
+ <el-tree :data="typeList" :props="defaultProps" @node-click="handleNodeClick"></el-tree>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="selecList.length?24:19">
|
|
|
+ <avue-crud :option="selecList.length || type == 1 ? optionBack : optionPrinting" :table-loading="loading"
|
|
|
+ :data="data" :page.sync="page" :permission="permissionList" v-model="form" ref="crud" id="out-table"
|
|
|
+ :header-cell-class-name="headerClassName" :search.sync="query" @search-change="searchChange"
|
|
|
+ @search-reset="searchReset" @selection-change="selectionChange" @current-change="currentChange"
|
|
|
+ @size-change="sizeChange" @refresh-change="refreshChange">
|
|
|
+ <template slot-scope="scope" slot="menu">
|
|
|
+ <el-link type="primary" :disabled="scope.row.status == 1"
|
|
|
+ @click="reportsGetReportDatafun(scope.row.url, scope.row)">预览报表</el-link>
|
|
|
+ </template>
|
|
|
+ <template slot="curCode" slot-scope="{ row }">
|
|
|
+ <dic-select v-model="row.curCode" placeholder="币别" key="id" keyValue="key" label="code"
|
|
|
+ :mockData="curCodeList" :filterable="true" :activateCreated="false"></dic-select>
|
|
|
+ </template>
|
|
|
+ <!-- <template slot="type" slot-scope="{ row }">
|
|
|
+ <el-select v-model="row.type" placeholder="请选择" size="small">
|
|
|
+ <el-option v-for="item in typeList" :key="item.id" :label="item.cnName" :value="item.cnName">
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
+ </template> -->
|
|
|
+ </avue-crud>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
</el-dialog>
|
|
|
<reportContainer ref="reportContainer"></reportContainer>
|
|
|
</div>
|
|
@@ -78,6 +83,9 @@ export default {
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
+ defaultProps: {
|
|
|
+ label: 'cnName'
|
|
|
+ },
|
|
|
curCodeList: [
|
|
|
{
|
|
|
key: null,
|
|
@@ -134,11 +142,11 @@ export default {
|
|
|
prop: "curCode",
|
|
|
overHidden: true,
|
|
|
},
|
|
|
- {
|
|
|
- label: "报表类型",
|
|
|
- prop: "type",
|
|
|
- overHidden: true,
|
|
|
- },
|
|
|
+ // {
|
|
|
+ // label: "报表类型",
|
|
|
+ // prop: "type",
|
|
|
+ // overHidden: true,
|
|
|
+ // },
|
|
|
{
|
|
|
label: "客户名称",
|
|
|
prop: "cnName",
|
|
@@ -217,6 +225,7 @@ export default {
|
|
|
},
|
|
|
data: [],
|
|
|
url: null,
|
|
|
+ groupName:null
|
|
|
};
|
|
|
},
|
|
|
async created() {
|
|
@@ -247,7 +256,12 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
+ handleNodeClick(row){
|
|
|
+ console.log(row)
|
|
|
+ this.groupName=row.cnName
|
|
|
+ },
|
|
|
openDialog() {
|
|
|
+ this.groupName=null
|
|
|
this.previewDialog = true
|
|
|
this.onLoad(this.page, this.query);
|
|
|
},
|
|
@@ -611,18 +625,16 @@ export default {
|
|
|
type: this.businessValue
|
|
|
}
|
|
|
} else {
|
|
|
- if(!row.type) return this.$message.error('请选择报表类型');
|
|
|
+ if (!this.groupName) return this.$message.error('请选择报表类型');
|
|
|
this.typeList.forEach(e => {
|
|
|
- if (row.type == e.cnName) {
|
|
|
- obj = {
|
|
|
+ obj = {
|
|
|
billId: this.id,
|
|
|
reportCode: e.classifyCode,
|
|
|
- groupCode: e.groupCode,
|
|
|
- type:this.businessValue,
|
|
|
+ groupCode: this.groupName,
|
|
|
+ type: this.businessValue,
|
|
|
corpIds: row.id,
|
|
|
curCode: row.curCode,
|
|
|
}
|
|
|
- }
|
|
|
})
|
|
|
// obj = {
|
|
|
// billId: this.id,
|