1004749546@qq.com 4 years ago
parent
commit
3c86bed9e4

+ 5 - 0
src/libs/reportData.js

@@ -61,5 +61,10 @@ export default {
     { id: '15', area: '', province: 'A区', customerName: '贵州省汇总', targetName: '合计:', dealerLevelDictValue: 400.00, totalQty: 400.00, totalCost: 400.00, totalPrice: 400.00, auditTime: 400.00, allocateTypeName: 400.00, stateDictValue: undefined, printStateDictValue: undefined, printCount: undefined, printCounts: undefined, printCsounts: undefined, printdCounts: undefined, prfintCounts: 2400.00, printCogunts: 24000.00, phrintCounts: 10, printCsountss: 1800.00, prinftCounts: 600.00 },
     { id: '15', area: '', province: 'A区', customerName: '贵州省汇总', targetName: '合计:', dealerLevelDictValue: 400.00, totalQty: 400.00, totalCost: 400.00, totalPrice: 400.00, auditTime: 400.00, allocateTypeName: 400.00, stateDictValue: undefined, printStateDictValue: undefined, printCount: undefined, printCounts: undefined, printCsounts: undefined, printdCounts: undefined, prfintCounts: 2400.00, printCogunts: 24000.00, phrintCounts: 10, printCsountss: 1800.00, prinftCounts: 600.00 },
     { id: '16', area: '', province: '', customerName: 'A区汇总', targetName: '合计:', dealerLevelDictValue: 800.00, totalQty: 800.00, totalCost: 800.00, totalPrice: 800.00, auditTime: 800.00, allocateTypeName: 800.00, stateDictValue: undefined, printStateDictValue: undefined, printCount: undefined, printCounts: undefined, printCsounts: undefined, printdCounts: undefined, prfintCounts: 4800.00, printCogunts: 48000.00, phrintCounts: 10, printCsountss: 3600.00, prinftCounts: 1200.00 },
     { id: '16', area: '', province: '', customerName: 'A区汇总', targetName: '合计:', dealerLevelDictValue: 800.00, totalQty: 800.00, totalCost: 800.00, totalPrice: 800.00, auditTime: 800.00, allocateTypeName: 800.00, stateDictValue: undefined, printStateDictValue: undefined, printCount: undefined, printCounts: undefined, printCsounts: undefined, printdCounts: undefined, prfintCounts: 4800.00, printCogunts: 48000.00, phrintCounts: 10, printCsountss: 3600.00, prinftCounts: 1200.00 },
     { id: '17', area: '合计:', province: '', customerName: '', targetName: '', dealerLevelDictValue: 4000.00, totalQty: 4000.00, totalCost: 4000.00, totalPrice: 4000.00, auditTime: 4000.00, allocateTypeName: 4000.00, stateDictValue: undefined, printStateDictValue: undefined, printCount: undefined, printCounts: undefined, printCsounts: undefined, printdCounts: undefined, prfintCounts: 10000.00, printCogunts: 100000.00, phrintCounts: 10, printCsountss: 8000.00, prinftCounts: 2000.00 }
     { id: '17', area: '合计:', province: '', customerName: '', targetName: '', dealerLevelDictValue: 4000.00, totalQty: 4000.00, totalCost: 4000.00, totalPrice: 4000.00, auditTime: 4000.00, allocateTypeName: 4000.00, stateDictValue: undefined, printStateDictValue: undefined, printCount: undefined, printCounts: undefined, printCsounts: undefined, printdCounts: undefined, prfintCounts: 10000.00, printCogunts: 100000.00, phrintCounts: 10, printCsountss: 8000.00, prinftCounts: 2000.00 }
+  ],
+  salesReturnDetailReportList: [ //  销售退货明细报表数据
+	  { id: '1', area: '1区', province: '黑龙江省', returnNo: 'CGTK20210715666497351035', customerName: '箭冠汽配潮州潮安店', targetName: '配送品费用', dealerLevelDictValue: '市级经销商', directCustomName: '箭冠汽配哈尔滨南港店', IndirectCustomName: '', returnFinTime: '2020-08-12 10:20:36', type: '箭牌', totalCost: 100.00, totalPrice: 100.00, auditTime: 100.00, allocateTypeName: '雨刮片', stateDictValue: '箭牌A3系列有骨雨刮片', printStateDictValue: 'JW_A3018', productUnit: '支', printCount: undefined, printCounts: 1, printCsounts: 0, printdCounts: 1, prfintCounts: 9.00, printCogunts: 9.00, phrintCounts: 7.50, printCsountss: 7.50, prinftCounts: 9.00, prisntCogunts: 1.50, prinxtCounts: 0.00, printCocunts: '0', printCvounts: 0, printCgounts: '0.00', printCouhnts: '0.00', printCournts: '0.00' },
+	  { id: '2', area: '2区', province: '黑龙江省', returnNo: 'CGTK20210815666497311458', customerName: '箭冠汽配潮州潮安店', targetName: '促销费用', dealerLevelDictValue: '市级经销商', directCustomName: '箭冠汽配哈尔滨南港店', IndirectCustomName: '', returnFinTime: '2020-10-12 16:37:20', type: '箭牌', productUnit: '支', totalCost: 100.00, totalPrice: 100.00, auditTime: 100.00, allocateTypeName: '雨刮片', stateDictValue: '箭牌A3系列有骨雨刮片', printStateDictValue: 'JW_A3019', printCount: undefined, printCounts: 1, printCsounts: 0, printdCounts: 1, prfintCounts: 9.00, printCogunts: 9.00, phrintCounts: 7.50, printCsountss: 7.50, prinftCounts: 9.00, prisntCogunts: 1.50, prinxtCounts: 0.00, printCocunts: '0', printCvounts: 0, printCgounts: '0.00', printCouhnts: '0.00', printCournts: '0.00' },
+	  { id: '3', area: '1区', province: '黑龙江省', returnNo: 'CGTK20210815666497357845', customerName: '箭冠汽配潮州潮安店', targetName: '配送品费用', dealerLevelDictValue: '市级经销商', directCustomName: '箭冠汽配哈尔滨南港店', IndirectCustomName: '', returnFinTime: '2021-03-12 15:36:28', type: '冠牌', productUnit: '支', totalCost: 100.00, totalPrice: 100.00, auditTime: 100.00, allocateTypeName: '雨刮片', stateDictValue: '冠牌A3系列有骨雨刮片', printStateDictValue: 'GW_A3028', printCount: undefined, printCounts: 1, printCsounts: 0, printdCounts: 1, pprfintCounts: 9.00, printCogunts: 9.00, phrintCounts: 7.50, printCsountss: 7.50, prinftCounts: 9.00, prisntCogunts: 1.50, prinxtCounts: 0.00, printCocunts: '0', printCvounts: 0, printCgounts: '0.00', printCouhnts: '0.00', printCournts: '0.00' }
   ]
   ]
 }
 }

