Browse Source

显示特约价

lilei 3 years ago
parent
commit
b9e42e5ad8

+ 1 - 0
src/store/getters.js

@@ -13,6 +13,7 @@ const getters = {
   authOrgs: state => state.user.authOrgs,
   changeOrg: state => state.user.changeOrg,
   settleAccountFlag:state => state.user.settleAccountFlag,
+  isShowSpecialPrice: state => state.user.isShowSpecialPrice,
   addRouters: state => state.permission.addRouters,
   multiTab: state => state.app.multiTab,
   lang: state => state.i18n.lang,

+ 6 - 0
src/store/modules/user.js

@@ -16,6 +16,7 @@ const user = {
     authOrgs: [],
     changeOrg: '',
     settleAccountFlag: 0, // 结算账户管理是否开启
+    isShowSpecialPrice: 0, // 是否显示特约价
   },
 
   mutations: {
@@ -49,6 +50,9 @@ const user = {
     SET_SETTLEACCOUNT:(state, status) => {
       state.settleAccountFlag = status
     },
+    SET_isShowSpecialPrice:(state, status) => {
+      state.isShowSpecialPrice = status
+    },
   },
 
   actions: {
@@ -68,6 +72,7 @@ const user = {
               commit('SET_AUTHORGS', res.auth_orgs || [])
               commit('SET_NAME', { name: users.userNameCN, welcome: welcome() })
               commit('SET_MUSTCHANGEPWD', users.mustChangePwd)
+              commit('SET_isShowSpecialPrice',users.extInfo.isShowSpecialPrice)
               Vue.ls.set('rolesAccess-qpls-md', { permissionList: users.permCodes }, 7 * 24 * 60 * 60 * 1000)
               commit('SET_AVATAR', res.avatar ? res.avatar : '')
               // 记住密码
@@ -152,6 +157,7 @@ const user = {
           commit('SET_MUSTCHANGEPWD', '')
           commit('SET_AVATAR', '')
           commit('SET_TOKEN', '')
+          commit('SET_isShowSpecialPrice','0')
           commit('SET_ROLES', { permissionList: [] })
           Vue.ls.remove(ACCESS_TOKEN)
           Vue.ls.remove('userName')

+ 3 - 2
src/views/salesManagement/salesQuery/queryPart.vue

@@ -68,7 +68,7 @@
             </a>
             <a-checkbox v-model="cost" v-if="$hasPermissions('M_ShowAllCost')" id="salesQuery-cost">成本价</a-checkbox>
             <a-checkbox v-model="cityPrice" id="salesQuery-cityPrice">市级价</a-checkbox>
-            <a-checkbox v-model="tyuePrice" id="salesQuery-tyuePrice">特约价</a-checkbox>
+            <a-checkbox v-model="tyuePrice" v-if="$store.state.user.isShowSpecialPrice==1" id="salesQuery-tyuePrice">特约价</a-checkbox>
           </a-col>
         </a-row>
       </a-form-model>
@@ -290,7 +290,7 @@ export default {
         if (!this.cost || !this.cityPrice) {
           s = 7
         }
-        arr.splice(s, 0, { title: '特约价', dataIndex: 'dealerProduct.cityPrice', width: '5%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } })
+        arr.splice(s, 0, { title: '特约价', dataIndex: 'dealerProduct.specialPrice', width: '5%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } })
       }
       return arr
     }
@@ -316,6 +316,7 @@ export default {
             data.list[i].salesNums = 1
             data.list[i].currentQty = data.list[i].currentQty || 0
             data.list[i].price = data.list[i].lastSalePrice ? data.list[i].lastSalePrice : data.list[i].salePrice
+            data.list[i].productOrigCode = data.list[i].productOrigCode.trim()
           }
           if (!params.vinCode) {
             _this.vinInfoData = null