vue2-client 1.15.25 → 1.15.26-1

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.
@@ -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 slot="button">
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 slot="button">
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,67 +1,67 @@
1
- <template>
2
- <x-tree-view ref="xTreeView" @itemChecked="itemChecked">
3
- <x-add-native-form ref="nativeForm" />
4
- </x-tree-view>
5
- </template>
6
-
7
- <script>
8
-
9
- import XTreeView from '@vue2-client/base-client/components/layout/XTreeView'
10
- import { mapState } from 'vuex'
11
- import XAddNativeForm from '@vue2-client/base-client/components/common/XAddNativeForm/XAddNativeForm.vue'
12
- import { getConfigByName } from '@vue2-client/services/api/common'
13
-
14
- export default {
15
- components: {
16
- XAddNativeForm,
17
- XTreeView,
18
- },
19
- data () {
20
- return {
21
- currentItem: undefined,
22
- }
23
- },
24
- computed: {
25
- ...mapState('account', { currUser: 'user' }),
26
- ...mapState('setting', ['isMobile'])
27
- },
28
- mounted () {
29
- this.initView()
30
- },
31
- methods: {
32
- // 初始化组件
33
- initView () {
34
- this.$refs.xTreeView.init({
35
- configName: 'templateTreeConfig',
36
- serviceName: 'af-his',
37
- env: 'dev',
38
- })
39
- },
40
- itemChecked (node) {
41
- this.currentItem = node
42
- if (node.type === 'all' || node.type === 'folder') {
43
- this.$refs.nativeForm.close()
44
- return
45
- }
46
- getConfigByName('编辑模板数据Form', 'af-his', (res) => {
47
- this.$refs.nativeForm.init({
48
- serviceName: 'af-his',
49
- formItems: res.formJson,
50
- showSubmitBtn: false,
51
- title: '收费',
52
- businessType: '新增',
53
- getDataParams: {
54
- content: {
55
- pms_patient_id: 1,
56
- template_id: node.id
57
- }
58
- }
59
- })
60
- })
61
- }
62
- }
63
- }
64
- </script>
65
-
66
- <style>
67
- </style>
1
+ <template>
2
+ <x-tree-view ref="xTreeView" @itemChecked="itemChecked">
3
+ <x-add-native-form ref="nativeForm" />
4
+ </x-tree-view>
5
+ </template>
6
+
7
+ <script>
8
+
9
+ import XTreeView from '@vue2-client/base-client/components/layout/XTreeView'
10
+ import { mapState } from 'vuex'
11
+ import XAddNativeForm from '@vue2-client/base-client/components/common/XAddNativeForm/XAddNativeForm.vue'
12
+ import { getConfigByName } from '@vue2-client/services/api/common'
13
+
14
+ export default {
15
+ components: {
16
+ XAddNativeForm,
17
+ XTreeView,
18
+ },
19
+ data () {
20
+ return {
21
+ currentItem: undefined,
22
+ }
23
+ },
24
+ computed: {
25
+ ...mapState('account', { currUser: 'user' }),
26
+ ...mapState('setting', ['isMobile'])
27
+ },
28
+ mounted () {
29
+ this.initView()
30
+ },
31
+ methods: {
32
+ // 初始化组件
33
+ initView () {
34
+ this.$refs.xTreeView.init({
35
+ configName: 'templateTreeConfig',
36
+ serviceName: 'af-his',
37
+ env: 'dev',
38
+ })
39
+ },
40
+ itemChecked (node) {
41
+ this.currentItem = node
42
+ if (node.type === 'all' || node.type === 'folder') {
43
+ this.$refs.nativeForm.close()
44
+ return
45
+ }
46
+ getConfigByName('编辑模板数据Form', 'af-his', (res) => {
47
+ this.$refs.nativeForm.init({
48
+ serviceName: 'af-his',
49
+ formItems: res.formJson,
50
+ showSubmitBtn: false,
51
+ title: '收费',
52
+ businessType: '新增',
53
+ getDataParams: {
54
+ content: {
55
+ pms_patient_id: 1,
56
+ template_id: node.id
57
+ }
58
+ }
59
+ })
60
+ })
61
+ }
62
+ }
63
+ }
64
+ </script>
65
+
66
+ <style>
67
+ </style>
@@ -54,9 +54,8 @@ routerResource.example = {
54
54
  path: 'example',
55
55
  name: '示例主页面',
56
56
  // component: () => import('@vue2-client/pages/WorkflowDetail/WorkFlowDemo2.vue'),
57
- component: () => import('@vue2-client/pages/WorkflowDetail/WorkFlowDemo3.vue'),
58
57
  // component: () => import('@vue2-client/pages/WorkflowDetail/WorkFlowDemo.vue'),
59
- // component: () => import('@vue2-client/pages/addressSelect/addressDemo.vue'),
58
+ component: () => import('@vue2-client/pages/addressSelect/addressDemo.vue'),
60
59
  // component: () => import('@vue2-client/base-client/components/common/XDescriptions/demo.vue'),
61
60
  // component: () => import('@vue2-client/base-client/components/common/XAddNativeForm/demo.vue'),
62
61
  // component: () => import('@vue2-client/base-client/components/common/XFormGroup/demo.vue'),