custom.vue 8.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359
  1. <template>
  2. <view class="content">
  3. <view class="contLineBox">
  4. <view class="contLine">
  5. <view class="lineTitle">手机号</view>
  6. <view class="lineRgiht">{{customerInfo.mobilePhone}}</view>
  7. </view>
  8. <view class="contLine">
  9. <view class="lineTitle">手机号</view>
  10. <view class="lineRgiht2" @click="editIphone">请输入手机号,以获取更多信息
  11. </view>
  12. </view>
  13. <view class="contLine">
  14. <view class="lineTitle">姓名</view>
  15. <view class="lineRgiht">{{customerInfo.customerName}}</view>
  16. </view>
  17. <view class="contLine">
  18. <view class="lineTitle">客户来源</view>
  19. <view class="lineRgiht">{{customerInfo.name}}</view>
  20. </view>
  21. <view class="contLine">
  22. <view class="lineTitle">客户等级</view>
  23. <view class="lineRgiht">{{customerInfo.levelName}}</view>
  24. </view>
  25. <view class="contLine">
  26. <view class="lineTitle">客户标签</view>
  27. <view class="titleBox">
  28. <view class="title" v-for="(item,index) in customerInfo.lables">{{item.name}}</view>
  29. </view>
  30. </view>
  31. <view class="contLine">
  32. <view class="lineTitle">客户类型</view>
  33. <view class="lineRgiht" v-if="customerInfo.CusromerType==1">个人</view>
  34. <view class="lineRgiht" v-if="customerInfo.CusromerType==2">单位</view>
  35. </view>
  36. <view class="contLine">
  37. <view class="lineTitle">单位名称</view>
  38. <view class="lineRgiht">库里</view>
  39. </view>
  40. <view class="contLine">
  41. <view class="lineTitle">服务顾问</view>
  42. <view class="lineRgiht">{{customerInfo.usersName}}</view>
  43. </view>
  44. <view class="contLine">
  45. <view class="lineTitle">所属门店</view>
  46. <view class="lineRgiht">库里</view>
  47. </view>
  48. <view class="contLine">
  49. <view class="lineTitle">创建时间</view>
  50. <view class="lineRgiht">{{customerInfo.createTime}}</view>
  51. </view>
  52. </view>
  53. <view class="box">
  54. <view class="boxTitle">信用额度</view>
  55. <view class="creditBox">
  56. <view class="creditLine">
  57. <view class="creditTitle">剩余记账:</view>
  58. <view class="creditNum">2299</view>
  59. </view>
  60. <view class="creditLine">
  61. <view class="creditTitle">超期账款:</view>
  62. <view class="creditNum">2299</view>
  63. </view>
  64. <view class="creditLine">
  65. <view class="creditTitle">最近到期日:</view>
  66. <view class="creditNum">2299</view>
  67. </view>
  68. <view class="creditLine">
  69. <view class="creditTitle">可用额度:</view>
  70. <view class="creditNum">2299</view>
  71. </view>
  72. <view class="creditLine">
  73. <view class="creditTitle">信用额度:</view>
  74. <view class="creditNum">{{customerInfo.creditMoney}}</view>
  75. </view>
  76. </view>
  77. </view>
  78. <view class="box">
  79. <view class="boxTitle2">信用额度
  80. <image class="boxIcon" src="../../static/img/icon_arrow_up.png" mode=""></image>
  81. </view>
  82. <view class="contLine">
  83. <view class="lineTitle">证件类型</view>
  84. <view class="lineRgiht">{{customerInfo.idType}}</view>
  85. </view>
  86. <view class="contLine">
  87. <view class="lineTitle">证件号码</view>
  88. <view class="lineRgiht">{{customerInfo.idCode}}</view>
  89. </view>
  90. <view class="contLine">
  91. <view class="lineTitle">所在地区</view>
  92. <view class="lineRgiht">{{customerInfo.provinceName}}{{customerInfo.cityName}}{{customerInfo.areaName}}</view>
  93. </view>
  94. <view class="contLine">
  95. <view class="lineTitle">详细地址</view>
  96. <view class="lineRgiht">{{customerInfo.address}}</view>
  97. </view>
  98. <view class="contLine">
  99. <view class="lineTitle">推广员工</view>
  100. <view class="lineRgiht">身份证</view>
  101. </view>
  102. <view class="contLine">
  103. <view class="lineTitle">推广客户</view>
  104. <view class="lineRgiht">身份证</view>
  105. </view>
  106. <view class="contLine">
  107. <view class="lineTitle">生日</view>
  108. <view class="lineRgiht">{{customerInfo.birthday}}</view>
  109. </view>
  110. <view class="contLine">
  111. <view class="lineTitle">客户备注</view>
  112. <view class="lineRgiht">{{customerInfo.comment}}</view>
  113. </view>
  114. </view>
  115. <uni-popup ref="popup" type="bottom" >
  116. <view class="popupBox">
  117. <view class="popupTitleBox">
  118. <view class="popupTitle">修改手机号</view>
  119. <image src="../../static/img/cha.png" mode="" @click="pBcancel" class="chaImg"></image>
  120. </view>
  121. <view class="popupMs">此处修改手机号后,将根据新手机号重新匹配客户信息</view>
  122. <view class="inputBox">
  123. <view class="inputMs">手机号</view>
  124. <input type="text" v-model="extUserMobile" class="iphoneInput" placeholder="请输入" />
  125. </view>
  126. <view class="pBottom">
  127. <view class="pBcancel" @click="pBcancel">取消</view>
  128. <view class="pBBtn" @click="extCustomerMobile">确定</view>
  129. </view>
  130. </view>
  131. </uni-popup>
  132. </view>
  133. </template>
  134. <script>
  135. export default {
  136. props:['token'],
  137. data() {
  138. return {
  139. extUserMobile:'',
  140. customerInfo:'',
  141. }
  142. },
  143. onLoad() {
  144. },
  145. methods: {
  146. getdata(){
  147. this.extCustomerInfo()
  148. },
  149. extCustomerInfo(){
  150. var that=this;
  151. this.$http('enterprise/wechat/extCustomerInfo', {
  152. corpID:'wpMGjbBgAA_zIu6wbKy48zFSbGiGeP8g',
  153. extUserId:'wmMGjbBgAA0JAbGD5Vu8BzEuYgZhvhOA',
  154. token:this.token
  155. }, 'GET').then(res => {
  156. this.customerInfo=res.data.data.customerInfo
  157. this.customerId=this.customerInfo.id
  158. uni.setStorage({
  159. key: 'customerId',
  160. data: that.customerId,
  161. success: function () { }
  162. });
  163. })
  164. },
  165. extCustomerMobile(){
  166. var that=this;
  167. uni.showLoading({
  168. title: '加载中'
  169. });
  170. this.$http('enterprise/wechat/extCustomerMobile', {
  171. corpID:'wpMGjbBgAA_zIu6wbKy48zFSbGiGeP8g',
  172. extUserId:'wmMGjbBgAA0JAbGD5Vu8BzEuYgZhvhOA',
  173. extUserMobile:this.extUserMobile
  174. }, 'POST').then(res => {
  175. uni.hideLoading();
  176. uni.showToast({
  177. title: res.data,
  178. icon: 'none',
  179. duration: 3000
  180. });
  181. this.pBcancel()
  182. this.extCustomerInfo()
  183. }).catch(err=>{
  184. })
  185. },
  186. editIphone(){
  187. console.log(this.token)
  188. this.$refs.popup.open('bottom')
  189. },
  190. pBcancel(){
  191. this.$refs.popup.close()
  192. }
  193. }
  194. }
  195. </script>
  196. <style scoped>
  197. .contLineBox{
  198. background: #fff;
  199. }
  200. .contLine{
  201. display: flex;
  202. justify-content: space-between;
  203. border-bottom: 1px solid #F6F6F6;
  204. padding: 28rpx 24rpx;
  205. font-size: 28rpx;
  206. }
  207. .lineTitle{
  208. color: #666666;
  209. }
  210. .lineRgiht{
  211. color: #3C3C3C;
  212. }
  213. .lineRgiht2{
  214. color: #FF8113;
  215. }
  216. .titleBox{
  217. display: flex; flex-wrap: wrap;
  218. width: 500rpx;
  219. }
  220. .title{
  221. height: 36rpx;
  222. border-radius: 4rpx;
  223. border: 1px solid #FF8113;
  224. line-height: 34rpx;
  225. font-size: 24rpx;
  226. color: #FF8113;
  227. padding: 0 8rpx;
  228. margin-right: 10rpx;
  229. }
  230. .box{
  231. margin-top: 20rpx;background: #fff;
  232. }
  233. .boxTitle{
  234. font-weight: 500;
  235. font-size: 28rpx;
  236. color: #3C3C3C;
  237. padding: 28rpx 24rpx;
  238. border-bottom: 1px solid #EEEEEE;
  239. }
  240. .creditBox{
  241. display: flex;
  242. flex-wrap: wrap;
  243. padding-top: 16rpx;
  244. padding-bottom: 16rpx;
  245. }
  246. .creditLine{
  247. width: 50%;display: flex;
  248. padding-top: 8rpx;
  249. padding-bottom: 8rpx;
  250. font-size: 26rpx;
  251. color: #666666;
  252. }
  253. .creditNum{
  254. color: #3C3C3C;
  255. }
  256. .creditTitle{
  257. padding-left: 24rpx;
  258. }
  259. .boxTitle2{
  260. display: flex;
  261. justify-content: space-between;
  262. font-weight: 500;
  263. font-size: 28rpx;
  264. color: #3C3C3C;
  265. padding: 28rpx 24rpx;
  266. border-bottom: 1px solid #EEEEEE;
  267. }
  268. .boxIcon{
  269. width: 26rpx;height: 16rpx;
  270. margin-top: 6rpx;
  271. }
  272. .popupBox{
  273. width: 750rpx;
  274. height: 809rpx;
  275. background: #FFFFFF;
  276. border-radius: 32rpx 32rpx 0rpx 0rpx;
  277. position: relative;
  278. }
  279. .popupTitleBox{
  280. display: flex;
  281. justify-content: space-between;
  282. padding: 30rpx;
  283. }
  284. .popupTitle{
  285. font-size: 30rpx;
  286. color: #3C3C3C;
  287. line-height: 42rpx;
  288. }
  289. .chaImg{
  290. width: 27rpx;height: 27rpx;margin-top: 9rpx;
  291. }
  292. .popupMs{
  293. font-size: 26rpx;
  294. color: #FF8113;
  295. padding-left: 24rpx;
  296. padding-bottom: 20rpx;
  297. border-bottom: 1px solid #EEEEEE;
  298. }
  299. .inputBox{
  300. display: flex;
  301. padding: 0 24rpx;
  302. line-height: 98rpx;
  303. border-bottom: 1px solid #EEEEEE;
  304. }
  305. .iphoneInput{
  306. line-height: 98rpx;
  307. height: 98rpx;
  308. padding-left: 40rpx;
  309. }
  310. .pBottom{
  311. position: absolute;
  312. left: 0;
  313. bottom: 0;
  314. width: 750rpx;
  315. padding: 24rpx 0rpx;
  316. background: #FFFFFF;
  317. box-shadow: 0rpx -2rpx 20rpx 0rpx rgba(153,153,153,0.2);
  318. display: flex;
  319. justify-content: space-around;
  320. }
  321. .pBcancel{
  322. width: 331rpx;
  323. height: 74rpx;
  324. border-radius: 37rpx;
  325. border: 2rpx solid #DDDDDD;
  326. line-height: 74rpx;
  327. text-align: center;
  328. font-weight: 500;
  329. font-size: 28rpx;
  330. color: #3C3C3C;
  331. }
  332. .pBBtn{
  333. width: 331rpx;
  334. height: 74rpx;
  335. background: #FF8113;
  336. border-radius: 37rpx;
  337. line-height: 74rpx;
  338. text-align: center;
  339. font-weight: 500;
  340. font-size: 28rpx;
  341. color: #FEFFFE;
  342. }
  343. </style>