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