diff --git a/.env.development b/.env.development index 2ef074f..42d7ec2 100644 --- a/.env.development +++ b/.env.development @@ -12,7 +12,7 @@ VITE_APP_BASE_API = 'http://192.168.110.180:8899' # 罗成 # VITE_APP_BASE_API = 'http://192.168.110.213:8899' # 朱银 -# VITE_APP_BASE_API = 'http://192.168.110.149:8899' +VITE_APP_BASE_API = 'http://192.168.110.149:8899' #曾涛 # VITE_APP_BASE_API = 'http://192.168.110.171:8899' diff --git a/src/api/contract/index.ts b/src/api/contract/index.ts index a5124c1..84e4e07 100644 --- a/src/api/contract/index.ts +++ b/src/api/contract/index.ts @@ -91,3 +91,11 @@ export const getDetailsList = (query: any): AxiosPromise => { params: query }); }; + +//获取版本详情 +export const getVersionDetails = (id: any): AxiosPromise => { + return request({ + url: '/tender/tenderPlanLimitList/getVersionDetail/' + id, + method: 'get' + }); +}; diff --git a/src/api/tender/index.ts b/src/api/tender/index.ts index 10a75dd..5b45d9a 100644 --- a/src/api/tender/index.ts +++ b/src/api/tender/index.ts @@ -122,11 +122,10 @@ export const editStatus = (query: any): AxiosPromise => { data: query }); }; -//获取审核状态 -export const getApproval = (id) => { +//获取版本详情 +export const getVersionDetail = (id: any) => { return request({ - url: '/tender/tenderPlanLimitList/getVersionDetail', - method: 'get', - params: { versions: id } + url: '/tender/tenderPlanLimitList/getVersionDetail/' + id, + method: 'get' }); }; diff --git a/src/views/biddingManagemen/biddingLimit/indexEdit.vue b/src/views/biddingManagemen/biddingLimit/indexEdit.vue index fee3dd1..951d70d 100644 --- a/src/views/biddingManagemen/biddingLimit/indexEdit.vue +++ b/src/views/biddingManagemen/biddingLimit/indexEdit.vue @@ -19,13 +19,35 @@

成本核算清单

- -
- - {{ item }} - + +
+ + + + + + + + + + + +
+ + + + + + + + + + +
@@ -68,9 +90,9 @@ import SubmitVerify from '@/components/Process/submitVerify.vue'; import ApprovalRecord from '@/components/Process/approvalRecord.vue'; import ApprovalButton from '@/components/Process/approvalButton.vue'; import { StartProcessBo } from '@/api/workflow/workflowCommon/types'; -const { proxy } = getCurrentInstance() as ComponentInternalInstance; +const { proxy } = getCurrentInstance() as any; import { useUserStoreHook } from '@/store/modules/user'; -import { getVersionDetail, sheetList } from '@/api/bidding/biddingLimit'; +import { getVersionDetail, sheetList, getTreeLimit } from '@/api/bidding/biddingLimit'; // 获取用户 store const userStore = useUserStoreHook(); @@ -99,7 +121,6 @@ const submitVerifyRef = ref>(); const approvalRecordRef = ref>(); //按钮组件 const approvalButtonRef = ref>(); -const sheets = ref([]); const versions = ref({}); const leaveFormRef = ref(); const dialog = reactive({ @@ -124,7 +145,10 @@ const initFormData = { fileSuffix: undefined, originalName: undefined, remark: undefined, - fileId: undefined + fileId: undefined, + status: undefined, + versions: undefined, + sheet: undefined }; const data = reactive({ form: { ...initFormData }, @@ -150,24 +174,46 @@ const getInfo = () => { buttonLoading.value = false; nextTick(async () => { const res = await getVersionDetail(routeParams.value.id); + console.log(res); Object.assign(form.value, res.data); - getSheetName(res.data.versions); loading.value = false; buttonLoading.value = false; + getSheetName(); }); }; +const sheets = ref([]); //获取表名 -const getSheetName = async (versions) => { - const params = { - projectId: currentProject.value?.id, - versions - }; - const res = await sheetList(params); - if (res.code == 200) { - sheets.value = res.data; - if (res.data.length > 0) { +const getSheetName = async () => { + try { + const params = { + projectId: currentProject.value?.id, + versions: form.value.versions + }; + const res = await sheetList(params); + if (res.code == 200) { sheets.value = res.data; + if (res.data.length > 0) { + form.value.sheet = res.data[0]; + } + getListTable(); } + } catch (error) {} +}; +//选择表名 +const changeSheet = () => { + getListTable(); +}; +const tableData = ref([]); + +//获取列表 +const getListTable = async () => { + const res = await getTreeLimit({ + projectId: currentProject.value?.id, + versions: form.value.versions, + sheet: form.value.sheet + }); + if (res.code == 200) { + tableData.value = res.data; } }; /** 提交按钮 */ @@ -185,7 +231,7 @@ const submitFlow = async () => { const handleStartWorkFlow = async (data: LeaveForm) => { try { submitFormData.value.flowCode = flowCode.value; - submitFormData.value.businessId = data.versions + '_abc'; + submitFormData.value.businessId = data.id; //流程变量 taskVariables.value = { // leave4/5 使用的流程变量 @@ -203,7 +249,7 @@ const handleStartWorkFlow = async (data: LeaveForm) => { }; //审批记录 const handleApprovalRecord = () => { - approvalRecordRef.value.init(form.value.versions + '_abc'); + approvalRecordRef.value.init(form.value.id); }; //提交回调 const submitCallback = async () => { @@ -242,9 +288,10 @@ onMounted(() => { reset(); routeParams.value = proxy.$route.query; loading.value = false; - // if (routeParams.value.type === 'update' || routeParams.value.type === 'view' || routeParams.value.type === 'approval') { - getInfo(); - // } + if (routeParams.value.type === 'update' || routeParams.value.type === 'view' || routeParams.value.type === 'approval') { + getInfo(); + console.log('routeParams.value', routeParams.value); + } }); }); diff --git a/src/views/contract/bidCost/index.vue b/src/views/contract/bidCost/index.vue index 8a6297b..d746c53 100644 --- a/src/views/contract/bidCost/index.vue +++ b/src/views/contract/bidCost/index.vue @@ -38,7 +38,7 @@ v-if="versionObj.status == 'draft'" icon="Edit" @click="handleAudit" - v-hasPermi="['desibiddinggn:biddingLimitList:query']" + v-hasPermi="['bidding:biddingLimitList:getVersionDetail']" >审核 @@ -47,7 +47,7 @@ type="primary" icon="view" @click="handleViewInfo" - v-hasPermi="['desibiddinggn:biddingLimitList:query']" + v-hasPermi="['bidding:biddingLimitList:getVersionDetail']" v-if="versionObj.status != 'draft'" >查看流程 @@ -76,10 +76,10 @@ - +