apply-clients 3.1.36 → 3.1.37

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>
3
- <div style="height: 20px; padding-left: 20px" v-if="print_dispatch && this.data.title == '派工单'">
4
- <button type="button" class="btn btn-info head-but" @click="printDispatch()" v-el:cx>打印派工单</button>
5
- </div>
6
- <service-view :data="data" v-if="showview" v-ref:serviceview></service-view>
7
-
8
- <!--派工单-->
9
- <dispatch-list :selectdata="selectdata" v-if="dispatchlist"></dispatch-list>
10
- <!-- 终止报建 -->
11
- <stop-install :selectdata="selectdata" v-if="showstop"></stop-install>
12
- <!-- 报建缴费 -->
13
- <apply-charge-management :selectdata="selectdata" v-if="applycharge"></apply-charge-management>
14
-
15
- <apply-record-cancel :selectdata="selectdata" v-if="showcancel"></apply-record-cancel>
16
- </div>
17
- </template>
18
- <script>
19
- import {HttpResetClass} from 'vue-client'
20
- import Vue from "vue";
21
- export default {
22
- title: '报建功能业务控制层',
23
- props: ['selectdata','funcdata'],
24
- data () {
25
- return {
26
- data: null,
27
- showview: false, // 控制通用页面
28
- showstop: false, // 控制终止
29
- showcancel: false, // 控制撤销
30
- dispatchlist: false,//派工单
31
- print_dispatch: true,
32
- applycharge: false // 报建缴费
33
- }
34
- },
35
- ready () {
36
- this.hasChange()
37
- },
38
- methods: {
39
- // json配置数据处理 比如下拉框的options
40
- async initializtion() {
41
- // selectdata 填充 data
42
- let temp = Object.assign({},this.data,this.selectdata)
43
- temp.fields.forEach(item => {
44
- if (this.selectdata[item.field]) {
45
- item.value = this.selectdata[item.field]
46
- } else {
47
- item.value = ''
48
- }
49
- // 如果配置类型为select,获取options
50
- if(item.type ==='select'){
51
- item.options = this.$appdata.getParam(item.label)
52
- }
53
- })
54
-
55
-
56
- // onetomany 数据获取
57
- if (this.data.onetomany) {
58
- for (let index = 0; index < this.data.onetomany.length; index++) {
59
- let http = new HttpResetClass()
60
- let data = {
61
- tablename: this.data.onetomany[index].tables[0],
62
- condition: `f_process_id='${this.selectdata.f_process_id}'`
63
- }
64
-
65
- let res = await http.load('POST', 'rs/sql/applysingleTable', {data: data}, {
66
- resolveMsg: null,
67
- rejectMsg: 'onetomany查询失败'
68
- })
69
-
70
- // 初始化 onetomany
71
- this.data.onetomany[index].rows = res.data
72
-
73
- // 初始化onetomany中的fields
74
- for (let j = 0; j < this.data.onetomany[index].fields.length; j++) {
75
- // 如果配置类型为select,优先从参数列表获取options
76
- if (this.data.onetomany[index].fields[j].type === 'select') {
77
- let temp = Vue.$appdata.getParam(this.data.onetomany[index].fields[j].label)
78
- if (temp && temp.length > 0) {
79
- this.data.onetomany[index].fields[j].options = Vue.$appdata.getParam(this.data.onetomany[index].fields[j].label)
80
- }
81
- }
82
- }
83
-
84
- }
85
- }
86
-
87
- this.data = JSON.parse(JSON.stringify(this.data))
88
-
89
- this.$nextTick(() => {
90
- this.showview = true
91
- })
92
- },
93
- // 功能组件显示控制
94
- hasChange(){
95
- if(this.funcdata.fields) {
96
- this.data = this.funcdata
97
- // 初始化要展示的数据结构
98
- this.initializtion()
99
- this.showview = true
100
- this.showstop = false
101
- this.showcancel = false
102
- }
103
- if (this.funcdata.title === '终止报建' && !this.funcdata.fields) {
104
- this.showview = false
105
- this.showstop = true
106
- this.showcancel = false
107
- }
108
- if (this.funcdata.title === '撤销' && !this.funcdata.fields) {
109
- this.showview = false
110
- this.showstop = false
111
- this.showcancel = true
112
- }
113
- if (this.funcdata.title === '派工单' && !this.funcdata.fields) {
114
- this.showview = false
115
- this.dispatchlist = true
116
- this.showcancel = false
117
- }
118
- if (this.funcdata.title === '报建缴费' && !this.funcdata.fields) {
119
- this.showview = false
120
- this.applycharge = true
121
- this.showcancel = false
122
- }
123
-
124
- },
125
- // 打印派工单
126
- async printDispatch() {
127
- this.print_dispatch = false
128
- this.showview = false
129
- this.dispatchlist = true
130
- }
131
- },
132
- events: {
133
- // 获取view层button事件
134
- async 'button' (model){
135
- model = Object.assign({}, this.selectdata, model)
136
- // 下发,提交,保存,退回都在后台处理
137
- let http = new HttpResetClass();
138
- http.load('POST','rs/entity/t_apply',model, {resolveMsg: null, rejectMsg: '数据保存失败'})
139
- .then(res => {
140
- this.$dispatch('query')
141
- })
142
- },
143
- // onetomany模态框默认监听监听事件
144
- async 'onetomanydelete'(i, j) {
145
- console.log('默认删除')
146
- let http = new HttpResetClass()
147
- let data = {
148
- table: this.data.onetomany[i].tables[0],
149
- row: this.data.onetomany[i].rows[j]
150
- }
151
- let res = await http.load('POST', 'rs/logic/onetomanyDefaultDeleteEvent', {data: data}, {
152
- resolveMsg: null,
153
- rejectMsg: '删除失败'
154
- })
155
-
156
- if (res.data <= 0){
157
- this.$showMessage('删除失败')
158
- return
159
- }
160
-
161
- this.$dispatch('selfsearch')
162
- this.$refs.serviceview.data.onetomany[i].rows.splice(j, 1)
163
- },
164
- async 'onetomanyadd'(inedx) {
165
- let data = {
166
- f_process_id : this.selectdata.f_process_id,
167
- f_operator: this.$login.f.name,
168
- f_operation_date: new Date().Format("yyyy-MM-dd HH:mm:ss"),
169
- f_company: this.$login.f.orgs
170
- }
171
- this.data.onetomany[inedx].fields.forEach(item => {
172
- data[item.field] = item.value
173
- })
174
- let res = await this.$resetpost(
175
- `rs/entity/${this.data.onetomany[inedx].tables[0]}`,
176
- data
177
- )
178
- // this.data.onetomany[inedx].rows.push(data)
179
- this.$dispatch('selfsearch')
180
- this.$refs.serviceview.data.onetomany[inedx].rows.push(data)
181
- },
182
- async 'onetomanyupdate'(i, j) {
183
- let onetomany = this.data.onetomany[i]
184
- let data = onetomany.rows[j]
185
-
186
- onetomany.fields.forEach(item => {
187
- data[item.field] = item.value
188
- })
189
- let res = await this.$resetpost(
190
- `rs/entity/${this.data.onetomany[i].tables[0]}`,
191
- data
192
- )
193
- this.$dispatch('selfsearch')
194
- this.$refs.serviceview.data.onetomany[i].rows.splice(j,1,data)
195
- },
196
- // onetomany模态框监听事件
197
- async 'check_modal'(index) {},
198
- async 'oninput_modal'(index) {}
199
- },
200
- watch:{
201
- }
202
- }
203
- </script>
1
+ <template>
2
+ <div>
3
+ <div style="height: 20px; padding-left: 20px" v-if="print_dispatch && this.data.title == '派工单'">
4
+ <button type="button" class="btn btn-info head-but" @click="printDispatch()" v-el:cx>打印派工单</button>
5
+ </div>
6
+ <service-view :data="data" v-if="showview" v-ref:serviceview></service-view>
7
+
8
+ <!--派工单-->
9
+ <dispatch-list :selectdata="selectdata" v-if="dispatchlist"></dispatch-list>
10
+ <!-- 终止报建 -->
11
+ <stop-install :selectdata="selectdata" v-if="showstop"></stop-install>
12
+ <!-- 报建缴费 -->
13
+ <apply-charge-management :selectdata="selectdata" v-if="applycharge"></apply-charge-management>
14
+
15
+ <apply-record-cancel :selectdata="selectdata" v-if="showcancel"></apply-record-cancel>
16
+ </div>
17
+ </template>
18
+ <script>
19
+ import {HttpResetClass} from 'vue-client'
20
+ import Vue from "vue";
21
+ export default {
22
+ title: '报建功能业务控制层',
23
+ props: ['selectdata','funcdata'],
24
+ data () {
25
+ return {
26
+ data: null,
27
+ showview: false, // 控制通用页面
28
+ showstop: false, // 控制终止
29
+ showcancel: false, // 控制撤销
30
+ dispatchlist: false,//派工单
31
+ print_dispatch: true,
32
+ applycharge: false // 报建缴费
33
+ }
34
+ },
35
+ ready () {
36
+ this.hasChange()
37
+ },
38
+ methods: {
39
+ // json配置数据处理 比如下拉框的options
40
+ async initializtion() {
41
+ // selectdata 填充 data
42
+ let temp = Object.assign({},this.data,this.selectdata)
43
+ temp.fields.forEach(item => {
44
+ if (this.selectdata[item.field]) {
45
+ item.value = this.selectdata[item.field]
46
+ } else {
47
+ item.value = ''
48
+ }
49
+ // 如果配置类型为select,获取options
50
+ if(item.type ==='select'){
51
+ item.options = this.$appdata.getParam(item.label)
52
+ }
53
+ })
54
+
55
+
56
+ // onetomany 数据获取
57
+ if (this.data.onetomany) {
58
+ for (let index = 0; index < this.data.onetomany.length; index++) {
59
+ let http = new HttpResetClass()
60
+ let data = {
61
+ tablename: this.data.onetomany[index].tables[0],
62
+ condition: `f_process_id='${this.selectdata.f_process_id}'`
63
+ }
64
+
65
+ let res = await http.load('POST', 'rs/sql/applysingleTable', {data: data}, {
66
+ resolveMsg: null,
67
+ rejectMsg: 'onetomany查询失败'
68
+ })
69
+
70
+ // 初始化 onetomany
71
+ this.data.onetomany[index].rows = res.data
72
+
73
+ // 初始化onetomany中的fields
74
+ for (let j = 0; j < this.data.onetomany[index].fields.length; j++) {
75
+ // 如果配置类型为select,优先从参数列表获取options
76
+ if (this.data.onetomany[index].fields[j].type === 'select') {
77
+ let temp = Vue.$appdata.getParam(this.data.onetomany[index].fields[j].label)
78
+ if (temp && temp.length > 0) {
79
+ this.data.onetomany[index].fields[j].options = Vue.$appdata.getParam(this.data.onetomany[index].fields[j].label)
80
+ }
81
+ }
82
+ }
83
+
84
+ }
85
+ }
86
+
87
+ this.data = JSON.parse(JSON.stringify(this.data))
88
+
89
+ this.$nextTick(() => {
90
+ this.showview = true
91
+ })
92
+ },
93
+ // 功能组件显示控制
94
+ hasChange(){
95
+ if(this.funcdata.fields) {
96
+ this.data = this.funcdata
97
+ // 初始化要展示的数据结构
98
+ this.initializtion()
99
+ this.showview = true
100
+ this.showstop = false
101
+ this.showcancel = false
102
+ }
103
+ if (this.funcdata.title === '终止报建' && !this.funcdata.fields) {
104
+ this.showview = false
105
+ this.showstop = true
106
+ this.showcancel = false
107
+ }
108
+ if (this.funcdata.title === '撤销' && !this.funcdata.fields) {
109
+ this.showview = false
110
+ this.showstop = false
111
+ this.showcancel = true
112
+ }
113
+ if (this.funcdata.title === '派工单' && !this.funcdata.fields) {
114
+ this.showview = false
115
+ this.dispatchlist = true
116
+ this.showcancel = false
117
+ }
118
+ if (this.funcdata.title === '报建缴费' && !this.funcdata.fields) {
119
+ this.showview = false
120
+ this.applycharge = true
121
+ this.showcancel = false
122
+ }
123
+
124
+ },
125
+ // 打印派工单
126
+ async printDispatch() {
127
+ this.print_dispatch = false
128
+ this.showview = false
129
+ this.dispatchlist = true
130
+ }
131
+ },
132
+ events: {
133
+ // 获取view层button事件
134
+ async 'button' (model){
135
+ model = Object.assign({}, this.selectdata, model)
136
+ // 下发,提交,保存,退回都在后台处理
137
+ let http = new HttpResetClass();
138
+ http.load('POST','rs/entity/t_apply',model, {resolveMsg: null, rejectMsg: '数据保存失败'})
139
+ .then(res => {
140
+ this.$dispatch('query')
141
+ })
142
+ },
143
+ // onetomany模态框默认监听监听事件
144
+ async 'onetomanydelete'(i, j) {
145
+ console.log('默认删除')
146
+ let http = new HttpResetClass()
147
+ let data = {
148
+ table: this.data.onetomany[i].tables[0],
149
+ row: this.data.onetomany[i].rows[j]
150
+ }
151
+ let res = await http.load('POST', 'rs/logic/onetomanyDefaultDeleteEvent', {data: data}, {
152
+ resolveMsg: null,
153
+ rejectMsg: '删除失败'
154
+ })
155
+
156
+ if (res.data <= 0){
157
+ this.$showMessage('删除失败')
158
+ return
159
+ }
160
+
161
+ this.$dispatch('selfsearch')
162
+ this.$refs.serviceview.data.onetomany[i].rows.splice(j, 1)
163
+ },
164
+ async 'onetomanyadd'(inedx) {
165
+ let data = {
166
+ f_process_id : this.selectdata.f_process_id,
167
+ f_operator: this.$login.f.name,
168
+ f_operation_date: new Date().Format("yyyy-MM-dd HH:mm:ss"),
169
+ f_company: this.$login.f.orgs
170
+ }
171
+ this.data.onetomany[inedx].fields.forEach(item => {
172
+ data[item.field] = item.value
173
+ })
174
+ let res = await this.$resetpost(
175
+ `rs/entity/${this.data.onetomany[inedx].tables[0]}`,
176
+ data
177
+ )
178
+ // this.data.onetomany[inedx].rows.push(data)
179
+ this.$dispatch('selfsearch')
180
+ this.$refs.serviceview.data.onetomany[inedx].rows.push(data)
181
+ },
182
+ async 'onetomanyupdate'(i, j) {
183
+ let onetomany = this.data.onetomany[i]
184
+ let data = onetomany.rows[j]
185
+
186
+ onetomany.fields.forEach(item => {
187
+ data[item.field] = item.value
188
+ })
189
+ let res = await this.$resetpost(
190
+ `rs/entity/${this.data.onetomany[i].tables[0]}`,
191
+ data
192
+ )
193
+ this.$dispatch('selfsearch')
194
+ this.$refs.serviceview.data.onetomany[i].rows.splice(j,1,data)
195
+ },
196
+ // onetomany模态框监听事件
197
+ async 'check_modal'(index) {},
198
+ async 'oninput_modal'(index) {}
199
+ },
200
+ watch:{
201
+ }
202
+ }
203
+ </script>
@@ -53,13 +53,13 @@
53
53
  </td>
