Browse Source

Merge remote-tracking branch 'origin/release-201821-wangcz' into release-201821-wangcz

shenjj 7 years ago
parent
commit
97beba7b7a

+ 29 - 14
components/mobile/staffManagement/StaffList.vue

@@ -38,8 +38,10 @@
                 <div class="list-item"><span>角色:</span><span class="role" v-for="role in item.roles" v-text="role.desc ? role.desc.slice(0,2) : ''" v-bind:class="'bg' + role.color">普通</span></div>
               </div>
               <div class="list-footer">
-                <div @click="goEdit(item)" class="edit handle" v-bind:class="{'no-allow': (item.userUU === userInfo.userUU)}"><i class="iconfont icon-edit"></i><span>编辑</span></div>
-                <div @click="openDelete(item)" class="delete handle" v-bind:class="{'no-allow': (item.userUU === userInfo.userUU)}"><i class="iconfont icon-lajitong"></i><span>删除</span></div>
+                <div @click="goEdit(item)" v-show="isAdmin" class="edit handle"><i class="iconfont icon-edit"></i><span>编辑</span></div>
+                <div v-show="!isAdmin" class="edit handle" @click="isOrAdmin = true"><i class="iconfont icon-edit"></i><span>编辑</span></div>
+                <div @click="openDelete(item)" v-show="isAdmin" class="delete handle"><i class="iconfont icon-lajitong"></i><span>删除</span></div>
+                <div v-show="!isAdmin" class="delete handle" @click="isOrAdmin = true"><i class="iconfont icon-lajitong"></i><span>删除</span></div>
               </div>
             </div>
           </div>
@@ -92,7 +94,7 @@
       <pull-up :fixId="'mobile-staff-center'" :isValid="isValid" :searchMore="fetching" :allPage="allPage" :page="page" @pullUpAction="onPullUpAction"></pull-up>
       <remind-box :title="remindText" :timeoutCount="timeoutCount"></remind-box>
     </div>
-    <!--删除员工-->
+    <!--删除员工弹框-->
     <div class="deleteKuang" v-if="showDelete">
       <div class="kuangContent">
         <div class="title">温馨提示</div>
@@ -103,6 +105,16 @@
         </div>
       </div>
     </div>
+    <!--是否是管理员弹框-->
+    <div class="deleteKuang" v-if="isOrAdmin">
+      <div class="kuangContent">
+        <div class="title">温馨提示</div>
+        <div class="titleinfo">您不是管理员,不行进行操作!</div>
+        <div class="K_btn">
+          <div class="answerBtn" @click="isOrAdmin = false">确定</div>
+        </div>
+      </div>
+    </div>
     <remind-box :title="remindText" :timeoutCount="timeoutCount"></remind-box>
   </div>
 </template>
@@ -132,7 +144,8 @@
         currentStaff: [],
         isValid: true,
         role: '全部角色',
-        showRole: false
+        showRole: false,
+        isOrAdmin: false
       }
     },
     components: {
@@ -225,23 +238,24 @@
       staffList () {
         this.$store.dispatch('staff/loadStaffList', {count: this.count, page: this.page, enuu: this.userInfo.enterprise.uu})
       },
+      // 员工列表下拉加载更多
       onPullUpAction: function () {
         this.page++
         this.staffList()
         this.isValid = true
       },
-      // 员工搜索
+      // 员工列表搜索
       staffRecord () {
         this.role = '全部角色'
         this.showRole = false
         this.$store.dispatch('staff/loadStaffList', {count: this.count, page: this.page, enuu: this.user.data.enterprise.uu, keyword: this.staffSearch})
       },
-      // 删除员工
+      // 员工列表删除员工
       openDelete (item) {
         this.currentObject = item
         this.showDelete = true
       },
-      // 确认删除
+      // 员工列表确认删除
       sureDelete () {
         this.$http.delete('/basic/user/' + this.currentObject.userUU)
           .then(response => {
@@ -298,7 +312,7 @@
             }
           })
       },
