line.vue 24 KB

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