apply-clients 3.4.63 → 3.4.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.
Files changed (94) hide show
  1. package/build/dev-server.js +119 -119
  2. package/dist-android/static/18.js +2 -2
  3. package/dist-android/static/18.js.map +1 -1
  4. package/dist-android/static/19.js +2 -2
  5. package/dist-android/static/19.js.map +1 -1
  6. package/dist-android/static/24.js +2 -2
  7. package/dist-android/static/24.js.map +1 -1
  8. package/dist-android/static/25.js +2 -2
  9. package/dist-android/static/25.js.map +1 -1
  10. package/dist-android/static/26.js +2 -2
  11. package/dist-android/static/26.js.map +1 -1
  12. package/dist-android/static/28.js +2 -2
  13. package/dist-android/static/28.js.map +1 -1
  14. package/dist-android/static/30.js +2 -2
  15. package/dist-android/static/30.js.map +1 -1
  16. package/dist-android/static/34.js +2 -2
  17. package/dist-android/static/34.js.map +1 -1
  18. package/dist-android/static/43.js +2 -2
  19. package/dist-android/static/43.js.map +1 -1
  20. package/dist-android/static/47.js +2 -2
  21. package/dist-android/static/47.js.map +1 -1
  22. package/dist-android/static/50.js +2 -2
  23. package/dist-android/static/50.js.map +1 -1
  24. package/dist-android/static/52.js +2 -2
  25. package/dist-android/static/52.js.map +1 -1
  26. package/dist-android/static/53.js +2 -2
  27. package/dist-android/static/53.js.map +1 -1
  28. package/dist-android/static/54.js +2 -2
  29. package/dist-android/static/54.js.map +1 -1
  30. package/dist-android/static/60.js +2 -2
  31. package/dist-android/static/60.js.map +1 -1
  32. package/dist-android/static/63.js +2 -2
  33. package/dist-android/static/63.js.map +1 -1
  34. package/dist-android/static/64.js +2 -2
  35. package/dist-android/static/64.js.map +1 -1
  36. package/dist-android/static/78.js +2 -2
  37. package/dist-android/static/78.js.map +1 -1
  38. package/dist-android/static/83.js +2 -2
  39. package/dist-android/static/83.js.map +1 -1
  40. package/dist-android/static/84.js +2 -2
  41. package/dist-android/static/84.js.map +1 -1
  42. package/dist-android/static/86.js +2 -2
  43. package/dist-android/static/86.js.map +1 -1
  44. package/dist-android/static/87.js +2 -2
  45. package/dist-android/static/87.js.map +1 -1
  46. package/dist-android/static/89.js +2 -2
  47. package/dist-android/static/89.js.map +1 -1
  48. package/dist-android/static/97.js +2 -2
  49. package/dist-android/static/97.js.map +1 -1
  50. package/dist-android/static/app.js +80 -80
  51. package/dist-android/static/app.js.map +1 -1
  52. package/dist.7z +0 -0
  53. package/package.json +1 -1
  54. package/src/components/android/AppSign.vue +154 -154
  55. package/src/components/android/AppTakePic.vue +143 -143
  56. package/src/components/android/Function/AppFunctionServiceControl.vue +344 -344
  57. package/src/components/android/Process/AppServiceControl.vue +1708 -1708
  58. package/src/components/android/Process/Processes/AppAddMaterialScience.vue +477 -477
  59. package/src/components/android/Process/Processes/AppDevicesManagement.vue +519 -519
  60. package/src/components/android/Process/Processes/AppSupplementalAgreement.vue +298 -298
  61. package/src/components/android/Supervisory/AppSupervisoryCart.vue +156 -156
  62. package/src/components/build/Install/Process/zhongran/ZR_Design.vue +537 -537
  63. package/src/components/product/ApplyCharge/ApplyChargeList.vue +470 -470
  64. package/src/components/product/Function/Service/FunctionServiceControl.vue +445 -445
  65. package/src/components/product/Process/Processes/addMaterialScience.vue +454 -454
  66. package/src/components/product/Process/Processes/chargeManagement.vue +656 -656
  67. package/src/components/product/Process/Processes/devicesManagement.vue +484 -484
  68. package/src/components/product/Process/Processes/supplementalAgreement.vue +298 -298
  69. package/src/components/product/Process/Service/ServiceControl.vue +18 -41
  70. package/src/components/product/Process/Service/ShowBackReason.vue +33 -33
  71. package/src/components/product/Process/ShowBackReason.vue +33 -33
  72. package/src/components/product/Supervisory/Service/SupervisoryServiceControl.vue +882 -882
  73. package/src/components/product/VueUtils/ApplyUpload.vue +287 -287
  74. package/src/filiale/gehua/pc/ServiceControl.vue +1938 -1938
  75. package/src/filiale/gehua/pc/SupervisoryServiceControl.vue +890 -890
  76. package/src/filiale/guangxi/android/Process/Processes/AppAddMaterialScience.vue +520 -520
  77. package/src/filiale/guangxi/android/Process/Processes/AppDevicesManagement.vue +519 -519
  78. package/src/filiale/guangxi/android/Process/Processes/AppServiceControl.vue +1708 -1708
  79. package/src/filiale/guangxi/android/Process/Processes/AppSupplementalAgreement.vue +298 -298
  80. package/src/filiale/guangxi/pc/ApplyCharge/ApplyChargeList.vue +470 -470
  81. package/src/filiale/guangxi/pc/ApplyCharge/chargeManagement.vue +724 -724
  82. package/src/filiale/guangxi/pc/Process/Service/ServiceControl.vue +1922 -1922
  83. package/src/filiale/guangxi/pc/Process/Service/ShowBackReason.vue +33 -33
  84. package/src/filiale/guangxi/pc/Process/Service/SupervisoryServiceControl.vue +891 -891
  85. package/src/filiale/guangxi/pc/Process/Service/addMaterialScience.vue +517 -517
  86. package/src/filiale/guangxi/pc/Process/ShowBackReason.vue +33 -33
  87. package/src/filiale/yuchuan/android/Process/AppServiceControl.vue +735 -735
  88. package/src/filiale/yuchuan/android/Process/Processes/AppInstallationDetails.vue +824 -824
  89. package/src/filiale/yuchuan/android/Process/Processes/AppInstallationDetailsCivil.vue +650 -650
  90. package/src/filiale/yuchuan/pc/Order/OrderApply.vue +528 -528
  91. package/src/filiale/yuchuan/pc/Process/Processes/InstallationDetails.vue +809 -809
  92. package/src/filiale/yuchuan/pc/Process/Processes/InstallationDetailsCivil.vue +595 -595
  93. package/src/filiale/yuchuan/pc/Process/Processes/chargeManagement.vue +621 -621
  94. package/src/filiale/yuchuan/pc/Process/Service/ServiceControl.vue +1108 -1108
