|
@@ -75,19 +75,19 @@
|
|
|
style="margin-left: 10px"
|
|
|
type="primary"
|
|
|
class="button-warning"
|
|
|
- @click="handleExport"
|
|
|
+ @click="handleExport(0)"
|
|
|
:disabled="disabled"
|
|
|
:loading="exportLoading"
|
|
|
- v-if="$hasPermissions('B_tireSalesReportExport')"
|
|
|
+ v-if="$hasPermissions('B_tireReportExport')"
|
|
|
id="tireSalesDealerList-export">导出</a-button>
|
|
|
<a-button
|
|
|
style="margin-left: 10px"
|
|
|
type="primary"
|
|
|
class="button-warning"
|
|
|
- @click="handleExport"
|
|
|
+ @click="handleExport(1)"
|
|
|
:disabled="disabled"
|
|
|
:loading="exportLoading"
|
|
|
- v-if="$hasPermissions('B_tireSalesReportExport')"
|
|
|
+ v-if="$hasPermissions('B_tireDetailExport')"
|
|
|
id="tireSalesDealerList-export">导出明细</a-button>
|
|
|
<a @click="advanced=!advanced" style="margin-left: 5px">
|
|
|
{{ advanced ? '收起' : '展开' }}
|
|
@@ -118,11 +118,13 @@
|
|
|
<!-- 操作 -->
|
|
|
<template slot="action" slot-scope="text, record">
|
|
|
<a-button
|
|
|
+ v-if="$hasPermissions('B_outDetailShow')"
|
|
|
size="small"
|
|
|
type="link"
|
|
|
class="button-warning"
|
|
|
@click="handleOutDetail(record)"
|
|
|
id="transferReturnConfirmation-audit-btn">出库明细</a-button>
|
|
|
+ <span>--</span>
|
|
|
</template>
|
|
|
<template slot="footer">
|
|
|
<a-row :gutter="15">
|
|
@@ -136,15 +138,15 @@
|
|
|
<a-col :md="4" :sm="24" v-if="$hasPermissions('M_tireSalesReportList_salesPrice')">累计入库金额:{{ (totalData && (totalData.putAmount || totalData.putAmount==0)) ? toThousands(totalData.putAmount): '--' }}</a-col>
|
|
|
<a-col :md="4" :sm="24">退货数量:{{ (totalData && (totalData.returnQty || totalData.returnQty==0)) ?totalData.returnQty: '--' }}</a-col>
|
|
|
<a-col :md="4" :sm="24" v-if="$hasPermissions('M_tireSalesReportList_salesPrice')">退货金额:{{ (totalData && (totalData.returnAmount || totalData.returnAmount==0)) ? toThousands(totalData.returnAmount): '--' }}</a-col>
|
|
|
- <a-col :md="4" :sm="24">客户现有库存数量:{{ (totalData && (totalData.totalstoreAmount || totalData.totalstoreAmount==0)) ?totalData.totalstoreAmount: '--' }}</a-col>
|
|
|
- <a-col :md="4" :sm="24" v-if="$hasPermissions('M_tireSalesReportList_salesPrice')">客户现有库存金额:{{ (totalData && (totalData.totalbuyPriceAmount || totalData.totalbuyPriceAmount==0)) ? toThousands(totalData.totalbuyPriceAmount): '--' }}</a-col>
|
|
|
+ <a-col :md="4" :sm="24">客户现有库存数量:{{ (totalData &&totalData.rptDealerStockVO && (totalData.rptDealerStockVO.stockQty || totalData.rptDealerStockVO.stockQty==0)) ?totalData.rptDealerStockVO.stockQty: '--' }}</a-col>
|
|
|
+ <a-col :md="4" :sm="24" v-if="$hasPermissions('M_tireSalesReportList_salesPrice')">客户现有库存金额:{{ (totalData&&totalData.rptDealerStockVO && (totalData.rptDealerStockVO.stockAmount || totalData.rptDealerStockVO.stockAmount==0)) ? toThousands(totalData.rptDealerStockVO.stockAmount): '--' }}</a-col>
|
|
|
<a-col :md="4" :sm="24">出库加盟商数量:{{ (totalData && (totalData.outQtyDealer || totalData.outQtyDealer==0)) ?totalData.outQtyDealer: '--' }}</a-col>
|
|
|
<a-col :md="4" :sm="24" v-if="$hasPermissions('M_tireSalesReportList_salesPrice')">出库加盟商金额:{{ (totalData && (totalData.outAmountDealer || totalData.outAmountDealer==0)) ? toThousands(totalData.outAmountDealer): '--' }}</a-col>
|
|
|
<a-col :md="4" :sm="24">出库终端数量:{{ (totalData && (totalData.outQtyTerminal || totalData.outQtyTerminal==0)) ?totalData.outQtyTerminal: '--' }}</a-col>
|
|
|
<a-col :md="4" :sm="24" v-if="$hasPermissions('M_tireSalesReportList_salesPrice')">出库终端金额:{{ (totalData && (totalData.outAmountTerminal || totalData.outAmountTerminal==0)) ? toThousands(totalData.outAmountTerminal): '--' }}</a-col>
|
|
|
<a-col :md="4" :sm="24">累计出库数量:{{ (totalData && (totalData.outQty || totalData.outQty==0)) ?totalData.outQty: '--' }}</a-col>
|
|
|
<a-col :md="4" :sm="24" v-if="$hasPermissions('M_tireSalesReportList_salesPrice')">累计出库金额:{{ (totalData && (totalData.outAmount || totalData.outAmount==0)) ? toThousands(totalData.outAmount): '--' }}</a-col>
|
|
|
- <a-col :md="4" :sm="24">已绑质保单数量:{{ (totalData && (totalData.totalwarrantyAmount || totalData.totalwarrantyAmount==0)) ?totalData.totalwarrantyAmount: '--' }}</a-col>
|
|
|
+ <a-col :md="4" :sm="24">已绑质保单数量:{{ (totalData&&totalData.rptDealerStockVO && (totalData.rptDealerStockVO.warrantyQty || totalData.rptDealerStockVO.warrantyQty==0)) ?totalData.rptDealerStockVO.warrantyQty: '--' }}</a-col>
|
|
|
</a-row>
|
|
|
</template>
|
|
|
</s-table>
|
|
@@ -167,7 +169,7 @@ import BizUser from '@/views/common/bizUser.js'
|
|
|
import reportModal from '@/views/common/reportModal.vue'
|
|
|
import outDetailModal from './outDetailModal'
|
|
|
import { hdExportExcel } from '@/libs/exportExcel'
|
|
|
-import { queryTireCount, tireListExport, tireReportDetailList } from '@/api/reportData'
|
|
|
+import { queryTireCount, tireListExport, tireReportDetailList, tireOutDetailListExport } from '@/api/reportData'
|
|
|
import dealerSubareaScopeList from '@/views/common/dealerSubareaScopeList.vue'
|
|
|
export default {
|
|
|
name: 'TireSalesDealerList',
|
|
@@ -264,7 +266,7 @@ export default {
|
|
|
// { title: '累计入库金额', dataIndex: 'putAmount', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
{ title: '退货数量', dataIndex: 'returnQty', width: '80px', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
// { title: '退货金额', dataIndex: 'returnAmount', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
- { title: '客户现有库存数量', dataIndex: 'buyAmount', width: '80px', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
+ { title: '客户现有库存数量', dataIndex: 'rptDealerStockVO.stockQty', width: '80px', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
// { title: '客户现有库存金额', dataIndex: 'dealerLevelDictValue', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
{ title: '出库加盟商数量', dataIndex: 'outQtyDealer', width: '80px', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
// { title: '出库加盟商金额', dataIndex: 'outAmountDealer', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
@@ -272,7 +274,7 @@ export default {
|
|
|
// { title: '出库终端金额', dataIndex: 'outAmountTerminal', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
{ title: '累计出库数量', dataIndex: 'outQty', width: '80px', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
// { title: '累计出库金额', dataIndex: 'outAmount', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
- { title: <div>已绑质保单<div>数量</div></div>, dataIndex: 'warrantyAmount', width: '80px', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
+ { title: <div>已绑质保单<div>数量</div></div>, dataIndex: 'rptDealerStockVO.warrantyQty', width: '80px', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
{ title: '操作', scopedSlots: { customRender: 'action' }, width: '8%', align: 'center' }
|
|
|
]
|
|
|
if (this.$hasPermissions('M_tireSalesReportList_salesPrice')) {
|
|
@@ -281,7 +283,7 @@ export default {
|
|
|
arr.splice(16, 0, { title: '跨地区订货金额', dataIndex: 'crossRegionAmount', width: '8%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
|
|
|
arr.splice(18, 0, { title: '累计入库金额', dataIndex: 'putAmount', width: '8%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
|
|
|
arr.splice(20, 0, { title: '退货金额', dataIndex: 'returnAmount', width: '8%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
|
|
|
- arr.splice(22, 0, { title: '客户现有库存金额', dataIndex: 'dealerLevelDictValue', width: '8%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
|
|
|
+ arr.splice(22, 0, { title: '客户现有库存金额', dataIndex: 'rptDealerStockVO.stockAmount', width: '8%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
|
|
|
arr.splice(24, 0, { title: '出库加盟商金额', dataIndex: 'outAmountDealer', width: '8%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
|
|
|
arr.splice(26, 0, { title: '出库终端金额', dataIndex: 'outAmountTerminal', width: '8%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
|
|
|
arr.splice(28, 0, { title: '累计出库金额', dataIndex: 'outAmount', width: '8%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
|
|
@@ -325,8 +327,12 @@ export default {
|
|
|
productSn: row.productSn
|
|
|
}
|
|
|
this.showOutDetail = true
|
|
|
+ const titObj = {
|
|
|
+ tit: row.dealerEntity.dealerName,
|
|
|
+ code: row.productEntity.code
|
|
|
+ }
|
|
|
this.$nextTick(() => {
|
|
|
- this.$refs.outDetail.getAjaxData(params, row.dealerEntity.dealerName ? row.dealerEntity.dealerName : '')
|
|
|
+ this.$refs.outDetail.getAjaxData(params, titObj)
|
|
|
})
|
|
|
},
|
|
|
// 地区
|
|
@@ -374,11 +380,15 @@ export default {
|
|
|
this.$refs.ruleForm.resetFields()
|
|
|
},
|
|
|
// 导出
|
|
|
- handleExport () {
|
|
|
+ handleExport (pos) {
|
|
|
const _this = this
|
|
|
this.$refs.ruleForm.validate(valid => {
|
|
|
if (valid) {
|
|
|
- _this.exportList()
|
|
|
+ if (pos == 0) {
|
|
|
+ _this.exportList()
|
|
|
+ } else {
|
|
|
+ _this.exportOutDetailList()
|
|
|
+ }
|
|
|
} else {
|
|
|
_this.$message.error('请选择日期')
|
|
|
return false
|
|
@@ -387,18 +397,33 @@ export default {
|
|
|
},
|
|
|
exportList () {
|
|
|
const _this = this
|
|
|
- const params = _this.queryParam
|
|
|
+ const params = JSON.parse(JSON.stringify(_this.queryParam))
|
|
|
_this.exportLoading = true
|
|
|
_this.spinning = true
|
|
|
_this.showExport = true
|
|
|
- _this.$store.state.app.curActionPermission = 'B_tireSalesReportExport'
|
|
|
+ _this.$store.state.app.curActionPermission = 'B_tireReportExport'
|
|
|
params.exportFlag = 1
|
|
|
+ delete params.time
|
|
|
hdExportExcel(tireListExport, params, '轮胎明细报表', function () {
|
|
|
_this.exportLoading = false
|
|
|
_this.spinning = false
|
|
|
_this.$store.state.app.curActionPermission = ''
|
|
|
})
|
|
|
},
|
|
|
+ exportOutDetailList () {
|
|
|
+ const _this = this
|
|
|
+ const params = JSON.parse(JSON.stringify(_this.queryParam))
|
|
|
+ _this.exportLoading = true
|
|
|
+ _this.spinning = true
|
|
|
+ _this.showExport = true
|
|
|
+ _this.$store.state.app.curActionPermission = 'B_tireReportExport'
|
|
|
+ delete params.time
|
|
|
+ hdExportExcel(tireOutDetailListExport, params, '轮胎出库明细报表', function () {
|
|
|
+ _this.exportLoading = false
|
|
|
+ _this.spinning = false
|
|
|
+ _this.$store.state.app.curActionPermission = ''
|
|
|
+ })
|
|
|
+ },
|
|
|
pageInit () {
|
|
|
const _this = this
|
|
|
this.$nextTick(() => { // 页面渲染完成后的回调
|