|
@@ -62,7 +62,16 @@
|
|
<a-col :md="6" :sm="24">
|
|
<a-col :md="6" :sm="24">
|
|
<a-button type="primary" @click="handleSearch" :disabled="disabled" id="receivedSendStorageReportList-refresh">查询</a-button>
|
|
<a-button type="primary" @click="handleSearch" :disabled="disabled" id="receivedSendStorageReportList-refresh">查询</a-button>
|
|
<a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="receivedSendStorageReportList-reset">重置</a-button>
|
|
<a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="receivedSendStorageReportList-reset">重置</a-button>
|
|
- <a @click="advanced=!advanced" style="margin-left: 8px">
|
|
|
|
|
|
+ <a-button
|
|
|
|
+ style="margin-left: 5px"
|
|
|
|
+ type="primary"
|
|
|
|
+ class="button-warning"
|
|
|
|
+ @click="handleExport"
|
|
|
|
+ v-if="$hasPermissions('B_receivedSendStorageReportExport')"
|
|
|
|
+ :disabled="disabled"
|
|
|
|
+ :loading="exportLoading"
|
|
|
|
+ id="receivedSendStorageReportList-export">导出</a-button>
|
|
|
|
+ <a @click="advanced=!advanced" style="margin-left: 5px">
|
|
{{ advanced ? '收起' : '展开' }}
|
|
{{ advanced ? '收起' : '展开' }}
|
|
<a-icon :type="advanced ? 'up' : 'down'"/>
|
|
<a-icon :type="advanced ? 'up' : 'down'"/>
|
|
</a>
|
|
</a>
|
|
@@ -99,11 +108,13 @@
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script>
|
|
<script>
|
|
|
|
+import moment from 'moment'
|
|
import { STable, VSelect } from '@/components'
|
|
import { STable, VSelect } from '@/components'
|
|
import { dealerProductBrandQuery } from '@/api/dealerProductBrand'
|
|
import { dealerProductBrandQuery } from '@/api/dealerProductBrand'
|
|
import { dealerProductTypeList } from '@/api/dealerProductType'
|
|
import { dealerProductTypeList } from '@/api/dealerProductType'
|
|
import rangeDate from '@/views/common/rangeDate.vue'
|
|
import rangeDate from '@/views/common/rangeDate.vue'
|
|
-import { reportPageList, reportStockPutOutCount } from '@/api/reportData'
|
|
|
|
|
|
+import { downloadExcel } from '@/libs/JGPrint.js'
|
|
|
|
+import { reportPageList, reportStockPutOutCount, reportStockPutOutExport } from '@/api/reportData'
|
|
export default {
|
|
export default {
|
|
components: { STable, VSelect, rangeDate },
|
|
components: { STable, VSelect, rangeDate },
|
|
data () {
|
|
data () {
|
|
@@ -236,6 +247,25 @@ export default {
|
|
this.totalData = null
|
|
this.totalData = null
|
|
this.$refs.table.clearTable()
|
|
this.$refs.table.clearTable()
|
|
},
|
|
},
|
|
|
|
+ // 导出
|
|
|
|
+ handleExport () {
|
|
|
|
+ const _this = this
|
|
|
|
+ this.$refs.ruleForm.validate(valid => {
|
|
|
|
+ if (valid) {
|
|
|
|
+ const params = _this.queryParam
|
|
|
|
+ _this.exportLoading = true
|
|
|
|
+ _this.spinning = true
|
|
|
|
+ reportStockPutOutExport(params).then(res => {
|
|
|
|
+ const fileName = '收发存报表' + moment().format('YYYYMMDDHHmmss')
|
|
|
|
+ downloadExcel(res, fileName)
|
|
|
|
+ _this.exportLoading = false
|
|
|
|
+ _this.spinning = false
|
|
|
|
+ })
|
|
|
|
+ } else {
|
|
|
|
+ return false
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ },
|
|
// 产品分类 change
|
|
// 产品分类 change
|
|
changeProductType (val, opt) {
|
|
changeProductType (val, opt) {
|
|
this.queryParam.productEntity.productTypeSn1 = val[0] ? val[0] : ''
|
|
this.queryParam.productEntity.productTypeSn1 = val[0] ? val[0] : ''
|