diff --git a/src/api/expense-manage/index.js b/src/api/expense-manage/index.js index 4c60bf8..34f7bdd 100644 --- a/src/api/expense-manage/index.js +++ b/src/api/expense-manage/index.js @@ -68,6 +68,13 @@ export const editAllocation = (data) => { data }); }; +export const applyCcSend = (data) => { + return request({ + url: '/workflow/mosr/cc/send', + method: "post", + data + }); +}; export const deleteAllocation = (id) => { return request({ url: `/workflow/mosr/cost/allocation/${id}`, diff --git a/src/api/project-manage/index.js b/src/api/project-manage/index.js index 6e6eeae..ad68054 100644 --- a/src/api/project-manage/index.js +++ b/src/api/project-manage/index.js @@ -226,3 +226,15 @@ export const ledgerTemplateDownload = () => { } ); }; +//费用明细模板下载 +export const costTemplateDownload = () => { + return axios.get( + `${import.meta.env.VITE_BASE_URL}/workflow/mosr/rd/expense/download/template`, + { + responseType: 'blob', + headers: { + Authorization: getToken() + } + } + ); +}; diff --git a/src/components/ImportCostExcel.vue b/src/components/ImportCostExcel.vue new file mode 100644 index 0000000..b2749e7 --- /dev/null +++ b/src/components/ImportCostExcel.vue @@ -0,0 +1,114 @@ + + + + + diff --git a/src/components/Tinymce.vue b/src/components/Tinymce.vue index c38dcd4..43588cd 100644 --- a/src/components/Tinymce.vue +++ b/src/components/Tinymce.vue @@ -38,7 +38,7 @@ import 'tinymce/plugins/wordcount' import 'tinymce/plugins/autosave' import '@/assets/axupimgs/plugin.js'//多图上传插件 -const emit = defineEmits(['update:value']) +const emit = defineEmits(['update:value','getFiles']) const props = defineProps({ //默认值 value: { @@ -78,6 +78,7 @@ const props = defineProps({ default: 500 } }) +const fileLists=ref([]) const content = ref(props.value); const imgUrl = ref(); // const apiKey = reactive("v4zo4n22oanvco29ws5drh0pecuf3gh53clx53cccj3grjwg"); @@ -168,6 +169,15 @@ const init = reactive({ type: res.code === 1000 ? 'success' : 'error' }) loading.close() + console.log("🚀 ~ file:res.data ", res.data) + res.data.originalFileName=res.data.originalFilename + console.log("🚀 ~ file:'meta.filetype ",meta.filetype ) + + if (res && res.data && res.data.fileType && + !["png", "jpg", "jpeg","gif", "svg","ico"].includes(res.data.fileType.toLowerCase())){ + fileLists.value.push(res.data) + emit('getFiles',fileLists.value) + } const fileUrl = res.data.url; // '?fileId='+res.data.id+ callback(fileUrl + '?fileName=' + res.data.originalFilename, {text: file.name, title: file.name}); diff --git a/src/fvcomponents/fvTable/index.vue b/src/fvcomponents/fvTable/index.vue index 41baf4e..b9f05b3 100644 --- a/src/fvcomponents/fvTable/index.vue +++ b/src/fvcomponents/fvTable/index.vue @@ -1,5 +1,8 @@