index.js 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. const _Http = getApp().globalData.http;
  2. Page({
  3. data: {
  4. sys_enterprise_financeid: 0,
  5. item: {},
  6. tabbarList: [{
  7. icon: "icon-bodadianhua",
  8. label: "呼叫",
  9. alias: "call"
  10. }, {
  11. icon: "icon-a-yingxiaowuliaofuzhi",
  12. label: "复制",
  13. alias: "copy"
  14. }, {
  15. icon: "icon-bianji",
  16. label: "编辑",
  17. alias: "edit"
  18. }, {
  19. icon: "icon-shanchu",
  20. label: "作废",
  21. alias: "delete"
  22. }]
  23. },
  24. onLoad(options) {
  25. if (options.sys_enterprise_financeid) {
  26. this.setData({
  27. sys_enterprise_financeid: options.sys_enterprise_financeid
  28. });
  29. this.getDetail();
  30. }
  31. getApp().globalData.Language.getLanguagePackage(this, '财务信息');
  32. },
  33. //获取详情
  34. getDetail() {
  35. _Http.basic({
  36. "id": 20221026105702,
  37. "content": {
  38. "sys_enterprise_financeid": this.data.sys_enterprise_financeid
  39. },
  40. }).then(res => {
  41. if (res.code != '1') return wx.showToast({
  42. title: res.data,
  43. icon: "none"
  44. })
  45. const item = res.data;
  46. this.setData({
  47. list: [{
  48. label: "名称",
  49. value: item.enterprisename
  50. }, {
  51. label: "纳税人识别号",
  52. value: item.taxno
  53. }, {
  54. label: "地址",
  55. value: item.address
  56. }, {
  57. label: "开户行",
  58. value: item.bank
  59. }, {
  60. label: "账号",
  61. value: item.bankcardno
  62. }, {
  63. label: "联系人号码",
  64. value: item.phonenumber
  65. }],
  66. item: res.data
  67. })
  68. })
  69. },
  70. //详情按钮回调
  71. tabbarOnClick({
  72. detail
  73. }) {
  74. let page = getCurrentPages().find(v => v.__route__ == "packageA/setclient/detail");
  75. if (page) page.selectComponent('#Financing').selectComponent('#List').handleItem({
  76. target: {
  77. dataset: {
  78. name: detail.alias,
  79. item: this.data.item
  80. }
  81. }
  82. });
  83. },
  84. //详情单元格单击复制
  85. clickItem({
  86. detail
  87. }) {
  88. wx.setClipboardData({
  89. data: detail.value,
  90. success: () => {
  91. wx.hideToast();
  92. wx.showToast({
  93. title: getApp().globalData.Language.getMapText('已复制') + detail.label,
  94. icon: "none"
  95. })
  96. }
  97. })
  98. },
  99. })