index.vue 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718
  1. <template>
  2. <div class="app-container">
  3. <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
  4. <el-form-item label="公司名" prop="companyId">
  5. <el-select filterable v-model="queryParams.companyId" placeholder="请选择公司名" clearable size="small">
  6. <el-option
  7. v-for="item in companys"
  8. :key="item.companyId"
  9. :label="item.companyName"
  10. :value="item.companyId"
  11. />
  12. </el-select>
  13. </el-form-item>
  14. <el-form-item label="客户编码" prop="customerCode">
  15. <el-input
  16. v-model="queryParams.customerCode"
  17. placeholder="请输入客户编码"
  18. clearable
  19. size="small"
  20. @keyup.enter.native="handleQuery"
  21. />
  22. </el-form-item>
  23. <el-form-item label="客户名称" prop="customerName">
  24. <el-input
  25. v-model="queryParams.customerName"
  26. placeholder="请输入客户名称"
  27. clearable
  28. size="small"
  29. @keyup.enter.native="handleQuery"
  30. />
  31. </el-form-item>
  32. <el-form-item label="手机" prop="mobile">
  33. <el-input
  34. v-model="queryParams.mobile"
  35. placeholder="请输入手机"
  36. clearable
  37. size="small"
  38. @keyup.enter.native="handleQuery"
  39. />
  40. </el-form-item>
  41. <el-form-item label="客户状态" prop="status">
  42. <el-select v-model="queryParams.status" placeholder="请选择客户状态" clearable size="small">
  43. <el-option
  44. v-for="item in statusOptions"
  45. :key="item.dictValue"
  46. :label="item.dictLabel"
  47. :value="item.dictValue"
  48. />
  49. </el-select>
  50. </el-form-item>
  51. <el-form-item label="客户类型" prop="customerType">
  52. <el-select multiple v-model="ctsTypeArr" placeholder="请选择客户类型" clearable size="small">
  53. <el-option
  54. v-for="item in typeOptions"
  55. :key="item.dictValue"
  56. :label="item.dictLabel"
  57. :value="item.dictValue"
  58. />
  59. </el-select>
  60. </el-form-item>
  61. <el-form-item label="创建时间" prop="createTime">
  62. <el-date-picker clearable size="small" style="width: 205.4px"
  63. v-model="dateRange"
  64. type="daterange"
  65. value-format="yyyy-MM-dd"
  66. start-placeholder="开始日期" end-placeholder="结束日期"
  67. >
  68. </el-date-picker>
  69. </el-form-item>
  70. <el-form-item label="客户来源" prop="source">
  71. <el-select multiple v-model="sourceArr" placeholder="请选择客户来源" clearable size="small">
  72. <el-option
  73. v-for="item in sourceOptions"
  74. :key="item.dictValue"
  75. :label="item.dictLabel"
  76. :value="item.dictValue"
  77. />
  78. </el-select>
  79. </el-form-item>
  80. <el-form-item label="客户标签" prop="tags">
  81. <el-select multiple v-model="tagIds" placeholder="请选择客户标签" clearable size="small">
  82. <el-option
  83. v-for="item in tagsOptions"
  84. :key="item.dictValue"
  85. :label="item.dictLabel"
  86. :value="item.dictValue"
  87. />
  88. </el-select>
  89. </el-form-item>
  90. <el-form-item>
  91. <el-button type="cyan" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
  92. <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
  93. </el-form-item>
  94. </el-form>
  95. <el-row :gutter="10" class="mb8">
  96. <el-col :span="1.5">
  97. <el-button
  98. type="success"
  99. icon="el-icon-edit"
  100. size="mini"
  101. :disabled="multiple"
  102. @click="handleEditSource"
  103. v-hasPermi="['crm:customer:editSource']"
  104. >修改客户来源</el-button>
  105. </el-col>
  106. <el-col :span="1.5">
  107. <el-button
  108. type="success"
  109. icon="el-icon-edit"
  110. size="mini"
  111. :disabled="single"
  112. @click="handleUpdate"
  113. v-hasPermi="['crm:customer:edit']"
  114. >修改</el-button>
  115. </el-col>
  116. <el-col :span="1.5">
  117. <el-button
  118. type="danger"
  119. icon="el-icon-delete"
  120. size="mini"
  121. :disabled="multiple"
  122. @click="handleDelete"
  123. v-hasPermi="['crm:customer:remove']"
  124. >删除</el-button>
  125. </el-col>
  126. <el-col :span="1.5">
  127. <el-button
  128. type="warning"
  129. icon="el-icon-download"
  130. size="mini"
  131. @click="handleExport"
  132. v-hasPermi="['crm:customer:export']"
  133. >导出</el-button>
  134. </el-col>
  135. <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
  136. </el-row>
  137. <el-table height="500" border v-loading="loading" :data="customerList" @selection-change="handleSelectionChange">
  138. <el-table-column type="selection" width="55" align="center" />
  139. <el-table-column label="ID" align="center" prop="customerId" />
  140. <el-table-column label="所属公司" align="center" prop="companyName" />
  141. <el-table-column label="客户编码" align="center" prop="customerCode" />
  142. <el-table-column label="客户名称" align="center" prop="customerName" />
  143. <el-table-column label="手机" align="center" prop="mobile" />
  144. <el-table-column label="性别" align="center" prop="sex">
  145. <template slot-scope="scope">
  146. <el-tag prop="status" v-for="(item, index) in sexOptions" v-if="scope.row.sex==item.dictValue">{{item.dictLabel}}</el-tag>
  147. </template>
  148. </el-table-column>
  149. <el-table-column label="微信号" align="center" prop="weixin" />
  150. <el-table-column label="所在地" align="center" prop="address" />
  151. <el-table-column label="标签" align="center" prop="tags" />
  152. <el-table-column label="客户来源" align="center" prop="source">
  153. <template slot-scope="scope">
  154. <el-tag prop="status" v-for="(item, index) in sourceOptions" v-if="scope.row.source==item.dictValue">{{item.dictLabel}}</el-tag>
  155. </template>
  156. </el-table-column>
  157. <el-table-column label="客户类型" align="center" prop="customerType">
  158. <template slot-scope="scope">
  159. <el-tag prop="status" v-for="(item, index) in typeOptions" v-if="scope.row.customerType==item.dictValue">{{item.dictLabel}}</el-tag>
  160. </template>
  161. </el-table-column>
  162. <el-table-column label="客户状态" align="center" prop="status">
  163. <template slot-scope="scope">
  164. <el-tag prop="status" v-for="(item, index) in statusOptions" v-if="scope.row.status==item.dictValue">{{item.dictLabel}}</el-tag>
  165. </template>
  166. </el-table-column>
  167. <el-table-column label="认领人" align="center" prop="companyUserNickName" />
  168. <el-table-column label="创建时间" align="center" prop="createTime" />
  169. <el-table-column label="最后一次跟进时间" align="center" prop="receiveTime" width="180">
  170. </el-table-column>
  171. <el-table-column label="入公海时间" align="center" prop="poolTime" width="180">
  172. </el-table-column>
  173. <el-table-column label="操作" fixed="right" width="180px" align="center" class-name="small-padding fixed-width">
  174. <template slot-scope="scope">
  175. <el-button
  176. size="mini"
  177. type="text"
  178. icon="el-icon-edit"
  179. @click="handleUpdate(scope.row)"
  180. v-hasPermi="['crm:customer:edit']"
  181. >修改</el-button>
  182. <el-button
  183. size="mini"
  184. type="text"
  185. @click="handleShow(scope.row)"
  186. v-hasPermi="['crm:customer:query']"
  187. >查看</el-button>
  188. <el-button
  189. size="mini"
  190. type="text"
  191. icon="el-icon-delete"
  192. @click="handleDelete(scope.row)"
  193. v-hasPermi="['crm:customer:remove']"
  194. >删除</el-button>
  195. </template>
  196. </el-table-column>
  197. </el-table>
  198. <pagination
  199. v-show="total>0"
  200. :total="total"
  201. :page.sync="queryParams.pageNum"
  202. :limit.sync="queryParams.pageSize"
  203. @pagination="getList"
  204. />
  205. <!-- 添加或修改客户对话框 -->
  206. <el-dialog :title="title" :visible.sync="open" width="600px" append-to-body>
  207. <el-form ref="form" :model="form" :rules="rules" label-width="80px">
  208. <el-form-item label="客户编码" prop="customerCode">
  209. <el-input v-model="form.customerCode" :disabled="form.customerId!=null" placeholder="请输入客户编码" />
  210. </el-form-item>
  211. <el-form-item label="客户名称" prop="customerName">
  212. <el-input v-model="form.customerName" placeholder="请输入客户名称" />
  213. </el-form-item>
  214. <el-form-item label="手机" prop="mobile">
  215. <el-input maxlength="11" v-model="form.mobile" placeholder="请输入手机" />
  216. </el-form-item>
  217. <el-form-item label="性别" prop="sex">
  218. <el-radio-group v-model="form.sex">
  219. <el-radio :label="item.dictValue" v-for="item in sexOptions" >{{item.dictLabel}}</el-radio>
  220. </el-radio-group>
  221. </el-form-item>
  222. <el-form-item label="微信号" prop="weixin">
  223. <el-input v-model="form.weixin" placeholder="请输入性别" />
  224. </el-form-item>
  225. <el-form-item label="所在地区" prop="address">
  226. <el-cascader
  227. ref="citySelect"
  228. v-model="cityIds"
  229. :options="citys"
  230. @change="handleCityChange"></el-cascader>
  231. </el-form-item>
  232. <el-form-item label="详细地址" prop="detailAddress">
  233. <el-input v-model="form.detailAddress" placeholder="请输入详细地址" />
  234. </el-form-item>
  235. <el-form-item label="客户来源" prop="source">
  236. <el-select v-model="form.source" placeholder="请选择客户来源" clearable size="small">
  237. <el-option
  238. v-for="item in sourceOptions"
  239. :key="item.dictValue"
  240. :label="item.dictLabel"
  241. :value="item.dictValue"
  242. />
  243. </el-select>
  244. </el-form-item>
  245. <el-form-item label="客户类型" prop="customerType">
  246. <el-select v-model="form.customerType" placeholder="请选择客户类型" clearable size="small">
  247. <el-option
  248. v-for="item in typeOptions"
  249. :key="item.dictValue"
  250. :label="item.dictLabel"
  251. :value="item.dictValue"
  252. />
  253. </el-select>
  254. </el-form-item>
  255. <el-form-item label="客户状态">
  256. <el-radio-group v-model="form.status">
  257. <el-radio :label="item.dictValue" v-for="item in statusOptions">{{item.dictLabel}}</el-radio>
  258. </el-radio-group>
  259. </el-form-item>
  260. <el-form-item label="标签" prop="tags">
  261. <el-tag
  262. :key="tag"
  263. v-for="tag in tags"
  264. closable
  265. :disable-transitions="false"
  266. @close="handleClose(tag)">
  267. {{tag}}
  268. </el-tag>
  269. <el-input
  270. class="input-new-tag"
  271. v-if="inputVisible"
  272. v-model="inputValue"
  273. ref="saveTagInput"
  274. size="small"
  275. @keyup.enter.native="handleInputConfirm"
  276. @blur="handleInputConfirm"
  277. >
  278. </el-input>
  279. <el-button v-else class="button-new-tag" size="small" @click="showInput">添加标签+</el-button>
  280. <el-select @change="tagsChange" v-model="tagId" placeholder="选择客户来源" style="width:140px;margin-left: 5px;" clearable size="small">
  281. <el-option
  282. v-for="item in tagsOptions"
  283. :key="item.dictValue"
  284. :label="item.dictLabel"
  285. :value="item.dictValue"
  286. />
  287. </el-select>
  288. </el-form-item>
  289. <el-form-item label="备注" prop="remark">
  290. <el-input :rows="2" v-model="form.remark" type="textarea" placeholder="请输入内容" />
  291. </el-form-item>
  292. </el-form>
  293. <div slot="footer" class="dialog-footer">
  294. <el-button type="primary" @click="submitForm">确 定</el-button>
  295. <el-button @click="cancel">取 消</el-button>
  296. </div>
  297. </el-dialog>
  298. <el-drawer
  299. size="75%"
  300. :title="show.title" :visible.sync="show.open">
  301. <customer-details ref="customerDetails" />
  302. </el-drawer>
  303. <el-dialog :title="source.title" :visible.sync="source.open" width="600px" append-to-body>
  304. <edit-customer-source ref="editSource" @close="closeSource"></edit-customer-source>
  305. </el-dialog>
  306. </div>
  307. </template>
  308. <script>
  309. import { listCustomer,getCustomer,addCustomer,updateCustomer,delCustomer,exportCustomer } from "@/api/crm/customer";
  310. import { getCompanyList } from "@/api/company/company";
  311. import customerDetails from '../components/customerDetails.vue';
  312. import editCustomerSource from '../components/editCustomerSource.vue';
  313. import {getCitys} from "@/api/store/city";
  314. import { throwStatement } from "@babel/types";
  315. export default {
  316. name: "Customer",
  317. components: { customerDetails,editCustomerSource },
  318. data() {
  319. return {
  320. source:{
  321. title:"修改客户来源",
  322. open:false,
  323. },
  324. tagId:null,
  325. tagsOptions:[],
  326. ctsTypeArr:[],
  327. sourceArr:[],
  328. dateRange:[],
  329. cityIds:[],
  330. citys:[],
  331. tags:[],
  332. tagIds:[],
  333. inputVisible: false,
  334. inputValue: '',
  335. statusOptions:[],
  336. typeOptions:[],
  337. sourceOptions:[],
  338. sexOptions:[],
  339. show:{
  340. title:"客户详情",
  341. open:false,
  342. },
  343. companys:[],
  344. // 遮罩层
  345. loading: true,
  346. // 选中数组
  347. ids: [],
  348. // 非单个禁用
  349. single: true,
  350. // 非多个禁用
  351. multiple: true,
  352. // 显示搜索条件
  353. showSearch: true,
  354. // 总条数
  355. total: 0,
  356. // 客户表格数据
  357. customerList: [],
  358. // 弹出层标题
  359. title: "",
  360. // 是否显示弹出层
  361. open: false,
  362. // 查询参数
  363. queryParams: {
  364. pageNum: 1,
  365. pageSize: 10,
  366. customerCode: null,
  367. customerName: null,
  368. mobile: null,
  369. sex: null,
  370. weixin: null,
  371. userId: null,
  372. createUserId: null,
  373. receiveUserId: null,
  374. customerUserId: null,
  375. address: null,
  376. location: null,
  377. detailAddress: null,
  378. lng: null,
  379. lat: null,
  380. status: null,
  381. isReceive: null,
  382. deptId: null,
  383. isDel: null,
  384. customerType: null,
  385. receiveTime: null,
  386. poolTime: null,
  387. companyId: null,
  388. isLine: null,
  389. source: null,
  390. tags: null
  391. },
  392. // 表单参数
  393. form: {},
  394. // 表单校验
  395. rules: {
  396. // customerName: [
  397. // { required: true, message: "客户名称不能为空", trigger: "blur" }
  398. // ],
  399. mobile: [
  400. { required: true, message: "手机号不能为空", trigger: "blur" }
  401. ],
  402. // sex: [
  403. // { required: true, message: "性别不能为空", trigger: "blur" }
  404. // ],
  405. source: [
  406. { required: true, message: "客户来源不能为空", trigger: "blur" }
  407. ],
  408. }
  409. };
  410. },
  411. created() {
  412. this.getDicts("crm_customer_tag").then((response) => {
  413. this.tagsOptions = response.data;
  414. });
  415. this.getDicts("crm_customer_source").then((response) => {
  416. this.sourceOptions = response.data;
  417. });
  418. this.getDicts("common_sex").then((response) => {
  419. this.sexOptions = response.data;
  420. });
  421. this.getDicts("crm_customer_status").then((response) => {
  422. this.statusOptions = response.data;
  423. });
  424. this.getDicts("crm_customer_type").then((response) => {
  425. this.typeOptions = response.data;
  426. });
  427. getCompanyList().then(response => {
  428. this.companys = response.data;
  429. });
  430. this.getCitys();
  431. this.getList();
  432. },
  433. methods: {
  434. handleEditSource(){
  435. this.source.open=true;
  436. var that=this;
  437. setTimeout(() => {
  438. that.$refs.editSource.handleEdit(that.ids);
  439. }, 200);
  440. },
  441. closeSource(){
  442. this.source.open=false;
  443. this.getList();
  444. },
  445. handleClose(tag) {
  446. this.tags.splice(this.tags.indexOf(tag), 1);
  447. this.form.tags=this.tags.toString();
  448. },
  449. showInput() {
  450. this.inputVisible = true;
  451. this.$nextTick(_ => {
  452. this.$refs.saveTagInput.$refs.input.focus();
  453. });
  454. },
  455. handleInputConfirm() {
  456. let inputValue = this.inputValue;
  457. if (inputValue) {
  458. this.tags.push(inputValue);
  459. }
  460. this.inputVisible = false;
  461. this.inputValue = '';
  462. this.form.tags=this.tags.toString();
  463. },
  464. tagsChange(e){
  465. var item=this.tagsOptions.find(val => val.dictValue === e);
  466. console.log(item);
  467. this.tags.push(item.dictLabel);
  468. this.form.tags=this.tags.toString();
  469. },
  470. handleCityChange(value) {
  471. console.log(value);
  472. var nodes=this.$refs.citySelect.getCheckedNodes();
  473. this.form.address=nodes[0].pathLabels[0]+"-"+nodes[0].pathLabels[1]+"-"+nodes[0].pathLabels[2];
  474. this.form.cityIds=value.toString();
  475. },
  476. getCitys(){
  477. getCitys().then(res => {
  478. this.loading = false;
  479. this.citys=res.data;
  480. })
  481. },
  482. handleClose(tag) {
  483. this.tags.splice(this.tags.indexOf(tag), 1);
  484. this.form.tags=this.tags.toString();
  485. },
  486. showInput() {
  487. this.inputVisible = true;
  488. this.$nextTick(_ => {
  489. this.$refs.saveTagInput.$refs.input.focus();
  490. });
  491. },
  492. handleInputConfirm() {
  493. let inputValue = this.inputValue;
  494. if (inputValue) {
  495. this.tags.push(inputValue);
  496. }
  497. this.inputVisible = false;
  498. this.inputValue = '';
  499. this.form.tags=this.tags.toString();
  500. },
  501. handleShow(row){
  502. var that=this;
  503. that.show.open=true;
  504. setTimeout(() => {
  505. that.$refs.customerDetails.getDetails(row.customerId);
  506. }, 200);
  507. },
  508. /** 查询客户列表 */
  509. getList() {
  510. this.loading = true;
  511. if(this.ctsTypeArr.length>0){
  512. this.queryParams.customerType=this.ctsTypeArr.toString();
  513. }
  514. else{
  515. this.queryParams.customerType=null
  516. }
  517. if(this.sourceArr.length>0){
  518. this.queryParams.source=this.sourceArr.toString();
  519. }
  520. else{
  521. this.queryParams.source=null
  522. }
  523. if(this.tagIds.length>0){
  524. this.queryParams.tags=this.tagIds.toString();
  525. }
  526. else{
  527. this.queryParams.tags=null
  528. }
  529. listCustomer(this.addDateRange(this.queryParams, this.dateRange)).then(response => {
  530. this.customerList = response.rows;
  531. this.total = response.total;
  532. this.loading = false;
  533. });
  534. },
  535. // 取消按钮
  536. cancel() {
  537. this.open = false;
  538. this.reset();
  539. },
  540. // 表单重置
  541. reset() {
  542. this.form = {
  543. customerId: null,
  544. customerCode: null,
  545. customerName: null,
  546. mobile: null,
  547. sex: null,
  548. weixin: null,
  549. remark: null,
  550. userId: null,
  551. createUserId: null,
  552. receiveUserId: null,
  553. customerUserId: null,
  554. address: null,
  555. location: null,
  556. detailAddress: null,
  557. lng: null,
  558. lat: null,
  559. createTime: null,
  560. updateTime: null,
  561. status: "1",
  562. isReceive: null,
  563. deptId: null,
  564. isDel: null,
  565. customerType: null,
  566. receiveTime: null,
  567. poolTime: null,
  568. companyId: null,
  569. isLine: null,
  570. source: null,
  571. tags: null
  572. };
  573. this.tags=[];
  574. this.cityIds=[];
  575. this.resetForm("form");
  576. },
  577. /** 搜索按钮操作 */
  578. handleQuery() {
  579. this.queryParams.pageNum = 1;
  580. this.getList();
  581. },
  582. /** 重置按钮操作 */
  583. resetQuery() {
  584. this.resetForm("queryForm");
  585. this.handleQuery();
  586. },
  587. // 多选框选中数据
  588. handleSelectionChange(selection) {
  589. this.ids = selection.map(item => item.customerId)
  590. this.single = selection.length!==1
  591. this.multiple = !selection.length
  592. },
  593. /** 新增按钮操作 */
  594. handleAdd() {
  595. this.reset();
  596. this.open = true;
  597. this.title = "添加客户";
  598. },
  599. /** 修改按钮操作 */
  600. handleUpdate(row) {
  601. this.reset();
  602. const customerId = row.customerId || this.ids
  603. var that=this;
  604. getCustomer(customerId).then(response => {
  605. this.form = response.customer;
  606. if(this.form.status!=null){
  607. this.form.status = this.form.status.toString();
  608. }
  609. if(this.form.customerType!=null){
  610. this.form.customerType = this.form.customerType.toString();
  611. }
  612. if(this.form.sex!=null){
  613. this.form.sex = this.form.sex.toString();
  614. }
  615. if(this.form.source!=null){
  616. this.form.source = this.form.source.toString();
  617. }
  618. if(this.form.tags!=null){
  619. this.tags = this.form.tags.split(",")
  620. }
  621. if(this.form.cityIds!=null){
  622. var ids=this.form.cityIds.split(",");
  623. this.cityIds=[];
  624. ids.forEach(element => {
  625. var id=parseInt(element);
  626. that.cityIds.push(id)
  627. });
  628. }
  629. this.open = true;
  630. this.title = "修改客户";
  631. });
  632. },
  633. /** 提交按钮 */
  634. submitForm() {
  635. this.$refs["form"].validate(valid => {
  636. if (valid) {
  637. if (this.form.customerId != null) {
  638. updateCustomer(this.form).then(response => {
  639. if (response.code === 200) {
  640. this.msgSuccess("修改成功");
  641. this.open = false;
  642. this.getList();
  643. }
  644. });
  645. } else {
  646. addCustomer(this.form).then(response => {
  647. if (response.code === 200) {
  648. this.msgSuccess("新增成功");
  649. this.open = false;
  650. this.getList();
  651. }
  652. });
  653. }
  654. }
  655. });
  656. },
  657. /** 删除按钮操作 */
  658. handleDelete(row) {
  659. const customerIds = row.customerId || this.ids;
  660. this.$confirm('是否确认删除客户编号为"' + customerIds + '"的数据项?', "警告", {
  661. confirmButtonText: "确定",
  662. cancelButtonText: "取消",
  663. type: "warning"
  664. }).then(function() {
  665. return delCustomer(customerIds);
  666. }).then(() => {
  667. this.getList();
  668. this.msgSuccess("删除成功");
  669. }).catch(function() {});
  670. },
  671. /** 导出按钮操作 */
  672. handleExport() {
  673. //const queryParams = this.queryParams;
  674. const queryParams=this.addDateRange(this.queryParams, this.dateRange)
  675. this.$confirm('是否确认导出客户数据项?', "警告", {
  676. confirmButtonText: "确定",
  677. cancelButtonText: "取消",
  678. type: "warning"
  679. }).then(function() {
  680. return exportCustomer(queryParams);
  681. }).then(response => {
  682. this.download(response.msg);
  683. }).catch(function() {});
  684. }
  685. }
  686. };
  687. </script>
  688. <style>
  689. .el-tag + .el-tag {
  690. margin-left: 10px;
  691. }
  692. .button-new-tag {
  693. margin-left: 10px;
  694. height: 32px;
  695. line-height: 30px;
  696. padding-top: 0;
  697. padding-bottom: 0;
  698. }
  699. .input-new-tag {
  700. width: 90px;
  701. margin-left: 10px;
  702. vertical-align: bottom;
  703. }
  704. .el-dialog__wrapper{
  705. z-index: 100000;
  706. }
  707. </style>