Merge remote-tracking branch 'origin/master'

prod
anthonywj 2 years ago
commit a78fc5973b

@ -44,6 +44,7 @@ export function filterYearList(params) {
return axios({ return axios({
url: "/udiwms/inv/excelExportOut", url: "/udiwms/inv/excelExportOut",
method: "get", method: "get",
responseType: 'blob',
params: params params: params
}); });
} }

@ -158,6 +158,7 @@
<script> <script>
import {getStatOrderList, filterDayList, excelImport} from "@/api/inout/statData"; import {getStatOrderList, filterDayList, excelImport} from "@/api/inout/statData";
import {isBlank} from "@/utils/strUtil";
const formJson = { const formJson = {
site_id: "", site_id: "",
@ -283,8 +284,16 @@ export default {
}, },
excel(){ excel(){
let params={billNo:this.currentRow.recordKey}; if(isBlank(this.currentRow.recordKey)){
return this.$message.error("请选择要导出的数据!");
}
let params={billNo:this.currentRow.recordKey,key:"day"};
excelImport(params ).then( res =>{ excelImport(params ).then( res =>{
let blob = new Blob([res],{type: "application/vnd.ms-excel"});
let url = window.URL.createObjectURL(blob); // urlblob
let a = document.createElement("a");
a.href = url;
a.click();
this.$message("成功") this.$message("成功")
}) })

@ -100,6 +100,10 @@
icon="el-icon-search" icon="el-icon-search"
>查询 >查询
</el-button> </el-button>
<el-button type="primary" @click="excel"
icon="el-icon-upload2"
>导出
</el-button>
</el-button-group> </el-button-group>
</el-form-item> </el-form-item>
</el-form> </el-form>
@ -149,7 +153,8 @@
</template> </template>
<script> <script>
import {getStatOrderList, filterMonthList} from "@/api/inout/statData"; import {getStatOrderList, filterMonthList, excelImport} from "@/api/inout/statData";
import {isBlank} from "@/utils/strUtil";
const formJson = { const formJson = {
site_id: "", site_id: "",
@ -256,6 +261,23 @@ export default {
this.filterQuery.page = 1; this.filterQuery.page = 1;
this.getList(); this.getList();
}, },
excel(){
debugger
if(isBlank(this.currentRow.recordKey)){
return this.$message.error("请选择要导出的数据!");
}
let params={billNo:this.currentRow.recordKey,key:"month"};
excelImport(params ).then( res =>{
let blob = new Blob([res],{type: "application/vnd.ms-excel"});
let url = window.URL.createObjectURL(blob); // urlblob
let a = document.createElement("a");
a.href = url;
a.click();
this.$message("成功")
})
},
hideSearch() { hideSearch() {
this.showSearch = !this.showSearch; this.showSearch = !this.showSearch;
}, },

@ -100,6 +100,10 @@
icon="el-icon-search" icon="el-icon-search"
>查询 >查询
</el-button> </el-button>
<el-button type="primary" @click="excel"
icon="el-icon-upload2"
>导出
</el-button>
</el-button-group> </el-button-group>
</el-form-item> </el-form-item>
</el-form> </el-form>
@ -149,7 +153,8 @@
</template> </template>
<script> <script>
import {getStatOrderList, filterQuarterList} from "@/api/inout/statData"; import {getStatOrderList, filterQuarterList, excelImport} from "@/api/inout/statData";
import {isBlank} from "@/utils/strUtil";
const formJson = { const formJson = {
site_id: "", site_id: "",
@ -277,6 +282,21 @@ export default {
this.detailList = []; this.detailList = [];
this.detailTotal = 0; this.detailTotal = 0;
}, },
excel(){
if(isBlank(this.currentRow.recordKey)){
return this.$message.error("请选择要导出的数据!");
}
let params={billNo:this.currentRow.recordKey,key:"quarter"};
excelImport(params ).then( res =>{
let blob = new Blob([res],{type: "application/vnd.ms-excel"});
let url = window.URL.createObjectURL(blob); // urlblob
let a = document.createElement("a");
a.href = url;
a.click();
this.$message("成功")
})
},
// //
getList() { getList() {
this.loading = true; this.loading = true;

@ -100,6 +100,10 @@
icon="el-icon-search" icon="el-icon-search"
>查询 >查询
</el-button> </el-button>
<el-button type="primary" @click="excel"
icon="el-icon-upload2"
>导出
</el-button>
</el-button-group> </el-button-group>
</el-form-item> </el-form-item>
</el-form> </el-form>
@ -149,7 +153,8 @@
</template> </template>
<script> <script>
import {getStatOrderList, filterYearList} from "@/api/inout/statData"; import {getStatOrderList, filterYearList, excelImport} from "@/api/inout/statData";
import {isBlank} from "@/utils/strUtil";
const formJson = { const formJson = {
site_id: "", site_id: "",
@ -256,6 +261,21 @@ export default {
this.filterQuery.page = 1; this.filterQuery.page = 1;
this.getList(); this.getList();
}, },
excel(){
if(isBlank(this.currentRow.recordKey)){
return this.$message.error("请选择要导出的数据!");
}
let params={billNo:this.currentRow.recordKey,key:"year"};
excelImport(params ).then( res =>{
let blob = new Blob([res],{type: "application/vnd.ms-excel"});
let url = window.URL.createObjectURL(blob); // urlblob
let a = document.createElement("a");
a.href = url;
a.click();
this.$message("成功")
})
},
hideSearch() { hideSearch() {
this.showSearch = !this.showSearch; this.showSearch = !this.showSearch;
}, },

Loading…
Cancel
Save