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