|
@@ -98,11 +98,12 @@
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script>
|
|
<script>
|
|
|
|
+import moment from 'moment'
|
|
import { STable, VSelect } from '@/components'
|
|
import { STable, VSelect } from '@/components'
|
|
import rangeDate from '@/views/common/rangeDate.vue'
|
|
import rangeDate from '@/views/common/rangeDate.vue'
|
|
import ProductType from '../../common/productType.js'
|
|
import ProductType from '../../common/productType.js'
|
|
import ProductBrand from '../../common/productBrand.js'
|
|
import ProductBrand from '../../common/productBrand.js'
|
|
-import { hdPrint } from '@/libs/JGPrint'
|
|
|
|
|
|
+import { downloadExcel } from '@/libs/JGPrint.js'
|
|
import { reportChainReceivingBillDetailList, reportChainReceivingBillDetailCount, reportReceivingBillDetailExport, linkageGroupList } from '@/api/reportData'
|
|
import { reportChainReceivingBillDetailList, reportChainReceivingBillDetailCount, reportReceivingBillDetailExport, linkageGroupList } from '@/api/reportData'
|
|
export default {
|
|
export default {
|
|
components: { STable, VSelect, rangeDate, ProductType, ProductBrand },
|
|
components: { STable, VSelect, rangeDate, ProductType, ProductBrand },
|
|
@@ -242,12 +243,20 @@ export default {
|
|
// 导出
|
|
// 导出
|
|
handleExport () {
|
|
handleExport () {
|
|
const _this = this
|
|
const _this = this
|
|
- _this.spinning = true
|
|
|
|
- _this.exportLoading = true
|
|
|
|
- // 打印或导出
|
|
|
|
- hdPrint('', 'export', reportReceivingBillDetailExport, this.queryParam, '连锁采购入库明细报表', function () {
|
|
|
|
- _this.exportLoading = false
|
|
|
|
- _this.spinning = false
|
|
|
|
|
|
+ this.$refs.ruleForm.validate(valid => {
|
|
|
|
+ if (valid) {
|
|
|
|
+ const params = _this.queryParam
|
|
|
|
+ _this.exportLoading = true
|
|
|
|
+ _this.spinning = true
|
|
|
|
+ reportReceivingBillDetailExport(params).then(res => {
|
|
|
|
+ const fileName = '连锁采购入库明细报表' + moment().format('YYYYMMDDHHmmss')
|
|
|
|
+ downloadExcel(res, fileName)
|
|
|
|
+ _this.exportLoading = false
|
|
|
|
+ _this.spinning = false
|
|
|
|
+ })
|
|
|
|
+ } else {
|
|
|
|
+ return false
|
|
|
|
+ }
|
|
})
|
|
})
|
|
},
|
|
},
|
|
// 连锁店
|
|
// 连锁店
|