|
@@ -351,6 +351,7 @@ export default {
|
|
|
this.queryParam.productEntity.name = ''
|
|
|
this.queryParam.warehouseSn = undefined
|
|
|
this.queryParam.warehouseLocationSn = undefined
|
|
|
+ this.queryParam.showCost = undefined
|
|
|
this.queryParam.warehouseCascade = []
|
|
|
this.queryParam.salesBillNo = ''
|
|
|
this.queryParam.salesManName = ''
|
|
@@ -362,22 +363,24 @@ export default {
|
|
|
// 导出
|
|
|
handleExport () {
|
|
|
const _this = this
|
|
|
- this.$refs.ruleForm.validate(valid => {
|
|
|
- if (valid) {
|
|
|
- const params = _this.queryParam
|
|
|
- params.showCost = this.$hasPermissions('M_ShowAllCost') ? '1' : '0'
|
|
|
- _this.exportLoading = true
|
|
|
- _this.spinning = true
|
|
|
- reportSalesBillDetailExport(params).then(res => {
|
|
|
- downloadExcel(res, '销售明细报表')
|
|
|
- _this.exportLoading = false
|
|
|
- _this.spinning = false
|
|
|
- })
|
|
|
- } else {
|
|
|
- console.log('error submit!!')
|
|
|
- return false
|
|
|
- }
|
|
|
- })
|
|
|
+ const str = JSON.stringify(this.queryParam)
|
|
|
+ const ret = str.replace(/\[|\]/g, '"').replace(/"},"/g, '","').replace(/"}/g, '","').match(/"\:".*?","/g)
|
|
|
+ const ret1 = ret.filter(item => item != '":"","')
|
|
|
+ console.log(ret1)
|
|
|
+ if (ret1.length) {
|
|
|
+ const params = _this.queryParam
|
|
|
+ params.showCost = this.$hasPermissions('M_ShowAllCost') ? '1' : '0'
|
|
|
+ _this.exportLoading = true
|
|
|
+ _this.spinning = true
|
|
|
+ reportSalesBillDetailExport(params).then(res => {
|
|
|
+ downloadExcel(res, '销售明细报表')
|
|
|
+ _this.exportLoading = false
|
|
|
+ _this.spinning = false
|
|
|
+ _this.queryParam.showCost = undefined
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ this.$message.info('请至少输入一个查询条件')
|
|
|
+ }
|
|
|
},
|
|
|
filterOption (input, option) {
|
|
|
return (
|