@@ -1,537 +1,537 @@
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
- <div class="form-group col-sm-11">
11
- <div class="form-group col-sm-4">
12
- <label for="f_designer" class=" col-sm-6 control-label">项目名称:</label>
13
- <div class="col-sm-6" id="f_entry_name">
14
- <input class="form-control" type="text" v-model="model.f_entry_name" :readonly="edit ? false : 'readonly'">
15
- </div>
16
- </div>
17
- <div class="form-group col-sm-4" :class="$v.f_install_num.pattern ? 'has-error' : ''">
18
- <label for="f_install_num" class=" col-sm-6 control-label">设计户数:</label>
19
- <div class="col-sm-6" id="f_install_num">
20
- <input class="form-control" type="number" v-model="model.f_install_num"
21
- v-validate:f_install_num="{pattern:'/^[+]{0,1}(\\d+)$|^[+]{0,1}(\\d+\\.\\d+)$/'}" :readonly="edit ? false : 'readonly'">
22
- </div>
23
- </div>
24
- <div class="form-group col-sm-4">
25
- <label for="f_designer" class=" col-sm-6 control-label">市场开发部项目负责人:</label>
26
- <div class="col-sm-6" id="f_market_person">
27
- <input class="form-control" type="text" v-model="model.f_market_person" :readonly="edit ? false : 'readonly'">
28
- </div>
29
- </div>
30
- </div>
31
- <div class="form-group col-sm-11">
32
- <div class="form-group col-sm-4">
33
- <label for="f_install_num" class=" col-sm-6 control-label">总户数:</label>
34
- <div class="col-sm-6" :class="$v.f_total_households.pattern ? 'has-error' : ''">
35
- <input class="form-control" type="number" id="f_total_households" v-model="model.f_total_households"
36
- v-validate:f_total_households="{pattern:'/^[+]{0,1}(\\d+)$|^[+]{0,1}(\\d+\\.\\d+)$/'}"
37
- :readonly="edit ? false : 'readonly'">
38
- </div>
39
- </div>
40
- <div class="form-group col-sm-4">
41
- <label for="f_install_num" class=" col-sm-6 control-label">已登记户数:</label>
42
- <div class="col-sm-6" :class="$v.f_total_households.pattern ? 'has-error' : ''">
43
- <input class="form-control" type="number" v-model="model.f_register_households"
44
- id="f_register_households"
45
- v-validate:f_register_households="{pattern:'/^[+]{0,1}(\\d+)$|^[+]{0,1}(\\d+\\.\\d+)$/'}"
46
- :readonly="edit ? false : 'readonly'">
47
- </div>
48
- </div>
49
- <div class="form-group col-sm-4">
50
- <label for="f_install_num" class=" col-sm-6 control-label">勘查人员:</label>
51
- <div class="col-sm-6">
52
- <input class="form-control" type="text" v-model="model.f_survey_name" id="f_survey_name"
53
- :readonly="edit ? false : 'readonly'">
54
- </div>
55
- </div>
56
- </div>
57
- <div class="col-sm-11">
58
- <div class="form-group col-sm-4">
59
- <label for="f_designer" class=" col-sm-6 control-label">客户联系人:</label>
60
- <div class="col-sm-6" id="f_customer_contact">
61
- <input class="form-control" type="text" v-model="model.f_customer_contact" :readonly="edit ? false : 'readonly'">
62
- </div>
63
- </div>
64
- <div class="form-group col-sm-4">
65
- <label for="f_install_num" class=" col-sm-6 control-label">联系电话:</label>
66
- <div class="col-sm-6">
67
- <input class="form-control" type="text" v-model="model.f_contact" id="f_contact" :readonly="edit ? false : 'readonly'">
68
- </div>
69
- </div>
70
- <div class="form-group col-sm-4">
71
- <label class="col-sm-6 control-label">完成时间:</label>
72
- <div class="col-sm-6">
73
- <input class="form-control col-sm-12" type="text" v-if="selectdata.f_completion_time"
74
- v-model="model.f_completion_time" :readonly="edit ? false : 'readonly'">
75
- <v-select
76
- v-model="model.f_completion_time" v-else
77
- placeholder='请选择'
78
- :value-single="true"
79
- :value.sync="model.f_completion_time"
80
- :options='completiontime'
81
- close-on-select>
82
- </v-select>
83
- </div>
84
- </div>
85
- </div>
86
-
87
- <div class="col-sm-11">
88
- <div class="form-group col-sm-4"
89
- :class="[$v.f_completion_households.pattern ? 'has-error select-error' : '' ]">
90
- <label for="f_install_num" class=" col-sm-6 control-label">已完成户数:</label>
91
- <div class="col-sm-6" id="f_ompletion_households">
92
- <input class="form-control" type="number" v-model="model.f_completion_households"
93
- v-validate:f_completion_households="{pattern:'/^[+]{0,1}(\\d+)$|^[+]{0,1}(\\d+\\.\\d+)$/'}"
94
- :readonly="edit ? false : 'readonly'">
95
- </div>
96
- </div>
97
- <div class="form-group col-sm-4" >
98
- <label for="f_survey_time" class="col-sm-6 control-label">勘查日期:</label>
99
- <div class="col-sm-6" id="f_survey_time">
100
- <input type="text" v-show="false" v-model="$refs.surveytime.value" >
101
- <datepicker id="f_survey_time" width="200.72px;" v-ref:surveytime
102
- :value.sync="model.f_survey_time"
103
- :disabled-days-of-Week="[]"
104
- :format="'yyyy-MM-dd'"
105
- v-model="model.f_survey_time"
106
- readonly="readonly"
107
- :disabled="edit ? false : 'disabled'">
108
- </datepicker>
109
- </div>
110
- </div>
111
- <div class="form-group col-sm-4">
112
- <div class="col-sm-3"></div>
113
- <div class="col-sm-6">
114
- <input type="checkbox" class="" id="checkbox" v-model="model.f_isdesign"
115
- :disabled="edit ? false : 'disabled'">
116
- <label for="checkbox" class="font-size">是否设计出图</label>
117
- </div>
118
- </div>
119
- </div>
120
- <div class="from-group col-sm-11">
121
- <div class="col-sm-4">
122
- <label for="f_application_type" class=" col-sm-6 control-label">申请类别:</label>
123
- <input type="radio" id="one" value="设计" v-model="model.f_application_type":disabled="edit ? false : 'disabled'">
124
- <label for="one" class="font-size">设计</label>
125
- <input type="radio" id="two" value="测绘" v-model="model.f_application_type" :disabled="edit ? false : 'disabled'">
126
- <label for="two" class="font-size">测绘</label>
127
- </div>
128
- </div>
129
- <div class="from-group col-sm-11">
130
- <div class="form-group col-sm-4">
131
- <label for="f_design_cycle" class=" col-sm-6 control-label">设计周期:</label>
132
- <div class="col-sm-6" id="f_design_cycle">
133
- <input class="form-control" type="text" v-model="model.f_design_cycle" :readonly="edit ? false : 'readonly'">
134
- </div>
135
- </div>
136
- <div class="form-group col-sm-4">
137
- <label for="f_design_start_date" class=" col-sm-6 control-label">设计派工日期:</label>
138
- <div class="col-sm-6" id="f_design_start_date">
139
- <datepicker
140
- :value.sync="model.f_design_start_date"
141
- :format="'yyyy-MM-dd'"
142
- v-model="model.f_design_start_date"
143
- :show-reset-button="reset"
144
- readonly="readonly">
145
- </datepicker>
146
- </div>
147
- </div>
148
- <div class="form-group col-sm-4">
149
- <label for="f_design_end_date" class=" col-sm-6 control-label">设计完成日期:</label>
150
- <div class="col-sm-6" id="f_design_end_date">
151
- <datepicker width="600.76px;"
152
- :value.sync="model.f_design_end_date"
153
- :format="'yyyy-MM-dd'"
154
- v-model="model.f_design_end_date"
155
- :show-reset-button="reset" readonly="readonly">
156
- </datepicker>
157
- </div>
158
- </div>
159
- </div>
160
- <div class="from-group col-sm-11">
161
- <div class="form-group col-sm-4">
162
- <label for="f_designer" class=" col-sm-6 control-label">图纸设计人:</label>
163
- <div class="col-sm-6" id="f_designer">
164
- <input class="form-control" type="text" v-model="model.f_designer" :readonly="edit ? false : 'readonly'">
165
- </div>
166
- </div>
167
- <div class="form-group col-sm-4">
168
- <label for="f_design_unit" class=" col-sm-6 control-label">图纸审计单位:</label>
169
- <div class="col-sm-6" id="f_design_unit">
170
- <input class="form-control" type="text" v-model="model.f_design_unit" :readonly="edit ? false : 'readonly'">
171
- </div>
172
- </div>
173
- <div class="form-group col-sm-4">
174
- <label for="f_design_check_name" class=" col-sm-6 control-label">图纸审核人:</label>
175
- <div class="col-sm-6" id="f_design_check_name">
176
- <input class="form-control" type="text" v-model="model.f_design_check_name" :readonly="edit ? false : 'readonly'">
177
- </div>
178
- </div>
179
- </div>
180
- <div class="form-group col-sm-11">
181
- <label class="col-sm-2" for="f_survey_remarks">勘查意见:</label>
182
- <div class="col-sm-10" id="f_survey_remarks">
183
- <textarea class="form-control" v-model="model.f_survey_remarks" rows="3"
184
- :readonly="edit ? false : 'readonly'">
185
- </textarea>
186
- </div>
187
- </div>
188
- <div class="from-group col-sm-11">
189
- <div class="form-group col-sm-12">
190
- <label class="col-sm-2" for="f_design_remarks">设计出图说明:</label>
191
- <div class="col-sm-10" id="f_design_remarks">
192
- <textarea class="form-control" rows="3" v-model="model.f_design_remarks"
193
- :readonly="edit ? false : 'readonly'">
194
- </textarea>
195
- </div>
196
- </div>
197
- </div>
198
- <div class="form-group col-sm-11">
199
- <div class="form-group col-sm-6">
200
- <label for="f_survey_departmen" class=" col-sm-4 control-label">部门:</label>
201
- <div class="col-sm-6" id="f_survey_departmen">
202
- <input class="form-control" type="text" v-model="model.f_apply_department" disabled>
203
- </div>
204
- </div>
205
- <div class="form-group col-sm-6">
206
- <label for="f_survey_operator" class="col-sm-6 control-label">执行人:</label>
207
- <div class="col-sm-6" id="f_survey_operator">
208
- <input class="form-control" type="text" v-model="model.f_apply_operator" disabled>
209
- </div>
210
- </div>
211
- </div>
212
- <div class="form-group col-sm-11">
213
- <div class="form-group col-sm-6">
214
- <label class=" col-sm-4 control-label" for="f_filiale">分公司:</label>
215
- <div class="col-sm-6" id="f_filiale">
216
- <input class="form-control" type="text" v-model="model.f_filiale" disabled>
217
- </div>
218
- </div>
219
- <div class="form-group col-sm-6">
220
- <label class=" col-sm-6 control-label">操作日期:</label>
221
- <div class="col-sm-6" id="f_survey_date">
222
- <input class="form-control" type="text" v-model="model.f_survey_date" disabled>
223
- </div>
224
- </div>
225
- </div>
226
- </form>
227
- </validator>
228
- <div class="from-group col-sm-11" v-show="edit">
229
- <center>
230
- <button type="button" @click="confirm()" class="btn btn-primary" style="width:80px; margin-left:40px;" >
231
- 保存
232
- </button>
233
- <button type="button" @click="commit()" class="btn btn-primary" style="width:80px; margin-left:40px;">
234
- 提交
235
- </button>
236
- <button type="button" @click="reset()" class="btn btn-warning" style="width:80px; margin-left:40px;">
237
- 取消
238
- </button>
239
- </center>
240
- </div>
241
- </div>
242
- <place-controler-print v-if="showPrint" :show="showPrint"></place-controler-print>
243
- </template>
244
- <script>
245
- import co from 'co'
246
- import {HttpResetClass} from 'vue-client'
247
- import * as Util from '../../../../Util'
248
- let gen = function* (self, val) {
249
- let data = {
250
- tablename: 't_apply',
251
- parameters: val
252
- }
253
- yield self.$resetpost('rs/logic/save', {data: data})
254
- data = {
255
- model: {
256
- f_processid: self.selectdata.f_process_id,
257
- },
258
- loginUser: {
259
- id: self.$login.f.id,
260
- name: self.$login.f.name,
261
- ename: self.$login.f.ename
262
- },
263
- employeetemplate: self.employeetemplate,// 指派勘察人员
264
- subdep: '提交'
265
- }
266
- self.$resetpost(`rs/logic/grantnext`,
267
- {data: data})
268
- .then(() => {
269
- self.reset()
270
- })
271
- }
272
- export default {
273
- title: '测试设计',
274
- data() {
275
- return {
276
- fgastype: this.$appdata.getParam('用气类型'),
277
- completiontime: this.$appdata.getParam('完成时间'),
278
- employees: [], // 部门人员数组
279
- employeetemplate: '', // 选定部门人员
280
- model: {
281
- f_filiale: this.$login.f.f_filiale,
282
- f_survey_date: Util.toStandardTimeString(),
283
- f_survey_department: this.$login.f.f_parentname,
284
- f_survey_operator: this.$login.f.name
285
- },
286
- pattern: '/^[+]{0,1}(\\d+)$|^[+]{0,1}(\\d+\\.\\d+)$/',
287
- showPrint: false
288
- }
289
- },
290
- props: ['selectdata','edit'],
291
- ready() {
292
- this.selectdata.f_gas_type = this.selectdata.f_gas_type ? [this.selectdata.f_gas_type] : this.model.f_gas_type
293
- this.model = Object.assign({}, this.model, this.selectdata)
294
- },
295
- methods: {
296
- // 获取部门领导角色
297
- async loademployees() {
298
- let http = new HttpResetClass()
299
- if (this.selectdata.actdefid != '1') {
300
- await http.load('POST', 'rs/sql/singleTable', {
301
- data: {
302
- tablename: 't_actorperson',
303
- condition: " userseq='" + this.$login.f.id + "' order by id desc"
304
- }
305
- }, {resolveMsg: null, rejectMsg: "角色人员是(登陆人)信息查询失败"}, {silent: true})
306
- .then((res) => {
307
- console.log("取得部门领导的角色" + res.data[0].actorid)
308
- 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("组长"))) {
309
- let loaderstr = res.data[0].actorid.substring(2, res.data[0].actorid.length - 1)
310
- this.temploader = loaderstr
311
- // 如果是退回的就用已经的人员,保证下发的是同一个人
312
- this.toemployees()
313
- let loademployeestr = null
314
- if (loaderstr.includes("部门")) {
315
- loademployeestr = 'R(' + loaderstr.split("部门")[0] + '部门人员)'
316
- } else if (loaderstr.includes("部")) {
317
- loademployeestr = 'R(' + loaderstr.split("部")[0] + '部人员)'
318
- } else if (loaderstr.includes("组长")) {
319
- loademployeestr = 'R(' + loaderstr.split("组长")[0] + '人员)'
320
- }
321
- console.log(loademployeestr)
322
- let http2 = new HttpResetClass()
323
- http2.load('POST', 'rs/sql/singleTable', {
324
- data: {
325
- tablename: 't_role',
326
- condition: " name='" + loademployeestr.substring(2, loademployeestr.length - 1) + "'"
327
- // condition: " name='" + loaderstr.split("部")[0] + '部人员' + "'"
328
- }
329
- }, {resolveMsg: null, rejectMsg: "角色人员(部门人员)id信息查询失败"}, {silent: true}).then((res) => {
330
- console.log("取得角色人员(部门人员)id" + JSON.stringify(res.data[0].id))
331
- let strid = res.data[0].id
332
- let http3 = new HttpResetClass()
333
- http3.load('POST', 'rs/sql/singleTable', {
334
- data: {
335
- tablename: 't_user',
336
- condition: "roles like '%" + strid + "%'"
337
- }
338
- }, {resolveMsg: null, rejectMsg: "角色人员(部门人员)信息查询失败"}, {silent: true}).then((res) => {
339
- console.log("角色人员(部门人员)信息成功")
340
- for (var i = 0; i < res.data.length; i++) {
341
- this.employees.push({lable: res.data[i].name, value: res.data[i].name})
342
- }
343
- })
344
- })
345
- }
346
- })
347
- }
348
- },
349
- confirm() {
350
- //判断当前节点的状态(开始活动/完工)
351
- this.$resetpost('rs/sql/findProcessState', {data: {actid:this.selectdata.actid}}, {
352
- resolveMsg: null,
353
- rejectMsg: '提交错误!'
354
- }).then((res) => {
355
- if (res.data[0].state != '开始活动') {
356
- this.$showMessage("该节点信息已在别处提交,请刷新!")
357
- this.reset()
358
- } else {
359
- //通过数据校验再进行下一步判断
360
- if (this.verification()) {
361
- let data = {
362
- tablename: 't_apply',
363
- parameters: this.model
364
- }
365
- this.$resetpost('rs/logic/save', {data: data})
366
- .then(() => {
367
- this.reset()
368
- })
369
- }
370
- }
371
- })
372
-
373
- },
374
- commit() {
375
- debugger
376
- console.log("edit>>>>>",)
377
- //判断当前节点的状态(开始活动/完工)
378
- var entryName = this.model.f_entry_name //项目名称
379
- var ename = this.selectdata.f_entry_name
380
- this.$resetpost('rs/sql/findProcessState', {data: {actid:this.selectdata.actid}}, {
381
- resolveMsg: null,
382
- rejectMsg: '提交错误!'
383
- }).then((res) => {
384
- if (res.data[0].state != '开始活动') {
385
- this.$showMessage("该节点信息已在别处提交,请刷新!")
386
- this.reset()
387
- } else {
388
- //通过数据校验再进行下一步判断
389
- if (this.verification()) {
390
- if(name == null){
391
- //项目名称唯一性判断
392
- this.$resetpost('rs/sql/findByEntryName', {data: {entryName: entryName}}, {
393
- resolveMsg: null,
394
- rejectMsg: '提交错误!'
395
- }).then((res) => {
396
- if (res.data.length > 0) {
397
- this.$showMessage("项目名称不能重复!")
398
- } else {
399
- let getGen = gen(this, this.model)
400
- co(getGen)
401
- }
402
- })
403
- }else{
404
- let getGen = gen(this, this.model)
405
- co(getGen)
406
- }
407
- }
408
- }
409
- })
410
- },
411
- //数据校验
412
- verification() {
413
- var isNum = /^(([+]?\d*$)|(^[+]?\d+(\.\d+)?$))/ //非负纯数字
414
- var regex = /.*?[\u4e00-\u9fa5].*?[\u4e00-\u9fa5].*/ //至少两个汉字
415
- var phoneReg = /^1([38][0-9]|4[579]|5[0-3,5-9]|6[6]|7[0135678]|9[89])\d{8}$/ //手机号码正则
416
- var telReg = /0\d{2,3}-\d{7,8}/ //座机正则
417
- if (!this.model.f_entry_name) {
418
- this.$showMessage("项目名称不能为空!")
419
- return false
420
- }
421
- if (!this.model.f_install_num) {
422
- this.$showMessage("设计户数不能为空!")
423
- return false
424
- } else if (!isNum.test(this.model.f_install_num)) {
425
- this.$showMessage("设计户数格式错误!")
426
- return false
427
- }
428
- if (!this.model.f_total_households) {
429
- this.$showMessage("总户数不能为空!")
430
- return false
431
- } else if (!isNum.test(this.model.f_total_households)) {
432
- this.$showMessage("总户数格式错误!")
433
- return false
434
- }
435
- if (!this.model.f_register_households) {
436
- this.$showMessage("已登记户数不能为空!")
437
- return false
438
- } else if (!isNum.test(this.model.f_register_households)) {
439
- this.$showMessage("已登记户数格式错误!")
440
- return false
441
- }
442
- if (!this.model.f_completion_households) {
443
- this.$showMessage("已完成户数不能为空!")
444
- return false
445
- } else if (!isNum.test(this.model.f_completion_households)) {
446
- this.$showMessage("已完成户数格式错误!")
447
- return false
448
- }
449
- if (!this.model.f_survey_name) {
450
- this.$showMessage("勘查人员不能为空!")
451
- return
452
- } else if (!regex.test(this.model.f_survey_name.trim())) {
453
- this.$showMessage("勘查人员请至少输入两个汉字!")
454
- return false
455
- }
456
- if (!this.model.f_market_person) {
457
- this.$showMessage("市场开发部项目负责人不能为空!")
458
- return
459
- } else if (!regex.test(this.model.f_market_person.trim())) {
460
- this.$showMessage("市场开发部项目负责人请至少输入两个汉字!")
461
- return false
462
- }
463
- if (!this.model.f_customer_contact) {
464
- this.$showMessage("客户联系人不能为空!")
465
- return
466
- } else if (!regex.test(this.model.f_customer_contact.trim())) {
467
- this.$showMessage("客户联系人请至少输入两个汉字!")
468
- return false
469
- }else if(!this.model.f_contact){
470
- this.$showMessage("联系电话不能为空!")
471
- return false
472
- }else if(!telReg.test(this.model.f_contact) && !phoneReg.test(this.model.f_contact)){
473
- this.$showMessage("联系电话格式错误!")
474
- return
475
- }
476
- if (!this.model.f_designer) {
477
- this.$showMessage("图纸设计人不能为空!")
478
- return
479
- } else if (!regex.test(this.model.f_designer.trim())) {
480
- this.$showMessage("图纸设计人请至少输入两个汉字!")
481
- return false
482
- }
483
- if (!this.model.f_design_check_name) {
484
- this.$showMessage("图纸审核人不能为空!")
485
- return
486
- } else if (!regex.test(this.model.f_design_check_name.trim())) {
487
- this.$showMessage("图纸审核人请至少输入两个汉字!")
488
- return false
489
- }
490
- if(!this.model.f_survey_time){
491
- this.$showMessage("勘查日期不能为空!")
492
- return false
493
- }
494
- if(!this.model.f_design_cycle){
495
- this.$showMessage("设计周期不能为空!")
496
- return false
497
- }
498
- if(!this.model.f_design_start_date){
499
- this.$showMessage("设计派工日期不能为空!")
500
- return false
501
- }
502
- if(!this.model.f_design_end_date){
503
- this.$showMessage("设计完成日期不能为空!")
504
- return false
505
- }
506
- if(!this.model.f_design_unit){
507
- this.$showMessage("图纸审计单位不能为空!")
508
- return false
509
- }
510
- if(!this.model.f_application_type){
511
- this.$showMessage("请选择申请类别!")
512
- return false
513
- }
514
- if(!this.model.f_completion_time){
515
- this.$showMessage("完成时间不能为空!")
516
- return false
517
- }
518
- return true
519
-
520
- },
521
- reset() {
522
- this.$dispatch('close')
523
- this.$dispatch('selfsearch')
524
- },
525
- setselect() {
526
- this.selectdata.f_gas_type = this.selectdata.f_gas_type ? this.selectdata.f_gas_type : this.model.f_gas_type
527
- this.model = Object.assign({}, this.model, this.selectdata)
528
- this.model.f_survey_date = this.$login.toStandardDateString()
529
- this.model.f_survey_department = this.$login.f.f_parentname
530
- this.model.f_survey_operator = this.$login.f.name
531
- }
532
- },
533
- events: {
534
- },
535
- watch: {}
536
- }
537
- </script>
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
+ <div class="form-group col-sm-11">
11
+ <div class="form-group col-sm-4">
12
+ <label for="f_designer" class=" col-sm-6 control-label">项目名称:</label>
13
+ <div class="col-sm-6" id="f_entry_name">
14
+ <input class="form-control" type="text" v-model="model.f_entry_name" :readonly="edit ? false : 'readonly'">
15
+ </div>
16
+ </div>
17
+ <div class="form-group col-sm-4" :class="$v.f_install_num.pattern ? 'has-error' : ''">
18
+ <label for="f_install_num" class=" col-sm-6 control-label">设计户数:</label>
19
+ <div class="col-sm-6" id="f_install_num">
20
+ <input class="form-control" type="number" v-model="model.f_install_num"
21
+ v-validate:f_install_num="{pattern:'/^[+]{0,1}(\\d+)$|^[+]{0,1}(\\d+\\.\\d+)$/'}" :readonly="edit ? false : 'readonly'">
22
+ </div>
23
+ </div>
24
+ <div class="form-group col-sm-4">
25
+ <label for="f_designer" class=" col-sm-6 control-label">市场开发部项目负责人:</label>
26
+ <div class="col-sm-6" id="f_market_person">
27
+ <input class="form-control" type="text" v-model="model.f_market_person" :readonly="edit ? false : 'readonly'">
28
+ </div>
29
+ </div>
30
+ </div>
31
+ <div class="form-group col-sm-11">
32
+ <div class="form-group col-sm-4">
33
+ <label for="f_install_num" class=" col-sm-6 control-label">总户数:</label>
34
+ <div class="col-sm-6" :class="$v.f_total_households.pattern ? 'has-error' : ''">
35
+ <input class="form-control" type="number" id="f_total_households" v-model="model.f_total_households"
36
+ v-validate:f_total_households="{pattern:'/^[+]{0,1}(\\d+)$|^[+]{0,1}(\\d+\\.\\d+)$/'}"
37
+ :readonly="edit ? false : 'readonly'">
38
+ </div>
39
+ </div>
40
+ <div class="form-group col-sm-4">
41
+ <label for="f_install_num" class=" col-sm-6 control-label">已登记户数:</label>
42
+ <div class="col-sm-6" :class="$v.f_total_households.pattern ? 'has-error' : ''">
43
+ <input class="form-control" type="number" v-model="model.f_register_households"
44
+ id="f_register_households"
45
+ v-validate:f_register_households="{pattern:'/^[+]{0,1}(\\d+)$|^[+]{0,1}(\\d+\\.\\d+)$/'}"
46
+ :readonly="edit ? false : 'readonly'">
47
+ </div>
48
+ </div>
49
+ <div class="form-group col-sm-4">
50
+ <label for="f_install_num" class=" col-sm-6 control-label">勘查人员:</label>
51
+ <div class="col-sm-6">
52
+ <input class="form-control" type="text" v-model="model.f_survey_name" id="f_survey_name"
53
+ :readonly="edit ? false : 'readonly'">
54
+ </div>
55
+ </div>
56
+ </div>
57
+ <div class="col-sm-11">
58
+ <div class="form-group col-sm-4">
59
+ <label for="f_designer" class=" col-sm-6 control-label">客户联系人:</label>
60
+ <div class="col-sm-6" id="f_customer_contact">
61
+ <input class="form-control" type="text" v-model="model.f_customer_contact" :readonly="edit ? false : 'readonly'">
62
+ </div>
63
+ </div>
64
+ <div class="form-group col-sm-4">
65
+ <label for="f_install_num" class=" col-sm-6 control-label">联系电话:</label>
66
+ <div class="col-sm-6">
67
+ <input class="form-control" type="text" v-model="model.f_contact" id="f_contact" :readonly="edit ? false : 'readonly'">
68
+ </div>
69
+ </div>
70
+ <div class="form-group col-sm-4">
71
+ <label class="col-sm-6 control-label">完成时间:</label>
72
+ <div class="col-sm-6">
73
+ <input class="form-control col-sm-12" type="text" v-if="selectdata.f_completion_time"
74
+ v-model="model.f_completion_time" :readonly="edit ? false : 'readonly'">
75
+ <v-select
76
+ v-model="model.f_completion_time" v-else
77
+ placeholder='请选择'
78
+ :value-single="true"
79
+ :value.sync="model.f_completion_time"
80
+ :options='completiontime'
81
+ close-on-select>
82
+ </v-select>
83
+ </div>
84
+ </div>
85
+ </div>
86
+
87
+ <div class="col-sm-11">
88
+ <div class="form-group col-sm-4"
89
+ :class="[$v.f_completion_households.pattern ? 'has-error select-error' : '' ]">
90
+ <label for="f_install_num" class=" col-sm-6 control-label">已完成户数:</label>
91
+ <div class="col-sm-6" id="f_ompletion_households">
92
+ <input class="form-control" type="number" v-model="model.f_completion_households"
93
+ v-validate:f_completion_households="{pattern:'/^[+]{0,1}(\\d+)$|^[+]{0,1}(\\d+\\.\\d+)$/'}"
94
+ :readonly="edit ? false : 'readonly'">
95
+ </div>
96
+ </div>
97
+ <div class="form-group col-sm-4" >
98
+ <label for="f_survey_time" class="col-sm-6 control-label">勘查日期:</label>
99
+ <div class="col-sm-6" id="f_survey_time">
100
+ <input type="text" v-show="false" v-model="$refs.surveytime.value" >
101
+ <datepicker id="f_survey_time" width="200.72px;" v-ref:surveytime
102
+ :value.sync="model.f_survey_time"
103
+ :disabled-days-of-Week="[]"
104
+ :format="'yyyy-MM-dd'"
105
+ v-model="model.f_survey_time"
106
+ readonly="readonly"
107
+ :disabled="edit ? false : 'disabled'">
108
+ </datepicker>
109
+ </div>
110
+ </div>
111
+ <div class="form-group col-sm-4">
112
+ <div class="col-sm-3"></div>
113
+ <div class="col-sm-6">
114
+ <input type="checkbox" class="" id="checkbox" v-model="model.f_isdesign"
115
+ :disabled="edit ? false : 'disabled'">
116
+ <label for="checkbox" class="font-size">是否设计出图</label>
117
+ </div>
118
+ </div>
119
+ </div>
120
+ <div class="from-group col-sm-11">
121
+ <div class="col-sm-4">
122
+ <label for="f_application_type" class=" col-sm-6 control-label">申请类别:</label>
123
+ <input type="radio" id="one" value="设计" v-model="model.f_application_type":disabled="edit ? false : 'disabled'">
124
+ <label for="one" class="font-size">设计</label>
125
+ <input type="radio" id="two" value="测绘" v-model="model.f_application_type" :disabled="edit ? false : 'disabled'">
126
+ <label for="two" class="font-size">测绘</label>
127
+ </div>
128
+ </div>
129
+ <div class="from-group col-sm-11">
130
+ <div class="form-group col-sm-4">
131
+ <label for="f_design_cycle" class=" col-sm-6 control-label">设计周期:</label>
132
+ <div class="col-sm-6" id="f_design_cycle">
133
+ <input class="form-control" type="text" v-model="model.f_design_cycle" :readonly="edit ? false : 'readonly'">
134
+ </div>
135
+ </div>
136
+ <div class="form-group col-sm-4">
137
+ <label for="f_design_start_date" class=" col-sm-6 control-label">设计派工日期:</label>
138
+ <div class="col-sm-6" id="f_design_start_date">
139
+ <datepicker
140
+ :value.sync="model.f_design_start_date"
141
+ :format="'yyyy-MM-dd'"
142
+ v-model="model.f_design_start_date"
143
+ :show-reset-button="reset"
144
+ readonly="readonly">
145
+ </datepicker>
146
+ </div>
147
+ </div>
148
+ <div class="form-group col-sm-4">
149
+ <label for="f_design_end_date" class=" col-sm-6 control-label">设计完成日期:</label>
150
+ <div class="col-sm-6" id="f_design_end_date">
151
+ <datepicker width="600.76px;"
152
+ :value.sync="model.f_design_end_date"
153
+ :format="'yyyy-MM-dd'"
154
+ v-model="model.f_design_end_date"
155
+ :show-reset-button="reset" readonly="readonly">
156
+ </datepicker>
157
+ </div>
158
+ </div>
159
+ </div>
160
+ <div class="from-group col-sm-11">
161
+ <div class="form-group col-sm-4">
162
+ <label for="f_designer" class=" col-sm-6 control-label">图纸设计人:</label>
163
+ <div class="col-sm-6" id="f_designer">
164
+ <input class="form-control" type="text" v-model="model.f_designer" :readonly="edit ? false : 'readonly'">
165
+ </div>
166
+ </div>
167
+ <div class="form-group col-sm-4">
168
+ <label for="f_design_unit" class=" col-sm-6 control-label">图纸审计单位:</label>
169
+ <div class="col-sm-6" id="f_design_unit">
170
+ <input class="form-control" type="text" v-model="model.f_design_unit" :readonly="edit ? false : 'readonly'">
171
+ </div>
172
+ </div>
173
+ <div class="form-group col-sm-4">
174
+ <label for="f_design_check_name" class=" col-sm-6 control-label">图纸审核人:</label>
175
+ <div class="col-sm-6" id="f_design_check_name">
176
+ <input class="form-control" type="text" v-model="model.f_design_check_name" :readonly="edit ? false : 'readonly'">
177
+ </div>
178
+ </div>
179
+ </div>
180
+ <div class="form-group col-sm-11">
181
+ <label class="col-sm-2" for="f_survey_remarks">勘查意见:</label>
182
+ <div class="col-sm-10" id="f_survey_remarks">
183
+ <textarea class="form-control" v-model="model.f_survey_remarks" rows="3"
184
+ :readonly="edit ? false : 'readonly'">
185
+ </textarea>
186
+ </div>
187
+ </div>
188
+ <div class="from-group col-sm-11">
189
+ <div class="form-group col-sm-12">
190
+ <label class="col-sm-2" for="f_design_remarks">设计出图说明:</label>
191
+ <div class="col-sm-10" id="f_design_remarks">
192
+ <textarea class="form-control" rows="3" v-model="model.f_design_remarks"
193
+ :readonly="edit ? false : 'readonly'">
194
+ </textarea>
195
+ </div>
196
+ </div>
197
+ </div>
198
+ <div class="form-group col-sm-11">
199
+ <div class="form-group col-sm-6">
200
+ <label for="f_survey_departmen" class=" col-sm-4 control-label">部门:</label>
201
+ <div class="col-sm-6" id="f_survey_departmen">
202
+ <input class="form-control" type="text" v-model="model.f_apply_department" disabled>
203
+ </div>
204
+ </div>
205
+ <div class="form-group col-sm-6">
206
+ <label for="f_survey_operator" class="col-sm-6 control-label">执行人:</label>
207
+ <div class="col-sm-6" id="f_survey_operator">
208
+ <input class="form-control" type="text" v-model="model.f_apply_operator" disabled>
209
+ </div>
210
+ </div>
211
+ </div>
212
+ <div class="form-group col-sm-11">
213
+ <div class="form-group col-sm-6">
214
+ <label class=" col-sm-4 control-label" for="f_filiale">分公司:</label>
215
+ <div class="col-sm-6" id="f_filiale">
216
+ <input class="form-control" type="text" v-model="model.f_filiale" disabled>
217
+ </div>
218
+ </div>
219
+ <div class="form-group col-sm-6">
220
+ <label class=" col-sm-6 control-label">操作日期:</label>
221
+ <div class="col-sm-6" id="f_survey_date">
222
+ <input class="form-control" type="text" v-model="model.f_survey_date" disabled>
223
+ </div>
224
+ </div>
225
+ </div>
226
+ </form>
227
+ </validator>
228
+ <div class="from-group col-sm-11" v-show="edit">
229
+ <center>
230
+ <button type="button" @click="confirm()" class="btn btn-primary" style="width:80px; margin-left:40px;" >
231
+ 保存
232
+ </button>
233
+ <button type="button" @click="commit()" class="btn btn-primary" style="width:80px; margin-left:40px;">
234
+ 提交
235
+ </button>
236
+ <button type="button" @click="reset()" class="btn btn-warning" style="width:80px; margin-left:40px;">
237
+ 取消
238
+ </button>
239
+ </center>
240
+ </div>
241
+ </div>
242
+ <place-controler-print v-if="showPrint" :show="showPrint"></place-controler-print>
243
+ </template>
244
+ <script>
245
+ import co from 'co'
246
+ import {HttpResetClass} from 'vue-client'
247
+ import * as Util from '../../../../Util'
248
+ let gen = function* (self, val) {
249
+ let data = {
250
+ tablename: 't_apply',
251
+ parameters: val
252
+ }
253
+ yield self.$resetpost('rs/logic/save', {data: data})
254
+ data = {
255
+ model: {
256
+ f_processid: self.selectdata.f_process_id,
257
+ },
258
+ loginUser: {
259
+ id: self.$login.f.id,
260
+ name: self.$login.f.name,
261
+ ename: self.$login.f.ename
262
+ },
263
+ employeetemplate: self.employeetemplate,// 指派勘察人员
264
+ subdep: '提交'
265
+ }
266
+ self.$resetpost(`rs/logic/grantnext`,
267
+ {data: data})
268
+ .then(() => {
269
+ self.reset()
270
+ })
271
+ }
272
+ export default {
273
+ title: '测试设计',
274
+ data() {
275
+ return {
276
+ fgastype: this.$appdata.getParam('用气类型'),
277
+ completiontime: this.$appdata.getParam('完成时间'),
278
+ employees: [], // 部门人员数组
279
+ employeetemplate: '', // 选定部门人员
280
+ model: {
281
+ f_filiale: this.$login.f.f_filiale,
282
+ f_survey_date: Util.toStandardTimeString(),
283
+ f_survey_department: this.$login.f.f_parentname,
284
+ f_survey_operator: this.$login.f.name
285
+ },
286
+ pattern: '/^[+]{0,1}(\\d+)$|^[+]{0,1}(\\d+\\.\\d+)$/',
287
+ showPrint: false
288
+ }
289
+ },
290
+ props: ['selectdata','edit'],
291
+ ready() {
292
+ this.selectdata.f_gas_type = this.selectdata.f_gas_type ? [this.selectdata.f_gas_type] : this.model.f_gas_type
293
+ this.model = Object.assign({}, this.model, this.selectdata)
294
+ },
295
+ methods: {
296
+ // 获取部门领导角色
297
+ async loademployees() {
298
+ let http = new HttpResetClass()
299
+ if (this.selectdata.actdefid != '1') {
300
+ await http.load('POST', 'rs/sql/apply_singleTable', {
301
+ data: {
302
+ tablename: 't_actorperson',
303
+ condition: " userseq='" + this.$login.f.id + "' order by id desc"
304
+ }
305
+ }, {resolveMsg: null, rejectMsg: "角色人员是(登陆人)信息查询失败"}, {silent: true})
306
+ .then((res) => {
307
+ console.log("取得部门领导的角色" + res.data[0].actorid)
308
+ 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("组长"))) {
309
+ let loaderstr = res.data[0].actorid.substring(2, res.data[0].actorid.length - 1)
310
+ this.temploader = loaderstr
311
+ // 如果是退回的就用已经的人员,保证下发的是同一个人
312
+ this.toemployees()
313
+ let loademployeestr = null
314
+ if (loaderstr.includes("部门")) {
315
+ loademployeestr = 'R(' + loaderstr.split("部门")[0] + '部门人员)'
316
+ } else if (loaderstr.includes("部")) {
317
+ loademployeestr = 'R(' + loaderstr.split("部")[0] + '部人员)'
318
+ } else if (loaderstr.includes("组长")) {
319
+ loademployeestr = 'R(' + loaderstr.split("组长")[0] + '人员)'
320
+ }
321
+ console.log(loademployeestr)
322
+ let http2 = new HttpResetClass()
323
+ http2.load('POST', 'rs/sql/apply_singleTable', {
324
+ data: {
325
+ tablename: 't_role',
326
+ condition: " name='" + loademployeestr.substring(2, loademployeestr.length - 1) + "'"
327
+ // condition: " name='" + loaderstr.split("部")[0] + '部人员' + "'"
328
+ }
329
+ }, {resolveMsg: null, rejectMsg: "角色人员(部门人员)id信息查询失败"}, {silent: true}).then((res) => {
330
+ console.log("取得角色人员(部门人员)id" + JSON.stringify(res.data[0].id))
331
+ let strid = res.data[0].id
332
+ let http3 = new HttpResetClass()
333
+ http3.load('POST', 'rs/sql/apply_singleTable', {
334
+ data: {
335
+ tablename: 't_user',
336
+ condition: "roles like '%" + strid + "%'"
337
+ }
338
+ }, {resolveMsg: null, rejectMsg: "角色人员(部门人员)信息查询失败"}, {silent: true}).then((res) => {
339
+ console.log("角色人员(部门人员)信息成功")
340
+ for (var i = 0; i < res.data.length; i++) {
341
+ this.employees.push({lable: res.data[i].name, value: res.data[i].name})
342
+ }
343
+ })
344
+ })
345
+ }
346
+ })
347
+ }
348
+ },
349
+ confirm() {
350
+ //判断当前节点的状态(开始活动/完工)
351
+ this.$resetpost('rs/sql/findProcessState', {data: {actid:this.selectdata.actid}}, {
352
+ resolveMsg: null,
353
+ rejectMsg: '提交错误!'
354
+ }).then((res) => {
355
+ if (res.data[0].state != '开始活动') {
356
+ this.$showMessage("该节点信息已在别处提交,请刷新!")
357
+ this.reset()
358
+ } else {
359
+ //通过数据校验再进行下一步判断
360
+ if (this.verification()) {
361
+ let data = {
362
+ tablename: 't_apply',
363
+ parameters: this.model
364
+ }
365
+ this.$resetpost('rs/logic/save', {data: data})
366
+ .then(() => {
367
+ this.reset()
368
+ })
369
+ }
370
+ }
371
+ })
372
+
373
+ },
374
+ commit() {
375
+ debugger
376
+ console.log("edit>>>>>",)
377
+ //判断当前节点的状态(开始活动/完工)
378
+ var entryName = this.model.f_entry_name //项目名称
379
+ var ename = this.selectdata.f_entry_name
380
+ this.$resetpost('rs/sql/findProcessState', {data: {actid:this.selectdata.actid}}, {
381
+ resolveMsg: null,
382
+ rejectMsg: '提交错误!'
383
+ }).then((res) => {
384
+ if (res.data[0].state != '开始活动') {
385
+ this.$showMessage("该节点信息已在别处提交,请刷新!")
386
+ this.reset()
387
+ } else {
388
+ //通过数据校验再进行下一步判断
389
+ if (this.verification()) {
390
+ if(name == null){
391
+ //项目名称唯一性判断
392
+ this.$resetpost('rs/sql/findByEntryName', {data: {entryName: entryName}}, {
393
+ resolveMsg: null,
394
+ rejectMsg: '提交错误!'
395
+ }).then((res) => {
396
+ if (res.data.length > 0) {
397
+ this.$showMessage("项目名称不能重复!")
398
+ } else {
399
+ let getGen = gen(this, this.model)
400
+ co(getGen)
401
+ }
402
+ })
403
+ }else{
404
+ let getGen = gen(this, this.model)
405
+ co(getGen)
406
+ }
407
+ }
408
+ }
409
+ })
410
+ },
411
+ //数据校验
412
+ verification() {
413
+ var isNum = /^(([+]?\d*$)|(^[+]?\d+(\.\d+)?$))/ //非负纯数字
414
+ var regex = /.*?[\u4e00-\u9fa5].*?[\u4e00-\u9fa5].*/ //至少两个汉字
415
+ var phoneReg = /^1([38][0-9]|4[579]|5[0-3,5-9]|6[6]|7[0135678]|9[89])\d{8}$/ //手机号码正则
416
+ var telReg = /0\d{2,3}-\d{7,8}/ //座机正则
417
+ if (!this.model.f_entry_name) {
418
+ this.$showMessage("项目名称不能为空!")
419
+ return false
420
+ }
421
+ if (!this.model.f_install_num) {
422
+ this.$showMessage("设计户数不能为空!")
423
+ return false
424
+ } else if (!isNum.test(this.model.f_install_num)) {
425
+ this.$showMessage("设计户数格式错误!")
426
+ return false
427
+ }
428
+ if (!this.model.f_total_households) {
429
+ this.$showMessage("总户数不能为空!")
430
+ return false
431
+ } else if (!isNum.test(this.model.f_total_households)) {
432
+ this.$showMessage("总户数格式错误!")
433
+ return false
434
+ }
435
+ if (!this.model.f_register_households) {
436
+ this.$showMessage("已登记户数不能为空!")
437
+ return false
438
+ } else if (!isNum.test(this.model.f_register_households)) {
439
+ this.$showMessage("已登记户数格式错误!")
440
+ return false
441
+ }
442
+ if (!this.model.f_completion_households) {
443
+ this.$showMessage("已完成户数不能为空!")
444
+ return false
445
+ } else if (!isNum.test(this.model.f_completion_households)) {
446
+ this.$showMessage("已完成户数格式错误!")
447
+ return false
448
+ }
449
+ if (!this.model.f_survey_name) {
450
+ this.$showMessage("勘查人员不能为空!")
451
+ return
452
+ } else if (!regex.test(this.model.f_survey_name.trim())) {
453
+ this.$showMessage("勘查人员请至少输入两个汉字!")
454
+ return false
455
+ }
456
+ if (!this.model.f_market_person) {
457
+ this.$showMessage("市场开发部项目负责人不能为空!")
458
+ return
459
+ } else if (!regex.test(this.model.f_market_person.trim())) {
460
+ this.$showMessage("市场开发部项目负责人请至少输入两个汉字!")
461
+ return false
462
+ }
463
+ if (!this.model.f_customer_contact) {
464
+ this.$showMessage("客户联系人不能为空!")
465
+ return
466
+ } else if (!regex.test(this.model.f_customer_contact.trim())) {
467
+ this.$showMessage("客户联系人请至少输入两个汉字!")
468
+ return false
469
+ }else if(!this.model.f_contact){
470
+ this.$showMessage("联系电话不能为空!")
471
+ return false
472
+ }else if(!telReg.test(this.model.f_contact) && !phoneReg.test(this.model.f_contact)){
473
+ this.$showMessage("联系电话格式错误!")
474
+ return
475
+ }
476
+ if (!this.model.f_designer) {
477
+ this.$showMessage("图纸设计人不能为空!")
478
+ return
479
+ } else if (!regex.test(this.model.f_designer.trim())) {
480
+ this.$showMessage("图纸设计人请至少输入两个汉字!")
481
+ return false
482
+ }
483
+ if (!this.model.f_design_check_name) {
484
+ this.$showMessage("图纸审核人不能为空!")
485
+ return
486
+ } else if (!regex.test(this.model.f_design_check_name.trim())) {
487
+ this.$showMessage("图纸审核人请至少输入两个汉字!")
488
+ return false
489
+ }
490
+ if(!this.model.f_survey_time){
491
+ this.$showMessage("勘查日期不能为空!")
492
+ return false
493
+ }
494
+ if(!this.model.f_design_cycle){
495
+ this.$showMessage("设计周期不能为空!")
496
+ return false
497
+ }
498
+ if(!this.model.f_design_start_date){
499
+ this.$showMessage("设计派工日期不能为空!")
500
+ return false
501
+ }
502
+ if(!this.model.f_design_end_date){
503
+ this.$showMessage("设计完成日期不能为空!")
504
+ return false
505
+ }
506
+ if(!this.model.f_design_unit){
507
+ this.$showMessage("图纸审计单位不能为空!")
508
+ return false
509
+ }
510
+ if(!this.model.f_application_type){
511
+ this.$showMessage("请选择申请类别!")
512
+ return false
513
+ }
514
+ if(!this.model.f_completion_time){
515
+ this.$showMessage("完成时间不能为空!")
516
+ return false
517
+ }
518
+ return true
519
+
520
+ },
521
+ reset() {
522
+ this.$dispatch('close')
523
+ this.$dispatch('selfsearch')
524
+ },
525
+ setselect() {
526
+ this.selectdata.f_gas_type = this.selectdata.f_gas_type ? this.selectdata.f_gas_type : this.model.f_gas_type
527
+ this.model = Object.assign({}, this.model, this.selectdata)
528
+ this.model.f_survey_date = this.$login.toStandardDateString()
529
+ this.model.f_survey_department = this.$login.f.f_parentname
530
+ this.model.f_survey_operator = this.$login.f.name
531
+ }
532
+ },
533
+ events: {
534
+ },
535
+ watch: {}
536
+ }
537
+ </script>