+ 499 - 68
src/views/reportData/returnSlipReport/list.vue

@@ -1,31 +1,65 @@
 <template>
 <template>
-  <a-card size="small" :bordered="false" class="provinceTypeSalesDetailsList-wrap">
+  <a-card size="small" :bordered="false" class="shortageStatisticsCList-wrap">
     <!-- 搜索条件 -->
     <!-- 搜索条件 -->
     <div class="table-page-search-wrapper">
     <div class="table-page-search-wrapper">
       <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
       <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
         <a-row :gutter="15">
         <a-row :gutter="15">
           <a-col :md="6" :sm="24">
           <a-col :md="6" :sm="24">
-            <a-form-item label="创建时间">
-              <rangeDate ref="rangeDate" @change="dateChange" />
+            <a-form-item label="销售日期">
+              <rangeDate ref="rangeDate" :value="time" @change="dateChange" />
             </a-form-item>
             </a-form-item>
           </a-col>
           </a-col>
           <a-col :md="6" :sm="24">
           <a-col :md="6" :sm="24">
-            <a-form-item label="区域">
-              <a-select id="provinceTypeSalesDetailsList-allocateTypeSn" v-model="queryParam.allocateTypeSn" placeholder="请选择区域" allowClear >
-                <a-select-option v-for="item in allocateTypeList" :key="item.allocateTypeSn" :value="item.allocateTypeSn">{{ item.name }}</a-select-option>
-              </a-select>
+            <a-form-item label="客户名称">
+              <custList ref="custList" id="shortageStatisticsCList-buyerSn" @change="custChange"></custList>
             </a-form-item>
             </a-form-item>
           </a-col>
           </a-col>
           <a-col :md="6" :sm="24">
           <a-col :md="6" :sm="24">
-            <a-form-item label="省份">
-              <a-select id="provinceTypeSalesDetailsList-state" v-model="queryParam.state" placeholder="请选择省份" allowClear >
-                <a-select-option v-for="item in allocateTypeList" :key="item.allocateTypeSn" :value="item.allocateTypeSn">{{ item.name }}</a-select-option>
-              </a-select>
+            <a-form-item label="客户类型">
+              <custList ref="custList" id="shortageStatisticsCList-buyerSn" @change="custChange"></custList>
             </a-form-item>
             </a-form-item>
           </a-col>
           </a-col>
           <a-col :md="6" :sm="24">
           <a-col :md="6" :sm="24">
-            <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="provinceTypeSalesDetailsList-refresh">查询</a-button>
-            <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="provinceTypeSalesDetailsList-reset">重置</a-button>
+            <a-form-item label="退货单号">
+              <a-input id="salesSlipReportList-allocateTypeSn" v-model.trim="queryParam.allocateTypeSn" allowClear placeholder="请输入退货单号"/>
+            </a-form-item>
+          </a-col>
+        </a-row>
+        <a-row :gutter="15">
+          <a-col :md="6" :sm="24">
+            <a-form-item label="所在区域">
+              <subarea id="shortageStatisticsCList-subarea" v-model="queryParam.subareaSn"></subarea>
+            </a-form-item>
+          </a-col>
+          <a-col :md="12" :sm="24">
+            <a-row :gutter="15">
+              <!-- 地址 -->
+              <a-col span="8">
+                <a-form-item prop="provinceSn">
+                  <a-select id="supplierInfoEdit-provinceSn" @change="getCityList" v-model="queryParam.provinceSn" placeholder="请选择省">
+                    <a-select-option v-for="item in addrProvinceList" :value="item.areaSn" :key="item.areaSn + 'a'">{{ item.name }}</a-select-option>
+                  </a-select>
+                </a-form-item>
+              </a-col>
+              <a-col span="8">
+                <a-form-item prop="citySn">
+                  <a-select id="supplierInfoEdit-citySn" @change="getAreaList" v-model="queryParam.citySn" placeholder="请选择市">
+                    <a-select-option v-for="item in addrCityList" :value="item.areaSn" :key="item.areaSn + 'b'">{{ item.name }}</a-select-option>
+                  </a-select>
+                </a-form-item>
+              </a-col>
+              <a-col span="8">
+                <a-form-item prop="districtSn">
+                  <a-select id="supplierInfoEdit-districtSn" @change="areaCharged" v-model="queryParam.districtSn" placeholder="请选择区/县">
+                    <a-select-option v-for="item in addrDistrictList" :value="item.areaSn" :key="item.areaSn + 'c'">{{ item.name }}</a-select-option>
+                  </a-select>
+                </a-form-item>
+              </a-col>
+            </a-row>
+          </a-col>
+          <a-col :md="6" :sm="24">
+            <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="shortageStatisticsCList-refresh">查询</a-button>
+            <a-button style="margin-left: 8px" @click="resetSearchForm" :disabled="disabled" id="shortageStatisticsCList-reset">重置</a-button>
           </a-col>
           </a-col>
         </a-row>
         </a-row>
       </a-form>
       </a-form>
