|
@@ -75,7 +75,7 @@
|
|
|
style="margin-left: 10px"
|
|
|
type="primary"
|
|
|
class="button-warning"
|
|
|
- @click="handleExport"
|
|
|
+ @click="handleExport(0)"
|
|
|
:disabled="disabled"
|
|
|
:loading="exportLoading"
|
|
|
v-if="$hasPermissions('B_tireSalesReportExport')"
|
|
@@ -84,7 +84,7 @@
|
|
|
style="margin-left: 10px"
|
|
|
type="primary"
|
|
|
class="button-warning"
|
|
|
- @click="handleExport"
|
|
|
+ @click="handleExport(1)"
|
|
|
:disabled="disabled"
|
|
|
:loading="exportLoading"
|
|
|
v-if="$hasPermissions('B_tireSalesReportExport')"
|
|
@@ -167,7 +167,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',
|
|
@@ -374,11 +374,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 +391,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'
|
|
|
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_tireSalesReportExport'
|
|
|
+ delete params.time
|
|
|
+ hdExportExcel(tireOutDetailListExport, params, '轮胎出库明细报表', function () {
|
|
|
+ _this.exportLoading = false
|
|
|
+ _this.spinning = false
|
|
|
+ _this.$store.state.app.curActionPermission = ''
|
|
|
+ })
|
|
|
+ },
|
|
|
pageInit () {
|
|
|
const _this = this
|
|
|
this.$nextTick(() => { // 页面渲染完成后的回调
|