|
@@ -0,0 +1,281 @@
|
|
|
|
|
+<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 -->
|
|
|
|
|
+
|
|
|
|
|
+ <!-- 操作按钮区域 -->
|
|
|
|
|
+ <div class="table-operator">
|
|
|
|
|
+ <a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
|
|
|
|
|
+ </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>
|
|
|
|
|
+
|
|
|
|
|
+ <span slot="action" slot-scope="text, record">
|
|
|
|
|
+ <a @click="handleEdit(record)">编辑</a>
|
|
|
|
|
+
|
|
|
|
|
+ <a-divider type="vertical" />
|
|
|
|
|
+ <a-dropdown>
|
|
|
|
|
+ <a class="ant-dropdown-link">更多 <a-icon type="down" /></a>
|
|
|
|
|
+ <a-menu slot="overlay">
|
|
|
|
|
+ <a-menu-item>
|
|
|
|
|
+ <a @click="handleDetail(record)">详情</a>
|
|
|
|
|
+ </a-menu-item>
|
|
|
|
|
+ <a-menu-item>
|
|
|
|
|
+ <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>
|
|
|
|
|
+</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",
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ title: "客户类型",
|
|
|
|
|
+ align: "center",
|
|
|
|
|
+ dataIndex: "customerType",
|
|
|
|
|
+ scopedSlots: { customRender: "customerType" },
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ title: "状态",
|
|
|
|
|
+ align: "center",
|
|
|
|
|
+ dataIndex: "status",
|
|
|
|
|
+ customRender: function (text) {
|
|
|
|
|
+ return text == 1 ? "正常" : "停用";
|
|
|
|
|
+ },
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ title: "操作",
|
|
|
|
|
+ dataIndex: "action",
|
|
|
|
|
+ align: "center",
|
|
|
|
|
+ fixed: "right",
|
|
|
|
|
+ width: 147,
|
|
|
|
|
+ scopedSlots: { customRender: "action" },
|
|
|
|
|
+ },
|
|
|
|
|
+ ],
|
|
|
|
|
+ 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;
|
|
|
|
|
+ },
|
|
|
|
|
+ },
|
|
|
|
|
+};
|
|
|
|
|
+</script>
|
|
|
|
|
+<style scoped>
|
|
|
|
|
+@import "~@assets/less/common.less";
|
|
|
|
|
+</style>
|