@qqt-product/system 0.0.16 → 0.0.17

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.
Files changed (148) hide show
  1. package/dist/index.es.js +9595 -9168
  2. package/dist/index.umd.js +34 -35
  3. package/dist/lib/components/QAccountList/src/QAccountCreate.vue.d.ts +15 -12
  4. package/dist/lib/components/QAccountList/src/QAccountDetail.vue.d.ts +13 -10
  5. package/dist/lib/components/QAccountList/src/QAccountEdit.vue.d.ts +16 -12
  6. package/dist/lib/components/QElsMsgRecordList/src/QElsMsgRecordDetail.vue.d.ts +12 -9
  7. package/dist/lib/components/QElsTenantPortalNewsList/src/QElsTenantPortalNewsDetail.vue.d.ts +12 -9
  8. package/dist/lib/components/QElsTenantPortalNewsList/src/QElsTenantPortalNewsEdit.vue.d.ts +15 -12
  9. package/dist/lib/components/QElsTenantPortalNewsList/src/QElsTenantPortalNewsList.vue.d.ts +9 -0
  10. package/dist/lib/components/QPermissionDataList/src/QPermissionDataAuth.vue.d.ts +387 -3
  11. package/dist/lib/components/QPermissionDataList/src/QPermissionDataEdit.vue.d.ts +15 -12
  12. package/dist/lib/components/QPurchaseNoticeList/src/QPurchaseNoticeDetail.vue.d.ts +12 -9
  13. package/dist/lib/components/QPurchaseNoticeList/src/QPurchaseNoticeEdit.vue.d.ts +17 -14
  14. package/dist/lib/components/QPurchaseNoticeList/src/use-field-select-modal-hook.d.ts +1 -1
  15. package/dist/lib/components/QPurchaseNoticeTemplateList/src/QPurchaseNoticeTemplateList.vue.d.ts +2 -1
  16. package/dist/lib/components/QRoleList/src/QRoleList.vue.d.ts +9 -0
  17. package/dist/lib/components/QRoleList/src/components/userAuthorization/index.d.ts +4 -4
  18. package/dist/lib/components/QSupplierAccountList/src/QSupplierAccountList.vue.d.ts +19 -2
  19. package/dist/lib/components/QSupplierAccountList/src/useConfigData.d.ts +9 -0
  20. package/dist/lib/components/QcustomConfigEdit/src/QcustomConfigEdit.vue.d.ts +0 -1
  21. package/dist/lib/components/integratedNodesList/src/QIntegratedNodesDetail.vue.d.ts +12 -9
  22. package/dist/lib/components/integratedNodesList/src/QIntegratedNodesEdit.vue.d.ts +15 -12
  23. package/dist/style.css +1 -1
  24. package/package.json +20 -9
  25. package/.eslintignore +0 -4
  26. package/.eslintrc.cjs +0 -22
  27. package/.prettierignore +0 -4
  28. package/.prettierrc.cjs +0 -41
  29. package/.vscode/extensions.json +0 -3
  30. package/dist/vite.svg +0 -1
  31. package/index.html +0 -13
  32. package/public/vite.svg +0 -1
  33. package/src/App.vue +0 -8
  34. package/src/lib/components/QAccountList/index.ts +0 -6
  35. package/src/lib/components/QAccountList/src/QAccountCreate.vue +0 -272
  36. package/src/lib/components/QAccountList/src/QAccountDetail.vue +0 -259
  37. package/src/lib/components/QAccountList/src/QAccountEdit.vue +0 -273
  38. package/src/lib/components/QAccountList/src/QAccountList.vue +0 -532
  39. package/src/lib/components/QAccountList/src/useConfigData.ts +0 -53
  40. package/src/lib/components/QBackgroundFileTaskList/index.ts +0 -6
  41. package/src/lib/components/QBackgroundFileTaskList/src/QBackgroundFileTaskList.vue +0 -143
  42. package/src/lib/components/QBackgroundFileTaskList/src/useConfigData.ts +0 -20
  43. package/src/lib/components/QElsEmailSendLogList/index.ts +0 -6
  44. package/src/lib/components/QElsEmailSendLogList/src/QElsEmailSendLogList.vue +0 -172
  45. package/src/lib/components/QElsEmailSendLogList/src/useConfigData.ts +0 -19
  46. package/src/lib/components/QElsMsgRecordList/index.ts +0 -6
  47. package/src/lib/components/QElsMsgRecordList/src/QElsMsgRecordDetail.vue +0 -148
  48. package/src/lib/components/QElsMsgRecordList/src/QElsMsgRecordList.vue +0 -123
  49. package/src/lib/components/QElsMsgRecordList/src/useConfigData.ts +0 -22
  50. package/src/lib/components/QElsTenantPortalNewsList/index.ts +0 -6
  51. package/src/lib/components/QElsTenantPortalNewsList/src/QElsTenantPortalNewsDetail.vue +0 -139
  52. package/src/lib/components/QElsTenantPortalNewsList/src/QElsTenantPortalNewsEdit.vue +0 -244
  53. package/src/lib/components/QElsTenantPortalNewsList/src/QElsTenantPortalNewsList.vue +0 -151
  54. package/src/lib/components/QElsTenantPortalNewsList/src/useConfigData.ts +0 -20
  55. package/src/lib/components/QI18nList/index.ts +0 -6
  56. package/src/lib/components/QI18nList/src/QI18nForm.vue +0 -141
  57. package/src/lib/components/QI18nList/src/QI18nList.vue +0 -365
  58. package/src/lib/components/QI18nList/src/useConfigData.ts +0 -37
  59. package/src/lib/components/QImChatGroupList/index.ts +0 -6
  60. package/src/lib/components/QImChatGroupList/src/QImChatGroupList.vue +0 -103
  61. package/src/lib/components/QImChatGroupList/src/useConfigData.ts +0 -17
  62. package/src/lib/components/QMqRecordList/index.ts +0 -6
  63. package/src/lib/components/QMqRecordList/src/QMqRecordList.vue +0 -109
  64. package/src/lib/components/QMqRecordList/src/useConfigData.ts +0 -18
  65. package/src/lib/components/QPasswordSecurityPolicy/index.ts +0 -6
  66. package/src/lib/components/QPasswordSecurityPolicy/src/QPasswordSecurityPolicy.vue +0 -266
  67. package/src/lib/components/QPermissionDataList/index.ts +0 -6
  68. package/src/lib/components/QPermissionDataList/src/QPermissionDataAuth.vue +0 -3
  69. package/src/lib/components/QPermissionDataList/src/QPermissionDataEdit.vue +0 -218
  70. package/src/lib/components/QPermissionDataList/src/QPermissionDataList.vue +0 -110
  71. package/src/lib/components/QPermissionDataList/src/form.vue +0 -109
  72. package/src/lib/components/QPurchaseNoticeList/index.ts +0 -6
  73. package/src/lib/components/QPurchaseNoticeList/src/QPurchaseNoticeDetail.vue +0 -147
  74. package/src/lib/components/QPurchaseNoticeList/src/QPurchaseNoticeEdit.vue +0 -332
  75. package/src/lib/components/QPurchaseNoticeList/src/QPurchaseNoticeList.vue +0 -189
  76. package/src/lib/components/QPurchaseNoticeList/src/use-field-select-modal-hook.ts +0 -84
  77. package/src/lib/components/QPurchaseNoticeList/src/useConfigData.ts +0 -22
  78. package/src/lib/components/QPurchaseNoticeTemplateList/index.ts +0 -6
  79. package/src/lib/components/QPurchaseNoticeTemplateList/src/QPurchaseNoticeTemplateList.vue +0 -134
  80. package/src/lib/components/QPurchaseNoticeTemplateList/src/QPurchaseNoticeTemplateModal.vue +0 -91
  81. package/src/lib/components/QPurchaseNoticeTemplateList/src/useConfigData.ts +0 -18
  82. package/src/lib/components/QQuartzJobList/index.ts +0 -6
  83. package/src/lib/components/QQuartzJobList/src/QQuartzJobList.vue +0 -276
  84. package/src/lib/components/QQuartzJobList/src/components/JCron.vue +0 -82
  85. package/src/lib/components/QQuartzJobList/src/components/JCronModal.vue +0 -985
  86. package/src/lib/components/QQuartzJobList/src/components/QuartzJobModal.vue +0 -176
  87. package/src/lib/components/QQuartzJobList/src/useConfigData.ts +0 -26
  88. package/src/lib/components/QRoleList/index.ts +0 -6
  89. package/src/lib/components/QRoleList/src/QRoleList.vue +0 -332
  90. package/src/lib/components/QRoleList/src/components/content-header/contentHeader.less +0 -31
  91. package/src/lib/components/QRoleList/src/components/content-header/index.tsx +0 -42
  92. package/src/lib/components/QRoleList/src/components/userAuthorization/index.tsx +0 -690
  93. package/src/lib/components/QRoleList/src/components/userAuthorization/userAuthorization.less +0 -97
  94. package/src/lib/components/QRoleList/src/useConfigData.ts +0 -28
  95. package/src/lib/components/QSupplierAccountList/index.ts +0 -6
  96. package/src/lib/components/QSupplierAccountList/src/QSupplierAccountForm.vue +0 -187
  97. package/src/lib/components/QSupplierAccountList/src/QSupplierAccountList.vue +0 -304
  98. package/src/lib/components/QSupplierAccountList/src/useConfigData.ts +0 -29
  99. package/src/lib/components/QUsageList/index.ts +0 -6
  100. package/src/lib/components/QUsageList/src/QUsageList.vue +0 -287
  101. package/src/lib/components/QUsageList/src/useConfigData.ts +0 -154
  102. package/src/lib/components/QcustomConfigEdit/component/AddDictCodeModal.vue +0 -140
  103. package/src/lib/components/QcustomConfigEdit/component/TempalePreviewModal.vue +0 -100
  104. package/src/lib/components/QcustomConfigEdit/component/dataFormatComponent.tsx +0 -100
  105. package/src/lib/components/QcustomConfigEdit/component/regexComponent.tsx +0 -71
  106. package/src/lib/components/QcustomConfigEdit/index.ts +0 -6
  107. package/src/lib/components/QcustomConfigEdit/src/QcustomConfigEdit.vue +0 -1895
  108. package/src/lib/components/QcustomConfigEdit/src/QcustomConfigRender.tsx +0 -242
  109. package/src/lib/components/QcustomConfigEdit/src/types.ts +0 -71
  110. package/src/lib/components/QcustomConfigEdit/src/useConfigComputed.ts +0 -75
  111. package/src/lib/components/QcustomConfigEdit/src/useConfigData.ts +0 -123
  112. package/src/lib/components/QcustomConfigEdit/src/useConfigMethods.ts +0 -117
  113. package/src/lib/components/QcustomConfigEdit/src/useConstant.ts +0 -301
  114. package/src/lib/components/QcustomConfigEdit/style/index.less +0 -41
  115. package/src/lib/components/QcustomConfigList/component/ImportJsonCustomConfig.vue +0 -135
  116. package/src/lib/components/QcustomConfigList/index.ts +0 -6
  117. package/src/lib/components/QcustomConfigList/src/QcustomConfigList.vue +0 -276
  118. package/src/lib/components/QcustomConfigList/src/types.ts +0 -1
  119. package/src/lib/components/QcustomConfigList/src/useConfigData.ts +0 -23
  120. package/src/lib/components/QcustomConfigList/src/useMethods.ts +0 -36
  121. package/src/lib/components/QcustomConfigList/style/index.less +0 -3
  122. package/src/lib/components/QsysConfigList/index.ts +0 -6
  123. package/src/lib/components/QsysConfigList/src/QsysConfigList.vue +0 -124
  124. package/src/lib/components/QsysConfigList/src/types.ts +0 -1
  125. package/src/lib/components/QsysConfigList/src/useConfigData.ts +0 -17
  126. package/src/lib/components/QsysConfigList/src/useMethods.ts +0 -11
  127. package/src/lib/components/QsysConfigList/style/index.less +0 -3
  128. package/src/lib/components/index.ts +0 -78
  129. package/src/lib/components/integratedNodesList/src/QIntegratedNodesDetail.vue +0 -49
  130. package/src/lib/components/integratedNodesList/src/QIntegratedNodesEdit.vue +0 -135
  131. package/src/lib/components/integratedNodesList/src/index.vue +0 -130
  132. package/src/lib/components/integratedReportList/src/index.vue +0 -111
  133. package/src/lib/components/integratedReportSearchList/src/index.vue +0 -106
  134. package/src/lib/components/loginAbnormalLogList/src/index.vue +0 -43
  135. package/src/lib/components/loginLogList/src/index.vue +0 -51
  136. package/src/lib/components/loginSupplierLogList/src/index.vue +0 -53
  137. package/src/lib/components/operateLogList/src/index.vue +0 -46
  138. package/src/lib/index.ts +0 -15
  139. package/src/lib/utils/constant.ts +0 -1
  140. package/src/lib/utils/global.hook.ts +0 -337
  141. package/src/lib/utils/global.types.ts +0 -49
  142. package/src/lib/utils/regexp.ts +0 -143
  143. package/src/main.ts +0 -11
  144. package/src/vite-env.d.ts +0 -13
  145. package/tsconfig.json +0 -24
  146. package/tsconfig.node.json +0 -9
  147. package/vite.config.ts +0 -61
  148. /package/dist/{index.es.d.ts → index.d.ts} +0 -0
