apply-clients 6.0.4 → 6.0.7

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.
Files changed (30) hide show
  1. package/build/dev-server.js +2 -2
  2. package/package.json +1 -1
  3. package/src/components/apply/base/rightview/InstallCardList2.vue +3 -2
  4. package/src/components/apply/base/rightview/carddetail/BuildFeeDetail2.vue +1 -1
  5. package/src/components/apply/base/rightview/carddetail/ChangeFeeDetail2.vue +1 -1
  6. package/src/components/apply/base/rightview/carddetail/ReduceFeeDetail2.vue +2 -2
  7. package/src/components/apply/base/rightview/carddetail/StopApplyDetail2.vue +70 -70
  8. package/src/components/build/Install/InstallFee/AddContract.vue +257 -257
  9. package/src/components/build/Install/InstallFee/InstallFee.vue +929 -929
  10. package/src/components/build/Install/InstallFee/PreparationFee.vue +223 -223
  11. package/src/components/build/Install/InstallFee/PrestoreFee.vue +630 -630
  12. package/src/components/build/Install/Process/CustomerBuildingMessage.vue +251 -251
  13. package/src/components/build/Install/Process/CustomerEquipmentMessage.vue +172 -172
  14. package/src/components/build/Install/Process/CustomerFile.vue +423 -423
  15. package/src/components/build/Install/Process/CustomerMaterialMessage.vue +414 -414
  16. package/src/components/build/Install/Process/CustomerRecordMessage.vue +749 -749
  17. package/src/components/build/Install/Process/FeeNormeAndContratSigne.vue +376 -376
  18. package/src/components/build/Install/Process/MeterType.vue +379 -379
  19. package/src/components/build/Install/Process/PlaceControler.vue +304 -304
  20. package/src/components/build/Install/Process/zhongran/ZR_Construction.vue +388 -388
  21. package/src/components/build/Install/Process/zhongran/ZR_CustomerEssentialInfo.vue +416 -415
  22. package/src/components/build/Install/Process/zhongran/ZR_MaterialPlan.vue +259 -259
  23. package/src/components/build/Install/Process/zhongran/ZR_MaterialPlanExamine.vue +243 -243
  24. package/src/components/build/Install/Process/zhongran/ZR_PlaceControler.vue +426 -426
  25. package/src/components/build/Install/Process/zhongran/ZR_TestDesign.vue +441 -441
  26. package/src/components/build/Install/ProcessInfo/ApplyRecordCancel.vue +135 -135
  27. package/src/components/build/Install/bill/BillGZKMakeInfo.vue +58 -58
  28. package/src/components/build/Install/bill/BillQRKMakeInfo.vue +79 -79
  29. package/src/components/build/Install/bill/BillXSDMakeInfo.vue +206 -206
  30. package/src/main.js +25 -25
