Browse Source

Merge branch 'feature/Feature-basic_data' into develop

莫绍宝 3 years ago
parent
commit
92febd6b35

+ 2 - 0
src/views/basic_data/dealer/dealer_deposit.vue

@@ -154,11 +154,13 @@
               <el-button
                 type="text"
                 class="textColor"
+                v-if="$checkBtnRole('edit', $route.meta.roles)"
                 @click="editFn(scope.row.id)"
                 >编辑</el-button
               >
               <el-popconfirm
                 @onConfirm="deleFn(scope.row.id)"
+                v-if="$checkBtnRole('del', $route.meta.roles)"
                 title="这是一段内容确定删除吗?"
               >
                 <el-button type="text" class="textColor" slot="reference"

+ 2 - 0
src/views/basic_data/dealer/dealer_stock.vue

@@ -143,11 +143,13 @@
               <el-button
                 type="text"
                 class="textColor"
+                v-if="$checkBtnRole('edit', $route.meta.roles)"
                 @click="editFn(scope.row.id)"
                 >编辑</el-button
               >
               <el-popconfirm
                 @onConfirm="deleFn(scope.row.id)"
+                v-if="$checkBtnRole('del', $route.meta.roles)"
                 title="这是一段内容确定删除吗?"
               >
                 <el-button type="text" class="textColor" slot="reference"

+ 21 - 11
src/views/basic_data/material/classify_list.vue

@@ -7,6 +7,7 @@
           type="primary"
           plain
           style="width: 100%"
+          v-if="$checkBtnRole('add', $route.meta.roles)"
           @click="openAddGroupForm('add')"
           >新建分组</el-button
         >
@@ -27,10 +28,14 @@
                 <i class="el-icon-more icon-more"></i>
               </span>
               <el-dropdown-menu slot="dropdown">
-                <el-dropdown-item :command="['edit', v]"
+                <el-dropdown-item
+                  :command="['edit', v]"
+                  v-if="$checkBtnRole('edit', $route.meta.roles)"
                   >修改名称</el-dropdown-item
                 >
-                <el-dropdown-item :command="['del', v]"
+                <el-dropdown-item
+                  :command="['del', v]"
+                  v-if="$checkBtnRole('del', $route.meta.roles)"
                   >删除分组</el-dropdown-item
                 >
               </el-dropdown-menu>
@@ -80,7 +85,11 @@
         <!-- 按钮 -->
         <div class="btn-group clearfix">
           <div class="fl">
-            <el-button type="primary" size="small" @click="addCategoryFn"
+            <el-button
+              v-if="$checkBtnRole('add', $route.meta.roles)"
+              type="primary"
+              size="small"
+              @click="addCategoryFn"
               >添加类别</el-button
             >
           </div>
@@ -130,6 +139,7 @@
                       slot="reference"
                       type="text"
                       class="textColor el-popover-left"
+                      v-if="$checkBtnRole('del', $route.meta.roles)"
                       >删除</el-button
                     >
                   </el-popconfirm>
@@ -177,15 +187,15 @@
             autocomplete="off"
             v-model="addGroupForm.productCategoryNumber"
             placeholder="请输入"
-            v-if="addGroupFormType == 'add' "
+            v-if="addGroupFormType == 'add'"
+          ></el-input>
+          <el-input
+            v-else
+            autocomplete="off"
+            v-model="addGroupForm.productCategoryNumber"
+            placeholder="请输入"
+            disabled="disabled"
           ></el-input>
-            <el-input v-else
-              autocomplete="off"
-              v-model="addGroupForm.productCategoryNumber"
-              placeholder="请输入"
-              v-else disabled='disabled'
-            ></el-input>
-
         </el-form-item>
       </el-form>
       <div slot="footer" class="dialog-footer">

+ 2 - 0
src/views/basic_data/taker/taker_car.vue

@@ -140,11 +140,13 @@
               <el-button
                 type="text"
                 class="textColor"
+                v-if="$checkBtnRole('edit', $route.meta.roles)"
                 @click="editFn(scope.row)"
                 >编辑</el-button
               >
               <el-popconfirm
                 @onConfirm="delFn(scope.row.id)"
+                v-if="$checkBtnRole('del', $route.meta.roles)"
                 title="这是一段内容确定删除吗?"
               >
                 <el-button type="text" class="textColor" slot="reference"

+ 1 - 0
src/views/basic_data/taker/taker_list.vue

@@ -159,6 +159,7 @@
               >
               <el-popconfirm
                 @onConfirm="deleFn(scope.row.id)"
+                v-if="$checkBtnRole('del', $route.meta.roles)"
                 title="这是一段内容确定删除吗?"
               >
                 <el-button type="text" class="textColor" slot="reference"

+ 3 - 2
src/views/basic_data/wallet/wallet_list.vue

@@ -51,7 +51,7 @@
     <!-- 按钮 -->
     <div class="btn-group clearfix">
       <div class="fl">
