+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
+
diff --git a/apps/web-contract/src/views/contract/iframe-info/components/info-business/curd.tsx b/apps/web-contract/src/views/contract/iframe-info/components/info-business/curd.tsx
new file mode 100644
index 00000000..b1f3b6f0
--- /dev/null
+++ b/apps/web-contract/src/views/contract/iframe-info/components/info-business/curd.tsx
@@ -0,0 +1,703 @@
+import { DICT_TYPE, getDictObj, getDictOptions } from '#/utils/dict';
+import { dict } from '@fast-crud/fast-crud';
+
+/**
+ * 合同选商
+ *
+ */
+function filterContractTypes(contractTypeData: any = [], parentId: string) {
+ return contractTypeData
+ .map((item) => {
+ item.label = item.contrLevelName;
+ item.value = item.contrLevelId;
+ return item;
+ })
+ .filter((item) => item.parentId === parentId);
+}
+
+export function getFormSchema(params: any = {}) {
+ const { contractTypeData, readOnly = false } = params;
+
+ return {
+ contractName: {
+ title: '合同名称',
+ key: 'contractName',
+ col: { span: 24 },
+ component: {
+ name: 'a-input',
+ vModel: 'value',
+ allowClear: false,
+ },
+ conditionalRender: {
+ match({ form }) {
+ return readOnly;
+ },
+ render({ form }) {
+ return
{form.contractName};
+ },
+ },
+ rules: [{ required: true }],
+ },
+ ctrType: {
+ title: '合同类别',
+ key: 'ctrType',
+ col: { span: 12 },
+ component: {
+ name: 'fs-dict-select',
+ vModel: 'value',
+ class: 'min-w-[200px]',
+ dict: dict({
+ async getData({ form = {} }) {
+ return filterContractTypes(contractTypeData, '-1');
+ },
+ }),
+ },
+ valueChange({ form, value, getComponentRef }) {
+ form.ctrTwoType = undefined;
+ if (value) {
+ getComponentRef('ctrTwoType').reloadDict(); // 执行city的select组件的reloadDict()方法,触发“city”重新加载字典
+ }
+ },
+ conditionalRender: {
+ match({ form }) {
+ return readOnly;
+ },
+ render({ form }) {
+ let data = filterContractTypes(contractTypeData, '-1');
+ for (const item of data) {
+ if (item.value === form.ctrType) {
+ return
{item.label};
+ }
+ }
+ return
;
+ },
+ },
+ rules: [{ required: true }],
+ },
+ ctrTwoType: {
+ title: '二级类别',
+ key: 'ctrTwoType',
+ col: { span: 12 },
+ component: {
+ name: 'fs-dict-select',
+ vModel: 'value',
+ class: 'min-w-[200px]',
+ dict: dict({
+ async getData({ form = {} }) {
+ return filterContractTypes(contractTypeData, form.ctrType);
+ },
+ }),
+ },
+ conditionalRender: {
+ match({ form }) {
+ return readOnly;
+ },
+ render({ form }) {
+ let data = filterContractTypes(contractTypeData, form.ctrType);
+ for (const item of data) {
+ if (item.value === form.ctrTwoType) {
+ return
{item.label};
+ }
+ }
+ return
;
+ },
+ },
+ rules: [{ required: true }],
+ },
+ frameProtocol: {
+ title: '框架协议',
+ key: 'frameProtocol',
+ col: { span: 8 },
+ component: {
+ name: 'fs-dict-radio',
+ vModel: 'value',
+ dict: dict({
+ data: getDictOptions(DICT_TYPE.common_whether),
+ }),
+ },
+ conditionalRender: {
+ match({ form }) {
+ return readOnly;
+ },
+ render({ form }) {
+ return (
+
+ {getDictObj(DICT_TYPE.common_whether, form.frameProtocol)?.label}
+
+ );
+ },
+ },
+ },
+ frameProtocolCtr: {
+ title: '框架协议下的合同',
+ key: 'frameProtocolCtr',
+ col: { span: 12 },
+ labelCol: { style: { width: '200px' } },
+ component: {
+ name: 'fs-dict-radio',
+ vModel: 'value',
+ dict: dict({
+ data: getDictOptions(DICT_TYPE.common_whether),
+ }),
+ },
+ conditionalRender: {
+ match({ form }) {
+ return readOnly;
+ },
+ render({ form }) {
+ return (
+
+ {
+ getDictObj(DICT_TYPE.common_whether, form.frameProtocolCtr)
+ ?.label
+ }
+
+ );
+ },
+ },
+ },
+ fundAllocation: {
+ title: '资金流向',
+ key: 'fundAllocation',
+ col: { span: 12 },
+ component: {
+ name: 'fs-dict-select',
+ vModel: 'value',
+ allowClear: false,
+ class: 'min-w-[200px]',
+ dict: dict({
+ data: getDictOptions(DICT_TYPE.contract_fund_flow),
+ }),
+ },
+ valueChange: {
+ immediate: true, //是否立即执行一次
+ handle({ form }) {
+ console.log(form);
+ form.fundAllocationName = getDictObj(
+ DICT_TYPE.contract_fund_flow,
+ form.fundAllocation,
+ )?.label;
+ },
+ },
+ conditionalRender: {
+ match({ form }) {
+ return readOnly;
+ },
+ render({ form }) {
+ return (
+
+ {
+ getDictObj(DICT_TYPE.contract_fund_flow, form.fundAllocation)
+ ?.label
+ }
+
+ );
+ },
+ },
+ rules: [{ required: true, message: '请选择资金流向' }],
+ },
+ fundDitch: {
+ title: '资金渠道',
+ key: 'fundDitch',
+ col: { span: 12 },
+ component: {
+ name: 'fs-dict-select',
+ vModel: 'value',
+ allowClear: false,
+ class: 'min-w-[200px]',
+ dict: dict({
+ data: getDictOptions(DICT_TYPE.contract_funding_source),
+ }),
+ },
+ conditionalRender: {
+ match({ form }) {
+ return readOnly;
+ },
+ render({ form }) {
+ return (
+
+ {
+ getDictObj(DICT_TYPE.contract_funding_source, form.fundDitch)
+ ?.label
+ }
+
+ );
+ },
+ },
+ rules: [{ required: true, message: '请选择资金渠道' }],
+ },
+ budgetSum: {
+ title: '预算金额',
+ key: 'budgetSum',
+ col: { span: 8 },
+ colon: false,
+ component: {
+ name: 'a-input-number',
+ vModel: 'value',
+ class: 'w-full',
+ min: 0,
+ max: 9999,
+ },
+ conditionalRender: {
+ match({ form }) {
+ return readOnly;
+ },
+ render({ form }) {
+ return
{form.budgetSum};
+ },
+ },
+ },
+ priceType: {
+ title: '',
+ key: 'priceType',
+ col: { span: 6 },
+ labelCol: { style: { width: '12px' } },
+ colon: false,
+ component: {
+ name: 'fs-dict-select',
+ vModel: 'value',
+ dict: dict({
+ data: getDictOptions(DICT_TYPE.contract_currency_unit),
+ }),
+ },
+ conditionalRender: {
+ match({ form }) {
+ return readOnly;
+ },
+ render({ form }) {
+ return (
+
+ {getDictObj(DICT_TYPE.contract_currency_unit, form.priceType)}
+
+ );
+ },
+ },
+ },
+ organiza: {
+ title: '组织形式',
+ key: 'organiza',
+ col: { span: 24 },
+ component: {
+ name: 'fs-dict-radio',
+ vModel: 'value',
+ allowClear: false,
+ class: 'min-w-[200px]',
+ dict: dict({
+ data: getDictOptions(DICT_TYPE.contract_organization_form),
+ }),
+ },
+ conditionalRender: {
+ match({ form }) {
+ return readOnly;
+ },
+ render({ form }) {
+ return (
+
+ {getDictObj(DICT_TYPE.contract_organization_form, form.organiza)}
+
+ );
+ },
+ },
+ rules: [{ required: true, message: '请选择组织形式' }],
+ },
+ fileList: {
+ title: '相关附件',
+ key: 'fileList',
+ },
+ };
+}
+
+export function getFormSchema2(params: any = {}) {
+ const { contractTypeData, readOnly = false } = params;
+
+ return {
+ contractName: {
+ title: '项目',
+ key: 'contractName',
+ col: { span: 12 },
+ component: {
+ name: 'a-input',
+ vModel: 'value',
+ allowClear: false,
+ },
+ conditionalRender: {
+ match({ form }) {
+ return readOnly;
+ },
+ render({ form }) {
+ return
{form.contractName};
+ },
+ },
+ rules: [{ required: true }],
+ },
+ ctrType: {
+ title: '项目类别',
+ key: 'ctrType',
+ col: { span: 12 },
+ component: {
+ name: 'fs-dict-select',
+ vModel: 'value',
+ class: 'min-w-[200px]',
+ dict: dict({
+ async getData({ form = {} }) {
+ return filterContractTypes(contractTypeData, '-1');
+ },
+ }),
+ },
+ valueChange({ form, value, getComponentRef }) {
+ form.ctrTwoType = undefined;
+ if (value) {
+ getComponentRef('ctrTwoType').reloadDict(); // 执行city的select组件的reloadDict()方法,触发“city”重新加载字典
+ }
+ },
+ conditionalRender: {
+ match({ form }) {
+ return readOnly;
+ },
+ render({ form }) {
+ let data = filterContractTypes(contractTypeData, '-1');
+ for (const item of data) {
+ if (item.value === form.ctrType) {
+ return
{item.label};
+ }
+ }
+ return
;
+ },
+ },
+ rules: [{ required: true }],
+ },
+ ctrTwoType: {
+ title: '项目名称',
+ key: 'ctrTwoType',
+ col: { span: 24 },
+ component: {
+ name: 'fs-dict-select',
+ vModel: 'value',
+ class: 'min-w-[200px]',
+ dict: dict({
+ async getData({ form = {} }) {
+ return filterContractTypes(contractTypeData, form.ctrType);
+ },
+ }),
+ },
+ conditionalRender: {
+ match({ form }) {
+ return readOnly;
+ },
+ render({ form }) {
+ let data = filterContractTypes(contractTypeData, form.ctrType);
+ for (const item of data) {
+ if (item.value === form.ctrTwoType) {
+ return
{item.label};
+ }
+ }
+ return
;
+ },
+ },
+ rules: [{ required: true }],
+ },
+ frameProtocol: {
+ title: '商务计价方式',
+ key: 'frameProtocol',
+ col: { span: 24 },
+ component: {
+ name: 'fs-dict-radio',
+ vModel: 'value',
+ dict: dict({
+ data: getDictOptions(DICT_TYPE.common_whether),
+ }),
+ },
+ conditionalRender: {
+ match({ form }) {
+ return readOnly;
+ },
+ render({ form }) {
+ return (
+
+ {getDictObj(DICT_TYPE.common_whether, form.frameProtocol)?.label}
+
+ );
+ },
+ },
+ },
+ frameProtocolCtr: {
+ title: '选商方式',
+ key: 'frameProtocolCtr',
+ col: { span: 24 },
+ labelCol: { style: { width: '200px' } },
+ component: {
+ name: 'fs-dict-radio',
+ vModel: 'value',
+ dict: dict({
+ data: getDictOptions(DICT_TYPE.common_whether),
+ }),
+ },
+ conditionalRender: {
+ match({ form }) {
+ return readOnly;
+ },
+ render({ form }) {
+ return (
+
+ {
+ getDictObj(DICT_TYPE.common_whether, form.frameProtocolCtr)
+ ?.label
+ }
+
+ );
+ },
+ },
+ },
+ fundAllocation: {
+ title: '选商方式说明',
+ key: 'fundAllocation',
+ col: { span: 24 },
+ component: {
+ name: 'fs-dict-select',
+ vModel: 'value',
+ allowClear: false,
+ class: 'min-w-[200px]',
+ dict: dict({
+ data: getDictOptions(DICT_TYPE.contract_fund_flow),
+ }),
+ },
+ valueChange: {
+ immediate: true, //是否立即执行一次
+ handle({ form }) {
+ console.log(form);
+ form.fundAllocationName = getDictObj(
+ DICT_TYPE.contract_fund_flow,
+ form.fundAllocation,
+ )?.label;
+ },
+ },
+ conditionalRender: {
+ match({ form }) {
+ return readOnly;
+ },
+ render({ form }) {
+ return (
+
+ {
+ getDictObj(DICT_TYPE.contract_fund_flow, form.fundAllocation)
+ ?.label
+ }
+
+ );
+ },
+ },
+ rules: [{ required: true, message: '请选择资金流向' }],
+ },
+ fundDitch: {
+ title: '资质要求',
+ key: 'fundDitch',
+ col: { span: 24 },
+ component: {
+ name: 'fs-dict-select',
+ vModel: 'value',
+ allowClear: false,
+ class: 'min-w-[200px]',
+ dict: dict({
+ data: getDictOptions(DICT_TYPE.contract_funding_source),
+ }),
+ },
+ conditionalRender: {
+ match({ form }) {
+ return readOnly;
+ },
+ render({ form }) {
+ return (
+
+ {
+ getDictObj(DICT_TYPE.contract_funding_source, form.fundDitch)
+ ?.label
+ }
+
+ );
+ },
+ },
+ rules: [{ required: true, message: '请选择资金渠道' }],
+ },
+ budgetSum: {
+ title: '受托招标代理',
+ key: 'budgetSum',
+ col: { span: 24 },
+ colon: false,
+ component: {
+ name: 'a-input-number',
+ vModel: 'value',
+ class: 'w-full',
+ min: 0,
+ max: 9999,
+ },
+ conditionalRender: {
+ match({ form }) {
+ return readOnly;
+ },
+ render({ form }) {
+ return
{form.budgetSum};
+ },
+ },
+ },
+ priceType: {
+ title: '',
+ key: 'priceType',
+ col: { span: 6 },
+ labelCol: { style: { width: '12px' } },
+ colon: false,
+ component: {
+ name: 'fs-dict-select',
+ vModel: 'value',
+ dict: dict({
+ data: getDictOptions(DICT_TYPE.contract_currency_unit),
+ }),
+ },
+ conditionalRender: {
+ match({ form }) {
+ return readOnly;
+ },
+ render({ form }) {
+ return (
+
+ {getDictObj(DICT_TYPE.contract_currency_unit, form.priceType)}
+
+ );
+ },
+ },
+ },
+ organiza: {
+ title: '推荐供应商',
+ key: 'organiza',
+ col: { span: 24 },
+ component: {
+ name: 'fs-dict-radio',
+ vModel: 'value',
+ allowClear: false,
+ class: 'min-w-[200px]',
+ dict: dict({
+ data: getDictOptions(DICT_TYPE.contract_organization_form),
+ }),
+ },
+ conditionalRender: {
+ match({ form }) {
+ return readOnly;
+ },
+ render({ form }) {
+ return (
+
+ {getDictObj(DICT_TYPE.contract_organization_form, form.organiza)}
+
+ );
+ },
+ },
+ rules: [{ required: true, message: '请选择组织形式' }],
+ },
+ organiza1: {
+ title: '项目范围',
+ key: 'organiza',
+ col: { span: 24 },
+ component: {
+ name: 'a-input',
+ vModel: 'value',
+ allowClear: false,
+ class: 'min-w-[200px]',
+ dict: dict({
+ data: getDictOptions(DICT_TYPE.contract_organization_form),
+ }),
+ },
+ conditionalRender: {
+ match({ form }) {
+ return readOnly;
+ },
+ render({ form }) {
+ return (
+
+ {getDictObj(DICT_TYPE.contract_organization_form, form.organiza)}
+
+ );
+ },
+ },
+ rules: [{ required: true, message: '请选择组织形式' }],
+ },
+ contractName1: {
+ title: '项目内容',
+ key: 'contractName',
+ col: { span: 12 },
+ component: {
+ name: 'a-input',
+ vModel: 'value',
+ allowClear: false,
+ },
+ conditionalRender: {
+ match({ form }) {
+ return readOnly;
+ },
+ render({ form }) {
+ return
{form.contractName};
+ },
+ },
+ rules: [{ required: true }],
+ },
+ contractName2: {
+ title: '工期要求(质量要求)',
+ key: 'contractName',
+ col: { span: 12 },
+ component: {
+ name: 'a-input',
+ vModel: 'value',
+ allowClear: false,
+ },
+ conditionalRender: {
+ match({ form }) {
+ return readOnly;
+ },
+ render({ form }) {
+ return
{form.contractName};
+ },
+ },
+ rules: [{ required: true }],
+ },
+ contractName3: {
+ title: '工程量(采购量)',
+ key: 'contractName',
+ col: { span: 12 },
+ component: {
+ name: 'a-input',
+ vModel: 'value',
+ allowClear: false,
+ },
+ conditionalRender: {
+ match({ form }) {
+ return readOnly;
+ },
+ render({ form }) {
+ return
{form.contractName};
+ },
+ },
+ rules: [{ required: true }],
+ },
+ contractName4: {
+ title: '计划投资明细',
+ key: 'contractName',
+ col: { span: 12 },
+ component: {
+ name: 'a-input',
+ vModel: 'value',
+ allowClear: false,
+ },
+ conditionalRender: {
+ match({ form }) {
+ return readOnly;
+ },
+ render({ form }) {
+ return
{form.contractName};
+ },
+ },
+ rules: [{ required: true }],
+ },
+ fileList: {
+ title: '相关附件',
+ key: 'fileList',
+ },
+ };
+}
diff --git a/apps/web-contract/src/views/contract/iframe-info/components/info-business/info-business.vue b/apps/web-contract/src/views/contract/iframe-info/components/info-business/info-business.vue
index 443512f8..475d6f35 100644
--- a/apps/web-contract/src/views/contract/iframe-info/components/info-business/info-business.vue
+++ b/apps/web-contract/src/views/contract/iframe-info/components/info-business/info-business.vue
@@ -1,13 +1,256 @@
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
+