修改审核
This commit is contained in:
@ -38,7 +38,7 @@
|
||||
v-if="versionObj.status == 'draft'"
|
||||
icon="Edit"
|
||||
@click="handleAudit"
|
||||
v-hasPermi="['desibiddinggn:biddingLimitList:query']"
|
||||
v-hasPermi="['bidding:biddingLimitList:getVersionDetail']"
|
||||
>审核</el-button
|
||||
>
|
||||
</el-form-item>
|
||||
@ -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'"
|
||||
>查看流程</el-button
|
||||
>
|
||||
@ -76,10 +76,10 @@
|
||||
</el-table-column>
|
||||
<el-table-column prop="price" label="总价" align="center">
|
||||
<template #default="scope">
|
||||
{{ scope.row.price }}
|
||||
{{ scope.row.price != 0 ? Number(scope.row.price).toFixed(2) : null }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="price" label="操作" align="center">
|
||||
<el-table-column prop="operate" label="操作" align="center">
|
||||
<template #default="scope">
|
||||
<el-button
|
||||
type="primary"
|
||||
@ -174,7 +174,8 @@ const getTableData = async () => {
|
||||
loading.value = true;
|
||||
const params = {
|
||||
projectId: currentProject.value?.id,
|
||||
sheet: queryForm.value.sheet
|
||||
sheet: queryForm.value.sheet,
|
||||
versions: queryForm.value.versions
|
||||
};
|
||||
const res = await getTreeLimit(params);
|
||||
loading.value = false;
|
||||
@ -267,7 +268,7 @@ const handleAudit = () => {
|
||||
path: `/approval/biddingLimit/indexEdit`,
|
||||
query: {
|
||||
id,
|
||||
type: 'add',
|
||||
type: 'update',
|
||||
sheets: sheets.value,
|
||||
versions: versionObj.value
|
||||
}
|
||||
|
@ -36,10 +36,22 @@
|
||||
<el-button type="primary" @click="handleExport()" v-hasPermi="['tender:billofquantitiesLimitList:export']">导出excel</el-button>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" v-if="reviewStatus == 'draft'" @click="clickApprovalSheet()">审核</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
v-if="reviewStatus == 'draft'"
|
||||
@click="clickApprovalSheet()"
|
||||
v-hasPermi="['tender:tenderPlanLimitList:getVersionDetail']"
|
||||
>审核</el-button
|
||||
>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" v-if="reviewStatus != 'draft'" @click="clickApprovalSheet()">查看流程</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
v-if="reviewStatus != 'draft'"
|
||||
@click="clickApprovalSheet()"
|
||||
v-hasPermi="['tender:tenderPlanLimitList:getVersionDetail']"
|
||||
>查看流程</el-button
|
||||
>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-card>
|
||||
@ -55,7 +67,11 @@
|
||||
<el-input-number
|
||||
:disabled="reviewStatus != 'draft'"
|
||||
:model-value="scope.row.unitPrice"
|
||||
@change="(val) => (scope.row.unitPrice = val)"
|
||||
@change="
|
||||
(val) => {
|
||||
scope.row.unitPrice = val;
|
||||
}
|
||||
"
|
||||
:precision="2"
|
||||
:step="0.1"
|
||||
:controls="false"
|
||||
@ -65,10 +81,12 @@
|
||||
</el-table-column>
|
||||
<el-table-column prop="price" label="总价" align="center">
|
||||
<template #default="scope">
|
||||
{{ scope.row.price }}
|
||||
<!-- {{ scope.row.children.length > 0 ? scope.row.children.reduce((sum, child) => sum + child.price, 0) : scope.row.price }} -->
|
||||
{{ scope.row.price != 0 ? Number(scope.row.price).toFixed(2) : null }}
|
||||
<!-- {{ scope.row.price }} -->
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="price" label="操作" align="center">
|
||||
<el-table-column prop="operate" label="操作" align="center">
|
||||
<template #default="scope">
|
||||
<el-button
|
||||
type="primary"
|
||||
@ -103,7 +121,8 @@ const sheets = ref<any[]>([]);
|
||||
const tableData = ref<any[]>([]);
|
||||
const isExpandAll = ref(false);
|
||||
const reviewStatus = ref('');
|
||||
|
||||
const versionObj: any = ref({});
|
||||
const versionMap = new Map();
|
||||
//获取版本号
|
||||
const getVersionNums = async () => {
|
||||
try {
|
||||
@ -118,9 +137,11 @@ const getVersionNums = async () => {
|
||||
if (res.code == 200) {
|
||||
options.value = res.data;
|
||||
if (res.data.length > 0) {
|
||||
res.data.forEach((item: any) => {
|
||||
versionMap.set(item.versions, item);
|
||||
});
|
||||
queryForm.value.versions = res.data[0].versions;
|
||||
reviewStatus.value = res.data[0].status;
|
||||
|
||||
getSheetName();
|
||||
} else {
|
||||
queryForm.value.versions = '';
|
||||
@ -283,20 +304,19 @@ const handleExport = () => {
|
||||
// 审批
|
||||
const clickApprovalSheet = () => {
|
||||
proxy.$tab.closePage(proxy?.$route);
|
||||
let id = versionMap.get(queryForm.value.versions).id;
|
||||
proxy?.$router.push({
|
||||
path: `/approval/contractLimitPrice/indexEdit`,
|
||||
query: {
|
||||
projectId: currentProject.value?.id,
|
||||
versions: queryForm.value.versions,
|
||||
sheet: queryForm.value.sheet,
|
||||
id: id,
|
||||
type: 'update',
|
||||
status: reviewStatus.value
|
||||
sheets: queryForm.value.sheet
|
||||
}
|
||||
});
|
||||
};
|
||||
onUnmounted(() => {
|
||||
listeningProject();
|
||||
console.log(11111111);
|
||||
// console.log(11111111);
|
||||
});
|
||||
onMounted(() => {
|
||||
getVersionNums();
|
||||
|
@ -16,26 +16,20 @@
|
||||
<!-- 表单区域 -->
|
||||
<el-card class="rounded-lg shadow-sm bg-white border border-gray-100 transition-all hover:shadow-md overflow-hidden">
|
||||
<div class="p-4 bg-gradient-to-r from-blue-50 to-indigo-50 border-b border-gray-100">
|
||||
<h3 class="text-lg font-semibold text-gray-800">合同限价审核</h3>
|
||||
<h3 class="text-lg font-semibold text-gray-800">合约限价审核</h3>
|
||||
</div>
|
||||
<div class="p-6">
|
||||
<el-form
|
||||
ref="leaveFormRef"
|
||||
v-loading="loading"
|
||||
:disabled="routeParams.type === 'view' || form.status == 'waiting'"
|
||||
:model="form"
|
||||
:rules="rules"
|
||||
label-width="100px"
|
||||
class="space-y-4"
|
||||
>
|
||||
<el-form ref="leaveFormRef" v-loading="loading" :model="form" :rules="rules" label-width="100px" class="space-y-4">
|
||||
<div class="grid grid-cols-1 gap-4">
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="版本号" prop="formNo">
|
||||
<el-input disabled v-model="form.versions" placeholder="请输入文件名称" />
|
||||
<el-input :disabled="true" v-model="form.versions" placeholder="请输入文件名称" />
|
||||
</el-form-item>
|
||||
<el-form-item label="表名" prop="formNo">
|
||||
<el-input disabled v-model="form.sheet" placeholder="请输入文件名称" />
|
||||
<el-form-item label="表名" prop="sheet">
|
||||
<el-select v-model="form.sheet" placeholder="选择表名" @change="changeSheet">
|
||||
<el-option v-for="item in sheets" :key="item" :label="item" :value="item" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
@ -50,7 +44,7 @@
|
||||
<el-table-column prop="unitPrice" label="单价" align="center" />
|
||||
<el-table-column prop="price" label="总价" align="center">
|
||||
<template #default="scope">
|
||||
{{ scope.row.price }}
|
||||
{{ scope.row.price != 0 ? Number(scope.row.price).toFixed(2) : null }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
@ -99,7 +93,7 @@ import { StartProcessBo } from '@/api/workflow/workflowCommon/types';
|
||||
const { proxy } = getCurrentInstance() as any;
|
||||
import { useUserStoreHook } from '@/store/modules/user';
|
||||
const { design_change_reason_type } = toRefs<any>(proxy?.useDict('design_change_reason_type'));
|
||||
import { listBillofquantitiesLimitList } from '@/api/contract/index';
|
||||
import { listBillofquantitiesLimitList, getVersionDetails, sheetList } from '@/api/contract/index';
|
||||
// 获取用户 store
|
||||
const userStore = useUserStoreHook();
|
||||
// 从 store 中获取项目列表和当前选中的项目
|
||||
@ -143,7 +137,8 @@ const taskVariables = ref<Record<string, any>>({});
|
||||
const initFormData = {
|
||||
versions: '',
|
||||
sheet: '',
|
||||
status: ''
|
||||
status: '',
|
||||
id: ''
|
||||
};
|
||||
const data = reactive({
|
||||
form: { ...initFormData },
|
||||
@ -169,21 +164,47 @@ const getInfo = () => {
|
||||
loading.value = true;
|
||||
buttonLoading.value = false;
|
||||
nextTick(async () => {
|
||||
const res = await listBillofquantitiesLimitList({
|
||||
projectId: routeParams.value?.id,
|
||||
versions: routeParams.value.versions,
|
||||
sheet: routeParams.value.sheet
|
||||
});
|
||||
console.log('res.data', res.data);
|
||||
Object.assign(form.value, routeParams.value);
|
||||
console.log('form', form.value);
|
||||
tableData.value = res.data;
|
||||
console.log('tableData', tableData.value);
|
||||
const res = await getVersionDetails(routeParams.value.id);
|
||||
console.log(res);
|
||||
Object.assign(form.value, res.data);
|
||||
loading.value = false;
|
||||
buttonLoading.value = false;
|
||||
getSheetName();
|
||||
});
|
||||
};
|
||||
|
||||
const sheets = ref([]);
|
||||
//获取表名
|
||||
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 getListTable = async () => {
|
||||
const res = await listBillofquantitiesLimitList({
|
||||
projectId: currentProject.value?.id,
|
||||
versions: form.value.versions,
|
||||
sheet: form.value.sheet
|
||||
});
|
||||
if (res.code == 200) {
|
||||
tableData.value = res.data;
|
||||
}
|
||||
};
|
||||
/** 提交按钮 */
|
||||
const submitForm = (status1: string) => {
|
||||
status.value = status1;
|
||||
@ -198,7 +219,7 @@ const submitFlow = async () => {
|
||||
const handleStartWorkFlow = async (data: any) => {
|
||||
try {
|
||||
submitFormData.value.flowCode = flowCode.value;
|
||||
submitFormData.value.businessId = data.versions + '_xianjiayilan';
|
||||
submitFormData.value.businessId = data.id;
|
||||
//流程变量
|
||||
taskVariables.value = {
|
||||
// leave4/5 使用的流程变量
|
||||
@ -216,7 +237,7 @@ const handleStartWorkFlow = async (data: any) => {
|
||||
};
|
||||
//审批记录
|
||||
const handleApprovalRecord = () => {
|
||||
approvalRecordRef.value.init(form.value.versions);
|
||||
approvalRecordRef.value.init(form.value.id);
|
||||
};
|
||||
//提交回调
|
||||
const submitCallback = async () => {
|
||||
@ -255,7 +276,6 @@ onMounted(() => {
|
||||
reset();
|
||||
loading.value = false;
|
||||
console.log(routeParams.value);
|
||||
|
||||
if (routeParams.value.type === 'update' || routeParams.value.type === 'view' || routeParams.value.type === 'approval') {
|
||||
getInfo();
|
||||
console.log('routeParams.value', routeParams.value);
|
||||
|
Reference in New Issue
Block a user