feat: 药房上货推荐单

20240912_adapter
chenhc 3 months ago
parent c186997015
commit c072015e22

@ -29,3 +29,11 @@ export function remindSet(query) {
export function exportExcel(query) {
return axios({
url: "/udiwms/ioSplit/inv/exportExcel",
method: "get",
responseType: 'blob',
params: query
});
}

@ -118,6 +118,10 @@
>查询 >查询
</el-button </el-button
> >
<el-button type="primary" icon="el-icon-search" @click="allExport()"
>导出上货推荐单
</el-button
>
</el-button-group> </el-button-group>
</div> </div>
<el-divider style="margin: 15px"></el-divider> <el-divider style="margin: 15px"></el-divider>
@ -237,7 +241,7 @@
<script> <script>
import {executeFuc, getHead} from "@/utils/customConfig"; import {executeFuc, getHead} from "@/utils/customConfig";
import {convertDate} from "@/utils/date"; import {convertDate} from "@/utils/date";
import {splitFifoPage} from "@/api/inout/splitInv"; import {splitFifoPage,exportExcel} from "@/api/inout/splitInv";
import {getInvListByUserOptimize} from "@/api/system/invWarehouse"; import {getInvListByUserOptimize} from "@/api/system/invWarehouse";
import {filterWorkOptimize, listPage} from '@/api/basic/workPlace/sysWorkplaceManage' import {filterWorkOptimize, listPage} from '@/api/basic/workPlace/sysWorkplaceManage'
import {getWorkBindBusTypes, removeBusTypeById} from '@/api/basic/workPlace/sysWorkplaceDocuments' import {getWorkBindBusTypes, removeBusTypeById} from '@/api/basic/workPlace/sysWorkplaceDocuments'
@ -313,6 +317,21 @@ export default {
components: {}, components: {},
methods: { methods: {
allExport() {
exportExcel(this.filterQuery).then((response) => {
const currentDate = new Date().toISOString().slice(0, 10).replace(/-/g, ''); // YYYYMMDD
const filename = `上货推荐单_${currentDate}.xlsx`;
let blob = new Blob([response], {type: "application/vnd.ms-excel"});
let url = window.URL.createObjectURL(blob); // urlblob
let a = document.createElement("a");
a.download = filename;
a.href = url;
a.click();
this.$message.success("导出文件成功!")
})
},
changePlace(_this, query) { changePlace(_this, query) {
_this.getWorkBindBusTypes(_this, query) _this.getWorkBindBusTypes(_this, query)
}, },

Loading…
Cancel
Save