Merge branch 'main' of ssh://git.jizhiweb.cn:2222/clinic-v2/web

This commit is contained in:
ChenQiuYu 2025-05-17 10:29:14 +08:00
commit 230f32c508
2 changed files with 20 additions and 2 deletions

View File

@ -14,7 +14,7 @@
<template #footer> <template #footer>
<div class="bottom"> <div class="bottom">
<div class="default-btn" @click="isShow=false">上传数据</div> <div class="default-btn" @click="isShow=false">上传数据</div>
<div class="default-btn" @click="uploadCateIds" style="margin-left: 24px">下载模板</div> <div class="default-btn" @click="toExcel" style="margin-left: 24px">下载模板</div>
<div class="default-btn" @click="isShow=false" style="margin-left: 24px">取消</div> <div class="default-btn" @click="isShow=false" style="margin-left: 24px">取消</div>
</div> </div>
</template> </template>
@ -25,6 +25,7 @@
import Mask from "@/components/common/Mask.vue"; import Mask from "@/components/common/Mask.vue";
import {defineModel, onMounted, ref} from "vue"; import {defineModel, onMounted, ref} from "vue";
import {post} from "@/utils/request.ts"; import {post} from "@/utils/request.ts";
import {loadConfig} from "@/utils/config.ts";
const isShow = defineModel() const isShow = defineModel()
const props = {multiple: true} const props = {multiple: true}
@ -43,6 +44,23 @@ const typeList = {
} }
const cateIds = ref<number[]>([]); const cateIds = ref<number[]>([]);
const allCateList = ref<CateOption[]>([]); const allCateList = ref<CateOption[]>([]);
const toExcel=()=>{
let cateIdsVal=cateIds.value
let cateIdList=[]
for(let i=0;i<cateIdsVal.length;i++){
let item:any=cateIdsVal[i];
if(item.length>1){
cateIdList.push(item[1])
}
}
post("inventory/order/toExcel",{cateIdList:cateIdList}).then((token:any)=>{
loadConfig().then((res: any) => {
window.open(res.base_url+"file/download/"+token)
})
})
}
const getAllCate = () => { const getAllCate = () => {
post("goods/cate/getAllList", null).then((res: any) => { post("goods/cate/getAllList", null).then((res: any) => {
const options = []; const options = [];

View File

@ -143,7 +143,7 @@ import Mask from "@/components/common/Mask.vue";
import EditOrder from "@/components/inventory/purchase/EditOrder.vue"; import EditOrder from "@/components/inventory/purchase/EditOrder.vue";
import {Plus, Refresh, Search, SemiSelect} from "@element-plus/icons-vue"; import {Plus, Refresh, Search, SemiSelect} from "@element-plus/icons-vue";
import {formatDateArray, getEndOfDay} from "@/utils/dateUtils.ts"; import {formatDateArray, getEndOfDay} from "@/utils/dateUtils.ts";
import UpLoad from "@/components/inventory/Upload.vue"; import UpLoad from "@/components/inventory/purchase/Upload.vue";
let tableData = ref([]) let tableData = ref([])
let is_edit = ref(false) let is_edit = ref(false)