followList.vue 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175
  1. <template>
  2. <view class="mainBox">
  3. <uni-nav-bar background-color="#157A2C" color="#fff" fixed="true" statusBar="true" left-icon="back" title="跟进记录"
  4. @clickLeft="back">
  5. </uni-nav-bar>
  6. <followList ref="followListRef" :linkList="linkList" :isDrawer="true">
  7. </followList>
  8. </view>
  9. </template>
  10. <script>
  11. import followList from "@/pages/saleManage/contact/components/followList.vue"
  12. import {
  13. contactDetail,
  14. contactSave
  15. } from '@/api/saleManage/contact/index.js'
  16. export default {
  17. components: {
  18. followList,
  19. },
  20. data() {
  21. return {
  22. form: {
  23. address: '',
  24. addressId: '',
  25. addressName: '',
  26. authorizationLimit: 0,
  27. businessLicenseFiles: [],
  28. businessLicenseFile: [],
  29. businessScope: '',
  30. categoryId: '',
  31. categoryName: '',
  32. companyCategoryId: '',
  33. companyCategoryName: '',
  34. enterpriseTypeId: '',
  35. enterpriseTypeName: '',
  36. legalPerson: '',
  37. registeredCapital: '',
  38. parentId: '',
  39. industry: [],
  40. industryCode: '',
  41. industryFullName: '',
  42. mainProduct: '',
  43. name: '',
  44. officialIndustry: '',
  45. phone: '',
  46. registerDate: '',
  47. remark: '',
  48. serialNo: '',
  49. simpleName: '',
  50. type: 1,
  51. unifiedSocialCreditCode: ''
  52. },
  53. otherForm: {
  54. settlementMode: '',
  55. settlementModeName: '',
  56. taxRate: 0,
  57. address: '',
  58. addressId: '',
  59. deptId: '',
  60. deptName: '',
  61. discount: 0,
  62. salesmanId: '',
  63. salesmanName: '',
  64. sender: '',
  65. senderPhone: ''
  66. },
  67. bankList: [],
  68. linkList: [],
  69. }
  70. },
  71. computed: {
  72. },
  73. onLoad(data) {
  74. uni.$off('setContact')
  75. uni.$on('setContact', ({
  76. key,
  77. data
  78. }) => {
  79. this[key] = data
  80. this.save()
  81. })
  82. contactDetail(data.id).then(async res => {
  83. this.form = res.base
  84. this.otherForm = res.other
  85. this.bankList = res.bankList
  86. this.linkList = res.linkList
  87. this.$nextTick(() => {
  88. this.$refs.followListRef.init(res.base)
  89. })
  90. })
  91. },
  92. onUnload() {
  93. uni.$off('setContact')
  94. },
  95. methods: {
  96. save() {
  97. try {
  98. const data = {
  99. base: this.form,
  100. other: this.otherForm,
  101. bankList: this.bankList,
  102. linkList: this.linkList,
  103. };
  104. contactSave(data)
  105. } catch (error) {
  106. console.log(error, 'error')
  107. }
  108. },
  109. }
  110. }
  111. </script>
  112. <style lang="scss" scoped>
  113. .add {
  114. width: 96rpx;
  115. height: 96rpx;
  116. border-radius: 48rpx;
  117. background: #3c9cff;
  118. position: fixed;
  119. bottom: 100rpx;
  120. right: 24rpx;
  121. display: flex;
  122. align-items: center;
  123. justify-content: center;
  124. }
  125. .top-wrapper {
  126. background-color: #fff;
  127. display: flex;
  128. width: 750rpx;
  129. height: 88rpx;
  130. padding: 16rpx 32rpx;
  131. align-items: center;
  132. gap: 16rpx;
  133. /deep/.uni-section {
  134. margin-top: 0px;
  135. }
  136. /deep/.uni-section-header {
  137. padding: 0px;
  138. }
  139. .search_btn {
  140. width: 120rpx;
  141. height: 70rpx;
  142. line-height: 70rpx;
  143. padding: 0 24rpx;
  144. background: $theme-color;
  145. font-size: 32rpx;
  146. color: #fff;
  147. margin: 0;
  148. margin-left: 26rpx;
  149. }
  150. .menu_icon {
  151. width: 44rpx;
  152. height: 44rpx;
  153. margin-left: 14rpx;
  154. }
  155. }
  156. </style>