index.vue 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568
  1. <template>
  2. <view class="top-cont">
  3. <image class="bg" src="/static/images/company/sales_management_top_bg.png" mode="widthFix"></image>
  4. <view :style="{height: statusBarHeight,background: bgColor }"></view>
  5. <u-navbar title="销售管理" titleStyle="font-weight: bold;" @rightClick="rightClick" :autoBack="true"
  6. :bg-color="bgColor">
  7. </u-navbar>
  8. <view class="content">
  9. <!-- <view class="user-info">
  10. <view class="left">
  11. <view class="name-phone">
  12. <view class="name">{{user.nickName}}</view>
  13. <view class="phone" v-if="user!=null">{{utils.parsePhone(user.phonenumber)}}</view>
  14. </view>
  15. </view>
  16. <view class="msg-box" >
  17. {{user.deptName}}
  18. </view>
  19. </view> -->
  20. <!-- 常用工具 -->
  21. <!-- <view class="used-tools">
  22. <view class="title">常用工具</view>
  23. <view class="tools-list">
  24. <view class="item" @click="toCreateOrder()">
  25. <image src="../static/images/order.png" mode=""></image>
  26. <text class="text">商品制单</text>
  27. </view>
  28. <view class="item" @click="toCreateCoupon()">
  29. <image src="../static/images/icon_coupon.png" mode=""></image>
  30. <text class="text">制单优惠券</text>
  31. </view>
  32. <view class="item" @click="toPay()">
  33. <image src="../static/images/money.png" mode=""></image>
  34. <text class="text">微信收款</text>
  35. </view>
  36. <view class="item" @click="alipay()">
  37. <image src="../static/images/money.png" mode=""></image>
  38. <text class="text">支付宝收款</text>
  39. </view>
  40. <view class="item" @click="toOrder()">
  41. <image src="../static/images/order.png" mode=""></image>
  42. <text class="text">我的订单</text>
  43. </view>
  44. <view class="item" @click="toPackage()">
  45. <image src="../static/images/package.png" mode=""></image>
  46. <text class="text">商品套餐</text>
  47. </view>
  48. <view class="item" @click="toCoupon()">
  49. <image src="../static/images/icon_coupon.png" mode=""></image>
  50. <text class="text">套餐优惠券</text>
  51. </view>
  52. </view>
  53. </view> -->
  54. <view class="user-info2">
  55. <view class="left">
  56. <view class="head-img">
  57. <image :src="user.avatar==null?'../static/images/health/my_heads.png':user.avatar" mode="aspectFill"></image>
  58. </view>
  59. <view class="name-phone">
  60. <view class="align-end">
  61. <view class="name">{{user.nickName}}</view>
  62. <image class="w48 h48" src="../static/images/company/right_arrow_black_icon24.png" mode=""></image>
  63. </view>
  64. <view class="phone-box" v-if="user!=null">
  65. <image class="w32 h32" src="../static/images/company/phone_icon16.png" mode=""></image>
  66. <view class="phone">
  67. {{utils.parsePhone(user.phonenumber)}}
  68. </view>
  69. </view>
  70. </view>
  71. </view>
  72. <view class="msg-box">
  73. {{user.deptName}}
  74. </view>
  75. </view>
  76. <view class="used-tools2">
  77. <view class="title">指标汇总</view>
  78. <view class="index-box">
  79. <view class="task">
  80. <view class="align-center">
  81. <image class="w48 h48" src="../static/images/company/appointed_task_icon.png" mode=""></image>
  82. <view class="box-title">指派任务</view>
  83. <image class="w24 h24" src="../static/images/company/right_arrow_right_icon.png" mode=""></image>
  84. </view>
  85. <view class="prop">80%</view>
  86. </view>
  87. <view class="work">
  88. <view class="align-center" @click="navgetTo('/pages_company/addSchedule')">
  89. <image class="w48 h48" src="../static/images/company/work_item_icon.png" mode=""></image>
  90. <view class="box-title">工作事项</view>
  91. <image class="w24 h24" src="../static/images/company/right_arrow_right_icon.png" mode=""></image>
  92. </view>
  93. <view class="prop">30%</view>
  94. </view>
  95. </view>
  96. </view>
  97. <view class="used-tools2">
  98. <view class="title">常用工具</view>
  99. <view class="tools-list">
  100. <view class="item" @click="navgetTo('/pages_user/user/userTui')">
  101. <image src="../static/images/company/my_promotion_icon.png" mode=""></image>
  102. <text class="text">我的推广</text>
  103. </view>
  104. <view class="item" @click="navgetTo('/pages_company/todoList')">
  105. <image src="../static/images/company/to_do_list_icon.png" mode=""></image>
  106. <text class="text">待办事项</text>
  107. </view>
  108. <view class="item" @click="navgetTo('/pages_company/clientList')">
  109. <image src="../static/images/company/customer_profile_icon.png" mode=""></image>
  110. <text class="text">客户档案</text>
  111. </view>
  112. <view class="item" @click="navgetTo('/pages_user/user/userTui')">
  113. <image src="../static/images/company/manager_examine_icon.png" mode=""></image>
  114. <text class="text">管理师考核</text>
  115. </view>
  116. <view class="item" @click="navgetTo('/pages_user/user/userTui')">
  117. <image src="../static/images/company/customer_complaints_icon.png" mode=""></image>
  118. <text class="text">客户投诉</text>
  119. </view>
  120. </view>
  121. </view>
  122. <!-- 退出登录按钮 -->
  123. <view class="log-out" @click="logout">退出登录</view>
  124. </view>
  125. </view>
  126. </template>
  127. <script>
  128. import {getUserInfo,getQrImg} from '@/api/companyUser'
  129. export default {
  130. data() {
  131. return {
  132. statusBarHeight:'',
  133. top:0,
  134. user:{
  135. nickName:'健康管家小左',
  136. phonenumber:'13996660261',
  137. deptName:'测试企业',
  138. avatar:null
  139. },
  140. // user:null,
  141. };
  142. },
  143. computed: {
  144. // 计算属性的 getter
  145. bgColor: function() {
  146. var top = this.top / 30;
  147. return 'rgba(11,179,242, ' + top + ')';
  148. },
  149. },
  150. onLoad() {
  151. console.log("onload")
  152. },
  153. onShow() {
  154. console.log("onshow")
  155. // this.getUserInfo()
  156. },
  157. methods: {
  158. navgetTo(url){
  159. uni.navigateTo({
  160. url:url
  161. })
  162. },
  163. alipay(){
  164. // var url="http://alipay.yjf.runtzh.com/#/?companyId="+this.user.companyId+"&companyUserId="+this.user.userId
  165. // uni.setClipboardData({
  166. // data:url,
  167. // success:()=>{
  168. // uni.showToast({
  169. // title:'收款地址已复制到剪切板',
  170. // icon:'none'
  171. // })
  172. // }
  173. // });
  174. uni.navigateTo({
  175. url:'/pages_company/alipayImg'
  176. })
  177. },
  178. toCard(){
  179. uni.navigateTo({
  180. url:'/pages_company/card?cardId='+this.user.cardId
  181. })
  182. },
  183. toCreateOrder(){
  184. uni.navigateTo({
  185. url:'/pages_company/order/productList'
  186. })
  187. },
  188. toPay(){
  189. uni.navigateTo({
  190. url:'/pages_user/user/pay?companyId='+this.user.companyId+"&companyUserId="+this.user.userId
  191. })
  192. },
  193. toOrder(){
  194. uni.navigateTo({
  195. url:'/pages_company/storeOrder?companyId='+this.user.companyId+"&companyUserId="+this.user.userId
  196. })
  197. },
  198. toPackage(){
  199. uni.navigateTo({
  200. url:'/pages_company/storeProductPackage?companyId='+this.user.companyId+"&companyUserId="+this.user.userId
  201. })
  202. },
  203. toCoupon(){
  204. uni.navigateTo({
  205. url:'/pages_company/coupon'
  206. })
  207. },
  208. toCreateCoupon(){
  209. uni.navigateTo({
  210. url:'/pages_company/order/coupon'
  211. })
  212. },
  213. toCreateOrderCoupon(){
  214. uni.navigateTo({
  215. url:'/pages_company/order/coupon'
  216. })
  217. },
  218. getUserInfo(){
  219. var data={token:uni.getStorageSync('CompanyUserToken')}
  220. getUserInfo(data).then(
  221. res => {
  222. if(res.code==200){
  223. this.user=res.data;
  224. }
  225. else if(res.code==403){
  226. uni.setStorageSync('CompanyUserToken',null);
  227. uni.navigateBack({
  228. delta:-1
  229. })
  230. }else{
  231. uni.showToast({
  232. icon:'none',
  233. title: res.msg,
  234. });
  235. }
  236. },
  237. rej => {}
  238. );
  239. },
  240. logout(){
  241. uni.showModal({
  242. title:"提示",
  243. content:"确认退出登录吗?",
  244. showCancel:true,
  245. cancelText:'取消',
  246. confirmText:'确定',
  247. success:res=>{
  248. if(res.confirm){
  249. uni.setStorageSync('CompanyUserToken',null);
  250. uni.navigateBack({
  251. delta:-1
  252. })
  253. }else{
  254. }
  255. }
  256. })
  257. },
  258. // 跳转页面
  259. // navgetTo(url) {
  260. // this.utils.isLogin().then(res => {
  261. // if(res){
  262. // uni.navigateTo({
  263. // url: url
  264. // })
  265. // }
  266. // })
  267. // },
  268. }
  269. }
  270. </script>
  271. <style lang="scss">
  272. .bg {
  273. width: 100%;
  274. height: 380rpx;
  275. position: absolute;
  276. top: 0;
  277. left: 0;
  278. z-index: -1;
  279. }
  280. .content{
  281. padding-top: calc(var(--status-bar-height) + 140rpx) !important;
  282. margin: 20upx 0upx;
  283. padding:20upx;
  284. // .user-info{
  285. // padding: 30upx;
  286. // display: flex;
  287. // align-items: center;
  288. // justify-content: space-between;
  289. // .left{
  290. // position: relative;
  291. // display: flex;
  292. // .head-img{
  293. // width: 120upx;
  294. // height: 120upx;
  295. // border-radius: 50%;
  296. // overflow: hidden;
  297. // margin-right: 30upx;
  298. // border: 4upx solid #FFFFFF;
  299. // box-shadow: 0px 5px 15px 2px rgba(0,0,0,0.1);
  300. // image{
  301. // width: 100%;
  302. // height: 100%;
  303. // }
  304. // }
  305. // .name-phone{
  306. // padding-top: 15upx;
  307. // .name{
  308. // font-size: 36upx;
  309. // font-family: PingFang SC;
  310. // font-weight: bold;
  311. // color: #111111;
  312. // line-height: 1;
  313. // }
  314. // .phone{
  315. // font-size: 28upx;
  316. // font-family: PingFang SC;
  317. // font-weight: 500;
  318. // color: #666666;
  319. // line-height: 1;
  320. // margin-top: 30upx;
  321. // }
  322. // }
  323. // }
  324. // .msg-box{
  325. // padding: 5rpx 15upx;
  326. // height: 30upx;
  327. // line-height: 30upx;
  328. // font-size: 22upx;
  329. // font-family: PingFang SC;
  330. // font-weight: 500;
  331. // color: #FFFFFF;
  332. // border-radius: 8rpx;
  333. // background-color: #0bb3f2;
  334. // }
  335. // }
  336. // .used-tools{
  337. // box-sizing: border-box;
  338. // background: #FFFFFF;
  339. // border-radius: 16upx;
  340. // padding: 40upx 30upx;
  341. // .title{
  342. // font-size: 32upx;
  343. // font-family: PingFang SC;
  344. // font-weight: bold;
  345. // color: #222222;
  346. // line-height: 1;
  347. // }
  348. // .tools-list{
  349. // margin-top: 50upx;
  350. // display: flex;
  351. // flex-wrap: wrap;
  352. // width: 100%;
  353. // .item{
  354. // box-sizing: border-box;
  355. // width: 25%;
  356. // display: flex;
  357. // flex-direction: column;
  358. // align-items: center;
  359. // justify-content: center;
  360. // margin-bottom: 50upx;
  361. // position: relative;
  362. // image{
  363. // width: 44upx;
  364. // height: 44upx;
  365. // }
  366. // .text{
  367. // font-size: 24upx;
  368. // font-family: PingFang SC;
  369. // font-weight: 500;
  370. // color: #111111;
  371. // line-height: 1;
  372. // margin-top: 20upx;
  373. // }
  374. // .contact-btn{
  375. // display: inline-block;
  376. // position: absolute;
  377. // top: 0;
  378. // left: 0;
  379. // width: 100%;
  380. // height: 100%;
  381. // opacity: 0;
  382. // }
  383. // }
  384. // }
  385. // }
  386. .user-info2{
  387. // padding: 30upx;
  388. margin-bottom: 30rpx;
  389. display: flex;
  390. align-items: center;
  391. justify-content: space-between;
  392. margin-bottom: 20rpx;
  393. .left{
  394. position: relative;
  395. display: flex;
  396. .head-img{
  397. width: 128upx;
  398. height: 128upx;
  399. border-radius: 50%;
  400. overflow: hidden;
  401. margin-right: 30upx;
  402. border: 4upx solid #FFFFFF;
  403. box-shadow: 0px 5px 15px 2px rgba(0,0,0,0.1);
  404. image{
  405. width: 100%;
  406. height: 100%;
  407. }
  408. }
  409. .name-phone{
  410. // padding-top: 15upx;
  411. display: flex;
  412. flex-direction: column;
  413. justify-content:center;
  414. .name{
  415. font-size: 40upx;
  416. font-family: PingFang SC;
  417. font-weight: bold;
  418. color: #111111;
  419. // line-height: 1;
  420. }
  421. .phone-box{
  422. width: 220rpx;
  423. height: 48rpx;
  424. background: #008FD3;
  425. border-radius: 24rpx 24rpx 24rpx 24rpx;
  426. display: flex;
  427. align-items: center;
  428. justify-content: center;
  429. margin-top: 14rpx;
  430. .phone{
  431. font-family: PingFang SC;
  432. font-weight: 400;
  433. font-size: 24rpx;
  434. color: #FFFFFF;
  435. line-height: 36rpx;
  436. margin-left: 6rpx;
  437. }
  438. }
  439. }
  440. }
  441. .msg-box{
  442. width: 144rpx;
  443. height: 56rpx;
  444. line-height: 56rpx;
  445. font-family: PingFang SC;
  446. font-weight: 400;
  447. font-size: 24rpx;
  448. color: #FFFFFF;
  449. text-align: center;
  450. background: linear-gradient( 90deg, #FEA501 0%, #FECB8A 100%);
  451. border-radius: 28rpx 28rpx 28rpx 28rpx;
  452. border: 1rpx solid #FEDDB9;
  453. }
  454. }
  455. .used-tools2{
  456. box-sizing: border-box;
  457. background: #FFFFFF;
  458. border-radius: 16upx;
  459. padding: 40upx 30upx;
  460. margin-bottom: 20rpx;
  461. .title{
  462. font-size: 32upx;
  463. font-family: PingFang SC;
  464. font-weight: bold;
  465. color: #222222;
  466. line-height: 1;
  467. }
  468. .tools-list{
  469. margin-top: 50upx;
  470. display: flex;
  471. flex-wrap: wrap;
  472. width: 100%;
  473. .item{
  474. box-sizing: border-box;
  475. width: 25%;
  476. display: flex;
  477. flex-direction: column;
  478. align-items: center;
  479. justify-content: center;
  480. margin-bottom: 50upx;
  481. position: relative;
  482. image{
  483. width: 44upx;
  484. height: 44upx;
  485. }
  486. .text{
  487. font-size: 24upx;
  488. font-family: PingFang SC;
  489. font-weight: 500;
  490. color: #111111;
  491. line-height: 1;
  492. margin-top: 20upx;
  493. }
  494. .contact-btn{
  495. display: inline-block;
  496. position: absolute;
  497. top: 0;
  498. left: 0;
  499. width: 100%;
  500. height: 100%;
  501. opacity: 0;
  502. }
  503. }
  504. }
  505. .index-box{
  506. margin-top: 30rpx;
  507. display: flex;
  508. align-items: center;
  509. justify-content: space-between;
  510. .box-title{
  511. font-family: PingFang SC;
  512. font-weight: 400;
  513. font-size: 24rpx;
  514. color: #626468;
  515. margin: 0 14rpx;
  516. }
  517. .prop{
  518. font-family: Roboto Slab;
  519. font-weight: 500;
  520. font-size: 48rpx;
  521. color: #222426;
  522. }
  523. .task{
  524. width: 311rpx;
  525. height: 142rpx;
  526. background: #EBF8FF;
  527. border-radius: 16rpx 16rpx 16rpx 16rpx;
  528. display: flex;
  529. flex-direction: column;
  530. justify-content: center;
  531. align-items: center;
  532. }
  533. .work{
  534. width: 311rpx;
  535. height: 142rpx;
  536. background: #FFF3DE;
  537. border-radius: 16rpx 16rpx 16rpx 16rpx;
  538. display: flex;
  539. flex-direction: column;
  540. justify-content: center;
  541. align-items: center;
  542. }
  543. }
  544. }
  545. .log-out{
  546. height: 80upx;
  547. line-height: 80upx;
  548. text-align: center;
  549. font-size: 28upx;
  550. font-family: PingFang SC;
  551. font-weight: 500;
  552. color: #666666;
  553. background: #FFFFFF;
  554. border-radius: 16upx;
  555. margin-top: 20upx;
  556. }
  557. }
  558. </style>