lilei 2 years ago
parent
commit
39fba8cb14
41 changed files with 518 additions and 140 deletions
  1. 79 43
      src/config/router.config.js
  2. 0 1
      src/main.js
  3. 4 1
      src/store/getters.js
  4. 3 0
      src/store/modules/app.js
  5. 3 2
      src/utils/request.js
  6. 49 0
      src/utils/util.js
  7. 17 0
      src/views/Home.vue
  8. 3 9
      src/views/bnSetting/menu/adminMenus.vue
  9. 3 0
      src/views/financialManagement/allocateReturnConfirmation/detailModal.vue
  10. 2 0
      src/views/financialManagement/financialCollection/dispatchModal.vue
  11. 7 9
      src/views/financialManagement/returnConfirmation/detailModal.vue
  12. 7 9
      src/views/financialManagement/warehousingConfirmation/detailModal.vue
  13. 4 1
      src/views/inventoryManagement/inventoryQuery/detailModal.vue
  14. 1 0
      src/views/inventoryManagement/inventoryQuery/exportExcelModal.vue
  15. 2 0
      src/views/inventoryManagement/inventoryQuery/list.vue
  16. 3 7
      src/views/power/role/menuModal.vue
  17. 3 0
      src/views/purchasingManagement/bulkWarehousingOrder/detailModal.vue
  18. 3 1
      src/views/purchasingManagement/bulkWarehousingOrder/list.vue
  19. 7 9
      src/views/purchasingManagement/purchaseReturn/detailModal.vue
  20. 2 1
      src/views/purchasingManagement/purchaseReturn/list.vue
  21. 0 2
      src/views/purchasingManagement/purchaseReturn/purchaseReturnDeatil.vue
  22. 3 1
      src/views/purchasingManagement/purchaseReturn/queryPart.vue
  23. 8 1
      src/views/salesManagement/backorder/detailModal.vue
  24. 40 8
      src/views/salesManagement/examineVerify/list.vue
  25. 2 0
      src/views/salesManagement/matchSendOutOrder/list.vue
  26. 4 3
      src/views/salesManagement/pushOrderManagement/detail.vue
  27. 1 0
      src/views/salesManagement/pushOrderManagement/exportExcelModal.vue
  28. 6 1
      src/views/salesManagement/pushOrderManagement/list.vue
  29. 6 5
      src/views/salesManagement/pushOrderManagement/sendTypeModal.vue
  30. 2 1
      src/views/salesManagement/receiptPrint/printModel.vue
  31. 14 2
      src/views/salesManagement/salesCollection/list.vue
  32. 22 12
      src/views/salesManagement/salesQuery/detail.vue
  33. 8 4
      src/views/salesManagement/salesQuery/list.vue
  34. 0 1
      src/views/salesManagement/salesQuery/printModal.vue
  35. 2 2
      src/views/salesManagement/shortageStatisticsC/list.vue
  36. 2 1
      src/views/salesManagement/shortageStatisticsP/list.vue
  37. 5 3
      src/views/salesManagement/stockPrint/list.vue
  38. 186 0
      src/views/salesManagement/stockPrint/sendTypeModal.vue
  39. 2 0
      src/views/salesReturnManagement/salesReturn/detail.vue
  40. 1 0
      src/views/salesReturnManagement/salesReturn/printModal.vue
  41. 2 0
      src/views/salesReturnManagement/salesReturn/salesReturnEdit.vue

+ 79 - 43
src/config/router.config.js

@@ -148,8 +148,20 @@ export const asyncRouterMap = [
                   title: '销售单详情',
                   icon: 'monitor',
                   hidden: true,
-                  replaceTab: true
-                  // permission: 'M_salesDetail'
+                  replaceTab: true,
+                  permission: 'B_salesDetail'
+                }
+              },
+              {
+                path: 'detail/:sn',
+                name: 'salesDetailAudit',
+                component: () => import(/* webpackChunkName: "salesManagement" */ '@/views/salesManagement/salesQuery/detail.vue'),
+                meta: {
+                  title: '销售单审核',
+                  icon: 'monitor',
+                  hidden: true,
+                  replaceTab: true,
+                  permission: 'B_salesAudit'
                 }
               },
               {
@@ -159,8 +171,8 @@ export const asyncRouterMap = [
                 meta: {
                   title: '新增销售单',
                   icon: 'monitor',
-                  hidden: true
-                  // permission: 'M_salesNew'
+                  hidden: true,
+                  permission: 'B_salesEdit'
                 }
               },
               {
@@ -170,8 +182,8 @@ export const asyncRouterMap = [
                 meta: {
                   title: '编辑销售单',
                   icon: 'monitor',
-                  hidden: true
-                  // permission: 'M_salesNew'
+                  hidden: true,
+                  permission: 'B_salesEdit'
                 }
               },
               {
@@ -182,8 +194,8 @@ export const asyncRouterMap = [
                   title: '下推销售单',
                   icon: 'monitor',
                   replaceTab: true,
-                  hidden: true
-                  // permission: 'M_salesNew'
+                  hidden: true,
+                  permission: 'B_salesDispatch'
                 }
               }
             ]
@@ -219,8 +231,8 @@ export const asyncRouterMap = [
                   title: '下推订单详情',
                   icon: 'vertical-align-bottom',
                   replaceTab: true,
-                  hidden: true
-                  // permission: 'M_outboundList'
+                  hidden: true,
+                  permission: 'B_dispatchDetail'
                 }
               }
             ]
@@ -543,7 +555,8 @@ export const asyncRouterMap = [
                 meta: {
                   title: '销售退货详情',
                   icon: 'fund',
-                  hidden: true
+                  hidden: true,
+                  permission: 'B_salesReturnDetail'
                 }
               },
               {
@@ -553,7 +566,8 @@ export const asyncRouterMap = [
                 meta: {
                   title: '编辑销售退货',
                   icon: 'fund',
-                  hidden: true
+                  hidden: true,
+                  permission: 'B_salesReturnEdit'
                 }
               },
               {
@@ -564,7 +578,8 @@ export const asyncRouterMap = [
                   title: '客服确认',
                   icon: 'fund',
                   replaceTab: true,
-                  hidden: true
+                  hidden: true,
+                  permission: 'B_salesReturnConfirm'
                 }
               }
             ]
@@ -599,7 +614,8 @@ export const asyncRouterMap = [
                 meta: {
                   title: '提货单详情',
                   icon: 'fund',
-                  hidden: true
+                  hidden: true,
+                  permission: 'M_detailPickUp'
                 }
               },
               {
@@ -609,7 +625,8 @@ export const asyncRouterMap = [
                 meta: {
                   title: '新增提货单',
                   icon: 'fund',
-                  hidden: true
+                  hidden: true,
+                  permission: 'B_editPickUp'
                 }
               },
               {
@@ -619,7 +636,8 @@ export const asyncRouterMap = [
                 meta: {
                   title: '编辑提货单',
                   icon: 'fund',
-                  hidden: true
+                  hidden: true,
+                  permission: 'B_editPickUp'
                 }
               }
             ]
@@ -680,7 +698,8 @@ export const asyncRouterMap = [
                   title: '收货',
                   icon: 'fund',
                   hidden: true,
-                  replaceTab: true
+                  replaceTab: true,
+                  permission: 'B_salesReturnReceiving'
                 }
               },
               {
@@ -691,7 +710,8 @@ export const asyncRouterMap = [
                   title: '品检',
                   icon: 'fund',
                   hidden: true,
-                  replaceTab: true
+                  replaceTab: true,
+                  permission: 'B_salesReturnCheck'
                 }
               }
             ]
