lilei 1 week ago
parent
commit
25c00e9e6e

+ 8 - 2
src/views/salesManagement/salesQueryNew/comps/detailProductList.vue

@@ -289,10 +289,12 @@ export default {
         { title: '待下推数', field: 'unpushedQty', width: 80, key: 'o', align: 'center', operationColumn: false, renderBodyCell: ({ row, column, rowIndex }, h) => { return row.borrowFlag != '1' ? numsFormat(row[column.field]) : '--' } },
         { title: '待下推数', field: 'unpushedQty', width: 80, key: 'o', align: 'center', operationColumn: false, renderBodyCell: ({ row, column, rowIndex }, h) => { return row.borrowFlag != '1' ? numsFormat(row[column.field]) : '--' } },
         { title: '已下推数', field: 'pushedQty', width: 80, key: 'p', align: 'center', operationColumn: false, renderBodyCell: ({ row, column, rowIndex }, h) => { return row.borrowFlag != '1' ? numsFormat(row[column.field]) : '--' } }
         { title: '已下推数', field: 'pushedQty', width: 80, key: 'p', align: 'center', operationColumn: false, renderBodyCell: ({ row, column, rowIndex }, h) => { return row.borrowFlag != '1' ? numsFormat(row[column.field]) : '--' } }
       ])
       ])
-
+      // 如果有转采购额
+      if (this.showConvertPromoGifts) {
+        arr.push({ title: '转采购额数量', field: 'convertPromoGiftsQty', width: 100, key: 'z', align: 'center', operationColumn: false, renderBodyCell: ({ row, column, rowIndex }, h) => { return row.convertPromoGiftsFlag ? numsFormat(row[column.field]) : '--' } })
+      }
       arr.push({ title: '已取消数', field: 'cancelQty', width: 80, key: 'q', align: 'center', operationColumn: false, renderBodyCell: ({ row, column, rowIndex }, h) => { return row.borrowFlag != '1' ? numsFormat(row[column.field]) : '--' } })
       arr.push({ title: '已取消数', field: 'cancelQty', width: 80, key: 'q', align: 'center', operationColumn: false, renderBodyCell: ({ row, column, rowIndex }, h) => { return row.borrowFlag != '1' ? numsFormat(row[column.field]) : '--' } })
       if (this.showAveragePrice) {
       if (this.showAveragePrice) {
-        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: '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]) } })
         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') || this.showPrice) {
         if (this.$hasPermissions(this.authCode + '_costPrice') || this.showPrice) {
@@ -308,6 +310,10 @@ export default {
     hasConvertPromoGifts () {
     hasConvertPromoGifts () {
       return this.detailData && this.detailData.totalConvertPromoGiftsQty
       return this.detailData && this.detailData.totalConvertPromoGiftsQty
     },
     },
+    // 是否显示可转采购额
+    showConvertPromoGifts () {
+      return this.activeList && this.activeList.filter(item => item.enabledFlag == 1).find(item => item.promotionRule && item.promotionRule.convertExpenseFlag == 1 && item.promotionRule.promotionRuleType == 'BUY_PROD_GIVE_PROD')
+    },
     // 是否显示库存列
     // 是否显示库存列
     showStock () {
     showStock () {
       return this.detailData && (this.detailData.billStatus == 'WAIT_AUDIT' || this.detailData.billStatus == 'HQ_CHANGE' || this.detailData.billStatus == 'SUPERIOR_AUDIT_REJECT') && this.$hasPermissions('B_salesAudit')
       return this.detailData && (this.detailData.billStatus == 'WAIT_AUDIT' || this.detailData.billStatus == 'HQ_CHANGE' || this.detailData.billStatus == 'SUPERIOR_AUDIT_REJECT') && this.$hasPermissions('B_salesAudit')

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

@@ -115,7 +115,7 @@
               </div>
               </div>
               <div class="tongji-bar-col">
               <div class="tongji-bar-col">
                 <div v-if="$hasPermissions(authCode + '_salesPrice')&&detailData&&detailData.totalDiscountAmount" style="color: red;">优惠金额:<strong>{{ Number(detailData.totalDiscountAmount).toFixed(2) }}</strong>;</div>
                 <div v-if="$hasPermissions(authCode + '_salesPrice')&&detailData&&detailData.totalDiscountAmount" style="color: red;">优惠金额:<strong>{{ Number(detailData.totalDiscountAmount).toFixed(2) }}</strong>;</div>
-                <div v-if="$hasPermissions(authCode + '_salesPrice')&&detailData&&detailData.totalConvertPromoGiftsAmount" style="color: red;width:170px;">促销产品转采购额金额:<strong>{{ Number(detailData.totalConvertPromoGiftsAmount).toFixed(2) }}</strong>;</div>
+                <div v-if="$hasPermissions(authCode + '_salesPrice')&&detailData&&detailData.totalConvertPromoGiftsAmount" style="color: red;width:200px;">促销产品转采购额金额:<strong>{{ Number(detailData.totalConvertPromoGiftsAmount).toFixed(2) }}</strong>;</div>
               </div>
               </div>
             </div>
             </div>
           </div>
           </div>