diff --git a/src/api/project-manage/index.js b/src/api/project-manage/index.js index 179943c..2409fe8 100644 --- a/src/api/project-manage/index.js +++ b/src/api/project-manage/index.js @@ -160,6 +160,13 @@ export const searchUpdateLedgerData = (projectId) => { method: "get" }); }; +// +// export const searchUpdateLedgerData = (projectId) => { +// return request({ +// url: '/workflow/mosr/expense/ledger/import', +// method: "get" +// }); +// }; export const exportExcel = (data) => { return axios.post( diff --git a/src/components/DetailComponent/ApprovalDetail.vue b/src/components/DetailComponent/ApprovalDetail.vue index 880366a..8cdde65 100644 --- a/src/components/DetailComponent/ApprovalDetail.vue +++ b/src/components/DetailComponent/ApprovalDetail.vue @@ -432,7 +432,6 @@ onMounted(() => { // } }) -console.log("propsprops", props.formData, props.type , props) if (props.formData.mode == 'view' && props.type == 'execute') { handleSearchImplementationFileList() getTagsOption() diff --git a/src/components/ImportExcel.vue b/src/components/ImportExcel.vue new file mode 100644 index 0000000..83fa8d6 --- /dev/null +++ b/src/components/ImportExcel.vue @@ -0,0 +1,95 @@ + + + + + diff --git a/src/views/project-management/implementation/account.vue b/src/views/project-management/implementation/account.vue index 37f343e..16d70e3 100644 --- a/src/views/project-management/implementation/account.vue +++ b/src/views/project-management/implementation/account.vue @@ -5,19 +5,25 @@ - {{basicData.requirementName}} + {{ basicData.requirementName }} - {{basicData.projectName}} + {{ basicData.projectName }} - +
+ 导出 + + 上传费用 + 表格更新 +
+ @@ -30,11 +36,12 @@ import fvSelect from '@/fvcomponents/fvSelect/index.vue' import {toThousands} from '@/utils/changePrice.js' import {getBaseInfoApi} from "@/components/steps/api"; -import {searchUpdateLedgerData,exportExcel} from "@/api/project-manage"; +import {searchUpdateLedgerData, exportExcel} from "@/api/project-manage"; +// import ImportExcel from "../../../components/ImportExcel"; const router = useRouter() const route = useRoute() -const basicData=ref({}) +const basicData = ref({}) const tableData = ref({}) const formDataArray = ref([ { @@ -78,7 +85,7 @@ const formDataArray = ref([ colProps: { span: 6 }, - component: ()=>{tableData.value.projectCompletionRate}% + component: () => {tableData.value.projectCompletionRate}% }, { label: '已完成工作量', @@ -88,8 +95,9 @@ const formDataArray = ref([ } } ]) +const buttonShow = ref(false) const schema = computed(() => { - return formDataArray.value + return formDataArray.value }) const baseForm = ref() const tableIns = ref() @@ -102,7 +110,7 @@ const searchConfig = reactive([ prop: 'time', component: 'el-date-picker', props: { - type:'month', + type: 'month', placeholder: '请选择月份', clearable: true, format: 'YYYY-MM', @@ -218,12 +226,12 @@ const tableConfig = reactive({ params: { projectId: route.query.id }, - btns: btns.value + // btns: btns.value }) - // const exportIds=ref([]) -const selectionChange=(data)=>{ - console.log('data',data) - console.log(' data.forEach(item=>item.id)', data.forEach(item=>item.id)) +// const exportIds=ref([]) +const selectionChange = (data) => { + console.log('data', data) + console.log(' data.forEach(item=>item.id)', data.forEach(item => item.id)) } const handleUpdateTable = () => { router.push({ @@ -236,17 +244,22 @@ const handleUpdateTable = () => { const getBaseInfo = async () => { try { const {code, data} = await getBaseInfoApi(route.query.id) - basicData.value=data + basicData.value = data } catch { } } const init = async () => { + buttonShow.value = false const {code, msg, data} = await searchUpdateLedgerData(route.query.id) - if (code===1000) { + if (code === 1000) { tableData.value = data - if(!data.view){ - btns.value.push({name: '上传费用', key: 'add', color: '#DED0B2', auth: ''},{name: '表格更新', key: 'update', color: '#DED0B2', auth: ''},) - } + nextTick(() => { + buttonShow.value = !data.view + }) + // if (!data.view) { + // btns.value.push({name: '上传费用', key: 'add', color: '#DED0B2', auth: ''}, + // {name: '表格更新', key: 'update', color: '#DED0B2', auth: ''}) + // } baseForm.value.setValues(data) } // if (code !== 1000) { @@ -259,18 +272,8 @@ const init = async () => { } getBaseInfo() init() -const headBtnClick = (key) => { - switch (key) { - case 'add': - handleUploadFee() - break; - case 'update': - handleUpdateTable() - break; - case 'export': - exportExcelHandler() - break; - } +const importTheExpenseLedger = () => { + tableIns.value.refresh() } const handleUploadFee = () => { router.push({ @@ -301,13 +304,13 @@ const search = (val) => { tableConfig.params = {...val, projectId: route.query.id} tableIns.value.refresh() } -onActivated(()=>{ +onActivated(() => { init() })