合同待办已办功能调整

This commit is contained in:
z9130 2024-10-10 17:24:57 +08:00
parent 4a5c4e0e5c
commit dc87bbca61
16 changed files with 972 additions and 1026 deletions

View File

@ -1,4 +1,4 @@
```shell ```shell
generate-api --swagger_url=http://127.0.0.1:4523/export/openapi/2?version=3.0 --template ./resource/apiDefinitions.ejs --output_dir ./resource --type path --prefix_to_filter / generate-api --swagger_url="http://127.0.0.1:4523/export/openapi?projectId=4582192&specialPurpose=openapi-generator" --template ./resource/apiDefinitions.ejs --output_dir ./resource --type path --prefix_to_filter /
``` ```

View File

@ -92,12 +92,6 @@ const routes: RouteRecordRaw[] = [
{ {
name: 'ContractBusinessEdit', name: 'ContractBusinessEdit',
path: '/contract/business/edit/:id?', path: '/contract/business/edit/:id?',
beforeEnter: (e) => {
if (e.params.id && e.params.id === ':id') {
e.params.id = '';
e.fullPath = '/contract/business/edit';
}
},
component: () => import('#/views/contract/business/edit/index.vue'), component: () => import('#/views/contract/business/edit/index.vue'),
meta: { meta: {
hideInMenu: true, hideInMenu: true,

View File

@ -99,11 +99,7 @@ export default {
// 合同待办类型 // 合同待办类型
contract_todo_type: createEntry('合同待办类型', [ contract_todo_type: createEntry('合同待办类型', [
{ label: '合同立项', value: 'contractSetup' }, { label: '合同立项', value: 'contractSetup' },
{ label: '合同立项废除', value: 'contractSetupAbolish' },
{ label: '合同选商', value: 'selectMerchant' }, { label: '合同选商', value: 'selectMerchant' },
{ label: '合同选商废除', value: 'selectMerchantAbolish' },
{ label: '合同选商结果', value: 'selectMerchantResult' },
{ label: '合同选商结果废除', value: 'selectMerchantResultAbolish' },
{ label: '合同申报', value: 'contractDeclare' }, { label: '合同申报', value: 'contractDeclare' },
{ label: '合同签订', value: 'contractSign' }, { label: '合同签订', value: 'contractSign' },
{ label: '合同履行', value: 'contractPerform' }, { label: '合同履行', value: 'contractPerform' },

View File

@ -2,6 +2,12 @@ import type { VxeGridPropTypes } from 'vxe-table';
export function getBidColumns(_params?: any): VxeGridPropTypes.Columns { export function getBidColumns(_params?: any): VxeGridPropTypes.Columns {
const columns: VxeGridPropTypes.Columns = [ const columns: VxeGridPropTypes.Columns = [
{
field: 'operate',
title: '操作',
width: 120,
slots: { default: 'operate-slot' },
},
{ {
type: 'seq', type: 'seq',
width: 50, width: 50,
@ -29,13 +35,6 @@ export function getBidColumns(_params?: any): VxeGridPropTypes.Columns {
minWidth: 300, minWidth: 300,
slots: { default: 'phasedesc-slot' }, slots: { default: 'phasedesc-slot' },
}, },
{
field: 'operate',
title: '操作',
width: 120,
slots: { default: 'operate-slot' },
fixed: 'right',
},
]; ];
return columns; return columns;
@ -43,31 +42,42 @@ export function getBidColumns(_params?: any): VxeGridPropTypes.Columns {
export function getProviderColumns(_params?: any): VxeGridPropTypes.Columns { export function getProviderColumns(_params?: any): VxeGridPropTypes.Columns {
const columns: VxeGridPropTypes.Columns = [ const columns: VxeGridPropTypes.Columns = [
{
field: 'operate',
title: '操作',
width: 120,
slots: { default: 'operate-slot' },
},
{ {
field: 'providerName', field: 'providerName',
title: '供应商名称', title: '供应商名称',
width: 200, width: 250,
}, },
{ {
field: 'qualification', field: 'qualification',
title: '资质情况', title: '资质情况',
width: 200, width: 200,
slots: { default: 'qualification-slot' },
}, },
{ {
field: 'contactPerson', field: 'contactPerson',
title: '联系人', title: '联系人',
width: 150, width: 150,
slots: { default: 'contactPerson-slot' },
}, },
{ {
field: 'contactPhone', field: 'contactPhone',
title: '联系电话', title: '联系电话',
width: 150, width: 150,
slots: { default: 'contactPhone-slot' },
}, },
{ {
field: 'remarks', field: 'remarks',
title: '备注', title: '备注',
minWidth: 200, minWidth: 200,
slots: { default: 'remarks-slot' },
}, },
]; ];
return columns; return columns;

View File

@ -14,13 +14,36 @@ const [ChooseCompanyModal, chooseCompanyModalApi] = useVbenModal({
connectedComponent: chooseCompanyModal, connectedComponent: chooseCompanyModal,
}); });
export function getFormSchema(params: any = {}) { const xGridRefs = ref<Map<string, any>>(new Map());
const { formRef, dictMap = {} } = params;
const xGridRef = ref(); const gridRefs = ref<Map<string, any>>(new Map());
export function getExtraData() {
// let tempBiddingList = xGridRef.value.getTableData().fullData;
// console.log(gridRefs.value);
for (const [key, value] of xGridRefs.value) {
console.log(`Key: ${key}, Value: ${value}`);
let xRef = value;
console.log(xRef.getTableData().fullData);
}
for (const [key, value] of gridRefs.value) {
console.log(`Key: ${key}, Value: ${value}`);
let xRef = value;
console.log(xRef.getTableData().fullData);
}
return {
biddingList: [],
};
}
export function getFormSchema(params: any = {}) {
let { formRef, dictMap = {}, bidList = [] } = params;
/** Hooks - 表格 */ /** Hooks - 表格 */
const gridOptions = { const gridOptions = {
showOverflow: true,
columns: getBidColumns({ readOnly: false }), columns: getBidColumns({ readOnly: false }),
data: [], data: [],
toolbarConfig: { toolbarConfig: {
@ -55,15 +78,13 @@ export function getFormSchema(params: any = {}) {
}, },
}; };
const gridRefs = ref<Map<string, any>>(new Map());
return { return {
col: { span: 24 }, col: { span: 24 },
initialForm: { initialForm: {
contractName: '', contractName: '',
priceType: 'CNY', priceType: 'CNY',
isBid: '0', isBid: '0',
budgetSum2: 0, bidNum: 2,
}, },
labelCol: { style: { width: '120px' } }, labelCol: { style: { width: '120px' } },
columns: { columns: {
@ -209,29 +230,30 @@ export function getFormSchema(params: any = {}) {
class="min-w-[180px]" class="min-w-[180px]"
onChange={(value) => { onChange={(value) => {
// 获取当前表格的全部数据 // 获取当前表格的全部数据
const { fullData } = xGridRef.value.getTableData(); let fullData = bidList;
const currentLength = fullData.length; const currentLength = fullData.length;
if (value < currentLength) { if (value < currentLength) {
// 删除多余的行(从 value 开始的行) // 删除多余的行(从 value 开始的行)
const rowsToRemove = fullData.slice(value); fullData = fullData.slice(0, value);
xGridRef.value.remove(rowsToRemove);
} else if (value > currentLength) { } else if (value > currentLength) {
// 插入新的行数据 // 插入新的行数据
const rowsToAdd = Array.from({ const rowsToAdd = Array.from({
length: value - currentLength, length: value - currentLength,
}).map((_, i) => ({ }).map((_, i) => ({
id: currentLength + i + 1, phaseSeq: currentLength + i + 1,
bidName: `${currentLength + i + 1}标段`, phaseName: `${currentLength + i + 1}标段`,
phaseMoney: null,
phaseDesc: '',
providerList: [], providerList: [],
})); }));
xGridRef.value.insertAt(rowsToAdd, -1); fullData = [...fullData, ...rowsToAdd];
} }
xGridRef.value.setAllRowExpand(true); bidList = fullData;
}} }}
options={options2} options={options2}
v-model:value={form.budgetSum2} v-model:value={form.bidNum}
/> />
</div> </div>
</a-form-item-rest> </a-form-item-rest>
@ -242,16 +264,17 @@ export function getFormSchema(params: any = {}) {
class="mt-2" class="mt-2"
style={{ style={{
display: display:
form.isBid === '1' && form.budgetSum2 > 0 form.isBid === '1' && form.bidNum > 0 ? 'block' : 'none',
? 'block'
: 'none',
}} }}
> >
<a-form-item-rest> <a-form-item-rest>
<VxeGrid ref={xGridRef} {...gridOptions}> <VxeGrid
ref={(el) => el && xGridRefs.value.set(row.id, el)}
{...gridOptions}
>
{{ {{
'bidname-slot': ({ row }: any) => ( 'bidname-slot': ({ row }: any) => (
<a-input v-model:value={row.bidName} /> <a-input v-model:value={row.phaseName} />
), ),
'phasemoney-slot': ({ row }: any) => ( 'phasemoney-slot': ({ row }: any) => (
<a-input-number <a-input-number
@ -267,7 +290,35 @@ export function getFormSchema(params: any = {}) {
data={row.providerList} data={row.providerList}
ref={(el) => el && gridRefs.value.set(row.id, el)} ref={(el) => el && gridRefs.value.set(row.id, el)}
{...gridOptionsByProvider} {...gridOptionsByProvider}
/> >
{{
'qualification-slot': ({ row }: any) => (
<a-input v-model:value={row.aptitudeName} />
),
'contactPerson-slot': ({ row }: any) => (
<a-input v-model:value={row.contactPerson} />
),
'contactPhone-slot': ({ row }: any) => (
<a-input v-model:value={row.ContactPhone} />
),
'remarks-slot': ({ row }: any) => (
<a-textarea v-model:value={row.remarks} />
),
'operate-slot': ({ row }: any) => (
<a-button
type="text"
size="small"
class="text-red-500"
onClick={() => {
const xGridRef = gridRefs.value.get(id);
xGridRef && xGridRef.remove(row);
}}
>
</a-button>
),
}}
</VxeGrid>
), ),
'operate-slot': ({ row }: any) => ( 'operate-slot': ({ row }: any) => (
<a-button <a-button

View File

@ -23,7 +23,7 @@ import chooseUserModal from '#/views/system/user/choose-user-modal.vue';
import { getColumns } from '../../approval/signing-basis/columns'; import { getColumns } from '../../approval/signing-basis/columns';
import { getFormSchema as getFormSchemaByBaseInfo } from './basic-info-curd'; import { getFormSchema as getFormSchemaByBaseInfo } from './basic-info-curd';
import { getFormSchema } from './curd'; import { getFormSchema, getExtraData } from './curd';
const [ChooseUserModal, chooseUserModalApi] = useVbenModal({ const [ChooseUserModal, chooseUserModalApi] = useVbenModal({
connectedComponent: chooseUserModal, connectedComponent: chooseUserModal,
@ -59,7 +59,7 @@ const formBindingByBaseInfo = ref({
columns: {}, columns: {},
}); });
const formBinding = ref(null); const formBinding = ref<any>(null);
/** Hooks - 表格 */ /** Hooks - 表格 */
const gridOptions = reactive( const gridOptions = reactive(
@ -118,7 +118,8 @@ function handleDelete() {
}); });
} }
const collapses = ['1', '2', '3', '4']; // const collapses = ['1', '2', '3', '4'];
const collapses = ['3', '4'];
const collapseActiveKey = ref(collapses); const collapseActiveKey = ref(collapses);
function areArraysEqualUnordered(arr1, arr2) { function areArraysEqualUnordered(arr1, arr2) {
if (arr1.length !== arr2.length) return false; if (arr1.length !== arr2.length) return false;
@ -154,24 +155,23 @@ async function handleAudit(
title: '提示', title: '提示',
content: '是否确认审核通过?', content: '是否确认审核通过?',
onOk: async () => { onOk: async () => {
try { const [error, _] = await Apis.selectMerchantsBasicInfo.post_submit({
await Apis.selectMerchantsBasicInfo.post_submit({ params: {
params: { guid: selectMerchantsBasicInfoId.value,
guid: selectMerchantsBasicInfoId.value, },
}, data: {
data: { appId: id.value,
appId: id.value, taskId: currData.value.taskId,
taskId: currData.value.taskId, nodeId: '',
nodeId: '', comment: '通过',
comment: '通过', },
}, });
}); if (error) {
message.success('审核通过');
back();
} catch (error) {
logger.error('审核通过失败', error); logger.error('审核通过失败', error);
message.error('审核通过失败,请稍候再试'); message.error('审核通过失败,请稍候再试');
return;
} }
message.success('审核通过');
}, },
}); });
} }
@ -231,6 +231,12 @@ async function handleAudit(
} }
async function handleSave() { async function handleSave() {
console.log(formRefByBaseInfo.value.form);
console.log(formRef.value.form);
console.log(getExtraData());
return;
isLoading.value = true; isLoading.value = true;
try { try {
@ -416,13 +422,14 @@ const contractData = ref<any>({});
const businessData = ref<any>({}); const businessData = ref<any>({});
const auditId = ref(); const auditId = ref();
const dictMap = ref({});
onMounted(async () => { onMounted(async () => {
isLoading.value = true; isLoading.value = true;
try { try {
if (id.value) { if (id.value) {
const dictMap = await getDictDatasAsync([ dictMap.value = await getDictDatasAsync([
DICT_TYPE.contract_authorization_period, DICT_TYPE.contract_authorization_period,
DICT_TYPE.comprehensive_project_name, DICT_TYPE.comprehensive_project_name,
DICT_TYPE.contract_price_style, DICT_TYPE.contract_price_style,
@ -432,13 +439,12 @@ onMounted(async () => {
DICT_TYPE.section_num, DICT_TYPE.section_num,
DICT_TYPE.contract_price_style, DICT_TYPE.contract_price_style,
]); ]);
console.log(dictMap);
const contractReferTypeData: any = await Apis.contractReferType.get_list({ const contractReferTypeData: any = await Apis.contractReferType.get_list({
params: {}, params: {},
}); });
contractTypeData.value = contractReferTypeData.rows || []; contractTypeData.value = contractReferTypeData.rows || [];
formBinding.value = getFormSchema({ formRef, dictMap }); formBinding.value = getFormSchema({ formRef, dictMap: dictMap.value });
formBindingByBaseInfo.value.columns = getFormSchemaByBaseInfo({ formBindingByBaseInfo.value.columns = getFormSchemaByBaseInfo({
contractTypeData: contractTypeData.value, contractTypeData: contractTypeData.value,
@ -470,6 +476,9 @@ onMounted(async () => {
const files = await fileUploader.select(business.fileUuid); const files = await fileUploader.select(business.fileUuid);
business.fileList = files; business.fileList = files;
} }
business.isBid = '1';
business.bidNum = 2;
businessData.value = business; businessData.value = business;
nextTick(() => { nextTick(() => {
@ -560,7 +569,12 @@ onMounted(async () => {
<a-spin :spinning="isLoading"> <a-spin :spinning="isLoading">
<div class="mx-auto overflow-auto py-2"> <div class="mx-auto overflow-auto py-2">
<a-collapse v-model:active-key="collapseActiveKey" :bordered="false"> <a-collapse v-model:active-key="collapseActiveKey" :bordered="false">
<a-collapse-panel key="1" class="w-full" header="基本信息"> <a-collapse-panel
key="1"
class="w-full"
forceRender
header="基本信息"
>
<fs-form <fs-form
ref="formRefByBaseInfo" ref="formRefByBaseInfo"
class="w-full" class="w-full"
@ -584,17 +598,49 @@ onMounted(async () => {
</fs-form> </fs-form>
</a-collapse-panel> </a-collapse-panel>
<a-collapse-panel key="2" class="w-full" header="签约依据"> <a-collapse-panel
key="2"
class="w-full"
forceRender
header="签约依据"
>
<VxeGrid ref="xGridRef" v-bind="gridOptions" class=""> <VxeGrid ref="xGridRef" v-bind="gridOptions" class="">
<template #toolbar_buttons></template> <template #toolbar_buttons></template>
</VxeGrid> </VxeGrid>
</a-collapse-panel> </a-collapse-panel>
<a-collapse-panel key="3" class="w-full" header="选商资料"> <a-collapse-panel
<fs-form ref="formRef" class="w-full" v-bind="formBinding" /> key="3"
class="w-full"
forceRender
header="选商资料"
>
<fs-form ref="formRef" class="w-full" v-bind="formBinding">
<template #form_isBid="{ form }">
<div class="flex flex-col">
<div class="flex items-center">
<a-form-item class="!mb-0 inline-block">
<a-radio-group
:options="dictMap[DICT_TYPE.section_type]"
v-model:value="form.isBid"
/>
</a-form-item>
<div class="w-2"></div>
<a-select v-if="form.isBid === '1'">
</a-select>
</div>
</div>
</template>
</fs-form>
</a-collapse-panel> </a-collapse-panel>
<a-collapse-panel key="4" class="w-full" header="招标文件上传"> <a-collapse-panel
key="4"
class="w-full"
forceRender
header="招标文件上传"
>
<a-form :label-col="{ style: { width: '120px' } }"> <a-form :label-col="{ style: { width: '120px' } }">
<a-form-item label="附件上传" name="fileList"> <a-form-item label="附件上传" name="fileList">
<a-upload <a-upload

View File

@ -429,7 +429,12 @@ onMounted(async () => {
<a-spin :spinning="isLoading"> <a-spin :spinning="isLoading">
<div class="mx-auto overflow-auto py-2"> <div class="mx-auto overflow-auto py-2">
<a-collapse v-model:active-key="collapseActiveKey" :bordered="false"> <a-collapse v-model:active-key="collapseActiveKey" :bordered="false">
<a-collapse-panel key="1" class="w-full" header="合同基本信息"> <a-collapse-panel
key="1"
class="w-full"
forceRender
header="合同基本信息"
>
<fs-form <fs-form
ref="formRefByBaseInfo" ref="formRefByBaseInfo"
class="w-full" class="w-full"
@ -453,29 +458,54 @@ onMounted(async () => {
</fs-form> </fs-form>
</a-collapse-panel> </a-collapse-panel>
<a-collapse-panel key="2" class="w-full" header="选商资料"> <a-collapse-panel
key="2"
class="w-full"
forceRender
header="选商资料"
>
<fs-form ref="formRef" class="w-full" v-bind="formBinding" /> <fs-form ref="formRef" class="w-full" v-bind="formBinding" />
</a-collapse-panel> </a-collapse-panel>
<a-collapse-panel key="3" class="w-full" header="招标文件"> <a-collapse-panel
key="3"
class="w-full"
forceRender
header="招标文件"
>
<VxeGrid ref="xGridRef" v-bind="gridOptions" class=""> <VxeGrid ref="xGridRef" v-bind="gridOptions" class="">
<template #toolbar_buttons></template> <template #toolbar_buttons></template>
</VxeGrid> </VxeGrid>
</a-collapse-panel> </a-collapse-panel>
<a-collapse-panel key="4" class="w-full" header="审批信息"> <a-collapse-panel
key="4"
class="w-full"
forceRender
header="审批信息"
>
<VxeGrid ref="xGridRef" v-bind="gridOptions" class=""> <VxeGrid ref="xGridRef" v-bind="gridOptions" class="">
<template #toolbar_buttons></template> <template #toolbar_buttons></template>
</VxeGrid> </VxeGrid>
</a-collapse-panel> </a-collapse-panel>
<a-collapse-panel key="5" class="w-full" header="招标(谈判)结果填报"> <a-collapse-panel
key="5"
class="w-full"
forceRender
header="招标(谈判)结果填报"
>
<VxeGrid ref="xGridRef" v-bind="gridOptions" class=""> <VxeGrid ref="xGridRef" v-bind="gridOptions" class="">
<template #toolbar_buttons></template> <template #toolbar_buttons></template>
</VxeGrid> </VxeGrid>
</a-collapse-panel> </a-collapse-panel>
<a-collapse-panel key="6" class="w-full" header="招标相关资料上传"> <a-collapse-panel
key="6"
class="w-full"
forceRender
header="招标相关资料上传"
>
<a-form :label-col="{ style: { width: '120px' } }"> <a-form :label-col="{ style: { width: '120px' } }">
<a-form-item label="附件上传" name="fileList"> <a-form-item label="附件上传" name="fileList">
<a-upload <a-upload

View File

@ -3,17 +3,18 @@ import type { VxeGridPropTypes } from 'vxe-table';
import { dict } from '@fast-crud/fast-crud'; import { dict } from '@fast-crud/fast-crud';
import { DICT_TYPE, getDictOptions } from '#/utils/dict'; import { DICT_TYPE, getDictOptions } from '#/utils/dict';
import { useRender } from '#/hooks/useRender';
export const PrimaryKey = 'guid'; export const PrimaryKey = 'guid';
export function getColumns(params: any = {}): VxeGridPropTypes.Columns { export function getColumns(params: any = {}): VxeGridPropTypes.Columns {
if (params.type === 'choose') { if (params.type === 'choose') {
return [ return [
{ field: 'providerId', title: '编号', type: 'checkbox', width: 100 }, { field: 'providerId', title: '编号', type: 'checkbox', width: 130 },
{ {
field: 'providerName', field: 'providerName',
title: '单位全称', title: '单位全称',
minWidth: 200, minWidth: 250,
slots: { slots: {
default: 'provider-name-slot', default: 'provider-name-slot',
}, },
@ -26,8 +27,17 @@ export function getColumns(params: any = {}): VxeGridPropTypes.Columns {
{ field: 'inputPerson1', title: '注册资金', width: 100 }, { field: 'inputPerson1', title: '注册资金', width: 100 },
{ field: 'currencyTypeName', title: '币种', width: 100 }, { field: 'currencyTypeName', title: '币种', width: 100 },
{ field: 'createPerson', title: '创建人', width: 100 }, { field: 'createPerson', title: '创建人', width: 100 },
{ field: 'createDate', title: '创建时间', width: 100 }, {
{ field: 'inputDepartName', title: '备注', width: 100 }, field: 'createDate',
title: '创建时间',
width: 120,
slots: {
default: ({ row }) => {
return useRender.renderDate(row.applyTime, 'YYYY-MM-DD');
},
},
},
{ field: 'inputDepartName', title: '备注', width: 150 },
]; ];
} }
return [ return [

View File

@ -7,7 +7,7 @@ import { Page } from '@vben/common-ui';
import Apis from '#/api'; import Apis from '#/api';
import { useVxeTable } from '#/hooks/vxeTable'; import { useVxeTable } from '#/hooks/vxeTable';
import { getTodoColumns } from '#/views/contract/schema'; import { getTodoColumns } from '#/views/contract/schema';
import { toDetail, toDetailPage } from '#/views/contract/utils'; import { toDetailPage } from '#/views/contract/utils';
const props = withDefaults( const props = withDefaults(
defineProps<{ defineProps<{
@ -80,6 +80,22 @@ const grid2Options = reactive(
}), }),
); );
function toDetail(type: string, id: string, row?: any) {
switch (type) {
case 'contractSetup': {
router.push(`/contract/approval/edit/${id}`);
break;
}
case 'selectMerchant': {
router.push(`/contract/business/edit/${row.contractId}`);
break;
}
default: {
break;
}
}
}
onMounted(() => {}); onMounted(() => {});
// //

View File

@ -16,13 +16,13 @@ export function getTodoColumns(_params: any = {}): VxeGridPropTypes.Columns {
{ {
field: 'contractName', field: 'contractName',
title: '名称', title: '名称',
minWidth: 200, minWidth: 250,
slots: { default: 'title_slot' }, slots: { default: 'title_slot' },
}, },
{ {
field: 'module', field: 'module',
title: '模块', title: '模块',
width: 150, width: 120,
slots: { slots: {
default: ({ row }) => { default: ({ row }) => {
return ( return (
@ -52,11 +52,11 @@ export function getApprovalColumns(
): VxeGridPropTypes.Columns { ): VxeGridPropTypes.Columns {
return [ return [
{ type: 'seq', width: 50, align: 'center', fixed: 'left' }, { type: 'seq', width: 50, align: 'center', fixed: 'left' },
{ field: 'contractId', title: '编号', width: 100 }, { field: 'contractId', title: '编号', width: 150 },
{ {
field: 'title', field: 'title',
title: '任务名称', title: '任务名称',
minWidth: 200, minWidth: 250,
slots: { slots: {
default: ({ row }) => { default: ({ row }) => {
const text = row.title; const text = row.title;

View File

@ -1,26 +1,4 @@
import Apis from '#/api'; import Apis from '#/api';
import { router } from '#/router';
/**
*
* @param type
* @param id
*/
export function toDetail(type: string, id: string, row?: any) {
switch (type) {
case 'contractSetup': {
router.push(`/contract/approval/edit/${id}`);
break;
}
case 'selectMerchant': {
router.push(`/contract/business/edit/${row.contractId}`);
break;
}
default: {
break;
}
}
}
/** /**
* *

View File

@ -7,7 +7,10 @@ import Apis from '#/api';
import { useVxeTable } from '#/hooks/vxeTable'; import { useVxeTable } from '#/hooks/vxeTable';
import { DICT_TYPE, getDictOptions } from '#/utils/dict'; import { DICT_TYPE, getDictOptions } from '#/utils/dict';
import { getTodoColumns } from '#/views/contract/schema'; import { getTodoColumns } from '#/views/contract/schema';
import { toDetail, toDetailPage } from '#/views/contract/utils'; import { toDetailPage } from '#/views/contract/utils';
import { useRouter } from 'vue-router';
const router = useRouter();
const { xGridRef, triggerProxy, gridProps } = useVxeTable({ ref: 'xGridRef' }); const { xGridRef, triggerProxy, gridProps } = useVxeTable({ ref: 'xGridRef' });
const { xGridRef: xGrid2Ref, triggerProxy: triggerProxy2 } = useVxeTable({ const { xGridRef: xGrid2Ref, triggerProxy: triggerProxy2 } = useVxeTable({
@ -89,6 +92,22 @@ async function loadDataByDictType() {
treeData.value = [{ title: '全部', key: 'all', children: data }]; treeData.value = [{ title: '全部', key: 'all', children: data }];
} }
function toDetail(type: string, id: string, row?: any) {
switch (type) {
case 'contractSetup': {
router.push(`/contract/approval/edit/${id}`);
break;
}
case 'selectMerchant': {
router.push(`/contract/business/edit/${row.contractId}`);
break;
}
default: {
break;
}
}
}
onMounted(() => { onMounted(() => {
loadDataByDictType(); loadDataByDictType();
}); });
@ -150,6 +169,11 @@ onMounted(() => {
> >
<vxe-grid ref="xGrid2Ref" v-bind="grid2Options" class="flex-1"> <vxe-grid ref="xGrid2Ref" v-bind="grid2Options" class="flex-1">
<template #toolbar_buttons> </template> <template #toolbar_buttons> </template>
<template #title_slot="{ row }">
<span class="">
{{ row.contractName }}
</span>
</template>
<template #operate="{ row }"> <template #operate="{ row }">
<a-button <a-button
class="text-blue-500" class="text-blue-500"

View File

@ -30,35 +30,35 @@ export default defineConfig(async () => {
changeOrigin: true, changeOrigin: true,
rewrite: (path) => path.replace(/^\/api\/app/, '/'), rewrite: (path) => path.replace(/^\/api\/app/, '/'),
// target: `http://10.71.220.24:8083/rl`, // target: `http://10.71.220.24:8083/rl`,
target: `http://192.168.147.164:8083/rl`, target: `http://192.168.148.88:8083/rl`,
ws: true, ws: true,
}, },
'/api/flowCenter': { '/api/flowCenter': {
changeOrigin: true, changeOrigin: true,
rewrite: (path) => path.replace(/^\/api\/flowCenter/, '/flowCenter'), rewrite: (path) => path.replace(/^\/api\/flowCenter/, '/flowCenter'),
// target: `http://10.71.220.24:8083/rl`, // target: `http://10.71.220.24:8083/rl`,
target: `http://192.168.147.164:19007`, target: `http://192.168.148.88:19007`,
ws: true, ws: true,
}, },
'/api/czg/flowCenter': { '/api/czg/flowCenter': {
changeOrigin: true, changeOrigin: true,
rewrite: (path) => path.replace(/^\/api\/flowCenter/, '/flowCenter'), rewrite: (path) => path.replace(/^\/api\/flowCenter/, '/flowCenter'),
// target: `http://10.71.220.24:8083/rl`, // target: `http://10.71.220.24:8083/rl`,
target: `http://192.168.147.164:19007`, target: `http://192.168.148.88:19007`,
ws: true, ws: true,
}, },
'/api/zp/flowCenter': { '/api/zp/flowCenter': {
changeOrigin: true, changeOrigin: true,
rewrite: (path) => path.replace(/^\/api\/flowCenter/, '/flowCenter'), rewrite: (path) => path.replace(/^\/api\/flowCenter/, '/flowCenter'),
// target: `http://10.71.220.24:8083/rl`, // target: `http://10.71.220.24:8083/rl`,
target: `http://192.168.147.164:19007`, target: `http://192.168.148.88:19007`,
ws: true, ws: true,
}, },
'/api/zzz/flowCenter': { '/api/zzz/flowCenter': {
changeOrigin: true, changeOrigin: true,
rewrite: (path) => path.replace(/^\/api\/flowCenter/, '/flowCenter'), rewrite: (path) => path.replace(/^\/api\/flowCenter/, '/flowCenter'),
// target: `http://10.71.220.24:8083/rl`, // target: `http://10.71.220.24:8083/rl`,
target: `http://192.168.147.164:19007`, target: `http://192.168.148.88:19007`,
ws: true, ws: true,
}, },
'/api/czg/app': { '/api/czg/app': {
@ -71,15 +71,15 @@ export default defineConfig(async () => {
'/api/czg/uc': { '/api/czg/uc': {
changeOrigin: true, changeOrigin: true,
rewrite: (path) => path.replace(/^\/api\/czg\/uc/, '/'), rewrite: (path) => path.replace(/^\/api\/czg\/uc/, '/'),
target: `http://192.168.147.164:8082`, target: `http://192.168.148.88:8082`,
// target: `http://192.168.147.164:8082`, // target: `http://192.168.148.88:8082`,
ws: true, ws: true,
}, },
'/api/uc': { '/api/uc': {
changeOrigin: true, changeOrigin: true,
rewrite: (path) => path.replace(/^\/api\/uc/, '/'), rewrite: (path) => path.replace(/^\/api\/uc/, '/'),
// target: `http://10.71.220.24:8082`, // target: `http://10.71.220.24:8082`,
target: `http://192.168.147.164:8082`, target: `http://192.168.148.88:8082`,
ws: true, ws: true,
}, },
'/api/xmh/app': { '/api/xmh/app': {
@ -93,7 +93,7 @@ export default defineConfig(async () => {
changeOrigin: true, changeOrigin: true,
rewrite: (path) => path.replace(/^\/api\/xmh\/uc/, '/'), rewrite: (path) => path.replace(/^\/api\/xmh\/uc/, '/'),
// mock代理目标地址 // mock代理目标地址
target: `http://192.168.147.164:8082`, target: `http://192.168.148.88:8082`,
ws: true, ws: true,
}, },
'/api/zp/app': { '/api/zp/app': {
@ -107,21 +107,21 @@ export default defineConfig(async () => {
changeOrigin: true, changeOrigin: true,
rewrite: (path) => path.replace(/^\/api\/zp\/uc/, '/'), rewrite: (path) => path.replace(/^\/api\/zp\/uc/, '/'),
// mock代理目标地址 // mock代理目标地址
target: `http://192.168.147.164:8082`, target: `http://192.168.148.88:8082`,
ws: true, ws: true,
}, },
'/api/zzz/app': { '/api/zzz/app': {
changeOrigin: true, changeOrigin: true,
rewrite: (path) => path.replace(/^\/api\/zzz\/app/, '/'), rewrite: (path) => path.replace(/^\/api\/zzz\/app/, '/'),
// target: `http://192.168.0.193:8083/rl`, // target: `http://192.168.0.193:8083/rl`,
target: `http://192.168.147.164:8089/rl`, target: `http://192.168.148.88:8089/rl`,
ws: true, ws: true,
}, },
'/api/zzz/uc': { '/api/zzz/uc': {
changeOrigin: true, changeOrigin: true,
rewrite: (path) => path.replace(/^\/api\/zzz\/uc/, '/'), rewrite: (path) => path.replace(/^\/api\/zzz\/uc/, '/'),
target: `http://192.168.147.164:8082`, target: `http://192.168.148.88:8082`,
// target: `http://192.168.147.164:8082`, // target: `http://192.168.148.88:8082`,
ws: true, ws: true,
}, },
}, },

View File

@ -243,7 +243,7 @@ function handleUserRowClick(row) {
formRef.value?.setFormData({ formRef.value?.setFormData({
[`${selectField.value}People`]: row.label, [`${selectField.value}People`]: row.label,
[`${selectField.value}Telphone`]: row.mobile, [`${selectField.value}Telphone`]: row.mobile,
[`${selectField.value}Phone`]: '', [`${selectField.value}Phone`]: row.PHONE,
}); });
console.log(peoples); console.log(peoples);
console.log(formRef.value?.form); console.log(formRef.value?.form);

View File

@ -80,6 +80,7 @@ function getColumns(_params: any = {}): VxeGridPropTypes.Columns {
{ field: 'EMPLOYEE_GENDER', title: '性别', width: 80 }, { field: 'EMPLOYEE_GENDER', title: '性别', width: 80 },
{ field: 'MAIL_ADDRESS', title: '邮箱', width: 150 }, { field: 'MAIL_ADDRESS', title: '邮箱', width: 150 },
{ field: 'PHONE_NUM', title: '联系方式', width: 120 }, { field: 'PHONE_NUM', title: '联系方式', width: 120 },
{ field: 'PHONE', title: '办公室电话', width: 120 },
{ field: 'ORG_NAME', title: '所属组织', minWidth: 120 }, { field: 'ORG_NAME', title: '所属组织', minWidth: 120 },
]; ];
return columns; return columns;

File diff suppressed because it is too large Load Diff