| 
					
				 | 
			
			
				@@ -0,0 +1,384 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+<template> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  <a-card size="small" :bordered="false" class="receivedSendStorageReport-wrap"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    <div ref="tableSearch" class="table-page-search-wrapper newTableSearchName"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      <a-form-model 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        layout="inline" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        ref="ruleForm" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        :rules="rules" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        :model="form"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        <a-row :gutter="15"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          <a-col :md="6" :sm="24"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            <a-form-item label="销售审核日期"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              <rangeDate ref="rangeDate" :value="salesDate" @change="salesDateChange" /> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            </a-form-item> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          </a-col> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          <a-col :md="6" :sm="24"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            <a-form-item label="促销时间"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              <rangeDate ref="rangeDate" :value="time" @change="dateChange" /> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            </a-form-item> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          </a-col> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          <a-col :md="6" :sm="24"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            <a-form-item label="促销名称"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              <a-input id="promotionSalesOrderReport-salesBillNo" v-model.trim="queryParam.salesBillNo" allowClear placeholder="请输入促销名称"/> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            </a-form-item> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          </a-col> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          <template v-if="advanced"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            <a-col :md="6" :sm="24"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              <a-form-item label="促销类型"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                <v-select 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                  v-model="queryParam.printStatus" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                  ref="printStatus" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                  id="promotionSalesOrderReport-printStatus" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                  code="PRINT_STATUS" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                  placeholder="请选择促销类型" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                  allowClear></v-select> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              </a-form-item> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            </a-col> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            <a-col :md="6" :sm="24"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              <a-form-item label="规则"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                <a-input id="promotionSalesOrderReport-purchaseBillNo" v-model.trim="queryParam.purchaseBillNo" allowClear placeholder="请输入规则关键字"/> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              </a-form-item> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            </a-col> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            <a-col :md="6" :sm="24"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              <a-form-item label="销售单号"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                <a-input id="promotionSalesOrderReport-purchaseBillNo" v-model.trim="queryParam.purchaseBillNo" allowClear placeholder="请输入销售单号"/> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              </a-form-item> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            </a-col> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            <a-col :md="6" :sm="24"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              <a-form-model-item label="客户级别"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                <v-select 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                  v-model="queryParam.dealerLevel" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                  ref="dealerLevel" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                  id="actualSalesReportList-allocateTypeSn" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                  code="DEALER_LEVEL" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                  placeholder="请选择客户级别" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                  allowClear></v-select> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              </a-form-model-item> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            </a-col> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            <a-col :md="6" :sm="24"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              <a-form-item label="客户名称"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                <a-input id="promotionSalesOrderReport-purchaseBillNo" v-model.trim="queryParam.purchaseBillNo" allowClear placeholder="请输入客户名称"/> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              </a-form-item> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            </a-col> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            <a-col :md="6" :sm="24"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              <a-form-model-item label="所在区域"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                <subarea ref="subarea" id="promotionSalesOrderReport-subarea" @change="subareaChange"></subarea> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              </a-form-model-item> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            </a-col> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            <a-col :md="6" :sm="24"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              <a-form-model-item label="地区" prop="shippingAddrProvinceSn"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                <Area id="promotionSalesOrderReport-shippingAddrProvinceSn" v-model="queryParam.shippingAddrProvinceSn" placeholder="请选择省"></Area> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              </a-form-model-item> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            </a-col> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          </template> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          <a-col :md="6" :sm="24"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            <span class="table-page-search-submitButtons"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              <a-button type="primary" :disabled="disabled" @click="$refs.table.refresh(true)">查询</a-button> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              <a-button style="margin-left: 8px" :disabled="disabled" @click="resetSearchForm()">重置</a-button> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              <a-button 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                style="margin-left: 10px" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                type="primary" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                class="button-warning" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                @click="handleExport" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                :disabled="disabled" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                :loading="exportLoading" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                v-if="$hasPermissions('B_sales_export')" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              >导出</a-button> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              <a @click="advanced=!advanced" style="margin-left: 8px"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                {{ advanced ? '收起' : '展开' }} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                <a-icon :type="advanced ? 'up' : 'down'"/> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              </a> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            </span> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          </a-col> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        </a-row> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      </a-form-model> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    </div> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    <a-tabs default-active-key="1" @change="handleChange" :style="{ height: tableHeight+84.5+'px' }"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      <a-tab-pane key="1" tab="促销销售单报表"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        <!-- 列表 --> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        <s-table 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          class="sTable" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          ref="table" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          size="small" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          :rowKey="(record) => record.no" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          rowKeyName="no" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          :columns="columns" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          :data="loadData" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          :scroll="{ y: tableHeight-120 }" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          :defaultLoadData="false" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          bordered> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          <template slot="footer"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            <a-row> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              <a-col span="24"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                <a-row> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                  <a-col span="4">数量(非促):{{ (totalData && (totalData.beginQty || totalData.beginQty==0)) ? totalData.beginQty : '--' }}</a-col> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                  <a-col span="4">数量(促):{{ (totalData && (totalData.beginAmount || totalData.beginAmount==0)) ? toThousands(totalData.beginAmount) : '--' }}</a-col> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                  <a-col span="4">实售金额:{{ (totalData && (totalData.putQty || totalData.putQty==0)) ?totalData.putQty : '--' }}</a-col> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                  <a-col span="4">开单金额:{{ (totalData && (totalData.putAmount || totalData.putAmount==0)) ? toThousands(totalData.putAmount) : '--' }}</a-col> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                  <a-col span="4">成本金额:{{ (totalData && (totalData.outQty || totalData.outQty==0)) ? totalData.outQty : '--' }}</a-col> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                  <a-col span="4">损失成本:{{ (totalData && (totalData.outPrice || totalData.outPrice==0)) ? toThousands(totalData.outPrice) : '--' }}</a-col> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                  <a-col span="4">损失费用:{{ (totalData && (totalData.outAmount || totalData.outAmount==0)) ? toThousands(totalData.outAmount) : '--' }}</a-col> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                  <a-col span="4">采购额结余:{{ (totalData && (totalData.outAmount || totalData.outAmount==0)) ? toThousands(totalData.outAmount) : '--' }}</a-col> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                  <a-col span="4">采购额超出:{{ (totalData && (totalData.outAmount || totalData.outAmount==0)) ? toThousands(totalData.outAmount) : '--' }}</a-col> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                </a-row> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              </a-col> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            </a-row> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          </template> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        </s-table> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      </a-tab-pane> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      <a-tab-pane key="2" tab="促销销售单实时报表" force-render> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        <gatherList ref="gatherBox" :tableHeight="tableHeight" :totalData="totalData" :queryParam="queryParam"></gatherList> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      </a-tab-pane> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    </a-tabs> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    <!-- 导出提示框 --> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    <reportModal :visible="showExport" @close="showExport=false"></reportModal> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  </a-card> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+</template> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+<script> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+import { commonMixin } from '@/utils/mixin' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+import { STable, VSelect } from '@/components' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+import reportModal from '@/views/common/reportModal.vue' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+import { queryDetailReportPage, exportDetailReport, queryReportCount } from '@/api/reportData' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+import { hdExportExcel } from '@/libs/exportExcel' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+import gatherList from './list' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+import chooseWarehouse from '@/views/common/chooseWarehouse' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+import rangeDate from '@/views/common/rangeDate.vue' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+import getDate from '@/libs/getDate.js' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+import subarea from '@/views/common/subarea.js' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+import Area from '@/views/common/area.js' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+export default { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  name: 'PriceDifferenceDetailReportList', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  mixins: [commonMixin], 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  components: { STable, VSelect, gatherList, reportModal, chooseWarehouse, Area, rangeDate, subarea }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  data () { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    return { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      advanced: true, // 高级搜索 展开/关闭 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      queryParam: { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        beginDate: getDate.getThreeMonthDays().starttime, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        endDate: getDate.getCurrMonthDays().endtime, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        buyerSn: undefined, //  客户名称 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        salesBillNo: '', //  销售单号 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        purchaseBillNo: '', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        printStatus: undefined, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        billStatus: undefined, //  业务状态 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        financialStatus: undefined, //  财务状态 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        salesBillSource: undefined, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        dealerLevel: undefined, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        subareaArea: { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          subareaSn: undefined, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          subareaAreaSn: undefined 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        shippingAddrProvinceSn: undefined, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        warehouseSn: undefined 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      form: { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        time: [] 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      totalData: null, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      tabVal: 1, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      rules: { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        time: [{ required: true, message: '请选择月份', trigger: 'change' }] 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      productType: [], 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      disabled: false, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      tableHeight: 0, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      endOpen: false, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      showExport: false, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      startValue: null, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      endValue: null, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      columns: [ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        { title: '促销名称', dataIndex: 'buyerName', width: '160px', align: 'center', customRender: function (text) { return text || '--' }, fixed: 'left', ellipsis: true }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        { title: '促销时间', dataIndex: 'createDate', width: '100px', align: 'center', customRender: function (text) { return text || '--' }, fixed: 'left' }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        { title: '费用所属部门', dataIndex: 'submitDate', width: '180px', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true, fixed: 'left' }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        { title: '促销类型', dataIndex: 'auditDate', width: '80px', align: 'center', customRender: function (text) { return text || '--' }, fixed: 'left' }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        { title: '规则', dataIndex: 'buyerName', width: '80px', align: 'center', customRender: function (text) { return text || '--' }, fixed: 'left' }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        { title: '销售单号', dataIndex: 'buyerName', width: '80px', align: 'center', customRender: function (text) { return text || '--' }, fixed: 'left' }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        { title: '区域', dataIndex: 'buyerName', width: '80px', align: 'center', customRender: function (text) { return text || '--' } }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        { title: '分区', dataIndex: 'buyerName', width: '80px', align: 'center', customRender: function (text) { return text || '--' } }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        { title: '地区', dataIndex: 'buyerName', width: '120px', align: 'center', customRender: function (text) { return text || '--' } }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        { title: '客户名称', dataIndex: 'buyerName', width: '100px', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        { title: '客户级别', dataIndex: 'buyerName', width: '80px', align: 'center', customRender: function (text) { return text || '--' } }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        { title: '销售审核日期', dataIndex: 'buyerName', width: '120px', align: 'center', customRender: function (text) { return text || '--' } }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        { title: '数量(非促)', dataIndex: 'totalPushedQty', width: '100px', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        { title: '数量(促)', dataIndex: 'totalPushedQty', width: '100px', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        { title: '实售金额', dataIndex: 'totalAmount', width: '100px', align: 'center', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        { title: '开单金额', dataIndex: 'totalAmount', width: '100px', align: 'center', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        { title: '成本金额', dataIndex: 'totalAmount', width: '100px', align: 'center', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        { title: '损失成本', dataIndex: 'totalAmount', width: '100px', align: 'center', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        { title: '损失费用', dataIndex: 'totalAmount', width: '100px', align: 'center', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        { title: '采购额结余', dataIndex: 'totalAmount', width: '100px', align: 'center', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        { title: '采购额超出', dataIndex: 'totalAmount', width: '100px', align: 'center', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        { title: '促销品费用归属品牌', dataIndex: 'billStatusDictValue', width: '120px', align: 'center', customRender: function (text) { return text || '--' } }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        { title: '促销品费用归属分类', dataIndex: 'financialStatusDictValue', width: '120px', align: 'center', customRender: function (text) { return text || '--' } } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      ], 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      // 加载数据方法 必须为 Promise 对象 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      loadData: parameter => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        this.disabled = true 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        const params = Object.assign(parameter, this.queryParam) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        this.spinning = true 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        return queryDetailReportPage(params).then(res => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          let data 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          if (res.status == 200) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            data = res.data 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            const no = (data.pageNo - 1) * data.pageSize 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            for (var i = 0; i < data.list.length; i++) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              data.list[i].no = no + i + 1 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            this.disabled = false 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          this.spinning = false 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          return data 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        }) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  methods: { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    getCount (params) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      queryReportCount(params).then(res => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        if (res.status == 200) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          this.totalData = res.data 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        } else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          this.totalData = null 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      }) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    // 选择月份限制 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    disabledStartDate (startValue) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      const endValue = this.endValue 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      if (!startValue || !endValue) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        return startValue.valueOf() > this.moment().month(this.moment().month() - 1).valueOf() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      return startValue.valueOf() >= endValue.valueOf() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    disabledEndDate (endValue) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      const startValue = this.startValue 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      if (!startValue) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        return endValue.valueOf() > this.moment().month(this.moment().month() - 1).valueOf() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      return endValue.valueOf() < startValue.valueOf() || endValue.valueOf() > this.moment().month(this.moment().month() - 1).valueOf() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    // 开始时间 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    handleStartOpenChange (open) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      if (!open) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        this.endOpen = true 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    getStartDate (date, dateString) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      this.form.time[0] = dateString 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      this.queryParam.beginDate = date ? this.moment(dateString).startOf('month').format('YYYY-MM-DD') + ' 00:00:00' : '' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    // 结束时间 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    handleEndOpenChange (open) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      this.endOpen = open 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    getEndDate (date, dateString) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      this.form.time[1] = dateString 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      this.queryParam.endDate = date ? this.moment(dateString).endOf('month').format('YYYY-MM-DD') + ' 23:59:59' : '' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    //  产品分类  change 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    changeProductType (val, opt) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      this.queryParam.productTypeSn1 = val[0] ? val[0] : '' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      this.queryParam.productTypeSn2 = val[1] ? val[1] : '' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      this.queryParam.productTypeSn3 = val[2] ? val[2] : '' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    handleChange (val) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      this.tabVal = val 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    // 导出 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    handleExport () { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      const _this = this 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      const params = this.queryParam 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      _this.exportLoading = true 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      _this.spinning = true 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      _this.showExport = true 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      hdExportExcel(exportDetailReport, params, '收发存报表', function () { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        _this.exportLoading = false 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        _this.spinning = false 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      }) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    // 验证表单 type值  search查询 export导出 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    testForm (type) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      const _this = this 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      if (!_this.form.time[0] || !_this.form.time[1]) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        _this.$message.error('请选择月份') 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        return 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      _this.$refs.ruleForm.validate(valid => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        if (valid) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          if (type == 'search') { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            _this.handleSearch() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          } else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            _this.handleExport() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        } else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          _this.$message.error('请选择月份') 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          return false 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      }) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    // 查询 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    handleSearch () { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      const _this = this 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      // 总计 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      _this.getCount(this.queryParam) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      _this.$refs.table.refresh(true) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      _this.$refs.gatherBox.resetCurForm() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    // 重置 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    resetSearchForm () { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      this.$refs.ruleForm.resetFields() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      this.startValue = null 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      this.endValue = null 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      this.time = [] 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      this.queryParam.beginDate = undefined 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      this.queryParam.endDate = undefined 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      this.queryParam.product.code = '' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      this.queryParam.product.name = '' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      this.queryParam.productBrandSn = undefined 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      this.queryParam.productTypeSn1 = undefined 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      this.queryParam.productTypeSn2 = undefined 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      this.queryParam.productTypeSn3 = undefined 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      this.queryParam.warehouseSn = undefined 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      this.$refs.table.clearTable() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      this.productType = [] 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      this.totalData = null 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      this.$refs.gatherBox.resetTable() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    pageInit () { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      const _this = this 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      this.$nextTick(() => { // 页面渲染完成后的回调 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        _this.setTableH() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      }) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    setTableH () { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      const tableSearchH = this.$refs.tableSearch.offsetHeight 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      this.tableHeight = window.innerHeight - tableSearchH - 200 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  mounted () { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    if (!this.$store.state.app.isNewTab) { // 页签刷新时调用 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      this.pageInit() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  activated () { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    // 如果是新页签打开,则重置当前页面 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    if (this.$store.state.app.isNewTab) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      this.pageInit() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+</script> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+<style lang="less" scoped> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  .monthBox{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    /deep/.ant-calendar-picker-icon{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      display:none !important; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    /deep/.ant-calendar-picker input{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      text-align:center; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+</style> 
			 |