@qqt-product/system 0.0.1 → 0.0.16
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/dist/index.es.js +53240 -10634
- package/dist/index.umd.js +94 -21
- package/dist/lib/components/QAccountList/src/QAccountCreate.vue.d.ts +2878 -0
- package/dist/lib/components/QAccountList/src/QAccountDetail.vue.d.ts +2871 -0
- package/dist/lib/components/QAccountList/src/QAccountEdit.vue.d.ts +2878 -0
- package/dist/lib/components/QAccountList/src/QAccountList.vue.d.ts +23 -4
- package/dist/lib/components/QBackgroundFileTaskList/src/QBackgroundFileTaskList.vue.d.ts +9 -4
- package/dist/lib/components/QElsEmailSendLogList/src/QElsEmailSendLogList.vue.d.ts +9 -4
- package/dist/lib/components/QElsMsgRecordList/src/QElsMsgRecordDetail.vue.d.ts +2864 -0
- package/dist/lib/components/QElsMsgRecordList/src/QElsMsgRecordList.vue.d.ts +2 -3
- package/dist/lib/components/QElsTenantPortalNewsList/src/QElsTenantPortalNewsDetail.vue.d.ts +2864 -0
- package/dist/lib/components/QElsTenantPortalNewsList/src/QElsTenantPortalNewsEdit.vue.d.ts +2876 -0
- package/dist/lib/components/QElsTenantPortalNewsList/src/QElsTenantPortalNewsList.vue.d.ts +29 -14
- package/dist/lib/components/QI18nList/src/QI18nList.vue.d.ts +2 -6
- package/dist/lib/components/QImChatGroupList/src/QImChatGroupList.vue.d.ts +5 -8
- package/dist/lib/components/QMqRecordList/src/QMqRecordList.vue.d.ts +9 -4
- package/dist/lib/components/QPermissionDataList/src/QPermissionDataEdit.vue.d.ts +2872 -0
- package/dist/lib/components/QPermissionDataList/src/QPermissionDataList.vue.d.ts +126 -0
- package/dist/lib/components/QPurchaseNoticeList/src/QPurchaseNoticeDetail.vue.d.ts +2864 -0
- package/dist/lib/components/QPurchaseNoticeList/src/QPurchaseNoticeEdit.vue.d.ts +2887 -0
- package/dist/lib/components/QPurchaseNoticeList/src/QPurchaseNoticeList.vue.d.ts +25 -5
- package/dist/lib/components/QPurchaseNoticeList/src/use-field-select-modal-hook.d.ts +7 -0
- package/dist/lib/components/QPurchaseNoticeTemplateList/src/QPurchaseNoticeTemplateList.vue.d.ts +221 -28
- package/dist/lib/components/QPurchaseNoticeTemplateList/src/QPurchaseNoticeTemplateModal.vue.d.ts +45 -0
- package/dist/lib/components/QQuartzJobList/src/QQuartzJobList.vue.d.ts +24 -5
- package/dist/lib/components/QRoleList/src/QRoleList.vue.d.ts +23 -7
- package/dist/lib/components/QRoleList/src/useConfigData.d.ts +1 -11
- package/dist/lib/components/QSupplierAccountList/src/QSupplierAccountList.vue.d.ts +7 -3
- package/dist/lib/components/QUsageList/src/QUsageList.vue.d.ts +15 -35
- package/dist/lib/components/QUsageList/src/useConfigData.d.ts +111 -10
- package/dist/lib/components/QcustomConfigEdit/component/AddDictCodeModal.vue.d.ts +25 -0
- package/dist/lib/components/QcustomConfigEdit/component/regexComponent.d.ts +9 -10
- package/dist/lib/components/QcustomConfigEdit/src/QcustomConfigEdit.vue.d.ts +1209 -0
- package/dist/lib/components/QcustomConfigEdit/src/useConfigData.d.ts +1 -1
- package/dist/lib/components/QcustomConfigList/src/QcustomConfigList.vue.d.ts +8 -7
- package/dist/lib/components/QsysConfigList/src/QsysConfigList.vue.d.ts +2 -3
- package/dist/lib/components/index.d.ts +2 -2
- package/dist/lib/components/integratedNodesList/src/QIntegratedNodesDetail.vue.d.ts +2863 -0
- package/dist/lib/components/integratedNodesList/src/QIntegratedNodesEdit.vue.d.ts +2872 -0
- package/dist/lib/components/integratedNodesList/src/index.vue.d.ts +8 -11
- package/dist/lib/components/integratedReportSearchList/src/index.vue.d.ts +16 -10
- package/dist/lib/components/loginAbnormalLogList/src/index.vue.d.ts +2 -9
- package/dist/lib/components/loginLogList/src/index.vue.d.ts +2 -8
- package/dist/lib/components/loginSupplierLogList/src/index.vue.d.ts +2 -12
- package/dist/lib/components/operateLogList/src/index.vue.d.ts +2 -13
- package/dist/style.css +1 -1
- package/dist/vite-env.d.ts +13 -13
- package/package.json +13 -11
- package/src/lib/components/QAccountList/src/QAccountCreate.vue +272 -0
- package/src/lib/components/QAccountList/src/QAccountDetail.vue +82 -14
- package/src/lib/components/QAccountList/src/QAccountEdit.vue +65 -33
- package/src/lib/components/QAccountList/src/QAccountList.vue +532 -530
- package/src/lib/components/QBackgroundFileTaskList/src/QBackgroundFileTaskList.vue +143 -137
- package/src/lib/components/QElsEmailSendLogList/src/QElsEmailSendLogList.vue +172 -166
- package/src/lib/components/QElsMsgRecordList/src/QElsMsgRecordList.vue +123 -124
- package/src/lib/components/QElsTenantPortalNewsList/src/QElsTenantPortalNewsEdit.vue +66 -18
- package/src/lib/components/QElsTenantPortalNewsList/src/QElsTenantPortalNewsList.vue +151 -122
- package/src/lib/components/QI18nList/src/QI18nList.vue +365 -361
- package/src/lib/components/QImChatGroupList/src/QImChatGroupList.vue +103 -94
- package/src/lib/components/QMqRecordList/src/QMqRecordList.vue +109 -105
- package/src/lib/components/QPermissionDataList/src/QPermissionDataAuth.vue +3 -3
- package/src/lib/components/QPermissionDataList/src/QPermissionDataEdit.vue +218 -221
- package/src/lib/components/QPermissionDataList/src/QPermissionDataList.vue +110 -117
- package/src/lib/components/QPermissionDataList/src/form.vue +109 -109
- package/src/lib/components/QPurchaseNoticeList/src/QPurchaseNoticeDetail.vue +1 -1
- package/src/lib/components/QPurchaseNoticeList/src/QPurchaseNoticeEdit.vue +120 -32
- package/src/lib/components/QPurchaseNoticeList/src/QPurchaseNoticeList.vue +189 -163
- package/src/lib/components/QPurchaseNoticeList/src/use-field-select-modal-hook.ts +84 -0
- package/src/lib/components/QPurchaseNoticeList/src/useConfigData.ts +22 -22
- package/src/lib/components/QPurchaseNoticeTemplateList/src/QPurchaseNoticeTemplateList.vue +134 -85
- package/src/lib/components/QPurchaseNoticeTemplateList/src/QPurchaseNoticeTemplateModal.vue +91 -0
- package/src/lib/components/QQuartzJobList/src/QQuartzJobList.vue +276 -263
- package/src/lib/components/QRoleList/src/QRoleList.vue +332 -288
- package/src/lib/components/QRoleList/src/useConfigData.ts +1 -6
- package/src/lib/components/QSupplierAccountList/src/QSupplierAccountList.vue +304 -302
- package/src/lib/components/QUsageList/src/QUsageList.vue +287 -82
- package/src/lib/components/QUsageList/src/useConfigData.ts +147 -13
- package/src/lib/components/QcustomConfigEdit/component/AddDictCodeModal.vue +140 -140
- package/src/lib/components/QcustomConfigEdit/component/regexComponent.tsx +28 -28
- package/src/lib/components/QcustomConfigEdit/src/QcustomConfigEdit.vue +130 -42
- package/src/lib/components/QcustomConfigEdit/src/QcustomConfigRender.tsx +2 -2
- package/src/lib/components/QcustomConfigEdit/src/useConfigData.ts +2 -2
- package/src/lib/components/QcustomConfigEdit/src/useConstant.ts +12 -12
- package/src/lib/components/QcustomConfigList/src/QcustomConfigList.vue +276 -268
- package/src/lib/components/QcustomConfigList/src/useConfigData.ts +1 -1
- package/src/lib/components/QsysConfigList/src/QsysConfigList.vue +124 -125
- package/src/lib/components/index.ts +78 -78
- package/src/lib/components/integratedNodesList/src/QIntegratedNodesEdit.vue +2 -10
- package/src/lib/components/integratedNodesList/src/index.vue +130 -136
- package/src/lib/components/integratedReportList/src/index.vue +55 -30
- package/src/lib/components/integratedReportSearchList/src/index.vue +106 -66
- package/src/lib/components/loginAbnormalLogList/src/index.vue +43 -50
- package/src/lib/components/loginLogList/src/index.vue +51 -57
- package/src/lib/components/loginSupplierLogList/src/index.vue +53 -63
- package/src/lib/components/operateLogList/src/index.vue +46 -57
- package/src/vite-env.d.ts +13 -13
- package/tsconfig.json +24 -24
- package/vite.config.ts +1 -1
- package/dist/lib/components/QCompanyermissionList/src/form.vue.d.ts +0 -80
- package/dist/lib/components/QCompanyermissionList/src/types.d.ts +0 -44
- package/dist/lib/components/integratedReportList/src/index.vue.d.ts +0 -70
- package/src/lib/components/QCompanyermissionList/src/editTree.vue +0 -291
- package/src/lib/components/QCompanyermissionList/src/form.vue +0 -238
- package/src/lib/components/QCompanyermissionList/src/index.vue +0 -309
- package/src/lib/components/QCompanyermissionList/src/types.ts +0 -44
|
@@ -0,0 +1,84 @@
|
|
|
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 +1,22 @@
|
|
|
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
|
+
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,85 +1,134 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div style="height: 100%">
|
|
3
|
-
<q-list-layout ref="listLayoutRef" v-if="!showEditPage" :pageData="pageData" :apiUrls="apiUrls" />
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
<
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
1
|
+
<template>
|
|
2
|
+
<div style="height: 100%">
|
|
3
|
+
<q-list-layout ref="listLayoutRef" v-if="!showEditPage" :pageData="pageData" :apiUrls="apiUrls" />
|
|
4
|
+
<q-purchase-notice-template-modal v-if="visible" v-model="visible" @fetch-list-data="fetchListData" :currentRow="noticeTemplateRow"></q-purchase-notice-template-modal>
|
|
5
|
+
<a-modal :width="900" v-model:visible="viewTemplateVisible" :title="viewTemplateModalTitle" @cancel="handleViewCancel" @ok="handleViewCancel">
|
|
6
|
+
<a-form>
|
|
7
|
+
<a-form-item :label="srmI18n('i18n_title_templateName', '模板名称')">
|
|
8
|
+
<a-input :placeholder="srmI18n('i18n_title_enterATemplateName', '请输入模板名称')" v-model:value="viewTemplateRow.templateName" style="width: 400px" />
|
|
9
|
+
</a-form-item>
|
|
10
|
+
<a-form-item :label="srmI18n('i18n_title_templateContent', '模板内容')">
|
|
11
|
+
<span v-html="viewTemplateRow.templateContent"></span>
|
|
12
|
+
</a-form-item>
|
|
13
|
+
</a-form>
|
|
14
|
+
</a-modal>
|
|
15
|
+
</div>
|
|
16
|
+
</template>
|
|
17
|
+
|
|
18
|
+
<script lang="ts" setup>
|
|
19
|
+
//JS
|
|
20
|
+
import type { GlobalListPageLayoutTypes } from '@qqt-product/ui'
|
|
21
|
+
import { reactive, toRefs, inject, ref } from 'vue'
|
|
22
|
+
//hook
|
|
23
|
+
import QPurchaseNoticeTemplateModal from './QPurchaseNoticeTemplateModal.vue'
|
|
24
|
+
import { useConfigData } from './useConfigData'
|
|
25
|
+
|
|
26
|
+
const props = defineProps<{
|
|
27
|
+
userInfo: GlobalListPageLayoutTypes.UserInfo
|
|
28
|
+
}>()
|
|
29
|
+
|
|
30
|
+
const srmI18n = inject('Q_SRM_I18N', (i18nKey: string, defaultValue: string, account?: string | number): string => {
|
|
31
|
+
if (i18nKey) {
|
|
32
|
+
if (account) {
|
|
33
|
+
return account + defaultValue
|
|
34
|
+
}
|
|
35
|
+
return defaultValue
|
|
36
|
+
}
|
|
37
|
+
return defaultValue
|
|
38
|
+
})
|
|
39
|
+
const listLayoutRef = ref()
|
|
40
|
+
const fetchListData = () => {
|
|
41
|
+
listLayoutRef.value.fetchListData()
|
|
42
|
+
visible.value = false
|
|
43
|
+
}
|
|
44
|
+
//data
|
|
45
|
+
const visible = ref<boolean>(false)
|
|
46
|
+
const viewTemplateVisible = ref(false)
|
|
47
|
+
const viewTemplateModalTitle = ref(srmI18n('i18n_title_see', '查看'))
|
|
48
|
+
const handleViewCancel = () => {
|
|
49
|
+
viewTemplateVisible.value = false
|
|
50
|
+
}
|
|
51
|
+
const viewTemplateRow = ref<GlobalListPageLayoutTypes.CurrentRow | { templateName: string; templateContent: string }>({
|
|
52
|
+
templateName: '',
|
|
53
|
+
templateContent: '',
|
|
54
|
+
id: '',
|
|
55
|
+
})
|
|
56
|
+
const noticeTemplateRow = ref({})
|
|
57
|
+
// 编辑
|
|
58
|
+
const handleEdit = (payload: GlobalListPageLayoutTypes.ListOptionsEventParams) => {
|
|
59
|
+
noticeTemplateRow.value = Object.assign({}, payload.row)
|
|
60
|
+
visible.value = true
|
|
61
|
+
}
|
|
62
|
+
// 查看
|
|
63
|
+
const handleView = (payload: GlobalListPageLayoutTypes.ListOptionsEventParams) => {
|
|
64
|
+
viewTemplateRow.value = Object.assign({}, payload.row)
|
|
65
|
+
viewTemplateVisible.value = true
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
const pageData = reactive<GlobalListPageLayoutTypes.PageData>({
|
|
69
|
+
statusConfig: {
|
|
70
|
+
show: false,
|
|
71
|
+
},
|
|
72
|
+
optionConfig: {
|
|
73
|
+
attrs: {},
|
|
74
|
+
extend: {},
|
|
75
|
+
options: [
|
|
76
|
+
{ authorityCode: 'purchaseNoticeTemplate#PurchaseNoticeTemplate:edit', type: 'edit', title: srmI18n('i18n_title_edit', '编辑'), click: handleEdit },
|
|
77
|
+
{ authorityCode: 'purchaseNoticeTemplate#PurchaseNoticeTemplate:view', type: 'view', title: srmI18n('i18n_title_see', '查看'), click: handleView },
|
|
78
|
+
{
|
|
79
|
+
authorityCode: 'purchaseNoticeTemplate#PurchaseNoticeTemplate:delete',
|
|
80
|
+
type: 'delete',
|
|
81
|
+
title: srmI18n('i18n_title_delete', '删除'),
|
|
82
|
+
args: {
|
|
83
|
+
url: '/notice/purchaseNoticeTemplate/delete',
|
|
84
|
+
},
|
|
85
|
+
},
|
|
86
|
+
],
|
|
87
|
+
},
|
|
88
|
+
buttonConfig: {
|
|
89
|
+
attrs: {},
|
|
90
|
+
extend: {},
|
|
91
|
+
buttons: [
|
|
92
|
+
{
|
|
93
|
+
authorityCode: 'purchaseNoticeTemplate#PurchaseNoticeTemplate:add',
|
|
94
|
+
label: srmI18n('i18n_title_add', '新增'),
|
|
95
|
+
icon: {
|
|
96
|
+
type: 'icon-Q-add',
|
|
97
|
+
},
|
|
98
|
+
attrs: {
|
|
99
|
+
type: 'primary',
|
|
100
|
+
},
|
|
101
|
+
click: () => {
|
|
102
|
+
noticeTemplateRow.value = Object.assign({}, {})
|
|
103
|
+
visible.value = true
|
|
104
|
+
},
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
label: srmI18n('i18n_title_listCustom', '列自定义'),
|
|
108
|
+
icon: {
|
|
109
|
+
type: 'icon-Q-setting',
|
|
110
|
+
},
|
|
111
|
+
type: 'setting',
|
|
112
|
+
},
|
|
113
|
+
],
|
|
114
|
+
},
|
|
115
|
+
queryConfig: {
|
|
116
|
+
attrs: {},
|
|
117
|
+
extend: {},
|
|
118
|
+
form: [
|
|
119
|
+
{
|
|
120
|
+
type: 'input',
|
|
121
|
+
label: srmI18n('i18n_title_templateName', '模板名称'),
|
|
122
|
+
fieldName: 'templateName',
|
|
123
|
+
placeholder: srmI18n('i18n_title_enterATemplateName', '请输入模板名称'),
|
|
124
|
+
},
|
|
125
|
+
],
|
|
126
|
+
},
|
|
127
|
+
pagerConfig: {},
|
|
128
|
+
})
|
|
129
|
+
//data-hook
|
|
130
|
+
const { showEditPage, apiUrls } = useConfigData()
|
|
131
|
+
const { userInfo } = toRefs(props)
|
|
132
|
+
console.log('userInfos', userInfo)
|
|
133
|
+
</script>
|
|
134
|
+
<style scoped></style>
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<a-modal :visible="modelValue" :title="modalTitle" :width="900" @cancel="handleCancel" @ok="handleOk">
|
|
3
|
+
<a-form :model="form">
|
|
4
|
+
<a-form-item :label="srmI18n('i18n_title_templateName', '模板名称')">
|
|
5
|
+
<a-input :placeholder="srmI18n('i18n_title_enterATemplateName', '请输入模板名称')" v-model:value="form.templateName" style="width: 400px" />
|
|
6
|
+
</a-form-item>
|
|
7
|
+
</a-form>
|
|
8
|
+
<a-form :model="form">
|
|
9
|
+
<a-form-item>
|
|
10
|
+
<QEditor v-if="modelValue" v-model:content="form.templateContent"></QEditor>
|
|
11
|
+
</a-form-item>
|
|
12
|
+
</a-form>
|
|
13
|
+
</a-modal>
|
|
14
|
+
</template>
|
|
15
|
+
|
|
16
|
+
<script lang="ts" setup>
|
|
17
|
+
import { ref, reactive, toRefs, inject } from 'vue'
|
|
18
|
+
import { Modal } from 'ant-design-vue'
|
|
19
|
+
import { message } from '@qqt-product/ui'
|
|
20
|
+
import qqtApi from '@qqt-product/api'
|
|
21
|
+
export interface Values {
|
|
22
|
+
templateName: string
|
|
23
|
+
id: string
|
|
24
|
+
templateContent: string
|
|
25
|
+
}
|
|
26
|
+
const qHttp: qqtApi.Request = qqtApi.useHttp()
|
|
27
|
+
|
|
28
|
+
const srmI18n = inject('Q_SRM_I18N', (i18nKey: string, defaultValue: string, account?: string | number): string => {
|
|
29
|
+
if (i18nKey) {
|
|
30
|
+
if (account) {
|
|
31
|
+
return account + defaultValue
|
|
32
|
+
}
|
|
33
|
+
return defaultValue
|
|
34
|
+
}
|
|
35
|
+
return defaultValue
|
|
36
|
+
})
|
|
37
|
+
const modalTitle = ref(srmI18n('i18n_title_editTemplate', '编辑模板'))
|
|
38
|
+
const props = defineProps<{
|
|
39
|
+
modelValue: boolean
|
|
40
|
+
currentRow: object
|
|
41
|
+
}>()
|
|
42
|
+
const { modelValue } = toRefs(props)
|
|
43
|
+
const emit = defineEmits<{
|
|
44
|
+
(e: 'update:modelValue', modalVisible: boolean): void
|
|
45
|
+
(e: 'fetch-list-data')
|
|
46
|
+
}>()
|
|
47
|
+
|
|
48
|
+
const form = reactive<Values>(
|
|
49
|
+
Object.assign(
|
|
50
|
+
{},
|
|
51
|
+
{
|
|
52
|
+
templateContent: '',
|
|
53
|
+
id: '',
|
|
54
|
+
templateName: '',
|
|
55
|
+
},
|
|
56
|
+
props.currentRow,
|
|
57
|
+
),
|
|
58
|
+
)
|
|
59
|
+
const handleCancel = () => {
|
|
60
|
+
emit('update:modelValue', false)
|
|
61
|
+
}
|
|
62
|
+
const handleOk = (e: MouseEvent) => {
|
|
63
|
+
console.log(e)
|
|
64
|
+
Modal.confirm({
|
|
65
|
+
title: srmI18n('i18n_title_confirmtoSave', '确认保存'),
|
|
66
|
+
content: srmI18n('i18n_title_isConfirmtoSave', '是否确认保存?'),
|
|
67
|
+
onOk() {
|
|
68
|
+
postData()
|
|
69
|
+
},
|
|
70
|
+
})
|
|
71
|
+
}
|
|
72
|
+
const postData = () => {
|
|
73
|
+
let url = '/notice/purchaseNoticeTemplate/add'
|
|
74
|
+
if (form.id && form.id != '') {
|
|
75
|
+
url = '/notice/purchaseNoticeTemplate/edit'
|
|
76
|
+
}
|
|
77
|
+
qHttp
|
|
78
|
+
.post({
|
|
79
|
+
url,
|
|
80
|
+
data: form,
|
|
81
|
+
})
|
|
82
|
+
.then((res) => {
|
|
83
|
+
if (res && res.success) {
|
|
84
|
+
message.success(res.message)
|
|
85
|
+
emit('fetch-list-data')
|
|
86
|
+
} else {
|
|
87
|
+
message.error(res.message)
|
|
88
|
+
}
|
|
89
|
+
})
|
|
90
|
+
}
|
|
91
|
+
</script>
|