@@ -1,332 +0,0 @@
1
- <template>
2
- <div class="edit-page">
3
- <a-spin :spinning="customLoading">
4
- <q-edit-page-layout
5
- ref="layoutRef"
6
- v-bind="options"
7
- @supplierListRowAdd="handleSupplierListRowAdd"
8
- @customSave="handleCustomSave"
9
- @customPublish="handleCustomPublish"
10
- @validate-success="handleValidateSuccess"
11
- @back="back"
12
- >
13
- </q-edit-page-layout>
14
- </a-spin>
15
- <q-field-select-modal ref="fieldSelectModal" @ok="ok"></q-field-select-modal>
16
- </div>
17
- </template>
18
-
19
- <script setup lang="ts">
20
- import { ref, reactive, inject } from 'vue'
21
- import type { ComponentPublicInstance } from 'vue'
22
- import qqtUtils from '@qqt-product/utils'
23
- import type { CreatePromise } from '@qqt-product/utils'
24
- import qqtApi from '@qqt-product/api'
25
- import { BUTTON_CUSTOM, BUTTON_DELETE_ROW, BUTTON_SAVE, BUTTON_CUSTOM_PRIMARY, BUTTON_UPLOAD } from '@qqt-product/ui'
26
-
27
- // ui组件库 types
28
- import type { GlobalPageLayoutTypes } from '@qqt-product/ui'
29
- import { usePromiseStepHook, useRefInstanceHook, message as Message } from '@qqt-product/ui'
30
-
31
- import useFieldSelectModal from './use-field-select-modal-hook'
32
- import { Modal } from 'ant-design-vue'
33
-
34
- const srmI18n = inject('Q_SRM_I18N', (i18nKey: string, defaultValue: string, account?: string | number): string => {
35
- if (i18nKey) {
36
- if (account) {
37
- return account + defaultValue
38
- }
39
- return defaultValue
40
- }
41
- return defaultValue
42
- })
43
- const router = inject('Q_APPLICATION_ROUTER', { go: (num: number) => console.log('router go back: ' + num) })
44
- // 传参 props
45
- const props = defineProps<{
46
- currentRow: GlobalPageLayoutTypes.CurrentRow | null
47
- userInfo: GlobalPageLayoutTypes.UserInfo
48
- }>()
49
-
50
- const currentRow = props.currentRow
51
- ? props.currentRow
52
- : ref({
53
- templateNumber: '',
54
- templateVersion: 0,
55
- templateAccount: '',
56
- busAccount: '',
57
- elsAccount: '',
58
- })
59
- const { createPromise, cloneDeep } = qqtUtils
60
- const qHttp: qqtApi.Request = qqtApi.useHttp()
61
- // const handleBeforePublish = (args: GlobalPageLayoutTypes.ExposeWithPageButtons) => {
62
- // const fn: CreatePromise<GlobalPageLayoutTypes.ExposeWithPageButtons> = async (resolve) => {
63
- // const pageData = args.pageData
64
- // const cloneData = cloneDeep(pageData.value)
65
- // if (!cloneData.id) {
66
- // const res = await qHttp.post({ url: '/notice/purchaseNotice/add', data: pageData.value })
67
- // if (res && res.success) {
68
- // cloneData.id = res.result.id
69
- // cloneData.noticeStatus = res.result.noticeStatus
70
- // cloneData.publishUser = res.result.publishUser
71
- // cloneData.noticeContent = res.result.noticeContent
72
- // cloneData.noticeNumber = res.result.noticeNumber
73
- // delete cloneData.busAccount
74
- // delete cloneData.elsAccount
75
- // delete cloneData.templateNumber
76
- // delete cloneData.templateVersion
77
- // delete cloneData.templateAccount
78
- // }
79
- // }
80
- // let formatData = {
81
- // ...cloneData,
82
- // }
83
- // resolve({ ...args, pageData: ref(formatData) })
84
- // }
85
-
86
- // return createPromise(fn) as Promise<GlobalPageLayoutTypes.ExposeWithPageButtons>
87
- // }
88
- // 编辑组件 ref
89
- const layoutRef = ref<ComponentPublicInstance | null>(null)
90
-
91
- const { fieldSelectModal, handleSupplierListRowAdd, ok } = useFieldSelectModal(layoutRef, srmI18n)
92
-
93
- // 配置
94
- const options = reactive<Partial<GlobalPageLayoutTypes.EditPageLayoutProps>>({
95
- /**
96
- * 模块业务类型 string
97
- * 取值根据各模块配置
98
- * 当定义为"custom"时,使用本地配置
99
- */
100
- businessType: 'custom',
101
- // 布局模式
102
- pattern: 'vertical',
103
- // 当前已选行数据
104
- currentRow: currentRow as GlobalPageLayoutTypes.CurrentRow,
105
- refreshMethods(row?: GlobalPageLayoutTypes.CurrentRow) {
106
- if (options.currentRow) {
107
- options.currentRow =
108
- row ||
109
- Object.assign({}, options.currentRow, {
110
- _t: +new Date(),
111
- })
112
- }
113
- },
114
- // 当前登录租户信息
115
- userInfo: props.userInfo,
116
- // 明细接口 -- 接口字符串
117
- detailApi: '/notice/purchaseNotice/noToken/queryById',
118
- // 本地页面数据配置
119
- localConfig: {
120
- groups: [
121
- {
122
- groupName: srmI18n('i18n_field_100100', '基本信息'),
123
- groupCode: 'baseForm',
124
- groupType: 'head',
125
- },
126
- {
127
- groupName: srmI18n('i18n_title_supplierList', '供应商列表'),
128
- groupCode: 'purchaseNoticeSupplierList',
129
- groupType: 'item',
130
- buttons: [
131
- {
132
- ...BUTTON_CUSTOM,
133
- title: srmI18n('i18n_title_add', '新增'),
134
- emit: true,
135
- emitKey: 'supplierListRowAdd',
136
- },
137
- BUTTON_DELETE_ROW,
138
- ],
139
- },
140
- {
141
- groupName: srmI18n('i18n_title_attachmentList', '附件列表'),
142
- groupCode: 'purchaseAttachmentList',
143
- groupType: 'item',
144
- buttons: [
145
- {
146
- ...BUTTON_UPLOAD,
147
- args: {
148
- url: '/attachment/purchaseAttachment/upload', // 上传的路径
149
- // groupCode: 'purchaseBiddingHeadList', // 可不填 默认是 itemInfo
150
- // property: 'biddingDesc', // 行项目显示的名称字段编码
151
- // dictCode: 'srmFileType', // 文件类型数据字典编码
152
- // actionRoutePath: '/srm/notice/purchase/PurchaseNoticeList',
153
- // sourceNumber: 'noticeNumber', // 原v5 的获值写法 this.currentEditRow.projectNumber,
154
- // },
155
- // callback 函数若上传附件后无他业务操作可不加
156
- // callback: (tableData, pageData, fileData) => {
157
- // fileData?.forEach((n) => {
158
- // tableData.push({ _row_id: uniqueId('_row_id_'), ...n })
159
- // })
160
- },
161
- },
162
- BUTTON_DELETE_ROW,
163
- ],
164
- },
165
- ],
166
- formFields: [
167
- {
168
- groupCode: 'baseForm',
169
- fieldType: 'input',
170
- fieldLabel: srmI18n('i18n_field_noticeNumber', '通知单号'),
171
- fieldName: 'noticeNumber',
172
- disabled: true,
173
- },
174
- {
175
- groupCode: 'baseForm',
176
- fieldType: 'input',
177
- fieldLabel: srmI18n('i18n_field_subject', '标题'),
178
- placeholder: srmI18n('i18n_title_pleaseEnterTitle', '请输入标题'),
179
- fieldName: 'noticeTitle',
180
- required: '1',
181
- },
182
- {
183
- groupCode: 'baseForm',
184
- fieldType: 'select',
185
- fieldLabel: srmI18n('i18n_field_msgCategory', '消息类型'),
186
- fieldName: 'noticeType',
187
- placeholder: srmI18n('i18n_title_selectType', '请选择类型'),
188
- dictCode: 'srmNoticeType',
189
- required: '1',
190
- },
191
- {
192
- groupCode: 'baseForm',
193
- fieldType: 'select',
194
- fieldLabel: srmI18n('i18n_field_publicScope', '公开范围'),
195
- fieldName: 'noticeScope',
196
- placeholder: srmI18n('i18n_title_pleaseSelectThePublicScope', '请选择公开范围'),
197
- dictCode: 'srmNoticeScope',
198
- required: '1',
199
- },
200
- {
201
- groupCode: 'baseForm',
202
- fieldType: 'date',
203
- fieldLabel: srmI18n('i18n_field_effectiveTime', '生效时间'),
204
- fieldName: 'effectiveTime',
205
- dataFormat: 'YYYY-MM-DD HH:mm:ss',
206
- required: '1',
207
- },
208
- {
209
- groupCode: 'baseForm',
210
- fieldType: 'date',
211
- fieldLabel: srmI18n('i18n_field_expiryTime', '失效时间'),
212
- fieldName: 'expiryTime',
213
- dataFormat: 'YYYY-MM-DD HH:mm:ss',
214
- required: '1',
215
- },
216
- {
217
- groupCode: 'baseForm',
218
- fieldType: 'switch',
219
- fieldLabel: srmI18n('i18n_title_isPlacedTop', '是否置顶'),
220
- fieldName: 'top',
221
- defaultValue: '0',
222
- },
223
- {
224
- groupCode: 'baseForm',
225
- fieldType: 'editor',
226
- fieldLabel: '',
227
- fieldName: 'noticeContent',
228
- },
229
- ],
230
- itemColumns: [
231
- { field: 'toElsAccount', groupCode: 'purchaseNoticeSupplierList', fieldType: 'input', title: srmI18n('i18n_title_supplierELSAccount', '供应商ELS账号'), width: 200 },
232
- { field: 'supplierCode', groupCode: 'purchaseNoticeSupplierList', fieldType: 'input', title: srmI18n('i18n_massProdHead88b_supplierErpCode', '供应商ERP编码'), width: 200 },
233
- { field: 'supplierName', groupCode: 'purchaseNoticeSupplierList', fieldType: 'input', title: srmI18n('i18n_massProdHeade95_supplierName', '供应商名称'), width: 200 },
234
- { field: 'fileName', groupCode: 'purchaseAttachmentList', fieldType: 'input', title: srmI18n('i18n_title_fileName', '文件名称'), width: 150 },
235
- { field: 'createBy', groupCode: 'purchaseAttachmentList', fieldType: 'input', title: srmI18n('i18n_title_uploader', '上传方'), width: 150 },
236
- { field: 'updateTime', groupCode: 'purchaseAttachmentList', fieldType: 'input', title: srmI18n('i18n_title_uploadTime', '上传时间'), width: 300 },
237
- ],
238
- },
239
- // 页面按钮
240
- pageButtons: [
241
- {
242
- ...BUTTON_SAVE,
243
- title: srmI18n('i18n_title_save', '保存'),
244
- emit: true,
245
- emitKey: 'customSave',
246
- args: {
247
- url: '/notice/purchaseNotice/edit',
248
- },
249
- },
250
- {
251
- ...BUTTON_CUSTOM_PRIMARY,
252
- title: srmI18n('i18n_title_publish', '发布'),
253
- emit: true,
254
- emitKey: 'customPublish',
255
- // handleBefore: handleBeforePublish,
256
- args: {
257
- url: '/notice/purchaseNotice/publish',
258
- },
259
- },
260
- ],
261
- })
262
-
263
- const { pageData, layoutConfig, defaultValues } = useRefInstanceHook(layoutRef)
264
- const { stepTriggerValidate, composeSave, composePublish, customLoading } = usePromiseStepHook({ pageData, layoutConfig, defaultValues, options })
265
-
266
- // 自定义保存
267
- const handleCustomSave = () => {
268
- stepTriggerValidate()
269
- }
270
- // 执行自定义校验
271
- const customCheck: (pageData: GlobalPageLayoutTypes.RecordStringNumber) => boolean = (pageData) => {
272
- if (pageData.effectiveTime && pageData.expiryTime) {
273
- if (pageData.effectiveTime > pageData.expiryTime) {
274
- Message.warning('公告发布生效时间必须小于失效时间')
275
- return false
276
- }
277
- }
278
-
279
- return true
280
- }
281
- // 自定义发布
282
- const handleCustomPublish = () => {
283
- if (!customCheck(pageData.value)) {
284
- return
285
- }
286
- stepTriggerValidate()
287
- }
288
-
289
- // 页面校验成功后执行下一步回调步骤
290
- const handleValidateSuccess = (button: GlobalPageLayoutTypes.PageButton) => {
291
- console.log(button.key === BUTTON_CUSTOM_PRIMARY.key)
292
- if (button.key === BUTTON_SAVE.key) {
293
- composeSave()
294
- } else if (button.key === BUTTON_CUSTOM_PRIMARY.key) {
295
- let purchaseNoticeSupplierList = pageData.value.purchaseNoticeSupplierList as []
296
- if (pageData.value.noticeScope == '4') {
297
- if (purchaseNoticeSupplierList && purchaseNoticeSupplierList.length) {
298
- Message.warning(srmI18n('i18n_field_RIRdXWVKRdXABSuRdX_d20c2f0d', '指定供应商,请在供应商列表添加供应商'))
299
- return false
300
- }
301
- } else {
302
- if (purchaseNoticeSupplierList && purchaseNoticeSupplierList.length > 0) {
303
- Message.warning(srmI18n('i18n_field_RxvLKuWRIRdXWWxTPiFRdXWVQG_962d5139', '公告范围是非“指定供应商”,不需要选择供应商,请删除'))
304
- return false
305
- }
306
- }
307
- Modal.confirm({
308
- title: '发布',
309
- content: '是否确认发布',
310
- onOk() {
311
- return new Promise((resolve, reject) => {
312
- qHttp.post({ url: '/notice/purchaseNotice/publish', data: pageData.value }).then((res) => {
313
- if (res.success) {
314
- Message.success(res.message)
315
- router.go(-1)
316
- resolve(true)
317
- } else {
318
- Message.error(res.message)
319
- reject(false)
320
- }
321
- })
322
- })
323
- },
324
- })
325
- }
326
- }
327
-
328
- // 发布成功后返回
329
- const back = () => {
330
- router.go(-1)
331
- }
332
- </script>
@@ -1,189 +0,0 @@
1
- <template>
2
- <q-list-layout ref="listLayoutRef" :pageData="pageData" :apiUrls="apiUrls" />
3
- </template>
4
-
5
- <script lang="ts">
6
- import { ref, defineComponent, reactive, toRefs, inject } from 'vue'
7
- import qqtApi from '@qqt-product/api'
8
- import { message } from '@qqt-product/ui'
9
- import { useConfigData } from './useConfigData'
10
-
11
- export default defineComponent({
12
- name: 'QPurchaseNoticeList',
13
- props: {
14
- userInfo: {
15
- type: Object,
16
- defalut: () => {
17
- return {}
18
- },
19
- },
20
- },
21
- setup(props, { emit }) {
22
- const listLayoutRef = ref()
23
- const qHttp: qqtApi.Request = qqtApi.useHttp()
24
- const srmI18n = inject('Q_SRM_I18N', (i18nKey: string, defaultValue: string, account?: string | number): string => {
25
- if (i18nKey) {
26
- if (account) {
27
- return account + defaultValue
28
- }
29
- return defaultValue
30
- }
31
- return defaultValue
32
- })
33
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
34
- const handleTopSet = async (row: any) => {
35
- const params = {
36
- id: row.id,
37
- }
38
- qHttp.get({ url: '/notice/purchaseNotice/topOpt', params: params }).then((res) => {
39
- if (res && res.success) {
40
- message.success(res.message)
41
- listLayoutRef.value.fetchListData()
42
- } else {
43
- message.error(res.message)
44
- }
45
- })
46
- }
47
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
48
- const handleCancel = async (row: any) => {
49
- const params = {
50
- id: row.id,
51
- }
52
- qHttp.get({ url: '/notice/purchaseNotice/cancel', params: params }).then((res) => {
53
- if (res && res.success) {
54
- message.success(res.message)
55
- listLayoutRef.value.fetchListData()
56
- } else {
57
- message.success(res.message)
58
- listLayoutRef.value.fetchListData()
59
- }
60
- })
61
- }
62
- const pageData = reactive({
63
- statusConfig: {
64
- show: false,
65
- },
66
- optionConfig: {
67
- attrs: {},
68
- extend: {},
69
- options: [
70
- {
71
- authorityCode: 'purchaseNotice#PurchaseNotice:view',
72
- type: 'view',
73
- title: srmI18n('i18n_title_see', '查看'),
74
- click: ({ row }) => {
75
- emit('detail', row)
76
- },
77
- },
78
- {
79
- authorityCode: 'purchaseNotice#PurchaseNotice:edit',
80
- type: 'edit',
81
- title: srmI18n('i18n_title_edit', '编辑'),
82
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
83
- click: ({ row }: any) => {
84
- emit('edit', row)
85
- },
86
- disabled: ({ row }) => row.noticeStatus !== '1',
87
- },
88
- {
89
- authorityCode: 'purchaseNotice#PurchaseNotice:topOpt',
90
- type: 'topOpt',
91
- title: srmI18n('i18n_title_TopCancel', '置顶/取消'),
92
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
93
- click: ({ row }: any) => {
94
- handleTopSet(row)
95
- },
96
- disabled: ({ row }) => row.noticeStatus !== '2',
97
- },
98
- {
99
- authorityCode: 'purchaseNotice#PurchaseNotice:cancel',
100
- type: 'cancel',
101
- title: srmI18n('i18n_title_void', '作废'),
102
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
103
- click: ({ row }: any) => {
104
- handleCancel(row)
105
- },
106
- disabled: ({ row }) => row.noticeStatus !== '2',
107
- },
108
- {
109
- type: 'delete',
110
- title: srmI18n('i18n_title_delete', '删除'),
111
- authorityCode: 'purchaseNotice#PurchaseNotice:delete',
112
- args: {
113
- url: '/notice/purchaseNotice/delete',
114
- },
115
- disabled: ({ row }) => row.noticeStatus !== '1',
116
- },
117
- ],
118
- },
119
- buttonConfig: {
120
- attrs: {},
121
- extend: {},
122
- buttons: [
123
- {
124
- authorityCode: 'purchaseNotice#PurchaseNotice:add',
125
- label: srmI18n('i18n_title_add', '新增'),
126
- icon: {
127
- type: 'icon-Q-add',
128
- },
129
- attrs: {
130
- type: 'primary',
131
- },
132
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
133
- click: ({ row }: any) => {
134
- emit('create', row)
135
- },
136
- },
137
- {
138
- label: srmI18n('i18n_title_listCustom', '列自定义'),
139
- icon: {
140
- type: 'icon-Q-setting',
141
- },
142
- type: 'setting',
143
- },
144
- {
145
- label: srmI18n('i18n_title_helpText', '帮助说明'),
146
- icon: {
147
- type: 'icon-Q-help-text',
148
- },
149
- type: 'help-text',
150
- },
151
- {
152
- label: srmI18n('i18n_title_attachment', '说明附件'),
153
- icon: {
154
- type: 'icon-Q-attachment-text',
155
- },
156
- type: 'attachment-text',
157
- },
158
- ],
159
- },
160
- queryConfig: {
161
- attrs: {},
162
- extend: {},
163
- form: [
164
- {
165
- type: 'input',
166
- label: '标题',
167
- fieldName: 'noticeTitle',
168
- placeholder: '请输入标题',
169
- },
170
- {
171
- type: 'select',
172
- label: '状态',
173
- fieldName: 'noticeStatus',
174
- dictCode: 'srmNoticeStatus',
175
- placeholder: '请选择状态',
176
- },
177
- ],
178
- },
179
- pagerConfig: {},
180
- })
181
- //data-hook
182
- const { apiUrls } = useConfigData()
183
- const { userInfo } = toRefs(props)
184
- console.log('userInfos', userInfo)
185
- return { listLayoutRef, apiUrls, pageData, handleTopSet }
186
- },
187
- })
188
- </script>
189
- <style scoped></style>
@@ -1,84 +0,0 @@
1
- import { ref, watchEffect } from 'vue'
2
- import type { Ref, ComponentPublicInstance } from 'vue'
3
- // import { srmI18n } from '@/utils/srmI18n'
4
-
5
- import { GlobalPageLayoutTypes } from '@qqt-product/ui'
6
-
7
- import qqtUtils from '@qqt-product/utils'
8
- const { uniqueId } = qqtUtils
9
-
10
- export default function useFieldSelectModal(layoutRef: Ref<ComponentPublicInstance | null>, srmI18n) {
11
- const fieldSelectModal = ref()
12
- const handleSupplierListRowAdd: Ref<((btn: GlobalPageLayoutTypes.PageButtonWithGroupCode) => void) | null> = ref(null)
13
- const ok: Ref<((data: GlobalPageLayoutTypes.RecordStringNumber[]) => void) | null> = ref(null)
14
- const cache: Ref<GlobalPageLayoutTypes.PageButtonWithGroupCode | null> = ref(null)
15
-
16
- watchEffect(() => {
17
- if (layoutRef.value) {
18
- const instance = layoutRef.value.instance
19
- const { pageData, defaultValues } = instance
20
-
21
- handleSupplierListRowAdd.value = (btn) => {
22
- // 缓存当前按钮配置
23
- cache.value = btn
24
- const url = '/supplier/supplierMaster/list'
25
- const columns = [
26
- {
27
- field: 'toElsAccount',
28
- title: srmI18n('i18n_title_supplierELSAccount', '供应商ELS账号'),
29
- width: 120,
30
- },
31
- {
32
- field: 'supplierCode',
33
- title: srmI18n('i18n_massProdHead88b_supplierErpCode', '供应商ERP编码'),
34
- width: 120,
35
- },
36
- {
37
- field: 'supplierName',
38
- title: srmI18n('i18n_massProdHeade95_supplierName', '供应商名称'),
39
- width: 120,
40
- },
41
- {
42
- field: 'supplierStatus_dictText',
43
- title: srmI18n('i18n_title_supplierState', '供应商状态'),
44
- width: 100,
45
- },
46
- ]
47
- const params = {}
48
- const $fieldSelectModal = fieldSelectModal.value
49
- if ($fieldSelectModal) {
50
- $fieldSelectModal.open({ url, params, columns, selectModal: 'multiple' })
51
- }
52
- }
53
-
54
- ok.value = (data) => {
55
- if (!data.length) {
56
- return
57
- }
58
- const emitKey = cache.value?.emitKey
59
- if (!emitKey) {
60
- return
61
- }
62
- if (emitKey === 'supplierListRowAdd') {
63
- const insertData = data
64
- const groupCode = cache.value?.groupCode
65
- if (!groupCode) {
66
- return
67
- }
68
-
69
- const row = defaultValues[groupCode] as GlobalPageLayoutTypes.RecordStringNumber
70
- const tableData = pageData[groupCode] as GlobalPageLayoutTypes.RecordStringNumber[]
71
- insertData.forEach((n) => {
72
- tableData.push({ ...row, _row_id: uniqueId('_row_id_'), ...n })
73
- })
74
- }
75
- }
76
- }
77
- })
78
-
79
- return {
80
- fieldSelectModal,
81
- handleSupplierListRowAdd,
82
- ok,
83
- }
84
- }
@@ -1,22 +0,0 @@
1
- import { shallowRef, ref } from 'vue'
2
- // import type { MapObjectNoneType } from './types'
3
- // import { VxeTableInstance } from 'vxe-table'
4
- // import type {}
5
- export function useConfigData() {
6
- //响应
7
-
8
- const apiUrls = shallowRef({
9
- list: '/notice/purchaseNotice/list',
10
- columnsCode: 'PurchaseNotice',
11
- add: '/notice/purchaseNotice/add',
12
-
13
- delete: '/notice/purchaseNotice/delete',
14
- cancel: '/notice/purchaseNotice/cancel',
15
- topSet: '/notice/purchaseNotice/topOpt',
16
- })
17
- const uploadShow = shallowRef<boolean>(false)
18
- const showEditPage = shallowRef<boolean>(false)
19
- const currentEditRow = ref({})
20
- const listLayoutRef = ref()
21
- return { apiUrls, showEditPage, currentEditRow, listLayoutRef, uploadShow }
22
- }
@@ -1,6 +0,0 @@
1
- import QPurchaseNoticeTemplateList from './src/QPurchaseNoticeTemplateList.vue'
2
- import qqtUtils from '@qqt-product/utils'
3
-
4
- export default qqtUtils.withInstall(QPurchaseNoticeTemplateList)
5
-
6
- export { QPurchaseNoticeTemplateList }