lilei 1 week ago
parent
commit
ea69199f97

+ 15 - 7
src/views/salesManagement/salesQueryNew/comps/detailProductList.vue

@@ -25,7 +25,7 @@
     <div v-if="countData&&activeList.length>0" style="padding:6px 0 0;text-align: right;">
       总款数:<strong>{{ countData&&(countData.totalCategory || countData.totalCategory==0) ? countData.totalCategory : 0 }}</strong>;
       总数量:<strong>{{ countData&&(countData.totalQty || countData.totalQty==0) ? countData.totalQty : 0 }}</strong>;
-      <span v-if="$hasPermissions(authCode + '_salesPrice')">总金额:<strong>{{ countData&&(countData.totalAmount || countData.totalAmount==0) ? toThousands(countData.totalAmount) : '0.00' }}</strong>;</span>
+      <span v-if="$hasPermissions(authCode + '_salesPrice')||showPrice">总金额:<strong>{{ countData&&(countData.totalAmount || countData.totalAmount==0) ? toThousands(countData.totalAmount) : '0.00' }}</strong>;</span>
     </div>
     <!-- 活动规则详情 -->
     <detailModal :openModal="openDetailModal" pageType="salesPage" :itemSn="detailSn" @close="closeDetailModal"></detailModal>
@@ -126,6 +126,10 @@ export default {
     salesPromoSnSet: {
       type: Array,
       default: () => []
+    },
+    pageType: {
+      type: String,
+      default: ''
     }
   },
   data () {
@@ -161,6 +165,10 @@ export default {
     }
   },
   computed: {
+    // 转单和上级审核显示价格
+    showPrice () {
+      return this.pageType == 'salesNewDetailTransfer' || this.pageType == 'salesNewDetaiSupLevelAudit'
+    },
     columns () {
       const _this = this
       // 价格单元格
@@ -245,7 +253,7 @@ export default {
         })
       }
       // 计算可合并单元格数
-      if (this.$hasPermissions(this.authCode + '_costPrice')) { //  成本价权限
+      if (this.$hasPermissions(this.authCode + '_costPrice') || this.showPrice) { //  成本价权限
         arr.push({ title: '成本价', field: 'showCost', width: 80, key: 'f', align: 'right', operationColumn: false, renderBodyCell: ({ row, column, rowIndex }, h) => { return priceFormat(row[column.field]) } })
       }
       arr = arr.concat([
@@ -253,17 +261,17 @@ export default {
         { title: '销售数量', field: 'qty', width: 80, key: 'h', align: 'center', operationColumn: false, renderBodyCell: ({ row, column, rowIndex }, h) => { return numsFormat(row[column.field]) } }
       ])
 
-      if (this.$hasPermissions(this.authCode + '_provincePrice')) {
+      if (this.$hasPermissions(this.authCode + '_provincePrice') || this.showPrice) {
         arr.push({ title: '省级价', field: 'provincePrice', width: 80, key: 'i', align: 'right', operationColumn: false, renderBodyCell: ({ row, column, rowIndex }, h) => { return priceFormat(row[column.field]) } })
       }
       // 是否勾选市级价格
       if (this.isCityPrice) {
         arr.push({ title: '市级价', field: 'cityPrice', width: 80, key: 'j', align: 'right', operationColumn: false, renderBodyCell: ({ row, column, rowIndex }, h) => { return priceFormat(row[column.field]) } })
-        if (this.$hasPermissions(this.authCode + '_salesPrice')) { //  售价权限
+        if (this.$hasPermissions(this.authCode + '_salesPrice') || this.showPrice) { //  售价权限
           arr.push({ title: '销售价', field: 'price', width: 100, key: 'k', align: 'right', operationColumn: false, renderBodyCell: ({ row, column, rowIndex }, h) => { return discountPriceFormat(row, row[column.field], h) } })
         }
       } else {
-        if (this.$hasPermissions(this.authCode + '_salesPrice')) { //  售价权限
+        if (this.$hasPermissions(this.authCode + '_salesPrice') || this.showPrice) { //  售价权限
           arr.push({ title: '销售价', field: 'price', width: 100, key: 'l', align: 'right', operationColumn: false, renderBodyCell: ({ row, column, rowIndex }, h) => { return discountPriceFormat(row, row[column.field], h) } })
         }
       }
@@ -287,10 +295,10 @@ export default {
         this.colspanNums = this.colspanNums + 4
         arr.push({ title: '单重(kg)', field: 'weightKg', width: 80, key: 'q1', align: 'center', operationColumn: false, renderBodyCell: ({ row, column, rowIndex }, h) => { return numsFormat(row[column.field]) } })
         arr.push({ title: '合计重量(kg)', field: 'totalWeightKg', width: 98, key: 'q2', align: 'center', operationColumn: false, renderBodyCell: ({ row, column, rowIndex }, h) => { return numsFormat(row[column.field]) } })
-        if (this.$hasPermissions(this.authCode + '_costPrice')) {
+        if (this.$hasPermissions(this.authCode + '_costPrice') || this.showPrice) {
           arr.push({ title: '平均成本公斤单价', field: 'weightAvgCost', width: 105, key: 'q3', align: 'right', operationColumn: false, renderBodyCell: ({ row, column, rowIndex }, h) => { return numsFormat(row[column.field]) } })
         }
-        if (this.$hasPermissions(this.authCode + '_salesPrice')) {
+        if (this.$hasPermissions(this.authCode + '_salesPrice') || this.showPrice) {
           arr.push({ title: '平均售价公斤单价', field: 'weightAvgPrice', width: 105, key: 'q4', align: 'right', operationColumn: false, renderBodyCell: ({ row, column, rowIndex }, h) => { return numsFormat(row[column.field]) } })
         }
       }

+ 3 - 1
src/views/salesManagement/salesQueryNew/detail.vue

@@ -215,6 +215,7 @@
             :detailData="detailData"
             :warehouseSn="warehouseSn"
             :promoFlag="promoFlag"
+            :pageType="$route.params.pageType"
             :salesBillSn="$route.params.sn || bizSn"
             :authCode="authCode"
             :chooseList="chooseDealerList"
@@ -274,6 +275,7 @@
           :warehouseSn="warehouseSn"
           :promoFlag="promoFlag"
           :borrowFlag="borrowFlag"
+          :pageType="$route.params.pageType"
           :salesBillSn="$route.params.sn || bizSn"
           :salesPromoSnSet="salesPromoSnSet"
           :authCode="authCode"
@@ -290,7 +292,7 @@
         type="primary"
         class="button-info"
         id="salesDetail-transfer-btn"
-        v-if="$hasPermissions('B_salesTransfer')&&$route.params.pageType!='salesNewDetailAudit'&&(detailData&&detailData.promoFlag!=1&&(detailData.billStatus == 'WAIT_AUDIT'||detailData.billStatus == 'SUPERIOR_AUDIT_REJECT' || detailData.billStatus == 'TRANSFER_AUDIT_REJECT')&&detailData.salesBillSource=='PURCHASE'&&detailData.orderType=='TIRE')"
+        v-if="$hasPermissions('B_salesTransfer')&&$route.params.pageType=='salesNewDetailTransfer'&&(detailData&&detailData.promoFlag!=1&&(detailData.billStatus == 'WAIT_AUDIT'||detailData.billStatus == 'SUPERIOR_AUDIT_REJECT' || detailData.billStatus == 'TRANSFER_AUDIT_REJECT')&&detailData.salesBillSource=='PURCHASE'&&detailData.orderType=='TIRE')"
         @click="handleOrder()"
       >
         转单