@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,341 @@
|
|
|
1
|
+
import { computed, inject, reactive, watch } from 'vue'
|
|
2
|
+
import { commafy, merge } from 'xe-utils'
|
|
3
|
+
import { EiInfo } from '@eplat/ei'
|
|
4
|
+
import { isEmpty, isNumber } from '@/utils/is'
|
|
5
|
+
import { getCodeSetByService } from '@/utils/eiTools'
|
|
6
|
+
import { useForm } from '@/hooks/useForm'
|
|
7
|
+
|
|
8
|
+
export function createFormConfig() {
|
|
9
|
+
const {
|
|
10
|
+
commonVxeInput,
|
|
11
|
+
commonVxeTextarea,
|
|
12
|
+
commonFormSelect,
|
|
13
|
+
commonFormRadio,
|
|
14
|
+
// commonDateRange,
|
|
15
|
+
createFormRules,
|
|
16
|
+
validateField,
|
|
17
|
+
getFormData,
|
|
18
|
+
} = useForm()
|
|
19
|
+
|
|
20
|
+
const { diffable, detailInfo, attrInfo, diffInfo, fileCount } = inject('__PMPC0101__info__') as any
|
|
21
|
+
|
|
22
|
+
const showCashBasisFlag = computed(() => attrInfo.value?.showCashBasisFlag)
|
|
23
|
+
|
|
24
|
+
const formData = reactive(merge({
|
|
25
|
+
pcContractMainId: '',
|
|
26
|
+
pcContractMainHisId: '',
|
|
27
|
+
orgId: '',
|
|
28
|
+
bookId: '',
|
|
29
|
+
deptId: '',
|
|
30
|
+
groupId: '',
|
|
31
|
+
companyId: '',
|
|
32
|
+
pcContractCode: '',
|
|
33
|
+
contractVersion: '',
|
|
34
|
+
pcContractExternalNo: '',
|
|
35
|
+
contractName: '',
|
|
36
|
+
contractStatus: '',
|
|
37
|
+
tradePropertyCode: '',
|
|
38
|
+
contractTypeStock: '',
|
|
39
|
+
contractTypeArea: '',
|
|
40
|
+
contractTypeSourcing: '',
|
|
41
|
+
contractTypeMode: '',
|
|
42
|
+
contractTypeOpen: '',
|
|
43
|
+
jyzz: '',
|
|
44
|
+
responsibilityCategoryLCode: '',
|
|
45
|
+
responsibilityCategoryLName: '',
|
|
46
|
+
responsibilityCategoryMCode: '',
|
|
47
|
+
responsibilityCategoryMName: '',
|
|
48
|
+
responsibilityCategorySCode: '',
|
|
49
|
+
responsibilityCategorySName: '',
|
|
50
|
+
signOnceAccreditName: '',
|
|
51
|
+
signOnceAccreditCode: '',
|
|
52
|
+
recommendSignerCompanyName: '',
|
|
53
|
+
signOnceAccreditPost: '',
|
|
54
|
+
signOnceAccreditPostId: '',
|
|
55
|
+
beSignAuthorizeStateDesc: '',
|
|
56
|
+
supplierCreditFlag: '',
|
|
57
|
+
lastShipmentDate: '',
|
|
58
|
+
contractAmount: '',
|
|
59
|
+
contractAmountTax: '',
|
|
60
|
+
contractAmountNoTax: '',
|
|
61
|
+
textType: '',
|
|
62
|
+
textFirstFlag: '',
|
|
63
|
+
mouldName: '',
|
|
64
|
+
mouldCode: '',
|
|
65
|
+
mouldId: '',
|
|
66
|
+
mouldVersion: '',
|
|
67
|
+
textElectronicFlag: '',
|
|
68
|
+
// sealUsageType: '',
|
|
69
|
+
// contractStartDate: '',
|
|
70
|
+
// contractEndDate: '',
|
|
71
|
+
teamCode: '',
|
|
72
|
+
teamName: '',
|
|
73
|
+
salesPersonCode: '',
|
|
74
|
+
salesPersonName: '',
|
|
75
|
+
relContractMainCode: '',
|
|
76
|
+
contractInfo: '',
|
|
77
|
+
cashBasisFlag: '',
|
|
78
|
+
directFlag: '',
|
|
79
|
+
purchaseType: '',
|
|
80
|
+
operatorDepartmentCode: '',
|
|
81
|
+
operatorDepartmentName: '',
|
|
82
|
+
operatorPersonCode: '',
|
|
83
|
+
operatorPersonName: '',
|
|
84
|
+
remark: '',
|
|
85
|
+
fileCount: 0,
|
|
86
|
+
stopDesc: '',
|
|
87
|
+
}, detailInfo.value, {
|
|
88
|
+
fileCount: fileCount.value,
|
|
89
|
+
}))
|
|
90
|
+
|
|
91
|
+
watch(() => detailInfo.value.contractAmount, () => {
|
|
92
|
+
formData.contractAmount = !isEmpty(detailInfo.value.contractAmount) ? commafy(Number.parseFloat(detailInfo.value.contractAmount), { digits: 2 }) : ''
|
|
93
|
+
}, {
|
|
94
|
+
immediate: true,
|
|
95
|
+
})
|
|
96
|
+
|
|
97
|
+
const baseFields = computed(() => {
|
|
98
|
+
return [
|
|
99
|
+
{
|
|
100
|
+
field: 'contractName',
|
|
101
|
+
title: '采购合同名称',
|
|
102
|
+
itemRender: commonVxeInput(),
|
|
103
|
+
span: 24,
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
field: 'supplierName',
|
|
107
|
+
title: '供应商名称',
|
|
108
|
+
itemRender: commonVxeInput(),
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
field: 'pcContractCode',
|
|
112
|
+
title: '合同号',
|
|
113
|
+
itemRender: commonVxeInput(),
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
span: 8,
|
|
117
|
+
},
|
|
118
|
+
{
|
|
119
|
+
field: 'operatorDepartmentCode',
|
|
120
|
+
title: '执行部门',
|
|
121
|
+
itemRender: commonFormSelect(null, {
|
|
122
|
+
promiseFn: async () => {
|
|
123
|
+
const delay = (ms) => {
|
|
124
|
+
return new Promise(resolve => setTimeout(async () => {
|
|
125
|
+
try {
|
|
126
|
+
const params = new EiInfo()
|
|
127
|
+
params.set('inqu_status-0-orgId', formData.orgId)
|
|
128
|
+
params.set('inqu_status-0-bookId', formData.bookId)
|
|
129
|
+
params.set('inqu_status-0-deptId', formData.deptId)
|
|
130
|
+
const list = await getCodeSetByService({
|
|
131
|
+
serviceName: 'PMPC0101',
|
|
132
|
+
methodName: 'queryDeptInfo',
|
|
133
|
+
params,
|
|
134
|
+
blockName: 'deptBlock',
|
|
135
|
+
value: 'valueField',
|
|
136
|
+
label: 'textField',
|
|
137
|
+
})
|
|
138
|
+
resolve(list || [])
|
|
139
|
+
}
|
|
140
|
+
catch {
|
|
141
|
+
resolve([])
|
|
142
|
+
}
|
|
143
|
+
}, ms))
|
|
144
|
+
}
|
|
145
|
+
try {
|
|
146
|
+
const list = await delay(0)
|
|
147
|
+
return Promise.resolve(list)
|
|
148
|
+
}
|
|
149
|
+
catch {
|
|
150
|
+
return Promise.resolve([])
|
|
151
|
+
}
|
|
152
|
+
},
|
|
153
|
+
}),
|
|
154
|
+
},
|
|
155
|
+
{
|
|
156
|
+
field: 'teamCode',
|
|
157
|
+
title: '创业团队',
|
|
158
|
+
itemRender: commonFormSelect(null, {
|
|
159
|
+
promiseFn: async () => {
|
|
160
|
+
const delay = (ms) => {
|
|
161
|
+
return new Promise(resolve => setTimeout(async () => {
|
|
162
|
+
try {
|
|
163
|
+
const params = new EiInfo()
|
|
164
|
+
params.set('inqu_status-0-orgId', formData.orgId)
|
|
165
|
+
params.set('inqu_status-0-bookId', formData.bookId)
|
|
166
|
+
params.set('inqu_status-0-deptId', formData.deptId)
|
|
167
|
+
const list = await getCodeSetByService({
|
|
168
|
+
serviceName: 'ACCO03',
|
|
169
|
+
methodName: 'queryTeam',
|
|
170
|
+
params,
|
|
171
|
+
blockName: 'teamBlock',
|
|
172
|
+
value: 'valueField',
|
|
173
|
+
label: 'textField',
|
|
174
|
+
})
|
|
175
|
+
resolve(list || [])
|
|
176
|
+
}
|
|
177
|
+
catch {
|
|
178
|
+
resolve([])
|
|
179
|
+
}
|
|
180
|
+
}, ms))
|
|
181
|
+
}
|
|
182
|
+
try {
|
|
183
|
+
const list = await delay(0)
|
|
184
|
+
return Promise.resolve(list)
|
|
185
|
+
}
|
|
186
|
+
catch {
|
|
187
|
+
return Promise.resolve([])
|
|
188
|
+
}
|
|
189
|
+
},
|
|
190
|
+
}),
|
|
191
|
+
},
|
|
192
|
+
{
|
|
193
|
+
span: 8,
|
|
194
|
+
},
|
|
195
|
+
{
|
|
196
|
+
field: 'contractType',
|
|
197
|
+
title: '合同类型',
|
|
198
|
+
span: 16,
|
|
199
|
+
itemRender: {
|
|
200
|
+
name: 'formComponentsList',
|
|
201
|
+
props: {
|
|
202
|
+
compsProps: [
|
|
203
|
+
{
|
|
204
|
+
field: 'contractTypeStock',
|
|
205
|
+
span: 0,
|
|
206
|
+
classname: 'flex-1',
|
|
207
|
+
...commonFormSelect('brmerp.pm.contractTypeStock'),
|
|
208
|
+
},
|
|
209
|
+
{
|
|
210
|
+
field: 'contractTypeArea',
|
|
211
|
+
span: 0,
|
|
212
|
+
classname: 'flex-1',
|
|
213
|
+
...commonFormSelect('brmerp.pm.contractTypeArea'),
|
|
214
|
+
},
|
|
215
|
+
{
|
|
216
|
+
field: 'contractTypeSourcing',
|
|
217
|
+
span: 0,
|
|
218
|
+
classname: 'flex-1',
|
|
219
|
+
...commonFormSelect('brmerp.pm.contractTypeSourcingNew'),
|
|
220
|
+
},
|
|
221
|
+
{
|
|
222
|
+
field: 'contractTypeMode',
|
|
223
|
+
span: 0,
|
|
224
|
+
classname: 'flex-1',
|
|
225
|
+
...commonFormSelect('brmerp.pm.contractTypeModeNew'),
|
|
226
|
+
},
|
|
227
|
+
{
|
|
228
|
+
field: 'contractTypeOpen',
|
|
229
|
+
span: 0,
|
|
230
|
+
classname: 'flex-1',
|
|
231
|
+
...commonFormSelect('brmerp.ac.contractTypeOpen'),
|
|
232
|
+
},
|
|
233
|
+
],
|
|
234
|
+
},
|
|
235
|
+
},
|
|
236
|
+
},
|
|
237
|
+
{
|
|
238
|
+
field: 'pointPricePart',
|
|
239
|
+
title: '是否我方点价',
|
|
240
|
+
visibleMethod: ({ data }) => data.priceSubtype === '1',
|
|
241
|
+
itemRender: commonFormRadio('brmerp.bm.yesOrNo'),
|
|
242
|
+
},
|
|
243
|
+
{
|
|
244
|
+
visibleMethod: ({ data }) => data.priceSubtype !== '1',
|
|
245
|
+
span: 8,
|
|
246
|
+
},
|
|
247
|
+
{
|
|
248
|
+
field: 'contractAmount',
|
|
249
|
+
title: '合同总金额',
|
|
250
|
+
formatter: ({ itemValue }) => !isEmpty(itemValue) ? commafy(Number.parseFloat(itemValue), { digits: 2 }) : '',
|
|
251
|
+
itemRender: commonVxeInput(),
|
|
252
|
+
},
|
|
253
|
+
{
|
|
254
|
+
field: 'priceTaxFlag',
|
|
255
|
+
title: '是否含税单价',
|
|
256
|
+
itemRender: commonFormRadio('brmerp.bm.priceTaxFlag'),
|
|
257
|
+
},
|
|
258
|
+
{
|
|
259
|
+
field: 'approveSubmitName',
|
|
260
|
+
title: '提交人',
|
|
261
|
+
itemRender: commonVxeInput(),
|
|
262
|
+
},
|
|
263
|
+
{
|
|
264
|
+
field: 'cashBasisFlag',
|
|
265
|
+
title: '收入确认法',
|
|
266
|
+
visibleMethod: () => ['true', true].includes(showCashBasisFlag.value),
|
|
267
|
+
itemRender: commonFormRadio('brmerp.ac.cashBasisFlag'),
|
|
268
|
+
},
|
|
269
|
+
// {
|
|
270
|
+
// field: 'contractDate',
|
|
271
|
+
// title: '合同履约期',
|
|
272
|
+
// span: 10,
|
|
273
|
+
// itemRender: commonDateRange('contractStartDate', 'contractEndDate'),
|
|
274
|
+
// },
|
|
275
|
+
{
|
|
276
|
+
field: 'fileCount',
|
|
277
|
+
title: '附件信息',
|
|
278
|
+
showTitle: false,
|
|
279
|
+
slots: {
|
|
280
|
+
default: 'fileCount_default',
|
|
281
|
+
},
|
|
282
|
+
span: 6,
|
|
283
|
+
visibleMethod: () => isNumber(formData.fileCount) && Number.parseFloat(formData.fileCount) > 0,
|
|
284
|
+
},
|
|
285
|
+
{
|
|
286
|
+
field: 'contractInfo',
|
|
287
|
+
title: '合同概况',
|
|
288
|
+
itemRender: commonVxeTextarea(),
|
|
289
|
+
span: 24,
|
|
290
|
+
},
|
|
291
|
+
{
|
|
292
|
+
field: 'remark',
|
|
293
|
+
title: '备注',
|
|
294
|
+
itemRender: commonVxeTextarea(5, {
|
|
295
|
+
maxlength: 200,
|
|
296
|
+
}),
|
|
297
|
+
span: 24,
|
|
298
|
+
},
|
|
299
|
+
{
|
|
300
|
+
field: 'stopDesc',
|
|
301
|
+
title: '终结原因',
|
|
302
|
+
itemRender: commonVxeTextarea(),
|
|
303
|
+
visibleMethod: () => ['60', '52', '70'].includes(formData.contractStatus),
|
|
304
|
+
span: 24,
|
|
305
|
+
},
|
|
306
|
+
]
|
|
307
|
+
})
|
|
308
|
+
|
|
309
|
+
const getData = () => {
|
|
310
|
+
const data = getFormData(baseFields.value, formData) as any
|
|
311
|
+
data.contractAmount = !isEmpty(formData.contractAmount) ? `${formData.contractAmount}`.replaceAll(',', '') : ''
|
|
312
|
+
delete data.fileCount
|
|
313
|
+
return data
|
|
314
|
+
}
|
|
315
|
+
|
|
316
|
+
const formRules = computed(() => createFormRules(baseFields.value))
|
|
317
|
+
|
|
318
|
+
const diffConfig = computed(() => {
|
|
319
|
+
const fields = baseFields.value.filter(item => ((item as any).visible ?? true) && !isEmpty(item.field)).map(item => item.field)
|
|
320
|
+
const enabled = diffable.value && Object.keys(diffInfo.value).some(field => fields.includes(field))
|
|
321
|
+
return {
|
|
322
|
+
enabled,
|
|
323
|
+
data: diffInfo.value,
|
|
324
|
+
}
|
|
325
|
+
})
|
|
326
|
+
|
|
327
|
+
const formConfig = reactive({
|
|
328
|
+
data: formData,
|
|
329
|
+
items: baseFields,
|
|
330
|
+
titleWidth: 130,
|
|
331
|
+
rules: formRules,
|
|
332
|
+
diffConfig,
|
|
333
|
+
})
|
|
334
|
+
|
|
335
|
+
return {
|
|
336
|
+
formData,
|
|
337
|
+
formConfig,
|
|
338
|
+
validateField,
|
|
339
|
+
getData,
|
|
340
|
+
}
|
|
341
|
+
}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
* @Author: 谢力
|
|
3
|
+
* @Date: 2025-07-22 20:55:43
|
|
4
|
+
* @LastEditors: Please set LastEditors
|
|
5
|
+
* @LastEditTime: 2025-12-10 10:43:54
|
|
6
|
+
-->
|
|
7
|
+
<template>
|
|
8
|
+
<VxePlusForm
|
|
9
|
+
ref="xForm"
|
|
10
|
+
:disabled="!editable"
|
|
11
|
+
:title-asterisk="editable"
|
|
12
|
+
:form-options="formConfig"
|
|
13
|
+
>
|
|
14
|
+
<template #fileCount_default="{ data }">
|
|
15
|
+
<div class="flex-row align-center-row">
|
|
16
|
+
<el-button type="primary" @click="handleUpload">
|
|
17
|
+
附件管理
|
|
18
|
+
</el-button>
|
|
19
|
+
<span class="font16 ml10 red bold">附件个数:{{ data.fileCount }}</span>
|
|
20
|
+
</div>
|
|
21
|
+
</template>
|
|
22
|
+
</VxePlusForm>
|
|
23
|
+
</template>
|
|
24
|
+
|
|
25
|
+
<script setup lang="ts">
|
|
26
|
+
import { inject, ref } from 'vue'
|
|
27
|
+
import { createFormConfig } from './formConfig'
|
|
28
|
+
import { useFileUpload } from '@/hooks/useFileUpload'
|
|
29
|
+
|
|
30
|
+
const xForm = ref<any>(null)
|
|
31
|
+
|
|
32
|
+
const { editable, detailInfo } = inject('__PMPC0101__info__') as any
|
|
33
|
+
|
|
34
|
+
const { formConfig } = createFormConfig()
|
|
35
|
+
|
|
36
|
+
const { openFileBFSS0001 } = useFileUpload()
|
|
37
|
+
|
|
38
|
+
function handleUpload() {
|
|
39
|
+
const bizTypeCode = 'PM_CONTRACT_PROPOSE,PM_CONTRACT_FORMAL,PM_CONTRACT_CORRECT,PM_CONTRACT_END'
|
|
40
|
+
const flag = 'view'
|
|
41
|
+
const bizBillId = detailInfo.value.pcContractMainId
|
|
42
|
+
const bizBillCode = detailInfo.value.pcContractCode
|
|
43
|
+
const bizBillVersion = detailInfo.value.contractVersion
|
|
44
|
+
const bookId = detailInfo.value.bookId
|
|
45
|
+
const verFlag = 'N'
|
|
46
|
+
const fileTypeCode = ''
|
|
47
|
+
openFileBFSS0001({
|
|
48
|
+
bizTypeCode,
|
|
49
|
+
contractId: bizBillId,
|
|
50
|
+
bizBillId,
|
|
51
|
+
bizBillCode,
|
|
52
|
+
bizBillVersion,
|
|
53
|
+
fileTypeCode,
|
|
54
|
+
verFlag,
|
|
55
|
+
flag,
|
|
56
|
+
bookId,
|
|
57
|
+
data: detailInfo.value,
|
|
58
|
+
editable: false,
|
|
59
|
+
})
|
|
60
|
+
}
|
|
61
|
+
</script>
|
|
62
|
+
|
|
63
|
+
<style scoped></style>
|
|
@@ -0,0 +1,232 @@
|
|
|
1
|
+
import { computed, inject, reactive, watch } from 'vue'
|
|
2
|
+
import { commafy, merge } from 'xe-utils'
|
|
3
|
+
import { isEmpty } from '@/utils/is'
|
|
4
|
+
import { getCodeSetByService } from '@/utils/eiTools'
|
|
5
|
+
import { useForm } from '@/hooks/useForm'
|
|
6
|
+
|
|
7
|
+
export function createFormConfig() {
|
|
8
|
+
const { commonVxeInput, commonVxeTextarea, commonFormSelect, createFormRules, validateField, getFormData } = useForm()
|
|
9
|
+
|
|
10
|
+
const { diffInfo, detailInfo, isCorrecte, isChange } = inject('__PMPC0101__info__') as any
|
|
11
|
+
|
|
12
|
+
const formData = reactive(merge({
|
|
13
|
+
pcContractMainId: '',
|
|
14
|
+
pcContractMainHisId: '',
|
|
15
|
+
orgId: '',
|
|
16
|
+
bookId: '',
|
|
17
|
+
deptId: '',
|
|
18
|
+
groupId: '',
|
|
19
|
+
companyId: '',
|
|
20
|
+
pcContractCode: '',
|
|
21
|
+
contractVersion: '',
|
|
22
|
+
pcContractExternalNo: '',
|
|
23
|
+
contractName: '',
|
|
24
|
+
contractStatus: '',
|
|
25
|
+
tradePropertyCode: '',
|
|
26
|
+
contractTypeStock: '',
|
|
27
|
+
contractTypeArea: '',
|
|
28
|
+
contractTypeSourcing: '',
|
|
29
|
+
contractTypeMode: '',
|
|
30
|
+
contractTypeOpen: '',
|
|
31
|
+
jyzz: '',
|
|
32
|
+
responsibilityCategoryLCode: '',
|
|
33
|
+
responsibilityCategoryLName: '',
|
|
34
|
+
responsibilityCategoryMCode: '',
|
|
35
|
+
responsibilityCategoryMName: '',
|
|
36
|
+
responsibilityCategorySCode: '',
|
|
37
|
+
responsibilityCategorySName: '',
|
|
38
|
+
signOnceAccreditName: '',
|
|
39
|
+
signOnceAccreditCode: '',
|
|
40
|
+
recommendSignerCompanyName: '',
|
|
41
|
+
signOnceAccreditPost: '',
|
|
42
|
+
signOnceAccreditPostId: '',
|
|
43
|
+
beSignAuthorizeStateDesc: '',
|
|
44
|
+
supplierCreditFlag: '',
|
|
45
|
+
lastShipmentDate: '',
|
|
46
|
+
contractAmount: '',
|
|
47
|
+
contractAmountTax: '',
|
|
48
|
+
contractAmountNoTax: '',
|
|
49
|
+
textType: '',
|
|
50
|
+
textFirstFlag: '',
|
|
51
|
+
mouldName: '',
|
|
52
|
+
mouldCode: '',
|
|
53
|
+
mouldId: '',
|
|
54
|
+
mouldVersion: '',
|
|
55
|
+
textElectronicFlag: '',
|
|
56
|
+
// sealUsageType: '',
|
|
57
|
+
contractStartDate: '',
|
|
58
|
+
contractEndDate: '',
|
|
59
|
+
teamCode: '',
|
|
60
|
+
teamName: '',
|
|
61
|
+
salesPersonCode: '',
|
|
62
|
+
salesPersonName: '',
|
|
63
|
+
relContractMainCode: '',
|
|
64
|
+
contractInfo: '',
|
|
65
|
+
cashBasisFlag: '',
|
|
66
|
+
directFlag: '',
|
|
67
|
+
purchaseType: '',
|
|
68
|
+
operatorDepartmentCode: '',
|
|
69
|
+
operatorDepartmentName: '',
|
|
70
|
+
operatorPersonCode: '',
|
|
71
|
+
operatorPersonName: '',
|
|
72
|
+
remark: '',
|
|
73
|
+
}, detailInfo.value))
|
|
74
|
+
|
|
75
|
+
watch(() => detailInfo.value.contractAmount, () => {
|
|
76
|
+
formData.contractAmount = !isEmpty(detailInfo.value.contractAmount) ? commafy(Number.parseFloat(detailInfo.value.contractAmount), { digits: 2 }) : ''
|
|
77
|
+
}, {
|
|
78
|
+
immediate: true,
|
|
79
|
+
})
|
|
80
|
+
|
|
81
|
+
watch(() => diffInfo.value.contractAmount, () => {
|
|
82
|
+
formData.__contractAmount__ = !isEmpty(diffInfo.value.contractAmount) ? commafy(Number.parseFloat(diffInfo.value.contractAmount), { digits: 2 }) : ''
|
|
83
|
+
}, {
|
|
84
|
+
immediate: true,
|
|
85
|
+
})
|
|
86
|
+
|
|
87
|
+
const baseFields = computed(() => {
|
|
88
|
+
return [
|
|
89
|
+
{
|
|
90
|
+
field: 'orgId',
|
|
91
|
+
title: '业务单元',
|
|
92
|
+
itemRender: commonFormSelect('BMBE0000.queryBookOrgByListByPurOrg', {
|
|
93
|
+
promiseFn: (params: any) => getCodeSetByService({
|
|
94
|
+
serviceName: 'BMBE0000',
|
|
95
|
+
methodName: 'queryBookOrgByListByPurOrg',
|
|
96
|
+
params,
|
|
97
|
+
blockName: 'bookResult',
|
|
98
|
+
value: 'orgId',
|
|
99
|
+
label: 'bookAndOrgDeptName',
|
|
100
|
+
}),
|
|
101
|
+
}),
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
span: 16,
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
field: 'contractName',
|
|
108
|
+
title: '合同名称',
|
|
109
|
+
span: 24,
|
|
110
|
+
itemRender: commonVxeInput(),
|
|
111
|
+
},
|
|
112
|
+
{
|
|
113
|
+
field: 'supplierName',
|
|
114
|
+
title: '供应商名称',
|
|
115
|
+
itemRender: commonVxeInput(),
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
field: 'pcContractCode',
|
|
119
|
+
title: '合同号',
|
|
120
|
+
itemRender: commonVxeInput(),
|
|
121
|
+
},
|
|
122
|
+
{
|
|
123
|
+
span: 8,
|
|
124
|
+
},
|
|
125
|
+
{
|
|
126
|
+
field: 'contractType',
|
|
127
|
+
title: '合同类型',
|
|
128
|
+
span: 16,
|
|
129
|
+
itemRender: {
|
|
130
|
+
name: 'formComponentsList',
|
|
131
|
+
props: {
|
|
132
|
+
compsProps: [
|
|
133
|
+
{
|
|
134
|
+
field: 'contractTypeStock',
|
|
135
|
+
span: 0,
|
|
136
|
+
classname: 'flex-1',
|
|
137
|
+
...commonFormSelect('brmerp.pm.contractTypeStock'),
|
|
138
|
+
},
|
|
139
|
+
{
|
|
140
|
+
field: 'contractTypeArea',
|
|
141
|
+
span: 0,
|
|
142
|
+
classname: 'flex-1',
|
|
143
|
+
...commonFormSelect('brmerp.pm.contractTypeArea', {
|
|
144
|
+
clearable: false,
|
|
145
|
+
}),
|
|
146
|
+
},
|
|
147
|
+
{
|
|
148
|
+
field: 'contractTypeSourcing',
|
|
149
|
+
span: 0,
|
|
150
|
+
classname: 'flex-1',
|
|
151
|
+
...commonFormSelect('brmerp.pm.contractTypeSourcingNew'),
|
|
152
|
+
},
|
|
153
|
+
{
|
|
154
|
+
field: 'contractTypeMode',
|
|
155
|
+
span: 0,
|
|
156
|
+
classname: 'flex-1',
|
|
157
|
+
...commonFormSelect('brmerp.pm.contractTypeModeNew'),
|
|
158
|
+
},
|
|
159
|
+
{
|
|
160
|
+
field: 'contractTypeOpen',
|
|
161
|
+
span: 0,
|
|
162
|
+
classname: 'flex-1',
|
|
163
|
+
...commonFormSelect('brmerp.ac.contractTypeOpen'),
|
|
164
|
+
},
|
|
165
|
+
],
|
|
166
|
+
},
|
|
167
|
+
},
|
|
168
|
+
},
|
|
169
|
+
// {
|
|
170
|
+
// field: 'contractAmount',
|
|
171
|
+
// title: '原合同金额',
|
|
172
|
+
// itemRender: commonVxeInput(),
|
|
173
|
+
// },
|
|
174
|
+
{
|
|
175
|
+
field: 'currencyCode',
|
|
176
|
+
title: '币种',
|
|
177
|
+
itemRender: commonFormSelect('DMDC01.queryByCode.currencyCode', {
|
|
178
|
+
promiseFn: (params: any) => getCodeSetByService({
|
|
179
|
+
serviceName: 'DMDC01',
|
|
180
|
+
methodName: 'queryByCode',
|
|
181
|
+
params,
|
|
182
|
+
blockName: 'currencyBlock',
|
|
183
|
+
value: 'valueField',
|
|
184
|
+
label: 'textField',
|
|
185
|
+
}),
|
|
186
|
+
}),
|
|
187
|
+
},
|
|
188
|
+
// {
|
|
189
|
+
// field: '__contractAmount__',
|
|
190
|
+
// title: '变更金额',
|
|
191
|
+
// itemRender: commonVxeInput(),
|
|
192
|
+
// },
|
|
193
|
+
{
|
|
194
|
+
field: 'changeDesc',
|
|
195
|
+
title: '变更原因',
|
|
196
|
+
visibleMethod: () => isChange.value,
|
|
197
|
+
itemRender: commonVxeTextarea(),
|
|
198
|
+
span: 24,
|
|
199
|
+
},
|
|
200
|
+
{
|
|
201
|
+
field: 'reviseDesc',
|
|
202
|
+
title: '变更原因',
|
|
203
|
+
visibleMethod: () => isCorrecte.value,
|
|
204
|
+
itemRender: commonVxeTextarea(),
|
|
205
|
+
span: 24,
|
|
206
|
+
},
|
|
207
|
+
]
|
|
208
|
+
})
|
|
209
|
+
|
|
210
|
+
const getData = () => {
|
|
211
|
+
const data = getFormData(baseFields.value, formData) as any
|
|
212
|
+
data.contractAmount = !isEmpty(formData.contractAmount) ? `${formData.contractAmount}`.replaceAll(',', '') : ''
|
|
213
|
+
delete data.__contractAmount__
|
|
214
|
+
return data
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
const formRules = computed(() => createFormRules(baseFields.value))
|
|
218
|
+
|
|
219
|
+
const formConfig = reactive({
|
|
220
|
+
data: formData,
|
|
221
|
+
items: baseFields,
|
|
222
|
+
titleWidth: 120,
|
|
223
|
+
rules: formRules,
|
|
224
|
+
})
|
|
225
|
+
|
|
226
|
+
return {
|
|
227
|
+
formData,
|
|
228
|
+
formConfig,
|
|
229
|
+
validateField,
|
|
230
|
+
getData,
|
|
231
|
+
}
|
|
232
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
* @Author: 谢力
|
|
3
|
+
* @Date: 2025-07-22 20:55:43
|
|
4
|
+
* @LastEditors: Please set LastEditors
|
|
5
|
+
* @LastEditTime: 2025-11-06 11:55:30
|
|
6
|
+
-->
|
|
7
|
+
<template>
|
|
8
|
+
<VxePlusForm
|
|
9
|
+
ref="xForm"
|
|
10
|
+
:disabled="!editable"
|
|
11
|
+
:title-asterisk="editable"
|
|
12
|
+
:form-options="formConfig"
|
|
13
|
+
/>
|
|
14
|
+
</template>
|
|
15
|
+
|
|
16
|
+
<script setup lang="ts">
|
|
17
|
+
import { inject, ref } from 'vue'
|
|
18
|
+
import { createFormConfig } from './formConfig'
|
|
19
|
+
|
|
20
|
+
const xForm = ref<any>(null)
|
|
21
|
+
|
|
22
|
+
const { editable } = inject('__PMPC0101__info__') as any
|
|
23
|
+
|
|
24
|
+
const { formConfig } = createFormConfig()
|
|
25
|
+
</script>
|
|
26
|
+
|
|
27
|
+
<style scoped></style>
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* @Author: 谢力
|
|
3
|
+
* @Date: 2025-06-26 15:30:28
|
|
4
|
+
* @LastEditors: Please set LastEditors
|
|
5
|
+
* @LastEditTime: 2025-11-11 14:42:44
|
|
6
|
+
*/
|
|
7
|
+
import { computed } from 'vue'
|
|
8
|
+
import { useTable } from '@/hooks/useTable'
|
|
9
|
+
|
|
10
|
+
export function createTableColumns() {
|
|
11
|
+
const { createColumns, createEditRules, validator } = useTable()
|
|
12
|
+
|
|
13
|
+
const columns = computed(() => {
|
|
14
|
+
return createColumns([
|
|
15
|
+
{
|
|
16
|
+
field: 'contractCode',
|
|
17
|
+
title: '子项单据号',
|
|
18
|
+
width: 220,
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
field: 'itemName',
|
|
22
|
+
title: '变更项',
|
|
23
|
+
width: 400,
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
field: 'itemDesc',
|
|
27
|
+
title: '变更内容',
|
|
28
|
+
},
|
|
29
|
+
].map((col) => {
|
|
30
|
+
return {
|
|
31
|
+
...col,
|
|
32
|
+
width: (col as any).width ?? '',
|
|
33
|
+
} as any
|
|
34
|
+
})).value
|
|
35
|
+
})
|
|
36
|
+
|
|
37
|
+
const tableValidator = (...args: any[]) => {
|
|
38
|
+
return (validator as any)(...args)
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
return {
|
|
42
|
+
columns,
|
|
43
|
+
editRules: computed(() => createEditRules(columns.value)),
|
|
44
|
+
tableValidator,
|
|
45
|
+
}
|
|
46
|
+
}
|