54
54
  <td style="text-align: center;">
55
55
  <nobr>
56
- <!-- <button-->
57
- <!-- type="button"-->
58
- <!-- name="button"-->
59
- <!-- class="btn btn-link"-->
60
- <!-- :disabled="$parent.$parent.mark === 1 || row.f_charging_status === '作废'"-->
61
- <!-- @click="$parent.$parent.showInvalidModal(row)"-->
62
- <!-- >作废</button>-->
56
+ <button
57
+ type="button"
58
+ name="button"
59
+ class="btn btn-link"
60
+ :disabled="$parent.$parent.mark === 1 || row.f_charging_status === '作废'"
61
+ @click="$parent.$parent.showInvalidModal(row)"
62
+ >作废</button>
63
63
  </nobr>
64
64
  </td>
65
65
  </tr>
@@ -193,6 +193,76 @@
193
193
  <button type="button" class="btn btn-primary" @click="saveCharge()">新增收费</button>
194
194
  </footer>
195
195
  </modal>
196
+ <modal v-if="showInvalid" :show.sync="showInvalid" v-ref:modal :large="true" :backdrop="false" title="作废收费">
197
+ <header slot="modal-header" class="modal-header">
198
+ <button type="button" class="close" @click="closeModal"><span>&times;</span></button>
199
+ <h4 class="modal-title">作废收费</h4>
200
+ </header>
201
+ <article slot="modal-body" class="modal-body clearfix">
202
+ <!-- <div class="form-group col-sm-12">-->
203
+ <!-- <label class="col-sm-2 control-label">缴费地址:</label>-->
204
+ <!-- <div class="col-sm-10">-->
205
+ <!-- <input type="text"-->
206
+ <!-- class="form-control input_view"-->
207
+ <!-- style="width: 100%"-->
208
+ <!-- readonly-->
209
+ <!-- v-model="charge.f_useraddres" />-->
210
+ <!-- </div>-->
211
+ <!-- </div>-->
212
+ <div class="form-group col-sm-12">
213
+ <label class="col-sm-2 control-label">收费金额:</label>
214
+ <div class="col-sm-10">
215
+ <input type="text"
216
+ class="form-control input_view"
217
+ style="width: 100%"
218
+ readonly
219
+ v-model="charge.f_charge_money" />
220
+ </div>
221
+ </div>
222
+ <div class="form-group col-sm-12">
223
+ <label class="col-sm-2 control-label">付款方式:</label>
224
+ <div class="col-sm-10">
225
+ <input type="text"
226
+ class="form-control input_view"
227
+ style="width: 100%"
228
+ readonly
229
+ v-model="charge.f_payment_method" />
230
+ </div>
231
+ </div>
232
+ <div class="form-group col-sm-12">
233
+ <label class="col-sm-2 control-label">金额大写:</label>
234
+ <div class="col-sm-10">
235
+ <input type="text"
236
+ class="form-control input_view"
237
+ style="width: 100%"
238
+ readonly
239
+ v-model="charge.f_amount_words" />
240
+ </div>
241
+ </div>
242
+ <div class="form-group col-sm-12">
243
+ <label class="col-sm-2 control-label">收费人员:</label>
244
+ <div class="col-sm-10">
245
+ <input type="text"
246
+ class="form-control input_view"
247
+ style="width: 100%"
248
+ readonly
249
+ v-model="charge.f_operator" />
250
+ </div>
251
+ </div>
252
+ <div class="form-group col-sm-12" :class="charge.f_void_remarks ? '':'has-error'">
253
+ <label class="col-sm-2 control-label">作废原因:</label>
254
+ <div class="col-sm-10">
255
+ <input type="text"
256
+ class="form-control input_view"
257
+ style="width: 100%"
258
+ v-model="charge.f_void_remarks" />
259
+ </div>
260
+ </div>
261
+ </article>
262
+ <footer slot="modal-footer" class="modal-footer">
263
+ <button type="button" class="btn btn-primary" :disabled="!charge.f_void_remarks" @click="invalidApplyCharge()">确认作废</button>
264
+ </footer>
265
+ </modal>
196
266
 