@@ -34,24 +68,27 @@
     <s-table
     <s-table
       class="sTable"
       class="sTable"
       ref="table"
       ref="table"
-      size="defalut"
+      size="default"
       :rowKey="(record) => record.id"
       :rowKey="(record) => record.id"
       :columns="columns"
       :columns="columns"
       :data="loadData"
       :data="loadData"
-      :scroll="{ x: 3650 }"
+      :scroll="{ x: 2880, y: tableHeight }"
       bordered>
       bordered>
     </s-table>
     </s-table>
   </a-card>
   </a-card>
 </template>
 </template>
 
 
 <script>
 <script>
+import moment from 'moment'
+import getDate from '@/libs/getDate.js'
 import { STable, VSelect } from '@/components'
 import { STable, VSelect } from '@/components'
-import reportData from '@/libs/reportData'
 import rangeDate from '@/views/common/rangeDate.vue'
 import rangeDate from '@/views/common/rangeDate.vue'
-// import { allocateBillList, allocateBillDel, allocateBillAudit, allocateBillExport } from '@/api/allocateBill'
-// import { allocateTypeAllList } from '@/api/allocateType'
+import custList from '@/views/common/custList.vue'
+import subarea from '@/views/common/subarea.js'
+import { getArea } from '@/api/data'
+import { oosBuyerList, oosBuyerDetailCount, oosBuyerDetailPageCount, oosDetailExport } from '@/api/oos'
 export default {
 export default {
-  components: { STable, VSelect, rangeDate },
+  components: { STable, VSelect, custList, subarea, rangeDate },
   data () {
   data () {
     return {
     return {
       advanced: false, // 高级搜索 展开/关闭
       advanced: false, // 高级搜索 展开/关闭
@@ -59,49 +96,261 @@ export default {
       queryParam: { //  查询条件
       queryParam: { //  查询条件
         beginDate: '',
         beginDate: '',
         endDate: '',
         endDate: '',
-        targetName: '', //  调往对象
-        allocateTypeSn: undefined, //  调拨类型
-        state: undefined, //  业务状态
-        allocateNo: '' //  调拨单号
+        buyerSn: undefined,
+        subareaSn: undefined, //  区域
+        provinceSn: undefined,
+        citySn: undefined,
+        districtSn: undefined
       },
       },
       disabled: false, //  查询、重置按钮是否可操作
       disabled: false, //  查询、重置按钮是否可操作
-      exportLoading: false,
-      reportData: reportData.reportDataList,
+      exportLoading: false, // 导出loading
+      addrProvinceList: [], //  省下拉
+      addrCityList: [], //  市下拉
+      addrDistrictList: [], //  区下拉
+      time: [], //  创建时间
       columns: [
       columns: [
-        { title: '序号', dataIndex: 'no', width: 80, align: 'center', fixed: 'left' },
-        { title: '区域', dataIndex: 'area', width: 200, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '省份', dataIndex: 'province', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '箭牌滤清器', dataIndex: 'targetName', width: 120, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '冠牌滤清器', dataIndex: 'dealerLevelDictValue', width: 120, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '滤清器合计', dataIndex: 'totalQty', width: 120, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '箭牌雨刮片', dataIndex: 'totalCost', width: 120, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '冠牌雨刮片', dataIndex: 'totalPrice', width: 120, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '雨刮片合计', dataIndex: 'auditTime', width: 120, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '箭牌刹车片', dataIndex: 'allocateTypeName', width: 120, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '箭牌感应线', dataIndex: 'stateDictValue', width: 120, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '冠牌刹车片', dataIndex: 'printStateDictValue', width: 120, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: 'TBU刹车片', dataIndex: 'printCount', width: 120, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: 'TBU刹车油', dataIndex: 'printCounts', width: 120, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: 'TBU感应线', dataIndex: 'printCsounts', width: 120, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '刹车片合计', dataIndex: 'printdCounts', width: 120, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '德路斯润滑油', dataIndex: 'prfintCounts', width: 120, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '德路斯刹车油', dataIndex: 'printCogunts', width: 120, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '德路斯变速箱油', dataIndex: 'phrintCounts', width: 140, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '德路斯合计', dataIndex: 'printCsountss', width: 120, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '稳升点火线圈', dataIndex: 'prinftCounts', width: 120, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '稳升灯泡', dataIndex: 'prisntCogunts', width: 120, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '稳升合计', dataIndex: 'prinxtCounts', width: 120, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '汇箭', dataIndex: 'printCocunts', width: 120, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '布瑞斯', dataIndex: 'printCvounts', width: 120, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '箭牌喇叭', dataIndex: 'printCgounts', width: 120, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '品牌合计', dataIndex: 'printCouhnts', width: 120, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: 'NGK', dataIndex: 'printCoujnts', width: 120, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '品牌+NGK总合计', dataIndex: 'printCournts', width: 150, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } }
+        { title: '序号', dataIndex: 'no', width: 80, align: 'center' },
+        { title: '区域',
+          dataIndex: 'area',
+          width: 150,
+          align: 'center',
+          customRender: (text, row, index) => {
+            if (text == '合计') {
+              return {
+                children: <span>{ text }</span>,
+                attrs: {
+                  colSpan: 4
+                }
+              }
+            }
+            return text
+          }
+        },
+        { title: '退货单号',
+		  dataIndex: 'allocateTypeSn',
+		  width: 150,
+		  align: 'center',
+		  customRender: (text, row, index) => {
+		    if (text == '合计') {
+		      return {
+		        children: <span>{ text }</span>,
+		        attrs: {
+		          colSpan: 4
+		        }
+		      }
+		    }
+		    return text
+		  }
+        },
+        { title: '省份',
+          dataIndex: 'provinceName',
+          width: 150,
+          align: 'center',
+          customRender: function (text, row, index) {
+            if (text == '合计') {
+              return {
+                children: <span>{ text }</span>,
+                attrs: {
+                  colSpan: 0
+                }
+              }
+            }
+            return text || '--'
+          } },
+        { title: '客户名称',
+          dataIndex: 'custName',
+          width: 200,
+          align: 'center',
+          customRender: function (text, row, index) {
+            if (text == '合计') {
+              return {
+                children: <span>{ text }</span>,
+                attrs: {
+                  colSpan: 0
+                }
+              }
+            }
+            return text || '--'
+          } },
+        { title: '客户类型',
+          dataIndex: 'custType',
+          width: 200,
+          align: 'center',
+          customRender: function (text, row, index) {
+            if (text == '合计') {
+              return {
+                children: <span>{ text }</span>,
+                attrs: {
+                  colSpan: 0
+                }
+              }
+            }
+            return text || '--'
+          } },
+        { title: '品牌',
+          align: 'center',
+          children: [
+            {
+              title: '箭牌',
+              align: 'center',
+              children: [
+                {
+                  title: '滤清器',
+                  dataIndex: 'pp1',
+                  align: 'center',
+                  width: 100,
+                  customRender: function (text) { return text ? ('¥' + text) : '--' }
+                },
+                {
+                  title: '雨刮片',
+                  dataIndex: 'pp2',
+                  align: 'center',
+                  width: 100,
+                  customRender: function (text) { return text ? ('¥' + text) : '--' }
+                },
+                {
+                  title: '喇叭',
+                  dataIndex: 'pp3',
+                  align: 'center',
+                  width: 100,
+                  customRender: function (text) { return text ? ('¥' + text) : '--' }
+                },
+                {
+                  title: '刹车片',
+                  dataIndex: 'pp4',
+                  align: 'center',
+                  width: 100,
+                  customRender: function (text) { return text ? ('¥' + text) : '--' }
+                },
+                {
+                  title: '感应线',
+                  dataIndex: 'pp5',
+                  align: 'center',
+                  width: 100,
+                  customRender: function (text) { return text ? ('¥' + text) : '--' }
+                }
+              ]
+            },
+            {
+              title: '冠牌',
+              align: 'center',
+              children: [
+                {
+                  title: '滤清器',
+                  dataIndex: 'pp6',
+                  align: 'center',
+                  width: 100,
+                  customRender: function (text) { return text ? ('¥' + text) : '--' }
+                },
+                {
+                  title: '雨刮片',
+                  dataIndex: 'pp7',
+                  align: 'center',
+                  width: 100,
+                  customRender: function (text) { return text ? ('¥' + text) : '--' }
+                },
+                {
+                  title: '刹车片',
+                  dataIndex: 'pp8',
+                  align: 'center',
+                  width: 100,
+                  customRender: function (text) { return text ? ('¥' + text) : '--' }
+                }
+              ]
+            },
+            {
+              title: '汇箭',
+              dataIndex: 'pp9',
+              align: 'center',
+              width: 100,
+              customRender: function (text) { return text ? ('¥' + text) : '--' }
+            },
+            {
+              title: '德路斯',
+              dataIndex: 'pp10',
+              align: 'center',
+              width: 100,
+              customRender: function (text) { return text ? ('¥' + text) : '--' }
+            },
+            {
+              title: '稳升',
+              dataIndex: 'pp11',
+              align: 'center',
+              width: 100,
+              customRender: function (text) { return text ? ('¥' + text) : '--' }
+            },
+            {
+              title: 'TBU',
+              dataIndex: 'pp12',
+              align: 'center',
+              width: 100,
+              customRender: function (text) { return text ? ('¥' + text) : '--' }
+            }
+          ] },
+        { title: '代理品牌',
+          align: 'center',
+          children: [
+            {
+              title: 'NGK',
+              dataIndex: 'pp13',
+              align: 'center',
+              width: 100,
+              customRender: function (text) { return text ? ('¥' + text) : '--' }
+            },
+            {
+              title: '飞利浦',
+              dataIndex: 'pp14',
+              align: 'center',
+              width: 100,
+              customRender: function (text) { return text ? ('¥' + text) : '--' }
+            },
+            {
+              title: '车仆',
+              dataIndex: 'pp15',
+              align: 'center',
+              width: 100,
+              customRender: function (text) { return text ? ('¥' + text) : '--' }
+            },
+            {
+              title: '瓦尔塔',
+              dataIndex: 'pp16',
+              align: 'center',
+              width: 100,
+              customRender: function (text) { return text ? ('¥' + text) : '--' }
+            },
+            {
+              title: '雷贝斯托',
+              dataIndex: 'pp17',
+              align: 'center',
+              width: 100,
+              customRender: function (text) { return text ? ('¥' + text) : '--' }
+            },
+            {
+              title: '德尔福',
+              dataIndex: 'pp18',
+              align: 'center',
+              width: 100,
+              customRender: function (text) { return text ? ('¥' + text) : '--' }
+            },
+            {
+              title: '巴诺德',
+              dataIndex: 'pp19',
+              align: 'center',
+              width: 100,
+              customRender: function (text) { return text ? ('¥' + text) : '--' }
+            }
+          ] },
+        { title: '开单退货合计金额', width: 200, dataIndex: 'totalAmount', align: 'center', customRender: function (text) { return text ? ('¥' + text) : '--' } }
       ],
       ],
       // 加载数据方法 必须为 Promise 对象
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
       loadData: parameter => {
-        this.disabled = true
-        // return allocateBillList(Object.assign(parameter, this.queryParam)).then(res => {
+        // this.disabled = true
+        // if (this.tableHeight == 0) {
+        //   this.tableHeight = window.innerHeight - 380
+        // }
+        // const paramsPage = Object.assign(this.queryParam, { pageNo: parameter.pageNo, pageSize: parameter.pageSize }) //  有分页
+        // const params = Object.assign(parameter, this.queryParam) //  无分页
+        // return oosBuyerList(params).then(res => {
         //   const data = res.data
         //   const data = res.data
         //   const no = (data.pageNo - 1) * data.pageSize
         //   const no = (data.pageNo - 1) * data.pageSize
         //   for (var i = 0; i < data.list.length; i++) {
         //   for (var i = 0; i < data.list.length; i++) {
@@ -115,8 +364,87 @@ export default {
           const data = {
           const data = {
             pageNo: 1,
             pageNo: 1,
             pageSize: 10,
             pageSize: 10,
-            list: reportData.reportDataList,
-            count: 10
+            list: [{
+              area: 'A区',
+			  allocateTypeSn: 'TH201622021245541',
+              provinceName: '广东省',
+              custName: '剪冠汽配佛山白坭店',
+              custType: '省级服务中心',
+              pp1: '0',
+              pp2: '0',
+              pp3: '0',
+              pp4: '0',
+              pp5: '0',
+              pp6: '0',
+              pp7: '0',
+              pp8: '0',
+              pp9: '0',
+              pp10: '0',
+              pp11: '0',
+              pp12: '0',
+              pp13: '37.00',
+              pp14: '0',
+              pp15: '0',
+              pp16: '0',
+              pp17: '0',
+              pp18: '0',
+              pp19: '0',
+              totalAmount: '37.00'
+            },
+            {
+              area: 'A区',
+			  allocateTypeSn: 'TH201722021245582',
+              provinceName: '广东省',
+              custName: '支持省级',
+              custType: '省级服务中心',
+              pp1: '0',
+              pp2: '36.50',
+              pp3: '0',
+              pp4: '0',
+              pp5: '0',
+              pp6: '0',
+              pp7: '0',
+              pp8: '0',
+              pp9: '0',
+              pp10: '0',
+              pp11: '0',
+              pp12: '0',
+              pp13: '0',
+              pp14: '0',
+              pp15: '0',
+              pp16: '0',
+              pp17: '0',
+              pp18: '0',
+              pp19: '0',
+              totalAmount: '36.50'
+            },
+            {
+              area: '合计',
+              provinceName: '合计',
+              custName: '合计',
+              custType: '合计',
+              pp1: '0',
+              pp2: '36.50',
+              pp3: '0',
+              pp4: '0',
+              pp5: '0',
+              pp6: '0',
+              pp7: '0',
+              pp8: '0',
+              pp9: '0',
+              pp10: '0',
+              pp11: '0',
+              pp12: '0',
+              pp13: '37.00',
+              pp14: '0',
+              pp15: '0',
+              pp16: '0',
+              pp17: '0',
+              pp18: '0',
+              pp19: '0',
+              totalAmount: '73.50'
+            }],
+            count: 1
           }
           }
           for (var i = 0; i < data.list.length; i++) {
           for (var i = 0; i < data.list.length; i++) {
             data.list[i].no = i + 1
             data.list[i].no = i + 1
@@ -125,8 +453,9 @@ export default {
           resolve(data)
           resolve(data)
         })
         })
       },
       },
-      allocateTypeList: [], //  调拨类型
-      openModal: false //  新增编辑  弹框
+      productType: [],
+      productTotal: null,
+      currentTotal: null
     }
     }
   },
   },
   methods: {
   methods: {
@@ -135,20 +464,122 @@ export default {
       this.queryParam.beginDate = date[0]
       this.queryParam.beginDate = date[0]
       this.queryParam.endDate = date[1]
       this.queryParam.endDate = date[1]
     },
     },
+    custChange (obj) {
+      this.queryParam.buyerSn = obj.key
+    },
+    // 获取城市列表
+    getCityList (val) {
+      const index = this.addrProvinceList.findIndex(item => item.areaSn == val)
+      if (index >= 0) {
+        this.queryParam.provinceName = this.addrProvinceList[index].name
+      }
+      this.addrCityList = []
+      this.addrDistrictList = []
+      this.queryParam.citySn = undefined
+      this.queryParam.districtSn = undefined
+      this.queryParam.address = ''
+      this.getArea('city', val)
+    },
+    // 获取区县列表
+    getAreaList (val) {
+      const index = this.addrCityList.findIndex(item => item.areaSn == val)
+      if (index >= 0) {
+        this.queryParam.cityName = this.addrCityList[index].name
+      }
+      this.addrDistrictList = []
+      this.queryParam.districtSn = undefined
+      this.queryParam.address = ''
+      this.getArea('district', val)
+    },
+    // 区县变更
+    areaCharged (val) {
+      const index = this.addrDistrictList.findIndex(item => item.areaSn == val)
+      if (index >= 0) {
+        this.queryParam.districtName = this.addrDistrictList[index].name
+      }
+      this.queryParam.address = ''
+    },
+    //  省/市/区
+    getArea (leve, sn) {
+      let params
+      if (leve == 'province') {
+        params = { type: '2' }
+      } else {
+        params = { parentId: sn, type: leve == 'city' ? '3' : '4' }
+      }
+      getArea(params).then(res => {
+        if (res.status == 200) {
+          if (leve == 'province') {
+            this.addrProvinceList = res.data || []
+          } else if (leve == 'city') {
+            this.addrCityList = res.data || []
+          } else if (leve == 'district') {
+            this.addrDistrictList = res.data || []
+          }
+        } else {
+          if (leve == 'province') {
+            this.addrProvinceList = []
+          } else if (leve == 'city') {
+            this.addrCityList = []
+          } else if (leve == 'district') {
+            this.addrDistrictList = []
+          }
+        }
+      })
+    },
     //  重置
     //  重置
     resetSearchForm () {
     resetSearchForm () {
-      this.$refs.rangeDate.resetDate()
-      this.queryParam.beginDate = ''
-      this.queryParam.endDate = ''
-      this.queryParam.targetName = ''
-      this.queryParam.allocateTypeSn = undefined
-      this.queryParam.state = undefined
-      this.queryParam.allocateNo = ''
+      this.$refs.rangeDate.resetDate(this.time)
+      this.queryParam.beginDate = getDate.getThreeMonthDays().starttime
+      this.queryParam.endDate = getDate.getCurrMonthDays().endtime
+      this.queryParam.buyerSn = undefined
+      this.queryParam.subareaSn = undefined
+      this.queryParam.productName = ''
+      this.queryParam.productCode = ''
+      this.queryParam.productTypeSn1 = ''
+      this.queryParam.productTypeSn2 = ''
+      this.queryParam.productTypeSn3 = ''
+      this.queryParam.salesBillNo = ''
+      this.productType = []
       this.$refs.table.refresh(true)
       this.$refs.table.refresh(true)
+    },
+    // 详情
+    handleDetail (row) {
+      this.$router.push({ name: 'salesDetail', params: { sn: row.salesBillSn } })
+    },
+    //  导出
+    handleExport () {
+      const params = this.queryParam
+      if (this.time && this.time.length) {
+        params.beginDate = moment(this.time[0]).format('YYYY-MM-DD')
+        params.endDate = moment(this.time[1]).format('YYYY-MM-DD')
+      } else {
+        params.beginDate = ''
+        params.endDate = ''
+      }
+      this.exportLoading = true
+      oosDetailExport(params).then(res => {
+        this.exportLoading = false
+        this.download(res)
+      })
+    },
+    download (data) {
+      if (!data) { return }
+      const url = window.URL.createObjectURL(new Blob([data]))
+      const link = document.createElement('a')
+      link.style.display = 'none'
+      link.href = url
+      const a = moment().format('YYYYMMDDHHmmss')
+      const fname = '缺货统计(按客户)' + a
+      link.setAttribute('download', fname + '.xlsx')
+      document.body.appendChild(link)
+      link.click()
     }
     }
   },
   },
   beforeRouteEnter (to, from, next) {
   beforeRouteEnter (to, from, next) {
-    next(vm => {})
+    next(vm => {
+      vm.getArea('province')
+    })
   }
   }
 }
 }
 </script>
 </script>