-        <el-button type="primary" size="small">更新</el-button>
+        <el-button type="primary" v-if="false" size="small">更新</el-button>
       </div>
       <div class="fr">
         <el-button type="primary" size="small">导出</el-button>
@@ -102,6 +102,7 @@
               ><el-button
                 type="text"
                 class="textColor"
+                v-if="$checkBtnRole('edit', $route.meta.roles)"
                 @click="setFn(scope.row)"
                 >设置产品大类</el-button
               >
@@ -269,4 +270,4 @@ export default {
 .selectStyle {
   width: 100%;
 }
-</style>
+</style>

+ 7 - 4
src/views/finance/change_list.vue

@@ -244,6 +244,7 @@
               <template slot-scope="scope">
                 <el-button
                   @click="submitFn(scope.row.id)"
+                  v-if="$checkBtnRole('apply', $route.meta.roles)"
                   type="text"
                   class="textColor"
                   slot="reference"
@@ -251,8 +252,9 @@
                 >
                 <el-button
                   v-if="
-                    scope.row.examineStatus == 'WAIT' ||
-                    scope.row.examineStatus == 'OK_ONE'
+                    (scope.row.examineStatus == 'WAIT' ||
+                      scope.row.examineStatus == 'OK_ONE') &&
+                    $checkBtnRole('examine', $route.meta.roles)
                   "
                   @click="examineFn(scope.row.id)"
                   type="text"
@@ -262,8 +264,9 @@
                 >
                 <el-button
                   v-if="
-                    scope.row.examineStatus == 'WAIT' ||
-                    scope.row.examineStatus == 'SAVE'
+                    (scope.row.examineStatus == 'WAIT' ||
+                      scope.row.examineStatus == 'SAVE') &&
+                    $checkBtnRole('edit', $route.meta.roles)
                   "
                   type="text"
                   class="textColor"

+ 1 - 0
src/views/finance/credit_list.vue

@@ -112,6 +112,7 @@
                 <el-button
                   type="text"
                   class="textColor"
+                  v-if="$checkBtnRole('edit', $route.meta.roles)"
                   @click="editFn(scope.row)"
                   >设置额度</el-button
                 >

+ 13 - 4
src/views/finance/rebate_list.vue

@@ -404,21 +404,29 @@
                 <el-button
                   type="text"
                   class="textColor"
-                  v-if="!isCustomer"
+                  v-if="!isCustomer && $checkBtnRole('edit', $route.meta.roles)"
                   @click="editFn(scope.row.rebateOrderId)"
                   >编辑</el-button
                 >
                 <el-button
                   type="text"
                   class="textColor"
-                  v-show="scope.row.examineStatus == 'SAVE' && !isCustomer"
+                  v-show="
+                    scope.row.examineStatus == 'SAVE' &&
+                    !isCustomer &&
+                    $checkBtnRole('apply', $route.meta.roles)
+                  "
                   @click="applyFn(scope.row.rebateOrderId)"
                   >申请</el-button
                 >
                 <el-button
                   type="text"
                   class="textColor"
-                  v-show="scope.row.examineStatus == 'WAIT' && !isCustomer"
+                  v-show="
+                    scope.row.examineStatus == 'WAIT' &&
+                    !isCustomer &&
+                    $checkBtnRole('examine', $route.meta.roles)
+                  "
                   @click="examineFn(scope.row.rebateOrderId)"
                   >审核</el-button
                 >
@@ -429,7 +437,8 @@
                     (scope.row.examineStatus == 'OK_ONE' ||
                       scope.row.examineStatus == 'OK' ||
                       scope.row.examineStatus == 'FAIL') &&
-                    !isCustomer
+                    !isCustomer &&
+                    $checkBtnRole('examine', $route.meta.roles)
                   "
                   @click="reviewFn(scope.row.rebateOrderId)"
                   >复核</el-button

+ 3 - 2
src/views/finance/receivable_list.vue

@@ -222,8 +222,9 @@
               <template slot-scope="scope">
                 <el-button
                   v-show="
-                    scope.row.examineStatus == 'WAIT' ||
-                    scope.row.examineStatus == 'FAIL'
+                    (scope.row.examineStatus == 'WAIT' ||
+                      scope.row.examineStatus == 'FAIL') &&
+                    $checkBtnRole('examine', $route.meta.roles)
                   "
                   type="text"
                   class="textColor"

+ 6 - 1
src/views/finance/wallet.vue

@@ -138,7 +138,12 @@
             show-overflow-tooltip
           >
             <template v-slot="{ row }">
-              <el-button type="text" class="textColor" @click="editFn(row)">
+              <el-button
+                v-if="$checkBtnRole('edit', $route.meta.roles)"
+                type="text"
+                class="textColor"
+                @click="editFn(row)"
+              >
                 修改
               </el-button>
             </template>