lilei hace 3 años
padre
commit
e3a73bc49f

+ 6 - 2
src/views/allocationManagement/storeTransferOut/detail.vue

@@ -15,7 +15,7 @@
         </template>
         <!-- 操作区,位于 title 行的行尾 -->
         <template slot="extra" v-if="outBizSn ? $hasPermissions('B_outboundOrderDetail') : $hasPermissions('B_storeCallOutPrint')">
-          <a-checkbox key="4" v-model="printCostChecked">打印成本</a-checkbox>
+          <a-checkbox key="4" v-if="$hasPermissions('M_ShowAllCost')" v-model="printCostChecked">打印成本</a-checkbox>
           <Print :disabled="localDataSource.length==0" :showExport="false" @handlePrint="handlePrint"></Print>
         </template>
       </a-page-header>
@@ -154,7 +154,11 @@ export default {
       const _this = this
       _this.spinning = true
       const url = storeCallOutDetailPrint
-      const params = { sn: this.outBizSn || this.$route.params.sn, type: printerType, costFlag: this.printCostChecked ? '1' : '0' }
+      const params = {
+        sn: this.outBizSn || this.$route.params.sn,
+        type: printerType,
+        costFlag: this.printCostChecked && this.$hasPermissions('M_ShowAllCost') ? '1' : '0'
+      }
       // 打印或导出
       hdPrint(printerType, type, url, params, '', function () {
         _this.spinning = false

+ 2 - 2
src/views/allocationManagement/storeTransferOut/edit.vue

@@ -9,7 +9,7 @@
         </template>
         <!-- 操作区,位于 title 行的行尾 -->
         <template slot="extra" v-if="$hasPermissions('B_storeCallOutPrint')">
-          <a-checkbox key="4" v-model="printCostChecked">打印成本</a-checkbox>
+          <a-checkbox key="4" v-if="$hasPermissions('M_ShowAllCost')" v-model="printCostChecked">打印成本</a-checkbox>
           <Print :disabled="chooseLoadDataSource.length==0" :showExport="false" @handlePrint="handlePrint"></Print>
         </template>
       </a-page-header>
@@ -347,7 +347,7 @@ export default {
       const _this = this
       _this.spinning = true
       const url = storeCallOutDetailPrint
-      const params = { sn: this.$route.params.sn, type: printerType, costFlag: this.printCostChecked ? '1' : '0' }
+      const params = { sn: this.$route.params.sn, type: printerType, costFlag: this.printCostChecked && this.$hasPermissions('M_ShowAllCost') ? '1' : '0' }
       // 打印或导出
       hdPrint(printerType, type, url, params, '', function () {
         _this.spinning = false

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

@@ -341,6 +341,7 @@ export default {
       const params = JSON.parse(JSON.stringify(this.queryParam))
       params.zeroQtyFlag = params.zeroQtyFlag ? '0' : ''
       params.productEnabledFlag = params.productEnabledFlag ? '' : '1'
+      params.showCost = this.$hasPermissions('M_ShowAllCost') ? 1 : 0
       this.exportLoading = true
       _this.spinning = true
       stockExport(params).then(res => {

+ 1 - 0
src/views/purchasingManagement/purchaseReturn/detail.vue

@@ -131,6 +131,7 @@ export default {
       _this.spinning = true
       let url = purchaseReturnDetailPrint
       const params = { sn: this.$route.params.sn || this.outBizSn }
+      params.showCost = this.$hasPermissions('M_ShowAllCost') ? 1 : 0
       if (type == 'export') { //  导出
         url = purchaseReturnDetailExport
       }

+ 1 - 0
src/views/reportData/salesDetailReport/list.vue

@@ -329,6 +329,7 @@ export default {
       this.$refs.ruleForm.validate(valid => {
         if (valid) {
           const params = _this.queryParam
+          params.showCost = this.$hasPermissions('M_ShowAllCost') ? '1' : '0'
           _this.exportLoading = true
           _this.spinning = true
           reportSalesBillDetailExport(params).then(res => {

+ 1 - 0
src/views/reportData/salesReport/list.vue

@@ -268,6 +268,7 @@ export default {
       this.$refs.ruleForm.validate(valid => {
         if (valid) {
           const params = _this.queryParam
+          params.showCost = this.$hasPermissions('M_ShowAllCost') ? '1' : '0'
           _this.exportLoading = true
           _this.spinning = true
           reportSalesBillExport(params).then(res => {