+ 132 - 33
src/views/reportData/salesReturnDetailReport/list.vue

@@ -5,12 +5,70 @@
       <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
       <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
         <a-row :gutter="15">
         <a-row :gutter="15">
           <a-col :md="6" :sm="24">
           <a-col :md="6" :sm="24">
-            <a-form-item label="创建时间">
+            <a-form-item label="退货完成日期">
               <rangeDate ref="rangeDate" @change="dateChange" />
               <rangeDate ref="rangeDate" @change="dateChange" />
             </a-form-item>
             </a-form-item>
           </a-col>
           </a-col>
           <a-col :md="6" :sm="24">
           <a-col :md="6" :sm="24">
-            <a-form-item label="区域">
+            <a-form-item label="盘点区间日期">
+              <rangeDate ref="rangeDate" @change="dateChange" />
+            </a-form-item>
+          </a-col>
+          <a-col :md="6" :sm="24">
+            <a-form-item label="退货单号" :label-col="{ span:7 }" :wrapper-col="{ span:17}">
+              <a-input id="salesReturn-salesReturnBillNo" v-model.trim="queryParam.salesReturnBillNo" allowClear placeholder="请输入退货单号"/>
+            </a-form-item>
+          </a-col>
+          <a-col :md="6" :sm="24">
+            <a-form-item label="产品编码" :label-col="{ span:7 }" :wrapper-col="{ span:17}">
+              <a-input id="salesReturn-salesReturnBillNo" v-model.trim="queryParam.salesReturnBillNo" allowClear placeholder="请输入产品编码"/>
+            </a-form-item>
+          </a-col>
+          <a-col :md="6" :sm="24">
+            <a-form-item label="产品名称" :label-col="{ span:7 }" :wrapper-col="{ span:17}">
+              <a-input id="salesReturn-salesReturnBillNo" v-model.trim="queryParam.salesReturnBillNo" allowClear placeholder="请输入产品名称"/>
+            </a-form-item>
+          </a-col>
+          <a-col :md="6" :sm="24">
+            <a-form-item label="客户名称" :label-col="{ span:7 }" :wrapper-col="{ span:17}">
+              <custList id="salesReturn-buyerSn" ref="custList" @change="custChange"></custList>
+            </a-form-item>
+          </a-col>
+          <a-col :md="6" :sm="24">
+            <a-form-item label="客户类型">
+              <custList ref="custList" id="shortageStatisticsCList-buyerSn" @change="custChange"></custList>
+            </a-form-item>
+          </a-col>
+          <a-col :md="6" :sm="24">
+            <a-form-item label="品牌类别">
+              <a-select id="provinceTypeSalesDetailsList-allocateTypeSn" v-model="queryParam.allocateTypeSn" placeholder="请选择" allowClear >
+                <a-select-option v-for="item in allocateTypeList" :key="item.allocateTypeSn" :value="item.allocateTypeSn">{{ item.name }}</a-select-option>
+              </a-select>
+            </a-form-item>
+          </a-col>
+          <a-col :md="6" :sm="24">
+            <a-form-item label="产品品牌">
+              <a-select id="provinceTypeSalesDetailsList-allocateTypeSn" v-model="queryParam.allocateTypeSn" placeholder="请选择" allowClear >
+                <a-select-option v-for="item in allocateTypeList" :key="item.allocateTypeSn" :value="item.allocateTypeSn">{{ item.name }}</a-select-option>
+              </a-select>
+            </a-form-item>
+          </a-col>
+          <a-col :md="6" :sm="24">
+            <a-form-item label="二级类别">
+              <a-select id="provinceTypeSalesDetailsList-allocateTypeSn" v-model="queryParam.allocateTypeSn" placeholder="请选择" allowClear >
+                <a-select-option v-for="item in allocateTypeList" :key="item.allocateTypeSn" :value="item.allocateTypeSn">{{ item.name }}</a-select-option>
+              </a-select>
+            </a-form-item>
+          </a-col>
+          <a-col :md="6" :sm="24">
+            <a-form-item label="三级类别">
+              <a-select id="provinceTypeSalesDetailsList-allocateTypeSn" v-model="queryParam.allocateTypeSn" placeholder="请选择" allowClear >
+                <a-select-option v-for="item in allocateTypeList" :key="item.allocateTypeSn" :value="item.allocateTypeSn">{{ item.name }}</a-select-option>
+              </a-select>
+            </a-form-item>
+          </a-col>
+          <a-col :md="6" :sm="24">
+            <a-form-item label="所在区域">
               <a-select id="provinceTypeSalesDetailsList-allocateTypeSn" v-model="queryParam.allocateTypeSn" placeholder="请选择区域" allowClear >
               <a-select id="provinceTypeSalesDetailsList-allocateTypeSn" v-model="queryParam.allocateTypeSn" placeholder="请选择区域" allowClear >
                 <a-select-option v-for="item in allocateTypeList" :key="item.allocateTypeSn" :value="item.allocateTypeSn">{{ item.name }}</a-select-option>
                 <a-select-option v-for="item in allocateTypeList" :key="item.allocateTypeSn" :value="item.allocateTypeSn">{{ item.name }}</a-select-option>
               </a-select>
               </a-select>
