@brms/ai-skills 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +256 -0
- package/bin/brms-skills.mjs +411 -0
- package/package.json +30 -0
- package/skills/brms-prototype-generator/SKILL.md +129 -0
- package/skills/brms-prototype-generator/agents/openai.yaml +7 -0
- package/skills/brms-prototype-generator/examples/few-shot-examples.md +577 -0
- package/skills/brms-prototype-generator/references/01-list-query.md +444 -0
- package/skills/brms-prototype-generator/references/02-form-entry.md +129 -0
- package/skills/brms-prototype-generator/references/03-detail-display.md +125 -0
- package/skills/brms-prototype-generator/references/04-composite-page-package.md +339 -0
- package/skills/brms-prototype-generator/references/05-dialog-patterns.md +113 -0
- package/skills/brms-prototype-generator/references/06-backend-request-patterns.md +118 -0
- package/skills/brms-prototype-generator/references/resource-index.md +46 -0
- package/skills/brms-prototype-generator/references/system-prompt.md +242 -0
- package/skills/brms-prototype-generator/scripts/analyze-doc.mjs +554 -0
- package/skills/brms-prototype-generator/scripts/check-project.mjs +228 -0
- package/skills/brms-prototype-generator/scripts/discover-targets.mjs +158 -0
- package/skills/brms-prototype-generator/scripts/install-codex.mjs +74 -0
- package/skills/brms-prototype-generator/scripts/plan-pages.mjs +390 -0
- package/skills/brms-prototype-generator/scripts/validate-generated.mjs +838 -0
- package/skills/brms-prototype-generator/templates/user-input-template.md +182 -0
- package/skills/brms-vxe-plus-developer/SKILL.md +105 -0
- package/skills/brms-vxe-plus-developer/agents/openai.yaml +7 -0
- package/skills/brms-vxe-plus-developer/references/prototype-to-real.md +54 -0
- package/skills/brms-vxe-plus-developer/references/real-base-development.md +110 -0
- package/skills/brms-vxe-plus-developer/references/resource-index.md +43 -0
- package/skills/brms-vxe-plus-developer/references/review-checklist.md +49 -0
- package/skills/brms-vxe-plus-developer/references/vxe-plus-knowledge/01-mental-model.md +150 -0
- package/skills/brms-vxe-plus-developer/references/vxe-plus-knowledge/02-vxe-plus-form.md +302 -0
- package/skills/brms-vxe-plus-developer/references/vxe-plus-knowledge/03-vxe-plus-table.md +253 -0
- package/skills/brms-vxe-plus-developer/references/vxe-plus-knowledge/04-example-map.md +488 -0
- package/skills/brms-vxe-plus-developer/references/vxe-plus-knowledge/05-request-and-eiinfo.md +170 -0
- package/skills/brms-vxe-plus-developer/references/vxe-plus-knowledge/90-anti-patterns.md +137 -0
- package/skills/brms-vxe-plus-developer/references/vxe-plus-knowledge/README.md +43 -0
- package/skills/brms-vxe-plus-developer/references/vxe-plus-knowledge/sources/README.md +21 -0
- package/skills/brms-vxe-plus-developer/references/vxe-plus-knowledge/sources/project/base/src/views/A1/P0/A1P01601.vue +483 -0
- package/skills/brms-vxe-plus-developer/references/vxe-plus-knowledge/sources/project/base/src/views/A1/P1/A1P11011.vue +444 -0
- package/skills/brms-vxe-plus-developer/references/vxe-plus-knowledge/sources/project/base/src/views/AB/BP/ABBP0201.vue +1648 -0
- package/skills/brms-vxe-plus-developer/references/vxe-plus-knowledge/sources/project/base/src/views/AM/AF/component/AMAF0601/Bidding/formConfig.ts +228 -0
- package/skills/brms-vxe-plus-developer/references/vxe-plus-knowledge/sources/project/base/src/views/AM/AF/component/AMAF0601/Record/columns.ts +110 -0
- package/skills/brms-vxe-plus-developer/references/vxe-plus-knowledge/sources/project/base/src/views/BM/BR/BMBR01.vue +130 -0
- package/skills/brms-vxe-plus-developer/references/vxe-plus-knowledge/sources/project/base/src/views/BM/BR/component/BMBR01/columns.ts +94 -0
- package/skills/brms-vxe-plus-developer/references/vxe-plus-knowledge/sources/project/base/src/views/BM/BR/component/BMBR01/formConfig.ts +108 -0
- package/skills/brms-vxe-plus-developer/references/vxe-plus-knowledge/sources/project/base/src/views/PM/PC/component/PMPC0101/Change/formConfig.ts +123 -0
- package/skills/brms-vxe-plus-developer/references/vxe-plus-knowledge/sources/project/base/src/views/PM/PC/component/PMPC0101/Change/index.vue +103 -0
- package/skills/brms-vxe-plus-developer/references/vxe-plus-knowledge/sources/project/base/src/views/PM/PC/component/PMPC0101/Clause/columns.ts +48 -0
- package/skills/brms-vxe-plus-developer/references/vxe-plus-knowledge/sources/project/base/src/views/PM/PC/component/PMPC0101/Clause/index.vue +202 -0
- package/skills/brms-vxe-plus-developer/references/vxe-plus-knowledge/sources/project/base/src/views/PM/PC/component/PMPC0101/Correcte/formConfig.ts +117 -0
- package/skills/brms-vxe-plus-developer/references/vxe-plus-knowledge/sources/project/base/src/views/PM/PC/component/PMPC0101/Correcte/index.vue +103 -0
- package/skills/brms-vxe-plus-developer/references/vxe-plus-knowledge/sources/project/base/src/views/PM/PC/component/PMPC0101/Explain/Pay/Payment/formConfig.ts +90 -0
- package/skills/brms-vxe-plus-developer/references/vxe-plus-knowledge/sources/project/base/src/views/PM/PC/component/PMPC0101/Explain/Pay/Payment/index.vue +42 -0
- package/skills/brms-vxe-plus-developer/references/vxe-plus-knowledge/sources/project/base/src/views/PM/PC/component/PMPC0101/Explain/Pay/columns.ts +376 -0
- package/skills/brms-vxe-plus-developer/references/vxe-plus-knowledge/sources/project/base/src/views/PM/PC/component/PMPC0101/Explain/Pay/index.vue +619 -0
- package/skills/brms-vxe-plus-developer/references/vxe-plus-knowledge/sources/project/base/src/views/PM/PC/component/PMPC0101/Explain/Settle/Domestic/formConfig.ts +73 -0
- package/skills/brms-vxe-plus-developer/references/vxe-plus-knowledge/sources/project/base/src/views/PM/PC/component/PMPC0101/Explain/Settle/Domestic/index.vue +47 -0
- package/skills/brms-vxe-plus-developer/references/vxe-plus-knowledge/sources/project/base/src/views/PM/PC/component/PMPC0101/Explain/Settle/Foreign/formConfig.ts +141 -0
- package/skills/brms-vxe-plus-developer/references/vxe-plus-knowledge/sources/project/base/src/views/PM/PC/component/PMPC0101/Explain/Settle/Foreign/index.vue +42 -0
- package/skills/brms-vxe-plus-developer/references/vxe-plus-knowledge/sources/project/base/src/views/PM/PC/component/PMPC0101/Explain/Settle/columns.ts +123 -0
- package/skills/brms-vxe-plus-developer/references/vxe-plus-knowledge/sources/project/base/src/views/PM/PC/component/PMPC0101/Explain/Settle/index.vue +593 -0
- package/skills/brms-vxe-plus-developer/references/vxe-plus-knowledge/sources/project/base/src/views/PM/PC/component/PMPC0101/Explain/index.vue +68 -0
- package/skills/brms-vxe-plus-developer/references/vxe-plus-knowledge/sources/project/base/src/views/PM/PC/component/PMPC0101/Fee/columns.ts +150 -0
- package/skills/brms-vxe-plus-developer/references/vxe-plus-knowledge/sources/project/base/src/views/PM/PC/component/PMPC0101/Fee/index.vue +235 -0
- package/skills/brms-vxe-plus-developer/references/vxe-plus-knowledge/sources/project/base/src/views/PM/PC/component/PMPC0101/Files/columns.ts +63 -0
- package/skills/brms-vxe-plus-developer/references/vxe-plus-knowledge/sources/project/base/src/views/PM/PC/component/PMPC0101/Files/index.vue +117 -0
- package/skills/brms-vxe-plus-developer/references/vxe-plus-knowledge/sources/project/base/src/views/PM/PC/component/PMPC0101/Goods/columns.ts +327 -0
- package/skills/brms-vxe-plus-developer/references/vxe-plus-knowledge/sources/project/base/src/views/PM/PC/component/PMPC0101/Goods/index.vue +790 -0
- package/skills/brms-vxe-plus-developer/references/vxe-plus-knowledge/sources/project/base/src/views/PM/PC/component/PMPC0101/Main/Base/Approve/formConfig.ts +341 -0
- package/skills/brms-vxe-plus-developer/references/vxe-plus-knowledge/sources/project/base/src/views/PM/PC/component/PMPC0101/Main/Base/Approve/index.vue +63 -0
- package/skills/brms-vxe-plus-developer/references/vxe-plus-knowledge/sources/project/base/src/views/PM/PC/component/PMPC0101/Main/Base/Approve2/formConfig.ts +232 -0
- package/skills/brms-vxe-plus-developer/references/vxe-plus-knowledge/sources/project/base/src/views/PM/PC/component/PMPC0101/Main/Base/Approve2/index.vue +27 -0
- package/skills/brms-vxe-plus-developer/references/vxe-plus-knowledge/sources/project/base/src/views/PM/PC/component/PMPC0101/Main/Base/Diff/columns.ts +46 -0
- package/skills/brms-vxe-plus-developer/references/vxe-plus-knowledge/sources/project/base/src/views/PM/PC/component/PMPC0101/Main/Base/Diff/index.vue +92 -0
- package/skills/brms-vxe-plus-developer/references/vxe-plus-knowledge/sources/project/base/src/views/PM/PC/component/PMPC0101/Main/Base/formConfig.ts +979 -0
- package/skills/brms-vxe-plus-developer/references/vxe-plus-knowledge/sources/project/base/src/views/PM/PC/component/PMPC0101/Main/Base/index.vue +62 -0
- package/skills/brms-vxe-plus-developer/references/vxe-plus-knowledge/sources/project/base/src/views/PM/PC/component/PMPC0101/Main/Other/formConfig.ts +179 -0
- package/skills/brms-vxe-plus-developer/references/vxe-plus-knowledge/sources/project/base/src/views/PM/PC/component/PMPC0101/Main/Other/index.vue +140 -0
- package/skills/brms-vxe-plus-developer/references/vxe-plus-knowledge/sources/project/base/src/views/PM/PC/component/PMPC0101/Main/Sign/formConfig.ts +118 -0
- package/skills/brms-vxe-plus-developer/references/vxe-plus-knowledge/sources/project/base/src/views/PM/PC/component/PMPC0101/Main/Sign/index.vue +44 -0
- package/skills/brms-vxe-plus-developer/references/vxe-plus-knowledge/sources/project/base/src/views/PM/PC/component/PMPC0101/Main/index.vue +168 -0
- package/skills/brms-vxe-plus-developer/references/vxe-plus-knowledge/sources/project/base/src/views/PM/PC/component/PMPC0101/Party/Major/formConfig.ts +257 -0
- package/skills/brms-vxe-plus-developer/references/vxe-plus-knowledge/sources/project/base/src/views/PM/PC/component/PMPC0101/Party/Major/index.vue +47 -0
- package/skills/brms-vxe-plus-developer/references/vxe-plus-knowledge/sources/project/base/src/views/PM/PC/component/PMPC0101/Party/columns.ts +256 -0
- package/skills/brms-vxe-plus-developer/references/vxe-plus-knowledge/sources/project/base/src/views/PM/PC/component/PMPC0101/Party/index.vue +738 -0
- package/skills/brms-vxe-plus-developer/references/vxe-plus-knowledge/sources/project/base/src/views/PM/PC/component/PMPC0101/Price/formConfig.ts +174 -0
- package/skills/brms-vxe-plus-developer/references/vxe-plus-knowledge/sources/project/base/src/views/PM/PC/component/PMPC0101/Price/index.vue +51 -0
- package/skills/brms-vxe-plus-developer/references/vxe-plus-knowledge/sources/project/base/src/views/PM/PC/component/PMPC0101/Top/index.vue +924 -0
- package/skills/brms-vxe-plus-developer/references/vxe-plus-knowledge/sources/project/base/src/views/SM/SW/SMSW0101.vue +567 -0
- package/skills/brms-vxe-plus-developer/references/vxe-plus-knowledge/sources/project/base/src/views/demo/index.vue +448 -0
- package/skills/brms-vxe-plus-developer/scripts/check-project.mjs +259 -0
- package/skills/brms-vxe-plus-developer/scripts/check-vxe-plus-page.mjs +137 -0
|
@@ -0,0 +1,924 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
* @Author: 谢力
|
|
3
|
+
* @Date: 2025-07-26 08:34:03
|
|
4
|
+
* @LastEditors: Please set LastEditors
|
|
5
|
+
* @LastEditTime: 2026-04-14 18:21:17
|
|
6
|
+
-->
|
|
7
|
+
<template>
|
|
8
|
+
<BxRoundedContainer class="ml10 pb0 pt0 pr0 mt10 mr10 mb10 pl0 bg-white/70">
|
|
9
|
+
<div class="flex-row align-center-row pb10 pt10 pl10 align-between-row pr5">
|
|
10
|
+
<div class="pl17" style="width:750px;">
|
|
11
|
+
<BxQuick :data="quickData" @change="handleQuickChange" />
|
|
12
|
+
</div>
|
|
13
|
+
<div class="flex-row">
|
|
14
|
+
<template v-for="(btn, index) in toolButtons" :key="`${btn.id}-${index}`">
|
|
15
|
+
<el-button
|
|
16
|
+
v-if="btn.visible" type="primary" plain :disabled="btn.disabled" size="default"
|
|
17
|
+
class="font-size-14px mr-7px" @click="btnClick(btn)"
|
|
18
|
+
>
|
|
19
|
+
{{ btn.nodeName }}
|
|
20
|
+
</el-button>
|
|
21
|
+
</template>
|
|
22
|
+
</div>
|
|
23
|
+
</div>
|
|
24
|
+
</BxRoundedContainer>
|
|
25
|
+
</template>
|
|
26
|
+
|
|
27
|
+
<script setup lang="ts">
|
|
28
|
+
import { computed, inject, ref, watch } from 'vue'
|
|
29
|
+
import type { Ref } from 'vue'
|
|
30
|
+
import { ElMessage, ElMessageBox } from 'element-plus'
|
|
31
|
+
import { useRoute, useRouter } from 'vue-router'
|
|
32
|
+
import { useDialog } from '@vxe-plus/components'
|
|
33
|
+
import Qs from 'qs'
|
|
34
|
+
import { createEiBlock, sendService } from '@/utils/eiTools'
|
|
35
|
+
import { isEmpty } from '@/utils/is'
|
|
36
|
+
import { judgeIsDirectPass, useApprove } from '@/hooks/useApprove'
|
|
37
|
+
import { compareData, generateUUID, openV6Page } from '@/utils'
|
|
38
|
+
import AMAF0601 from '@/views/AM/AF/AMAF0601.vue'
|
|
39
|
+
import PMPC9999 from '@/views/PM/PC/component/PMPC9999/index.vue'
|
|
40
|
+
import PMPC9916 from '@/views/PM/PC/component/PMPC9916/index.vue'
|
|
41
|
+
import PMPC9997 from '@/views/PM/PC/component/PMPC9997/index.vue'
|
|
42
|
+
|
|
43
|
+
const {
|
|
44
|
+
editable,
|
|
45
|
+
detailInfo,
|
|
46
|
+
diffInfo,
|
|
47
|
+
contractDiffType,
|
|
48
|
+
diffable,
|
|
49
|
+
businessType,
|
|
50
|
+
foreignFlag,
|
|
51
|
+
inSingapore,
|
|
52
|
+
isBW,
|
|
53
|
+
isCorrecte,
|
|
54
|
+
isChange,
|
|
55
|
+
isCorrecteOrChange,
|
|
56
|
+
showable,
|
|
57
|
+
isClause,
|
|
58
|
+
isHistory,
|
|
59
|
+
hedgingFlag,
|
|
60
|
+
pageId,
|
|
61
|
+
isFirstVersion,
|
|
62
|
+
} = inject('__PMPC0101__info__') as any
|
|
63
|
+
|
|
64
|
+
const { validator, getData, fetchDetailInfo, updateDetailInfo, scrollIntoModule, updateFormData, updatePartyFormData, convertData, getId, saveDetail } = inject('__PMPC0101__method__') as any
|
|
65
|
+
|
|
66
|
+
const { main: mainModule, goods: goodsModule, party: partyModule } = inject('__PMPC0101__module__') as { main: Ref, goods: Ref, party: Ref }
|
|
67
|
+
|
|
68
|
+
const baseModule = computed(() => mainModule?.value?.base)
|
|
69
|
+
|
|
70
|
+
const { startApproveProcess } = useApprove()
|
|
71
|
+
|
|
72
|
+
const router = useRouter()
|
|
73
|
+
|
|
74
|
+
const quickData = computed(() => {
|
|
75
|
+
return [
|
|
76
|
+
{
|
|
77
|
+
label: '修正信息',
|
|
78
|
+
code: 'correcte',
|
|
79
|
+
visible: isCorrecte.value,
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
label: '变更信息',
|
|
83
|
+
code: 'change',
|
|
84
|
+
visible: isChange.value,
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
label: '合同信息',
|
|
88
|
+
code: 'main',
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
label: '客商信息',
|
|
92
|
+
code: 'party',
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
label: '定价方式',
|
|
96
|
+
code: 'price',
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
label: '商品信息',
|
|
100
|
+
code: 'goods',
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
label: '费用信息',
|
|
104
|
+
code: 'fee',
|
|
105
|
+
visible: !foreignFlag.value,
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
label: '结算付款',
|
|
109
|
+
code: 'explain',
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
label: '非标合同文本变更',
|
|
113
|
+
code: 'clause',
|
|
114
|
+
visible: isClause.value,
|
|
115
|
+
},
|
|
116
|
+
].filter(item => item.visible ?? true)
|
|
117
|
+
})
|
|
118
|
+
|
|
119
|
+
// quick切换
|
|
120
|
+
function handleQuickChange({ item, index }) {
|
|
121
|
+
if (isCorrecteOrChange.value && index && isEmpty(detailInfo.value.pcContractMainHisId)) {
|
|
122
|
+
return ElMessage.warning(`请先保存${isCorrecte.value ? '修正' : '变更'}信息!`)
|
|
123
|
+
}
|
|
124
|
+
scrollIntoModule(item.code)
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
interface CustomBtnItem {
|
|
128
|
+
id?: string
|
|
129
|
+
visible?: boolean
|
|
130
|
+
disabled?: boolean
|
|
131
|
+
nodeName: string
|
|
132
|
+
nodeCode: string
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
const toolButtons = ref<CustomBtnItem[]>([])
|
|
136
|
+
|
|
137
|
+
function btnClick(item: any) {
|
|
138
|
+
switch (item.nodeCode) {
|
|
139
|
+
// 暂存
|
|
140
|
+
case 'TEMPORARY_SAVE':
|
|
141
|
+
handleSave(false)
|
|
142
|
+
break
|
|
143
|
+
case 'OPEN_RECORD':
|
|
144
|
+
// 新增-备案信息
|
|
145
|
+
handleOpenRecord()
|
|
146
|
+
break
|
|
147
|
+
// 文本编辑
|
|
148
|
+
case 'OPEN_DEBARMAIN':
|
|
149
|
+
// 合同招标信息
|
|
150
|
+
handleOpenDebarmain()
|
|
151
|
+
break
|
|
152
|
+
// 文本编辑
|
|
153
|
+
case 'APPLICATION_TEXT':
|
|
154
|
+
handleApplicationText()
|
|
155
|
+
break
|
|
156
|
+
// 新增保存
|
|
157
|
+
case 'SAVE_CONTRACT':
|
|
158
|
+
handleSave(true)
|
|
159
|
+
break
|
|
160
|
+
// 生成合同号
|
|
161
|
+
case 'GENERATE_CONTRACT_NO':
|
|
162
|
+
handleGenerateContractNo()
|
|
163
|
+
break
|
|
164
|
+
// 新增递交
|
|
165
|
+
case 'SUBMIT_CONTRACT':
|
|
166
|
+
handleSubmit()
|
|
167
|
+
break
|
|
168
|
+
// 变更协议打印
|
|
169
|
+
case 'PRINT_CHANGE_PROTOCOL':
|
|
170
|
+
handlePrintChangeProtocol()
|
|
171
|
+
break
|
|
172
|
+
// 变更保存
|
|
173
|
+
case 'SAVE_CHANGE_INFO':
|
|
174
|
+
handleSave(true)
|
|
175
|
+
break
|
|
176
|
+
// 变更递交
|
|
177
|
+
case 'SUBMIT_CHANGE':
|
|
178
|
+
handleSubmit()
|
|
179
|
+
break
|
|
180
|
+
// 变更-备案信息
|
|
181
|
+
case 'OPEN_RECORD_CHANGE':
|
|
182
|
+
handleOpenRecord()
|
|
183
|
+
break
|
|
184
|
+
// 修正保存
|
|
185
|
+
case 'SAVE':
|
|
186
|
+
handleSave(true)
|
|
187
|
+
break
|
|
188
|
+
// 修正递交
|
|
189
|
+
case 'SUBMIT':
|
|
190
|
+
handleSubmit()
|
|
191
|
+
break
|
|
192
|
+
// 询报价信息
|
|
193
|
+
case 'PROPOSAL_INFO':
|
|
194
|
+
handleOpenProposal()
|
|
195
|
+
break
|
|
196
|
+
// 变更生效
|
|
197
|
+
case 'UPDATE_EFFECT':
|
|
198
|
+
handleUpdateEffect()
|
|
199
|
+
break
|
|
200
|
+
// 修正-备案信息
|
|
201
|
+
case 'OPEN_RECORD_CORRECTE':
|
|
202
|
+
handleOpenRecord()
|
|
203
|
+
break
|
|
204
|
+
// 变更-拟签回退
|
|
205
|
+
case 'SIGN_BACK':
|
|
206
|
+
handleSignBack()
|
|
207
|
+
break
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
const { openDialog } = useDialog()
|
|
212
|
+
|
|
213
|
+
// 备案信息
|
|
214
|
+
async function handleOpenRecord() {
|
|
215
|
+
if (!detailInfo.value[getId('pcContractMainId')]) {
|
|
216
|
+
return ElMessage.warning('请先保存合同信息!')
|
|
217
|
+
}
|
|
218
|
+
openDialog(PMPC9997, {
|
|
219
|
+
title: '备案信息',
|
|
220
|
+
componentParam: {
|
|
221
|
+
editable: editable.value,
|
|
222
|
+
diffable: diffable.value,
|
|
223
|
+
otherInfo: {
|
|
224
|
+
businessType: businessType.value,
|
|
225
|
+
isCorrecte: isCorrecte.value,
|
|
226
|
+
isCorrecteOrChange: isCorrecteOrChange.value,
|
|
227
|
+
isFirstVersion: isFirstVersion.value,
|
|
228
|
+
pageId: pageId.value,
|
|
229
|
+
},
|
|
230
|
+
getId,
|
|
231
|
+
getInfo: () => {
|
|
232
|
+
return {
|
|
233
|
+
detailInfo: detailInfo.value,
|
|
234
|
+
diffInfo: diffInfo.value,
|
|
235
|
+
hedgingFlag: hedgingFlag.value,
|
|
236
|
+
}
|
|
237
|
+
},
|
|
238
|
+
refresh: fetchDetailInfo,
|
|
239
|
+
saveDetail,
|
|
240
|
+
updatePartyFormData,
|
|
241
|
+
reloadParty() {
|
|
242
|
+
partyModule.value.reload()
|
|
243
|
+
},
|
|
244
|
+
},
|
|
245
|
+
})
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
// 合同招标信息
|
|
249
|
+
async function handleOpenDebarmain() {
|
|
250
|
+
if (!detailInfo.value[getId('pcContractMainId')]) {
|
|
251
|
+
return ElMessage.warning('请先保存合同信息!')
|
|
252
|
+
}
|
|
253
|
+
try {
|
|
254
|
+
const data = await sendService({
|
|
255
|
+
serviceName: 'AMAF0601',
|
|
256
|
+
methodName: 'initLoad',
|
|
257
|
+
eiAttr: {
|
|
258
|
+
sourceContractVersion: detailInfo.value.contractVersion,
|
|
259
|
+
sourceContractCode: detailInfo.value.pcContractCode,
|
|
260
|
+
contractDiffType: contractDiffType.value,
|
|
261
|
+
sourceContractMainId: detailInfo.value[getId('pcContractMainId')],
|
|
262
|
+
},
|
|
263
|
+
blockName: 'result,diff_status',
|
|
264
|
+
})
|
|
265
|
+
const rowData = data && (data as any).result
|
|
266
|
+
const biddingInfo = rowData && rowData[0]
|
|
267
|
+
console.log('biddingInfo', biddingInfo)
|
|
268
|
+
const biddingDiffInfo = ref({}) as any
|
|
269
|
+
if (diffable.value) {
|
|
270
|
+
const diffData = data && (data as any).diff_status
|
|
271
|
+
biddingDiffInfo.value = compareData((diffData && diffData[0]) || {}, biddingInfo)
|
|
272
|
+
}
|
|
273
|
+
openDialog(AMAF0601, {
|
|
274
|
+
title: '合同招标信息',
|
|
275
|
+
componentParam: {
|
|
276
|
+
data: {
|
|
277
|
+
...biddingInfo,
|
|
278
|
+
sourceContractVersion: detailInfo.value.contractVersion,
|
|
279
|
+
sourceContractCode: detailInfo.value.pcContractCode,
|
|
280
|
+
sourceContractMainId: detailInfo.value[getId('pcContractMainId')],
|
|
281
|
+
},
|
|
282
|
+
editable: editable.value,
|
|
283
|
+
diffable: diffable.value,
|
|
284
|
+
isCorrecte: isCorrecte.value,
|
|
285
|
+
diff: biddingDiffInfo.value,
|
|
286
|
+
otherInfo: {
|
|
287
|
+
contractDiffType: contractDiffType.value,
|
|
288
|
+
},
|
|
289
|
+
getId,
|
|
290
|
+
},
|
|
291
|
+
})
|
|
292
|
+
}
|
|
293
|
+
catch {
|
|
294
|
+
|
|
295
|
+
}
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
// 文本编辑
|
|
299
|
+
async function handleApplicationText() {
|
|
300
|
+
if (!detailInfo.value[getId('pcContractMainId')]) {
|
|
301
|
+
return ElMessage.warning(`请先保存${isCorrecte.value ? '修正' : isCorrecte.value ? '变更' : '合同'}信息!`)
|
|
302
|
+
}
|
|
303
|
+
if (!(detailInfo.value.textType === 'STD' && !isEmpty(detailInfo.value.mouldName))) {
|
|
304
|
+
return ElMessage.warning(`只有【标准合同】且存在【标准合同模板】才可以文本编辑`)
|
|
305
|
+
}
|
|
306
|
+
try {
|
|
307
|
+
const applicationTextInfo = await sendService({
|
|
308
|
+
serviceName: 'PMPC0101',
|
|
309
|
+
methodName: isHistory.value ? 'goEditMouldHis' : 'goEditMould',
|
|
310
|
+
eiBlocks: [
|
|
311
|
+
createEiBlock({
|
|
312
|
+
[getId('pcContractMainId')]: detailInfo.value[getId('pcContractMainId')],
|
|
313
|
+
}, 'inqu_status'),
|
|
314
|
+
],
|
|
315
|
+
blockName: true,
|
|
316
|
+
}) as any
|
|
317
|
+
const applicationEditUrl = applicationTextInfo?.extAttr?.applicationEditUrl
|
|
318
|
+
console.log('applicationEditUrl', applicationEditUrl)
|
|
319
|
+
if (applicationEditUrl) {
|
|
320
|
+
openV6Page(`${applicationEditUrl}`)
|
|
321
|
+
}
|
|
322
|
+
else {
|
|
323
|
+
ElMessage.warning(`未查询到文本Url`)
|
|
324
|
+
}
|
|
325
|
+
}
|
|
326
|
+
catch {
|
|
327
|
+
|
|
328
|
+
}
|
|
329
|
+
}
|
|
330
|
+
|
|
331
|
+
async function refreshDetailData(id?) {
|
|
332
|
+
try {
|
|
333
|
+
const mainId = id ?? detailInfo.value[getId('pcContractMainId')]
|
|
334
|
+
const data = await fetchDetailInfo({
|
|
335
|
+
id: mainId,
|
|
336
|
+
}, false)
|
|
337
|
+
const newData = data && data[0]
|
|
338
|
+
console.log('newDetailInfo', newData)
|
|
339
|
+
if (newData) {
|
|
340
|
+
const localData = {
|
|
341
|
+
...detailInfo.value,
|
|
342
|
+
...newData,
|
|
343
|
+
[getId('pcContractMainId')]: mainId,
|
|
344
|
+
}
|
|
345
|
+
updateDetailInfo(localData)
|
|
346
|
+
updateFormData(localData)
|
|
347
|
+
updatePartyFormData()
|
|
348
|
+
}
|
|
349
|
+
}
|
|
350
|
+
catch {
|
|
351
|
+
|
|
352
|
+
}
|
|
353
|
+
}
|
|
354
|
+
|
|
355
|
+
// 保存
|
|
356
|
+
async function handleSave(flag = false) {
|
|
357
|
+
try {
|
|
358
|
+
await validator(flag)
|
|
359
|
+
const params = getData()
|
|
360
|
+
const convertParams = convertData(params)
|
|
361
|
+
console.log('params', params, convertParams)
|
|
362
|
+
if (showable.value && foreignFlag.value) {
|
|
363
|
+
convertParams.settleMethod = '30'
|
|
364
|
+
}
|
|
365
|
+
const eiBlocks = [
|
|
366
|
+
createEiBlock({
|
|
367
|
+
...convertParams,
|
|
368
|
+
[getId('pcContractMainId')]: detailInfo.value[getId('pcContractMainId')],
|
|
369
|
+
}, 'inqu_status'),
|
|
370
|
+
]
|
|
371
|
+
if (params.party) {
|
|
372
|
+
eiBlocks.push(createEiBlock({
|
|
373
|
+
...params.party,
|
|
374
|
+
[getId('pcContractMainId')]: detailInfo.value[getId('pcContractMainId')],
|
|
375
|
+
}, 'party_major'))
|
|
376
|
+
}
|
|
377
|
+
if (showable.value && foreignFlag.value) {
|
|
378
|
+
const foreignList = params.explain?.settle?.foreign || []
|
|
379
|
+
eiBlocks.push(createEiBlock(foreignList, 'result_7'))
|
|
380
|
+
}
|
|
381
|
+
let id
|
|
382
|
+
if (isCorrecteOrChange.value) {
|
|
383
|
+
if (!isEmpty(detailInfo.value.pcContractMainHisId)) {
|
|
384
|
+
await sendService({
|
|
385
|
+
serviceName: 'PMPC0102',
|
|
386
|
+
methodName: 'update',
|
|
387
|
+
eiBlocks,
|
|
388
|
+
blockName: 'primaryId',
|
|
389
|
+
}) as any
|
|
390
|
+
}
|
|
391
|
+
if (isCorrecte.value) {
|
|
392
|
+
const correcteEiBlock = [
|
|
393
|
+
createEiBlock(params.correcte, 'inqu_6_status'),
|
|
394
|
+
]
|
|
395
|
+
if (!isEmpty(detailInfo.value.pcContractMainHisId)) {
|
|
396
|
+
correcteEiBlock.push(...eiBlocks)
|
|
397
|
+
}
|
|
398
|
+
else {
|
|
399
|
+
correcteEiBlock.push(createEiBlock({
|
|
400
|
+
pcContractMainId: detailInfo.value.pcContractMainId,
|
|
401
|
+
}, 'inqu_status'))
|
|
402
|
+
}
|
|
403
|
+
const correcteEiResult = await sendService({
|
|
404
|
+
serviceName: 'PMPC0102',
|
|
405
|
+
methodName: 'saveCorrectionInfo',
|
|
406
|
+
eiBlocks: correcteEiBlock,
|
|
407
|
+
blockName: 'primaryId,inqu_6_status',
|
|
408
|
+
}) as any
|
|
409
|
+
console.log('correcteEiResult', correcteEiResult)
|
|
410
|
+
if (!isEmpty(detailInfo.value.pcContractMainHisId)) {
|
|
411
|
+
const correcteEiData = correcteEiResult.inqu_6_status || []
|
|
412
|
+
const correcteData = (correcteEiData && correcteEiData[0]) || {}
|
|
413
|
+
id = correcteData.pcContractMainHisId || ''
|
|
414
|
+
}
|
|
415
|
+
else {
|
|
416
|
+
id = correcteEiResult.primaryId || ''
|
|
417
|
+
}
|
|
418
|
+
}
|
|
419
|
+
else {
|
|
420
|
+
const changeEiBlock = [
|
|
421
|
+
createEiBlock(params.change, 'inqu_7_status'),
|
|
422
|
+
]
|
|
423
|
+
if (!isEmpty(detailInfo.value.pcContractMainHisId)) {
|
|
424
|
+
changeEiBlock.push(...eiBlocks)
|
|
425
|
+
}
|
|
426
|
+
else {
|
|
427
|
+
changeEiBlock.push(createEiBlock({
|
|
428
|
+
pcContractMainId: detailInfo.value.pcContractMainId,
|
|
429
|
+
}, 'inqu_status'))
|
|
430
|
+
}
|
|
431
|
+
const changeEiResult = await sendService({
|
|
432
|
+
serviceName: 'PMPC0102',
|
|
433
|
+
methodName: 'saveChangeInfo',
|
|
434
|
+
eiBlocks: changeEiBlock,
|
|
435
|
+
blockName: 'primaryId,inqu_7_status',
|
|
436
|
+
}) as any
|
|
437
|
+
console.log('changeEiResult', changeEiResult)
|
|
438
|
+
if (!isEmpty(detailInfo.value.pcContractMainHisId)) {
|
|
439
|
+
const changeEiData = changeEiResult.inqu_7_status || []
|
|
440
|
+
const changeData = (changeEiData && changeEiData[0]) || {}
|
|
441
|
+
id = changeData.pcContractMainHisId || ''
|
|
442
|
+
}
|
|
443
|
+
else {
|
|
444
|
+
id = changeEiResult.primaryId || ''
|
|
445
|
+
}
|
|
446
|
+
}
|
|
447
|
+
}
|
|
448
|
+
else {
|
|
449
|
+
id = await sendService({
|
|
450
|
+
serviceName: 'PMPC0101',
|
|
451
|
+
methodName: !flag ? 'saveTemp' : (isEmpty(detailInfo.value[getId('pcContractMainId')]) ? 'insert' : 'update'),
|
|
452
|
+
eiBlocks,
|
|
453
|
+
blockName: 'primaryId',
|
|
454
|
+
}) as any
|
|
455
|
+
}
|
|
456
|
+
console.log('save', id)
|
|
457
|
+
ElMessage.success('保存成功')
|
|
458
|
+
refreshDetailData(id)
|
|
459
|
+
if (isCorrecteOrChange.value) {
|
|
460
|
+
router.replace({
|
|
461
|
+
path: '/web/PMPC0102',
|
|
462
|
+
query: {
|
|
463
|
+
pcContractMainHisId: id,
|
|
464
|
+
businessType: businessType.value,
|
|
465
|
+
},
|
|
466
|
+
})
|
|
467
|
+
}
|
|
468
|
+
else {
|
|
469
|
+
router.replace({
|
|
470
|
+
path: '/web/PMPC0101',
|
|
471
|
+
query: {
|
|
472
|
+
pcContractMainId: id,
|
|
473
|
+
businessType: businessType.value,
|
|
474
|
+
},
|
|
475
|
+
})
|
|
476
|
+
}
|
|
477
|
+
}
|
|
478
|
+
catch {
|
|
479
|
+
|
|
480
|
+
}
|
|
481
|
+
}
|
|
482
|
+
|
|
483
|
+
// 生成合同号
|
|
484
|
+
async function handleGenerateContractNo() {
|
|
485
|
+
const tableData = goodsModule.value.getTableData()
|
|
486
|
+
if (!tableData.length) {
|
|
487
|
+
goodsModule.value.scrollIntoTop()
|
|
488
|
+
return ElMessage.warning('请先填写商品信息!')
|
|
489
|
+
}
|
|
490
|
+
try {
|
|
491
|
+
const standardData = await sendService({
|
|
492
|
+
serviceName: 'CMCG00',
|
|
493
|
+
methodName: 'queryStandard',
|
|
494
|
+
eiBlocks: [
|
|
495
|
+
createEiBlock({
|
|
496
|
+
cgGoodsStandardId: tableData[0]?.cgGoodsStandardId,
|
|
497
|
+
bookId: detailInfo.value.bookId,
|
|
498
|
+
}, 'inqu_status'),
|
|
499
|
+
],
|
|
500
|
+
blockName: 'result',
|
|
501
|
+
}) as any[]
|
|
502
|
+
console.log('standardData', standardData)
|
|
503
|
+
if (!standardData.length) {
|
|
504
|
+
return ElMessage.warning('商品简码查询为空!')
|
|
505
|
+
}
|
|
506
|
+
const standarInfo = (standardData && standardData[0]) || {}
|
|
507
|
+
if (isEmpty(standarInfo.simplifiedCode)) {
|
|
508
|
+
return ElMessage.warning('商品简码查询为空!')
|
|
509
|
+
}
|
|
510
|
+
const serialResult = await sendService({
|
|
511
|
+
serviceName: 'PMPC0101',
|
|
512
|
+
methodName: 'queryMaxSerialNum',
|
|
513
|
+
eiBlocks: [
|
|
514
|
+
createEiBlock({
|
|
515
|
+
bookId: detailInfo.value.bookId,
|
|
516
|
+
}, 'inqu_status'),
|
|
517
|
+
],
|
|
518
|
+
blockName: true,
|
|
519
|
+
}) as any
|
|
520
|
+
console.log('serialResult', serialResult)
|
|
521
|
+
const currentSerialNum = (serialResult?.extAttr?.currentSerialNum) || ''
|
|
522
|
+
openDialog(PMPC9999, {
|
|
523
|
+
title: '生成合同号',
|
|
524
|
+
width: (inSingapore.value || isBW.value) ? 880 : 680,
|
|
525
|
+
componentParam: {
|
|
526
|
+
formParams: {
|
|
527
|
+
simplifiedCode: standarInfo.simplifiedCode,
|
|
528
|
+
currentSerialNum,
|
|
529
|
+
},
|
|
530
|
+
otherInfo: {
|
|
531
|
+
inSingapore: inSingapore.value,
|
|
532
|
+
isBW: isBW.value,
|
|
533
|
+
},
|
|
534
|
+
editable: editable.value,
|
|
535
|
+
},
|
|
536
|
+
}, async (data, exposed) => {
|
|
537
|
+
try {
|
|
538
|
+
await ElMessageBox.confirm(`合同号为:${data.pcContractCode};合同号一旦生成不允许修改,是否继续生成`)
|
|
539
|
+
await sendService({
|
|
540
|
+
serviceName: 'PMPC0101',
|
|
541
|
+
methodName: 'handleBuildContractCode',
|
|
542
|
+
eiBlocks: [
|
|
543
|
+
createEiBlock({
|
|
544
|
+
...data,
|
|
545
|
+
[getId('pcContractMainId')]: detailInfo.value[getId('pcContractMainId')],
|
|
546
|
+
}, 'inqu_status'),
|
|
547
|
+
],
|
|
548
|
+
})
|
|
549
|
+
exposed.close()
|
|
550
|
+
ElMessage.success('生成成功')
|
|
551
|
+
refreshDetailData()
|
|
552
|
+
}
|
|
553
|
+
catch {
|
|
554
|
+
|
|
555
|
+
}
|
|
556
|
+
})
|
|
557
|
+
}
|
|
558
|
+
catch {
|
|
559
|
+
|
|
560
|
+
}
|
|
561
|
+
}
|
|
562
|
+
|
|
563
|
+
// 递交
|
|
564
|
+
function handleSubmit() {
|
|
565
|
+
if (!detailInfo.value[getId('pcContractMainId')]) {
|
|
566
|
+
return ElMessage.warning('请先保存合同信息!')
|
|
567
|
+
}
|
|
568
|
+
if (isEmpty(detailInfo.value.pcContractCode)) {
|
|
569
|
+
return ElMessage.warning('请先生成合同号!')
|
|
570
|
+
}
|
|
571
|
+
if (isEmpty(detailInfo.value.tradePropertyCode)) {
|
|
572
|
+
baseModule.value.updateInvalidFieldStatus({
|
|
573
|
+
field: 'tradePropertyCode',
|
|
574
|
+
message: '未获取到主要客商的贸易性质,请检查客商信息数据',
|
|
575
|
+
})
|
|
576
|
+
return
|
|
577
|
+
}
|
|
578
|
+
if (isEmpty(detailInfo.value.supplierCreditFlag)) {
|
|
579
|
+
baseModule.value.updateInvalidFieldStatus({
|
|
580
|
+
field: 'supplierCreditFlag',
|
|
581
|
+
message: '未获取到主要客商的授信情况,请检查客商信息数据',
|
|
582
|
+
})
|
|
583
|
+
return
|
|
584
|
+
}
|
|
585
|
+
ElMessageBox.confirm(`确定要递交吗?`).then(async () => {
|
|
586
|
+
try {
|
|
587
|
+
const proposalResult = await sendService({
|
|
588
|
+
serviceName: 'ABBP06',
|
|
589
|
+
methodName: 'checkProposalBeforeContractSubmit',
|
|
590
|
+
eiAttr: {
|
|
591
|
+
bpProposalMainId: detailInfo.value.bpProposalMainId,
|
|
592
|
+
proposalVersion: detailInfo.value.proposalVersion,
|
|
593
|
+
},
|
|
594
|
+
blockName: true,
|
|
595
|
+
}) as any
|
|
596
|
+
console.log('proposalResult', proposalResult)
|
|
597
|
+
const proposalAttr = (proposalResult.getAttr() as any) || {}
|
|
598
|
+
console.log('proposalAttr', proposalAttr)
|
|
599
|
+
if (proposalAttr.needUpdateProposal === 'Y') {
|
|
600
|
+
await ElMessageBox.confirm(`询报价已更新,提交前请先更新合同,是否现在更新?`)
|
|
601
|
+
}
|
|
602
|
+
const partyResult = await sendService({
|
|
603
|
+
serviceName: 'ACCO01',
|
|
604
|
+
methodName: 'queryCheckPartyCase',
|
|
605
|
+
eiBlocks: [
|
|
606
|
+
createEiBlock({
|
|
607
|
+
primaryId: detailInfo.value[getId('pcContractMainId')],
|
|
608
|
+
billDataType: isCorrecteOrChange.value ? 'PMPC_HIS' : 'PMPC_SRC',
|
|
609
|
+
bookId: detailInfo.value.bookId,
|
|
610
|
+
}, 'inqu_status'),
|
|
611
|
+
],
|
|
612
|
+
blockName: true,
|
|
613
|
+
}) as any
|
|
614
|
+
console.log('partyResult', partyResult)
|
|
615
|
+
const partyStatus = partyResult.status
|
|
616
|
+
if (partyStatus === 100) {
|
|
617
|
+
await ElMessageBox.confirm(partyResult.msg)
|
|
618
|
+
}
|
|
619
|
+
const restrictResult = await sendService({
|
|
620
|
+
serviceName: 'ACCO01',
|
|
621
|
+
methodName: 'queryRestrictInner',
|
|
622
|
+
eiBlocks: [
|
|
623
|
+
createEiBlock({
|
|
624
|
+
mainPkId: detailInfo.value[getId('pcContractMainId')],
|
|
625
|
+
mainCode: detailInfo.value.pcContractCode,
|
|
626
|
+
billDataType: isCorrecteOrChange.value ? 'PMPC_HIS' : 'PMPC_SRC',
|
|
627
|
+
bookId: detailInfo.value.bookId,
|
|
628
|
+
functionNodeCode: {
|
|
629
|
+
20: 'CONTRACT_ALT',
|
|
630
|
+
30: 'CONTRACT_UPDATE',
|
|
631
|
+
}[detailInfo.value.operateType] || 'CONTRACT_NEW',
|
|
632
|
+
}, 'inqu_status'),
|
|
633
|
+
],
|
|
634
|
+
blockName: true,
|
|
635
|
+
}) as any
|
|
636
|
+
console.log('restrictResult', restrictResult)
|
|
637
|
+
const restrictMessage = (restrictResult?.extAttr?.messageBody) || {}
|
|
638
|
+
if (!(isEmpty(restrictMessage.prompt) && restrictMessage.flag === true)) {
|
|
639
|
+
await ElMessageBox.confirm(`${restrictMessage.prompt}禁入,如需继续执行,请操作“确定”,如中断执行,请操作“取消”`)
|
|
640
|
+
}
|
|
641
|
+
const matchResult = await sendService({
|
|
642
|
+
serviceName: 'ACCO01',
|
|
643
|
+
methodName: 'matchDefaultResponsibility',
|
|
644
|
+
eiBlocks: [
|
|
645
|
+
createEiBlock({
|
|
646
|
+
mainPkId: detailInfo.value[getId('pcContractMainId')],
|
|
647
|
+
isHis: isHistory.value ? 'Y' : 'N',
|
|
648
|
+
contractType: 'PC',
|
|
649
|
+
}, 'inqu_status'),
|
|
650
|
+
],
|
|
651
|
+
blockName: 'responsibility',
|
|
652
|
+
}) as any[]
|
|
653
|
+
console.log('matchResult', matchResult)
|
|
654
|
+
const matchInfo = (matchResult && matchResult[0]) || {}
|
|
655
|
+
const categorys: string[] = []
|
|
656
|
+
if (!isEmpty(matchInfo.dbCategoryId1)) {
|
|
657
|
+
categorys.push(matchInfo.categoryName1)
|
|
658
|
+
if (!isEmpty(matchInfo.dbCategoryId2)) {
|
|
659
|
+
categorys.push(matchInfo.categoryName2)
|
|
660
|
+
if (!isEmpty(matchInfo.dbCategoryId3)) {
|
|
661
|
+
categorys.push(matchInfo.categoryName3)
|
|
662
|
+
}
|
|
663
|
+
}
|
|
664
|
+
}
|
|
665
|
+
const eiBlocks = [
|
|
666
|
+
createEiBlock({
|
|
667
|
+
[getId('pcContractMainId')]: detailInfo.value[getId('pcContractMainId')],
|
|
668
|
+
}, 'result'),
|
|
669
|
+
]
|
|
670
|
+
if (categorys.length) {
|
|
671
|
+
try {
|
|
672
|
+
await ElMessageBox.confirm(`系统推荐选择交易职责:${categorys.join('/')},是否更换?`)
|
|
673
|
+
eiBlocks.push(createEiBlock(matchInfo, 'responsibility'))
|
|
674
|
+
}
|
|
675
|
+
catch {
|
|
676
|
+
|
|
677
|
+
}
|
|
678
|
+
}
|
|
679
|
+
const approvedResult = await sendService({
|
|
680
|
+
serviceName: isCorrecteOrChange.value ? 'PMPC02' : 'PMPC01',
|
|
681
|
+
methodName: isCorrecteOrChange.value ? 'checkContractHisSubmitApproved' : 'checkContractSubmitApproved',
|
|
682
|
+
eiBlocks,
|
|
683
|
+
blockName: true,
|
|
684
|
+
}) as any
|
|
685
|
+
console.log('approvedResult', approvedResult)
|
|
686
|
+
const approvedData = (approvedResult?.extAttr) || {}
|
|
687
|
+
if (isCorrecteOrChange.value && approvedData.changedProtocolFlag === 'OPTIONAL') {
|
|
688
|
+
await ElMessageBox.confirm(`变更协议文本未打印,是否继续提交?`)
|
|
689
|
+
}
|
|
690
|
+
const flag = await judgeIsDirectPass(approvedData.approveTypeCode || '', approvedData.organizationId || '', approvedData.docType || '', '')
|
|
691
|
+
await startApproveProcess({
|
|
692
|
+
originId: approvedData.wfBizId || '',
|
|
693
|
+
originCode: approvedData.wfBizCode || '',
|
|
694
|
+
approveTypeCode: approvedData.approveTypeCode || '',
|
|
695
|
+
organizationId: approvedData.organizationId || '',
|
|
696
|
+
docType: approvedData.docType || '',
|
|
697
|
+
variables: approvedData.variables || {},
|
|
698
|
+
callback: () => {},
|
|
699
|
+
callbackServiceName: !flag ? (isCorrecteOrChange.value ? 'PMPC02' : 'PMPC01') : '',
|
|
700
|
+
callbackMethodName: !flag ? 'updateStatus' : '',
|
|
701
|
+
callbackParam: approvedData.callbackParam || {},
|
|
702
|
+
taskExtraDisplayContent: approvedData.taskExtraDisplayContent || '',
|
|
703
|
+
billDisplayData: approvedData.billDisplayData || {},
|
|
704
|
+
nextActivityUserList: [],
|
|
705
|
+
runtimeCheckFlag: undefined,
|
|
706
|
+
})
|
|
707
|
+
ElMessage.success(`递交成功`)
|
|
708
|
+
refreshDetailData()
|
|
709
|
+
}
|
|
710
|
+
catch {
|
|
711
|
+
|
|
712
|
+
}
|
|
713
|
+
})
|
|
714
|
+
}
|
|
715
|
+
|
|
716
|
+
// 变更协议打印
|
|
717
|
+
async function handlePrintChangeProtocol() {
|
|
718
|
+
if (!detailInfo.value.pcContractMainHisId) {
|
|
719
|
+
return ElMessage.warning('请先保存变更信息!')
|
|
720
|
+
}
|
|
721
|
+
try {
|
|
722
|
+
await ElMessageBox.confirm(`确定要变更协议打印吗?`)
|
|
723
|
+
const protocolPrintResult = await sendService({
|
|
724
|
+
serviceName: 'PMPC0102',
|
|
725
|
+
methodName: 'printChangedProtocol',
|
|
726
|
+
eiBlocks: [
|
|
727
|
+
createEiBlock({
|
|
728
|
+
pcContractMainHisId: detailInfo.value.pcContractMainHisId,
|
|
729
|
+
}, 'inqu_status'),
|
|
730
|
+
],
|
|
731
|
+
blockName: true,
|
|
732
|
+
}) as any
|
|
733
|
+
console.log('protocolPrintResult', protocolPrintResult)
|
|
734
|
+
const applicationEditUrl = protocolPrintResult?.extAttr?.applicationEditUrl
|
|
735
|
+
if (applicationEditUrl) {
|
|
736
|
+
ElMessage.success(`变更协议打印成功`)
|
|
737
|
+
openV6Page(`${applicationEditUrl}`)
|
|
738
|
+
}
|
|
739
|
+
else {
|
|
740
|
+
ElMessage.warning(`未查询到变更协议Url`)
|
|
741
|
+
}
|
|
742
|
+
}
|
|
743
|
+
catch {
|
|
744
|
+
|
|
745
|
+
}
|
|
746
|
+
}
|
|
747
|
+
|
|
748
|
+
// 询报价信息
|
|
749
|
+
function handleOpenProposal() {
|
|
750
|
+
const path = ['/web/ABBP0201', decodeURIComponent(Qs.stringify({
|
|
751
|
+
serviceName: 'ABBP02',
|
|
752
|
+
methodName: 'detail',
|
|
753
|
+
status: true,
|
|
754
|
+
bpProposalMainId: detailInfo.value.bpProposalMainId,
|
|
755
|
+
}))].join('?')
|
|
756
|
+
if (import.meta.env.VITE_USER_NODE_ENV === 'development') {
|
|
757
|
+
router.push(path)
|
|
758
|
+
}
|
|
759
|
+
else {
|
|
760
|
+
openV6Page(`${import.meta.env.VITE_GRIC_URL}/baseVue/index.html#${path}`)
|
|
761
|
+
}
|
|
762
|
+
}
|
|
763
|
+
|
|
764
|
+
// 变更生效
|
|
765
|
+
function handleUpdateEffect() {
|
|
766
|
+
if (!detailInfo.value[getId('pcContractMainId')]) {
|
|
767
|
+
return ElMessage.warning('请先保存合同信息!')
|
|
768
|
+
}
|
|
769
|
+
const contractStatus = detailInfo.value.contractStatus
|
|
770
|
+
const operateType = detailInfo.value.operateType
|
|
771
|
+
if (!(['30'].includes(contractStatus) && ['20'].includes(operateType))) {
|
|
772
|
+
ElMessage.warning(`只有【拟签】状态下的【变更合同】才可以变更生效`)
|
|
773
|
+
return
|
|
774
|
+
}
|
|
775
|
+
openDialog(PMPC9916, {
|
|
776
|
+
title: '变更生效信息',
|
|
777
|
+
width: 1100,
|
|
778
|
+
componentParam: {
|
|
779
|
+
formParams: {
|
|
780
|
+
...detailInfo.value,
|
|
781
|
+
partyName: detailInfo.value.supplierName,
|
|
782
|
+
},
|
|
783
|
+
},
|
|
784
|
+
}, async (data, exposed) => {
|
|
785
|
+
try {
|
|
786
|
+
const restrictResult = await sendService({
|
|
787
|
+
serviceName: 'ACCO01',
|
|
788
|
+
methodName: 'queryRestrictInner',
|
|
789
|
+
eiBlocks: [
|
|
790
|
+
createEiBlock({
|
|
791
|
+
mainPkId: detailInfo.value.pcContractMainHisId,
|
|
792
|
+
mainCode: detailInfo.value.pcContractCode,
|
|
793
|
+
billDataType: 'PMPC_HIS',
|
|
794
|
+
bookId: detailInfo.value.bookId,
|
|
795
|
+
functionNodeCode: 'CONTRACT_ALT',
|
|
796
|
+
}, 'inqu_status'),
|
|
797
|
+
],
|
|
798
|
+
blockName: true,
|
|
799
|
+
}) as any
|
|
800
|
+
console.log('restrictResult', restrictResult)
|
|
801
|
+
const restrictMessage = (restrictResult?.extAttr?.messageBody) || {}
|
|
802
|
+
if (!(isEmpty(restrictMessage.prompt) && restrictMessage.flag === true)) {
|
|
803
|
+
await ElMessageBox.confirm(`${restrictMessage.prompt}禁入,如需继续执行,请操作“确定”,如中断执行,请操作“取消”`)
|
|
804
|
+
}
|
|
805
|
+
const signResult = await sendService({
|
|
806
|
+
serviceName: 'PMPC02',
|
|
807
|
+
methodName: 'updateEffect',
|
|
808
|
+
eiBlocks: [
|
|
809
|
+
createEiBlock({
|
|
810
|
+
...detailInfo.value,
|
|
811
|
+
...data,
|
|
812
|
+
}, 'inqu_status'),
|
|
813
|
+
],
|
|
814
|
+
blockName: true,
|
|
815
|
+
}) as any
|
|
816
|
+
console.log('signResult', signResult)
|
|
817
|
+
if (signResult.status === 99) {
|
|
818
|
+
ElMessage.warning(signResult.msg)
|
|
819
|
+
return
|
|
820
|
+
}
|
|
821
|
+
ElMessage.success(`变更生效成功`)
|
|
822
|
+
exposed.close()
|
|
823
|
+
refreshDetailData()
|
|
824
|
+
}
|
|
825
|
+
catch {
|
|
826
|
+
|
|
827
|
+
}
|
|
828
|
+
})
|
|
829
|
+
}
|
|
830
|
+
|
|
831
|
+
// 拟签回退
|
|
832
|
+
async function handleSignBack() {
|
|
833
|
+
if (!detailInfo.value[getId('pcContractMainId')]) {
|
|
834
|
+
return ElMessage.warning('请先保存合同信息!')
|
|
835
|
+
}
|
|
836
|
+
const contractStatus = detailInfo.value.contractStatus
|
|
837
|
+
if (!['30'].includes(contractStatus)) {
|
|
838
|
+
ElMessage.warning(`只有【拟签】状态下的采购合同才可以拟签回退`)
|
|
839
|
+
return
|
|
840
|
+
}
|
|
841
|
+
try {
|
|
842
|
+
await ElMessageBox.confirm(`确定要拟签回退吗?`)
|
|
843
|
+
await sendService({
|
|
844
|
+
serviceName: 'ACCO01',
|
|
845
|
+
methodName: 'contractSignBack',
|
|
846
|
+
eiBlocks: [
|
|
847
|
+
createEiBlock({
|
|
848
|
+
mainPkId: detailInfo.value.pcContractMainHisId,
|
|
849
|
+
contractType: 'PMPC',
|
|
850
|
+
orgId: detailInfo.value.orgId,
|
|
851
|
+
contractCode: detailInfo.value.pcContractCode,
|
|
852
|
+
approveTypeCode: 'PMPC_CONT_CHANGE',
|
|
853
|
+
}, 'inqu_status'),
|
|
854
|
+
],
|
|
855
|
+
})
|
|
856
|
+
ElMessage.success(`拟签回退成功`)
|
|
857
|
+
refreshDetailData()
|
|
858
|
+
}
|
|
859
|
+
catch {
|
|
860
|
+
|
|
861
|
+
}
|
|
862
|
+
}
|
|
863
|
+
|
|
864
|
+
const route = useRoute()
|
|
865
|
+
const routeName = route.name as string
|
|
866
|
+
const findBtnByPath: any = inject<((path: string) => any) | undefined>('__findBtnByPath__', () => [])
|
|
867
|
+
const id = computed(() => {
|
|
868
|
+
if (isCorrecte.value) {
|
|
869
|
+
return 'INQU_6'
|
|
870
|
+
}
|
|
871
|
+
else if (isChange.value) {
|
|
872
|
+
return 'INQU_7'
|
|
873
|
+
}
|
|
874
|
+
else {
|
|
875
|
+
return 'INQU'
|
|
876
|
+
}
|
|
877
|
+
})
|
|
878
|
+
|
|
879
|
+
watch([
|
|
880
|
+
() => foreignFlag.value,
|
|
881
|
+
() => editable.value,
|
|
882
|
+
() => isHistory.value,
|
|
883
|
+
() => detailInfo.value.contractStatus,
|
|
884
|
+
() => detailInfo.value.pcContractCode,
|
|
885
|
+
() => detailInfo.value[getId('pcContractMainId')],
|
|
886
|
+
], () => {
|
|
887
|
+
const __btnList__ = findBtnByPath(routeName) || {}
|
|
888
|
+
const btns = __btnList__[id.value] || []
|
|
889
|
+
if (!isEmpty(detailInfo.value.bpProposalMainId) && !isHistory.value) {
|
|
890
|
+
btns.push({
|
|
891
|
+
id: generateUUID(),
|
|
892
|
+
nodeName: '询报价信息',
|
|
893
|
+
nodeCode: 'PROPOSAL_INFO',
|
|
894
|
+
nodeSort: 60,
|
|
895
|
+
})
|
|
896
|
+
}
|
|
897
|
+
toolButtons.value = btns.map((item) => {
|
|
898
|
+
if (item.nodeCode === 'APPLICATION_TEXT') {
|
|
899
|
+
item.disabled = isHistory.value ? false : isEmpty(detailInfo.value[getId('pcContractMainId')])
|
|
900
|
+
}
|
|
901
|
+
else if (item.nodeCode === 'GENERATE_CONTRACT_NO') {
|
|
902
|
+
item.disabled = !(!isEmpty(detailInfo.value.pcContractMainId) && isEmpty(detailInfo.value.pcContractCode))
|
|
903
|
+
item.visible = foreignFlag.value
|
|
904
|
+
}
|
|
905
|
+
else if (['UPDATE_EFFECT'].includes(item.nodeCode)) {
|
|
906
|
+
item.visible = ['30'].includes(detailInfo.value.contractStatus)
|
|
907
|
+
}
|
|
908
|
+
else if (['SIGN_BACK'].includes(item.nodeCode)) {
|
|
909
|
+
item.disabled = !['30'].includes(detailInfo.value.contractStatus)
|
|
910
|
+
}
|
|
911
|
+
return {
|
|
912
|
+
...item,
|
|
913
|
+
disabled: ['OPEN_DEBARMAIN', 'PRINT_CHANGE_PROTOCOL', 'OPEN_RECORD', 'OPEN_RECORD_CHANGE', 'OPEN_RECORD_CORRECTE', 'PROPOSAL_INFO', 'UPDATE_EFFECT'].includes(item.nodeCode) ? false : ['SIGN_BACK'].includes(item.nodeCode) ? item.disabled : (!editable.value || (item.disabled ?? false)),
|
|
914
|
+
visible: item.visible ?? true,
|
|
915
|
+
}
|
|
916
|
+
}).sort((a, b) => {
|
|
917
|
+
return a.nodeSort >= b.nodeSort ? 1 : -1
|
|
918
|
+
})
|
|
919
|
+
}, {
|
|
920
|
+
immediate: true,
|
|
921
|
+
})
|
|
922
|
+
</script>
|
|
923
|
+
|
|
924
|
+
<style scoped></style>
|