@@ -1,441 +1,441 @@
1
- <template xmlns="http://www.w3.org/1999/xhtml" xmlns:v-validate="http://www.w3.org/1999/xhtml">
2
- <div class="auto" style="overflow: hidden">
3
- <div class="panel panel-info">
4
- <div class="panel-heading">
5
- <h3 class="panel-title">测绘设计</h3>
6
- </div>
7
- </div>
8
- <validator name="v">
9
- <form class="form-horizontal">
10
-
11
- <div class="col-sm-11">
12
- <div class="form-group col-sm-4">
13
- <label for="f_designer" class=" col-sm-6 control-label">项目名称:</label>
14
- <div class="col-sm-6" id="f_entry_name">
15
- <input class="form-control col-sm-6" type="text" v-model="model.f_entry_name" :readonly="edit ? false : 'readonly'">
16
- </div>
17
- </div>
18
-
19
- <div class="form-group col-sm-4">
20
- <label for="f_install_num" class=" col-sm-6 control-label">已完成户数:</label>
21
- <div class="col-sm-6" id="f_completion_households" :class="[$v.f_completion_households.required ? 'formItem-required' : '' ]">
22
- <input class="form-control col-sm-6" type="number" v-model="model.f_completion_households"
23
- v-validate:f_completion_households='{required: true}'
24
- :readonly="edit ? false : 'readonly'">
25
- </div>
26
- </div>
27
- <div class="form-group col-sm-4">
28
- <label class="col-sm-6 control-label">完成时间:</label>
29
- <div class="col-sm-6" id="f_completion_time" :class="[$v.f_completion_time.required ? 'formItem-required' : '' ]">
30
- <input class="form-control col-sm-6" v-show="false" v-model="model.f_completion_time" v-validate:f_completion_time='{required: true}'>
31
- <datepicker class="col-sm-6"
32
- :value.sync="model.f_completion_time"
33
- :format="'yyyy-MM-dd'"
34
- v-model="model.f_completion_time"
35
- :show-reset-button="reset"
36
- :readonly="true"
37
- >
38
- </datepicker>
39
- </div>
40
- </div>
41
- </div>
42
-
43
- <div class="col-sm-11">
44
- <div class="form-group col-sm-4">
45
- <div class="col-sm-3"></div>
46
- <div class="col-sm-6">
47
- <label for="checkbox" class=" col-sm-7 control-label">是否设计出图</label>
48
- <div class="col-sm-5">
49
- <input class="form-control col-sm-6" type="checkbox" class="" id="checkbox" v-model="model.f_isdesign"
50
- :disabled="edit ? false : 'disabled'">
51
- </div>
52
- </div>
53
- </div>
54
- <div class="form-group col-sm-4">
55
- <label for="f_design_cycle" class=" col-sm-6 control-label">设计周期:</label>
56
- <div class="col-sm-6" id="f_design_cycle" :class="[$v.f_design_cycle.required ? 'formItem-required' : '' ]">
57
- <input class="form-control col-sm-6" type="text" v-model="model.f_design_cycle" :readonly="edit ? false : 'readonly'" v-validate:f_design_cycle='{required: true}'>
58
- </div>
59
- </div>
60
- <div class="form-group col-sm-4">
61
- <label for="f_design_start_date" class=" col-sm-6 control-label">设计派工日期:</label>
62
- <div class="col-sm-6" id="f_design_start_date">
63
- <input class="form-control col-sm-6" type="text" v-show="false" v-model="model.f_design_start_date">
64
- <datepicker class="col-sm-6"
65
- :value.sync="model.f_design_start_date"
66
- :format="'yyyy-MM-dd'"
67
- v-model="model.f_design_start_date"
68
- :readonly="true"
69
- :show-reset-button="reset">
70
- </datepicker>
71
- </div>
72
- </div>
73
- </div>
74
-
75
- <div class="from-group col-sm-11">
76
- <div class="form-group col-sm-4">
77
- <label for="f_design_end_date" class=" col-sm-6 control-label">设计完成日期:</label>
78
- <div class="col-sm-6" id="f_design_end_date" :class="[$v.f_design_end_date.required ? 'formItem-required' : '' ]">
79
- <input class="form-control col-sm-6" type="text" v-show="false" v-model="model.f_design_end_date" v-validate:f_design_end_date = '{required:true}'>
80
- <datepicker width="600.76px;" class="col-sm-6"
81
- :value.sync="model.f_design_end_date"
82
- :format="'yyyy-MM-dd'"
83
- v-model="model.f_design_end_date"
84
- :readonly = "true"
85
- :show-reset-button="reset" >
86
- </datepicker>
87
- </div>
88
- </div>
89
- <div class="form-group col-sm-4">
90
- <label for="f_designer" class=" col-sm-6 control-label">图纸设计人:</label>
91
- <div class="col-sm-6" id="f_designer" :class="[$v.f_designer.required ? 'formItem-required' : '' ]">
92
- <input class="form-control col-sm-6" type="text" v-model="model.f_designer" :readonly="edit ? false : 'readonly'" v-validate:f_designer = '{required:true}'>
93
- </div>
94
- </div>
95
- <div class="form-group col-sm-4">
96
- <label for="f_design_unit" class=" col-sm-6 control-label">图纸审计单位:</label>
97
- <div class="col-sm-6" id="f_design_unit" :class="[$v.f_design_unit.required ? 'formItem-required' : '' ]">
98
- <input class="form-control col-sm-6" type="text" v-model="model.f_design_unit" :readonly="edit ? false : 'readonly'"
99
- v-validate:f_design_unit = '{required: true}'>
100
- </div>
101
- </div>
102
- </div>
103
- <div class="from-group col-sm-11">
104
- <div class="form-group col-sm-4">
105
- <label for="f_design_check_name" class=" col-sm-6 control-label">图纸审核人:</label>
106
- <div class="col-sm-6" id="f_design_check_name" :class="[$v.f_design_check_name.required ? 'formItem-required' : '' ]">
107
- <input class="form-control col-sm-6" type="text" v-model="model.f_design_check_name" :readonly="edit ? false : 'readonly'"
108
- v-validate:f_design_check_name = '{required: true}'>
109
- </div>
110
- </div>
111
- </div>
112
- <div class="form-group col-sm-11">
113
- <label class="col-sm-2" for="f_survey_remarks">勘查意见:</label>
114
- <div class="col-sm-10" id="f_survey_remarks">
115
- <textarea class="form-control col-sm-6" v-model="model.f_survey_remarks" rows="3"
116
- :readonly="edit ? false : 'readonly'">
117
- </textarea>
118
- </div>
119
- </div>
120
- <div class="from-group col-sm-11">
121
- <div class="form-group col-sm-12">
122
- <label class="col-sm-2" for="f_design_remarks">设计出图说明:</label>
123
- <div class="col-sm-10" id="f_design_remarks">
124
- <textarea class="form-control col-sm-6" rows="3" v-model="model.f_design_remarks"
125
- :readonly="edit ? false : 'readonly'">
126
- </textarea>
127
- </div>
128
- </div>
129
- </div>
130
- <div class="form-group col-sm-11">
131
- <div class="form-group col-sm-6">
132
- <label for="f_survey_departmen" class=" col-sm-4 control-label">部门:</label>
133
- <div class="col-sm-6" id="f_survey_departmen">
134
- <input class="form-control" type="text" v-model="model.f_apply_department" disabled>
135
- </div>
136
- </div>
137
- <div class="form-group col-sm-6">
138
- <label for="f_survey_operator" class="col-sm-6 control-label">执行人:</label>
139
- <div class="col-sm-6" id="f_survey_operator">
140
- <input class="form-control" type="text" v-model="model.f_apply_operator" disabled>
141
- </div>
142
- </div>
143
- </div>
144
- <div class="form-group col-sm-11">
145
- <div class="form-group col-sm-6">
146
- <label class=" col-sm-4 control-label" for="f_filiale">分公司:</label>
147
- <div class="col-sm-6" id="f_filiale">
148
- <input class="form-control" type="text" v-model="model.f_filiale" disabled>
149
- </div>
150
- </div>
151
- <div class="form-group col-sm-6">
152
- <label class=" col-sm-6 control-label">操作日期:</label>
153
- <div class="col-sm-6" id="f_survey_date">
154
- <input class="form-control" type="text" v-model="model.f_survey_date" disabled>
155
- </div>
156
- </div>
157
- </div>
158
- </form>
159
- </validator>
160
- <div class="from-group col-sm-11" v-show="edit">
161
- <center>
162
- <button type="button" @click="confirm()" class="btn btn-primary" style="width:80px; margin-left:40px;" >
163
- 保存
164
- </button>
165
- <button type="button" @click="commit()" class="btn btn-primary" style="width:80px; margin-left:40px;" :disabled='!$v.valid'>
166
- 提交
167
- </button>
168
- <button type="button" @click="reset()" class="btn btn-warning" style="width:80px; margin-left:40px;">
169
- 取消
170
- </button>
171
- </center>
172
- </div>
173
- </div>
174
- <place-controler-print v-if="showPrint" :show="showPrint"></place-controler-print>
175
- </template>
176
- <script>
177
- import co from 'co'
178
- import {HttpResetClass} from 'vue-client'
179
- import * as Util from '../../../../Util'
180
- let gen = function* (self, val) {
181
- let data = {
182
- tablename: 't_apply',
183
- parameters: val
184
- }
185
- yield self.$resetpost('rs/logic/save', {data: data})
186
- data = {
187
- model: {
188
- f_processid: self.selectdata.f_process_id,
189
- },
190
- loginUser: {
191
- id: self.$login.f.id,
192
- name: self.$login.f.name,
193
- ename: self.$login.f.ename
194
- },
195
- employeetemplate: self.employeetemplate,// 指派勘察人员
196
- subdep: '提交'
197
- }
198
- self.$resetpost(`rs/logic/grantnext`,
199
- {data: data})
200
- .then(() => {
201
- self.reset()
202
- })
203
- }
204
- export default {
205
- title: '测绘申请',
206
- data() {
207
- return {
208
- fgastype: this.$appdata.getParam('用气类型'),
209
- completiontime: this.$appdata.getParam('完成时间'),
210
- employees: [], // 部门人员数组
211
- employeetemplate: '', // 选定部门人员
212
- model: {
213
- f_filiale: this.$login.f.f_filiale,
214
- f_survey_date: Util.toStandardTimeString(),
215
- f_survey_department: this.$login.f.f_parentname,
216
- f_survey_operator: this.$login.f.name
217
- },
218
- pattern: '/^[+]{0,1}(\\d+)$|^[+]{0,1}(\\d+\\.\\d+)$/',
219
- showPrint: false
220
- }
221
- },
222
- props: ['selectdata','edit'],
223
- ready() {
224
- this.selectdata.f_gas_type = this.selectdata.f_gas_type ? [this.selectdata.f_gas_type] : this.model.f_gas_type
225
- this.model = Object.assign({}, this.model, this.selectdata)
226
- },
227
- methods: {
228
- // 获取部门领导角色
229
- async loademployees() {
230
- let http = new HttpResetClass()
231
- if (this.selectdata.actdefid != '1') {
232
- await http.load('POST', 'rs/sql/applysingleTable', {
233
- data: {
234
- tablename: 't_actorperson',
235
- condition: " userseq='" + this.$login.f.id + "' order by id desc"
236
- }
237
- }, {resolveMsg: null, rejectMsg: "角色人员是(登陆人)信息查询失败"}, {silent: true})
238
- .then((res) => {
239
- console.log("取得部门领导的角色" + res.data[0].actorid)
240
- if (res.data[0].actorid.startsWith("R") && (res.data[0].actorid.includes("部门负责人") || res.data[0].actorid.includes("部经理") || res.data[0].actorid.includes("部门领导") || res.data[0].actorid.includes("部负责人") || res.data[0].actorid.includes("部领导") || res.data[0].actorid.includes("组长"))) {
241
- let loaderstr = res.data[0].actorid.substring(2, res.data[0].actorid.length - 1)
242
- this.temploader = loaderstr
243
- // 如果是退回的就用已经的人员,保证下发的是同一个人
244
- this.toemployees()
245
- let loademployeestr = null
246
- if (loaderstr.includes("部门")) {
247
- loademployeestr = 'R(' + loaderstr.split("部门")[0] + '部门人员)'
248
- } else if (loaderstr.includes("部")) {
249
- loademployeestr = 'R(' + loaderstr.split("部")[0] + '部人员)'
250
- } else if (loaderstr.includes("组长")) {
251
- loademployeestr = 'R(' + loaderstr.split("组长")[0] + '人员)'
252
- }
253
- console.log(loademployeestr)
254
- let http2 = new HttpResetClass()
255
- http2.load('POST', 'rs/sql/applysingleTable', {
256
- data: {
257
- tablename: 't_role',
258
- condition: " name='" + loademployeestr.substring(2, loademployeestr.length - 1) + "'"
259
- // condition: " name='" + loaderstr.split("部")[0] + '部人员' + "'"
260
- }
261
- }, {resolveMsg: null, rejectMsg: "角色人员(部门人员)id信息查询失败"}, {silent: true}).then((res) => {
262
- console.log("取得角色人员(部门人员)id" + JSON.stringify(res.data[0].id))
263
- let strid = res.data[0].id
264
- let http3 = new HttpResetClass()
265
- http3.load('POST', 'rs/sql/applysingleTable', {
266
- data: {
267
- tablename: 't_user',
268
- condition: "roles like '%" + strid + "%'"
269
- }
270
- }, {resolveMsg: null, rejectMsg: "角色人员(部门人员)信息查询失败"}, {silent: true}).then((res) => {
271
- console.log("角色人员(部门人员)信息成功")
272
- for (var i = 0; i < res.data.length; i++) {
273
- this.employees.push({lable: res.data[i].name, value: res.data[i].name})
274
- }
275
- })
276
- })
277
- }
278
- })
279
- }
280
- },
281
- confirm() {
282
- //判断当前节点的状态(开始活动/完工)
283
- this.$resetpost('rs/sql/findProcessState', {data: {actid:this.selectdata.actid}}, {
284
- resolveMsg: null,
285
- rejectMsg: '提交错误!'
286
- }).then((res) => {
287
- if (res.data[0].state != '开始活动') {
288
- this.$showMessage("该节点信息已在别处提交,请刷新!")
289
- this.reset()
290
- } else {
291
- //通过数据校验再进行下一步判断
292
- if (this.verification()) {
293
-
294
- if(Number(this.model.f_completion_households) >Number( this.selectdata.f_total_households)){
295
- this.$showMessage("已完成户数不能大于总户数!")
296
- this.model.f_completion_households = null
297
- }else{
298
- let data = {
299
- tablename: 't_apply',
300
- parameters: this.model
301
- }
302
- this.$resetpost('rs/logic/save', {data: data})
303
- .then(() => {
304
- this.reset()
305
- })
306
- }
307
- }
308
- }
309
- })
310
-
311
- },
312
- commit() {
313
- //判断当前节点的状态(开始活动/完工)
314
- var entryName = this.model.f_entry_name //项目名称
315
- var ename = this.selectdata.f_entry_name
316
- this.$resetpost('rs/sql/findProcessState', {data: {actid:this.selectdata.actid}}, {
317
- resolveMsg: null,
318
- rejectMsg: '提交错误!'
319
- }).then((res) => {
320
- if (res.data[0].state != '开始活动') {
321
- this.$showMessage("该节点信息已在别处提交,请刷新!")
322
- this.reset()
323
- } else {
324
- //通过数据校验再进行下一步判断
325
- if (this.verification()) {
326
- if(name == null){
327
- //项目名称唯一性判断
328
- this.$resetpost('rs/sql/findByEntryName', {data: {entryName: entryName}}, {
329
- resolveMsg: null,
330
- rejectMsg: '提交错误!'
331
- }).then((res) => {
332
- if (res.data.length > 0) {
333
- this.$showMessage("项目名称不能重复!")
334
- } else {
335
- let getGen = gen(this, this.model)
336
- co(getGen)
337
- }
338
- })
339
- }else{
340
- if(Number(this.model.f_completion_households) >Number( this.selectdata.f_total_households)){
341
- this.$showMessage("已完成户数不能大于总户数!")
342
- this.model.f_completion_households = null
343
- }else{
344
- let getGen = gen(this, this.model)
345
- co(getGen)
346
- }
347
-
348
- }
349
- }
350
- }
351
- })
352
- },
353
- //数据校验
354
- verification() {
355
- var isNum = /^(([+]?\d*$)|(^[+]?\d+(\.\d+)?$))/ //非负纯数字
356
- var regex = /.*?[\u4e00-\u9fa5].*?[\u4e00-\u9fa5].*/ //至少两个汉字
357
- var phoneReg = /^1([38][0-9]|4[579]|5[0-3,5-9]|6[6]|7[0135678]|9[89])\d{8}$/ //手机号码正则
358
- var telReg = /0\d{2,3}-\d{7,8}/ //座机正则
359
- if (!this.model.f_entry_name) {
360
- this.$showMessage("项目名称不能为空!")
361
- return false
362
- }
363
-
364
-
365
-
366
- if (!this.model.f_completion_households) {
367
- this.$showMessage("已完成户数不能为空!")
368
- return false
369
- } else if (!isNum.test(this.model.f_completion_households)) {
370
- this.$showMessage("已完成户数格式错误!")
371
- return false
372
- }
373
-
374
-
375
-
376
- if (!this.model.f_designer) {
377
- this.$showMessage("图纸设计人不能为空!")
378
- return
379
- } else if (!regex.test(this.model.f_designer.trim())) {
380
- this.$showMessage("图纸设计人请至少输入两个汉字!")
381
- return false
382
- }
383
- if (!this.model.f_design_check_name) {
384
- this.$showMessage("图纸审核人不能为空!")
385
- return
386
- } else if (!regex.test(this.model.f_design_check_name.trim())) {
387
- this.$showMessage("图纸审核人请至少输入两个汉字!")
388
- return false
389
- }
390
-
391
- if(!this.model.f_design_cycle){
392
- this.$showMessage("设计周期不能为空!")
393
- return false
394
- }
395
- if(!this.model.f_design_start_date){
396
- this.$showMessage("设计派工日期不能为空!")
397
- return false
398
- }
399
- if(!this.model.f_design_end_date){
400
- this.$showMessage("设计完成日期不能为空!")
401
- return false
402
- }
403
- if(!this.model.f_design_unit){
404
- this.$showMessage("图纸审计单位不能为空!")
405
- return false
406
- }
407
-
408
- if(!this.model.f_completion_time){
409
- this.$showMessage("完成时间不能为空!")
410
- return false
411
- }
412
- return true
413
-
414
- },
415
- reset() {
416
- this.$dispatch('close')
417
- this.$dispatch('selfsearch')
418
- },
419
- setselect() {
420
- this.selectdata.f_gas_type = this.selectdata.f_gas_type ? this.selectdata.f_gas_type : this.model.f_gas_type
421
- this.model = Object.assign({}, this.model, this.selectdata)
422
- this.model.f_survey_date = this.$login.toStandardDateString()
423
- this.model.f_survey_department = this.$login.f.f_parentname
424
- this.model.f_survey_operator = this.$login.f.name
425
- }
426
- },
427
- events: {
428
- },
429
- watch: {}
430
- }
431
- </script>
432
- <style>
433
- .formItem-required::after {
434
- content: '*';
435
- position: absolute;
436
- font-size: 20px;
437
- margin-top: 3.5%;
438
- margin-left: 3%;
439
- color: #d91118;
440
- }
441
- </style>
1
+ <template xmlns="http://www.w3.org/1999/xhtml" xmlns:v-validate="http://www.w3.org/1999/xhtml">
2
+ <div class="auto" style="overflow: hidden">
3
+ <div class="panel panel-info">
4
+ <div class="panel-heading">
5
+ <h3 class="panel-title">测绘设计</h3>
6
+ </div>
7
+ </div>
8
+ <validator name="v">
9
+ <form class="form-horizontal">
10
+
11
+ <div class="col-sm-11">
12
+ <div class="form-group col-sm-4">
13
+ <label for="f_designer" class=" col-sm-6 control-label">项目名称:</label>
14
+ <div class="col-sm-6" id="f_entry_name">
15
+ <input class="form-control col-sm-6" type="text" v-model="model.f_entry_name" :readonly="edit ? false : 'readonly'">
16
+ </div>
17
+ </div>
18
+
19
+ <div class="form-group col-sm-4">
20
+ <label for="f_install_num" class=" col-sm-6 control-label">已完成户数:</label>
21
+ <div class="col-sm-6" id="f_completion_households" :class="[$v.f_completion_households.required ? 'formItem-required' : '' ]">
22
+ <input class="form-control col-sm-6" type="number" v-model="model.f_completion_households"
23
+ v-validate:f_completion_households='{required: true}'
24
+ :readonly="edit ? false : 'readonly'">
25
+ </div>
26
+ </div>
27
+ <div class="form-group col-sm-4">
28
+ <label class="col-sm-6 control-label">完成时间:</label>
29
+ <div class="col-sm-6" id="f_completion_time" :class="[$v.f_completion_time.required ? 'formItem-required' : '' ]">
30
+ <input class="form-control col-sm-6" v-show="false" v-model="model.f_completion_time" v-validate:f_completion_time='{required: true}'>
31
+ <datepicker class="col-sm-6"
32
+ :value.sync="model.f_completion_time"
33
+ :format="'yyyy-MM-dd'"
34
+ v-model="model.f_completion_time"
35
+ :show-reset-button="reset"
36
+ :readonly="true"
37
+ >
38
+ </datepicker>
39
+ </div>
40
+ </div>
41
+ </div>
42
+
43
+ <div class="col-sm-11">
44
+ <div class="form-group col-sm-4">
45
+ <div class="col-sm-3"></div>
46
+ <div class="col-sm-6">
47
+ <label for="checkbox" class=" col-sm-7 control-label">是否设计出图</label>
48
+ <div class="col-sm-5">
49
+ <input class="form-control col-sm-6" type="checkbox" class="" id="checkbox" v-model="model.f_isdesign"
50
+ :disabled="edit ? false : 'disabled'">
51
+ </div>
52
+ </div>
53
+ </div>
54
+ <div class="form-group col-sm-4">
55
+ <label for="f_design_cycle" class=" col-sm-6 control-label">设计周期:</label>
56
+ <div class="col-sm-6" id="f_design_cycle" :class="[$v.f_design_cycle.required ? 'formItem-required' : '' ]">
57
+ <input class="form-control col-sm-6" type="text" v-model="model.f_design_cycle" :readonly="edit ? false : 'readonly'" v-validate:f_design_cycle='{required: true}'>
58
+ </div>
59
+ </div>
60
+ <div class="form-group col-sm-4">
61
+ <label for="f_design_start_date" class=" col-sm-6 control-label">设计派工日期:</label>
62
+ <div class="col-sm-6" id="f_design_start_date">
63
+ <input class="form-control col-sm-6" type="text" v-show="false" v-model="model.f_design_start_date">
64
+ <datepicker class="col-sm-6"
65
+ :value.sync="model.f_design_start_date"
66
+ :format="'yyyy-MM-dd'"
67
+ v-model="model.f_design_start_date"
68
+ :readonly="true"
69
+ :show-reset-button="reset">
70
+ </datepicker>
71
+ </div>
72
+ </div>
73
+ </div>
74
+
75
+ <div class="from-group col-sm-11">
76
+ <div class="form-group col-sm-4">
77
+ <label for="f_design_end_date" class=" col-sm-6 control-label">设计完成日期:</label>
78
+ <div class="col-sm-6" id="f_design_end_date" :class="[$v.f_design_end_date.required ? 'formItem-required' : '' ]">
79
+ <input class="form-control col-sm-6" type="text" v-show="false" v-model="model.f_design_end_date" v-validate:f_design_end_date = '{required:true}'>
80
+ <datepicker width="600.76px;" class="col-sm-6"
81
+ :value.sync="model.f_design_end_date"
82
+ :format="'yyyy-MM-dd'"
83
+ v-model="model.f_design_end_date"
84
+ :readonly = "true"
85
+ :show-reset-button="reset" >
86
+ </datepicker>
87
+ </div>
88
+ </div>
89
+ <div class="form-group col-sm-4">
90
+ <label for="f_designer" class=" col-sm-6 control-label">图纸设计人:</label>
91
+ <div class="col-sm-6" id="f_designer" :class="[$v.f_designer.required ? 'formItem-required' : '' ]">
92
+ <input class="form-control col-sm-6" type="text" v-model="model.f_designer" :readonly="edit ? false : 'readonly'" v-validate:f_designer = '{required:true}'>
93
+ </div>
94
+ </div>
95
+ <div class="form-group col-sm-4">
96
+ <label for="f_design_unit" class=" col-sm-6 control-label">图纸审计单位:</label>
97
+ <div class="col-sm-6" id="f_design_unit" :class="[$v.f_design_unit.required ? 'formItem-required' : '' ]">
98
+ <input class="form-control col-sm-6" type="text" v-model="model.f_design_unit" :readonly="edit ? false : 'readonly'"
99
+ v-validate:f_design_unit = '{required: true}'>
100
+ </div>
101
+ </div>
102
+ </div>
103
+ <div class="from-group col-sm-11">
104
+ <div class="form-group col-sm-4">
105
+ <label for="f_design_check_name" class=" col-sm-6 control-label">图纸审核人:</label>
106
+ <div class="col-sm-6" id="f_design_check_name" :class="[$v.f_design_check_name.required ? 'formItem-required' : '' ]">
107
+ <input class="form-control col-sm-6" type="text" v-model="model.f_design_check_name" :readonly="edit ? false : 'readonly'"
108
+ v-validate:f_design_check_name = '{required: true}'>
109
+ </div>
110
+ </div>
111
+ </div>
112
+ <div class="form-group col-sm-11">
113
+ <label class="col-sm-2" for="f_survey_remarks">勘查意见:</label>
114
+ <div class="col-sm-10" id="f_survey_remarks">
115
+ <textarea class="form-control col-sm-6" v-model="model.f_survey_remarks" rows="3"
116
+ :readonly="edit ? false : 'readonly'">
117
+ </textarea>
118
+ </div>
119
+ </div>
120
+ <div class="from-group col-sm-11">
121
+ <div class="form-group col-sm-12">
122
+ <label class="col-sm-2" for="f_design_remarks">设计出图说明:</label>
123
+ <div class="col-sm-10" id="f_design_remarks">
124
+ <textarea class="form-control col-sm-6" rows="3" v-model="model.f_design_remarks"
125
+ :readonly="edit ? false : 'readonly'">
126
+ </textarea>
127
+ </div>
128
+ </div>
129
+ </div>
130
+ <div class="form-group col-sm-11">
131
+ <div class="form-group col-sm-6">
132
+ <label for="f_survey_departmen" class=" col-sm-4 control-label">部门:</label>
133
+ <div class="col-sm-6" id="f_survey_departmen">
134
+ <input class="form-control" type="text" v-model="model.f_apply_department" disabled>
135
+ </div>
136
+ </div>
137
+ <div class="form-group col-sm-6">
138
+ <label for="f_survey_operator" class="col-sm-6 control-label">执行人:</label>
139
+ <div class="col-sm-6" id="f_survey_operator">
140
+ <input class="form-control" type="text" v-model="model.f_apply_operator" disabled>
141
+ </div>
142
+ </div>
143
+ </div>
144
+ <div class="form-group col-sm-11">
145
+ <div class="form-group col-sm-6">
146
+ <label class=" col-sm-4 control-label" for="f_filiale">分公司:</label>
147
+ <div class="col-sm-6" id="f_filiale">
148
+ <input class="form-control" type="text" v-model="model.f_filiale" disabled>
149
+ </div>
150
+ </div>
151
+ <div class="form-group col-sm-6">
152
+ <label class=" col-sm-6 control-label">操作日期:</label>
153
+ <div class="col-sm-6" id="f_survey_date">
154
+ <input class="form-control" type="text" v-model="model.f_survey_date" disabled>
155
+ </div>
156
+ </div>
157
+ </div>
158
+ </form>
159
+ </validator>
160
+ <div class="from-group col-sm-11" v-show="edit">
161
+ <center>
162
+ <button type="button" @click="confirm()" class="btn btn-primary" style="width:80px; margin-left:40px;" >
163
+ 保存
164
+ </button>
165
+ <button type="button" @click="commit()" class="btn btn-primary" style="width:80px; margin-left:40px;" :disabled='!$v.valid'>
166
+ 提交
167
+ </button>
168
+ <button type="button" @click="reset()" class="btn btn-warning" style="width:80px; margin-left:40px;">
169
+ 取消
170
+ </button>
171
+ </center>
172
+ </div>
173
+ </div>
174
+ <place-controler-print v-if="showPrint" :show="showPrint"></place-controler-print>
175
+ </template>
176
+ <script>
177
+ import co from 'co'
178
+ import {HttpResetClass} from 'vue-client'
179
+ import * as Util from '../../../../Util'
180
+ let gen = function* (self, val) {
181
+ let data = {
182
+ tablename: 't_apply',
183
+ parameters: val
184
+ }
185
+ yield self.$resetpost('rs/logic/save', {data: data})
186
+ data = {
187
+ model: {
188
+ f_processid: self.selectdata.f_process_id,
189
+ },
190
+ loginUser: {
191
+ id: self.$login.f.id,
192
+ name: self.$login.f.name,
193
+ ename: self.$login.f.ename
194
+ },
195
+ employeetemplate: self.employeetemplate,// 指派勘察人员
196
+ subdep: '提交'
197
+ }
198
+ self.$resetpost(`rs/logic/grantnext`,
199
+ {data: data})
200
+ .then(() => {
201
+ self.reset()
202
+ })
203
+ }
204
+ export default {
205
+ title: '测绘申请',
206
+ data() {
207
+ return {
208
+ fgastype: this.$appdata.getParam('用气类型'),
209
+ completiontime: this.$appdata.getParam('完成时间'),
210
+ employees: [], // 部门人员数组
211
+ employeetemplate: '', // 选定部门人员
212
+ model: {
213
+ f_filiale: this.$login.f.f_filiale,
214
+ f_survey_date: Util.toStandardTimeString(),
215
+ f_survey_department: this.$login.f.f_parentname,
216
+ f_survey_operator: this.$login.f.name
217
+ },
218
+ pattern: '/^[+]{0,1}(\\d+)$|^[+]{0,1}(\\d+\\.\\d+)$/',
219
+ showPrint: false
220
+ }
221
+ },
222
+ props: ['selectdata','edit'],
223
+ ready() {
224
+ this.selectdata.f_gas_type = this.selectdata.f_gas_type ? [this.selectdata.f_gas_type] : this.model.f_gas_type
225
+ this.model = Object.assign({}, this.model, this.selectdata)
226
+ },
227
+ methods: {
228
+ // 获取部门领导角色
229
+ async loademployees() {
230
+ let http = new HttpResetClass()
231
+ if (this.selectdata.actdefid != '1') {
232
+ await http.load('POST', 'rs/sql/singleTable', {
233
+ data: {
234
+ tablename: 't_actorperson',
235
+ condition: " userseq='" + this.$login.f.id + "' order by id desc"
236
+ }
237
+ }, {resolveMsg: null, rejectMsg: "角色人员是(登陆人)信息查询失败"}, {silent: true})
238
+ .then((res) => {
239
+ console.log("取得部门领导的角色" + res.data[0].actorid)
240
+ if (res.data[0].actorid.startsWith("R") && (res.data[0].actorid.includes("部门负责人") || res.data[0].actorid.includes("部经理") || res.data[0].actorid.includes("部门领导") || res.data[0].actorid.includes("部负责人") || res.data[0].actorid.includes("部领导") || res.data[0].actorid.includes("组长"))) {
241
+ let loaderstr = res.data[0].actorid.substring(2, res.data[0].actorid.length - 1)
242
+ this.temploader = loaderstr
243
+ // 如果是退回的就用已经的人员,保证下发的是同一个人
244
+ this.toemployees()
245
+ let loademployeestr = null
246
+ if (loaderstr.includes("部门")) {
247
+ loademployeestr = 'R(' + loaderstr.split("部门")[0] + '部门人员)'
248
+ } else if (loaderstr.includes("部")) {
249
+ loademployeestr = 'R(' + loaderstr.split("部")[0] + '部人员)'
250
+ } else if (loaderstr.includes("组长")) {
251
+ loademployeestr = 'R(' + loaderstr.split("组长")[0] + '人员)'
252
+ }
253
+ console.log(loademployeestr)
254
+ let http2 = new HttpResetClass()
255
+ http2.load('POST', 'rs/sql/singleTable', {
256
+ data: {
257
+ tablename: 't_role',
258
+ condition: " name='" + loademployeestr.substring(2, loademployeestr.length - 1) + "'"
259
+ // condition: " name='" + loaderstr.split("部")[0] + '部人员' + "'"
260
+ }
261
+ }, {resolveMsg: null, rejectMsg: "角色人员(部门人员)id信息查询失败"}, {silent: true}).then((res) => {
262
+ console.log("取得角色人员(部门人员)id" + JSON.stringify(res.data[0].id))
263
+ let strid = res.data[0].id
264
+ let http3 = new HttpResetClass()
265
+ http3.load('POST', 'rs/sql/singleTable', {
266
+ data: {
267
+ tablename: 't_user',
268
+ condition: "roles like '%" + strid + "%'"
269
+ }
270
+ }, {resolveMsg: null, rejectMsg: "角色人员(部门人员)信息查询失败"}, {silent: true}).then((res) => {
271
+ console.log("角色人员(部门人员)信息成功")
272
+ for (var i = 0; i < res.data.length; i++) {
273
+ this.employees.push({lable: res.data[i].name, value: res.data[i].name})
274
+ }
275
+ })
276
+ })
277
+ }
278
+ })
279
+ }
280
+ },
281
+ confirm() {
282
+ //判断当前节点的状态(开始活动/完工)
283
+ this.$resetpost('rs/sql/findProcessState', {data: {actid:this.selectdata.actid}}, {
284
+ resolveMsg: null,
285
+ rejectMsg: '提交错误!'
286
+ }).then((res) => {
287
+ if (res.data[0].state != '开始活动') {
288
+ this.$showMessage("该节点信息已在别处提交,请刷新!")
289
+ this.reset()
290
+ } else {
291
+ //通过数据校验再进行下一步判断
292
+ if (this.verification()) {
293
+
294
+ if(Number(this.model.f_completion_households) >Number( this.selectdata.f_total_households)){
295
+ this.$showMessage("已完成户数不能大于总户数!")
296
+ this.model.f_completion_households = null
297
+ }else{
298
+ let data = {
299
+ tablename: 't_apply',
300
+ parameters: this.model
301
+ }
302
+ this.$resetpost('rs/logic/save', {data: data})
303
+ .then(() => {
304
+ this.reset()
305
+ })
306
+ }
307
+ }
308
+ }
309
+ })
310
+
311
+ },
312
+ commit() {
313
+ //判断当前节点的状态(开始活动/完工)
314
+ var entryName = this.model.f_entry_name //项目名称
315
+ var ename = this.selectdata.f_entry_name
316
+ this.$resetpost('rs/sql/findProcessState', {data: {actid:this.selectdata.actid}}, {
317
+ resolveMsg: null,
318
+ rejectMsg: '提交错误!'
319
+ }).then((res) => {
320
+ if (res.data[0].state != '开始活动') {
321
+ this.$showMessage("该节点信息已在别处提交,请刷新!")
322
+ this.reset()
323
+ } else {
324
+ //通过数据校验再进行下一步判断
325
+ if (this.verification()) {
326
+ if(name == null){
327
+ //项目名称唯一性判断
328
+ this.$resetpost('rs/sql/findByEntryName', {data: {entryName: entryName}}, {
329
+ resolveMsg: null,
330
+ rejectMsg: '提交错误!'
331
+ }).then((res) => {
332
+ if (res.data.length > 0) {
333
+ this.$showMessage("项目名称不能重复!")
334
+ } else {
335
+ let getGen = gen(this, this.model)
336
+ co(getGen)
337
+ }
338
+ })
339
+ }else{
340
+ if(Number(this.model.f_completion_households) >Number( this.selectdata.f_total_households)){
341
+ this.$showMessage("已完成户数不能大于总户数!")
342
+ this.model.f_completion_households = null
343
+ }else{
344
+ let getGen = gen(this, this.model)
345
+ co(getGen)
346
+ }
347
+
348
+ }
349
+ }
350
+ }
351
+ })
352
+ },
353
+ //数据校验
354
+ verification() {
355
+ var isNum = /^(([+]?\d*$)|(^[+]?\d+(\.\d+)?$))/ //非负纯数字
356
+ var regex = /.*?[\u4e00-\u9fa5].*?[\u4e00-\u9fa5].*/ //至少两个汉字
357
+ var phoneReg = /^1([38][0-9]|4[579]|5[0-3,5-9]|6[6]|7[0135678]|9[89])\d{8}$/ //手机号码正则
358
+ var telReg = /0\d{2,3}-\d{7,8}/ //座机正则
359
+ if (!this.model.f_entry_name) {
360
+ this.$showMessage("项目名称不能为空!")
361
+ return false
362
+ }
363
+
364
+
365
+
366
+ if (!this.model.f_completion_households) {
367
+ this.$showMessage("已完成户数不能为空!")
368
+ return false
369
+ } else if (!isNum.test(this.model.f_completion_households)) {
370
+ this.$showMessage("已完成户数格式错误!")
371
+ return false
372
+ }
373
+
374
+
375
+
376
+ if (!this.model.f_designer) {
377
+ this.$showMessage("图纸设计人不能为空!")
378
+ return
379
+ } else if (!regex.test(this.model.f_designer.trim())) {
380
+ this.$showMessage("图纸设计人请至少输入两个汉字!")
381
+ return false
382
+ }
383
+ if (!this.model.f_design_check_name) {
384
+ this.$showMessage("图纸审核人不能为空!")
385
+ return
386
+ } else if (!regex.test(this.model.f_design_check_name.trim())) {
387
+ this.$showMessage("图纸审核人请至少输入两个汉字!")
388
+ return false
389
+ }
390
+
391
+ if(!this.model.f_design_cycle){
392
+ this.$showMessage("设计周期不能为空!")
393
+ return false
394
+ }
395
+ if(!this.model.f_design_start_date){
396
+ this.$showMessage("设计派工日期不能为空!")
397
+ return false
398
+ }
399
+ if(!this.model.f_design_end_date){
400
+ this.$showMessage("设计完成日期不能为空!")
401
+ return false
402
+ }
403
+ if(!this.model.f_design_unit){
404
+ this.$showMessage("图纸审计单位不能为空!")
405
+ return false
406
+ }
407
+
408
+ if(!this.model.f_completion_time){
409
+ this.$showMessage("完成时间不能为空!")
410
+ return false
411
+ }
412
+ return true
413
+
414
+ },
415
+ reset() {
416
+ this.$dispatch('close')
417
+ this.$dispatch('selfsearch')
418
+ },
419
+ setselect() {
420
+ this.selectdata.f_gas_type = this.selectdata.f_gas_type ? this.selectdata.f_gas_type : this.model.f_gas_type
421
+ this.model = Object.assign({}, this.model, this.selectdata)
422
+ this.model.f_survey_date = this.$login.toStandardDateString()
423
+ this.model.f_survey_department = this.$login.f.f_parentname
424
+ this.model.f_survey_operator = this.$login.f.name
425
+ }
426
+ },
427
+ events: {
428
+ },
429
+ watch: {}
430
+ }
431
+ </script>
432
+ <style>
433
+ .formItem-required::after {
434
+ content: '*';
435
+ position: absolute;
436
+ font-size: 20px;
437
+ margin-top: 3.5%;
438
+ margin-left: 3%;
439
+ color: #d91118;
440
+ }
441
+ </style>