morePage.vue 7.1 KB

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