af-mobile-client-vue3 1.2.40 → 1.2.41
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/package.json +1 -1
- package/src/components/data/XFormGroup/index.vue +19 -68
- package/src/components/data/XFormItem/index.vue +49 -4
- package/src/components/data/XReportGrid/XReportDemo.vue +33 -33
- package/src/components/data/XReportGrid/print.js +184 -184
- package/src/utils/queryFormDefaultRangePicker.ts +57 -57
- package/src/views/component/XCellListView/index.vue +133 -126
- package/src/views/component/XFormGroupView/index.vue +15 -20
- package/src/views/component/XFormView/index.vue +15 -80
- package/vite.config.ts +2 -2
- package/src/components/data/XFormGroup/README.md +0 -677
|
@@ -1,57 +1,57 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* 根据类型获取日期区间字符串
|
|
3
|
-
* @param type '当年' | 'curMonth' | '当日'
|
|
4
|
-
* @param show 区分实际值还是显示值, true为实际值, false为显示值
|
|
5
|
-
* @returns [start, end] 例:['2024-01-01 00:00:00', '2024-12-31 23:59:59']
|
|
6
|
-
*/
|
|
7
|
-
export function getRangeByType(type: string, show: boolean): [string, string] {
|
|
8
|
-
const now = new Date()
|
|
9
|
-
const year = now.getFullYear()
|
|
10
|
-
const month = (now.getMonth() + 1).toString().padStart(2, '0')
|
|
11
|
-
const day = now.getDate().toString().padStart(2, '0')
|
|
12
|
-
|
|
13
|
-
if (!show) {
|
|
14
|
-
if (type === 'curYear') {
|
|
15
|
-
return [
|
|
16
|
-
`${year}-01-01 00:00:00`,
|
|
17
|
-
`${year}-12-31 23:59:59`,
|
|
18
|
-
]
|
|
19
|
-
}
|
|
20
|
-
if (type === 'curMonth') {
|
|
21
|
-
const lastDay = new Date(year, now.getMonth() + 1, 0).getDate()
|
|
22
|
-
return [
|
|
23
|
-
`${year}-${month}-01 00:00:00`,
|
|
24
|
-
`${year}-${month}-${lastDay.toString().padStart(2, '0')} 23:59:59`,
|
|
25
|
-
]
|
|
26
|
-
}
|
|
27
|
-
if (type === 'curDay') {
|
|
28
|
-
return [
|
|
29
|
-
`${year}-${month}-${day} 00:00:00`,
|
|
30
|
-
`${year}-${month}-${day} 23:59:59`,
|
|
31
|
-
]
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
if (show) {
|
|
35
|
-
if (type === 'curYear') {
|
|
36
|
-
return [
|
|
37
|
-
`${year}-01-01`,
|
|
38
|
-
`${year}-12-31`,
|
|
39
|
-
]
|
|
40
|
-
}
|
|
41
|
-
if (type === 'curMonth') {
|
|
42
|
-
const lastDay = new Date(year, now.getMonth() + 1, 0).getDate()
|
|
43
|
-
return [
|
|
44
|
-
`${year}-${month}-01`,
|
|
45
|
-
`${year}-${month}-${lastDay.toString().padStart(2, '0')}`,
|
|
46
|
-
]
|
|
47
|
-
}
|
|
48
|
-
if (type === 'curDay') {
|
|
49
|
-
return [
|
|
50
|
-
`${year}-${month}-${day}`,
|
|
51
|
-
`${year}-${month}-${day}`,
|
|
52
|
-
]
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
// 兜底返回空字符串数组
|
|
56
|
-
return ['', '']
|
|
57
|
-
}
|
|
1
|
+
/**
|
|
2
|
+
* 根据类型获取日期区间字符串
|
|
3
|
+
* @param type '当年' | 'curMonth' | '当日'
|
|
4
|
+
* @param show 区分实际值还是显示值, true为实际值, false为显示值
|
|
5
|
+
* @returns [start, end] 例:['2024-01-01 00:00:00', '2024-12-31 23:59:59']
|
|
6
|
+
*/
|
|
7
|
+
export function getRangeByType(type: string, show: boolean): [string, string] {
|
|
8
|
+
const now = new Date()
|
|
9
|
+
const year = now.getFullYear()
|
|
10
|
+
const month = (now.getMonth() + 1).toString().padStart(2, '0')
|
|
11
|
+
const day = now.getDate().toString().padStart(2, '0')
|
|
12
|
+
|
|
13
|
+
if (!show) {
|
|
14
|
+
if (type === 'curYear') {
|
|
15
|
+
return [
|
|
16
|
+
`${year}-01-01 00:00:00`,
|
|
17
|
+
`${year}-12-31 23:59:59`,
|
|
18
|
+
]
|
|
19
|
+
}
|
|
20
|
+
if (type === 'curMonth') {
|
|
21
|
+
const lastDay = new Date(year, now.getMonth() + 1, 0).getDate()
|
|
22
|
+
return [
|
|
23
|
+
`${year}-${month}-01 00:00:00`,
|
|
24
|
+
`${year}-${month}-${lastDay.toString().padStart(2, '0')} 23:59:59`,
|
|
25
|
+
]
|
|
26
|
+
}
|
|
27
|
+
if (type === 'curDay') {
|
|
28
|
+
return [
|
|
29
|
+
`${year}-${month}-${day} 00:00:00`,
|
|
30
|
+
`${year}-${month}-${day} 23:59:59`,
|
|
31
|
+
]
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
if (show) {
|
|
35
|
+
if (type === 'curYear') {
|
|
36
|
+
return [
|
|
37
|
+
`${year}-01-01`,
|
|
38
|
+
`${year}-12-31`,
|
|
39
|
+
]
|
|
40
|
+
}
|
|
41
|
+
if (type === 'curMonth') {
|
|
42
|
+
const lastDay = new Date(year, now.getMonth() + 1, 0).getDate()
|
|
43
|
+
return [
|
|
44
|
+
`${year}-${month}-01`,
|
|
45
|
+
`${year}-${month}-${lastDay.toString().padStart(2, '0')}`,
|
|
46
|
+
]
|
|
47
|
+
}
|
|
48
|
+
if (type === 'curDay') {
|
|
49
|
+
return [
|
|
50
|
+
`${year}-${month}-${day}`,
|
|
51
|
+
`${year}-${month}-${day}`,
|
|
52
|
+
]
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
// 兜底返回空字符串数组
|
|
56
|
+
return ['', '']
|
|
57
|
+
}
|
|
@@ -1,142 +1,149 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
import XCellList from '@af-mobile-client-vue3/components/data/XCellList/index.vue'
|
|
3
|
-
import
|
|
3
|
+
import NormalDataLayout from '@af-mobile-client-vue3/components/layout/NormalDataLayout/index.vue'
|
|
4
|
+
import { useUserStore } from '@af-mobile-client-vue3/stores/modules/user'
|
|
5
|
+
import { defineEmits, ref } from 'vue'
|
|
4
6
|
import { useRouter } from 'vue-router'
|
|
5
7
|
|
|
6
|
-
|
|
7
|
-
const
|
|
8
|
+
// 定义事件
|
|
9
|
+
const emit = defineEmits(['deleteRow'])
|
|
10
|
+
const userInfo = useUserStore().getUserInfo()
|
|
11
|
+
// 访问路由
|
|
8
12
|
const router = useRouter()
|
|
13
|
+
// 获取默认值
|
|
14
|
+
const idKey = ref('o_id')
|
|
9
15
|
|
|
10
|
-
//
|
|
11
|
-
|
|
12
|
-
|
|
16
|
+
// 简易crud表单测试
|
|
17
|
+
// const configName = ref('orderCarInMobileCRUD')
|
|
18
|
+
// const serviceName = ref('af-gaslink')
|
|
19
|
+
// const configName = ref('lngPriceManageMobileCRUD')
|
|
20
|
+
const configName = ref('测试2')
|
|
21
|
+
const serviceName = ref('af-gaslink')
|
|
22
|
+
// const configName = ref('mobile_liushuiQueryCRUD')
|
|
23
|
+
// const serviceName = ref('af-revenue')
|
|
24
|
+
|
|
25
|
+
// 资源权限测试
|
|
26
|
+
// const configName = ref('crud_sources_test')
|
|
27
|
+
// const serviceName = ref('af-system')
|
|
28
|
+
|
|
29
|
+
// 实际业务测试
|
|
30
|
+
// const configName = ref('lngChargeAuditMobileCRUD')
|
|
31
|
+
// const serviceName = ref('af-gaslink')
|
|
32
|
+
|
|
33
|
+
// 跳转到详情页面
|
|
34
|
+
// function toDetail(item) {
|
|
35
|
+
// router.push({
|
|
36
|
+
// name: 'XCellDetailView',
|
|
37
|
+
// params: { id: item[idKey.value] }, // 如果使用命名路由,推荐使用路由参数而不是直接构建 URL
|
|
38
|
+
// query: {
|
|
39
|
+
// operName: item[operNameKey.value],
|
|
40
|
+
// method:item[methodKey.value],
|
|
41
|
+
// requestMethod:item[requestMethodKey.value],
|
|
42
|
+
// operatorType:item[operatorTypeKey.value],
|
|
43
|
+
// operUrl:item[operUrlKey.value],
|
|
44
|
+
// operIp:item[operIpKey.value],
|
|
45
|
+
// costTime:item[costTimeKey.value],
|
|
46
|
+
// operTime:item[operTimeKey.value],
|
|
47
|
+
//
|
|
48
|
+
// title: item[titleKey.value],
|
|
49
|
+
// businessType: item[businessTypeKey.value],
|
|
50
|
+
// status:item[statusKey.value]
|
|
51
|
+
// }
|
|
52
|
+
// })
|
|
53
|
+
// }
|
|
54
|
+
|
|
55
|
+
// 跳转到表单——以表单组来渲染纯表单
|
|
56
|
+
function toDetail(item) {
|
|
57
|
+
router.push({
|
|
58
|
+
name: 'XFormGroupView',
|
|
59
|
+
// query: {
|
|
60
|
+
// id: item[idKey.value],
|
|
61
|
+
// id: item.rr_id,
|
|
62
|
+
// o_id: item.o_id,
|
|
63
|
+
// },
|
|
64
|
+
})
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
// 新增功能
|
|
68
|
+
// function addOption(totalCount) {
|
|
69
|
+
// router.push({
|
|
70
|
+
// name: 'XFormView',
|
|
71
|
+
// params: { id: totalCount, openid: totalCount },
|
|
72
|
+
// query: {
|
|
73
|
+
// configName: configName.value,
|
|
74
|
+
// serviceName: serviceName.value,
|
|
75
|
+
// mode: '新增',
|
|
76
|
+
// },
|
|
77
|
+
// })
|
|
78
|
+
// }
|
|
79
|
+
function addOption() {
|
|
80
|
+
router.push({
|
|
81
|
+
name: 'XFormGroupView',
|
|
82
|
+
// params: { id: totalCount.value },
|
|
83
|
+
// query: {
|
|
84
|
+
// configName: configName.value,
|
|
85
|
+
// serviceName: serviceName.value,
|
|
86
|
+
// mode: '新增',
|
|
87
|
+
// },
|
|
88
|
+
})
|
|
89
|
+
// 如果存在回调函数,调用它并传递true表示已处理
|
|
90
|
+
// if (typeof callback === 'function') {
|
|
91
|
+
// callback(true)
|
|
92
|
+
// }
|
|
13
93
|
}
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
94
|
+
|
|
95
|
+
// 修改功能
|
|
96
|
+
function updateRow(result) {
|
|
97
|
+
console.log('用户----', userInfo)
|
|
98
|
+
router.push({
|
|
99
|
+
name: 'XFormGroupView',
|
|
100
|
+
// params: { id: result.o_id, openid: result.o_id },
|
|
101
|
+
// query: {
|
|
102
|
+
// configName: configName.value,
|
|
103
|
+
// serviceName: serviceName.value,
|
|
104
|
+
// mode: '修改',
|
|
105
|
+
// },
|
|
106
|
+
})
|
|
17
107
|
}
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
108
|
+
|
|
109
|
+
// 删除功能
|
|
110
|
+
function deleteRow(result) {
|
|
111
|
+
emit('deleteRow', result.o_id)
|
|
21
112
|
}
|
|
22
|
-
onMounted(() => {
|
|
23
|
-
})
|
|
24
113
|
</script>
|
|
25
114
|
|
|
26
115
|
<template>
|
|
27
|
-
<
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
116
|
+
<NormalDataLayout id="XCellListView" title="工作计划">
|
|
117
|
+
<template #layout_content>
|
|
118
|
+
<!-- <XCellList -->
|
|
119
|
+
<!-- :config-name="configName" -->
|
|
120
|
+
<!-- :service-name="serviceName" -->
|
|
121
|
+
<!-- :custom-add="true" -->
|
|
122
|
+
<!-- :custom-edit="true" -->
|
|
123
|
+
<!-- :id-key="idKey" -->
|
|
124
|
+
<!-- @to-detail="toDetail" -->
|
|
125
|
+
<!-- @delete-row="deleteRow" -->
|
|
126
|
+
<!-- @update="updateRow" -->
|
|
127
|
+
<!-- @add="addOption" -->
|
|
128
|
+
<!-- /> -->
|
|
129
|
+
|
|
130
|
+
<!-- :fix-query-form="{ u_f_price_state: ['生效', '待生效'] }" -->
|
|
131
|
+
|
|
132
|
+
<!-- <XCellList -->
|
|
133
|
+
<!-- config-name="ApplyMobileSuperviseCRUD" -->
|
|
134
|
+
<!-- service-name="af-apply" -->
|
|
135
|
+
<!-- @to-detail="toDetail" -->
|
|
136
|
+
<!-- @delete-row="deleteRow" -->
|
|
137
|
+
<!-- /> -->
|
|
138
|
+
|
|
139
|
+
<XCellList
|
|
140
|
+
service-name="af-revenue"
|
|
141
|
+
config-name="userfiles_sel_address"
|
|
142
|
+
@to-detail="toDetail"
|
|
143
|
+
/>
|
|
144
|
+
</template>
|
|
145
|
+
</NormalDataLayout>
|
|
34
146
|
</template>
|
|
35
147
|
|
|
36
148
|
<style scoped lang="less">
|
|
37
|
-
.cell-search-after {
|
|
38
|
-
padding: 0 12px 12px 12px;
|
|
39
|
-
background-color: #fff;
|
|
40
|
-
.van-row:first-child {
|
|
41
|
-
align-items: center;
|
|
42
|
-
margin-bottom: 8px;
|
|
43
|
-
padding: 0 2px;
|
|
44
|
-
h4 {
|
|
45
|
-
font-size: 1.08rem;
|
|
46
|
-
font-weight: 600;
|
|
47
|
-
margin: 0;
|
|
48
|
-
color: #222;
|
|
49
|
-
letter-spacing: 1px;
|
|
50
|
-
}
|
|
51
|
-
.stat-date-range {
|
|
52
|
-
display: flex;
|
|
53
|
-
align-items: center;
|
|
54
|
-
justify-content: flex-end;
|
|
55
|
-
font-size: 0.92rem;
|
|
56
|
-
color: #b0b3b8;
|
|
57
|
-
font-weight: 400;
|
|
58
|
-
span {
|
|
59
|
-
margin-left: 4px;
|
|
60
|
-
font-size: 0.92rem;
|
|
61
|
-
color: #b0b3b8;
|
|
62
|
-
}
|
|
63
|
-
.van-icon {
|
|
64
|
-
font-size: 1rem;
|
|
65
|
-
color: #b0b3b8;
|
|
66
|
-
margin-right: 2px;
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
.van-row:nth-child(2) {
|
|
71
|
-
margin-top: 8px;
|
|
72
|
-
// 统计卡片间距由gutter控制
|
|
73
|
-
.van-col {
|
|
74
|
-
// 让卡片宽度自适应
|
|
75
|
-
.stat-card {
|
|
76
|
-
width: 100%;
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
.stat-card {
|
|
81
|
-
display: flex;
|
|
82
|
-
flex-direction: column;
|
|
83
|
-
align-items: center;
|
|
84
|
-
justify-content: center;
|
|
85
|
-
border-radius: 12px;
|
|
86
|
-
padding: 6px 0 4px 0; // 压缩高度
|
|
87
|
-
min-height: 44px; // 压缩高度
|
|
88
|
-
position: relative;
|
|
89
|
-
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
|
|
90
|
-
background: #f7f8fa;
|
|
91
|
-
.stat-num {
|
|
92
|
-
font-size: 1.08rem; // 缩小字体
|
|
93
|
-
font-weight: 600;
|
|
94
|
-
margin-bottom: 2px;
|
|
95
|
-
}
|
|
96
|
-
.stat-label {
|
|
97
|
-
font-size: 0.82rem; // 缩小字体
|
|
98
|
-
margin-bottom: 2px;
|
|
99
|
-
}
|
|
100
|
-
.stat-icon {
|
|
101
|
-
position: absolute;
|
|
102
|
-
top: 6px;
|
|
103
|
-
right: 8px;
|
|
104
|
-
font-size: 1rem;
|
|
105
|
-
opacity: 0.4;
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
.stat-total {
|
|
109
|
-
background: #f0f5ff;
|
|
110
|
-
color: #2f54eb;
|
|
111
|
-
.stat-num,
|
|
112
|
-
.stat-label {
|
|
113
|
-
color: #2f54eb;
|
|
114
|
-
}
|
|
115
|
-
.stat-icon {
|
|
116
|
-
color: #2f54eb;
|
|
117
|
-
}
|
|
118
|
-
}
|
|
119
|
-
.stat-done {
|
|
120
|
-
background: #e6fffb;
|
|
121
|
-
color: #13c2c2;
|
|
122
|
-
.stat-num,
|
|
123
|
-
.stat-label {
|
|
124
|
-
color: #13c2c2;
|
|
125
|
-
}
|
|
126
|
-
.stat-icon {
|
|
127
|
-
color: #13c2c2;
|
|
128
|
-
}
|
|
129
|
-
}
|
|
130
|
-
.stat-processing {
|
|
131
|
-
background: #f9f0ff;
|
|
132
|
-
color: #b37feb;
|
|
133
|
-
.stat-num,
|
|
134
|
-
.stat-label {
|
|
135
|
-
color: #b37feb;
|
|
136
|
-
}
|
|
137
|
-
.stat-icon {
|
|
138
|
-
color: #b37feb;
|
|
139
|
-
}
|
|
140
|
-
}
|
|
141
|
-
}
|
|
142
149
|
</style>
|
|
@@ -1,36 +1,35 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
import XFormGroup from '@af-mobile-client-vue3/components/data/XFormGroup/index.vue'
|
|
3
|
-
import XFormView from '@af-mobile-client-vue3/views/component/XFormView/index.vue'
|
|
4
3
|
import NormalDataLayout from '@af-mobile-client-vue3/components/layout/NormalDataLayout/index.vue'
|
|
5
4
|
import { showDialog } from 'vant'
|
|
6
5
|
import { ref } from 'vue'
|
|
7
6
|
import { useRoute } from 'vue-router'
|
|
8
7
|
|
|
8
|
+
// const configName = ref('reviewFormGroup')
|
|
9
|
+
// const serviceName = ref('af-revenue')
|
|
10
|
+
|
|
9
11
|
// 纯表单
|
|
10
|
-
const configName = ref('
|
|
11
|
-
const serviceName = ref('af-
|
|
12
|
+
// const configName = ref('form_check_test')
|
|
13
|
+
// const serviceName = ref('af-system')
|
|
12
14
|
|
|
13
15
|
// const configName = ref("计划下发Form")
|
|
14
16
|
// const serviceName = ref("af-linepatrol")
|
|
15
17
|
|
|
16
18
|
// 表单组
|
|
17
|
-
|
|
18
|
-
|
|
19
|
+
const configName = ref('lngChargeAuditMobileFormGroup')
|
|
20
|
+
const serviceName = ref('af-gaslink')
|
|
19
21
|
|
|
20
22
|
const formData = ref({})
|
|
21
23
|
const formGroup = ref(null)
|
|
22
24
|
const route = useRoute()
|
|
23
25
|
const isInit = ref(false)
|
|
24
26
|
function submit(_result) {
|
|
25
|
-
showDialog({ message: '提交成功' })
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
function setRef(value: any) {
|
|
30
|
-
console.log('myXForm', myXForm)
|
|
31
|
-
formGroup.value.setRef(myXForm.value)
|
|
32
|
-
console.log(formGroup)
|
|
27
|
+
showDialog({ message: '提交成功' }).then(() => {
|
|
28
|
+
console.log('12121')
|
|
29
|
+
// history.back()
|
|
30
|
+
})
|
|
33
31
|
}
|
|
32
|
+
|
|
34
33
|
// 表单组——数据
|
|
35
34
|
// function initComponents () {
|
|
36
35
|
// runLogic('getlngChargeAuditMobileFormGroupData', {id: 29}, 'af-gaslink').then((res) => {
|
|
@@ -68,16 +67,12 @@ function setRef(value: any) {
|
|
|
68
67
|
<!-- v-if="isInit" -->
|
|
69
68
|
<XFormGroup
|
|
70
69
|
ref="formGroup"
|
|
71
|
-
|
|
72
|
-
|
|
70
|
+
config-name="appapplyuserinfoFormGroup"
|
|
71
|
+
service-name="af-apply"
|
|
73
72
|
:group-form-data="formData"
|
|
74
73
|
mode="新增"
|
|
75
74
|
@submit="submit"
|
|
76
|
-
|
|
77
|
-
<!-- <template #device="{ setRef, removeRef, item, formData }">
|
|
78
|
-
<XFormView :setRef="setRef" :formGroupName="'myXForm'"/>
|
|
79
|
-
</template>-->
|
|
80
|
-
</XFormGroup>
|
|
75
|
+
/>
|
|
81
76
|
</template>
|
|
82
77
|
</NormalDataLayout>
|
|
83
78
|
</template>
|
|
@@ -1,90 +1,25 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
-
// 组件顶部功能说明:本组件为表单视图,支持通过 setRef 注册自身到父组件
|
|
3
2
|
import XForm from '@af-mobile-client-vue3/components/data/XForm/index.vue'
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
6
|
-
import { useUserStore } from '@af-mobile-client-vue3/stores/modules/user'
|
|
7
|
-
import dayjs from 'dayjs/esm/index'
|
|
8
|
-
import { showFailToast, showToast } from 'vant'
|
|
9
|
-
import { computed, defineExpose, defineProps, onMounted, onUnmounted, ref } from 'vue'
|
|
10
|
-
import { useRoute } from 'vue-router'
|
|
3
|
+
import NormalDataLayout from '@af-mobile-client-vue3/components/layout/NormalDataLayout/index.vue'
|
|
4
|
+
import { ref } from 'vue'
|
|
11
5
|
|
|
12
|
-
const
|
|
13
|
-
|
|
14
|
-
removeRef?: (refValue: any) => void
|
|
15
|
-
formGroupName?: string
|
|
16
|
-
}>(), {
|
|
17
|
-
setRef: () => {},
|
|
18
|
-
removeRef: () => {},
|
|
19
|
-
formGroupName: '',
|
|
20
|
-
})
|
|
21
|
-
const configName = ref('mobile_OtherChargeCancelForm')
|
|
22
|
-
const serviceName = ref('af-apply')
|
|
23
|
-
const route = useRoute()
|
|
24
|
-
const userInfo = useUserStore().getUserInfo()
|
|
25
|
-
const workflowId = computed(() => route.query.workflowid)
|
|
26
|
-
const formData = ref({})
|
|
6
|
+
const configName = ref('AddConstructionForm')
|
|
7
|
+
const serviceName = ref('af-linepatrol')
|
|
27
8
|
|
|
28
|
-
const
|
|
29
|
-
|
|
30
|
-
function submit(res: any) {
|
|
31
|
-
if (Number(res.charge_money) > Number(res.surplus_money)) {
|
|
32
|
-
showFailToast('收费金额不能大于未结金额!!')
|
|
33
|
-
return
|
|
34
|
-
}
|
|
35
|
-
const saveData = {
|
|
36
|
-
f_payment_type: res.payment_type,
|
|
37
|
-
f_charge_money: res.charge_money,
|
|
38
|
-
f_amount_words: res.amount_words,
|
|
39
|
-
f_payment_method: res.payment_method,
|
|
40
|
-
f_actual_date: res.actual_date,
|
|
41
|
-
f_charge_status: '有效',
|
|
42
|
-
f_workflow_id: workflowId.value,
|
|
43
|
-
f_charge_collectors: userInfo.f_operator,
|
|
44
|
-
f_charge_collectors_id: userInfo.f_operatorid,
|
|
45
|
-
f_charge_date: dayjs().format('YYYY-MM-DD HH:mm:ss'),
|
|
46
|
-
f_filialeid: userInfo.f_orgid,
|
|
47
|
-
f_filiale: userInfo.f_orgname,
|
|
48
|
-
}
|
|
49
|
-
post('api/af-apply/entity/save/t_charge_record', saveData).then((_res) => {
|
|
50
|
-
showToast('提交成功!')
|
|
51
|
-
history.back()
|
|
52
|
-
})
|
|
53
|
-
}
|
|
54
|
-
function init() {
|
|
55
|
-
runLogic('getApplyBusinessrecode', { f_workflow_id: 854 }, 'af-apply').then((res) => {
|
|
56
|
-
formData.value = res
|
|
57
|
-
console.log('res==', res)
|
|
58
|
-
})
|
|
59
|
-
}
|
|
60
|
-
function validate() {
|
|
61
|
-
// 调用 XForm 的 validate 方法
|
|
62
|
-
return xFormRef.value?.validate?.() ?? Promise.resolve()
|
|
63
|
-
}
|
|
64
|
-
function getFormData() {
|
|
65
|
-
console.log('自定义表单=====', xFormRef.value.getFormData())
|
|
66
|
-
// 获取 XForm 的表单数据
|
|
67
|
-
return xFormRef.value?.getFormData?.() ?? {}
|
|
68
|
-
}
|
|
69
|
-
const exposeObj = { validate, getFormData, init, formGroupName: props.formGroupName }
|
|
70
|
-
defineExpose(exposeObj)
|
|
71
|
-
onMounted(() => {
|
|
72
|
-
props.setRef && props.setRef(exposeObj)
|
|
73
|
-
})
|
|
74
|
-
onUnmounted(() => {
|
|
75
|
-
props.removeRef && props.removeRef(exposeObj)
|
|
76
|
-
})
|
|
9
|
+
const formGroupAddConstruction = ref(null)
|
|
77
10
|
</script>
|
|
78
11
|
|
|
79
12
|
<template>
|
|
80
|
-
<
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
13
|
+
<NormalDataLayout id="XFormGroupView" title="纯表单">
|
|
14
|
+
<template #layout_content>
|
|
15
|
+
<XForm
|
|
16
|
+
ref="formGroupAddConstruction"
|
|
17
|
+
mode="新增"
|
|
18
|
+
:config-name="configName"
|
|
19
|
+
:service-name="serviceName"
|
|
20
|
+
/>
|
|
21
|
+
</template>
|
|
22
|
+
</NormalDataLayout>
|
|
88
23
|
</template>
|
|
89
24
|
|
|
90
25
|
<style scoped lang="less">
|
package/vite.config.ts
CHANGED
|
@@ -11,8 +11,8 @@ export default ({ mode }: ConfigEnv): UserConfig => {
|
|
|
11
11
|
|
|
12
12
|
const appProxys = {}
|
|
13
13
|
|
|
14
|
-
const v4Server = 'http://
|
|
15
|
-
const v3Server = '
|
|
14
|
+
const v4Server = 'http://aote-office.8866.org:31567'
|
|
15
|
+
const v3Server = 'http://aote-office.8866.org:31567'
|
|
16
16
|
const OSSServerDev = 'http://192.168.50.67:30351'
|
|
17
17
|
const geoserver = 'http://39.104.49.8:30372'
|
|
18
18
|
// const OSSServerProd = 'http://192.168.50.67:31351'
|