|
|
@@ -1,117 +1,73 @@
|
|
|
<template>
|
|
|
- <a-card :bordered="false">
|
|
|
- <!-- 查询区域 -->
|
|
|
- <div class="table-page-search-wrapper">
|
|
|
- <a-form layout="inline" @keyup.enter.native="searchQuery">
|
|
|
- <a-row :gutter="24">
|
|
|
- <a-col :span="3">
|
|
|
- <a-form-item label="">
|
|
|
- <j-input
|
|
|
- placeholder="客户名称"
|
|
|
- v-model="queryParam.name"
|
|
|
- ></j-input>
|
|
|
- </a-form-item>
|
|
|
- </a-col>
|
|
|
- <a-col :span="3">
|
|
|
- <a-form-item label="">
|
|
|
- <a-select
|
|
|
- v-model="queryParam.customerType"
|
|
|
- style="width: 100%"
|
|
|
- placeholder="客户类型"
|
|
|
- :allowClear="true"
|
|
|
- >
|
|
|
- <a-select-option
|
|
|
- :value="item.id"
|
|
|
- v-for="(item, index) in customerSourceList"
|
|
|
- :key="item.id"
|
|
|
- >
|
|
|
- {{ item.itemText }}
|
|
|
- </a-select-option>
|
|
|
- </a-select>
|
|
|
- </a-form-item>
|
|
|
- </a-col>
|
|
|
- <a-col :span="3">
|
|
|
- <a-form-model-item label="">
|
|
|
- <a-select placeholder="状态" v-model="queryParam.status">
|
|
|
- <a-select-option :value="1"> 正常 </a-select-option>
|
|
|
- <a-select-option :value="2"> 停用 </a-select-option>
|
|
|
- </a-select>
|
|
|
- </a-form-model-item>
|
|
|
- </a-col>
|
|
|
- <a-col :md="6" :sm="8">
|
|
|
- <span
|
|
|
- style="float: left; overflow: hidden"
|
|
|
- class="table-page-search-submitButtons"
|
|
|
- >
|
|
|
- <a-button type="primary" @click="searchQuery" icon="search"
|
|
|
- >查询</a-button
|
|
|
- >
|
|
|
- <a-button
|
|
|
- type="primary"
|
|
|
- @click="searchReset"
|
|
|
- icon="reload"
|
|
|
- style="margin-left: 8px"
|
|
|
- >重置</a-button
|
|
|
- >
|
|
|
- </span>
|
|
|
- </a-col>
|
|
|
- </a-row>
|
|
|
- </a-form>
|
|
|
- </div>
|
|
|
- <!-- 查询区域-END -->
|
|
|
+ <a-card :bordered="false">
|
|
|
+ <!-- 查询区域 -->
|
|
|
+ <div class="table-page-search-wrapper">
|
|
|
+ <a-form layout="inline" @keyup.enter.native="searchQuery">
|
|
|
+ <a-row :gutter="24">
|
|
|
+ </a-row>
|
|
|
+ </a-form>
|
|
|
+ </div>
|
|
|
+ <!-- 查询区域-END -->
|
|
|
|
|
|
- <!-- 操作按钮区域 -->
|
|
|
- <div class="table-operator">
|
|
|
- <a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
|
|
|
- </div>
|
|
|
+ <!-- 操作按钮区域 -->
|
|
|
+ <div class="table-operator">
|
|
|
+ <a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
|
|
|
+ <a-button type="primary" icon="download" @click="handleExportXls('协议单位')">导出</a-button>
|
|
|
+ <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">
|
|
|
+ <a-button type="primary" icon="import">导入</a-button>
|
|
|
+ </a-upload>
|
|
|
+ <!-- 高级查询区域 -->
|
|
|
+ <j-super-query :fieldList="superFieldList" ref="superQueryModal" @handleSuperQuery="handleSuperQuery"></j-super-query>
|
|
|
+ <a-dropdown v-if="selectedRowKeys.length > 0">
|
|
|
+ <a-menu slot="overlay">
|
|
|
+ <a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>删除</a-menu-item>
|
|
|
+ </a-menu>
|
|
|
+ <a-button style="margin-left: 8px"> 批量操作 <a-icon type="down" /></a-button>
|
|
|
+ </a-dropdown>
|
|
|
+ </div>
|
|
|
|
|
|
- <!-- table区域-begin -->
|
|
|
- <div>
|
|
|
- <div class="ant-alert ant-alert-info" style="margin-bottom: 16px">
|
|
|
- <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择
|
|
|
- <a style="font-weight: 600">{{ selectedRowKeys.length }}</a
|
|
|
- >项
|
|
|
- <a style="margin-left: 24px" @click="onClearSelected">清空</a>
|
|
|
- </div>
|
|
|
+ <!-- table区域-begin -->
|
|
|
+ <div>
|
|
|
+ <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
|
|
|
+ <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>项
|
|
|
+ <a style="margin-left: 24px" @click="onClearSelected">清空</a>
|
|
|
+ </div>
|
|
|
|
|
|
- <a-table
|
|
|
- ref="table"
|
|
|
- size="middle"
|
|
|
- :scroll="{ x: true }"
|
|
|
- bordered
|
|
|
- rowKey="id"
|
|
|
- :columns="columns"
|
|
|
- :dataSource="dataSource"
|
|
|
- :pagination="ipagination"
|
|
|
- :loading="loading"
|
|
|
- :rowSelection="{
|
|
|
- selectedRowKeys: selectedRowKeys,
|
|
|
- onChange: onSelectChange,
|
|
|
- }"
|
|
|
- class="j-table-force-nowrap"
|
|
|
- @change="handleTableChange"
|
|
|
- >
|
|
|
- <template slot="htmlSlot" slot-scope="text">
|
|
|
- <div v-html="text"></div>
|
|
|
- </template>
|
|
|
- <template slot="imgSlot" slot-scope="text, record">
|
|
|
- <span v-if="!text" style="font-size: 12px; font-style: italic"
|
|
|
- >无图片</span
|
|
|
- >
|
|
|
- <img
|
|
|
- v-else
|
|
|
- :src="getImgView(text)"
|
|
|
- :preview="record.id"
|
|
|
- height="25px"
|
|
|
- alt=""
|
|
|
- style="max-width: 80px; font-size: 12px; font-style: italic"
|
|
|
- />
|
|
|
- </template>
|
|
|
- <template slot="customerType" slot-scope="text">
|
|
|
- {{ getText(text) }}
|
|
|
- </template>
|
|
|
+ <a-table
|
|
|
+ ref="table"
|
|
|
+ size="middle"
|
|
|
+ :scroll="{x:true}"
|
|
|
+ bordered
|
|
|
+ rowKey="id"
|
|
|
+ :columns="columns"
|
|
|
+ :dataSource="dataSource"
|
|
|
+ :pagination="ipagination"
|
|
|
+ :loading="loading"
|
|
|
+ :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
|
|
|
+ class="j-table-force-nowrap"
|
|
|
+ @change="handleTableChange">
|
|
|
|
|
|
- <span slot="action" slot-scope="text, record">
|
|
|
+ <template slot="htmlSlot" slot-scope="text">
|
|
|
+ <div v-html="text"></div>
|
|
|
+ </template>
|
|
|
+ <template slot="imgSlot" slot-scope="text,record">
|
|
|
+ <span v-if="!text" style="font-size: 12px;font-style: italic;">无图片</span>
|
|
|
+ <img v-else :src="getImgView(text)" :preview="record.id" height="25px" alt="" style="max-width:80px;font-size: 12px;font-style: italic;"/>
|
|
|
+ </template>
|
|
|
+ <template slot="fileSlot" slot-scope="text">
|
|
|
+ <span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span>
|
|
|
+ <a-button
|
|
|
+ v-else
|
|
|
+ :ghost="true"
|
|
|
+ type="primary"
|
|
|
+ icon="download"
|
|
|
+ size="small"
|
|
|
+ @click="downloadFile(text)">
|
|
|
+ 下载
|
|
|
+ </a-button>
|
|
|
+ </template>
|
|
|
+
|
|
|
+ <span slot="action" slot-scope="text, record">
|
|
|
<a @click="handleEdit(record)">编辑</a>
|
|
|
|
|
|
<a-divider type="vertical" />
|
|
|
@@ -122,160 +78,175 @@
|
|
|
<a @click="handleDetail(record)">详情</a>
|
|
|
</a-menu-item>
|
|
|
<a-menu-item>
|
|
|
- <a-popconfirm
|
|
|
- title="确定删除吗?"
|
|
|
- @confirm="() => handleDelete(record.id)"
|
|
|
- >
|
|
|
+ <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
|
|
|
<a>删除</a>
|
|
|
</a-popconfirm>
|
|
|
</a-menu-item>
|
|
|
</a-menu>
|
|
|
</a-dropdown>
|
|
|
</span>
|
|
|
- </a-table>
|
|
|
- </div>
|
|
|
|
|
|
- <bus-agreement-unit-modal
|
|
|
- ref="modalForm"
|
|
|
- @ok="modalFormOk"
|
|
|
- ></bus-agreement-unit-modal>
|
|
|
- </a-card>
|
|
|
+ </a-table>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <agreement-unit-modal ref="modalForm" @ok="modalFormOk"></agreement-unit-modal>
|
|
|
+ </a-card>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import "@/assets/less/TableExpand.less";
|
|
|
-import { mixinDevice } from "@/utils/mixin";
|
|
|
-import { JeecgListMixin } from "@/mixins/JeecgListMixin";
|
|
|
-import BusAgreementUnitModal from "./modules/agreementunit/BusAgreementUnitModal";
|
|
|
-import { httpAction, getAction, postAction } from "@/api/manage";
|
|
|
-export default {
|
|
|
- name: "BusAgreementUnitList",
|
|
|
- mixins: [JeecgListMixin, mixinDevice],
|
|
|
- components: {
|
|
|
- BusAgreementUnitModal,
|
|
|
- },
|
|
|
- data() {
|
|
|
- return {
|
|
|
- description: "bus_agreement_unit管理页面",
|
|
|
- // 表头
|
|
|
- columns: [
|
|
|
- {
|
|
|
- title: "商家",
|
|
|
- align: "center",
|
|
|
- dataIndex: "hotelName",
|
|
|
- },
|
|
|
- {
|
|
|
- title: "客户全称",
|
|
|
- align: "center",
|
|
|
- dataIndex: "name",
|
|
|
- },
|
|
|
- {
|
|
|
- title: "手机号",
|
|
|
- align: "center",
|
|
|
- dataIndex: "mobile",
|
|
|
- },
|
|
|
- {
|
|
|
- title: "主联系人",
|
|
|
- align: "center",
|
|
|
- dataIndex: "contactName",
|
|
|
+
|
|
|
+ import '@/assets/less/TableExpand.less'
|
|
|
+ import { mixinDevice } from '@/utils/mixin'
|
|
|
+ import { JeecgListMixin } from '@/mixins/JeecgListMixin'
|
|
|
+ import agreementUnitModal from './modules/agreementUnit/agreementUnitModal'
|
|
|
+
|
|
|
+ export default {
|
|
|
+ name: 'agreementunit',
|
|
|
+ mixins:[JeecgListMixin, mixinDevice],
|
|
|
+ components: {
|
|
|
+ agreementUnitModal
|
|
|
},
|
|
|
- {
|
|
|
- title: "客户类型",
|
|
|
- align: "center",
|
|
|
- dataIndex: "customerType",
|
|
|
- scopedSlots: { customRender: "customerType" },
|
|
|
+ data () {
|
|
|
+ return {
|
|
|
+ description: '协议单位管理页面',
|
|
|
+ // 表头
|
|
|
+ columns: [
|
|
|
+ {
|
|
|
+ title:'商家名称',
|
|
|
+ align:"center",
|
|
|
+ dataIndex: 'hotelName'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title:'账号',
|
|
|
+ align:"center",
|
|
|
+ dataIndex: 'accountNo'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title:'客户名称',
|
|
|
+ align:"center",
|
|
|
+ dataIndex: 'customerName'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title:'客户类型',
|
|
|
+ align:"center",
|
|
|
+ dataIndex: 'customerType_dictText'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title:'客户状态',
|
|
|
+ align:"center",
|
|
|
+ dataIndex: 'status_dictText'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title:'记账额度',
|
|
|
+ align:"center",
|
|
|
+ dataIndex: 'bookkeeping'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title:'已用额度',
|
|
|
+ align:"center",
|
|
|
+ dataIndex: 'amountUsed'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title:'剩余额度',
|
|
|
+ align:"center",
|
|
|
+ dataIndex: 'balance'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title:'备注',
|
|
|
+ align:"center",
|
|
|
+ dataIndex: 'remark'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title:'账号状态',
|
|
|
+ align:"center",
|
|
|
+ dataIndex: 'accountStatus_dictText'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title:'审核状态',
|
|
|
+ align:"center",
|
|
|
+ dataIndex: 'checkStatus_dictText'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title:'审核时间',
|
|
|
+ align:"center",
|
|
|
+ dataIndex: 'checkTime',
|
|
|
+ customRender:function (text) {
|
|
|
+ return !text?"":(text.length>10?text.substr(0,10):text)
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '操作',
|
|
|
+ dataIndex: 'action',
|
|
|
+ align:"center",
|
|
|
+ fixed:"right",
|
|
|
+ width:147,
|
|
|
+ scopedSlots: { customRender: 'action' }
|
|
|
+ }
|
|
|
+ ],
|
|
|
+ url: {
|
|
|
+ list: "/business/busMarketAgreementUnit/list",
|
|
|
+ delete: "/business/busMarketAgreementUnit/delete",
|
|
|
+ deleteBatch: "/business/busMarketAgreementUnit/deleteBatch",
|
|
|
+ exportXlsUrl: "/business/busMarketAgreementUnit/exportXls",
|
|
|
+ importExcelUrl: "business/busMarketAgreementUnit/importExcel",
|
|
|
+
|
|
|
+ },
|
|
|
+ dictOptions:{},
|
|
|
+ superFieldList:[],
|
|
|
+ }
|
|
|
},
|
|
|
- {
|
|
|
- title: "状态",
|
|
|
- align: "center",
|
|
|
- dataIndex: "status",
|
|
|
- customRender: function (text) {
|
|
|
- return text == 1 ? "正常" : "停用";
|
|
|
- },
|
|
|
+ created() {
|
|
|
+ this.getSuperFieldList();
|
|
|
},
|
|
|
- {
|
|
|
- title: "操作",
|
|
|
- dataIndex: "action",
|
|
|
- align: "center",
|
|
|
- fixed: "right",
|
|
|
- width: 147,
|
|
|
- scopedSlots: { customRender: "action" },
|
|
|
+ computed: {
|
|
|
+ importExcelUrl: function(){
|
|
|
+ return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
|
|
|
+ },
|
|
|
},
|
|
|
- ],
|
|
|
- url: {
|
|
|
- list: "/business/busAgreementUnit/list",
|
|
|
- delete: "/business/busAgreementUnit/delete",
|
|
|
- deleteBatch: "/business/busAgreementUnit/deleteBatch",
|
|
|
- exportXlsUrl: "/business/busAgreementUnit/exportXls",
|
|
|
- importExcelUrl: "business/busAgreementUnit/importExcel",
|
|
|
- },
|
|
|
- dictOptions: {},
|
|
|
- superFieldList: [],
|
|
|
- customerSourceList: [],
|
|
|
- };
|
|
|
- },
|
|
|
- created() {
|
|
|
- var _info = JSON.parse(localStorage.getItem("storeInfo"));
|
|
|
-
|
|
|
- getAction("/business/busDictItem/list", {
|
|
|
- hotelId: _info.id,
|
|
|
- dictId: "1639538553774624769",
|
|
|
- }).then((res) => {
|
|
|
- if (res.success) {
|
|
|
- this.customerSourceList = res.result.records;
|
|
|
- }
|
|
|
- });
|
|
|
- },
|
|
|
- computed: {
|
|
|
- importExcelUrl: function () {
|
|
|
- return `${window._CONFIG["domianURL"]}/${this.url.importExcelUrl}`;
|
|
|
- },
|
|
|
- },
|
|
|
- methods: {
|
|
|
- getText(text) {
|
|
|
- var find = this.customerSourceList.find((t) => t.id == text);
|
|
|
- return find ? find.itemText : "";
|
|
|
- },
|
|
|
- initDictConfig() {},
|
|
|
- getSuperFieldList() {
|
|
|
- let fieldList = [];
|
|
|
- fieldList.push({ type: "string", value: "tenantId", text: "关联租户" });
|
|
|
- fieldList.push({ type: "string", value: "hotelId", text: "关联酒店" });
|
|
|
- fieldList.push({ type: "string", value: "name", text: "客户全称" });
|
|
|
- fieldList.push({ type: "string", value: "mobile", text: "手机号" });
|
|
|
- fieldList.push({
|
|
|
- type: "string",
|
|
|
- value: "systemType",
|
|
|
- text: "系统类型字典id",
|
|
|
- });
|
|
|
- fieldList.push({
|
|
|
- type: "string",
|
|
|
- value: "contactName",
|
|
|
- text: "主联系人",
|
|
|
- });
|
|
|
- fieldList.push({
|
|
|
- type: "string",
|
|
|
- value: "customerType",
|
|
|
- text: "客户类型",
|
|
|
- });
|
|
|
- fieldList.push({ type: "string", value: "staffId", text: "销售员" });
|
|
|
- fieldList.push({ type: "string", value: "address", text: "地址" });
|
|
|
- fieldList.push({
|
|
|
- type: "string",
|
|
|
- value: "customerSource",
|
|
|
- text: "客户来源",
|
|
|
- });
|
|
|
- fieldList.push({
|
|
|
- type: "string",
|
|
|
- value: "customerTrade",
|
|
|
- text: "客户行业",
|
|
|
- });
|
|
|
- fieldList.push({ type: "int", value: "status", text: "状态" });
|
|
|
- this.superFieldList = fieldList;
|
|
|
- },
|
|
|
- },
|
|
|
-};
|
|
|
+ methods: {
|
|
|
+ initDictConfig(){
|
|
|
+ },
|
|
|
+ getSuperFieldList(){
|
|
|
+ let fieldList=[];
|
|
|
+ fieldList.push({type:'string',value:'tenantId',text:'关联租户'})
|
|
|
+ fieldList.push({type:'string',value:'hotelId',text:'关联酒店'})
|
|
|
+ fieldList.push({type:'string',value:'customerName',text:'客户全称'})
|
|
|
+ fieldList.push({type:'string',value:'customerShortName',text:'客户简称'})
|
|
|
+ fieldList.push({type:'string',value:'customerNo',text:'客户编号'})
|
|
|
+ fieldList.push({type:'string',value:'contactsName',text:'联系人'})
|
|
|
+ fieldList.push({type:'string',value:'systemType',text:'系统类型'})
|
|
|
+ fieldList.push({type:'string',value:'customerType',text:'客户类型'})
|
|
|
+ fieldList.push({type:'string',value:'sellerId',text:'销售人员'})
|
|
|
+ fieldList.push({type:'string',value:'phone',text:'手机号'})
|
|
|
+ fieldList.push({type:'string',value:'status',text:'客户状态'})
|
|
|
+ fieldList.push({type:'string',value:'region',text:'地区'})
|
|
|
+ fieldList.push({type:'string',value:'postalCode',text:'邮编'})
|
|
|
+ fieldList.push({type:'string',value:'address',text:'地址'})
|
|
|
+ fieldList.push({type:'string',value:'companyPhone',text:'公司电话'})
|
|
|
+ fieldList.push({type:'string',value:'fax',text:'传真'})
|
|
|
+ fieldList.push({type:'string',value:'customerSource',text:'客户来源'})
|
|
|
+ fieldList.push({type:'string',value:'homepage',text:'主页'})
|
|
|
+ fieldList.push({type:'string',value:'email',text:'邮箱'})
|
|
|
+ fieldList.push({type:'string',value:'customerIndustry',text:'客户行业'})
|
|
|
+ fieldList.push({type:'int',value:'checkStatus',text:'审核状态'})
|
|
|
+ fieldList.push({type:'date',value:'checkTime',text:'审核时间'})
|
|
|
+ fieldList.push({type:'string',value:'checkBy',text:'审核人'})
|
|
|
+ fieldList.push({type:'string',value:'checkRemarks',text:'审核备注'})
|
|
|
+ fieldList.push({type:'string',value:'accountNo',text:'账户编号'})
|
|
|
+ fieldList.push({type:'int',value:'accountStatus',text:'账户状态'})
|
|
|
+ fieldList.push({type:'number',value:'amountUsed',text:'已用额度'})
|
|
|
+ fieldList.push({type:'number',value:'balance',text:'余额'})
|
|
|
+ fieldList.push({type:'number',value:'bookkeeping',text:'记账限额'})
|
|
|
+ fieldList.push({type:'int',value:'bookkStatus',text:'不允许该单位记账'})
|
|
|
+ fieldList.push({type:'int',value:'commission',text:'前台是否查询'})
|
|
|
+ fieldList.push({type:'int',value:'reception',text:'是否返佣'})
|
|
|
+ fieldList.push({type:'string',value:'remark',text:'备注'})
|
|
|
+ fieldList.push({type:'int',value:'delFlag',text:'删除状态'})
|
|
|
+ this.superFieldList = fieldList
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
</script>
|
|
|
<style scoped>
|
|
|
-@import "~@assets/less/common.less";
|
|
|
-</style>
|
|
|
+ @import '~@assets/less/common.less';
|
|
|
+</style>
|