Browse Source

Merge branch 'develop_sale20' of http://git.chelingzhu.com/jianguan-web/jg-ocs-html into develop_sale20

chenrui 2 years ago
parent
commit
0292b44708

+ 1 - 1
public/version.json

@@ -1,4 +1,4 @@
 {
-    "version": "2.2.28",
+    "version": "2.2.35",
     "message": "发现有新版本发布,确定更新系统?"
 }

+ 4 - 2
src/utils/util.js

@@ -192,11 +192,13 @@ export function hasPriceAuth(authNode, priceOptions, userAuthCode){
       codes.push(a[a.length-1])
     }
   })
+  // console.log(codes)
   // 根据拥有的价格权限生成数组标记[1,0,1,0,0],每一位对应一个价格权限
   // 有权限标记1,否则标记0
   priceOptions.map(item => {
     ret.push(codes.includes(item.value)?1:0)
   })
+  // console.log(ret)
   return ret
 }
 // 获取接口对应的价格权限code
@@ -216,14 +218,14 @@ export function getAuthPriceCode (config, router, store) {
     const a = item.split('_')
     return priceOptions.find(k => k.value == a[a.length-1])
   })
-  // console.log(userAuthCode)
-  console.log(authCode)
+
   // 如果有权限code
   if(authCode){
     // 当前正在调用的接口url
     const url = config.url
     // 所有的权限菜单数据
     const authTree = store.state.app.authMenusList
+    
     // 从所有的权限菜单中查找当前权限code对应的权限菜单数据
     const authNode = treeFind(authTree,(item)=>item.code == authCode)
     console.log(authNode)

+ 2 - 2
src/views/productManagement/productInfo/list.vue

@@ -101,8 +101,8 @@
           :loading="loadingDownline"
           @click="handleBatchDownline"
           style="margin: 0 10px;">批量下线</a-button>
-        <a-button type="primary" class="button-info" v-if="$hasPermissions('B_productInfo_batchImport')" style="margin: 0 10px;"> 新增产品导入</a-button>
-        <a-button type="primary" class="button-info" v-if="$hasPermissions('B_offlineProduct_import')" style="margin: 0 10px;"> 下线产品导入</a-button>
+        <a-button type="primary" class="button-error" @click="handleMenuClick({key:'1'})" v-if="$hasPermissions('B_productInfo_batchImport')" style="margin: 0 10px;"> 新增产品导入</a-button>
+        <a-button type="primary" class="button-info" @click="handleMenuClick({key:'2'})" v-if="$hasPermissions('B_offlineProduct_import')" style="margin: 0 10px;"> 下线产品导入</a-button>
         <span style="margin-left: 8px" v-if="$hasPermissions('B_productInfo_batchAudit') || $hasPermissions('B_productInfo_batchLaunch') || $hasPermissions('B_productInfo_batchDownline')">
           <template v-if="rowSelectionInfo && rowSelectionInfo.selectedRowKeys.length>0">{{ `已选 ${rowSelectionInfo.selectedRowKeys.length} 项` }}</template>
         </span>

+ 4 - 2
src/views/productManagement/productNotOnline/list.vue

@@ -51,7 +51,7 @@
                 class="button-warning"
                 @click="handleExport"
                 :disabled="disabled"
-                v-if="$hasPermissions('B_ProductPriceExoprt')"
+                v-if="$hasPermissions('M_productOnlineExport')"
                 id="productInfoList-export">导出</a-button>
               <a @click="advanced=!advanced" style="margin-left: 5px">
                 {{ advanced ? '收起' : '展开' }}
@@ -97,7 +97,7 @@ import { queryOnlinePage, excelOnlineList } from '@/api/product'
 import ProductType from '@/views/common/productType.js'
 import ProductBrand from '@/views/common/productBrand.js'
 export default {
-  name: 'ProductPricingList',
+  name: 'productNotOnlineList',
   mixins: [commonMixin],
   components: { STable, VSelect, rangeDate, ProductBrand, ProductType },
   data () {
@@ -221,10 +221,12 @@ export default {
     //  导出
     handleExport () {
       const _this = this
+      _this.$store.state.app.curActionPermission = 'M_productOnlineExport'
       const params = this.queryParam
       this.spinning = true
       exportExcel(excelOnlineList, params, '产品状态信息导出', function () {
         _this.spinning = false
+        _this.$store.state.app.curActionPermission = ''
       })
     },
     //  产品分类  change