混凝土运输管理微信小程序、替班
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

234 lines
6.5 KiB

2 months ago
1 week ago
2 months ago
2 months ago
1 week ago
2 months ago
1 week ago
2 months ago
1 week ago
2 months ago
1 week ago
2 months ago
1 week ago
2 months ago
1 week ago
2 months ago
1 week ago
2 months ago
1 week ago
2 months ago
1 week ago
2 months ago
1 week ago
2 months ago
1 week ago
2 months ago
2 months ago
1 week ago
2 months ago
1 week ago
2 months ago
2 months ago
1 week ago
2 months ago
1 week ago
2 months ago
1 week ago
2 months ago
1 week ago
2 months ago
2 months ago
2 months ago
2 months ago
1 week ago
2 months ago
1 week ago
2 months ago
1 week ago
2 months ago
2 months ago
1 week ago
  1. <template>
  2. <view class="content">
  3. <view class="banner b-relative">
  4. <image src="/static/re/center.png" class="banner-before" mode="scaleToFill"/>
  5. <view class="flex head-d" @click="clickLogin">
  6. <view class="square120 garden mr20">
  7. <image src="https://thirdwx.qlogo.cn/mmopen/vi_32/POgEwh4mIHO4nibH0KlMECNjjGxQUq24ZEaGT4poC6icRiccVGKSyXwibcPq4BWmiaIGuG1icwxaQX6grC9VemZoJ8rg/132"
  8. mode="aspectFill" class="square120"/>
  9. </view>
  10. <view class="nickname">
  11. {{name}}
  12. </view>
  13. </view>
  14. </view>
  15. <view v-if="+role===0" style="background-color: white;">
  16. <view class="re-item flex-sb bottom-line" @click="clickSells">
  17. <view>我要推荐</view>
  18. <view class="subf">推荐领奖<uni-icons type="right" size="12" color="#aaa"/></view>
  19. </view>
  20. <view class="re-item flex-sb bottom-line" @click="clickOrder">
  21. <view>我的订单</view>
  22. <view class="subf">立即查看<uni-icons type="right" size="12" color="#aaa"/></view>
  23. </view>
  24. <view class="re-item flex-sb bottom-line" @click="clickHistory">
  25. <view>历史订单</view>
  26. <view class="subf">点击查看<uni-icons type="right" size="12" color="#aaa"/></view>
  27. </view>
  28. <view class="re-item flex-sb">
  29. <view>我要拒单</view>
  30. <button class="subf" open-type="contact">
  31. <span>联系客服</span>
  32. <uni-icons type="right" size="12" color="#aaa"/>
  33. </button>
  34. </view>
  35. </view>
  36. <view v-if="+role===1" style="background-color: white;">
  37. <view class="re-item flex-sb bottom-line" @click="clickCars">
  38. <view>企业设备</view>
  39. <view class="subf">{{cars.length}}<uni-icons type="right" size="12" color="#aaa"/></view>
  40. </view>
  41. <view class="re-item flex-sb bottom-line" @click="clickPush">
  42. <view>发布订单</view>
  43. <view class="subf">立即发布<uni-icons type="right" size="12" color="#aaa"/></view>
  44. </view>
  45. <view class="re-item flex-sb">
  46. <view>联系客服</view>
  47. <button class="subf" open-type="contact">
  48. <span>微信客服</span>
  49. <uni-icons type="right" size="12" color="#aaa"/>
  50. </button>
  51. </view>
  52. </view>
  53. <view v-if="+role===2" style="background-color: white;">
  54. <view class="re-item flex-sb bottom-line" @click="clickCars">
  55. <view>企业设备</view>
  56. <view class="subf">{{cars.length}}<uni-icons type="right" size="12" color="#aaa"/></view>
  57. </view>
  58. <view class="re-item flex-sb bottom-line" @click="clickStaff">
  59. <view>推荐司机</view>
  60. <view class="subf">推荐有礼<uni-icons type="right" size="12" color="#aaa"/></view>
  61. </view>
  62. <view class="re-item flex-sb bottom-line" @click="clickYuan">
  63. <view>员工管理</view>
  64. <view class="subf">管理员工<uni-icons type="right" size="12" color="#aaa"/></view>
  65. </view>
  66. <view class="re-item flex-sb" @click="swichHall">
  67. <view>员工订单</view>
  68. <view class="subf">查看订单<uni-icons type="right" size="12" color="#aaa"/></view>
  69. </view>
  70. </view>
  71. <view v-if="+role===3" style="background-color: white;">
  72. <view class="re-item flex-sb bottom-line" @click="clickShen">
  73. <view>拒单申请</view>
  74. <view class="subf">查看申请<uni-icons type="right" size="12" color="#aaa"/></view>
  75. </view>
  76. <view class="re-item flex-sb bottom-line" @click="swichHall">
  77. <view>区域订单</view>
  78. <view class="subf">查看订单<uni-icons type="right" size="12" color="#aaa"/></view>
  79. </view>
  80. </view>
  81. </view>
  82. </template>
  83. <script>
  84. export default {
  85. data() {
  86. return {
  87. role: "1",
  88. name: "",
  89. cars: []
  90. }
  91. },
  92. onShow() {
  93. this.role = uni.getStorageSync("role");
  94. this.name = uni.getStorageSync("name");
  95. this.loadCars()
  96. if(!uni.getStorageSync("userid")){
  97. uni.showModal({
  98. title: "登陆检测",
  99. content: "无法识别您的用户身份,请先登陆",
  100. success: (res) => {
  101. if(res.confirm === true){
  102. uni.navigateTo({
  103. url: "/pages/login/login"
  104. })
  105. } else {
  106. uni.navigateBack({delta: 1})
  107. }
  108. }
  109. })
  110. }
  111. },
  112. methods: {
  113. clickOrder(){ uni.navigateTo({ url: '/pages/user/orders' }) },
  114. clickHistory(){ uni.navigateTo({ url: '/pages/user/history' }) },
  115. clickLogin(){ uni.navigateTo({ url: '/pages/login/login' }) },
  116. clickSells(){ uni.navigateTo({ url: '/pages/base/sells' }) },
  117. clickStaff(){ uni.navigateTo({ url: '/pages/staff/sells' }) },
  118. clickCars (){ uni.navigateTo({ url: '/pages/staff/cars' }) },
  119. clickPush (){ uni.navigateTo({ url: '/pages/staff/create' }) },
  120. clickYuan (){ uni.navigateTo({ url: '/pages/base/yuan' }) },
  121. clickShen (){ uni.navigateTo({ url: '/pages/base/shen' }) },
  122. swichHall (){ uni.switchTab( { url: '/pages/index/order' }) },
  123. clickService(){
  124. uni.makePhoneCall({
  125. phoneNumber: '1234567890',
  126. success: function() {
  127. console.log('拨打电话成功');
  128. },
  129. fail: function(err) {
  130. console.log('拨打电话失败:', err.errMsg);
  131. }
  132. });
  133. },
  134. loadCars(){
  135. this.$httpGet("/api/car/list", {useridp: ""}, (res) => {
  136. console.log('[/car/list]', res);
  137. if(res.data){
  138. this.cars = this.$utils.toArray(res.data)
  139. }
  140. })
  141. },
  142. }
  143. }
  144. </script>
  145. <style>
  146. body{
  147. background-color: #f5f5f5;
  148. }
  149. page{
  150. background-color: #f5f5f5;
  151. }
  152. button{ padding: 0;margin: 0;background-color: transparent; }
  153. button::after{ border: none; }
  154. button:hover{ background-color: transparent; }
  155. button{ margin: 0 !important;border: none !important; }
  156. .head-d{
  157. position: absolute;
  158. top: 188rpx;
  159. left: 64rpx;
  160. z-index: 3;
  161. }
  162. .banner {
  163. width: 100vw;
  164. min-height: 420rpx;
  165. }
  166. .banner-before{
  167. content: " ";
  168. position: absolute;
  169. top: 0;
  170. left: 0;
  171. width: 100%;
  172. height: 100%;
  173. filter: blur(2rpx);
  174. z-index: -1;
  175. }
  176. .banner::after{
  177. content: " ";
  178. position: absolute;
  179. top: 0;
  180. left: 0;
  181. width: 100%;
  182. height: 100%;
  183. background-color: rgba(0, 0, 0, .2);
  184. backdrop-filter: blur(5rpx);
  185. z-index: 1;
  186. }
  187. .nickname{
  188. line-height: 120rpx !important;
  189. font-weight: bolder !important;
  190. font-size: 36rpx !important;
  191. color: #fff;
  192. }
  193. .head-div{
  194. width: calc(100vw - 72rpx);
  195. height: 268rpx;
  196. padding: 72rpx 36rpx 0;
  197. margin: 0 auto;
  198. }
  199. .subf{
  200. font-size: 26rpx;
  201. color: #6B768A;
  202. line-height: 120rpx;
  203. }
  204. .nickname{
  205. height: 50rpx;
  206. line-height: 60rpx;
  207. font-size: 36rpx;
  208. font-family: PingFang SC, PingFang SC-Bold;
  209. font-weight: 700;
  210. text-align: left;
  211. color: #ffffff;
  212. }
  213. .tel{
  214. font-size: 24rpx;
  215. line-height: 60rpx;
  216. font-family: PingFang SC, PingFang SC-Regular;
  217. font-weight: 400;
  218. text-align: left;
  219. color: #ffffff;
  220. }
  221. </style>