合同申报功能完善

This commit is contained in:
z9130 2024-10-23 19:11:43 +08:00
parent 9ca397a7c5
commit 2541303ba6
15 changed files with 311 additions and 211 deletions

View File

@ -17,7 +17,6 @@ const routes: RouteRecordRaw[] = [
path: '/contract/config',
component: () => import('#/views/contract/config/index.vue'),
meta: {
keepAlive: true,
hideInMenu: true,
icon: 'lucide:area-chart',
title: '合同配置',
@ -46,7 +45,6 @@ const routes: RouteRecordRaw[] = [
},
component: () => import('#/views/contract/approval/edit/index.vue'),
meta: {
keepAlive: true,
icon: 'lucide:area-chart',
title: '立项申报',
activePath: '/contract/approval/edit/:id?',
@ -57,7 +55,6 @@ const routes: RouteRecordRaw[] = [
path: '/contract/approval/list',
component: () => import('#/views/contract/approval/list/index.vue'),
meta: {
keepAlive: true,
icon: 'lucide:area-chart',
title: '立项编制',
},
@ -67,7 +64,6 @@ const routes: RouteRecordRaw[] = [
path: '/contract/approval/todo',
component: () => import('#/views/contract/approval/todo/index.vue'),
meta: {
keepAlive: true,
icon: 'lucide:area-chart',
title: '立项提示',
},
@ -79,7 +75,6 @@ const routes: RouteRecordRaw[] = [
component: () =>
import('#/views/contract/approval/signing-basis/index.vue'),
meta: {
keepAlive: true,
icon: 'lucide:area-chart',
title: '签约依据维护',
},
@ -102,7 +97,6 @@ const routes: RouteRecordRaw[] = [
meta: {
hideInMenu: true,
hideInTab: true,
keepAlive: true,
icon: 'lucide:area-chart',
title: '选商填报',
activePath: '/contract/business/todo',
@ -115,7 +109,6 @@ const routes: RouteRecordRaw[] = [
meta: {
hideInMenu: true,
hideInTab: true,
keepAlive: true,
icon: 'lucide:area-chart',
title: '选商结果填报',
activePath: '/contract/business/todo',
@ -129,7 +122,6 @@ const routes: RouteRecordRaw[] = [
meta: {
icon: 'lucide:area-chart',
title: '选商编制',
keepAlive: true,
},
},
{
@ -140,7 +132,6 @@ const routes: RouteRecordRaw[] = [
meta: {
icon: 'lucide:area-chart',
title: '选商结果编制',
keepAlive: true,
},
},
{
@ -150,7 +141,6 @@ const routes: RouteRecordRaw[] = [
meta: {
icon: 'lucide:area-chart',
title: '选商提示',
keepAlive: true,
},
},
],
@ -177,7 +167,6 @@ const routes: RouteRecordRaw[] = [
meta: {
hideInMenu: true,
hideInTab: true,
keepAlive: true,
icon: 'lucide:area-chart',
title: '申报填报',
activePath: '/contract/declaration/todo',
@ -190,7 +179,6 @@ const routes: RouteRecordRaw[] = [
meta: {
icon: 'lucide:area-chart',
title: '申报编制',
keepAlive: true,
},
},
{
@ -200,7 +188,6 @@ const routes: RouteRecordRaw[] = [
meta: {
icon: 'lucide:area-chart',
title: '申报提示',
keepAlive: true,
},
},
@ -211,7 +198,6 @@ const routes: RouteRecordRaw[] = [
meta: {
icon: 'lucide:area-chart',
title: '合同打印',
keepAlive: true,
},
},
],
@ -252,7 +238,6 @@ const routes: RouteRecordRaw[] = [
meta: {
icon: 'lucide:area-chart',
title: '合同签订',
keepAlive: true,
},
children: [
{
@ -271,7 +256,6 @@ const routes: RouteRecordRaw[] = [
icon: 'lucide:area-chart',
title: '签订填报',
activePath: '/contract/sign/todo',
keepAlive: true,
},
},
{
@ -281,7 +265,6 @@ const routes: RouteRecordRaw[] = [
meta: {
icon: 'lucide:area-chart',
title: '签订编制',
keepAlive: true,
},
},
{
@ -291,7 +274,6 @@ const routes: RouteRecordRaw[] = [
meta: {
icon: 'lucide:area-chart',
title: '签订提示',
keepAlive: true,
},
},
],
@ -303,7 +285,6 @@ const routes: RouteRecordRaw[] = [
meta: {
icon: 'lucide:area-chart',
title: '合同履行',
keepAlive: true,
},
children: [
{
@ -322,7 +303,6 @@ const routes: RouteRecordRaw[] = [
icon: 'lucide:area-chart',
title: '履行填报',
activePath: '/contract/perform/todo',
keepAlive: true,
},
},
{
@ -332,7 +312,6 @@ const routes: RouteRecordRaw[] = [
meta: {
icon: 'lucide:area-chart',
title: '履行编制',
keepAlive: true,
},
},
{
@ -342,7 +321,6 @@ const routes: RouteRecordRaw[] = [
meta: {
icon: 'lucide:area-chart',
title: '履行提示',
keepAlive: true,
},
},
{
@ -352,7 +330,6 @@ const routes: RouteRecordRaw[] = [
meta: {
icon: 'lucide:area-chart',
title: '履行结果填报',
keepAlive: true,
},
},
{
@ -363,7 +340,6 @@ const routes: RouteRecordRaw[] = [
meta: {
icon: 'lucide:area-chart',
title: '履行结果编制',
keepAlive: true,
},
},
{
@ -374,7 +350,6 @@ const routes: RouteRecordRaw[] = [
meta: {
icon: 'lucide:area-chart',
title: '临时归档',
keepAlive: true,
},
},
],
@ -386,7 +361,6 @@ const routes: RouteRecordRaw[] = [
meta: {
icon: 'lucide:area-chart',
title: '合同归档',
keepAlive: true,
},
children: [
{
@ -397,7 +371,6 @@ const routes: RouteRecordRaw[] = [
meta: {
icon: 'lucide:area-chart',
title: '合同归档',
keepAlive: true,
},
},
{
@ -408,7 +381,6 @@ const routes: RouteRecordRaw[] = [
meta: {
icon: 'lucide:area-chart',
title: '合同回档',
keepAlive: true,
},
},
{
@ -418,7 +390,6 @@ const routes: RouteRecordRaw[] = [
meta: {
icon: 'lucide:area-chart',
title: '归档查询',
keepAlive: true,
},
},
],
@ -430,7 +401,6 @@ const routes: RouteRecordRaw[] = [
meta: {
icon: 'lucide:area-chart',
title: '签约授权管理',
keepAlive: true,
},
children: [
{
@ -448,7 +418,6 @@ const routes: RouteRecordRaw[] = [
icon: 'lucide:area-chart',
title: '签约授权申报',
activePath: '/contract/sign-authorization/edit/:id?',
keepAlive: true,
},
},
{
@ -459,7 +428,6 @@ const routes: RouteRecordRaw[] = [
meta: {
icon: 'lucide:area-chart',
title: '签约授权查询',
keepAlive: true,
},
},
],
@ -471,7 +439,6 @@ const routes: RouteRecordRaw[] = [
meta: {
icon: 'lucide:area-chart',
title: '合同相对人',
keepAlive: true,
},
children: [
{
@ -488,7 +455,6 @@ const routes: RouteRecordRaw[] = [
icon: 'lucide:area-chart',
title: '相对人录入维护',
activePath: '/contract/company/edit/:id?',
keepAlive: true,
},
},
{
@ -498,7 +464,6 @@ const routes: RouteRecordRaw[] = [
meta: {
icon: 'lucide:area-chart',
title: '相对人查询',
keepAlive: true,
},
},
],

View File

@ -76,6 +76,7 @@ export default {
{ label: '选商编制', value: 'smEdit' },
{ label: '选商审批中', value: 'smApproval' },
{ label: '选商结果编制', value: 'smrEdit' },
{ label: '结束', value: 'end' },
]),
contract_business_flow_node: createEntry('合同选商节点流程', [
@ -88,6 +89,7 @@ export default {
{ label: '待主管领导审批', value: 'smManager' },
{ label: '待公司领导审核', value: 'smLeaders' },
{ label: '选商结果填报', value: 'smrEdit' },
{ label: '结束', value: 'end' },
]),
contract_abolish_flow_node: createEntry('合同立项节点流程', [

View File

@ -508,6 +508,7 @@ async function handleAudit(
},
});
message.success('审核通过');
temporaryFormModalApi.close();
back();
} catch (error) {
logger.error('审核通过失败', error);

View File

@ -230,7 +230,7 @@ async function getFormData() {
if (item1.providerId === item2.providerId) {
data1.push({
...item1,
phasePtId: '99999',
phasePtId: '',
offerMoney: item2.offerMoney,
bidScore: item2.bidScore,
bidDesc: item2.bidDesc,
@ -244,7 +244,7 @@ async function getFormData() {
tempBiddingResult.projectId = props.projectId;
const tempBiddingPtInfo = JSON.parse(JSON.stringify(biddingPtInfo.value));
tempBiddingPtInfo.projectId = props.projectId;
tempBiddingPtInfo.phasePtId = '99999';
tempBiddingPtInfo.phasePtId = '';
_fullData3.map((item) => (item.projectId = props.projectId));
const form = {

View File

@ -111,7 +111,7 @@ async function handleSave() {
tempFiles = await fileUploader.upload(tempFileList, { source: 'ht' });
}
if (tempFiles) {
form.biddingResult = (
form.biddingResult.fileUuid = (
tempFiles.map((item) => item.fileUuid) || []
).join(',');
}
@ -279,7 +279,12 @@ onMounted(async () => {
<FileCard file-uuids="" />
</a-collapse-panel>
<a-collapse-panel key="4" class="w-full" header="审批信息">
<a-collapse-panel
v-if="flowInstanceId"
key="4"
class="w-full"
header="审批信息"
>
<AuditNodeTable :flow-instance-id="flowInstanceId" />
</a-collapse-panel>

View File

@ -125,18 +125,18 @@ export function getFormSchema(params: any = {}) {
},
rules: [{ required: true, message: '请选择合同相对人' }],
},
media: {
title: '公告发布方式',
key: 'media',
col: { span: 12 },
component: {
name: 'a-input',
vModel: 'value',
},
},
isPerformDate: {
// media: {
// title: '公告发布方式',
// key: 'media',
// col: { span: 12 },
// component: {
// name: 'a-input',
// vModel: 'value',
// },
// },
performType: {
title: '履行期限',
key: 'isPerformDate',
key: 'performType',
col: { span: 24 },
component: {
name: 'a-input',
@ -156,11 +156,11 @@ export function getFormSchema(params: any = {}) {
<a-form-item class="!mb-0 inline-block">
<a-radio-group
options={options1}
v-model:value={form.isPerformDate}
v-model:value={form.performType}
/>
</a-form-item>
<div class="w-2"></div>
{form.isPerformDate === '0' && (
{form.performType === '0' && (
<div class="flex items-center">
<span class="mx-1"></span>
<a-form-item class="!mb-0 inline-block">
@ -216,9 +216,9 @@ export function getFormSchema(params: any = {}) {
vModel: 'value',
},
},
projectNum9: {
disputeMethod: {
title: '纠纷解决方式',
key: 'projectNum9',
key: 'disputeMethod',
col: { span: 16 },
component: {
name: 'fs-dict-radio',

View File

@ -12,6 +12,7 @@ import {
type UploadFile,
} from 'ant-design-vue';
import { logger } from 'common-utils';
import { merge } from 'lodash-es';
import Apis from '#/api';
import temporaryFormModal from '#/components/temporary-form-modal/temporary-form-modal.vue';
@ -67,19 +68,11 @@ const formBindingByBaseInfo = ref({
const formBinding = ref<any>(null);
function getColumns(): any {
return [
{ type: 'seq', title: '序号', width: 60 },
{ field: 'referenceName', title: '签约依据名称', minWidth: 150 },
{ field: 'referenceId', title: '签约依据编号', width: 200 },
{ field: 'attachments', title: '附件', width: 120 },
{
title: '操作',
width: 120,
slots: { default: 'operation' },
},
];
}
const contractData = ref<any>({});
const currData = ref({});
const sqConsignPt = ref<any>({});
const fileList = ref<UploadFile[]>([]);
@ -176,34 +169,34 @@ async function handleSave() {
const form = formRef.value.form;
//
// {
// const tempFileList = contractForm.fileList;
// let tempFiles: any = [];
// if (fileList.value && tempFileList.length > 0) {
// tempFiles = await fileUploader.upload(tempFileList, { source: 'ht' });
// }
// console.log(tempFiles);
// if (tempFiles) {
// contractForm.fileUuid = (
// tempFiles.map((item) => item.fileUuid) || []
// ).join(',');
// }
// }
//
{
const tempFileList = fileList.value;
let tempFiles: any = [];
if (tempFileList && tempFileList.length > 0) {
tempFiles = await fileUploader.upload(tempFileList, { source: 'ht' });
}
console.log(tempFiles);
if (tempFiles) {
form.fileUuid = (tempFiles.map((item) => item.fileUuid) || []).join(
',',
);
}
}
//
// {
// const tempFileList = fileList.value;
// let tempFiles: any = [];
// if (fileList.value && tempFileList.length > 0) {
// tempFiles = await fileUploader.upload(tempFileList, { source: 'ht' });
// }
// if (tempFiles) {
// bussinessForm.fileUuid = (
// tempFiles.map((item) => item.fileUuid) || []
// ).join(',');
// }
// }
//
{
const tempFileList = fileListByProfile.value;
let tempFiles: any = [];
if (tempFileList && tempFileList.length > 0) {
tempFiles = await fileUploader.upload(tempFileList, { source: 'ht' });
}
if (tempFiles) {
form.fileUuid2 = (tempFiles.map((item) => item.fileUuid) || []).join(
',',
);
}
}
console.log('提交表单', form);
@ -220,11 +213,24 @@ async function handleSave() {
// newForm.fileUuid = (files.map((item) => item.fileUuid) || []).join(',')
// }
form.ctrBaseId = form.contractId;
form.ctrName = form.contractName;
delete form.guid;
const data = await Apis.sbCtrBasePt.post_save({ data: form });
form.ctrBaseId = contractData.value.contractId;
form.ctrName = contractData.value.contractName;
// delete form.guid;
const guid = form.guid;
const data = await Apis.sbCtrBasePt.post_save({
data: {
...merge(form, contractData.value),
guid,
inputDeptId: contractData.value.inputDepartId,
inputDeptName: contractData.value.inputDepartName,
inputDepartUserId: contractData.value.inputUserId,
inputOpinion: contractData.value.inputOpinion,
inputPerson: contractData.value.inputPerson,
inputUnitId: contractData.value.inputUnitId,
inputUnitName: contractData.value.inputUnitName,
inputUserId: contractData.value.inputUserId,
},
});
id.value = data.value;
message.success('保存成功');
Modal.confirm({
@ -258,7 +264,7 @@ async function handleSubmit(type: 'openModal' | 'submit') {
try {
await Apis.sbCtrBasePt.post_start({
data: {
guid: sbCtrBasePt.value.guid,
guid: sbCtrBasePt.value.guid || id.value,
assigneeList: selectUsers.value.map((item) => item.ACCOUNT_ID),
},
});
@ -365,12 +371,6 @@ async function handleAudit(
}
}
const contractData = ref<any>({});
const currData = ref({});
const sqConsignPt = ref<any>({});
onMounted(async () => {
isLoading.value = true;
try {
@ -409,19 +409,22 @@ onMounted(async () => {
});
//
let contract: any = await Apis.contractBaseInfo.get_page({
const contract: any = await Apis.contractBaseInfo.get_getOne({
params: { contractId: id.value },
});
contract = contract.rows[0];
// contract = contract.rows[0];
if (contract && contract.contractId) {
contractData.value = contract;
//
let sbCtrBasePtData: any = await Apis.sbCtrBasePt.post_page({
// params: { ctrBaseId: contract.contractId },
params: { ctrBaseId: '123456' },
params: { CTRBASEID: id.value },
// params: { ctrBaseId: '123456' },
});
sbCtrBasePtData.signUnitName = '克拉玛依市热力有限责任公司';
if (sbCtrBasePtData.rows.length > 0) {
sbCtrBasePtData = sbCtrBasePtData.rows[0];
console.log(sbCtrBasePtData);
@ -429,11 +432,25 @@ onMounted(async () => {
const files = await fileUploader.select(sbCtrBasePtData.fileUuid);
sbCtrBasePtData.fileList = files;
}
sbCtrBasePtData.signUnitName = '克拉玛依市热力有限责任公司';
sbCtrBasePt.value = sbCtrBasePtData;
// -
if (sbCtrBasePtData.fileUuid) {
fileList.value = await fileUploader.select(
sbCtrBasePtData.fileUuid,
);
}
if (sbCtrBasePtData.fileUuid2) {
fileListByProfile.value = await fileUploader.select(
sbCtrBasePtData.fileUuid2,
);
}
nextTick(() => {
formRef.value.setFormData(sbCtrBasePtData);
});
}
} else {
throw new Error('当前合同信息不存在');
}

View File

@ -1,42 +1,54 @@
import type { VxeGridPropTypes } from 'vxe-table';
import { useRender } from '#/hooks/useRender';
import dayjs from 'dayjs';
import { DICT_TYPE, getDictOptions } from '#/utils/dict';
import { dict } from '@fast-crud/fast-crud';
export const PrimaryKey = 'guid';
import { useRender } from '#/hooks/useRender';
import { DICT_TYPE, getDictOptions } from '#/utils/dict';
export const PrimaryKey = 'GUID';
export function getColumns(params: any = {}): VxeGridPropTypes.Columns {
return [
{ type: 'radio', width: 40, slots: { radio: 'radio_cell' }, align: 'center', fixed: 'left' },
{ field: 'ctrBaseId', title: '合同申报编号', width: 150 },
{ field: 'contractNumber', title: '合同编号', width: 100 },
{
field: 'ctrName', title: '合同名称', minWidth: 200, slots: {
default: 'contract-name-slot'
}
type: 'radio',
width: 40,
slots: { radio: 'radio_cell' },
align: 'center',
fixed: 'left',
},
{ field: 'objects', title: '合同标的', width: 150 },
{ field: 'CTR_BASE_ID', title: '合同申报编号', width: 150 },
{ field: 'CONTRACT_NUMBER', title: '合同编号', width: 100 },
{
field: 'objectsSum', title: '标的金额', width: 150, slots: {
field: 'CTR_NAME',
title: '合同名称',
minWidth: 200,
slots: {
default: 'contract-name-slot',
},
},
{ field: 'OBJECTS', title: '合同标的', width: 150 },
{
field: 'OBJECTS_SUM',
title: '标的金额',
width: 150,
slots: {
default: ({ row }) => {
return useRender.renderText(row.objectsSum, row.priceTypeName);
}
}
return useRender.renderText(row.OBJECTS_SUM, row.PRICE_TYPE_NAME);
},
{ field: 'inputPerson', title: '合同承办人', width: 120 },
{ field: 'providerName', title: '合同相对人名称', width: 150 },
{ field: 'contractSourceType', title: '合同来源', width: 100 },
{ field: 'choiceTypeName', title: '采购方式', width: 120 },
{ field: 'inputDeptName', title: '承办人部门', width: 120 },
{ field: 'inputDate', title: '承办时间', width: 150 }
]
},
},
{ field: 'INPUT_PERSON', title: '合同承办人', width: 120 },
{ field: 'PROVIDER_NAME', title: '合同相对人名称', width: 150 },
{ field: 'CONTRACT_SOURCE_TYPE', title: '合同来源', width: 100 },
{ field: 'CHOICE_TYPE_NAME', title: '采购方式', width: 120 },
{ field: 'INPUT_DEPT_NAME', title: '承办人部门', width: 120 },
{ field: 'INPUT_DATE', title: '承办时间', width: 150 },
];
}
export function getFormSchema(_params: any = {}) {
return {
initialForm: {
},
initialForm: {},
columns: {
ctrBaseId: {
title: '合同编号',
@ -82,29 +94,37 @@ export function getFormSchema(_params: any = {}) {
// 注意此处的v-model写法
return (
<div class="flex">
<a-form-item class="inline-block !mb-0">
<a-input-number v-model:value={form.budgetSum1} class="!w-[120px]" placeholder=""/>
<a-form-item class="!mb-0 inline-block">
<a-input-number
class="!w-[120px]"
placeholder=""
v-model:value={form.budgetSum1}
/>
</a-form-item>
<span class="mx-1"></span>
<a-form-item class="inline-block !mb-0">
<a-input-number v-model:value={form.budgetSum2} class="!w-[120px]" placeholder=""/>
<a-form-item class="!mb-0 inline-block">
<a-input-number
class="!w-[120px]"
placeholder=""
v-model:value={form.budgetSum2}
/>
</a-form-item>
</div>
);
}
},
},
choiceType: {
title: "选商方式",
key: "choiceType",
title: '选商方式',
key: 'choiceType',
autoSearchTrigger: 'enter',
show: true,
component: {
name: "fs-dict-select",
vModel: "value",
name: 'fs-dict-select',
vModel: 'value',
allowClear: true,
class: 'min-w-[200px]',
dict: dict({
data: getDictOptions(DICT_TYPE.contract_selection_method)
data: getDictOptions(DICT_TYPE.contract_selection_method),
}),
},
},
@ -117,29 +137,39 @@ export function getFormSchema(_params: any = {}) {
// 注意此处的v-model写法
return (
<div class="flex">
<a-form-item class="inline-block !mb-0">
<a-date-picker v-model:value={form.startDate} placeholder="" format="YYYY-MM-DD" value-format="YYYY-MM-DD" />
<a-form-item class="!mb-0 inline-block">
<a-date-picker
format="YYYY-MM-DD"
placeholder=""
v-model:value={form.startDate}
value-format="YYYY-MM-DD"
/>
</a-form-item>
<span class="mx-1"></span>
<a-form-item class="inline-block !mb-0">
<a-date-picker v-model:value={form.endDate} placeholder="" format="YYYY-MM-DD" value-format="YYYY-MM-DD" />
<a-form-item class="!mb-0 inline-block">
<a-date-picker
format="YYYY-MM-DD"
placeholder=""
v-model:value={form.endDate}
value-format="YYYY-MM-DD"
/>
</a-form-item>
</div>
);
}
},
},
fundDitch: {
title: "资金渠道",
key: "fundDitch",
title: '资金渠道',
key: 'fundDitch',
autoSearchTrigger: 'enter',
show: true,
component: {
name: "fs-dict-select",
vModel: "value",
name: 'fs-dict-select',
vModel: 'value',
allowClear: true,
class: 'min-w-[200px]',
dict: dict({
data: getDictOptions(DICT_TYPE.contract_funding_source)
data: getDictOptions(DICT_TYPE.contract_funding_source),
}),
},
},

View File

@ -1,22 +1,27 @@
<script setup lang="ts">
import { computed, onMounted, reactive, ref } from "vue";
import { useRouter } from "vue-router";
import { computed, onMounted, reactive, ref } from 'vue';
import { useRouter } from 'vue-router';
import { Page } from "@vben/common-ui";
import { MdiExport, MdiRadioChecked, MdiRadioUnchecked, MdiUpdate } from "@vben/icons";
import { Page } from '@vben/common-ui';
import {
MdiExport,
MdiRadioChecked,
MdiRadioUnchecked,
MdiUpdate,
} from '@vben/icons';
import { message } from "ant-design-vue";
import { message } from 'ant-design-vue';
import Apis from "#/api";
import { useVxeTable } from "#/hooks/vxeTable";
import Apis from '#/api';
import { useVxeTable } from '#/hooks/vxeTable';
import { getColumns, getFormSchema, PrimaryKey } from "./crud.tsx";
import { getColumns, getFormSchema, PrimaryKey } from './crud.tsx';
const router = useRouter();
const searchRef = ref();
const { xGridRef, triggerProxy, gridProps } = useVxeTable({ ref: "xGridRef" });
const { xGridRef, triggerProxy, gridProps } = useVxeTable({ ref: 'xGridRef' });
/** Hooks - 表格 */
const gridOptions = reactive(
@ -42,14 +47,14 @@ const gridOptions = reactive(
toolbarConfig: {
enabled: true,
},
})
}),
);
function handleEdit(record?: any) {
if (record && record[PrimaryKey]) {
router.push(`/contract/declaration/edit/${record.ctrBaseId}`);
router.push(`/contract/declaration/edit/${record.CONTRACT_ID}`);
} else {
router.push("/contract/declaration/edit");
router.push('/contract/declaration/edit');
}
}
@ -57,9 +62,9 @@ function handleExport() {
const $grid = xGridRef.value;
if ($grid) {
$grid.exportData({
type: "xlsx",
type: 'xlsx',
});
message.success("导出成功");
message.success('导出成功');
}
}
@ -83,13 +88,13 @@ function handleCellClick({ row }) {
}
onMounted(() => {
triggerProxy("reload");
triggerProxy('reload');
});
const searchForm = ref({
...getFormSchema(),
onSearch(context: any) {
triggerProxy("reload");
triggerProxy('reload');
},
});
</script>
@ -120,7 +125,11 @@ const searchForm = ref({
</fs-search>
<div class="min-h-300px flex-1">
<vxe-grid ref="xGridRef" v-bind="gridOptions" @cell-click="handleCellClick">
<vxe-grid
ref="xGridRef"
v-bind="gridOptions"
@cell-click="handleCellClick"
>
<template #toolbar_buttons>
<a-space>
<vben-button
@ -146,8 +155,11 @@ const searchForm = ref({
</template>
<template #contract-name-slot="{ row }">
<span class="text-blue cursor-pointer hover:underline" @click="toDetail(row)">
{{ row.ctrName }}
<span
class="text-blue cursor-pointer hover:underline"
@click="toDetail(row)"
>
{{ row.CTR_NAME }}
</span>
</template>

View File

@ -99,12 +99,49 @@ function toDetail(row) {
async function handlePrint(row, type: string) {
const hideLoading = message.loading('加载中', 0);
console.log(row);
try {
const form: any = {};
if (type === 'xs') {
await Apis.qdSign.get_printApprove({
params: form,
params: {
modelId: '1',
caseId: row.ctrBaseId,
},
config: {
meta: {
responseType: 'blob',
},
},
});
}
if (type === 'qy') {
await Apis.qdSign.get_printApprove({
params: {
modelId: '2',
caseId: row.ctrBaseId,
},
config: {
meta: {
responseType: 'blob',
},
},
});
}
if (type === 'wb') {
await Apis.qdSign.get_textPrint({
params: {
ctrBaseId: row.ctrBaseId,
},
config: {
meta: {
responseType: 'blob',
},
},
});
}
message.success('文件已下载');
} catch (error) {
message.error('文件下载失败');
logger.error('打印失败', error);
} finally {
hideLoading();

View File

@ -1,15 +1,35 @@
<script setup lang="ts">
import { watch } from 'vue';
import { DICT_TYPE, getDictObj } from '#/utils/dict';
import FileCard from '#/views/contract/components/file-card/file-card.vue';
withDefaults(
// 使 withDefaults defineProps props
const props = withDefaults(
defineProps<{
info: any;
}>(),
{
info: () => {},
info: () => ({}), //
},
);
// info
watch(
() => props.info,
async (newInfo) => {
if (newInfo && Object.keys(newInfo).length > 0) {
// // ,
// console.log('info ...');
// // info
// const updatedData = await fetchData();
// // info
// Object.assign(props.info, updatedData);
// console.log('info :', props.info);
}
},
{ immediate: true }, // immediate: true
);
</script>
<template>
@ -23,10 +43,10 @@ withDefaults(
{{ info.contractName }}
</a-descriptions-item>
<a-descriptions-item :span="1" label="合同类别">
{{ info.contractName }}
{{ info.ctrTypeName }}
</a-descriptions-item>
<a-descriptions-item :span="1" label="二级类别">
{{ info.contractName }}
{{ info.ctrTwoTypeName }}
</a-descriptions-item>
<a-descriptions-item :span="1" label="框架协议">
{{ getDictObj(DICT_TYPE.common_whether, info.frameProtocol)?.label }}

View File

@ -5,7 +5,6 @@ import { message } from 'ant-design-vue';
import { logger } from 'common-utils';
import Apis from '#/api';
import { useVxeTable } from '#/hooks/vxeTable';
import AuditNodeTable from '#/views/contract/components/audit-node-table/audit-node-table.vue';
import BasisTable from '#/views/contract/components/basis-table/basis-table.vue';
import ApprovalCard from '#/views/contract/iframe-info/components/info-approval/approval-card.vue';
@ -24,11 +23,6 @@ const props = withDefaults(
},
);
const { xGridRef, gridProps } = useVxeTable({ ref: 'xGridRef' });
const { xGridRef: xGridRefByAuditInfo } = useVxeTable({
ref: 'xGridRefByAuditInfo',
});
const currData = ref<any>({});
const isLoading = ref(false);
@ -72,8 +66,13 @@ onMounted(async () => {
<BasisTable :basis-id="currData.basisId" />
</a-collapse-panel>
<a-collapse-panel key="3" class="w-full" header="审批信息">
<AuditNodeTable :flow-instance-id="props.flowInstanceId" />
<a-collapse-panel
v-if="currData.flowInstanceId"
key="3"
class="w-full"
header="审批信息"
>
<AuditNodeTable :flow-instance-id="currData.flowInstanceId" />
</a-collapse-panel>
</a-collapse>
</div>

View File

@ -100,7 +100,12 @@ onMounted(async () => {
<FileCard file-uuids="" />
</a-collapse-panel>
<a-collapse-panel key="4" class="w-full" header="审批信息">
<a-collapse-panel
v-if="props.flowInstanceId"
key="4"
class="w-full"
header="审批信息"
>
<AuditNodeTable :flow-instance-id="props.flowInstanceId" />
</a-collapse-panel>
</a-collapse>

View File

@ -4,9 +4,6 @@ import { h } from 'vue';
import { Tooltip } from 'ant-design-vue';
import { DICT_TYPE, getDictObj } from '#/utils/dict';
import { useRender } from '#/hooks/useRender';
export const PrimaryKey = 'guid';
/** 获取待办/已办列表的列 */
@ -104,7 +101,12 @@ export function getAuditInfoColumns(
title: '任务名称',
minWidth: 200,
},
{ field: 'assigneeId', title: '审批人', width: 150 },
{
field: 'assigneeId',
title: '审批人',
width: 150,
slots: { default: ({ row }) => row.userName || row.assigneeId },
},
{ field: 'startTime', title: '送审时间', width: 150 },
{ field: 'endTime', title: '审批时间', width: 150 },
{ field: 'type', title: '审批状态', width: 100 },

View File

@ -372,11 +372,16 @@ onMounted(async () => {
>
保存
</vben-button>
<vben-button
v-if="!id || currData.step === 'edit' || !currData.taskId"
variant="primary"
@click="handleSubmit('openModal')"
>
<vben-button variant="primary" @click="handleSubmit('openModal')">
提交
</vben-button>
<vben-button variant="primary" @click="handleSubmit('openModal')">
签约审批表打印
</vben-button>
<vben-button variant="primary" @click="handleSubmit('openModal')">
合同文本打印
</vben-button>
<vben-button variant="primary" @click="handleSubmit('openModal')">
提交
</vben-button>
<vben-button