vue2-client 1.16.62 → 1.16.64
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/.claude/settings.local.json +7 -2
- package/.serena/project.yml +67 -0
- package/CLAUDE.md +12 -4
- package/package.json +1 -1
- package/src/assets/img/paymentMethod/icon1.png +0 -0
- package/src/assets/img/paymentMethod/icon2.png +0 -0
- package/src/assets/img/paymentMethod/icon3.png +0 -0
- package/src/assets/img/paymentMethod/icon4.png +0 -0
- package/src/assets/img/paymentMethod/icon5.png +0 -0
- package/src/assets/img/paymentMethod/icon6.png +0 -0
- package/src/base-client/components/common/HIS/demo.vue +14 -14
- package/src/base-client/components/common/Upload/Upload.vue +4 -4
- package/src/base-client/components/common/XCollapse/XCollapse.vue +34 -20
- package/src/base-client/components/common/XReport/XReportHospitalizationDemo.vue +45 -0
- package/src/base-client/components/common/XReportGrid/XReportDemo.vue +1 -1
- package/src/base-client/components/common/XReportGrid/XReportTrGroup.vue +19 -5
- package/src/base-client/components/his/XCharge/XChargeDemo.vue +0 -1
- package/src/base-client/components/his/XHDescriptions/XHDescriptions.vue +357 -170
- package/src/base-client/components/his/XSidebar/XSidebar.vue +123 -27
- package/src/pages/WorkflowDetail/WorkFlowDemo3.vue +203 -203
- package/src/router/async/router.map.js +1 -0
- package/src-base-client/components/his/XCharge/README.md +0 -0
- package/src-base-client/components/his/XCharge/XCharge.vue +0 -0
|
@@ -104,6 +104,43 @@ export default {
|
|
|
104
104
|
}
|
|
105
105
|
},
|
|
106
106
|
methods: {
|
|
107
|
+
// 通用的样式保护方法
|
|
108
|
+
protectElementStyles (element, stylesToProtect = ['padding', 'padding-left', 'padding-right', 'padding-top', 'padding-bottom', 'margin', 'background-color', 'color', 'font-size', 'border']) {
|
|
109
|
+
const protectedStyles = {}
|
|
110
|
+
|
|
111
|
+
// 保存需要保护的样式
|
|
112
|
+
stylesToProtect.forEach(style => {
|
|
113
|
+
const value = element.style.getPropertyValue(style)
|
|
114
|
+
if (value) {
|
|
115
|
+
protectedStyles[style] = value
|
|
116
|
+
}
|
|
117
|
+
})
|
|
118
|
+
|
|
119
|
+
return protectedStyles
|
|
120
|
+
},
|
|
121
|
+
|
|
122
|
+
// 恢复保护的样式
|
|
123
|
+
restoreElementStyles (element, protectedStyles) {
|
|
124
|
+
Object.entries(protectedStyles).forEach(([property, value]) => {
|
|
125
|
+
if (value) {
|
|
126
|
+
element.style.setProperty(property, value, 'important')
|
|
127
|
+
}
|
|
128
|
+
})
|
|
129
|
+
},
|
|
130
|
+
|
|
131
|
+
// 安全地设置布局样式,保护其他样式
|
|
132
|
+
safeSetLayoutStyles (element, layoutStyles) {
|
|
133
|
+
// 保护所有可能的样式配置
|
|
134
|
+
const protectedStyles = this.protectElementStyles(element)
|
|
135
|
+
|
|
136
|
+
// 设置布局样式
|
|
137
|
+
Object.entries(layoutStyles).forEach(([property, value]) => {
|
|
138
|
+
element.style.setProperty(property, value)
|
|
139
|
+
})
|
|
140
|
+
|
|
141
|
+
// 恢复保护的样式
|
|
142
|
+
this.restoreElementStyles(element, protectedStyles)
|
|
143
|
+
},
|
|
107
144
|
toggleDrawer () {
|
|
108
145
|
this.isOpen = !this.isOpen
|
|
109
146
|
this.$emit('on-drawer-change', this.isOpen)
|
|
@@ -144,7 +181,7 @@ export default {
|
|
|
144
181
|
})
|
|
145
182
|
},
|
|
146
183
|
// 获取同级的其他所有a-col元素
|
|
147
|
-
getSiblingCols () {
|
|
184
|
+
getSiblingCols (className) {
|
|
148
185
|
try {
|
|
149
186
|
// 找到当前组件所在的a-col
|
|
150
187
|
let currentCol = this.$el.parentNode
|
|
@@ -162,10 +199,8 @@ export default {
|
|
|
162
199
|
return []
|
|
163
200
|
}
|
|
164
201
|
|
|
165
|
-
//
|
|
166
|
-
const allCols = Array.from(row.children).filter(child =>
|
|
167
|
-
child.className.includes('ant-col-12')
|
|
168
|
-
)
|
|
202
|
+
// 修改这里 如果没有指定className 则获取全部
|
|
203
|
+
const allCols = Array.from(row.children).filter(child => !className || child.className.includes(className))
|
|
169
204
|
|
|
170
205
|
// 过滤掉当前a-col,返回其他所有a-col
|
|
171
206
|
return allCols.filter(col => col !== currentCol)
|
|
@@ -174,10 +209,48 @@ export default {
|
|
|
174
209
|
return []
|
|
175
210
|
}
|
|
176
211
|
},
|
|
212
|
+
|
|
213
|
+
computeRemainingWidth (allElements, mainCol, currentCol) {
|
|
214
|
+
if (!allElements || allElements.length === 0) {
|
|
215
|
+
return '0px'
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
// 排除 mainCol 和 currentCol
|
|
219
|
+
const filteredElements = allElements.filter(element =>
|
|
220
|
+
element !== mainCol && element !== currentCol
|
|
221
|
+
)
|
|
222
|
+
|
|
223
|
+
if (filteredElements.length === 0) {
|
|
224
|
+
return '0px'
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
let totalWidth = 0
|
|
228
|
+
|
|
229
|
+
filteredElements.forEach(element => {
|
|
230
|
+
if (element && element.style) {
|
|
231
|
+
// 获取元素的计算样式
|
|
232
|
+
const computedStyle = window.getComputedStyle(element)
|
|
233
|
+
|
|
234
|
+
// 获取宽度(包括padding和border)
|
|
235
|
+
const width = parseFloat(computedStyle.width) || 0
|
|
236
|
+
|
|
237
|
+
// 获取左右margin
|
|
238
|
+
const marginLeft = parseFloat(computedStyle.marginLeft) || 0
|
|
239
|
+
const marginRight = parseFloat(computedStyle.marginRight) || 0
|
|
240
|
+
|
|
241
|
+
// 累加总宽度(宽度 + 左右margin)
|
|
242
|
+
totalWidth += width + marginLeft + marginRight
|
|
243
|
+
}
|
|
244
|
+
})
|
|
245
|
+
|
|
246
|
+
// 返回计算出的宽度,如果计算失败则返回默认值
|
|
247
|
+
return totalWidth > 0 ? `${totalWidth}px` : '0px'
|
|
248
|
+
},
|
|
249
|
+
|
|
177
250
|
updateLayout (isOpen) {
|
|
178
251
|
this.$nextTick(() => {
|
|
179
252
|
try {
|
|
180
|
-
const otherCols = this.getSiblingCols()
|
|
253
|
+
const otherCols = this.getSiblingCols('ant-col-12')
|
|
181
254
|
if (otherCols.length > 0) {
|
|
182
255
|
let currentCol = this.$el.parentNode
|
|
183
256
|
while (currentCol && !currentCol.className.includes('ant-col')) {
|
|
@@ -197,28 +270,42 @@ export default {
|
|
|
197
270
|
if (isOpen) {
|
|
198
271
|
if (this.affectLayout) {
|
|
199
272
|
if (this.widthMode === 'px') {
|
|
200
|
-
const drawerWidth = this.expandedWidth ||
|
|
201
|
-
//
|
|
202
|
-
currentCol
|
|
203
|
-
|
|
204
|
-
|
|
273
|
+
const drawerWidth = this.expandedWidth || 602
|
|
274
|
+
// 使用安全的方式设置布局样式
|
|
275
|
+
this.safeSetLayoutStyles(currentCol, {
|
|
276
|
+
flex: `0 0 ${drawerWidth}px`,
|
|
277
|
+
maxWidth: `${drawerWidth}px`,
|
|
278
|
+
transition: 'all 0.3s'
|
|
279
|
+
})
|
|
205
280
|
if (otherCols.length === 1) {
|
|
206
281
|
const mainCol = otherCols[0]
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
282
|
+
const remainingWidth = this.computeRemainingWidth(this.getSiblingCols(undefined), mainCol, currentCol)
|
|
283
|
+
|
|
284
|
+
// 使用安全的方式设置布局样式
|
|
285
|
+
this.safeSetLayoutStyles(mainCol, {
|
|
286
|
+
flex: '1 1 auto',
|
|
287
|
+
maxWidth: `calc(100% - ${remainingWidth} - ${drawerWidth}px)`,
|
|
288
|
+
transition: 'all 0.3s'
|
|
289
|
+
})
|
|
210
290
|
}
|
|
211
291
|
} else {
|
|
212
292
|
const drawerWidth = (this.expandedWidthPercent || 33.3)
|
|
213
|
-
|
|
214
|
-
currentCol
|
|
215
|
-
|
|
293
|
+
// 使用安全的方式设置布局样式
|
|
294
|
+
this.safeSetLayoutStyles(currentCol, {
|
|
295
|
+
flex: `0 0 ${drawerWidth}%`,
|
|
296
|
+
maxWidth: `${drawerWidth}%`,
|
|
297
|
+
transition: 'all 0.3s'
|
|
298
|
+
})
|
|
216
299
|
if (otherCols.length === 1) {
|
|
217
300
|
const mainCol = otherCols[0]
|
|
218
|
-
const
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
mainCol
|
|
301
|
+
const remainingWidth = this.computeRemainingWidth(this.getSiblingCols(undefined), mainCol, currentCol)
|
|
302
|
+
|
|
303
|
+
// 使用安全的方式设置布局样式
|
|
304
|
+
this.safeSetLayoutStyles(mainCol, {
|
|
305
|
+
flex: `0 0 calc(100% - ${remainingWidth} - ${drawerWidth}%)`,
|
|
306
|
+
maxWidth: `calc(100% - ${remainingWidth} - ${drawerWidth}%)`,
|
|
307
|
+
transition: 'all 0.3s'
|
|
308
|
+
})
|
|
222
309
|
}
|
|
223
310
|
}
|
|
224
311
|
} else {
|
|
@@ -234,14 +321,23 @@ export default {
|
|
|
234
321
|
triggerResize()
|
|
235
322
|
} else {
|
|
236
323
|
// 收缩状态
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
currentCol
|
|
324
|
+
const width = this.widthMode === 'px' ? this.collapsedWidth + 'px' : this.collapsedWidthPercent + '%'
|
|
325
|
+
// 使用安全的方式设置布局样式
|
|
326
|
+
this.safeSetLayoutStyles(currentCol, {
|
|
327
|
+
flex: '0 0 ' + width,
|
|
328
|
+
maxWidth: width,
|
|
329
|
+
transition: 'all 0.3s'
|
|
330
|
+
})
|
|
240
331
|
if (otherCols.length === 1) {
|
|
241
332
|
const mainCol = otherCols[0]
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
333
|
+
const remainingWidth = this.computeRemainingWidth(this.getSiblingCols(undefined), mainCol, currentCol)
|
|
334
|
+
|
|
335
|
+
// 使用安全的方式设置布局样式
|
|
336
|
+
this.safeSetLayoutStyles(mainCol, {
|
|
337
|
+
flex: '1 1 auto',
|
|
338
|
+
maxWth: `calc(100% - ${remainingWidth} - ${width})`,
|
|
339
|
+
transition: 'all 0.3s'
|
|
340
|
+
})
|
|
245
341
|
}
|
|
246
342
|
triggerResize()
|
|
247
343
|
}
|
|
@@ -1,203 +1,203 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div id="beingProcessed">
|
|
3
|
-
<x-form-table
|
|
4
|
-
title="我的工单"
|
|
5
|
-
ref="xFormTable"
|
|
6
|
-
:queryParamsName="queryParamsName"
|
|
7
|
-
:fixed-query-form="{
|
|
8
|
-
users_f_handler_id: currUser.id,
|
|
9
|
-
}"
|
|
10
|
-
@action="toDetail">
|
|
11
|
-
<template #leftButton>
|
|
12
|
-
<a-button @click="addApply">
|
|
13
|
-
<a-icon type="plus"/>
|
|
14
|
-
发起报建
|
|
15
|
-
</a-button>
|
|
16
|
-
</template>
|
|
17
|
-
</x-form-table>
|
|
18
|
-
<a-modal
|
|
19
|
-
v-model="applyAddFlag"
|
|
20
|
-
:footer="null"
|
|
21
|
-
:dialog-style="{ top: '5rem' }"
|
|
22
|
-
:z-index="1001"
|
|
23
|
-
title="发起报建"
|
|
24
|
-
:destroyOnClose="true">
|
|
25
|
-
<x-add-native-form ref="xForm" @onSubmit="applySubmit"/>
|
|
26
|
-
</a-modal>
|
|
27
|
-
<WorkflowDetail
|
|
28
|
-
ref="workFlow"
|
|
29
|
-
@success="success"
|
|
30
|
-
@nextClick="nextClick"
|
|
31
|
-
@x-form-item-emit-func="handleFormItemEvent"
|
|
32
|
-
>
|
|
33
|
-
</WorkflowDetail>
|
|
34
|
-
<!-- 地址选择器 -->
|
|
35
|
-
<address-select ref="addressSelect" @setAddress="setForm"></address-select>
|
|
36
|
-
</div>
|
|
37
|
-
</template>
|
|
38
|
-
|
|
39
|
-
<script>
|
|
40
|
-
import WorkflowDetail from '@vue2-client/pages/WorkflowDetail/WorkflowDetail.vue'
|
|
41
|
-
import XFormTable from '@vue2-client/base-client/components/common/XFormTable/XFormTable'
|
|
42
|
-
import XAddNativeForm from '@vue2-client/base-client/components/common/XAddNativeForm/XAddNativeForm.vue'
|
|
43
|
-
import { getConfigByName, runLogic } from '@vue2-client/services/api/common'
|
|
44
|
-
import { mapState } from 'vuex'
|
|
45
|
-
import AddressSelect from '@vue2-client/pages/addressSelect/index.vue'
|
|
46
|
-
import XFormGroup from '@vue2-client/base-client/components/common/XFormGroup'
|
|
47
|
-
|
|
48
|
-
export default {
|
|
49
|
-
name: 'Apply',
|
|
50
|
-
components: {
|
|
51
|
-
XFormTable,
|
|
52
|
-
XAddNativeForm,
|
|
53
|
-
WorkflowDetail,
|
|
54
|
-
AddressSelect,
|
|
55
|
-
XFormGroup,
|
|
56
|
-
},
|
|
57
|
-
// 透传给子组件的方法(目前XFormTable接了)
|
|
58
|
-
provide () {
|
|
59
|
-
return {
|
|
60
|
-
generalFunction: {
|
|
61
|
-
setCancel: this.setCancel,
|
|
62
|
-
chargeAdd: this.chargeAdd,
|
|
63
|
-
addUser: this.addUser,
|
|
64
|
-
editUser: this.editUser,
|
|
65
|
-
addContract: this.addContract,
|
|
66
|
-
addcharge: this.addcharge,
|
|
67
|
-
updateFormData: this.updateFormData,
|
|
68
|
-
chargeCancel: this.chargeCancel,
|
|
69
|
-
chargeBatchRefund: this.chargeBatchRefund,
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
},
|
|
73
|
-
data () {
|
|
74
|
-
return {
|
|
75
|
-
// 查询配置文件名
|
|
76
|
-
queryParamsName: 'ApplyProcessCRUD',
|
|
77
|
-
// 发起报建弹框控制
|
|
78
|
-
applyAddFlag: false,
|
|
79
|
-
// 提交加载动画
|
|
80
|
-
confirmLoading: false,
|
|
81
|
-
refreshFn: null,
|
|
82
|
-
chargeVisible: false
|
|
83
|
-
}
|
|
84
|
-
},
|
|
85
|
-
computed: {
|
|
86
|
-
...mapState('account', { currUser: 'user' }),
|
|
87
|
-
},
|
|
88
|
-
methods: {
|
|
89
|
-
addApply () {
|
|
90
|
-
console.log('打开了吗')
|
|
91
|
-
this.applyAddFlag = true
|
|
92
|
-
this.$nextTick(
|
|
93
|
-
() => {
|
|
94
|
-
getConfigByName('addApplyForm', 'af-apply', (res) => {
|
|
95
|
-
this.$refs.xForm.init({
|
|
96
|
-
businessType: '新增',
|
|
97
|
-
title: '发起报建',
|
|
98
|
-
...res
|
|
99
|
-
})
|
|
100
|
-
})
|
|
101
|
-
}
|
|
102
|
-
)
|
|
103
|
-
},
|
|
104
|
-
applySubmit (formData) {
|
|
105
|
-
runLogic('addApply', formData).then(
|
|
106
|
-
res => {
|
|
107
|
-
this.$message.success('发起报建成功')
|
|
108
|
-
this.$refs.xFormTable.refreshTable(true)
|
|
109
|
-
this.applyAddFlag = false
|
|
110
|
-
}
|
|
111
|
-
).catch(() => {
|
|
112
|
-
this.applyAddFlag = false
|
|
113
|
-
})
|
|
114
|
-
},
|
|
115
|
-
success () {
|
|
116
|
-
console.log('完工')
|
|
117
|
-
},
|
|
118
|
-
toDetail (record, id) {
|
|
119
|
-
this.$refs.workFlow.init({
|
|
120
|
-
workflowId: record.ab_f_workflow_id
|
|
121
|
-
})
|
|
122
|
-
},
|
|
123
|
-
handleFormItemEvent (func, data, value) {
|
|
124
|
-
console.log('打印一下:', func, data, value)
|
|
125
|
-
if (func === 'selectAddress') {
|
|
126
|
-
this.$refs.addressSelect.setFormShow()
|
|
127
|
-
}
|
|
128
|
-
},
|
|
129
|
-
setForm (record) {
|
|
130
|
-
this.$refs.workFlow.setFormValue({ address: record.f_address, address_id: record.f_address_id })
|
|
131
|
-
},
|
|
132
|
-
nextClick ({ form, formStep, workflowId }) {
|
|
133
|
-
console.log('success', form, formStep, workflowId)
|
|
134
|
-
const data = {
|
|
135
|
-
workflowId,
|
|
136
|
-
form,
|
|
137
|
-
formStep
|
|
138
|
-
}
|
|
139
|
-
runLogic('applySubmitAfter', data, 'af-apply').then(
|
|
140
|
-
res => {
|
|
141
|
-
if (res) {
|
|
142
|
-
// this.$message.success('提交成功!')
|
|
143
|
-
this.$refs.xFormTable.refreshTable(true)
|
|
144
|
-
}
|
|
145
|
-
}
|
|
146
|
-
)
|
|
147
|
-
},
|
|
148
|
-
// 协议作废
|
|
149
|
-
setCancel (record, refreshFn) {
|
|
150
|
-
this.$refs.cancelContract.setCancel(record, refreshFn)
|
|
151
|
-
},
|
|
152
|
-
// 增值收费新增
|
|
153
|
-
chargeAdd (refreshFn) {
|
|
154
|
-
this.$refs.addCharge.chargeAdd(this.$refs.workFlow.workflowId, refreshFn)
|
|
155
|
-
},
|
|
156
|
-
// 协议新增
|
|
157
|
-
addContract (refreshFn) {
|
|
158
|
-
this.$refs.addContract.addContract(this.$refs.workFlow.workflowId, refreshFn)
|
|
159
|
-
},
|
|
160
|
-
// 新增用户
|
|
161
|
-
addUser (refreshFn) {
|
|
162
|
-
if (this.$refs.workFlow.$refs.baseInformation.details.f_workflow_define_name != '团购报建流程') {
|
|
163
|
-
this.$message.success('只有团购报建流程才可以新增用户信息!')
|
|
164
|
-
return
|
|
165
|
-
}
|
|
166
|
-
this.$refs.addUser.addUser(this.$refs.workFlow.workflowId, refreshFn)
|
|
167
|
-
},
|
|
168
|
-
// 编辑用户
|
|
169
|
-
editUser (record, refreshFn) {
|
|
170
|
-
this.$refs.addUser.editUser(record, refreshFn)
|
|
171
|
-
},
|
|
172
|
-
// 新增收费
|
|
173
|
-
addcharge (refreshFn) {
|
|
174
|
-
this.$refs.addApplyCharge.addcharge(this.$refs.workFlow.workflowId, refreshFn)
|
|
175
|
-
},
|
|
176
|
-
// 报装缴费页面初始化
|
|
177
|
-
updateFormData (workflowId) {
|
|
178
|
-
if (this.$refs.workFlow.$refs.baseInformation.details.f_sub_state == '报装缴费') {
|
|
179
|
-
runLogic('getApplyBusinessrecode', { f_workflow_id: workflowId }, 'af-apply').then((res) => {
|
|
180
|
-
this.$refs.workFlow.$refs.workflowHandle.$refs.xAddForm.setForm(res)
|
|
181
|
-
})
|
|
182
|
-
} else if (this.$refs.workFlow.$refs.baseInformation.details.f_sub_state == '合同签订') {
|
|
183
|
-
runLogic('queryAgreementAmount', { workflowId: workflowId }, 'af-apply').then((res) => {
|
|
184
|
-
this.$refs.workFlow.$refs.workflowHandle.$refs.xAddForm.setForm({ add_amount: res[0].f_contract_money })
|
|
185
|
-
})
|
|
186
|
-
}
|
|
187
|
-
},
|
|
188
|
-
// 增值收费单个数据的撤销功能
|
|
189
|
-
chargeCancel (record, refreshFn) {
|
|
190
|
-
this.$refs.cancel.chargeCancel(record, refreshFn)
|
|
191
|
-
},
|
|
192
|
-
// 批量撤销(退费)
|
|
193
|
-
chargeBatchRefund (selectedRowKeys, selectedRows, refreshFn) {
|
|
194
|
-
if (selectedRowKeys.length === 0 || selectedRows.length === 0) {
|
|
195
|
-
this.$message.warn('请选择要退费的记录', 5)
|
|
196
|
-
return
|
|
197
|
-
}
|
|
198
|
-
const workflowId = this.$refs.workFlow.workflowId
|
|
199
|
-
this.$refs.batchRefund.selectRow(selectedRowKeys, selectedRows, refreshFn, workflowId)
|
|
200
|
-
}
|
|
201
|
-
}
|
|
202
|
-
}
|
|
203
|
-
</script>
|
|
1
|
+
<template>
|
|
2
|
+
<div id="beingProcessed">
|
|
3
|
+
<x-form-table
|
|
4
|
+
title="我的工单"
|
|
5
|
+
ref="xFormTable"
|
|
6
|
+
:queryParamsName="queryParamsName"
|
|
7
|
+
:fixed-query-form="{
|
|
8
|
+
users_f_handler_id: currUser.id,
|
|
9
|
+
}"
|
|
10
|
+
@action="toDetail">
|
|
11
|
+
<template #leftButton>
|
|
12
|
+
<a-button @click="addApply">
|
|
13
|
+
<a-icon type="plus"/>
|
|
14
|
+
发起报建
|
|
15
|
+
</a-button>
|
|
16
|
+
</template>
|
|
17
|
+
</x-form-table>
|
|
18
|
+
<a-modal
|
|
19
|
+
v-model="applyAddFlag"
|
|
20
|
+
:footer="null"
|
|
21
|
+
:dialog-style="{ top: '5rem' }"
|
|
22
|
+
:z-index="1001"
|
|
23
|
+
title="发起报建"
|
|
24
|
+
:destroyOnClose="true">
|
|
25
|
+
<x-add-native-form ref="xForm" @onSubmit="applySubmit"/>
|
|
26
|
+
</a-modal>
|
|
27
|
+
<WorkflowDetail
|
|
28
|
+
ref="workFlow"
|
|
29
|
+
@success="success"
|
|
30
|
+
@nextClick="nextClick"
|
|
31
|
+
@x-form-item-emit-func="handleFormItemEvent"
|
|
32
|
+
>
|
|
33
|
+
</WorkflowDetail>
|
|
34
|
+
<!-- 地址选择器 -->
|
|
35
|
+
<address-select ref="addressSelect" @setAddress="setForm"></address-select>
|
|
36
|
+
</div>
|
|
37
|
+
</template>
|
|
38
|
+
|
|
39
|
+
<script>
|
|
40
|
+
import WorkflowDetail from '@vue2-client/pages/WorkflowDetail/WorkflowDetail.vue'
|
|
41
|
+
import XFormTable from '@vue2-client/base-client/components/common/XFormTable/XFormTable'
|
|
42
|
+
import XAddNativeForm from '@vue2-client/base-client/components/common/XAddNativeForm/XAddNativeForm.vue'
|
|
43
|
+
import { getConfigByName, runLogic } from '@vue2-client/services/api/common'
|
|
44
|
+
import { mapState } from 'vuex'
|
|
45
|
+
import AddressSelect from '@vue2-client/pages/addressSelect/index.vue'
|
|
46
|
+
import XFormGroup from '@vue2-client/base-client/components/common/XFormGroup'
|
|
47
|
+
|
|
48
|
+
export default {
|
|
49
|
+
name: 'Apply',
|
|
50
|
+
components: {
|
|
51
|
+
XFormTable,
|
|
52
|
+
XAddNativeForm,
|
|
53
|
+
WorkflowDetail,
|
|
54
|
+
AddressSelect,
|
|
55
|
+
XFormGroup,
|
|
56
|
+
},
|
|
57
|
+
// 透传给子组件的方法(目前XFormTable接了)
|
|
58
|
+
provide () {
|
|
59
|
+
return {
|
|
60
|
+
generalFunction: {
|
|
61
|
+
setCancel: this.setCancel,
|
|
62
|
+
chargeAdd: this.chargeAdd,
|
|
63
|
+
addUser: this.addUser,
|
|
64
|
+
editUser: this.editUser,
|
|
65
|
+
addContract: this.addContract,
|
|
66
|
+
addcharge: this.addcharge,
|
|
67
|
+
updateFormData: this.updateFormData,
|
|
68
|
+
chargeCancel: this.chargeCancel,
|
|
69
|
+
chargeBatchRefund: this.chargeBatchRefund,
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
},
|
|
73
|
+
data () {
|
|
74
|
+
return {
|
|
75
|
+
// 查询配置文件名
|
|
76
|
+
queryParamsName: 'ApplyProcessCRUD',
|
|
77
|
+
// 发起报建弹框控制
|
|
78
|
+
applyAddFlag: false,
|
|
79
|
+
// 提交加载动画
|
|
80
|
+
confirmLoading: false,
|
|
81
|
+
refreshFn: null,
|
|
82
|
+
chargeVisible: false
|
|
83
|
+
}
|
|
84
|
+
},
|
|
85
|
+
computed: {
|
|
86
|
+
...mapState('account', { currUser: 'user' }),
|
|
87
|
+
},
|
|
88
|
+
methods: {
|
|
89
|
+
addApply () {
|
|
90
|
+
console.log('打开了吗')
|
|
91
|
+
this.applyAddFlag = true
|
|
92
|
+
this.$nextTick(
|
|
93
|
+
() => {
|
|
94
|
+
getConfigByName('addApplyForm', 'af-apply', (res) => {
|
|
95
|
+
this.$refs.xForm.init({
|
|
96
|
+
businessType: '新增',
|
|
97
|
+
title: '发起报建',
|
|
98
|
+
...res
|
|
99
|
+
})
|
|
100
|
+
})
|
|
101
|
+
}
|
|
102
|
+
)
|
|
103
|
+
},
|
|
104
|
+
applySubmit (formData) {
|
|
105
|
+
runLogic('addApply', formData).then(
|
|
106
|
+
res => {
|
|
107
|
+
this.$message.success('发起报建成功')
|
|
108
|
+
this.$refs.xFormTable.refreshTable(true)
|
|
109
|
+
this.applyAddFlag = false
|
|
110
|
+
}
|
|
111
|
+
).catch(() => {
|
|
112
|
+
this.applyAddFlag = false
|
|
113
|
+
})
|
|
114
|
+
},
|
|
115
|
+
success () {
|
|
116
|
+
console.log('完工')
|
|
117
|
+
},
|
|
118
|
+
toDetail (record, id) {
|
|
119
|
+
this.$refs.workFlow.init({
|
|
120
|
+
workflowId: record.ab_f_workflow_id
|
|
121
|
+
})
|
|
122
|
+
},
|
|
123
|
+
handleFormItemEvent (func, data, value) {
|
|
124
|
+
console.log('打印一下:', func, data, value)
|
|
125
|
+
if (func === 'selectAddress') {
|
|
126
|
+
this.$refs.addressSelect.setFormShow()
|
|
127
|
+
}
|
|
128
|
+
},
|
|
129
|
+
setForm (record) {
|
|
130
|
+
this.$refs.workFlow.setFormValue({ address: record.f_address, address_id: record.f_address_id })
|
|
131
|
+
},
|
|
132
|
+
nextClick ({ form, formStep, workflowId }) {
|
|
133
|
+
console.log('success', form, formStep, workflowId)
|
|
134
|
+
const data = {
|
|
135
|
+
workflowId,
|
|
136
|
+
form,
|
|
137
|
+
formStep
|
|
138
|
+
}
|
|
139
|
+
runLogic('applySubmitAfter', data, 'af-apply').then(
|
|
140
|
+
res => {
|
|
141
|
+
if (res) {
|
|
142
|
+
// this.$message.success('提交成功!')
|
|
143
|
+
this.$refs.xFormTable.refreshTable(true)
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
)
|
|
147
|
+
},
|
|
148
|
+
// 协议作废
|
|
149
|
+
setCancel (record, refreshFn) {
|
|
150
|
+
this.$refs.cancelContract.setCancel(record, refreshFn)
|
|
151
|
+
},
|
|
152
|
+
// 增值收费新增
|
|
153
|
+
chargeAdd (refreshFn) {
|
|
154
|
+
this.$refs.addCharge.chargeAdd(this.$refs.workFlow.workflowId, refreshFn)
|
|
155
|
+
},
|
|
156
|
+
// 协议新增
|
|
157
|
+
addContract (refreshFn) {
|
|
158
|
+
this.$refs.addContract.addContract(this.$refs.workFlow.workflowId, refreshFn)
|
|
159
|
+
},
|
|
160
|
+
// 新增用户
|
|
161
|
+
addUser (refreshFn) {
|
|
162
|
+
if (this.$refs.workFlow.$refs.baseInformation.details.f_workflow_define_name != '团购报建流程') {
|
|
163
|
+
this.$message.success('只有团购报建流程才可以新增用户信息!')
|
|
164
|
+
return
|
|
165
|
+
}
|
|
166
|
+
this.$refs.addUser.addUser(this.$refs.workFlow.workflowId, refreshFn)
|
|
167
|
+
},
|
|
168
|
+
// 编辑用户
|
|
169
|
+
editUser (record, refreshFn) {
|
|
170
|
+
this.$refs.addUser.editUser(record, refreshFn)
|
|
171
|
+
},
|
|
172
|
+
// 新增收费
|
|
173
|
+
addcharge (refreshFn) {
|
|
174
|
+
this.$refs.addApplyCharge.addcharge(this.$refs.workFlow.workflowId, refreshFn)
|
|
175
|
+
},
|
|
176
|
+
// 报装缴费页面初始化
|
|
177
|
+
updateFormData (workflowId) {
|
|
178
|
+
if (this.$refs.workFlow.$refs.baseInformation.details.f_sub_state == '报装缴费') {
|
|
179
|
+
runLogic('getApplyBusinessrecode', { f_workflow_id: workflowId }, 'af-apply').then((res) => {
|
|
180
|
+
this.$refs.workFlow.$refs.workflowHandle.$refs.xAddForm.setForm(res)
|
|
181
|
+
})
|
|
182
|
+
} else if (this.$refs.workFlow.$refs.baseInformation.details.f_sub_state == '合同签订') {
|
|
183
|
+
runLogic('queryAgreementAmount', { workflowId: workflowId }, 'af-apply').then((res) => {
|
|
184
|
+
this.$refs.workFlow.$refs.workflowHandle.$refs.xAddForm.setForm({ add_amount: res[0].f_contract_money })
|
|
185
|
+
})
|
|
186
|
+
}
|
|
187
|
+
},
|
|
188
|
+
// 增值收费单个数据的撤销功能
|
|
189
|
+
chargeCancel (record, refreshFn) {
|
|
190
|
+
this.$refs.cancel.chargeCancel(record, refreshFn)
|
|
191
|
+
},
|
|
192
|
+
// 批量撤销(退费)
|
|
193
|
+
chargeBatchRefund (selectedRowKeys, selectedRows, refreshFn) {
|
|
194
|
+
if (selectedRowKeys.length === 0 || selectedRows.length === 0) {
|
|
195
|
+
this.$message.warn('请选择要退费的记录', 5)
|
|
196
|
+
return
|
|
197
|
+
}
|
|
198
|
+
const workflowId = this.$refs.workFlow.workflowId
|
|
199
|
+
this.$refs.batchRefund.selectRow(selectedRowKeys, selectedRows, refreshFn, workflowId)
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
</script>
|
|
@@ -66,6 +66,7 @@ path: 'example',
|
|
|
66
66
|
// component: () => import('@vue2-client/base-client/components/common/XRate/demo.vue'),
|
|
67
67
|
// component: () => import('@vue2-client/base-client/components/common/XForm/demo.vue'),
|
|
68
68
|
// component: () => import('@vue2-client/base-client/components/his/XTimeSelect/XTimeSelectDemo.vue'),
|
|
69
|
+
// component: () => import('@vue2-client/base-client/components/his/XCharge/XChargeDemo.vue'),
|
|
69
70
|
// component: () => import('@vue2-client/base-client/components/his/XImportExcelButton/XFrontImportExcelDemo.vue'),
|
|
70
71
|
// component: () => import('@vue2-client/pages/WorkflowDetail/WorkFlowDemo.vue'),
|
|
71
72
|
// component: () => import('@vue2-client/pages/WorkflowDetail/WorkFlowDemo.vue'),
|
|
File without changes
|
|
File without changes
|