@@ -739,7 +759,8 @@ export const asyncRouterMap = [
                 meta: {
                   title: '新增散件入库单',
                   icon: 'gold',
-                  hidden: true
+                  hidden: true,
+                  permission: 'B_sparePartsEdit'
                 }
               },
               {
@@ -749,7 +770,8 @@ export const asyncRouterMap = [
                 meta: {
                   title: '编辑散件入库单',
                   icon: 'gold',
-                  hidden: true
+                  hidden: true,
+                  permission: 'B_sparePartsEdit'
                 }
               }
             ]
@@ -784,7 +806,8 @@ export const asyncRouterMap = [
                 meta: {
                   title: '新增采购退货',
                   icon: 'gold',
-                  hidden: true
+                  hidden: true,
+                  permission: 'B_purchaseReturnEdit'
                 }
               },
               {
@@ -794,7 +817,8 @@ export const asyncRouterMap = [
                 meta: {
                   title: '编辑采购退货',
                   icon: 'gold',
-                  hidden: true
+                  hidden: true,
+                  permission: 'B_purchaseReturnEdit'
                 }
               }
             ]
@@ -953,7 +977,8 @@ export const asyncRouterMap = [
                 meta: {
                   title: '财务收款详情',
                   icon: 'monitor',
-                  hidden: true
+                  hidden: true,
+                  permission: 'B_fc_detail'
                 }
               },
               {
@@ -963,7 +988,8 @@ export const asyncRouterMap = [
                 meta: {
                   title: '编辑财务收款',
                   icon: 'monitor',
-                  hidden: true
+                  hidden: true,
+                  permission: 'B_fc_edit'
                 }
               }
             ]
@@ -1036,7 +1062,8 @@ export const asyncRouterMap = [
                 meta: {
                   title: '费用报销单详情',
                   icon: 'monitor',
-                  hidden: true
+                  hidden: true,
+                  permission: 'B_eRdetail'
                 }
               },
               {
@@ -1046,7 +1073,8 @@ export const asyncRouterMap = [
                 meta: {
                   title: '新增费用报销单',
                   icon: 'monitor',
-                  hidden: true
+                  hidden: true,
+                  permission: 'B_ERtEdit'
                 }
               },
               {
@@ -1056,7 +1084,8 @@ export const asyncRouterMap = [
                 meta: {
                   title: '编辑费用报销单',
                   icon: 'monitor',
-                  hidden: true
+                  hidden: true,
+                  permission: 'B_ERtEdit'
                 }
               }
             ]
@@ -1130,8 +1159,8 @@ export const asyncRouterMap = [
                   title: '出入库明细',
                   icon: 'monitor',
                   replaceTab: true,
-                  hidden: true
-                  // permission: 'B_goodsManage_edit'
+                  hidden: true,
+                  permission: 'B_inventoryQuery_rkDetail'
                 }
               }
             ]
