Forráskód Böngészése

入库功能列表权限调整

lizhenhao 2 éve
szülő
commit
5e939571b0

+ 13 - 11
src/views/modules/materialManagement/wareHouse/WareHouseList.vue

@@ -69,7 +69,7 @@
     <div class="bg-white top" style="">
       <vxe-toolbar :refresh="{query: refreshList}" custom>
         <template #buttons>
-          <el-button v-if="hasPermission('material:add')" type="primary" size="small" icon="el-icon-plus" @click="add()">新建</el-button>
+          <el-button v-if="hasPermission('material:add')" :disabled="isAdmin" type="primary" size="small" icon="el-icon-plus" @click="add()">新建</el-button>
         </template>
       </vxe-toolbar>
       <div style="height: calc(100% - 90px)">
@@ -113,19 +113,21 @@
 
           <vxe-column title="操作" width="150px" fixed="right" align="center">
             <template  slot-scope="scope">
-<!--              <el-button v-if="hasPermission('material:edit')&&scope.row.createBy === $store.state.user.id" type="text"  size="small" @click="edit(scope.row.id)">修改</el-button>-->
-              <el-button v-if="hasPermission('material:edit')&&isAdmin" type="text"  size="small" @click="edit(scope.row.id)">修改</el-button>
-<!--              <el-button v-if="hasPermission('material:del')&&scope.row.createBy === $store.state.user.id" type="text"   size="small" @click="del(scope.row.id)">删除</el-button>-->
-              <el-button v-if="hasPermission('material:del')&&isAdmin" type="text"   size="small" @click="del(scope.row.id)">删除</el-button>
-              <el-button v-if="hasPermission('material:wareHouse:edit')&&scope.row.createBy === $store.state.user.id&&(scope.row.status==='0'||scope.row.status==='5')" type="text"  size="small" @click="push(scope.row)">申请修改</el-button>
+              <div v-if="isAdmin">
+<!--                <el-button type="text"  size="small" @click="edit(scope.row.id)">修改</el-button>-->
+                <el-button type="text" v-if="scope.row.status==='0' || scope.row.status==='5'"  size="small" @click="del(scope.row.id)">删除</el-button>
+              </div>
+              <div v-else>
+                <el-button v-if="hasPermission('material:wareHouse:edit')&&(scope.row.status==='0'||scope.row.status==='5')" type="text"  size="small" @click="push(scope.row)">申请修改</el-button>
               <!--              当前申请人撤回-->
-              <el-button v-if="hasPermission('material:wareHouse:edit')&&scope.row.createBy === $store.state.user.id&&scope.row.status==='2'" type="text"  size="small" @click="reback(scope.row)">撤回</el-button>
+                <el-button v-if="hasPermission('material:wareHouse:edit')&&scope.row.updateUser === $store.state.user.id&&scope.row.status==='2'" type="text"  size="small" @click="reback(scope.row)">撤回</el-button>
               <!--              当前申请人撤回后->申请修改-->
-              <el-button v-if="hasPermission('material:wareHouse:edit')&&scope.row.createBy === $store.state.user.id&&(scope.row.status==='3'||scope.row.status==='1')" type="text"  size="small" @click="push(scope.row)">申请修改</el-button>
+                <el-button v-if="hasPermission('material:wareHouse:edit')&&scope.row.updateUser === $store.state.user.id&&scope.row.status==='3'" type="text"  size="small" @click="push(scope.row)">申请修改</el-button>
               <!--              当前申请人撤回后->取消修改申请-->
-              <el-button v-if="hasPermission('material:wareHouse:edit')&&scope.row.createBy === $store.state.user.id&&scope.row.status==='3'" type="text"  size="small" @click="stopUpdate(scope.row.id)">取消修改</el-button>
-              <el-button v-if="scope.row.status==='2' && checkIsAudit(scope.row)" type="text"  size="small" @click="examine(scope.row)">审核</el-button>
-              <el-button v-if="hasPermission('material:wareHouse:edit')&&scope.row.status === '4'&&scope.row.createBy === $store.state.user.id" type="text"  size="small" @click="adjust(scope.row)">驳回调整</el-button>
+                <el-button v-if="hasPermission('material:wareHouse:edit')&&scope.row.updateUser === $store.state.user.id&&scope.row.status==='3'" type="text"  size="small" @click="stopUpdate(scope.row.id)">取消修改</el-button>
+                <el-button v-if="scope.row.status==='2' && checkIsAudit(scope.row)" type="text"  size="small" @click="examine(scope.row)">审核</el-button>
+                <el-button v-if="hasPermission('material:wareHouse:edit')&&scope.row.status === '4'&&scope.row.updateUser === $store.state.user.id" type="text"  size="small" @click="adjust(scope.row)">驳回调整</el-button>
+              </div>
             </template>
           </vxe-column>
         </vxe-table>