detail.js 27 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726
  1. const _Http = getApp().globalData.http,
  2. currency = require("../../utils/currency"),
  3. CNY = value => currency(value, {
  4. symbol: "¥",
  5. precision: 2
  6. }).format();
  7. Page({
  8. data: {
  9. loading: true,
  10. isLeader: false, //是否为负责人
  11. tabsActive: 1, //tabs 选中项
  12. sa_customersid: 0,
  13. modeList: [{
  14. name: '潜在',
  15. },
  16. {
  17. name: '合作中'
  18. },
  19. {
  20. name: '已终止'
  21. }
  22. ],
  23. changeMode: false
  24. },
  25. onLoad(options) {
  26. const appAuth = wx.getStorageSync('auth').wCustomer;
  27. let tabsList = [{
  28. label: "详细信息",
  29. icon: "icon-tabxiangxixinxi1"
  30. }, {
  31. label: "联系人",
  32. icon: "icon-tablianxiren",
  33. model: "#Contacts"
  34. }, {
  35. label: "客户地址",
  36. icon: "icon-tabdizhi",
  37. model: "#Address"
  38. }, {
  39. label: "开票信息",
  40. icon: "icon-tabbaojiadan",
  41. model: "#Financing"
  42. }, {
  43. label: "项目商机",
  44. icon: "icon-tabxiangmu",
  45. model: "#Project"
  46. }, {
  47. label: "报价单",
  48. icon: "icon-tabbaojiadan",
  49. model: "#Offers"
  50. }, {
  51. label: "合同",
  52. icon: "icon-tabhetong",
  53. model: "#Contract"
  54. }, {
  55. label: "账户余额",
  56. icon: "icon-tabkaipiaoxinxi",
  57. model: "#Account"
  58. }, {
  59. label: "银行卡信息",
  60. icon: "icon-tabchanpin",
  61. model: "#Bankcard"
  62. }, {
  63. label: "关联线索",
  64. icon: "icon-tabxiansuo",
  65. model: "#Clue"
  66. }];
  67. if (appAuth.isdatafollowup) tabsList.unshift({
  68. label: "跟进动态",
  69. icon: "icon-tabgenjinjilu",
  70. model: "#Trace"
  71. })
  72. if (appAuth.istask) tabsList.push({
  73. label: "任务",
  74. icon: "icon-tabrenwu",
  75. model: "#Work"
  76. })
  77. tabsList = tabsList.concat([{
  78. label: "附件",
  79. icon: "icon-tabfujian1",
  80. model: "#Files"
  81. }, {
  82. label: "操作",
  83. icon: "icon-tabcaozuojilu1",
  84. model: "#Record"
  85. }])
  86. this.setData({
  87. sa_customersid: options.id,
  88. isAdmin: appAuth.options.some(v => v == "admin"), //是否具有管理权限
  89. options: appAuth.options, //权限列表
  90. tabsList,
  91. appAuth
  92. })
  93. this.getDetail();
  94. getApp().globalData.Language.getLanguagePackage(this, '客户详情');
  95. },
  96. modeSelect(e) {
  97. let {
  98. sa_customersid,
  99. status
  100. } = this.data.detail,
  101. that = this;
  102. wx.showModal({
  103. title: getApp().globalData.Language.getMapText('提示'),
  104. content: getApp().globalData.Language.getMapText('是否确定将合作模式更改为') + `:“${e.detail.name}”`,
  105. cancelText: getApp().globalData.Language.getMapText('取消'),
  106. confirmText: getApp().globalData.Language.getMapText('确定'),
  107. complete: (res) => {
  108. if (res.cancel) that.modeCancel()
  109. if (res.confirm) _Http.basic({
  110. "id": 20221010164602,
  111. "content": {
  112. "sa_customersids": [sa_customersid],
  113. "status": e.detail.name
  114. }
  115. }).then(res => {
  116. console.log("更改合作状态", res)
  117. wx.showToast({
  118. title: res.code == '1' ? getApp().globalData.Language.getMapText('修改成功') : res.msg,
  119. icon: "none"
  120. })
  121. if (res.code == '1') that.getDetail()
  122. that.modeCancel()
  123. })
  124. }
  125. })
  126. },
  127. modeCancel() {
  128. this.setData({
  129. changeMode: false
  130. })
  131. },
  132. //详情按钮回调
  133. tabbarOnClick({
  134. detail
  135. }) {
  136. let data = this.data.detail,
  137. that = this;
  138. switch (detail.label) {
  139. case "更改合作状态":
  140. this.setData({
  141. changeMode: true
  142. })
  143. break;
  144. case "退回":
  145. wx.showModal({
  146. title: getApp().globalData.Language.getMapText('提示'),
  147. content: getApp().globalData.Language.getMapText('是否确定将') + `${data.enterprisename}` + getApp().globalData.Language.getMapText('退回到公海客户'),
  148. cancelText: getApp().globalData.Language.getMapText('取消'),
  149. confirmText: getApp().globalData.Language.getMapText('确定'),
  150. complete: (res) => {
  151. console.log(data)
  152. if (res.confirm) _Http.basic({
  153. "id": 20221014102602,
  154. "content": {
  155. "sa_customerpoolid": data.sa_customerpoolid_source,
  156. "sa_customersid": data.sa_customersid
  157. }
  158. }).then(res => {
  159. console.log("公海线索退回", res)
  160. wx.showToast({
  161. title: res.code == '1' ? getApp().globalData.Language.getMapText('退回成功') : res.msg,
  162. icon: "none"
  163. });
  164. if (res.code == '1') setTimeout(() => {
  165. let page = getCurrentPages().find(v => v.__route__ == 'packageA/setclient/index');
  166. if (page) page.setData({
  167. list: page.data.list.filter(v => v.sa_customersid != data.sa_customersid)
  168. });
  169. wx.redirectTo({
  170. url: '/packageA/publicCustomer/detail?id' + data.sa_customersid,
  171. })
  172. }, 300)
  173. })
  174. }
  175. });
  176. break;
  177. case "回收":
  178. wx.navigateTo({
  179. url: `/packageA/publicCustomer/pond/index?params=${JSON.stringify({
  180. "id": 20221206195102,
  181.                 "content": {
  182. nocache:true,
  183.                     "where": {
  184.                         "condition": ""
  185.                     }
  186.                 }
  187. })}`,
  188. })
  189. getApp().globalData.handleSelect = this.handleTransfer.bind(this);
  190. break;
  191. case "跟进":
  192. this.selectComponent("#Trace").insetr();
  193. break;
  194. case "编辑":
  195. data.parentid = data.superiorenterprisename ? [data.superiorenterprisename, [data.parentid]] : "";
  196. wx.navigateTo({
  197. url: `/packageA/setclient/addAndEditor?data=${JSON.stringify(data)}`,
  198. })
  199. break;
  200. case "作废":
  201. wx.navigateTo({
  202. url: `/packageA/setclient/delete?item=${JSON.stringify({
  203. "sa_customersids": [this.data.detail.sa_customersid],
  204. datastatus: 1, //(0:正常;1:作废;2:锁定)
  205. })}`,
  206. })
  207. break;
  208. case "暂缓":
  209. wx.showModal({
  210. title: getApp().globalData.Language.getMapText('提示'),
  211. content: getApp().globalData.Language.getMapText('暂缓的客户将不计入客户相关数据统计,是否确定暂缓该客户?'),
  212. cancelText: getApp().globalData.Language.getMapText('取消'),
  213. confirmText: that.data.language['确定'] || '确定暂缓',
  214. complete: (res) => {
  215. console.log(data)
  216. if (res.confirm) _Http.basic({
  217. "id": 20221010164602,
  218. "content": {
  219. "sa_customersids": [data.sa_customersid],
  220. "status": '暂缓'
  221. }
  222. }).then(res => {
  223. console.log("客户暂缓", res)
  224. getApp().globalData.Language.showToast(res.code == '1' ? "已将客户暂缓" : res.msg)
  225. that.getDetail();
  226. })
  227. }
  228. });
  229. break;
  230. case "取消暂缓":
  231. wx.showModal({
  232. title: getApp().globalData.Language.getMapText('提示'),
  233. content: getApp().globalData.Language.getMapText('是否确定取消暂缓并继续跟进客户'),
  234. cancelText: getApp().globalData.Language.getMapText('关闭'),
  235. confirmText: that.data.language['确定'] || '确定取消',
  236. complete: (res) => {
  237. console.log(data)
  238. if (res.confirm) _Http.basic({
  239. "id": 20221010164602,
  240. "content": {
  241. "sa_customersids": [data.sa_customersid],
  242. "status": '潜在'
  243. }
  244. }).then(res => {
  245. console.log("客户取消暂缓", res)
  246. wx.showToast({
  247. title: res.code == '1' ? getApp().globalData.Language.getMapText('已取消暂缓') : res.msg,
  248. icon: "none"
  249. });
  250. getApp().globalData.Language.showToast(res.code == '1' ? "已取消暂缓" : res.msg)
  251. that.getDetail();
  252. })
  253. }
  254. });
  255. break;
  256. case "更换负责人":
  257. wx.navigateTo({
  258. url: `/pages/group/select?data=${JSON.stringify({
  259. ownertable:"sa_customers",
  260. ownerid:this.data.sa_customersid,
  261. })}&radio=true&principal=true`,
  262. })
  263. break;
  264. case "终止":
  265. wx.showModal({
  266. content: getApp().globalData.Language.getMapText('是否确定终止客户合作') + '?',
  267. cancelText: getApp().globalData.Language.getMapText('取消'),
  268. confirmText: that.data.language['确定'] || '确定终止',
  269. complete: ({
  270. confirm
  271. }) => {
  272. if (confirm) _Http.basic({
  273. "id": 20221010164602,
  274. "content": {
  275. "sa_customersids": [this.data.sa_customersid],
  276. "status": "已终止"
  277. }
  278. }).then(res => {
  279. wx.showToast({
  280. title: res.code == '1' ? getApp().globalData.Language.getMapText('已终止合作状态') : res.msg,
  281. icon: "none"
  282. });
  283. that.getDetail();
  284. })
  285. }
  286. })
  287. break;
  288. case "恢复":
  289. wx.showModal({
  290. content: getApp().globalData.Language.getMapText('是否确定恢复客户合作') + '?',
  291. cancelText: getApp().globalData.Language.getMapText('取消'),
  292. confirmText: that.data.language['确定'] || '确定恢复',
  293. complete: ({
  294. confirm
  295. }) => {
  296. if (confirm) _Http.basic({
  297. "id": 20221010164602,
  298. "content": {
  299. "sa_customersids": [this.data.sa_customersid],
  300. "status": "潜在"
  301. }
  302. }).then(res => {
  303. wx.showToast({
  304. title: res.code == '1' ? getApp().globalData.Language.getMapText('已恢复合作状态') : res.msg,
  305. icon: "none"
  306. });
  307. that.getDetail();
  308. })
  309. }
  310. })
  311. break;
  312. case "查看重复":
  313. _Http.basic({
  314. "id": 20221208172002,
  315. "content": {
  316. ...data,
  317. pageSize: 999
  318. }
  319. }).then(res => {
  320. console.log("查看重复", res)
  321. if (res.code != '1') return wx.showToast({
  322. title: res.msg,
  323. icon: "none"
  324. });
  325. if (res.data.length == 0) return wx.showToast({
  326. title: getApp().globalData.Language.getMapText('未查询到重复数据'),
  327. icon: "none"
  328. });
  329. this.setData({
  330. repetitionList: res.data,
  331. repetitionShow: true
  332. })
  333. })
  334. break;
  335. default:
  336. console.log(detail)
  337. break;
  338. }
  339. },
  340. /* 前去重复项详情 */
  341. toRepDetail(e) {
  342. const {
  343. item
  344. } = e.currentTarget.dataset;
  345. wx.navigateTo({
  346. url: '/packageA/setclient/detail?id=' + item.sa_customersid,
  347. })
  348. this.repClose()
  349. },
  350. /* 关闭查重 */
  351. repClose() {
  352. this.setData({
  353. repetitionShow: false
  354. })
  355. },
  356. /* 处理回收客户 */
  357. handleTransfer({
  358. value
  359. }) {
  360. wx.showModal({
  361. title: getApp().globalData.Language.getMapText('提示'),
  362. content: getApp().globalData.Language.getMapText('是否确定将客户回收至') + `${value[0]}?`,
  363. cancelText: getApp().globalData.Language.getMapText('取消'),
  364. confirmText: getApp().globalData.Language.getMapText('确定'),
  365. complete: (res) => {
  366. if (res.confirm) _Http.basic({
  367. "id": 20221014165602,
  368. "content": {
  369. "sa_customerpoolid": value[1][0], //公海池id
  370. "sa_customersids": [this.data.detail.sa_customersid],
  371. "sa_customersid": this.data.detail.sa_customersid
  372. },
  373. }).then(res => {
  374. console.log("回收客户", res)
  375. wx.showToast({
  376. title: res.code == '1' ? getApp().globalData.Language.getMapText('回收成功') : res.msg,
  377. icon: "none"
  378. });
  379. if (res.code == '1') setTimeout(() => {
  380. wx.navigateBack()
  381. let page = getCurrentPages().find(v => v.__route__ == 'packageA/setclient/index');
  382. if (page) page.setData({
  383. list: page.data.list.filter(v => v.sa_customersid != this.data.detail.sa_customersid)
  384. });
  385. wx.redirectTo({
  386. url: '/packageA/publicCustomer/detail?id=' + this.data.detail.sa_customersid,
  387. })
  388. }, 300)
  389. })
  390. }
  391. })
  392. },
  393. /* 更换负责人 */
  394. handelSubmit(arr) {
  395. const that = this;
  396. wx.showModal({
  397. title: getApp().globalData.Language.getMapText('提示'),
  398. content: getApp().globalData.Language.getMapText('是否确认更换负责人'),
  399. complete: ({
  400. confirm
  401. }) => {
  402. if (confirm) wx.showModal({
  403. title: getApp().globalData.Language.getMapText('提示'),
  404. content: getApp().globalData.Language.getMapText('是否参与该数据的后续工作'),
  405. cancelText: getApp().globalData.Language.getMapText('不参与'),
  406. confirmText: getApp().globalData.Language.getMapText('参与'),
  407. complete: (s) => {
  408. _Http.basic({
  409. "id": 20220930103701,
  410. "content": {
  411. ownertable: "sa_customers",
  412. ownerid: that.data.sa_customersid,
  413. userid: arr[0],
  414. isaddoldleader: s.confirm ? 1 : 0
  415. }
  416. }).then(res => {
  417. console.log("更换负责人", res)
  418. if (res.code != '1') return wx.showToast({
  419. title: res.data,
  420. icon: "none"
  421. });
  422. wx.showToast({
  423. title: getApp().globalData.Language.getMapText('更换成功'),
  424. icon: "none",
  425. mask: true
  426. });
  427. getCurrentPages().forEach(v => {
  428. if (['packageA/setclient/index'].includes(v.__route__)) v.getList(true)
  429. })
  430. setTimeout(() => {
  431. wx.navigateBack({
  432. delta: 2
  433. });
  434. }, 300)
  435. })
  436. }
  437. })
  438. }
  439. })
  440. },
  441. /* 获取详情 */
  442. getDetail() {
  443. /* 基本信息 */
  444. _Http.basic({
  445. "id": 20221012164302,
  446. "content": {
  447. sa_customersid: this.data.sa_customersid
  448. },
  449. }).then(res => {
  450. console.log("详情", res)
  451. if (res.code != '1') return wx.showToast({
  452. title: res.data,
  453. icon: "none"
  454. })
  455. this.setPreview(res);
  456. this.setData({
  457. loading: false,
  458. detail: res.data,
  459. })
  460. //获取标签
  461. if (this.data.appAuth.isdatatag) this.getTags();
  462. if (this.data.appAuth.isdatateam) this.getGroup()
  463. this.setTabbar();
  464. this.partialRenewal();
  465. });
  466. },
  467. async setTabbar() {
  468. /* 底部功能 */
  469. let detail = this.data.detail,
  470. isAdmin = this.data.isAdmin,
  471. isLeader = detail.leader.some(some => some.userid == wx.getStorageSync('userMsg').userid),
  472. editdataleader = isLeader ? 1 : 0,
  473. tabbarList = [];
  474. if (this.data.appAuth.isdatafollowup && detail.status != '已终止') tabbarList.push({
  475. icon: "icon-genjin",
  476. label: "跟进"
  477. });
  478. if (!isLeader) {
  479. let res = await getApp().agentOrNot("sa_customers", this.data.sa_customersid),
  480. data = res.code == '1' ? res.data : {
  481. editable: 0,
  482. editdataleader: 0
  483. }
  484. if (this.data.appAuth.isdatateam) isLeader = this.selectComponent("#Group").data.editable == 1;
  485. if (!isLeader) isLeader = data.editable == 1;
  486. editdataleader = data.editdataleader;
  487. }
  488. //负责人或管理员基础功能
  489. if ((isLeader || isAdmin) && detail.status != '已终止') {
  490. tabbarList.push({
  491. icon: "icon-bianji",
  492. label: "编辑"
  493. })
  494. if (editdataleader) tabbarList.push({
  495. icon: "icon-zhuanyi",
  496. label: "更换负责人"
  497. })
  498. /* if (isLeader) tabbarList.push({
  499. icon: "icon-dibu-biangengchengjiaozhuangtai",
  500. label: "更改合作状态"
  501. }) */
  502. if (isLeader && this.data.options.includes('putOff') && detail.status != '已终止') tabbarList.push({
  503. icon: detail.status == '暂缓' ? "icon-quxiaozanhuan" : "icon-zanhuan",
  504. label: detail.status == '暂缓' ? "取消暂缓" : "暂缓"
  505. })
  506. }
  507. if (this.data.options.includes('Abort')) {
  508. if (detail.status == '已终止') {
  509. tabbarList.push({
  510. label: "恢复",
  511. icon: "icon-huifu1"
  512. })
  513. } else {
  514. tabbarList.push({
  515. label: "终止",
  516. icon: "icon-zhongzhi"
  517. })
  518. }
  519. }
  520. if (isLeader || isAdmin) tabbarList.push({
  521. icon: "icon-shanchu",
  522. label: "作废"
  523. })
  524. //来自公海
  525. if (detail.ispublic == 1) {
  526. //查询到回收公海客户权限
  527. if (this.data.options.some(v => v == 'recycle')) tabbarList.push({
  528. icon: "icon-dibu-chehui",
  529. label: "回收"
  530. })
  531. //负责人
  532. if (isLeader) tabbarList.push({
  533. icon: "icon-dibu-chehui",
  534. label: "退回"
  535. })
  536. }
  537. if (this.data.options.find(v => v == 'viewRepetition')) tabbarList.push({
  538. icon: "icon-a-shouyejingangquhehuoren",
  539. label: "查看重复"
  540. });
  541. this.setData({
  542. tabbarList,
  543. isLeader
  544. })
  545. },
  546. setPreview(res) {
  547. /* 摘要信息 */
  548. let briefs = [{
  549. label: "客户类型",
  550. value: res.data.type
  551. }, {
  552. label: "企业等级",
  553. value: res.data.grade
  554. }, {
  555. label: "上级企业",
  556. value: res.data.superiorenterprisename
  557. }, {
  558. label: "负责人",
  559. value: res.data.leader.map(v => v.name) || ""
  560. }, {
  561. label: "归属经销商",
  562. value: res.data.agentname
  563. }, {
  564. label: '营销费用',
  565. value: CNY(res.data.salesfeesamount || '0')
  566. }];
  567. /* 基本信息 */
  568. let list1 = [{
  569. label: "客户名称",
  570. value: res.data.enterprisename
  571. }, {
  572. label: "客户编号",
  573. value: res.data.sa_customersid
  574. }, {
  575. label: "erp编号",
  576. value: res.data.erpagentnum
  577. }, {
  578. label: "企业简称",
  579. value: res.data.abbreviation
  580. }, {
  581. label: "客户类型",
  582. value: res.data.type
  583. }, {
  584. label: "企业等级",
  585. value: res.data.grade
  586. }, {
  587. label: "客户分类",
  588. value: res.data.customergrade
  589. }, {
  590. label: "客户行业",
  591. value: res.data.industry
  592. }, {
  593. label: "税号",
  594. value: res.data.taxno
  595. }, {
  596. label: "法人",
  597. value: res.data.contact
  598. }, {
  599. label: "电话",
  600. value: res.data.telephone
  601. }, {
  602. label: "省市县",
  603. value: res.data.province ? [res.data.province, res.data.city, res.data.county] : ""
  604. }, {
  605. label: "详细地址",
  606. value: res.data.address
  607. }, {
  608. label: "上级企业",
  609. value: res.data.superiorenterprisename
  610. }, {
  611. label: "客户来源",
  612. value: res.data.source
  613. }, {
  614. label: "来源公海",
  615. value: res.data.sourcepoolname
  616. }, {
  617. label: "成交状态",
  618. value: res.data.tradingstatus,
  619. style:`color:${this.data.sColors[res.data.tradingstatus]}`
  620. }, {
  621. label: "成交次数",
  622. value: res.data.contact_signnum
  623. }, {
  624. label: "合作状态",
  625. value: getApp().globalData.Language.getMapText(res.data.status),
  626. style:`color:${this.data.sColors[res.data.status]}`
  627. }, {
  628. label: "负责人",
  629. value: res.data.leader.map(v => v.name) || ""
  630. }, {
  631. label: "部门",
  632. value: res.data.leader.length ? res.data.leader[0].depname : ""
  633. }, {
  634. label: "归属经销商",
  635. value: res.data.agentname
  636. }];
  637. /* 系统信息 */
  638. let list2 = [{
  639. label: "创建人",
  640. value: res.data.createby
  641. }, {
  642. label: "创建时间",
  643. value: res.data.createdate
  644. }, {
  645. label: "最近编辑人",
  646. value: res.data.changeby
  647. }, {
  648. label: "最近编辑时间",
  649. value: res.data.changedate
  650. }, {
  651. label: "作废原因",
  652. value: res.data.deletereason
  653. }, {
  654. label: "转手次数",
  655. value: res.data.leader[0] ? res.data.leader[0].leadernum : 0
  656. }];
  657. this.setData({
  658. briefs,
  659. list1,
  660. list2
  661. });
  662. },
  663. //tabs 切换
  664. tabsChange({
  665. detail
  666. }) {
  667. this.setData({
  668. tabsActive: detail
  669. });
  670. this.partialRenewal();
  671. },
  672. //局部数据更新 tabs
  673. partialRenewal(init = false) {
  674. let model = this.data.tabsList[this.data.tabsActive].model;
  675. if (model) {
  676. let Component = this.selectComponent(model),
  677. {
  678. total,
  679. pageNumber,
  680. pageTotal
  681. } = Component.data.content,
  682. id = model == "#Clue" ? this.data.detail.sa_customersid : this.data.detail.sys_enterpriseid;
  683. if (total == null || init) {
  684. Component.getList(id, init);
  685. } else if (pageNumber <= pageTotal) {
  686. Component.getList(id, false);
  687. }
  688. }
  689. },
  690. //更新标签
  691. getTags() {
  692. this.selectComponent("#Tags").getTags()
  693. },
  694. //更新团队成员
  695. getGroup() {
  696. this.selectComponent("#Group").getList().then(this.setTabbarList)
  697. },
  698. onReachBottom() {
  699. this.partialRenewal();
  700. },
  701. onUnload() {
  702. const page = getCurrentPages().find(v => v.__route__ == 'packageA/setclient/index');
  703. if (!page) return;
  704. let content = JSON.parse(JSON.stringify(page.data.content));
  705. content.pageSize = (content.pageNumber - 1) * content.pageSize;
  706. content.pageNumber = 1;
  707. _Http.basic({
  708. id: '20221012164402',
  709. content
  710. }).then(res => {
  711. console.log("更新客户列表", res);
  712. if (res.code == '1') {
  713. page.setData({
  714. list: res.data,
  715. "content.total": res.total
  716. })
  717. page.getTags()
  718. }
  719. })
  720. }
  721. })