@@ -1301,7 +1330,8 @@ export const asyncRouterMap = [
                 meta: {
                   title: '新增智能补货',
                   icon: 'monitor',
-                  hidden: true
+                  hidden: true,
+                  permission: 'B_intelligentReplenishment_edit'
                 }
               },
               {
@@ -1311,7 +1341,8 @@ export const asyncRouterMap = [
                 meta: {
                   title: '编辑智能补货',
                   icon: 'monitor',
-                  hidden: true
+                  hidden: true,
+                  permission: 'B_intelligentReplenishment_edit'
                 }
               },
               {
@@ -1321,7 +1352,8 @@ export const asyncRouterMap = [
                 meta: {
                   title: '基础信息设置',
                   icon: 'monitor',
-                  hidden: true
+                  hidden: true,
+                  permission: 'B_intelligentReplenishment_set'
                 }
               },
               {
@@ -1331,7 +1363,7 @@ export const asyncRouterMap = [
                 meta: {
                   title: '确认导入',
                   icon: 'monitor',
-                  hidden: true
+                  hidden: true,
                 }
               },
               {
@@ -1399,8 +1431,8 @@ export const asyncRouterMap = [
                 meta: {
                   title: '新增调拨单',
                   icon: 'pull-request',
-                  hidden: true
-                  // permission: 'B_goodsManage_edit'
+                  hidden: true,
+                  permission: 'M_transferOut_edit'
                 }
               },
               {
@@ -1410,8 +1442,8 @@ export const asyncRouterMap = [
                 meta: {
                   title: '编辑调拨单',
                   icon: 'pull-request',
-                  hidden: true
-                  // permission: 'B_goodsManage_edit'
+                  hidden: true,
+                  permission: 'M_transferOut_edit'
                 }
               },
               {
@@ -1421,8 +1453,8 @@ export const asyncRouterMap = [
                 meta: {
                   title: '调拨单详情',
                   icon: 'pull-request',
-                  hidden: true
-                  // permission: 'B_goodsManage_edit'
+                  hidden: true,
+                  permission: 'M_transferOut_detail'
                 }
               }
             ]
@@ -1507,7 +1539,8 @@ export const asyncRouterMap = [
                 meta: {
                   title: '编辑调拨退货单(抓单)',
                   icon: 'pull-request',
-                  hidden: true
+                  hidden: true,
+                  permission: 'B_transferReturnEdit'
                 }
               },
               {
@@ -1517,7 +1550,8 @@ export const asyncRouterMap = [
                 meta: {
                   title: '编辑调拨退货单(不抓单)',
                   icon: 'pull-request',
-                  hidden: true
+                  hidden: true,
+                  permission: 'B_transferReturnEdit'
                 }
               },
               {
@@ -1528,7 +1562,8 @@ export const asyncRouterMap = [
                   title: '调拨退货单详情',
                   icon: 'pull-request',
                   replaceTab: true,
-                  hidden: true
+                  hidden: true,
+                  permission: 'M_transferReturnDetail'
                 }
               },
               {
@@ -1539,7 +1574,8 @@ export const asyncRouterMap = [
                   title: '调拨退货品检',
                   icon: 'fund',
                   replaceTab: true,
-                  hidden: true
+                  hidden: true,
+                  permission: 'M_transferReturnCheck'
                 }
               }
             ]

+ 0 - 1
src/main.js

@@ -46,7 +46,6 @@ Vue.prototype.$hasPermissions = function (value) {
   let isExist = false
   const roles = store.getters.roles
   const permissionList = roles.permissionList
-  // console.log(permissionsStr,'permissionsStr')
   if (permissionList == undefined || permissionList == null) {
     return false
   }

+ 4 - 1
src/store/getters.js

@@ -18,7 +18,10 @@ const getters = {
   loadingStatus: state => state.app.loadingStatus,
   employeeList: state => state.app.employeeList,
   tempBillOfData: state => state.app.tempBillOfData,
-  returnReason: state => state.app.returnReason
+  returnReason: state => state.app.returnReason,
+  authMenusList: state => state.app.authMenusList,
+  priceAuthOptions: state => state.app.priceAuthOptions,
+  curActionPermission: state => state.app.curActionPermission
 }
 
 export default getters

+ 3 - 0
src/store/modules/app.js

@@ -36,6 +36,9 @@ const app = {
     employeeList: [], // 申请人列表
     returnReason: [], // 申请退货原因列表
     tempBillOfData: null, // 临时存储收货单数据
+    authMenusList: [], // 权限菜单数据
+    priceAuthOptions:[], // 价格权限选项
+    curActionPermission: '', // 当前激活状态的权限码
   },
   mutations: {
     SET_SIDEBAR_TYPE: (state, type) => {

+ 3 - 2
src/utils/request.js

@@ -4,6 +4,7 @@ import store from '@/store'
 import router from '@/router'
 import notification from 'ant-design-vue/es/notification'
 import modal from 'ant-design-vue/es/modal'
+import { getAuthPriceCode } from './util'
 import { VueAxios } from './axios'
  
 // 创建 axios 实例
@@ -95,12 +96,12 @@ const err = (error) => {
 
 // request interceptor
 service.interceptors.request.use(config => {
-  console.log(config)
-  console.log(router)
+  const authPrice = getAuthPriceCode(config, router, store)
   const token = store.getters.token
   if (token) {
     config.headers['access-token'] = token // 让每个请求携带自定义 token 请根据实际情况自行修改
   }
+  config.headers['auth-price'] = authPrice.join(',') // 价格权限
   config.retry = 3
   config.retryDelay = 1000
   store.commit('SET_loadingStatus', true)

+ 49 - 0
src/utils/util.js

@@ -70,4 +70,53 @@ export function oneOf (value, validList) {
     }
   }
   return false
+}
+// 树查找
+export function treeFind (tree, func) {
+  for (const data of tree) {
+    if (func(data)) return data
+    if (data.children) {
+      const res = treeFind(data.children, func)
+      if (res) return res
+    }
+  }
+  return null
+}
+// 是否有价格权限
+export function hasPriceAuth(authNode, priceOptions){
+  const codes = []
+  const ret = []
+  // 过滤当前节点下的非价格权限菜单
+  authNode.map(item=>{
+    const a = item.code.split('_')
+    const hasCode = priceOptions.find(k => k.value == a[a.length-1])
+    if(hasCode){
+      codes.push(a[a.length-1])
+    }
+  })
+  // 生成权限参数
+  priceOptions.map(item => {
+    ret.push(codes.includes(item.value)?1:0)
+  })
+  return ret
+}
+// 获取接口对应的价格权限code
+export function getAuthPriceCode (config, router, store) {
+  const permission = router.history.current.meta.permission
+  const curActionPermission = store.state.app.curActionPermission
+  const priceOptions = store.state.app.priceAuthOptions
+  const authCode = curActionPermission || permission
+  console.log(authCode)
+  if(authCode){
+    const url = config.url
+    const authTree = store.state.app.authMenusList
+    const authNode = treeFind(authTree,(item)=>item.code == authCode)
+    console.log(authNode)
+    const hasReqUrl = authNode.permission.split(',').find(item => url.replace(/\//g,'_').indexOf(item)>=0)
+    if(hasReqUrl&&authNode.children&&authNode.children.length){
+      return hasPriceAuth(authNode.children,priceOptions)
+    }
+    return []
+  }
+  return []
 }

+ 17 - 0
src/views/Home.vue

@@ -37,6 +37,7 @@ 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 { getYyMenuList } from '@/api/menu.js'
 export default {
   name: 'Home',
   mixins: [commonMixin],
@@ -56,6 +57,14 @@ export default {
   },
   methods: {
     ...mapActions(['GetEmployeeList', 'getReturnReasonData']),
+    // 获取菜单树列表
+    getYyMenuList () {
+      getYyMenuList().then(res => {
+        if (res.status == 200) {
+          this.$store.state.app.authMenusList = res.data
+        }
+      })
+    },
     hasNewProduct () {
       this.GetEmployeeList()
       queryNewProductPage({ pageNo: 1, pageSize: 20, onlineFalg: this.onlineFalg }).then(res => {
@@ -99,6 +108,14 @@ export default {
         vm.openResetPwd = true
       }
       vm.getReturnReasonData('RETURN_REASON')
+      vm.getYyMenuList()
+      vm.$store.state.app.priceAuthOptions=[
+        {label:'售价',value:'salesPrice'},
+        {label:'成本价',value:'costPrice'},
+        {label:'省级价',value:'provincePrice'},
+        {label:'市级价',value:'cityPrice'},
+        {label:'特约价',value:'specialPrice'}
+      ]
     })
   }
 }

+ 3 - 9
src/views/bnSetting/menu/adminMenus.vue

@@ -159,13 +159,7 @@ export default {
   props: {},
   data () {
     return {
-      priceOptions:[
-        {label:'售价',value:'salesPrice'},
-        {label:'成本价',value:'costPrice'},
-        {label:'省级价',value:'provincePrice'},
-        {label:'市级价',value:'cityPrice'},
-        {label:'特约价',value:'specialPrice'}
-      ],
+      priceOptions:[],
       authPrice: [],
       treeData: [],
       dataList: [],
@@ -342,10 +336,9 @@ export default {
     // 获取菜单树列表
     getYyMenuList () {
       getYyMenuList().then(res => {
-        console.log(res, 'res1111111')
         if (res.status == 200) {
           this.treeData = res.data
-          console.log(this.treeData, 'this.treeData')
+          this.$store.state.app.authMenusList = res.data
         }
       })
     },
@@ -449,6 +442,7 @@ export default {
     }
   },
   mounted () {
+    this.priceOptions = this.$store.state.app.priceAuthOptions
   },
   beforeCreate () {
     this.form = this.$form.createForm(this, { name: 'menu' })

+ 3 - 0
src/views/financialManagement/allocateReturnConfirmation/detailModal.vue

@@ -46,6 +46,9 @@ export default {
     isShow (newValue, oldValue) {
       if (!newValue) {
         this.$emit('close')
+        this.$store.state.app.curActionPermission = ''
+      }else{
+        this.$store.state.app.curActionPermission = 'M_allocateReturnConfirmationDetail'
       }
     }
   }

+ 2 - 0
src/views/financialManagement/financialCollection/dispatchModal.vue

@@ -122,6 +122,7 @@ export default {
       this.$emit('close')
       this.$refs.table.clearTable()
       this.detailData = null
+      this.$store.state.app.curActionPermission = ''
     },
     setDetail (data) {
       this.detailData = data
@@ -135,6 +136,7 @@ export default {
       if (!nVal) {
         this.handleCommonCancel()
       } else {
+        this.$store.state.app.curActionPermission = 'B_glDispatch'
         this.$nextTick(() => {
           this.$refs.table.refresh(true)
         })

+ 7 - 9
src/views/financialManagement/returnConfirmation/detailModal.vue

@@ -133,15 +133,13 @@ export default {
         this.$emit('close')
         this.detailData = null
         this.$refs.table.clearTable()
-      }
-    },
-    itemSn (newValue, oldValue) {
-      if (this.isShow && newValue) {
-        const _this = this
-        _this.getDetail()
-        setTimeout(() => {
-          _this.$refs.table.refresh(true)
-        }, 200)
+        this.$store.state.app.curActionPermission = ''
+      }else{
+        this.$store.state.app.curActionPermission = 'B_returnConfirmation_detail'
+        this.getDetail()
+        this.$nextTick(()=>{
+          this.$refs.table.refresh(true)
+        })
       }
     }
   }

+ 7 - 9
src/views/financialManagement/warehousingConfirmation/detailModal.vue

@@ -18,7 +18,7 @@
         class="sTable"
         ref="table"
         size="small"
-        :rowKey="(record) => record.stockPutSn"
+        :rowKey="(record) => record.id"
         :columns="columns"
         :data="loadData"
         :defaultLoadData="false"
@@ -100,14 +100,12 @@ export default {
       if (!newValue) {
         this.$emit('close')
         this.$refs.table.clearTable()
-      }
-    },
-    itemSn (newValue, oldValue) {
-      if (this.isShow && newValue) {
-        const _this = this
-        setTimeout(() => {
-          _this.$refs.table.refresh(true)
-        }, 200)
+        this.$store.state.app.curActionPermission = ''
+      }else{
+        this.$store.state.app.curActionPermission = 'B_warehousingConfirmationDetail'
+        this.$nextTick(()=>{
+          this.$refs.table.refresh(true)
+        })
       }
     }
   }

+ 4 - 1
src/views/inventoryManagement/inventoryQuery/detailModal.vue

@@ -34,10 +34,12 @@
 </template>
 
 <script>
+import { commonMixin } from '@/utils/mixin'
 import { STable } from '@/components'
 import { stockDetailList, stockDetailCount } from '@/api/stock'
 export default {
   name: 'InventoryQueryDetailModal',
+  mixins: [commonMixin],
   components: { STable },
   props: {
     openModal: { //  弹框显示状态
@@ -132,12 +134,13 @@ export default {
     //  父页面传过来的弹框状态
     openModal (newValue, oldValue) {
       this.isShow = newValue
-      this.resetPage()
     },
     //  重定义的弹框状态
     isShow (newValue, oldValue) {
       if (!newValue) {
+        this.resetPage()
         this.$emit('close')
+        this.$store.state.app.curActionPermission = ''
       }
     }
   }

+ 1 - 0
src/views/inventoryManagement/inventoryQuery/exportExcelModal.vue

@@ -66,6 +66,7 @@ export default {
     // 确认
     handleSave (isPrint) {
       const _this = this
+      this.$store.state.app.curActionPermission = 'B_inventoryQuery_export'
       this.$refs.ruleForm.validate(valid => {
         if (valid) {
           _this.$emit('ok', _this.form.exportType)

+ 2 - 0
src/views/inventoryManagement/inventoryQuery/list.vue

@@ -246,6 +246,7 @@ export default {
     },
     //  库存详情
     goDetail (row) {
+      this.$store.state.app.curActionPermission = 'B_inventoryQuery_detail'
       this.itemId = row.stockSn
       this.openModal = true
     },
@@ -273,6 +274,7 @@ export default {
       hdExportExcel(stockExport, params, '库存查询', function () {
         _this.exportLoading = false
         _this.spinning = false
+        _this.$store.state.app.curActionPermission = ''
       })
     },
     //  产品分类  change

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

@@ -66,13 +66,7 @@ export default {
     return {
       spinning: false,
       treeData: [],
-      priceOptions:[
-        {label:'售价',value:'salesPrice'},
-        {label:'成本价',value:'costPrice'},
-        {label:'省级价',value:'provincePrice'},
-        {label:'市级价',value:'cityPrice'},
-        {label:'特约价',value:'specialPrice'}
-      ],
+      priceOptions:[],
       titleText: '',
       expandedKeys: [],
       autoExpandParent: true,
@@ -226,6 +220,8 @@ export default {
         this.checkedKeys = []
         this.expandedKeys = []
         this.titleText = '新增角色'
+      }else{
+        this.priceOptions = this.$store.state.app.priceAuthOptions
       }
     },
     nowData: {

+ 3 - 0
src/views/purchasingManagement/bulkWarehousingOrder/detailModal.vue

@@ -140,6 +140,9 @@ export default {
     isShow (newValue, oldValue) {
       if (!newValue) {
         this.$emit('close')
+        this.$store.state.app.curActionPermission = ''
+      }else{
+        this.$store.state.app.curActionPermission = 'B_sparePartsDetail'
       }
     },
     itemSn (newValue, oldValue) {

+ 3 - 1
src/views/purchasingManagement/bulkWarehousingOrder/list.vue

@@ -231,12 +231,14 @@ export default {
     //  导出
     handleExport () {
       const _this = this
+      this.$store.state.app.curActionPermission = 'B_sparePartsExport'
       _this.exportLoading = true
       _this.spinning = true
-      hdExportExcel(sparePartsDetailExport, {showCostFlag:this.$hasPermissions('B_sparePartsExport_costPrice'),..._this.queryParam}, '散件入库明细', function () {
+      hdExportExcel(sparePartsDetailExport, _this.queryParam , '散件入库明细', function () {
         _this.exportLoading = false
         _this.spinning = false
         _this.showExport = true
+        _this.$store.state.app.curActionPermission = ''
       })
     },
     //  新增

+ 7 - 9
src/views/purchasingManagement/purchaseReturn/detailModal.vue

@@ -148,19 +148,17 @@ export default {
     isShow (newValue, oldValue) {
       if (!newValue) {
         this.$emit('close')
+        this.detailsData = null
+        this.statisticsObj = null
         this.$refs.tableDetail.clearTable()
+        this.$store.state.app.curActionPermission = ''
       } else {
+        this.$store.state.app.curActionPermission = 'B_purchaseReturnDetail'
         this.getStatisticsData()
         this.getBasicsInfo()
-        this.$refs.tableDetail.refresh(true)
-      }
-    },
-    itemSn (newValue, oldValue) {
-      if (this.isShow && newValue) {
-        const _this = this
-        setTimeout(() => {
-          _this.$refs.tableDetail.refresh(true)
-        }, 200)
+        this.$nextTick(()=>{
+          this.$refs.tableDetail.refresh(true)
+        })
       }
     }
   }

+ 2 - 1
src/views/purchasingManagement/purchaseReturn/list.vue

@@ -228,13 +228,14 @@ export default {
     //  导出
     handleExport () {
       const _this = this
+      _this.$store.state.app.curActionPermission = 'B_purchaseReturnExport'
       _this.exportLoading = true
       _this.spinning = true
-      _this.queryParam.showCostFlag = this.$hasPermissions('B_purchaseReturnExport_costPrice') ? 1 : 0
       hdExportExcel(sparePartsReturnExportDetail, _this.queryParam, '采购退货', function () {
         _this.exportLoading = false
         _this.spinning = false
         _this.showExport = true
+        _this.$store.state.app.curActionPermission = ''
       })
     },
     //  新增

+ 0 - 2
src/views/purchasingManagement/purchaseReturn/purchaseReturnDeatil.vue

@@ -41,8 +41,6 @@
         </a-collapse>
       </a-card>
       <a-card size="small" :bordered="false" class="salesReturnEdit-cont">
-        <!-- <div>已入库产品信息</div>
-        <a-divider /> -->
         <queryPart ref="partQuery" :newLoading="isInster" :addMoreLoading="addMoreLoading" @add="saveProduct" @bachAdd="saveMoreProduct"></queryPart>
       </a-card>
       <a-card size="small" :bordered="false" class="salesReturnEdit-cont">

+ 3 - 1
src/views/purchasingManagement/purchaseReturn/queryPart.vue

@@ -219,7 +219,9 @@ export default {
     },
     // 批量添加
     handleBatchAdd () {
-      if (this.rowSelectionInfo.selectedRowKeys.length == 0) {
+      console.log(this.rowSelectionInfo)
+      const row = this.rowSelectionInfo&&this.rowSelectionInfo.selectedRowKeys
+      if (!row || row.length==0) {
         this.$message.warning('请先选择要添加的产品!')
         return
       }

+ 8 - 1
src/views/salesManagement/backorder/detailModal.vue

@@ -125,9 +125,13 @@ export default {
     // 打印预览/快捷打印
     handlePrint (type) {
       const _this = this
+      this.$store.state.app.curActionPermission = 'B_oosPrint'
       _this.spinning = true
       // 打印或预览
-      printFun(oosDetailPrint, { sn: this.itemSn }, type, '缺货单', () => { _this.spinning = false })
+      printFun(oosDetailPrint, { sn: this.itemSn }, type, '缺货单', () => { 
+        _this.spinning = false 
+        _this.$store.state.app.curActionPermission = 'B_oosDetail'
+      })
     }
   },
   watch: {
@@ -141,6 +145,9 @@ export default {
         this.$emit('close')
         this.detailData = null
         this.$refs.table.clearTable()
+        this.$store.state.app.curActionPermission = ''
+      }else{
+        this.$store.state.app.curActionPermission = 'B_oosDetail'
       }
     },
     itemSn (newValue, oldValue) {

+ 40 - 8
src/views/salesManagement/examineVerify/list.vue

@@ -98,9 +98,15 @@
         :scroll="{ y:tableHeight }"
         :defaultLoadData="false"
         bordered>
-        <!-- 下推单号 -->
+       
+        <!-- 销售单号 -->
+        <template slot="salesBillNo" slot-scope="text, record">
+          <span class="link-bule" v-if="$hasPermissions('B_salesDetail')" @click="handleDetail(record,0)">{{ record.salesBillNo }}</span>
+          <span v-else>{{ record.salesBillNo }}</span>
+        </template>
+        <!-- 备货单号 -->
         <template slot="dispatchBillNo" slot-scope="text, record">
-          <span class="link-bule" v-if="$hasPermissions('B_dispatchDetail')" @click="handleDetail(record)">{{ record.dispatchBillNo }}</span>
+          <span class="link-bule" v-if="$hasPermissions('B_dispatchDetail')" @click="handleDetail(record,1)">{{ record.dispatchBillNo }}</span>
           <span v-else>{{ record.dispatchBillNo }}</span>
         </template>
         <!-- 操作 -->
@@ -131,12 +137,26 @@
       :itemData="auditInfo"
       @close="visibleAuditReject=false"
       @ok="auditReject" />
+    <!-- 查看销售单或备货单详情 -->
+    <commonModal
+      :modalTit="detailType?'备货单详情':'销售单详情'"
+      bodyPadding="10px"
+      width="70%"
+      :showFooter="false"
+      :openModal="showDetailModal"
+      @cancel="cancelDetail">
+      <salesDetail v-if="detailType==0" ref="salesDetail" :bizSn="bizSn"></salesDetail>
+      <dispatchDetail v-if="detailType==1" ref="dispatchDetail" :bizSn="bizSn"></dispatchDetail>
+    </commonModal>
   </a-card>
 </template>
 
 <script>
 import { commonMixin } from '@/utils/mixin'
 import moment from 'moment'
+import commonModal from '@/views/common/commonModal.vue'
+import salesDetail from '@/views/salesManagement/salesQuery/detail.vue'
+import dispatchDetail from '@/views/salesManagement/pushOrderManagement/detail.vue'
 import getDate from '@/libs/getDate.js'
 import subarea from '@/views/common/subarea.js'
 import Area from '@/views/common/area.js'
@@ -149,12 +169,15 @@ import { dispatchlBhshList, dispatchQueryBhshCount, dispatchStockUpAduit } from
 export default {
   name: 'ExamineVerifyList',
   mixins: [commonMixin],
-  components: { STable, VSelect, dealerSubareaScopeList, rangeDate, auditModal, subarea, auditRejectModal, Area },
+  components: { STable, VSelect, dealerSubareaScopeList, rangeDate, commonModal, salesDetail, dispatchDetail, auditModal, subarea, auditRejectModal, Area },
   data () {
     return {
       spinning: false,
       advanced: false, // 高级搜索 展开/关闭
       tableHeight: 0,
+      showDetailModal: false,
+      detailType: 2,
+      bizSn: null,
       time: [
         moment(getDate.getThreeMonthDays().starttime, 'YYYY-MM-DD'),
         moment(getDate.getCurrMonthDays().endtime, 'YYYY-MM-DD')
@@ -214,8 +237,8 @@ export default {
         { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
         { title: '创建时间', dataIndex: 'createDate', width: '7%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '单据来源', dataIndex: 'salesBillEntity.salesBillSourceDictValue', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '销售单号', dataIndex: 'salesBillNo', width: '12%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '备货单号', scopedSlots: { customRender: 'dispatchBillNo' }, width: '12%', align: 'center' },
+        { title: '销售单号', scopedSlots: { customRender: 'salesBillNo' }, width: '10%', align: 'center' },
+        { title: '备货单号', scopedSlots: { customRender: 'dispatchBillNo' }, width: '10%', align: 'center' },
         { title: '出库单号', dataIndex: 'stockOutNo', width: '12%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '客户名称', dataIndex: 'buyerName', width: '11%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '数量', dataIndex: 'totalQty', width: '5%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
@@ -308,9 +331,18 @@ export default {
       }
       this.auditFun(params)
     },
-    //  详情
-    handleDetail (row) {
-      this.$router.push({ name: 'pushOrderDetail', params: { sn: row.dispatchBillSn, type: 'examineVerify' } })
+    // 详情
+    handleDetail (row, type) {
+      this.detailType = type
+      this.bizSn = type == 0 ? row.salesBillSn : row.dispatchBillSn
+      this.$store.state.app.curActionPermission = type == 0 ? 'B_salesDetail' : 'B_dispatchDetail'
+      this.showDetailModal = true
+    },
+    cancelDetail () {
+      this.showDetailModal = false
+      this.detailType = 2
+      this.bizSn = null
+      this.$store.state.app.curActionPermission = ''
     },
     pageInit () {
       const _this = this

+ 2 - 0
src/views/salesManagement/matchSendOutOrder/list.vue

@@ -254,12 +254,14 @@ export default {
     handleDetail (row, type) {
       this.detailType = type
       this.bizSn = type == 0 ? row.salesBillSn : row.dispatchBillSn
+      this.$store.state.app.curActionPermission = type == 0 ? 'B_salesDetail' : 'B_dispatchDetail'
       this.showDetailModal = true
     },
     cancelDetail () {
       this.showDetailModal = false
       this.detailType = 2
       this.bizSn = null
+      this.$store.state.app.curActionPermission = ''
     },
     // 对单
     handleAudit (row) {

+ 4 - 3
src/views/salesManagement/pushOrderManagement/detail.vue

@@ -228,12 +228,12 @@ export default {
       const params = {
         dispatchBillSn: this.outBizSubSn || this.bizSn || this.$route.params.sn,
         printType: priceType,
-        showPriceFlag: this.$hasPermissions('B_dispatchExport_salesPrice'),
         ...data
       }
       this.spinning = true
       exportExcel(dispatchDetailExcel, params, fileName, function () {
         _this.spinning = false
+        _this.$store.state.app.curActionPermission = ''
       })
     },
     // 发货分类导出
@@ -250,6 +250,7 @@ export default {
           dispatchBillSn: this.detailData.dispatchBillSn,
           dispatchBillNo: this.detailData.dispatchBillNo
         }
+        this.$store.state.app.curActionPermission = 'B_dispatchPrint'
         this.handlePrintOk(params, '发货', 'preview')
       } else if (type == 'DISPATCH_BILL_TYPE') { // 发货分类打印
         this.openModal = true
@@ -277,9 +278,9 @@ export default {
           Object.assign(params, obj || {}),
           type,
           taskName,
-          (res) => {
-            _this.$message.info(res.message)
+          () => { 
             _this.spinning = false
+            _this.$store.state.app.curActionPermission = ''
           },
           {
             billType: 'DISPATCH',

+ 1 - 0
src/views/salesManagement/pushOrderManagement/exportExcelModal.vue

@@ -68,6 +68,7 @@ export default {
     // 确认
     handleSave (isPrint) {
       const _this = this
+      _this.$store.state.app.curActionPermission = 'B_dispatchExport'
       this.$refs.ruleForm.validate(valid => {
         if (valid) {
           _this.$emit('ok', _this.form.priceType, {}, '下推产品')

+ 6 - 1
src/views/salesManagement/pushOrderManagement/list.vue

@@ -176,7 +176,7 @@
         width="70%"
         :showFooter="false"
         :openModal="showDetailModal"
-        @cancel="showDetailModal = false">
+        @cancel="closeDetailModal">
         <salesDetail v-if="showDetailModal" ref="salesDetail" :bizSn="bizSn"></salesDetail>
       </commonModal>
       <!-- 发货说明 -->
@@ -306,12 +306,17 @@ export default {
     // 详情
     handleDetail (row, type) {
       if (type == 0) {
+        this.$store.state.app.curActionPermission = 'B_salesDetail'
         this.bizSn = row.salesBillSn
         this.showDetailModal = true
       } else {
         this.$router.push({ name: 'pushOrderDetail', params: { sn: row.dispatchBillSn, type: 'pushOrder' } })
       }
     },
+    closeDetailModal(){
+      this.showDetailModal = false
+      this.$store.state.app.curActionPermission = ''
+    },
     // 查看发货说明
     handleExplainInfo (row) {
       this.tipData = row

+ 6 - 5
src/views/salesManagement/pushOrderManagement/sendTypeModal.vue

@@ -6,7 +6,7 @@
     class="pushOrderManagement-print-type-modal"
     title="发货分类打印"
     v-model="isShow"
-    @cancel="isShow=false"
+    @cancel="handleCancel"
     :width="600">
     <a-spin :spinning="spinning" tip="Loading...">
       <a-form-model
@@ -55,19 +55,19 @@
           class="button-info"
           id="pushOrderManagement-print-save"
           v-if="nowType=='print'&&$hasPermissions('B_dispatchTypePrintView')"
-          @click="handleSave('preview')"
+          @click="handleSave('preview','B_dispatchTypePrintView')"
           style="margin-left: 15px;">打印预览</a-button>
         <a-button
           type="primary"
           id="pushOrderManagement-print-save"
           v-if="!hasNoPrint&&nowType=='print'&&$hasPermissions('B_dispatchTypePrint')"
-          @click="handleSave('print')"
+          @click="handleSave('print','B_dispatchTypePrint')"
           style="margin-left: 10px;">确定打印</a-button>
         <a-button
           type="primary"
           id="pushOrderManagement-print-save"
           v-if="nowType=='export'"
-          @click="handleSave('export')"
+          @click="handleSave('export','B_dispatchTypeExport')"
           style="margin-left: 10px;">确定导出</a-button>
       </div>
     </a-spin>
@@ -117,8 +117,9 @@ export default {
   },
   methods: {
     // 确认
-    handleSave (type) {
+    handleSave (type, authCode) {
       const _this = this
+      this.$store.state.app.curActionPermission = authCode
       this.$refs.ruleForm.validate(valid => {
         if (valid) {
           const item = this.typeList.find(item => item.id == this.form.id)

+ 2 - 1
src/views/salesManagement/receiptPrint/printModel.vue

@@ -129,7 +129,7 @@ export default {
         }
         htmlStr.push(printCons[i].t)
       }
-
+      this.$store.state.app.curActionPermission = 'B_SkPrint'
       // html, type, callback, printLogParams
       jGPlPrint(htmlStr, 'preview', function (res) {
         _this.handleCommonCancel()
@@ -161,6 +161,7 @@ export default {
       this.detail = null
       this.financeBookList = []
       this.printNums = []
+      this.$store.state.app.curActionPermission = ''
     }
   }
 }

+ 14 - 2
src/views/salesManagement/salesCollection/list.vue

@@ -182,13 +182,13 @@
       </s-table>
 
       <!-- 销售收款凭证 -->
-      <voucherModal v-drag ref="voucherModal" modalTit="销售收款凭证" :openModal="showVoucher" @cancel="showVoucher=false"></voucherModal>
+      <voucherModal v-drag ref="voucherModal" modalTit="销售收款凭证" :openModal="showVoucher" @cancel="closeVoucherModal"></voucherModal>
 
       <!-- 销售收款弹框 -->
       <commonModal
         :openModal="showSkModal"
         modalTit="销售收款"
-        @cancel="showSkModal=false"
+        @cancel="closeColleModal"
         @ok="handleSaveColle"
       >
         <div style="text-align: center;line-height: 24px;">
@@ -389,12 +389,14 @@ export default {
     handleDetail (row, type) {
       this.detailType = type
       this.bizSn = type == 0 ? row.bizSn : row.dispatchBillSn
+      this.$store.state.app.curActionPermission = type == 0 ? 'B_salesDetail' : 'B_dispatchDetail'
       this.showDetailModal = true
     },
     cancelDetail () {
       this.showDetailModal = false
       this.detailType = 2
       this.bizSn = null
+      this.$store.state.app.curActionPermission = ''
     },
     // 点击批量收款
     handlePlColle () {
@@ -421,16 +423,26 @@ export default {
     },
     // 凭证
     handleVoucher (row) {
+      this.$store.state.app.curActionPermission = 'B_salesCollection_record'
       this.showVoucher = true
       this.$nextTick(() => {
         this.$refs.voucherModal.getData(row)
       })
     },
+    closeVoucherModal(){
+      this.showVoucher = false
+      this.$store.state.app.curActionPermission = ''
+    },
     // 点击收款
     handleColle (row) {
       this.handlePlData = [row]
+      this.$store.state.app.curActionPermission = 'B_salesCollection_receipt'
       this.showSkModal = true
     },
+    closeColleModal(){
+      this.showSkModal = false
+      this.$store.state.app.curActionPermission = ''
+    },
     // 批量/单个收款
     handleSaveColle (row) {
       const _this = this

+ 22 - 12
src/views/salesManagement/salesQuery/detail.vue

@@ -13,7 +13,7 @@
             id="salesDetail-xs-print-btn"
             v-if="$hasPermissions('B_salesPrint')"
             :disabled="localDataSource.length==0"
-            @click="handlePrint('SALES_BILL',$hasPermissions('B_salesPrint_salesPrice'))">销售打印</a-button>
+            @click="handlePrint('SALES_BILL','B_salesPrint')">销售打印</a-button>
           <a-button
             key="2"
             type="default"
@@ -21,7 +21,7 @@
             id="salesDetail-xsfl-print-btn"
             v-if="$hasPermissions('B_salesTypePrint')"
             :disabled="localDataSource.length==0"
-            @click="handlePrint('SALES_BILL_TYPE',$hasPermissions('B_salesTypePrint_salesPrice'))">销售分类打印</a-button>
+            @click="handlePrint('SALES_BILL_TYPE','B_salesTypePrint')">销售分类打印</a-button>
           <a-divider type="vertical" />
           <a-button
             key="3"
@@ -30,7 +30,7 @@
             id="salesDetail-export-btn"
             v-if="$hasPermissions('B_salesDetailExport')"
             :disabled="localDataSource.length==0"
-            @click="handlePrint('export',$hasPermissions('B_salesDetailExport_salesPrice'))">导出Excel</a-button>
+            @click="handlePrint('export','B_salesDetailExport')">导出Excel</a-button>
           <a-button
             key="4"
             type="default"
@@ -38,7 +38,7 @@
             id="salesDetail-export-btn"
             v-if="$hasPermissions('B_salesTypeExport')"
             :disabled="localDataSource.length==0"
-            @click="handlePrint('typeExport',$hasPermissions('B_salesTypeExport_salesPrice'))">销售分类导出</a-button>
+            @click="handlePrint('typeExport','B_salesTypeExport')">销售分类导出</a-button>
         </template>
       </a-page-header>
       <!-- 基础信息 -->
@@ -415,34 +415,44 @@ export default {
       })
     },
     // 打印导出
-    handlePrint (type,showPriceFlag) {
+    handlePrint (type,authCode) {
       const _this = this
+      _this.$store.state.app.curActionPermission = authCode
       // 销售分类导出
       if (type == 'typeExport') {
         const params = {
           salesBillSn: this.bizSn || this.$route.params.sn,
-          showCostFlag: this.$hasPermissions('B_salesDetail_costPrice'),
-          showPriceFlag: showPriceFlag
+          showCostFlag: this.$hasPermissions('B_salesDetail_costPrice')
         }
         _this.spinning = true
-        exportExcel(salesDetailTypeExcel, params, '销售分类' + moment().format('YYYYMMDDHHmmss'), () => { _this.spinning = false })
+        exportExcel(salesDetailTypeExcel, params, '销售分类' + moment().format('YYYYMMDDHHmmss'), () => { 
+          _this.spinning = false 
+          _this.$store.state.app.curActionPermission = ''
+        })
       } else {
-        this.detailData.showPriceFlag = showPriceFlag
+        this.detailData.authCode = authCode
         this.nowType = type
         this.openModal = true
       }
     },
-    // 确定打印或预览
+    // 确定打印或预览,导出
     handleOk (objs) {
       const _this = this
       const params = JSON.parse(JSON.stringify(objs))
+      _this.$store.state.app.curActionPermission = this.detailData.authCode
       delete params.type
       _this.spinning = true
       if (this.nowType == 'export') { //  导出
-        exportExcel(salesDetailExcel, params, '销售' + moment().format('YYYYMMDDHHmmss'), () => { _this.spinning = false })
+        exportExcel(salesDetailExcel, params, '销售' + moment().format('YYYYMMDDHHmmss'), () => { 
+          _this.spinning = false
+          _this.$store.state.app.curActionPermission = ''
+        })
       } else { //  打印
         const taskName = this.nowType == 'SALES_BILL' ? '销售单' : '销售分类'
-        printFun(salesDetailPrint, params, objs.type, taskName, () => { _this.spinning = false })
+        printFun(salesDetailPrint, params, objs.type, taskName, () => { 
+          _this.spinning = false
+          _this.$store.state.app.curActionPermission = ''
+        })
       }
     }
   },

+ 8 - 4
src/views/salesManagement/salesQuery/list.vue

@@ -171,7 +171,7 @@
               type="link"
               class="button-warning"
               v-if="record.billStatus == 'WAIT_AUDIT'&&$hasPermissions('B_salesAudit')"
-              @click="handleDetail(record)"
+              @click="handleDetailAudit(record)"
             >审核</a-button>
             <a-button
               size="small"
@@ -397,14 +397,14 @@ export default {
     //  导出
     handleExport () {
       const _this = this
-      const params = _this.queryParam
-      params.showPriceFlag = this.$hasPermissions("B_sales_export_salesPrice")
+      _this.$store.state.app.curActionPermission = 'B_sales_export'
       _this.exportLoading = true
       _this.spinning = true
-      hdExportExcel(salesDetailExport, params, '销售明细', function () {
+      hdExportExcel(salesDetailExport, _this.queryParam, '销售明细', function () {
         _this.exportLoading = false
         _this.spinning = false
         _this.showExport = true
+        _this.$store.state.app.curActionPermission = ''
       })
     },
     //  时间  change
@@ -437,6 +437,10 @@ export default {
     handleDetail (row) {
       this.$router.push({ name: 'salesDetail', params: { sn: row.salesBillSn } })
     },
+    // 审核
+    handleDetailAudit (row) {
+      this.$router.push({ name: 'salesDetailAudit', params: { sn: row.salesBillSn } })
+    },
     // 编辑
     handleEdit (row) {
       this.$router.push({ name: 'salesEdit', params: { sn: row.salesBillSn } })

+ 0 - 1
src/views/salesManagement/salesQuery/printModal.vue

@@ -160,7 +160,6 @@ export default {
               dataScope: _this.form.dataScope == 'all' ? '' : _this.form.dataScope,
               type: isPrint || 'preview'
             }
-            obj.showPriceFlag = _this.itemData.showPriceFlag
             _this.$emit('ok', obj)
           }
           _this.isShow = false

+ 2 - 2
src/views/salesManagement/shortageStatisticsC/list.vue

@@ -310,9 +310,8 @@ export default {
     //  导出
     handleExport () {
       const _this = this
+      _this.$store.state.app.curActionPermission = 'B_oosDetailExportByBuyer'
       const params = this.queryParam
-      params.showCostFlag = this.$hasPermissions('M_shortageStatisticsCList_costPrice')
-      params.showPriceFlag = this.$hasPermissions('M_shortageStatisticsCList_salesPrice')
       this.exportLoading = true
       _this.spinning = true
       oosDetailExport(params).then(res => {
@@ -334,6 +333,7 @@ export default {
       })
     },
     download (data) {
+      this.$store.state.app.curActionPermission = ''
       if (!data) { return }
       const url = window.URL.createObjectURL(new Blob([data]))
       const link = document.createElement('a')

+ 2 - 1
src/views/salesManagement/shortageStatisticsP/list.vue

@@ -184,8 +184,8 @@ export default {
     //  导出
     handleExport () {
       const _this = this
+      _this.$store.state.app.curActionPermission = 'B_oosDetailExportByProduct'
       const params = this.queryParam
-      params.showPriceFlag = this.$hasPermissions('M_shortageStatisticsPList_salesPrice')
       this.exportLoading = true
       _this.spinning = true
       oosDetailExportByProduct(params).then(res => {
@@ -207,6 +207,7 @@ export default {
       })
     },
     download (data) {
+      this.$store.state.app.curActionPermission = ''
       if (!data) { return }
       const url = window.URL.createObjectURL(new Blob([data]))
       const link = document.createElement('a')

+ 5 - 3
src/views/salesManagement/stockPrint/list.vue

@@ -197,7 +197,7 @@ import { STable, VSelect } from '@/components'
 import subarea from '@/views/common/subarea.js'
 import Area from '@/views/common/area.js'
 import dealerSubareaScopeList from '@/views/common/dealerSubareaScopeList.vue'
-import sendTypeModal from '@/views/salesManagement/pushOrderManagement/sendTypeModal.vue'
+import sendTypeModal from './sendTypeModal.vue'
 import recordModal from './recordModal.vue'
 import commonModal from '@/views/common/commonModal.vue'
 import salesDetail from '@/views/salesManagement/salesQuery/detail.vue'
@@ -311,12 +311,14 @@ export default {
     handleDetail (row, type) {
       this.detailType = type
       this.bizSn = type == 0 ? row.salesBillSn : row.dispatchBillSn
+      this.$store.state.app.curActionPermission = type == 0 ? 'B_salesDetail' : 'B_dispatchDetail'
       this.showDetailModal = true
     },
     cancelDetail () {
       this.showDetailModal = false
       this.detailType = 2
       this.bizSn = null
+      this.$store.state.app.curActionPermission = ''
     },
     // 发货分类打印
     handlePrint (row) {
@@ -340,8 +342,8 @@ export default {
         Object.assign(params, obj || {}),
         type,
         taskName,
-        (res) => {
-          _this.$message.info(res.message)
+        () => {
+          _this.$store.state.app.curActionPermission = ''
           _this.$refs.table.refresh(true)
           _this.spinning = false
         },

+ 186 - 0
src/views/salesManagement/stockPrint/sendTypeModal.vue

@@ -0,0 +1,186 @@
+<template>
+  <a-modal
+    centered
+    :footer="null"
+    :maskClosable="false"
+    class="pushOrderManagement-print-type-modal"
+    title="发货分类打印"
+    v-model="isShow"
+    @cancel="handleCancel"
+    :width="600">
+    <a-spin :spinning="spinning" tip="Loading...">
+      <a-form-model
+        id="pushOrderManagement-print-form"
+        ref="ruleForm"
+        :model="form"
+        :rules="rules"
+        :label-col="formItemLayout.labelCol"
+        :wrapper-col="formItemLayout.wrapperCol"
+      >
+        <a-form-model-item label="销售单号" style="margin-bottom: 0;">
+          {{ detailData&&detailData.salesBillNo || '--' }}
+        </a-form-model-item>
+        <a-form-model-item label="备货单号" style="margin-bottom: 0;">
+          {{ detailData&&detailData.dispatchBillNo || '--' }}
+        </a-form-model-item>
+        <a-form-model-item label="发货编号" style="margin-bottom: 0;">
+          {{ detailData&&detailData.sendNo || '--' }}
+        </a-form-model-item>
+        <a-form-model-item label="客户名称" style="margin-bottom: 0;">
+          {{ detailData&&detailData.buyerName || '--' }}
+        </a-form-model-item>
+        <a-form-model-item label="收货客户名称" style="margin-bottom: 0;">
+          {{ detailData&&detailData.receiverName || '--' }}
+        </a-form-model-item>
+        <a-form-model-item label="产品分类" prop="id">
+          <a-select id="pushOrderManagement-print-form" v-model="form.id" placeholder="请选择产品分类">
+            <a-select-option v-for="item in typeList" :value="item.id" :key="item.id">
+              <span v-if="item.id != 'all'">{{ item.productBrandName }} {{ item.productTypeName?('-'+item.productTypeName):'' }}</span>
+              <span v-else>全部</span>
+            </a-select-option>
+          </a-select>
+        </a-form-model-item>
+        <a-form-model-item label="货位编号" prop="orderBy" v-if="nowType=='print'">
+          <a-radio-group v-model="form.orderBy">
+            <a-radio value="dispatch_bill_detail.STACK_PLACE_CODE ASC">打印(↑升序)</a-radio>
+            <a-radio value="dispatch_bill_detail.STACK_PLACE_CODE DESC">打印(↓降序)</a-radio>
+            <a-radio value="-1">不打印</a-radio>
+          </a-radio-group>
+        </a-form-model-item>
+      </a-form-model>
+      <div class="btn-cont">
+        <a-button id="pushOrderManagement-print-back" @click="handleCancel">取消</a-button>
+        <a-button
+          type="primary"
+          class="button-info"
+          id="pushOrderManagement-print-save"
+          v-if="nowType=='print'&&$hasPermissions('B_sendTypePrint')"
+          @click="handleSave('preview','B_sendTypePrint')"
+          style="margin-left: 15px;">打印预览</a-button>
+        <a-button
+          type="primary"
+          id="pushOrderManagement-print-save"
+          v-if="!hasNoPrint&&nowType=='print'&&$hasPermissions('B_sendTypePrint')"
+          @click="handleSave('print','B_sendTypePrint')"
+          style="margin-left: 10px;">确定打印</a-button>
+      </div>
+    </a-spin>
+  </a-modal>
+</template>
+
+<script>
+import { dispatchDetailType } from '@/api/dispatch'
+export default {
+  props: {
+    openModal: { //  弹框显示状态
+      type: Boolean,
+      default: false
+    },
+    outBizSubSn: {
+      type: [Number, String],
+      default: ''
+    },
+    hasNoPrint: {
+      type: Boolean,
+      default: false
+    },
+    nowType: {
+      type: String,
+      default: 'print'
+    }
+  },
+  data () {
+    return {
+      isShow: this.openModal, //  是否打开弹框
+      form: {
+        id: 'all',
+        orderBy: undefined
+      },
+      rules: {
+        id: [{ required: true, message: '请选择产品分类', trigger: 'change' }],
+        orderBy: [{ required: true, message: '请选择货位编号', trigger: 'change' }]
+      },
+      formItemLayout: {
+        labelCol: { span: 6 },
+        wrapperCol: { span: 15 }
+      },
+      spinning: false,
+      typeList: [],
+      detailData: null
+    }
+  },
+  methods: {
+    // 确认
+    handleSave (type, authCode) {
+      const _this = this
+      this.$store.state.app.curActionPermission = authCode
+      this.$refs.ruleForm.validate(valid => {
+        if (valid) {
+          const item = this.typeList.find(item => item.id == this.form.id)
+          if (item) {
+            const obj = {
+              productBrandSn: item.productBrandSn,
+              productTypeSn: item.productTypeSn,
+              dispatchBillSn: this.detailData.dispatchBillSn,
+              dispatchBillNo: this.detailData.dispatchBillNo
+            }
+            // 打印货位编号
+            if (_this.form.orderBy != '-1') {
+              obj.orderBy = _this.form.orderBy
+            }
+            _this.$emit('ok', obj, '发货分类', type)
+          }
+          _this.isShow = false
+        } else {
+          console.log('error submit!!')
+          return false
+        }
+      })
+    },
+    // 取消选择分类
+    handleCancel () {
+      this.isShow = false
+      this.$refs.ruleForm.resetFields()
+      this.form.id = 'all'
+      this.form.orderBy = undefined
+    },
+    // 获取该销售单产品二级分类
+    getTypeData (dispatchBillSn) {
+      this.typeList = [{ id: 'all' }]
+      dispatchDetailType({ dispatchBillSn: dispatchBillSn }).then(res => {
+        if (res.status == 200) {
+          if (res.data && res.data.length > 0) {
+            this.typeList = [...this.typeList, ...res.data]
+          }
+        }
+      })
+    },
+    setData (data, dispatchBillSn) {
+      this.detailData = data
+      this.getTypeData(dispatchBillSn)
+    }
+  },
+  watch: {
+    //  父页面传过来的弹框状态
+    openModal (newValue, oldValue) {
+      this.isShow = newValue
+    },
+    //  重定义的弹框状态
+    isShow (newValue, oldValue) {
+      if (!newValue) {
+        this.$emit('close')
+        this.$refs.ruleForm.resetFields()
+      }
+    }
+  }
+}
+</script>
+
+<style lang="less">
+  .pushOrderManagement-print-type-modal{
+    .btn-cont {
+      text-align: center;
+      margin: 35px 0 10px;
+    }
+  }
+</style>

+ 2 - 0
src/views/salesReturnManagement/salesReturn/detail.vue

@@ -254,11 +254,13 @@ export default {
       if (this.nowType == 'export') {
         exportExcel(salesReturnExport, params, '销售退货', function () {
           _this.spinning = false
+          _this.$store.state.app.curActionPermission = ''
         })
       } else {
         // 打印或预览
         printFun(salesReturnPrint, params, this.nowType, '销售退货', () => {
           _this.spinning = false
+          _this.$store.state.app.curActionPermission = ''
         })
       }
     },

+ 1 - 0
src/views/salesReturnManagement/salesReturn/printModal.vue

@@ -93,6 +93,7 @@ export default {
     // 确认
     handleSave () {
       const _this = this
+      this.$store.state.app.curActionPermission = this.nowType=='export' ? 'B_salesReturnExport' : 'B_salesReturnPrint'
       this.$refs.ruleForm.validate(valid => {
         if (valid) {
           const obj = {

+ 2 - 0
src/views/salesReturnManagement/salesReturn/salesReturnEdit.vue

@@ -461,11 +461,13 @@ export default {
       if (type == 'export') {
         exportExcel(salesReturnExport, params, '销售退货', function () {
           _this.spinning = false
+          _this.$store.state.app.curActionPermission = ''
         })
       } else {
         // 打印或预览
         printFun(salesReturnPrint, params, type, '销售退货', () => {
           _this.spinning = false
+          _this.$store.state.app.curActionPermission = ''
         })
       }
     },