customerInfo.vue 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131
  1. <template>
  2. <view class="content">
  3. <view class="info-detail" v-if="item!=null" >
  4. <view class="item">
  5. <text class="label">客户姓名</text>
  6. <text class="text">{{item.customerName}}</text>
  7. </view>
  8. <view class="item">
  9. <text class="label">创建时间</text>
  10. <text class="text">{{item.createTime}}</text>
  11. </view>
  12. <view class="item">
  13. <text class="label">客户微信</text>
  14. <view class="right">
  15. <view class="text ellipsis" >{{item.weixin}}</view>
  16. <view class="btn" @click="sendMsg()">
  17. 自动获取
  18. </view>
  19. </view>
  20. </view>
  21. </view>
  22. </view>
  23. </template>
  24. <script>
  25. import {getCustomerDetails} from '@/api/crm.js'
  26. export default {
  27. data() {
  28. return {
  29. id:null,
  30. item:null,
  31. }
  32. },
  33. onLoad(option) {
  34. },
  35. onShow() {
  36. },
  37. methods: {
  38. sendMsg(){
  39. var that=this;
  40. var userId=uni.getStorageSync('companyUserId') ;
  41. var data={cmd:"getWeixinId", data:{},userId:"p-"+userId};
  42. uni.$emit('sendMsg',data);
  43. },
  44. getCustomerDetails(customerId) {
  45. //联网加载数据
  46. var that = this;
  47. var data = {
  48. customerId: customerId
  49. };
  50. getCustomerDetails(data).then(res => {
  51. if(res.code==200){
  52. this.item=res.customer;
  53. }else{
  54. uni.showToast({
  55. icon:'none',
  56. title: "请求失败",
  57. });
  58. }
  59. });
  60. },
  61. }
  62. }
  63. </script>
  64. <style lang="scss">
  65. page{
  66. height: 100%;
  67. background: #f6f6f6;
  68. }
  69. </style>
  70. <style scoped lang="scss">
  71. .content{
  72. // 详细信息
  73. .info-detail{
  74. background-color: #fff;
  75. .item{
  76. height: 88rpx;
  77. border-bottom: 1rpx solid #f3f3f3;
  78. width: 100%;
  79. display: flex;
  80. align-items: center;
  81. justify-content: flex-start;
  82. padding: 20upx 0;
  83. .label{
  84. min-width: 150rpx;
  85. flex: 1;
  86. font-size: 28upx;
  87. color: #999;
  88. margin-right: 20upx;
  89. }
  90. .right{
  91. flex: 1;
  92. display: flex;
  93. align-items: center;
  94. justify-content: flex-end;
  95. .text{
  96. max-width: 200rpx;
  97. font-size: 28upx;
  98. color: #333;
  99. }
  100. .btn{
  101. min-width: 150rpx;
  102. height: 66rpx;
  103. border-radius: 8rpx;
  104. padding: 5rpx 15rpx;
  105. display: flex;
  106. align-items: center;
  107. justify-content: center;
  108. border: 1rpx solid #e9e9e9;
  109. font-size: 28rpx;
  110. color: #909399;
  111. }
  112. }
  113. .text{
  114. font-size: 28upx;
  115. color: #333;
  116. }
  117. }
  118. }
  119. }
  120. </style>