-      // 当前选中对象
+      // 员工列表当前选中对象
       goEdit (item) {
         let currentData = item
         this.currentStaff = this.baseUtils.deepCopy(currentData)
@@ -312,15 +326,15 @@
           }
         }
       },
-      // 选择角色
+      // 员工列表选择角色
       checkRole (role) {
         role.checked = !role.checked
       },
-      // 取消编辑
+      // 员工列表取消编辑
       cancelBind () {
         this.activeTab = 0
       },
-      // 确定编辑
+      // 员工列表确定编辑
       sureEdit () {
         this.currentStaff.roles = []
         for (var i = 0 ; i< this.rolesList.length; i++) {
@@ -339,9 +353,10 @@
       },
       // 申请绑定搜索
       auditRecord () {
+        console.log(this.user.data.enterprise.uu)
         this.$store.dispatch('staff/loadBindAudit', {count: this.count, page: this.page, speaceUU: this.user.data.enterprise.uu, status: 311, keyword: this.auditSearch})
       },
-      // 绑定下拉
+      // 申请绑定下拉更多
       onPullUpAudit () {
         this.page++
         this.auditRecord()
@@ -368,8 +383,8 @@
       background: #fff;
       span {
         font-size: .29rem;
-        &:first-child {
-          margin-right: 2.6rem;
+        &:last-child {
+          margin-left: 2.6rem;
         }
         &.active {
           color: $base-color;

+ 9 - 5
pages/mobile/center/vendor/payCenter.vue

@@ -90,10 +90,10 @@
         </li>
       </ul>
       <div class="fix-count-wrap" v-if="recordList.length">
-        <span class="content">已收总计:<span>{{currencySymbol | currencyFilter}}&nbsp;{{totalRecordPrice}}</span></span>
+        <span class="content">已收总计:<span>{{currencySymbol | currencyFilter}}&nbsp;{{totalMoney}}</span></span>
         <!--<span class="content">支出总计:<span>{{currencySymbol | currencyFilter}}&nbsp;0</span></span>
         <p>结余:{{currencySymbol | currencyFilter}}&nbsp;{{totalRecordPrice}} (共计{{recordList.length || 0}}笔交易)</p>-->
-        <p>结余:{{currencySymbol | currencyFilter}}&nbsp;{{totalRecordPrice}} (共计{{recordList.length || 0}}笔交易)</p>
+        <p>结余:{{currencySymbol | currencyFilter}}&nbsp;{{totalMoney}} (共计{{recordList.length || 0}}笔交易)</p>
       </div>
     </div>
     <!-- 交易记录end -->
@@ -174,6 +174,7 @@
 <script>
   import { RemindBox, PullUp, EmptyStatus } from '~components/mobile/common'
   import { ModalWrapper, BaseFilter } from '~components/mobile/base'
+  import axios from '~plugins/axios'
   export default {
     layout: 'mobile',
     middleware: 'authenticated',
@@ -267,7 +268,8 @@
             }],
             defaultVal: null
           }
-        ]
+        ],
+        totalMoney: 0
       }
     },
     components: {
@@ -281,9 +283,11 @@
       return route.query.type ? Promise.all([store.dispatch('payCenter/loadVendorAccount', {count: 10, page: 1, sorting: {num: 'ASC'}, type: 'sup'})
         ]) : Promise.all([store.dispatch('payCenter/loadVendorRecord', {count: 10, page: 1, sorting: {'transferTime': 'DESC'}, type: 'sup'})])
     },
-    asyncData({route}) {
+    async asyncData({route}) {
+      let { data } = await axios.get('/trade/transfer/vendor/bankTransfer/ledger?type=sup')
       return {
-        fromUserPage: route.query.type ? true : false,
+        totalMoney: data.code === 1 ? data.data : 0,
+        fromUserPage: Boolean(route.query.type),
         switchType: route.query.switchType || 'record'
       }
     },