Просмотр исходного кода

Merge branch 'develop_yh39' of jianguan-web/qpls-md-html into pre-release

李磊 1 год назад
Родитель
Сommit
9c37125fd5

+ 1 - 1
public/version.json

@@ -1,5 +1,5 @@
 {
   "message": "发现有新版本发布,确定更新系统?",
   "vendorJsVersion": "",
-  "version": 1716257856508
+  "version": 1716369421306
 }

+ 2 - 1
src/store/modules/user.js

@@ -17,7 +17,8 @@ const user = {
     changeOrg: '',
     settleAccountFlag: 0, // 结算账户管理是否开启
     isShowSpecialPrice: 0, // 是否显示特约价
-    dealerSupplierFlag: 0 // 是否是省仓用户
+    dealerSupplierFlag: 0 ,// 是否是省仓用户
+    dealerLevel: ''  // 经销商级别
   },
 
   mutations: {

+ 8 - 5
src/views/Home.vue

@@ -351,7 +351,8 @@ import { mapGetters, mapActions } from 'vuex'
 import ResetPwd from '@/views/user/ResetPwd.vue'
 import newProduct from '@/views/productManagement/newProduct/modal.vue'
 import { queryNewProductPage } from '@/api/product'
-import { bizStateCount, bizData, dealerData, findAllLookup } from '@/api/data'
+import { bizStateCount, bizData, dealerData } from '@/api/data'
+
 export default {
   name: 'Home',
   components: { ResetPwd, newProduct },
@@ -787,7 +788,7 @@ export default {
     }
   },
   methods: {
-    ...mapActions(['getAllLookUp','getLookUpDataByCode']),
+    ...mapActions(['getAllLookUp', 'getLookUpDataByCode']),
     hasNewProduct () {
       queryNewProductPage({ pageNo: 1, pageSize: 20, onlineFalg: this.onlineFalg }).then(res => {
         if (res.status == 200) {
@@ -877,22 +878,24 @@ export default {
       dealerData({}).then(res => {
         if (res.status == 200) {
           this.dealerData = res.data
+          this.$store.state.user.dealerLevel = res.data.dealerLevel
         } else {
           this.dealerData = null
+          this.$store.state.user.dealerLevel = ''
         }
       })
     }
   },
   activated () {
     const vm = this
-    
+
     // 请求导航指引合计
     this.getNavCount()
     this.getMerchantData()
-    
+
     // 获取所有数据字典
     const allLookup = sessionStorage.getItem('allLookup')
-    if(!allLookup){
+    if (!allLookup) {
       this.getAllLookUp()
     }
   },

+ 2 - 3
src/views/power/role/menuModal.vue

@@ -146,9 +146,8 @@ export default {
       this.menuData = newValue
       console.log(this.menuData)
       if (newValue) { // 编辑
-        if (this.$store.state.user.isShowSpecialPrice == 1) { // 特约经销商
-          const newChilderArr = this.filterTree(newValue.allMenuList)
-          this.treeData = newChilderArr
+        if (this.$store.state.user.dealerLevel == 'SPECIAL') { // 特约经销商
+          this.treeData = this.filterTree(newValue.allMenuList)
         } else {
           this.treeData = this.menuData.allMenuList
         }

+ 3 - 13
src/views/salesManagement/productPricing/list.vue

@@ -58,9 +58,9 @@
     <div style="padding: 10px 0;text-align: right;">
       <a-checkbox v-model="isCostPrice" v-if="$hasPermissions('M_ShowAllCost')"><span style="display: inline-block;">参考成本价</span></a-checkbox>
       <!-- 特约加盟商不可见市级价 -->
-      <a-checkbox v-model="isCityPrice" v-if="dealerData && dealerData.dealerLevel != 'SPECIAL'&&$hasPermissions('M_ShowAllCityPrice')"><span style="display: inline-block;">市级价</span></a-checkbox>
+      <a-checkbox v-model="isCityPrice" v-if="$store.state.user.dealerLevel != 'SPECIAL'&&$hasPermissions('M_ShowAllCityPrice')"><span style="display: inline-block;">市级价</span></a-checkbox>
       <!-- 是否展示特约价 -->
-      <a-checkbox v-model="isSpecialPrice" v-if="dealerData && dealerData.isShowSpecialPrice == '1'"><span style="display: inline-block;">特约价</span></a-checkbox>
+      <a-checkbox v-model="isSpecialPrice" v-if="$store.state.user.isShowSpecialPrice==1"><span style="display: inline-block;">特约价</span></a-checkbox>
       <a-checkbox v-model="isTerminalPrice"><span style="display: inline-block;">终端价/自定义终端价</span></a-checkbox>
     </div>
     <!-- 列表 -->
@@ -103,7 +103,6 @@ import { commonMixin } from '@/utils/mixin'
 import { STable, VSelect } from '@/components'
 import ProductType from '../../common/productType.js'
 import ProductBrand from '../../common/productBrand.js'
-import { getCurrentDealer } from '@/api/product'
 import { dealerProductPriceList } from '@/api/dealerProduct'
 import productSalesRecordModal from './productSalesRecordModal.vue'
 export default {
@@ -151,8 +150,7 @@ export default {
       isCostPrice: false,
       isCityPrice: false,
       isSpecialPrice: false,
-      isTerminalPrice: false,
-      dealerData: null
+      isTerminalPrice: false
     }
   },
   computed: {
@@ -224,14 +222,6 @@ export default {
       this.$nextTick(() => { // 页面渲染完成后的回调
         _this.setTableH()
       })
-      // 获取当前登录用户经销商等级
-      getCurrentDealer().then(res => {
-        if (res.status == 200) {
-          this.dealerData = res.data
-        } else {
-          this.dealerData = null
-        }
-      })
     },
     setTableH () {
       const tableSearchH = this.$refs.tableSearch.offsetHeight

+ 1 - 1
src/views/salesManagement/salesQuery/queryPart.vue

@@ -81,7 +81,7 @@
           </a-col>
           <a-col flex="auto" style="margin-bottom: 15px;display:flex;align-items:center;">
             <a-checkbox v-model="cost" v-if="$hasPermissions('M_ShowAllCost')" id="salesQuery-cost">成本价</a-checkbox>
-            <a-checkbox v-model="cityPrice" v-if="$hasPermissions('M_ShowAllCityPrice')&&$store.state.user.isShowSpecialPrice==0" id="salesQuery-cityPrice">市级价</a-checkbox>
+            <a-checkbox v-model="cityPrice" v-if="$hasPermissions('M_ShowAllCityPrice')&&$store.state.user.dealerLevel != 'SPECIAL'" id="salesQuery-cityPrice">市级价</a-checkbox>
             <a-checkbox v-model="tyuePrice" v-if="$store.state.user.isShowSpecialPrice==1" id="salesQuery-tyuePrice">特约价</a-checkbox>
             <a-checkbox v-model="zdPrice" id="salesQuery-zdPrice">终端价</a-checkbox>
           </a-col>

+ 1 - 1
src/views/salesManagement/salesQueryNew/chooseProductModal.vue

@@ -114,7 +114,7 @@
                 <a-menu-item v-if="$hasPermissions('M_ShowAllCost')" >
                   <a-checkbox v-model="cost" id="salesQuery-cost">成本价</a-checkbox>
                 </a-menu-item>
-                <a-menu-item v-if="$hasPermissions('M_ShowAllCityPrice')&&$store.state.user.isShowSpecialPrice==0">
+                <a-menu-item v-if="$hasPermissions('M_ShowAllCityPrice')&&$store.state.user.dealerLevel != 'SPECIAL'">
                   <a-checkbox v-model="cityPrice" id="salesQuery-cityPrice">市级价</a-checkbox>
                 </a-menu-item>
                 <a-menu-item v-if="$store.state.user.isShowSpecialPrice==1" >