Преглед изворни кода

【修改】打印按钮权限控制

莫绍宝 пре 3 година
родитељ
комит
8d0c6d9bbc

+ 1 - 1
src/components/Common/import-button.vue

@@ -62,7 +62,7 @@ export default {
         this.$alert(result.message, '导入成功', {
           confirmButtonText: '确定'
         });
-        this.$emit('importSuccess');
+        this.$emit('importSuccess', result.data);
       }else {
         this.$alert(result.message, '导入失败', {
           confirmButtonText: '确定'

+ 1 - 1
src/views/supply/apply/components/apply_detail.vue

@@ -167,7 +167,7 @@
 
       <div class="page-footer">
         <div class="footer">
-          <el-button  type="primary" icon="el-icon-printer" @click="toPrint" :disabled="detailData.examineStatus !== 'OK'">打 印</el-button>
+          <el-button  type="primary" icon="el-icon-printer" @click="toPrint" :disabled="detailData.examineStatus !== 'OK'" v-if="$checkBtnRole('print', $route.meta.roles)">打 印</el-button>
           <el-popconfirm title="确定关闭吗?" @onConfirm="goBack" style="margin-left: 10px;">
             <el-button slot="reference">关 闭</el-button>
           </el-popconfirm>

+ 1 - 1
src/views/supply/apply/components/engin_detail.vue

@@ -202,7 +202,7 @@
 
       <div class="page-footer">
         <div class="footer">
-          <el-button  type="primary" icon="el-icon-printer" @click="toPrint" :disabled="detailData.examineStatus !== 'OK'">打 印</el-button>
+          <el-button  type="primary" icon="el-icon-printer" @click="toPrint" :disabled="detailData.examineStatus !== 'OK'" v-if="$checkBtnRole('print', $route.meta.roles)">打 印</el-button>
           <el-popconfirm title="确定关闭吗?" @onConfirm="goBack" style="margin-left: 10px;">
             <el-button slot="reference">关 闭</el-button>
           </el-popconfirm>

+ 1 - 1
src/views/supply/deliver/components/commerce_detail.vue

@@ -169,7 +169,7 @@
 
       <div class="page-footer">
         <div class="footer">
-          <el-button  type="primary" icon="el-icon-printer" @click="toPrint">打 印</el-button>
+          <el-button  type="primary" icon="el-icon-printer" @click="toPrint" v-if="$checkBtnRole('print', $route.meta.roles)">打 印</el-button>
           <el-popconfirm title="确定关闭吗?" @onConfirm="goBack" style="margin-left: 10px;">
             <el-button slot="reference">关 闭</el-button>
           </el-popconfirm>

+ 1 - 1
src/views/supply/deliver/components/deliver_detail.vue

@@ -172,7 +172,7 @@
 
       <div class="page-footer">
         <div class="footer">
-          <el-button  type="primary" icon="el-icon-printer" @click="toPrint">打 印</el-button>
+          <el-button  type="primary" icon="el-icon-printer" @click="toPrint" v-if="$checkBtnRole('print', $route.meta.roles)">打 印</el-button>
           <el-popconfirm title="确定关闭吗?" @onConfirm="goBack" style="margin-left: 10px;">
             <el-button slot="reference">关 闭</el-button>
           </el-popconfirm>

+ 1 - 1
src/views/supply/deliver/components/home_detail.vue

@@ -170,7 +170,7 @@
 
       <div class="page-footer">
         <div class="footer">
-          <el-button  type="primary" icon="el-icon-printer" @click="toPrint">打 印</el-button>
+          <el-button  type="primary" icon="el-icon-printer" @click="toPrint" v-if="$checkBtnRole('print', $route.meta.roles)">打 印</el-button>
           <el-popconfirm title="确定关闭吗?" @onConfirm="goBack" style="margin-left: 10px;">
             <el-button slot="reference">关 闭</el-button>
           </el-popconfirm>

+ 1 - 1
src/views/supply/deliver/sum_list.vue

@@ -109,7 +109,7 @@
       <div class="mymain-container">
         <div class="btn-group clearfix">
           <div class="fl">
-            <el-button type="primary" size="mini" @click="toPrint" :disabled="tableSelection.length < 1">打印发货单
+            <el-button type="primary" size="mini" @click="toPrint" v-if="$checkBtnRole('print', $route.meta.roles)" :disabled="tableSelection.length < 1">打印发货单
             </el-button>
             <div class="num" v-if="totalNum">
               当前列表总发货数量:{{ totalNum }}

+ 8 - 0
src/views/supply/engin/components/engin_form.vue

@@ -198,6 +198,9 @@
       <div class="title">货品信息</div>
       <div>
         <el-button type="primary" size="mini" icon="el-icon-plus" @click="openDialog">添加货品</el-button>
+        <el-divider direction="vertical"></el-divider>
+        <ImportButton :imUrl="'engin-info-order/import-item'" @importSuccess="getImportList" :isIcon="false" style="display: inline-block" />
+        <ExportButton :exUrl="'engin-info-order/download'" :exParams="{}" :exText="'下载导入模版'" :isIcon="false" style="display: inline-block" />
       </div>
     </div>
 
@@ -751,6 +754,11 @@ export default {
       this.goodsList.splice(index, 1);
     },
 
+    // 导入产品
+    getImportList(data) {
+      console.log(data);
+    },
+
     clickSubmitForm(type) {
       this.$refs.mainForm.validate((valid) => {
         if (valid) {

+ 1 - 1
src/views/supply/pickup/check.vue

@@ -196,7 +196,7 @@
 
       <div class="page-footer">
         <div class="footer">
-          <el-button type="primary" @click="toPrint" :disabled="tableSelection.length < 1">打印发货单</el-button>
+          <el-button type="primary" @click="toPrint" :disabled="tableSelection.length < 1" v-if="$checkBtnRole('print', $route.meta.roles)">打印发货单</el-button>
         </div>
       </div>