197
267
 
198
268
  </div>
@@ -234,17 +304,18 @@ export default {
234
304
  this.charge.f_useraddress_id = this.chargeUseraddress.id
235
305
  },
236
306
  async invalidApplyCharge() {
237
- if (isEmpty(this.charge.f_void_remarks)) {
307
+ if (this.charge.f_void_remarks.length < 0) {
238
308
  this.$showAlert('请输入作废本次收费原因!!!', 'warning', 3000)
239
309
  return
240
310
  }
241
311
 
242
312
  let http = new HttpResetClass()
243
313
  let data = {
244
- apply: this.selectdata,
314
+ apply: this.data,
245
315
  user: this.$login.f,
246
316
  charge: this.charge
247
317
  }
318
+ console.log("发送的数据:" + JSON.stringify(data))
248
319
  try {
249
320
  let res = await http.load('POST', 'rs/logic/invalidApplyCharge', {data:data}, {
250
321
  resolveMsg: null,
@@ -268,6 +339,7 @@ export default {
268
339
  this.charge.f_amount_words = this.smalltoBIG(e.target.value)
269
340
  },
270
341
  async saveCharge() {
342
+ this.apply_data()
271
343
  // if (isEmpty(this.charge.f_useraddress_id) && this.selectdata.f_apply_type !== '开发商集体报建') {
272
344
  // this.$showAlert('请选择缴费的地址信息!!!', 'warning', 3000)
273
345
  // return