diff --git a/src/views/businessConfig/contractConfig.vue b/src/views/businessConfig/contractConfig.vue index ac3788e..399991b 100644 --- a/src/views/businessConfig/contractConfig.vue +++ b/src/views/businessConfig/contractConfig.vue @@ -11,7 +11,7 @@ 合同分类 - + @@ -135,6 +135,56 @@ + + + + + + {{ scope.row.is_simple_default === 1 ? '是' : '否' }} + + + 可编辑 + + + + + + + + + {{ scope.row.has_charge_default === 1 ? '是' : '否' }} + + + 可编辑 + + + + + + + + + {{ scope.row.is_plan_default === 1 ? '是' : '否' }} + + + 可编辑 + + + + + + + + + {{ scope.row.is_substitute_default === 1 ? '是' : '否' }} + + + 可编辑 + + + + + 编辑 @@ -177,7 +227,7 @@ class="form-input" @change="handleFormCategoryChange" > - + @@ -273,6 +323,85 @@ + + + + 合同配置 + + + + 是否为简易流程 + + + + + 否 + 是 + + (水电煤、报刊订阅、网络通讯、车辆使用等费用付款) + + + + + + 是否为河道处收费类项目 + + + + + 否 + 是 + + + + + + + 是否为预算内确定项目 + + + + + 否 + 是 + + + + + + + 是否为代建项目 + + + + + 否 + 是 + + + + + @@ -330,7 +459,15 @@ export default { tenderReview: false, contractSign: false, prePaymentForm: '', // 事前支付表格 - postPaymentForm: '' // 事后支付表格 + postPaymentForm: '', // 事后支付表格 + is_simple: 0, + has_charge: 0, + isBudget: 0, + is_substitute: 0, + is_simple_editable: true, + has_charge_editable: true, + isBudget_editable: true, + is_substitute_editable: true }, rules: { category: [ @@ -408,10 +545,10 @@ export default { contract_type_id: item.contract_type, purchase_form_id: item.purchase_form, // 使用详细信息中的name字段,如果为空显示'-' - category: item.category_detail?.name || '-', - affairType: item.work_type_detail?.name || '-', - contractType: item.contract_type_detail?.name || '-', - purchaseForm: item.purchase_form_detail?.name || '-', + category: item.category_detail?.value || '-', + affairType: item.work_type_detail?.value || '-', + contractType: item.contract_type_detail?.value || '-', + purchaseForm: item.purchase_form_detail?.value || '-', purchaseWay: item.purchase_way || false, purchaseMethod: item.purchase_method, projectName: item.project_name || false, @@ -427,7 +564,16 @@ export default { postPaymentForm: item.contract_template?.name || '-', // 保存支付表格ID before_contract_template_id: item.before_contract_template_id, - contract_template_id: item.contract_template_id + contract_template_id: item.contract_template_id, + // 添加合同配置字段 + is_simple_default: item.is_simple_default || 0, + has_charge_default: item.has_charge_default || 0, + is_plan_default: item.is_plan_default || 0, + is_substitute_default: item.is_substitute_default || 0, + edit_is_simple: item.edit_is_simple || 0, + edit_has_charge: item.edit_has_charge || 0, + edit_is_plan: item.edit_is_plan || 0, + edit_is_substitute: item.edit_is_substitute || 0 } }) } else { @@ -520,7 +666,7 @@ export default { if (category && category.children) { this.affairTypeOptions = category.children.map(item => ({ id: item.id, - name: item.name + name: item.value })) } } @@ -533,7 +679,7 @@ export default { if (selectedAffairType && selectedAffairType.children) { this.contractTypeOptions = selectedAffairType.children.map(item => ({ id: item.id, - name: item.name + name: item.value })) } } @@ -549,7 +695,7 @@ export default { if (selectedContractType && selectedContractType.children) { this.purchaseFormOptions = selectedContractType.children.map(item => ({ id: item.id, - name: item.name + name: item.value })) } } @@ -568,7 +714,7 @@ export default { if (selectedPurchaseForm && selectedPurchaseForm.children) { this.purchaseMethodOptions = selectedPurchaseForm.children.map(item => ({ id: item.id, - name: item.name + name: item.value })) } } @@ -662,7 +808,15 @@ export default { tenderReview: false, contractSign: false, prePaymentForm: '', - postPaymentForm: '' + postPaymentForm: '', + is_simple: 0, + has_charge: 0, + isBudget: 0, + is_substitute: 0, + is_simple_editable: true, + has_charge_editable: true, + isBudget_editable: true, + is_substitute_editable: true } // 使用搜索区域的解析逻辑 @@ -703,7 +857,16 @@ export default { tenderReview: row.tenderReview === true || row.tenderReview === 1, contractSign: row.contractSign === true || row.contractSign === 1, prePaymentForm: row.before_contract_template_id || '', - postPaymentForm: row.contract_template_id || '' + postPaymentForm: row.contract_template_id || '', + // 合同配置参数 + is_simple_editable: row.edit_is_simple === 1, + has_charge_editable: row.edit_has_charge === 1, + isBudget_editable: row.edit_is_plan === 1, + is_substitute_editable: row.edit_is_substitute === 1, + is_simple: row.is_simple_default, + has_charge: row.has_charge_default, + isBudget: row.is_plan_default, + is_substitute: row.is_substitute_default } // 保存原始支付表格值 @@ -831,7 +994,19 @@ export default { flow_req: this.form.request, flow_purchase: this.form.purchaseApproval, flow_invite: this.form.tenderReview, - flow_join: this.form.contractSign + flow_join: this.form.contractSign, + + + // 新增参数 + edit_is_simple: this.form.is_simple_editable ? 1 : 0, + edit_has_charge: this.form.has_charge_editable ? 1 : 0, + edit_is_plan: this.form.isBudget_editable ? 1 : 0, + edit_is_substitute: this.form.is_substitute_editable ? 1 : 0, + + is_simple_default: this.form.is_simple, + has_charge_default: this.form.has_charge, + is_plan_default: this.form.isBudget, + is_substitute_default: this.form.is_substitute } // 如果是编辑模式 diff --git a/src/views/contract/contractList.vue b/src/views/contract/contractList.vue index fc6f97c..b061468 100644 --- a/src/views/contract/contractList.vue +++ b/src/views/contract/contractList.vue @@ -275,31 +275,31 @@ 分类 - {{ item.name }} + {{ item.value || item.name }} 事项类型 - {{ item.name }} + {{ item.value || item.name }} 合同类型 - {{ item.name }} + {{ item.value || item.name }} 采购形式 - {{ item.name }} + {{ item.value || item.name }} 采购方式 - {{ item.name }} + {{ item.value || item.name }} @@ -340,7 +340,7 @@ 是否为简易流程 - + 否 是 @@ -351,7 +351,7 @@ 是否为河道处收费类项目 - + 否 是 @@ -361,7 +361,7 @@ 是否为预算内确定项目 - + 否 是 @@ -371,7 +371,7 @@ 是否为代建项目 - + 否 是 @@ -1366,6 +1366,13 @@ export default { isEditMode: false, // 添加编辑模式标识 currentContractId: null, // 添加当前编辑的合同ID isFromPayment: false, // 是否从付款登记进入 + // 添加编辑权限控制 + editPermissions: { + is_simple: true, // 简易流程编辑权限 + has_charge: true, // 河道处收费类项目编辑权限 + is_plan: true, // 预算内确定项目编辑权限 + is_substitute: true // 代建项目编辑权限 + }, } }, methods: { @@ -2320,6 +2327,30 @@ export default { // 根据返回的配置参数设置表单 this.setFormConfig(res) + // 初始化合同配置的默认值 + // 设置是否为简易流程 + if (res.is_simple_default !== undefined) { + this.form.is_simple = res.is_simple_default + } + // 设置是否为河道处收费类项目 + if (res.has_charge_default !== undefined) { + this.form.has_charge = res.has_charge_default + } + // 设置是否为预算内确定项目 + if (res.is_plan_default !== undefined) { + this.form.isBudget = res.is_plan_default + } + // 设置是否为代建项目 + if (res.is_substitute_default !== undefined) { + this.form.is_substitute = res.is_substitute_default + } + + // 设置编辑权限 + this.editPermissions.is_simple = res.edit_is_simple === 1 + this.editPermissions.has_charge = res.edit_has_charge === 1 + this.editPermissions.is_plan = res.edit_is_plan === 1 + this.editPermissions.is_substitute = res.edit_is_substitute === 1 + // 在编辑模式下,恢复forms和before_forms的值 if (this.isEditMode) { this.form.forms = currentForms; @@ -2572,10 +2603,11 @@ export default { if (!items) return items.forEach(item => { if (item.children) { - // 确保每个子项都有正确的 id 和 name + // 确保每个子项都有正确的 id 和 name/value item.children = item.children.map(child => ({ id: child.id, name: child.name || child.value, // 添加对 value 字段的支持 + value: child.value || child.name, // 保留原始的 value 字段 children: child.children || [] })) processChildren(item.children)