morePage.vue 6.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217
  1. <template>
  2. <view class="morePages">
  3. <view class="list-box" v-if="$hasPermissions('M_stockQueryList_mini')||$hasPermissions('M_stockPut_mini')">
  4. <view class="list-title">
  5. <u-icon size="38" name="bag"></u-icon> <text>货品管理</text>
  6. </view>
  7. <u-cell-group :border="false">
  8. <u-cell-item title="库存查询" v-if="$hasPermissions('M_stockQueryList_mini')" @click="toPage('/pages/stockQuery/stockQuery')" :title-style="{fontSize:'1em'}">
  9. <text slot="icon"></text>
  10. </u-cell-item>
  11. <u-cell-item title="补货记录" v-if="$hasPermissions('M_stockPut_mini')" @click="toPage('/pages/digitalShelf/stockPut')" :title-style="{fontSize:'1em'}">
  12. <text slot="icon"></text>
  13. </u-cell-item>
  14. </u-cell-group>
  15. </view>
  16. <view class="list-box" v-if="$hasPermissions('M_shelfOrder_mini')||$hasPermissions('M_tempShelfOrder_mini')">
  17. <view class="list-title">
  18. <u-icon size="34" name="order"></u-icon> <text>订单管理</text>
  19. </view>
  20. <u-cell-group :border="false">
  21. <u-cell-item title="货架订单" v-if="$hasPermissions('M_shelfOrder_mini')" @click="toPage('/pages/digitalShelf/orderList')" :title-style="{fontSize:'1em'}">
  22. <text slot="icon"></text>
  23. </u-cell-item>
  24. <u-cell-item title="临配订单" v-if="$hasPermissions('M_tempShelfOrder_mini')" @click="toPage('/pages/digitalShelf/tempOrderList/tempOrderList')" :title-style="{fontSize:'1em'}">
  25. <text slot="icon"></text>
  26. </u-cell-item>
  27. </u-cell-group>
  28. </view>
  29. <view class="list-box" v-if="$hasPermissions('M_settlementRecord_mini')||$hasPermissions('M_settlementManage_mini')">
  30. <view class="list-title">
  31. <u-icon size="36" name="rmb-circle"></u-icon> <text>结算管理</text>
  32. </view>
  33. <u-cell-group :border="false">
  34. <u-cell-item title="结算记录" v-if="$hasPermissions('M_settlementRecord_mini')" @click="toPage('/pages/digitalShelf/settlementRecord/settlementRecord')" :title-style="{fontSize:'1em'}">
  35. <text slot="icon"></text>
  36. </u-cell-item>
  37. <u-cell-item title="付款结算" v-if="$hasPermissions('M_settlementManage_mini')" @click="toPage('/pages/digitalShelf/settlementManage/settlementManage')" :title-style="{fontSize:'1em'}">
  38. <text slot="icon"></text>
  39. </u-cell-item>
  40. </u-cell-group>
  41. </view>
  42. <view class="list-box" v-if="$hasPermissions('M_employee_mini')||$hasPermissions('M_roleSetting_mini')">
  43. <view class="list-title">
  44. <u-icon size="32" name="home"></u-icon> <text>门店管理</text>
  45. </view>
  46. <u-cell-group :border="false">
  47. <u-cell-item title="员工管理" v-if="$hasPermissions('M_employee_mini')" @click="toPage('/pages/storeManage/personnel')" :title-style="{fontSize:'1em'}">
  48. <text slot="icon"></text>
  49. </u-cell-item>
  50. </u-cell-group>
  51. <u-cell-group :border="false">
  52. <u-cell-item title="岗位权限" v-if="$hasPermissions('M_roleSetting_mini')" @click="toPage('/pages/storeManage/roleSetting/roleSetting')" :title-style="{fontSize:'1em'}">
  53. <text slot="icon"></text>
  54. </u-cell-item>
  55. </u-cell-group>
  56. </view>
  57. <view class="list-box" v-if="hasLogin&&dealerPhone">
  58. <view class="list-title flex justify_center phone" @click="call">
  59. <u-icon size="36" name="phone"></u-icon> <text>联系汽配商</text>
  60. </view>
  61. </view>
  62. <view class="list-box" v-if="hasLogin">
  63. <view class="list-title flex justify_center phone" @click="quitOut">
  64. <text>退出登录</text>
  65. </view>
  66. </view>
  67. <!-- 去认证 -->
  68. <u-popup v-model="showPopup" mode="center" :border-radius="20" closeable>
  69. <view style="background-color: #fff;padding: 1rem;">
  70. <u-image width="533" height="415" src="/static/authimg.jpg"></u-image>
  71. <view style="padding-top:1rem;" class="flex justify_center">
  72. <u-button @click="toAuthStore()" shape="circle" :custom-style="{background:'#066cff',color:'#fff',width:'350rpx'}">开始认证</u-button>
  73. </view>
  74. </view>
  75. </u-popup>
  76. </view>
  77. </template>
  78. <script>
  79. import {
  80. mapState,
  81. mapMutations
  82. } from 'vuex'
  83. export default {
  84. data() {
  85. return {
  86. dealerPhone: null,
  87. showPopup: false
  88. }
  89. },
  90. computed: {
  91. ...mapState(['hasLogin']),
  92. hasShelf(){
  93. return !!this.$store.state.vuex_storeShelf
  94. },
  95. userInfo(){
  96. return this.$store.state.vuex_userInfo
  97. },
  98. storeApply(){
  99. return this.$store.state.vuex_storeAuthInfo
  100. }
  101. },
  102. onShow() {
  103. const shelfInfo = this.$store.state.vuex_storeShelf
  104. this.dealerPhone = shelfInfo&&shelfInfo.contactMobile ? shelfInfo.contactMobile : ''
  105. },
  106. methods: {
  107. toPage(path){
  108. const _this = this
  109. if(this.hasLogin){
  110. // 游客未认证
  111. if(this.userInfo.sysUserFlag == '0'){
  112. if(this.storeApply&&this.storeApply.auditStatus=='WAIT'){
  113. uni.showModal({
  114. title: '提示',
  115. content: '门店认证资料审核中,请耐心等待!',
  116. confirmText: '知道了',
  117. showCancel: false
  118. })
  119. }
  120. // 如果审核已通过
  121. else if(this.storeApply&&this.storeApply.auditStatus=='PASS'){
  122. uni.showModal({
  123. title: '提示',
  124. content: '门店认证审核已通过,请重新登录!',
  125. confirmText: '去登录',
  126. showCancel: false,
  127. success() {
  128. _this.$store.dispatch('userLogout');
  129. uni.redirectTo({
  130. url: '/pages/login/login'
  131. });
  132. }
  133. })
  134. }else{
  135. this.showPopup = true
  136. }
  137. }else{
  138. // 已有数字货架
  139. if(this.hasShelf){
  140. uni.navigateTo({
  141. url: path
  142. })
  143. }else{
  144. uni.showToast({
  145. icon:'none',
  146. title: '门店没有关联数字货架,无法使用此功能!'
  147. })
  148. }
  149. }
  150. }else{
  151. uni.navigateTo({
  152. url: '/pages/login/login'
  153. })
  154. }
  155. },
  156. toAuthStore(){
  157. this.showPopup = false
  158. uni.navigateTo({
  159. url: '/pages/storeManage/storeAuth'
  160. })
  161. },
  162. call(){
  163. this.callPhone(this.dealerPhone)
  164. },
  165. quitOut(){
  166. let _this = this
  167. uni.showModal({
  168. title: '提示',
  169. content: '确定退出登录吗?',
  170. success: (ret) => {
  171. if(ret.confirm){
  172. _this.$store.dispatch('userLogout');
  173. uni.navigateTo({
  174. url: '/pages/login/login'
  175. });
  176. }
  177. }
  178. })
  179. }
  180. }
  181. }
  182. </script>
  183. <style lang="less">
  184. .morePages{
  185. width: 100%;
  186. padding: 30rpx;
  187. background-image: linear-gradient(#86defa 0%,#cdeff9 20%,#f8f8f8 30%);
  188. .list-box{
  189. background: #ffffff;
  190. margin-bottom: 30rpx;
  191. border-radius: 25rpx;
  192. overflow: hidden;
  193. box-shadow: 2rpx 2rpx 5rpx #eee;
  194. .list-title{
  195. padding:30rpx 20rpx;
  196. font-size: 30rpx;
  197. border-bottom: 2rpx solid #f8f8f8;
  198. > text{
  199. margin-left: 10rpx;
  200. }
  201. }
  202. &:first-child{
  203. box-shadow: 2rpx 2rpx 5rpx #cdeff9;
  204. }
  205. }
  206. .phone{
  207. color: #00aaff;
  208. &:active{
  209. opacity: 0.8;
  210. transform:scale(0.9);
  211. }
  212. }
  213. }
  214. </style>