@@ -23,6 +81,20 @@
               </a-select>
               </a-select>
             </a-form-item>
             </a-form-item>
           </a-col>
           </a-col>
+          <a-col :md="6" :sm="24">
+            <a-form-item label="市">
+              <a-select id="provinceTypeSalesDetailsList-state" v-model="queryParam.state" placeholder="请选择市" allowClear >
+                <a-select-option v-for="item in allocateTypeList" :key="item.allocateTypeSn" :value="item.allocateTypeSn">{{ item.name }}</a-select-option>
+              </a-select>
+            </a-form-item>
+          </a-col>
+          <a-col :md="6" :sm="24">
+            <a-form-item label="区">
+              <a-select id="provinceTypeSalesDetailsList-state" v-model="queryParam.state" placeholder="请选择区" allowClear >
+                <a-select-option v-for="item in allocateTypeList" :key="item.allocateTypeSn" :value="item.allocateTypeSn">{{ item.name }}</a-select-option>
+              </a-select>
+            </a-form-item>
+          </a-col>
           <a-col :md="6" :sm="24">
           <a-col :md="6" :sm="24">
             <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="provinceTypeSalesDetailsList-refresh">查询</a-button>
             <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="provinceTypeSalesDetailsList-refresh">查询</a-button>
             <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="provinceTypeSalesDetailsList-reset">重置</a-button>
             <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="provinceTypeSalesDetailsList-reset">重置</a-button>
