|
@@ -3,7 +3,7 @@
|
|
<a-spin :spinning="spinning" tip="Loading...">
|
|
<a-spin :spinning="spinning" tip="Loading...">
|
|
<div class="table-page-search-wrapper newTableSearchName">
|
|
<div class="table-page-search-wrapper newTableSearchName">
|
|
<a-form-model
|
|
<a-form-model
|
|
- id="billingBackReportList-form"
|
|
|
|
|
|
+ id="billingOrderReport-form"
|
|
ref="ruleForm"
|
|
ref="ruleForm"
|
|
class="form-model-con"
|
|
class="form-model-con"
|
|
layout="inline"
|
|
layout="inline"
|
|
@@ -11,34 +11,34 @@
|
|
:model="queryParam"
|
|
:model="queryParam"
|
|
@keyup.enter.native="handleSearch">
|
|
@keyup.enter.native="handleSearch">
|
|
<a-row :gutter="15">
|
|
<a-row :gutter="15">
|
|
- <a-col :md="6" :sm="24">
|
|
|
|
|
|
+ <a-col :md="5" :sm="24">
|
|
<a-form-model-item label="退货完成时间" prop="time">
|
|
<a-form-model-item label="退货完成时间" prop="time">
|
|
<rangeDate ref="rangeDate" :value="queryParam.time" @change="dateChange"/>
|
|
<rangeDate ref="rangeDate" :value="queryParam.time" @change="dateChange"/>
|
|
</a-form-model-item>
|
|
</a-form-model-item>
|
|
</a-col>
|
|
</a-col>
|
|
- <a-col :md="4" :sm="24">
|
|
|
|
|
|
+ <a-col :md="5" :sm="24">
|
|
<a-form-model-item label="供应商名称">
|
|
<a-form-model-item label="供应商名称">
|
|
- <a-input id="billingBackReport-supplierName" v-model.trim="queryParam.supplierName" allowClear placeholder="请输入供应商名称"/>
|
|
|
|
|
|
+ <supplier id="billingBackReport-supplierName" v-model="queryParam.supplier.supplierSn" @change="getSupplierName" placeholder="请输入供应商名称"></supplier>
|
|
</a-form-model-item>
|
|
</a-form-model-item>
|
|
</a-col>
|
|
</a-col>
|
|
<a-col :md="4" :sm="24">
|
|
<a-col :md="4" :sm="24">
|
|
<a-form-model-item label="采购退货单号" >
|
|
<a-form-model-item label="采购退货单号" >
|
|
- <a-input id="billingBackReport-supplierName" v-model.trim="queryParam.supplierName" allowClear placeholder="请输入供应商名称"/>
|
|
|
|
|
|
+ <a-input id="billingBackReport-sparePartsReturnNo" v-model.trim="queryParam.sparePartsReturnNo" allowClear placeholder="请输入采购退货单号"/>
|
|
</a-form-model-item>
|
|
</a-form-model-item>
|
|
</a-col>
|
|
</a-col>
|
|
- <a-col :md="4" :sm="24">
|
|
|
|
|
|
+ <a-col :md="5" :sm="24">
|
|
<a-form-model-item label="所在区域/分区">
|
|
<a-form-model-item label="所在区域/分区">
|
|
- <subarea id="billingBackReportList-subareaSn" v-model="queryParam.subareaSn"></subarea>
|
|
|
|
|
|
+ <subarea id="billingOrderReport-subareaSn" v-model="queryParam.subareaSn"></subarea>
|
|
|
|
+ </a-form-model-item>
|
|
|
|
+ </a-col>
|
|
|
|
+ <a-col :md="5" :sm="24">
|
|
|
|
+ <a-form-model-item label="地区">
|
|
|
|
+ <AreaList id="returnSlipReportList-areaList" changeOnSelect ref="areaList" @change="areaChange" defValKey="id"></AreaList>
|
|
</a-form-model-item>
|
|
</a-form-model-item>
|
|
</a-col>
|
|
</a-col>
|
|
- <a-col :md="4" :sm="24">
|
|
|
|
- <a-form-model-item label="地区">
|
|
|
|
- <AreaList id="returnSlipReportList-areaList" changeOnSelect ref="areaList" @change="areaChange" defValKey="id"></AreaList>
|
|
|
|
- </a-form-model-item>
|
|
|
|
- </a-col>
|
|
|
|
<a-col :md="24" :sm="24" style="margin-bottom: 10px;display:flex;algin-item:center;justify-content: center;">
|
|
<a-col :md="24" :sm="24" style="margin-bottom: 10px;display:flex;algin-item:center;justify-content: center;">
|
|
- <a-button type="primary" @click="handleSearch" :disabled="disabled" id="billingBackReportList-refresh">查询</a-button>
|
|
|
|
- <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="billingBackReportList-reset">重置</a-button>
|
|
|
|
|
|
+ <a-button type="primary" @click="handleSearch" :disabled="disabled" id="billingOrderReport-refresh">查询</a-button>
|
|
|
|
+ <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="billingOrderReport-reset">重置</a-button>
|
|
<a-button
|
|
<a-button
|
|
style="margin-left: 5px"
|
|
style="margin-left: 5px"
|
|
type="primary"
|
|
type="primary"
|
|
@@ -47,7 +47,7 @@
|
|
:disabled="disabled"
|
|
:disabled="disabled"
|
|
:loading="exportLoading"
|
|
:loading="exportLoading"
|
|
v-if="$hasPermissions('B_regionTypeSalesReportExport')"
|
|
v-if="$hasPermissions('B_regionTypeSalesReportExport')"
|
|
- id="billingBackReportList-export">导出</a-button>
|
|
|
|
|
|
+ id="billingOrderReport-export">导出</a-button>
|
|
</a-col>
|
|
</a-col>
|
|
</a-row>
|
|
</a-row>
|
|
</a-form-model>
|
|
</a-form-model>
|
|
@@ -69,41 +69,9 @@
|
|
<a-col span="2">合计:</a-col>
|
|
<a-col span="2">合计:</a-col>
|
|
<a-col span="22">
|
|
<a-col span="22">
|
|
<a-row>
|
|
<a-row>
|
|
- <a-col span="4">箭牌滤清器:{{ (totalData && (totalData.jpLqqAmount || totalData.jpLqqAmount==0)) ? toThousands(totalData.jpLqqAmount) : '--' }}</a-col>
|
|
|
|
- <a-col span="4">箭牌变速箱滤清器:{{ (totalData && (totalData.jpBsxLqqAmount || totalData.jpBsxLqqAmount==0)) ? toThousands(totalData.jpBsxLqqAmount) : '--' }}</a-col>
|
|
|
|
- <a-col span="4">冠牌滤清器:{{ (totalData && (totalData.gpLqqAmount || totalData.gpLqqAmount==0)) ? toThousands(totalData.gpLqqAmount) : '--' }}</a-col>
|
|
|
|
- <a-col span="4">滤清器合计:{{ (totalData && (totalData.gpLqqAmount || totalData.gpLqqAmount==0)) ? toThousands(totalData.gpLqqAmount) : '--' }}</a-col>
|
|
|
|
- <a-col span="4">箭牌雨刮片:{{ (totalData && (totalData.jpYgpAmount || totalData.jpYgpAmount==0)) ? toThousands(totalData.jpYgpAmount) : '--' }}</a-col>
|
|
|
|
- <a-col span="4">箭牌雨燕雨刮片:{{ (totalData && (totalData.jpYgpAmount || totalData.jpYgpAmount==0)) ? toThousands(totalData.jpYgpAmount) : '--' }}</a-col>
|
|
|
|
- <a-col span="4">冠牌雨刮片:{{ (totalData && (totalData.gpYgpAmount || totalData.gpYgpAmount==0)) ? toThousands(totalData.gpYgpAmount) : '--' }}</a-col>
|
|
|
|
- <a-col span="4">雨刮片合计:{{ (totalData && (totalData.gpYgpAmount || totalData.gpYgpAmount==0)) ? toThousands(totalData.gpYgpAmount) : '--' }}</a-col>
|
|
|
|
- <a-col span="4">箭牌喇叭:{{ (totalData && (totalData.jpLbAmount || totalData.jpLbAmount==0)) ? toThousands(totalData.jpLbAmount) : '--' }}</a-col>
|
|
|
|
- <a-col span="4">箭牌刹车片:{{ (totalData && (totalData.jpScpAmount || totalData.jpScpAmount==0)) ? toThousands(totalData.jpScpAmount) : '--' }}</a-col>
|
|
|
|
- <a-col span="4">TBU+箭牌感应线:{{ (totalData && (totalData.jpGyxAmount || totalData.jpGyxAmount==0)) ? toThousands(totalData.jpGyxAmount) : '--' }}</a-col>
|
|
|
|
- <a-col span="4">冠牌刹车片:{{ (totalData && (totalData.gpScpAmount || totalData.gpScpAmount==0)) ? toThousands(totalData.gpScpAmount) : '--' }}</a-col>
|
|
|
|
- <a-col span="4">TBU刹车片:{{ (totalData && (totalData.tbuAmount || totalData.tbuAmount==0)) ? toThousands(totalData.tbuAmount) : '--' }}</a-col>
|
|
|
|
- <a-col span="4">TBU刹车油:{{ (totalData && (totalData.tbuAmount || totalData.tbuAmount==0)) ? toThousands(totalData.tbuAmount) : '--' }}</a-col>
|
|
|
|
- <a-col span="4">刹车片合计:{{ (totalData && (totalData.tbuAmount || totalData.tbuAmount==0)) ? toThousands(totalData.tbuAmount) : '--' }}</a-col>
|
|
|
|
- <a-col span="4">TBU-P刹车盘:{{ (totalData && (totalData.tbupAmount || totalData.tbupAmount==0)) ? toThousands(totalData.tbupAmount) : '--' }}</a-col>
|
|
|
|
- <a-col span="4">汇箭蓄电池:{{ (totalData && (totalData.hjAmount || totalData.hjAmount==0)) ? toThousands(totalData.hjAmount) : '--' }}</a-col>
|
|
|
|
- <a-col span="4">布瑞斯蓄电池:{{ (totalData && (totalData.brsAmount || totalData.brsAmount==0)) ? toThousands(totalData.brsAmount) : '--' }}</a-col>
|
|
|
|
- <a-col span="4">德路斯机油:{{ (totalData && (totalData.dlsAmount || totalData.dlsAmount==0)) ? toThousands(totalData.dlsAmount) : '--' }}</a-col>
|
|
|
|
- <a-col span="4">德路斯变速箱油:{{ (totalData && (totalData.dlsAmount || totalData.dlsAmount==0)) ? toThousands(totalData.dlsAmount) : '--' }}</a-col>
|
|
|
|
- <a-col span="4">德路斯刹车油:{{ (totalData && (totalData.dlsAmount || totalData.dlsAmount==0)) ? toThousands(totalData.dlsAmount) : '--' }}</a-col>
|
|
|
|
- <a-col span="4">德路斯合计:{{ (totalData && (totalData.dlsAmount || totalData.dlsAmount==0)) ? toThousands(totalData.dlsAmount) : '--' }}</a-col>
|
|
|
|
- <a-col span="4">稳升点火线圈:{{ (totalData && (totalData.wsDhxqAmount || totalData.wsDhxqAmount==0)) ? toThousands(totalData.wsDhxqAmount) : '--' }}</a-col>
|
|
|
|
- <a-col span="4">稳升LED灯:{{ (totalData && (totalData.wsDpAmount || totalData.wsDpAmount==0)) ? toThousands(totalData.wsDpAmount) : '--' }}</a-col>
|
|
|
|
- <a-col span="4">稳升合计:{{ (totalData && (totalData.wsDpAmount || totalData.wsDpAmount==0)) ? toThousands(totalData.wsDpAmount) : '--' }}</a-col>
|
|
|
|
- <a-col span="4">NGK火花塞:{{ (totalData && (totalData.ngkAmount || totalData.ngkAmount==0)) ? toThousands(totalData.ngkAmount) : '--' }}</a-col>
|
|
|
|
- <a-col span="4">飞利浦:{{ (totalData && (totalData.flpAmount || totalData.flpAmount==0)) ? toThousands(totalData.flpAmount) : '--' }}</a-col>
|
|
|
|
- <a-col span="4">车仆防冻液:{{ (totalData && (totalData.cpAmount || totalData.cpAmount==0)) ? toThousands(totalData.cpAmount) : '--' }}</a-col>
|
|
|
|
- <a-col span="4">瓦尔塔:{{ (totalData && (totalData.wetAmount || totalData.wetAmount==0)) ? toThousands(totalData.wetAmount) : '--' }}</a-col>
|
|
|
|
- <a-col span="4">雷贝斯托:{{ (totalData && (totalData.lbstAmount || totalData.lbstAmount==0)) ? toThousands(totalData.lbstAmount) : '--' }}</a-col>
|
|
|
|
- <a-col span="4">德尔福:{{ (totalData && (totalData.defAmount || totalData.defAmount==0)) ? toThousands(totalData.defAmount) : '--' }}</a-col>
|
|
|
|
- <a-col span="4">巴诺德:{{ (totalData && (totalData.bndAmount || totalData.bndAmount==0)) ? toThousands(totalData.bndAmount) : '--' }}</a-col>
|
|
|
|
- <a-col span="4" style="margin-top:20px;">品牌合计:{{ (totalData && (totalData.totalAmount || totalData.totalAmount==0)) ? toThousands(totalData.totalAmount) : '--' }}</a-col>
|
|
|
|
- <a-col span="4" style="margin-top:20px;">代理品牌合计:{{ (totalData && (totalData.totalAmount || totalData.totalAmount==0)) ? toThousands(totalData.totalAmount) : '--' }}</a-col>
|
|
|
|
- <a-col span="4" style="margin-top:20px;">开单采退金额合计:{{ (totalData && (totalData.totalAmount || totalData.totalAmount==0)) ? toThousands(totalData.totalAmount) : '--' }}</a-col>
|
|
|
|
|
|
+ <a-col span="4" v-for="item in countLabel" :key="item.key">
|
|
|
|
+ {{ item.title }}:{{ totalData?(totalData[item.dataIndex]||totalData[item.dataIndex]==0)?toThousands(totalData[item.dataIndex]):'--':'--' }}
|
|
|
|
+ </a-col>
|
|
</a-row>
|
|
</a-row>
|
|
</a-col>
|
|
</a-col>
|
|
</a-row>
|
|
</a-row>
|
|
@@ -123,113 +91,78 @@ import AreaList from '@/views/common/areaList.js'
|
|
import subarea from '@/views/common/subarea.js'
|
|
import subarea from '@/views/common/subarea.js'
|
|
import { hdExportExcel } from '@/libs/exportExcel'
|
|
import { hdExportExcel } from '@/libs/exportExcel'
|
|
import reportModal from '@/views/common/reportModal.vue'
|
|
import reportModal from '@/views/common/reportModal.vue'
|
|
-import { realReportSalesByProvince, realReportSalesByProvinceExport, realReportSalesBySubArea, realReportSalesBySubAreaExport } from '@/api/reportData.js'
|
|
|
|
|
|
+import supplier from '@/views/common/supplier.js'
|
|
|
|
+import { queryBillNoPage, queryBillNoCount, queryBillNoTitle, billNoExport } from '@/api/reportData.js'
|
|
export default {
|
|
export default {
|
|
name: 'BillingOrderReportList',
|
|
name: 'BillingOrderReportList',
|
|
mixins: [commonMixin],
|
|
mixins: [commonMixin],
|
|
- components: { STable, VSelect, rangeDate, subarea, reportModal,AreaList },
|
|
|
|
|
|
+ components: { STable, VSelect, rangeDate, subarea, reportModal, AreaList, supplier },
|
|
data () {
|
|
data () {
|
|
return {
|
|
return {
|
|
spinning: false,
|
|
spinning: false,
|
|
- activeKey: 0,
|
|
|
|
- showExport: false,
|
|
|
|
|
|
+ showExport: false, // 导出弹窗
|
|
queryParam: {
|
|
queryParam: {
|
|
time: [],
|
|
time: [],
|
|
beginDate: '',
|
|
beginDate: '',
|
|
endDate: '',
|
|
endDate: '',
|
|
- dealer: {
|
|
|
|
- 'dealerSn': undefined,
|
|
|
|
- 'provinceSn': undefined,
|
|
|
|
- 'citySn': undefined,
|
|
|
|
- 'districtSn': undefined,
|
|
|
|
- 'subareaSn': undefined,
|
|
|
|
- 'dealerLevel': undefined
|
|
|
|
- },
|
|
|
|
subareaSn: undefined,
|
|
subareaSn: undefined,
|
|
|
|
+ sparePartsReturnNo: undefined,
|
|
|
|
+ supplier: {
|
|
|
|
+ supplierSn: undefined,
|
|
|
|
+ supplierName: undefined,
|
|
|
|
+ provinceSn: undefined,
|
|
|
|
+ citySn: undefined,
|
|
|
|
+ districtSn: undefined
|
|
|
|
+ }
|
|
},
|
|
},
|
|
|
|
+ countLabel: [],
|
|
|
|
+ columns: [],
|
|
|
|
+ totalData: null,
|
|
disabled: false, // 查询、重置按钮是否可操作
|
|
disabled: false, // 查询、重置按钮是否可操作
|
|
exportLoading: false,
|
|
exportLoading: false,
|
|
rules: {
|
|
rules: {
|
|
- 'time': [{ required: true, message: '请选择退货完成时间', trigger: 'change' }],
|
|
|
|
|
|
+ 'time': [{ required: true, message: '请选择退货完成时间', trigger: 'change' }]
|
|
},
|
|
},
|
|
// 加载数据方法 必须为 Promise 对象
|
|
// 加载数据方法 必须为 Promise 对象
|
|
loadData: parameter => {
|
|
loadData: parameter => {
|
|
this.disabled = true
|
|
this.disabled = true
|
|
this.spinning = true
|
|
this.spinning = true
|
|
- const paramsPage = Object.assign(this.queryParam) // 无分页
|
|
|
|
- const jkUrl = this.activeKey == 0 ? realReportSalesByProvince : realReportSalesBySubArea
|
|
|
|
- return jkUrl(paramsPage).then(res => {
|
|
|
|
|
|
+ const params = Object.assign(parameter, this.queryParam)
|
|
|
|
+ delete params.time
|
|
|
|
+ return queryBillNoPage(params).then(res => {
|
|
let data
|
|
let data
|
|
if (res.status == 200) {
|
|
if (res.status == 200) {
|
|
data = res.data
|
|
data = res.data
|
|
|
|
+ this.getCount(params)
|
|
|
|
+ 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.disabled = false
|
|
|
|
this.spinning = false
|
|
this.spinning = false
|
|
return data
|
|
return data
|
|
})
|
|
})
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
},
|
|
- computed: {
|
|
|
|
- columns () {
|
|
|
|
- const _this = this
|
|
|
|
- const arr = [
|
|
|
|
- { title: '区域', dataIndex: 'subareaNames', width: 50, align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
|
- { title: '分区', dataIndex: 'subareaNames', width: 50, align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
|
- { title: '供应商名称', dataIndex: 'subareaNames', width: 50, align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
|
- { title: '箭牌滤清器', dataIndex: 'jpLqqAmount', width: 50, align: 'center', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
|
|
|
|
- { title: '箭牌变速箱滤清器', dataIndex: 'jpLqqAmount', width: 50, align: 'center', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
|
|
|
|
- { title: '冠牌滤清器', dataIndex: 'gpLqqAmount', width: 50, align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
|
|
|
|
- { title: '滤清器合计', dataIndex: 'lqqAmount', width: 50, align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
|
|
|
|
- { title: '箭牌雨刮片', dataIndex: 'jpYgpAmount', width: 50, align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
|
|
|
|
- { title: '箭牌雨燕雨刮片', dataIndex: 'jpYgpAmount', width: 50, align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
|
|
|
|
- { title: '冠牌雨刮片', dataIndex: 'gpYgpAmount', width: 50, align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
|
|
|
|
- { title: '雨刮片合计', dataIndex: 'ygpAmount', width: 50, align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
|
|
|
|
- { title: '箭牌喇叭', dataIndex: 'jpLbAmount', width: 50, align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
|
|
|
|
- { title: '箭牌刹车片', dataIndex: 'jpScpAmount', width: 50, align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
|
|
|
|
- { title: 'TBU+箭牌感应线', dataIndex: 'jpGyxAmount', width: 50, align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
|
|
|
|
- { title: '冠牌刹车片', dataIndex: 'gpScpAmount', width: 50, align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
|
|
|
|
- { title: 'TBU刹车片', dataIndex: 'tbuScpAmount', width: 50, align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
|
|
|
|
- { title: 'TBU刹车油', dataIndex: 'tbuScyAmount', width: 50, align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
|
|
|
|
- { title: '刹车片合计', dataIndex: 'scpAmount', width: 50, align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
|
|
|
|
- { title: 'TBU-P刹车盘', dataIndex: 'tbupAmount', align: 'right', width: 50, customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
|
|
|
|
- { title: '汇箭蓄电池', dataIndex: 'hjAmount', width: 50, align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
|
|
|
|
- { title: '布瑞斯蓄电池', dataIndex: 'brsAmount', width: 50, align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
|
|
|
|
- { title: '德路斯机油', dataIndex: 'dlsJyAmount', width: 50, align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
|
|
|
|
- { title: '德路斯变速箱油', dataIndex: 'dlsBsxyAmount', width: 50, align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
|
|
|
|
- { title: '德路斯刹车油', dataIndex: 'dlsScyAmount', width: 50, align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
|
|
|
|
-
|
|
|
|
- // { title: '德路斯汽车养护产品', dataIndex: 'dlsQcyhAmount', width: 50, align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
|
|
|
|
- { title: '德路斯合计', dataIndex: 'dlsAmount', width: 50, align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
|
|
|
|
- { title: '稳升点火线圈', dataIndex: 'wsDhxqAmount', width: 50, align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
|
|
|
|
- { title: '稳升LED灯', dataIndex: 'wsDpAmount', width: 50, align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
|
|
|
|
- { title: '稳升合计', dataIndex: 'wsAmount', width: 50, align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
|
|
|
|
-
|
|
|
|
- // { title: 'TBU感应线', dataIndex: 'tbuGyxAmount', width: 50, align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
|
|
|
|
- { title: '品牌合计', dataIndex: 'ppAmount', width: 70, align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
|
|
|
|
- { title: 'NGK火花塞', dataIndex: 'ngkAmount', width: 50, align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
|
|
|
|
- { title: '飞利浦', dataIndex: 'tbuGyxAmount', width: 50, align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
|
|
|
|
- { title: '车仆防冻液', dataIndex: 'tbuGyxAmount', width: 50, align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
|
|
|
|
- { title: '瓦尔塔', dataIndex: 'tbuGyxAmount', width: 50, align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
|
|
|
|
- { title: '雷贝斯托', dataIndex: 'tbuGyxAmount', width: 50, align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
|
|
|
|
- { title: '德尔福', dataIndex: 'tbuGyxAmount', width: 50, align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
|
|
|
|
- { title: '巴诺德', dataIndex: 'tbuGyxAmount', width: 50, align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
|
|
|
|
- { title: '代理品牌合计', dataIndex: 'ppAndNgkAmount', width: 80, align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
|
|
|
|
- { title: '开单采退金额合计', dataIndex: 'tbuGyxAmount', width: 50, align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } }
|
|
|
|
- ]
|
|
|
|
- // if (this.activeKey == 0) {
|
|
|
|
- // arr.splice(1, 0, { title: '省份', dataIndex: 'dealerProvinceName', width: 50, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } })
|
|
|
|
- // }
|
|
|
|
- return arr
|
|
|
|
- }
|
|
|
|
- },
|
|
|
|
methods: {
|
|
methods: {
|
|
- callback (key) {
|
|
|
|
- this.activeKey = key
|
|
|
|
- this.resetSearchForm()
|
|
|
|
- console.log(key, this.activeKey)
|
|
|
|
|
|
+ // 选择供应商
|
|
|
|
+ getSupplierName (val, item) {
|
|
|
|
+ this.queryParam.supplier.supplierName = item.supplierName
|
|
|
|
+ this.queryParam.supplier.supplierSn = val
|
|
},
|
|
},
|
|
- // 创建时间 change
|
|
|
|
|
|
+ // 总计
|
|
|
|
+ getCount (params) {
|
|
|
|
+ queryBillNoCount(params).then(res => {
|
|
|
|
+ if (res.status == 200 && res.data) {
|
|
|
|
+ this.totalData = res.data
|
|
|
|
+ } else {
|
|
|
|
+ this.totalData = null
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+ // 退货完成时间 change
|
|
dateChange (date) {
|
|
dateChange (date) {
|
|
if (date[0] && date[1]) {
|
|
if (date[0] && date[1]) {
|
|
this.queryParam.time = date
|
|
this.queryParam.time = date
|
|
@@ -246,7 +179,7 @@ export default {
|
|
if (valid) {
|
|
if (valid) {
|
|
_this.$refs.table.refresh(true)
|
|
_this.$refs.table.refresh(true)
|
|
} else {
|
|
} else {
|
|
- _this.$message.error("请选择退货完成时间")
|
|
|
|
|
|
+ _this.$message.error('请选择退货完成时间')
|
|
return false
|
|
return false
|
|
}
|
|
}
|
|
})
|
|
})
|
|
@@ -258,43 +191,63 @@ export default {
|
|
this.$refs.rangeDate.resetDate(this.queryParam.time)
|
|
this.$refs.rangeDate.resetDate(this.queryParam.time)
|
|
this.queryParam.beginDate = ''
|
|
this.queryParam.beginDate = ''
|
|
this.queryParam.endDate = ''
|
|
this.queryParam.endDate = ''
|
|
- this.queryParam.provinceSn = undefined
|
|
|
|
- this.queryParam.citySn = undefined
|
|
|
|
- this.queryParam.districtSn = undefined
|
|
|
|
|
|
+ this.queryParam.supplier.provinceSn = undefined
|
|
|
|
+ this.queryParam.supplier.citySn = undefined
|
|
|
|
+ this.queryParam.supplier.districtSn = undefined
|
|
this.queryParam.subareaSn = undefined
|
|
this.queryParam.subareaSn = undefined
|
|
|
|
+ this.queryParam.sparePartsReturnNo = undefined
|
|
|
|
+ this.queryParam.supplier.supplierName = undefined
|
|
|
|
+ this.queryParam.supplier.supplierSn = undefined
|
|
this.$refs.areaList.clearData()
|
|
this.$refs.areaList.clearData()
|
|
this.$refs.table.clearTable()
|
|
this.$refs.table.clearTable()
|
|
},
|
|
},
|
|
- areaChange(val){
|
|
|
|
- this.queryParam.provinceSn = val[0] ? val[0] : ''
|
|
|
|
- this.queryParam.citySn = val[1] ? val[1] : ''
|
|
|
|
- this.queryParam.districtSn = val[2] ? val[2] : ''
|
|
|
|
|
|
+ areaChange (val) {
|
|
|
|
+ this.queryParam.supplier.provinceSn = val[0] ? val[0] : ''
|
|
|
|
+ this.queryParam.supplier.citySn = val[1] ? val[1] : ''
|
|
|
|
+ this.queryParam.supplier.districtSn = val[2] ? val[2] : ''
|
|
},
|
|
},
|
|
// 导出
|
|
// 导出
|
|
handleExport () {
|
|
handleExport () {
|
|
const _this = this
|
|
const _this = this
|
|
- const jkUrl = _this.activeKey == 0 ? realReportSalesByProvinceExport : realReportSalesBySubAreaExport
|
|
|
|
- const excelTitle = _this.activeKey == 0 ? '各省品类实售明细报表' : '各区品类实售明细报表'
|
|
|
|
this.$refs.ruleForm.validate(valid => {
|
|
this.$refs.ruleForm.validate(valid => {
|
|
if (valid) {
|
|
if (valid) {
|
|
const params = _this.queryParam
|
|
const params = _this.queryParam
|
|
- _this.$store.state.app.curActionPermission = 'B_regionTypeSalesReportExport'
|
|
|
|
|
|
+ _this.$store.state.app.curActionPermission = 'B_billingReturn_Report'
|
|
_this.showExport = true
|
|
_this.showExport = true
|
|
_this.exportLoading = true
|
|
_this.exportLoading = true
|
|
_this.spinning = true
|
|
_this.spinning = true
|
|
- hdExportExcel(jkUrl, params, excelTitle, function () {
|
|
|
|
|
|
+ hdExportExcel(billNoExport, params, '开单采退单', function () {
|
|
_this.exportLoading = false
|
|
_this.exportLoading = false
|
|
_this.spinning = false
|
|
_this.spinning = false
|
|
_this.$store.state.app.curActionPermission = ''
|
|
_this.$store.state.app.curActionPermission = ''
|
|
})
|
|
})
|
|
} else {
|
|
} else {
|
|
|
|
+ _this.$message.error('请选择退货完成时间')
|
|
return false
|
|
return false
|
|
}
|
|
}
|
|
})
|
|
})
|
|
},
|
|
},
|
|
- pageInit () {
|
|
|
|
- this.activeKey = 0
|
|
|
|
|
|
+ // 获取表头
|
|
|
|
+ async getTableTitle () {
|
|
|
|
+ const _this = this
|
|
|
|
+ const tableTitle = await queryBillNoTitle().then(res => res.data)
|
|
|
|
+ this.columns = tableTitle.list
|
|
|
|
+ this.countLabel = tableTitle.count
|
|
|
|
+ this.columns.map(item => {
|
|
|
|
+ let mw = 40
|
|
|
|
+ if (item.customRender == 'amount') {
|
|
|
|
+ mw = 15
|
|
|
|
+ item.customRender = function (text) { return (text || text == 0) ? _this.toThousands(text) : '--' }
|
|
|
|
+ }
|
|
|
|
+ const w = item.title.length * mw
|
|
|
|
+ const tw = w <= 80 && item.customRender != 'amount' ? w * 2 : (w >= 360 ? 200 : w)
|
|
|
|
+ item.width = tw + 'px'
|
|
|
|
+ this.tableWidth = this.tableWidth + tw
|
|
|
|
+ })
|
|
this.resetSearchForm()
|
|
this.resetSearchForm()
|
|
|
|
+ },
|
|
|
|
+ pageInit () {
|
|
|
|
+ this.getTableTitle()
|
|
}
|
|
}
|
|
},
|
|
},
|
|
mounted () {
|
|
mounted () {
|
|
@@ -313,7 +266,3 @@ export default {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
</script>
|
|
</script>
|
|
-
|
|
|
|
-<style style="less">
|
|
|
|
-
|
|
|
|
-</style>
|
|
|