diff --git a/src/api/flow/index.js b/src/api/flow/index.js index 526f4e7..22eb989 100644 --- a/src/api/flow/index.js +++ b/src/api/flow/index.js @@ -340,6 +340,15 @@ export function getRelationList(flowId, isLoading = false) { }) } +export function getRelationMeetingMinuteOptions(params, isLoading = false) { + return request({ + method: 'get', + url: '/api/oa/flow/relation-meeting-minute-options', + params, + isLoading + }) +} + // 打捞流程至付款流程 export function salvageFlow(flowId, isLoading = true) { return request({ diff --git a/src/components/BudgetSourcePickerField.vue b/src/components/BudgetSourcePickerField.vue index 6f52f7a..0c8440d 100644 --- a/src/components/BudgetSourcePickerField.vue +++ b/src/components/BudgetSourcePickerField.vue @@ -260,8 +260,49 @@ +
+
工会
+ + + {{ node.label }} + + + 预算: + {{ formatAmount(data.budget_amount) }} + + + 已用: + {{ formatAmount(data.used_amount || 0) }} + + + 执行率: + + {{ formatExecutionRate(data.execution_rate || 0) }} + + + + + +
+
暂无数据 @@ -506,6 +547,9 @@ export default { offsetPrepaidTree() { return (this.treeData || []).filter((n) => n?.budget_type === "offset_prepaid"); }, + tradeUnionTree() { + return (this.treeData || []).filter((n) => n?.budget_type === "trade_union"); + }, budgetTypeMap() { return { department: "部门预算", @@ -513,6 +557,7 @@ export default { special_fund: "专项资金", last_year_carryover: "上一年结转资金", offset_prepaid: "抵消预付账款", + trade_union: "工会", }; }, // 分配总额 @@ -670,6 +715,7 @@ export default { this.$refs.specialFundTreeRef, this.$refs.lastYearCarryoverTreeRef, this.$refs.offsetPrepaidTreeRef, + this.$refs.tradeUnionTreeRef, ].filter(Boolean); const nodes = []; refs.forEach((tree) => { @@ -693,6 +739,7 @@ export default { this.$refs.specialFundTreeRef, this.$refs.lastYearCarryoverTreeRef, this.$refs.offsetPrepaidTreeRef, + this.$refs.tradeUnionTreeRef, ].filter(Boolean); refs.forEach((tree) => { if (typeof tree.setCheckedKeys === "function") { diff --git a/src/components/ContractSignField.vue b/src/components/ContractSignField.vue index bb70f9d..8c9e5e4 100644 --- a/src/components/ContractSignField.vue +++ b/src/components/ContractSignField.vue @@ -503,8 +503,8 @@ export default { // 初始化校验规则 initRules() { // 新建时:只校验到付款方式(包含付款方式) - const baseRules = { - contract_no_without_prefix: [{ required: true, message: "请填写合同编号", trigger: "blur" }], + // 注意:新建时不校验合同编号(不显示红色星号);编辑时仍保持必填校验 + const baseRulesCommon = { title: [{ required: true, message: "请填写合同名称", trigger: "blur" }], main_content: [{ required: true, message: "请填写合同主要内容", trigger: "blur" }], party_a: [{ required: true, message: "请填写甲方", trigger: "blur" }], @@ -547,10 +547,18 @@ export default { // 新建时只校验到付款方式(包含付款方式) if (!this.isEditMode()) { - this.rules = baseRules; + this.rules = { + ...baseRulesCommon, + }; return; } + // 编辑时:合同编号必填 + const baseRules = { + contract_no_without_prefix: [{ required: true, message: "请填写合同编号", trigger: "blur" }], + ...baseRulesCommon, + }; + // 编辑时全量校验(与合同编辑页面对齐) this.rules = { ...baseRules, diff --git a/src/utils/print.js b/src/utils/print.js index 871440a..eddffd9 100644 --- a/src/utils/print.js +++ b/src/utils/print.js @@ -1,5 +1,13 @@ import store from '@/store' import moment from 'moment' + +function sanitizePrintFieldHtml(html) { + const wrapper = document.createElement('div') + wrapper.innerHTML = html || '' + wrapper.querySelectorAll('input[type="file"], .el-upload__input').forEach(el => el.remove()) + return wrapper.innerHTML +} + /** * @param{string} printJs 打印模版 * @param{boolean} isLog 是否带审批 @@ -78,7 +86,7 @@ export async function print(printJs, isLog, form, logContent) { printStr = printStr.replace(fieldMath,subFormBody) // console.log(fieldMath, printStr) } else { - printStr = printStr.replace(fieldMath,`${value}`) + printStr = printStr.replace(fieldMath,`${sanitizePrintFieldHtml(value)}`) } } } else { diff --git a/src/views/MeetingMinutes/components/AddMeetingMinutes.vue b/src/views/MeetingMinutes/components/AddMeetingMinutes.vue index d139101..bae94a7 100644 --- a/src/views/MeetingMinutes/components/AddMeetingMinutes.vue +++ b/src/views/MeetingMinutes/components/AddMeetingMinutes.vue @@ -99,15 +99,18 @@ - {{ flow.title || flow.no || ('流程' + flow.id) }} + + {{ flow.title || flow.no || ('流程' + flow.id) }} + 【已关联 {{ flow.meeting_minutes_count }} 次】 + {{ flow.no || '' }}
- 提示:可以关联多个上会审议审批流程 + 提示:可以关联多个上会审议审批流程,同一条流程可被多个会议纪要关联
@@ -140,7 +143,7 @@ placeholder="请选择类型" style="width: 100%;" > - + @@ -315,12 +318,7 @@ export default { return // 已经加载过了 } try { - const params = {} - // 如果是编辑模式,传递当前会议纪要ID,允许显示已关联的流程 - if (this.type === 'edit' && this.form.id) { - params.meeting_minute_id = this.form.id - } - const res = await getFlows(params) + const res = await getFlows({}) this.availableFlows = res || [] } catch (err) { console.error('加载流程列表失败:', err) diff --git a/src/views/dashboard/index.vue b/src/views/dashboard/index.vue index 452223a..375d463 100644 --- a/src/views/dashboard/index.vue +++ b/src/views/dashboard/index.vue @@ -507,7 +507,8 @@ export default { try { await this.getFlows(); const res = await getInfo() - this.usualFlows = res.quick_enter?res.quick_enter:[] + const quickEnterIds = this.normalizeQuickEnter(res.quick_enter) + this.usualFlows = this.flows.filter(flow => quickEnterIds.includes(Number(flow.id))) // const res = await configIndex({ // filter: [ // { @@ -533,16 +534,27 @@ export default { console.error(err); } }, + normalizeQuickEnter(quickEnter) { + if (!quickEnter) return [] + if (!Array.isArray(quickEnter)) return [] + return quickEnter.map(item => { + if (item && typeof item === 'object') { + return Number(item.id) + } + return Number(item) + }).filter(id => Number.isInteger(id) && id > 0) + }, openQucik(){ + const quickEnterIds = this.normalizeQuickEnter(this.usualFlows) this.flows.map(flow => { - const isChecked = this.usualFlows.some(usualFlow => usualFlow.id === flow.id); + const isChecked = quickEnterIds.includes(Number(flow.id)); flow.checked = isChecked }); this.isShowQuick = true }, updatequick(){ this.quickLoading = true - let arr = this.flows.filter((i)=> i.checked===true) + let arr = this.flows.filter((i)=> i.checked===true).map(i => Number(i.id)) saveMyself({ quick_enter:arr }).then(res=>{ diff --git a/src/views/flow/components/RelatedFlows.vue b/src/views/flow/components/RelatedFlows.vue index 4fafa56..59ac6e6 100644 --- a/src/views/flow/components/RelatedFlows.vue +++ b/src/views/flow/components/RelatedFlows.vue @@ -23,8 +23,20 @@
+ + + + + + @@ -63,24 +75,53 @@
已关联的流程({{ selectedFlows.length }})
- - {{ flow.title }} - ({{ flow.no }}) - +
+ + {{ flow.title }} + ({{ flow.no }}) + +
+ 会议纪要: + + {{ mm.title }} + + +
+
+
+
+ +
+
已关联的会议纪要({{ selectedMeetingMinutes.length }})
+
+
+ + {{ item.title || ('会议纪要' + item.id) }} + +
+ 创建时间: + {{ formatDate(item.created_at) }} +
+
-
+
可选流程
@@ -104,6 +145,13 @@ 发起人:{{ flow.creator_name }} {{ formatDate(flow.created_at) }}
+
+ 会议纪要: + + {{ mm.title }} + + +
+
+
可选会议纪要
+
+ +
+
+
+ {{ item.title || ('会议纪要' + item.id) }} + 会议纪要 +
+
+ ID:{{ item.id }} + {{ formatDate(item.created_at) }} +
+
+
+ + 查看 + + + 关联 + + + 取消 + +
+
+
+ + +
+