|
@@ -21,21 +21,50 @@
|
|
|
<basic-container class="page-crad">
|
|
|
<!-- :on-change="handleChange" -->
|
|
|
<avue-crud :option="option" :table-loading="loading" :data="data" :page.sync="page" :permission="permissionList"
|
|
|
- id="out-table" :header-cell-class-name="headerClassName" :before-open="beforeOpen" v-model="form" ref="crud"
|
|
|
- @row-update="rowUpdate" @row-save="rowSave" @row-del="rowDel" @search-change="searchChange"
|
|
|
- @search-reset="searchReset" @selection-change="selectionChange" @current-change="currentChange"
|
|
|
- @size-change="sizeChange" @refresh-change="refreshChange"
|
|
|
+ id="out-table" :header-cell-class-name="headerClassName" :search.sync="search" :before-open="beforeOpen"
|
|
|
+ v-model="form" ref="crud" @row-update="rowUpdate" @row-save="rowSave" @row-del="rowDel"
|
|
|
+ @search-change="searchChange" @search-reset="searchReset" @selection-change="selectionChange"
|
|
|
+ @current-change="currentChange" @size-change="sizeChange" @refresh-change="refreshChange"
|
|
|
@resetColumn="resetColumnTwo('crud', 'option', 'optionBack', 304)"
|
|
|
@saveColumn="saveColumnTwo('crud', 'option', 'optionBack', 304)" @on-load="onLoad">
|
|
|
- <template slot="menuLeft">
|
|
|
|
|
|
- <el-button type="primary" size="small" icon="el-icon-bottom" @click="excelBox = true">导入
|
|
|
+
|
|
|
+
|
|
|
+ <template slot="code" slot-scope="scope">
|
|
|
+ <avue-text-ellipsis :text="scope.row.code" :height="30" use-tooltip placement="top">
|
|
|
+ <small slot="more">...</small>
|
|
|
+ </avue-text-ellipsis>
|
|
|
+ </template>
|
|
|
+ <template slot="uscc" slot-scope="scope">
|
|
|
+ <avue-text-ellipsis :text="scope.row.uscc" :height="30" use-tooltip placement="top">
|
|
|
+ <small slot="more">...</small>
|
|
|
+ </avue-text-ellipsis>
|
|
|
+ </template>
|
|
|
+ <template slot="cnName" slot-scope="scope">
|
|
|
+ <avue-text-ellipsis :text="scope.row.cnName" :height="30" use-tooltip placement="top">
|
|
|
+ <small slot="more">...</small>
|
|
|
+ </avue-text-ellipsis>
|
|
|
+ </template>
|
|
|
+ <template slot="enName" slot-scope="scope">
|
|
|
+ <avue-text-ellipsis :text="scope.row.enName" :height="30" use-tooltip placement="top">
|
|
|
+ <small slot="more">...</small>
|
|
|
+ </avue-text-ellipsis>
|
|
|
+ </template>
|
|
|
+ <template slot="cnAddr" slot-scope="scope">
|
|
|
+ <avue-text-ellipsis :text="scope.row.cnAddr" :height="30" use-tooltip placement="top">
|
|
|
+ <small slot="more">...</small>
|
|
|
+ </avue-text-ellipsis>
|
|
|
+ </template>
|
|
|
+ <template slot="enAddr" slot-scope="scope">
|
|
|
+ <avue-text-ellipsis :text="scope.row.enAddr" :height="30" use-tooltip placement="top">
|
|
|
+ <small slot="more">...</small>
|
|
|
+ </avue-text-ellipsis>
|
|
|
+ </template>
|
|
|
+
|
|
|
+ <template slot="menuLeft">
|
|
|
+ <el-button type="warning" size="small" icon="el-icon-printer" @click="excelBox = true">导入
|
|
|
</el-button>
|
|
|
- <!-- <el-button size="small" type="primary" @click="handleGet" >下载模版</el-button>
|
|
|
- <el-upload style="display: flex;" :action="'/api/blade-los/bcorps/importBCorps'" :headers="headers" :show-file-list="false"
|
|
|
- :on-success="onSuccess" :on-error="onError">
|
|
|
- <el-button size="small" type="primary">点击上传</el-button>
|
|
|
- </el-upload> -->
|
|
|
+ <el-button type="success" size="small" @click="handleExport" icon="el-icon-printer">导出</el-button>
|
|
|
</template>
|
|
|
<template slot-scope="{ row, index }" slot="menu">
|
|
|
<el-button type="text" size="small" @click.stop="editOpen(row)">
|
|
@@ -117,6 +146,7 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
excelForm: {},
|
|
|
+ search: {},
|
|
|
excelLoading: false,
|
|
|
excelOption: {
|
|
|
submitBtn: false,
|
|
@@ -405,7 +435,7 @@ export default {
|
|
|
},
|
|
|
{
|
|
|
label: "客户类型",
|
|
|
- prop: "corpType",
|
|
|
+ prop: "corpTypeName",
|
|
|
rules: [{
|
|
|
required: true,
|
|
|
message: "请输入客户类型",
|
|
@@ -954,6 +984,69 @@ export default {
|
|
|
// // this.data=data.results;
|
|
|
// // })
|
|
|
// },
|
|
|
+ // 导出
|
|
|
+ handleExport() {
|
|
|
+ // let params = { ...this.search }
|
|
|
+ // let queryParams = Object.assign({}, params, {
|
|
|
+ // corpsTypeId: this.treeDeptId,
|
|
|
+ // corpType: customerParameter.code
|
|
|
+ // });
|
|
|
+ // console.log(this.website.tokenHeader)
|
|
|
+
|
|
|
+ var condition = ''
|
|
|
+
|
|
|
+ for (const key in this.search) {
|
|
|
+ var value = this.search[key]
|
|
|
+ if (value) {
|
|
|
+ condition += `&${key}=${this.search[key]}`
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ console.log(condition);
|
|
|
+
|
|
|
+ this.$confirm('是否导出客户资料?', '提示', {
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ cancelButtonText: '取消',
|
|
|
+ type: 'warning'
|
|
|
+ }).then(() => {
|
|
|
+ window.open(
|
|
|
+ `/api/blade-los/bcorps/exportBCorps?${this.website.tokenHeader
|
|
|
+ }=${getToken()}${condition}`
|
|
|
+ );
|
|
|
+ }).catch(() => {
|
|
|
+ this.$message({
|
|
|
+ type: 'info',
|
|
|
+ message: '已取消' //
|
|
|
+ });
|
|
|
+ })
|
|
|
+
|
|
|
+ // queryParams.code = queryParams.code ? queryParams.code : ''
|
|
|
+ // queryParams.cname = queryParams.cname ? queryParams.cname : ''
|
|
|
+ // queryParams.belongtoarea = queryParams.belongtoarea ? queryParams.belongtoarea : ''
|
|
|
+ // queryParams.belongtocompany = queryParams.belongtocompany ? queryParams.belongtocompany : ''
|
|
|
+ // queryParams.attn = queryParams.attn ? queryParams.attn : ''
|
|
|
+ // queryParams.goodtypes = queryParams.goodtypes ? queryParams.goodtypes : ''
|
|
|
+ // queryParams.creditLevel = queryParams.creditLevel ? queryParams.creditLevel : ''
|
|
|
+ // queryParams.adminProfiles = queryParams.adminProfiles ? queryParams.adminProfiles : ''
|
|
|
+ // queryParams.corpsTypeId = queryParams.corpsTypeId ? queryParams.corpsTypeId : ''
|
|
|
+ // console.log(queryParams)
|
|
|
+
|
|
|
+ // this.$confirm('是否导出客户资料?', '提示', {
|
|
|
+ // confirmButtonText: '确定',
|
|
|
+ // cancelButtonText: '取消',
|
|
|
+ // type: 'warning'
|
|
|
+ // }).then(() => {
|
|
|
+ // window.open(
|
|
|
+ // `/api/blade-los/bcorps/exportBCorps?${this.website.tokenHeader
|
|
|
+ // }=${getToken()}&code=${queryParams.code}&cname=${queryParams.cname}&belongtoarea=${queryParams.belongtoarea}&belongtocompany=${queryParams.belongtocompany}&attn=${queryParams.attn}&goodtypes=${queryParams.goodtypes}&creditLevel=${queryParams.creditLevel}&adminProfiles=${queryParams.adminProfiles}&corpsTypeId=${queryParams.corpsTypeId}&corpType=KH`
|
|
|
+ // );
|
|
|
+ // }).catch(() => {
|
|
|
+ // this.$message({
|
|
|
+ // type: 'info',
|
|
|
+ // message: '已取消' //
|
|
|
+ // });
|
|
|
+ // })
|
|
|
+ },
|
|
|
// 下载模板
|
|
|
handleGet() {
|
|
|
window.open(
|
|
@@ -981,7 +1074,10 @@ export default {
|
|
|
},
|
|
|
// 左侧点击回调
|
|
|
nodeClick(data) {
|
|
|
- console.log(data, 904)
|
|
|
+ var reqiestData = this.search;
|
|
|
+ // // console.log(data, 904)
|
|
|
+ reqiestData.corpType = data.id
|
|
|
+ this.onLoad(this.page, reqiestData);
|
|
|
},
|
|
|
// 获取客户类别
|
|
|
bcorpstypedefineListfun() {
|