@@ -34,12 +106,24 @@
     <s-table
     <s-table
       class="sTable"
       class="sTable"
       ref="table"
       ref="table"
-      size="defalut"
+      size="default"
       :rowKey="(record) => record.id"
       :rowKey="(record) => record.id"
       :columns="columns"
       :columns="columns"
       :data="loadData"
       :data="loadData"
       :scroll="{ x: 3650 }"
       :scroll="{ x: 3650 }"
       bordered>
       bordered>
+      <template slot="footer" slot-scope="currentPageData">
+        <a-table
+          ref="table_footer"
+          size="default"
+          :pagination="false"
+          :bordered="false"
+          :rowKey="(record) => record.id"
+          :columns="columnsTotal"
+          :data-source="totalData"
+        >
+        </a-table>
+      </template>
     </s-table>
     </s-table>
   </a-card>
   </a-card>
 </template>
 </template>
@@ -48,10 +132,11 @@
 import { STable, VSelect } from '@/components'
 import { STable, VSelect } from '@/components'
 import reportData from '@/libs/reportData'
 import reportData from '@/libs/reportData'
 import rangeDate from '@/views/common/rangeDate.vue'
 import rangeDate from '@/views/common/rangeDate.vue'
+import custList from '@/views/common/custList.vue'
 // import { allocateBillList, allocateBillDel, allocateBillAudit, allocateBillExport } from '@/api/allocateBill'
 // import { allocateBillList, allocateBillDel, allocateBillAudit, allocateBillExport } from '@/api/allocateBill'
 // import { allocateTypeAllList } from '@/api/allocateType'
 // import { allocateTypeAllList } from '@/api/allocateType'
 export default {
 export default {
-  components: { STable, VSelect, rangeDate },
+  components: { STable, VSelect, rangeDate, custList },
   data () {
   data () {
     return {
     return {
       advanced: false, // 高级搜索 展开/关闭
       advanced: false, // 高级搜索 展开/关闭
@@ -66,38 +151,52 @@ export default {
       },
       },
       disabled: false, //  查询、重置按钮是否可操作
       disabled: false, //  查询、重置按钮是否可操作
       exportLoading: false,
       exportLoading: false,
-      reportData: reportData.reportDataList,
+      reportData: reportData.salesReturnDetailReportList,
+	  totalData: [
+		  { printCsountss: 3, prinftCounts: 27, prisntCogunts: 22.5, prinxtCounts: '0', printCocunts: 3, printCvounts: '0', printCgounts: '0.00', printCouhnts: '0.00', printCournts: '0.00' }
+	  ],
       columns: [
       columns: [
         { title: '序号', dataIndex: 'no', width: 80, align: 'center', fixed: 'left' },
         { title: '序号', dataIndex: 'no', width: 80, align: 'center', fixed: 'left' },
         { title: '区域', dataIndex: 'area', width: 200, align: 'center', customRender: function (text) { return text || '--' } },
         { title: '区域', dataIndex: 'area', width: 200, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '省份', dataIndex: 'province', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '箭牌滤清器', dataIndex: 'targetName', width: 120, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '冠牌滤清器', dataIndex: 'dealerLevelDictValue', width: 120, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '滤清器合计', dataIndex: 'totalQty', width: 120, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '箭牌雨刮片', dataIndex: 'totalCost', width: 120, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '冠牌雨刮片', dataIndex: 'totalPrice', width: 120, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '雨刮片合计', dataIndex: 'auditTime', width: 120, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '箭牌刹车片', dataIndex: 'allocateTypeName', width: 120, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '箭牌感应线', dataIndex: 'stateDictValue', width: 120, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '冠牌刹车片', dataIndex: 'printStateDictValue', width: 120, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: 'TBU刹车片', dataIndex: 'printCount', width: 120, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: 'TBU刹车油', dataIndex: 'printCounts', width: 120, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: 'TBU感应线', dataIndex: 'printCsounts', width: 120, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '刹车片合计', dataIndex: 'printdCounts', width: 120, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '德路斯润滑油', dataIndex: 'prfintCounts', width: 120, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '德路斯刹车油', dataIndex: 'printCogunts', width: 120, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '德路斯变速箱油', dataIndex: 'phrintCounts', width: 140, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '德路斯合计', dataIndex: 'printCsountss', width: 120, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '稳升点火线圈', dataIndex: 'prinftCounts', width: 120, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '稳升灯泡', dataIndex: 'prisntCogunts', width: 120, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '稳升合计', dataIndex: 'prinxtCounts', width: 120, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '汇箭', dataIndex: 'printCocunts', width: 120, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '布瑞斯', dataIndex: 'printCvounts', width: 120, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '箭牌喇叭', dataIndex: 'printCgounts', width: 120, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '品牌合计', dataIndex: 'printCouhnts', width: 120, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: 'NGK', dataIndex: 'printCoujnts', width: 120, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '品牌+NGK总合计', dataIndex: 'printCournts', width: 150, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } }
+        { title: '退货单号', dataIndex: 'returnNo', width: 200, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '省份', dataIndex: 'province', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '客户名称', dataIndex: 'customerName', width: 120, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '客户类型', dataIndex: 'dealerLevelDictValue', width: 120, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '直接绑定客户名称', dataIndex: 'directCustomName', width: 120, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '间接绑定客户名称', dataIndex: 'IndirectCustomName', width: 120, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '退货完成日期', dataIndex: 'returnFinTime', width: 120, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '品牌', dataIndex: 'type', width: 120, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '二级类别', dataIndex: 'allocateTypeName', width: 120, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '产品名称', dataIndex: 'stateDictValue', width: 120, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '产品编码', dataIndex: 'printStateDictValue', width: 120, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '单位', dataIndex: 'productUnit', width: 120, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '退货数量', dataIndex: 'printCounts', width: 120, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '返库数量', dataIndex: 'printCsounts', width: 120, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '坏件数量', dataIndex: 'printdCounts', width: 120, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '退货开单价', dataIndex: 'prfintCounts', width: 120, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '退货开单金额', dataIndex: 'printCogunts', width: 120, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '退货实售价', dataIndex: 'phrintCounts', width: 140, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '退货实售金额', dataIndex: 'printCsountss', width: 120, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '市级价金额', dataIndex: 'prinftCounts', width: 120, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '直接差价', dataIndex: 'prisntCogunts', width: 120, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '间接差价', dataIndex: 'prinxtCounts', width: 120, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '再入库单价', dataIndex: 'printCocunts', width: 120, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '正常退货数量', dataIndex: 'printCvounts', width: 120, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '正常退货金额', dataIndex: 'printCgounts', width: 120, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '正常再入库金额', dataIndex: 'printCouhnts', width: 120, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '正常退货入库差额', dataIndex: 'printCournts', width: 150, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } }
       ],
       ],
+	  columnsTotal: [
+		  { title: '退货数量', dataIndex: 'printCsountss', width: 200, align: 'center', customRender: function (text) { return text || '--' } },
+		  { title: '开单退货金额', dataIndex: 'prinftCounts', width: 200, align: 'center', customRender: function (text) { return text || '--' } },
+		  { title: '实售退货金额', dataIndex: 'prisntCogunts', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
+		  { title: '返库数量', dataIndex: 'prinxtCounts', width: 120, align: 'center', customRender: function (text) { return text || '--' } },
+		  { title: '坏件数量', dataIndex: 'printCocunts', width: 120, align: 'center', customRender: function (text) { return text || '--' } },
+		  { title: '正常退货数量', dataIndex: 'printCvounts', width: 120, align: 'center', customRender: function (text) { return text || '--' } },
+		  { title: '正常退货金额', dataIndex: 'printCgounts', width: 120, align: 'center', customRender: function (text) { return text || '--' } },
+		  { title: '正常再入库金额', dataIndex: 'printCouhnts', width: 120, align: 'center', customRender: function (text) { return text || '--' } },
+		  { title: '正常退货入库差额', dataIndex: 'printCournts', width: 120, align: 'center', customRender: function (text) { return text || '--' } }
+	  ],
       // 加载数据方法 必须为 Promise 对象
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
       loadData: parameter => {
         this.disabled = true
         this.disabled = true
@@ -115,7 +214,7 @@ export default {
           const data = {
           const data = {
             pageNo: 1,
             pageNo: 1,
             pageSize: 10,
             pageSize: 10,
-            list: reportData.reportDataList,
+            list: reportData.salesReturnDetailReportList,
             count: 10
             count: 10
           }
           }
           for (var i = 0; i < data.list.length; i++) {
           for (var i = 0; i < data.list.length; i++) {