Explorar el Código

Merge branch 'gyj' of SH-Arbitrate/miniapp into dev

gaogaoyujie hace 2 años
padre
commit
b4540c687b

+ 421
- 183
pages/handlecase/component/newlyAddedCase.vue Ver fichero

@@ -15,16 +15,6 @@
15 15
 					:rules="[{required: true,errorMessage: '事实和理由不能为空'}]">
16 16
 					<uni-easyinput v-model="formData.facts" type="textarea" placeholder="请输入事实和理由" />
17 17
 				</uni-forms-item>
18
-				<!-- <uni-forms-item label="案件标的:" name="caseSubjectAmount" label-width="120px" required
19
-				:rules="[{required: true,errorMessage: '案件标的不能为空'}]"
20
-				>
21
-					<uni-easyinput v-model="formData.caseSubjectAmount" type="text" placeholder="请输入案件标的" />
22
-				</uni-forms-item>
23
-				<uni-forms-item label="模板:" name="templateId" label-width="120px" required 
24
-				:rules="[{required: true,errorMessage: '模板不能为空'}]"
25
-				>
26
-					<uni-data-select :localdata="templateList" v-model="formData.templateId"></uni-data-select>
27
-				</uni-forms-item> -->
28 18
 				<uni-forms-item label="申请人案件证据资料上传:" name="headImage" label-width="120px">
29 19
 					<uni-file-picker ref="files" file-mediatype="all" return-type='object' v-model="fileList"
30 20
 						:auto-upload="false" @select="select" :limit='1' />
@@ -41,111 +31,161 @@
41 31
 							:text="item.annexName"></uni-link>
42 32
 					</view>
43 33
 				</uni-forms-item>
44
-				<uni-section title="双方信息" type="line" padding></uni-section>
45 34
 				<uni-forms-item label="选择机构或自然人" label-width="120px" name="objectiJuris">
46 35
 					<uni-data-checkbox class='checkbox' :disabled="ids?true:false" :localdata="objectiJurisArr"
47
-						v-model="formData.affiliate.organizeFlag" @change='clearValidate'></uni-data-checkbox>
48
-				</uni-forms-item>
49
-				<!-- <uni-section title="申请人" type="line" padding></uni-section> -->
50
-				<uni-forms-item :label="formData.affiliate.organizeFlag==0 ? '申请人':'申请机构'" :rules="rulesappName"
51
-					name="affiliate.applicationName" label-width="120px" required>
52
-					<uni-easyinput v-model="formData.affiliate.applicationName" :disabled="disabledApplicat" type="text"
53
-						:placeholder="formData.affiliate.organizeFlag==0 ? '请输入申请人姓名':'请输入申请机构名称'" />
54
-				</uni-forms-item>
55
-				<uni-forms-item label="证件类型" label-width="120px" v-if="formData.affiliate.organizeFlag==0">
56
-					 <uni-data-select
57
-							v-model="formData.affiliate.idType"
58
-					        :localdata="certificate"
59
-							@change="changeDocment"	
60
-							:disabled="true"
61
-					      ></uni-data-select>
62
-				</uni-forms-item>
63
-				<uni-forms-item label="国籍" label-width="120px">
64
-					 <uni-data-select
65
-							v-model="formData.affiliate.nationality"
66
-					        :localdata="nationality"
67
-							:disabled="formData.affiliate.organizeFlag==0"
68
-					      ></uni-data-select>
69
-				</uni-forms-item>
70
-				<uni-forms-item :label="formData.affiliate.organizeFlag==0 ? '证件号码':'机构代码'" name="affiliate.code"
71
-					label-width="120px" required :rules="rulesappNo">
72
-					<uni-easyinput v-model="formData.affiliate.code" :disabled="disabledApplicat" type="text"
73
-						:placeholder="formData.affiliate.organizeFlag==0 ? '请输入证件号码':'请输入统一社会代码'" />
74
-				</uni-forms-item>
75
-				<uni-forms-item label="申请人邮箱:" v-if="formData.affiliate.organizeFlag==0"
76
-					name="affiliate.applicationEmail" label-width="120px" required>
77
-					<uni-easyinput v-model="formData.affiliate.applicationEmail" :disabled="disabledApplicat"
78
-						type="text" placeholder="请输入申请人邮箱" />
79
-				</uni-forms-item>
80
-				<uni-forms-item label="申请人电话:" v-if="formData.affiliate.organizeFlag==0"
81
-					name="affiliate.applicationPhone" label-width="120px" required>
82
-					<uni-easyinput v-model="formData.affiliate.applicationPhone" :disabled="disabledApplicat"
83
-						type="text" placeholder="请输入申请人电话" />
84
-				</uni-forms-item>
85
-				<uni-forms-item label="法定代表人:" v-if="formData.affiliate.organizeFlag==1"
86
-					name="affiliate.compLegalPerson" label-width="120px" required>
87
-					<uni-easyinput v-model="formData.affiliate.compLegalPerson" type="text" placeholder="请输入法定代表人" />
88
-				</uni-forms-item>
89
-				<uni-forms-item label="申请人住所:" name="affiliate.applicantHome" label-width="120px" required
90
-					:rules="[{required: true,errorMessage: '申请人住所不能为空'}]">
91
-					<uni-easyinput v-model="formData.affiliate.applicantHome" type="text" placeholder="请输入申请人住所" />
92
-				</uni-forms-item>
93
-				<uni-forms-item label="申请人联系地址:" name="affiliate.applicantAddress" label-width="120px" required
94
-					:rules="[{required: true,errorMessage: '申请人联系地址不能为空'}]">
95
-					<uni-easyinput v-model="formData.affiliate.applicantAddress" type="text" placeholder="请输入申请人联系地址" />
96
-				</uni-forms-item>
97
-				<uni-section title="代理人" type="line" padding></uni-section>
98
-				<uni-forms-item label="代理人联系电话:" label-width="120px">
99
-					<uni-easyinput v-model="formData.affiliate.contactTelphoneAgent" :disabled="disabledVal" type="text"
100
-						placeholder="请输入代理人联系电话" />
101
-				</uni-forms-item>
102
-				<uni-forms-item label="代理人姓名:" label-width="120px">
103
-					<uni-easyinput v-model="formData.affiliate.nameAgent" :disabled="disabledVal" type="text"
104
-						placeholder="请输入委托代理人姓名" />
105
-				</uni-forms-item>
106
-				<uni-forms-item label="代理人邮箱:" label-width="120px">
107
-					<uni-easyinput v-model="formData.affiliate.agentEmail" :disabled="disabledVal" type="text"
108
-						placeholder="请输入代理人邮箱" />
109
-				</uni-forms-item>
110
-				<uni-section title="被申请人" type="line" padding></uni-section>
111
-				<uni-forms-item label="被申请人姓名:" name="affiliate.respondentName" label-width="120px" required
112
-					:rules="[{required: true,errorMessage: '被申请人姓名不能为空'}]">
113
-					<uni-easyinput v-model="formData.affiliate.respondentName" type="text" placeholder="请输入被申请人姓名" />
114
-				</uni-forms-item>
115
-				<uni-forms-item label="被申请人联系电话:" name="affiliate.respondentPhone" label-width="120px" required :rules="[
116
-					{required: true,errorMessage: '被申请人联系电话不能为空'},
117
-					{pattern:'^[1][3,4,5,6,7,8,9][0-9]{9}$',errorMessage:'被申请人联系电话格式不正确'}
118
-					]">
119
-					<uni-easyinput v-model="formData.affiliate.respondentPhone" type="text" placeholder="请输入被申请人联系电话" />
120
-				</uni-forms-item>
121
-				<uni-forms-item label="被申请人身份证号:" name="affiliate.respondentIdentityNum" label-width="120px" required
122
-					:rules="[
123
-					{required: true,errorMessage: '被申请人身份证号不能为空'},
124
-					{pattern:'^[1-9]\\d{5}(18|19|([23]\\d))\\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\\d{3}[0-9Xx]$',errorMessage:'被申请人身份证格式错误'}
125
-					
126
-					]">
127
-					<uni-easyinput v-model="formData.affiliate.respondentIdentityNum" @blur="handleBlur" type="text"
128
-						placeholder="请输入被申请人身份证号" />
129
-				</uni-forms-item>
130
-				<uni-forms-item label="被申请人性别" label-width="120px" required>
131
-					<uni-data-checkbox class='checkbox' :disabled='true' v-model="formData.affiliate.respondentSex"
132
-						:localdata="respondentSexy"></uni-data-checkbox>
133
-				</uni-forms-item>
134
-				<uni-forms-item label="被申请人出生年月日" label-width="120px">
135
-					<uni-datetime-picker v-model="formData.affiliate.respondentBirth" :disabled='true' type="date"
136
-						:clear-icon="false" />
137
-				</uni-forms-item>
138
-				<uni-forms-item label="被申请人住所:" name="affiliate.respondentHome" label-width="120px" required
139
-					:rules="[{required: true,errorMessage: '被申请人住所不能为空'}]">
140
-					<uni-easyinput v-model="formData.affiliate.respondentHome" type="text" placeholder="请输入被申请人住所" />
141
-				</uni-forms-item>
142
-				<uni-forms-item label="被申请人邮箱:" name="affiliate.respondentEmail" label-width="120px" required :rules="[
143
-					{required: true,errorMessage: '被申请人邮箱不能为空'},
144
-					{pattern:'^\\S+?@\\S+?\\.\\S+?$',errorMessage:'邮箱格式不正确'}
145
-					
146
-					]">
147
-					<uni-easyinput v-model="formData.affiliate.respondentEmail" type="text" placeholder="请输入被申请人邮箱" />
36
+						v-model="formData.organizeFlag" @change='clearValidate'></uni-data-checkbox>
148 37
 				</uni-forms-item>
38
+				<button type="primary" @click="addMultiple" style="margin-bottom: 20px;">新增多个信息</button>
39
+				<view v-for="(item ,index ) in formData.affiliate" :key="index">
40
+					<button class="mini-btn" type="primary" size="mini" @tap="delValue(index)" v-if="delShow">删除</button>
41
+					<uni-section :title="'双方信息' + (index + 1)" type="line" padding></uni-section>
42
+						<uni-forms-item label="是否操作人" label-width="120px">
43
+							 <uni-data-checkbox
44
+									v-model="formData.affiliate[index].applicant.operatorFlag"
45
+							        :localdata="isOperate"
46
+							      ></uni-data-checkbox>
47
+						</uni-forms-item>
48
+						<uni-forms-item :label="formData.organizeFlag==0 ? '申请人':'申请机构'" :rules="rulesPersonName" 
49
+						:name="['affiliate',index,'applicant','name']" label-width="120px" required>
50
+							<uni-easyinput v-model="formData.affiliate[index].applicant.name"  type="text"
51
+								:placeholder="formData.organizeFlag==0 ? '请输入申请人姓名':'请输入申请机构名称'" />
52
+						</uni-forms-item>
53
+						<uni-forms-item label="证件类型" label-width="120px" v-if="formData.organizeFlag==0">
54
+							 <uni-data-select
55
+									v-model="formData.affiliate[index].applicant.idType"
56
+							        :localdata="certificate"
57
+									@change="changeDocment"	
58
+							      ></uni-data-select>
59
+						</uni-forms-item>
60
+						<uni-forms-item label="地区" label-width="120px">
61
+							 <uni-data-select
62
+									v-model="formData.affiliate[index].applicant.nationality"
63
+							        :localdata="nationality"
64
+									@change="changeArea"
65
+									
66
+							      ></uni-data-select>
67
+						</uni-forms-item>
68
+						
69
+							<uni-forms-item key = 'code'  v-if="formData.organizeFlag==1" label="机构代码" required label-width="120px" :name="['affiliate',index,'applicant','code']" :rules="[{required: true,errorMessage: '机构代码不能为空'}]">
70
+								<uni-easyinput v-model="formData.affiliate[index].applicant.code"  type="text"
71
+									placeholder="请输入统一社会代码" />
72
+							</uni-forms-item>
73
+						
74
+						
75
+							<uni-forms-item label="证件号码" key = 'idCard' v-if="formData.organizeFlag==0" :name="['affiliate',index,'applicant','idCard']"
76
+									label-width="120px" required :rules="[
77
+							{required: true,errorMessage: '申请人身份证号不能为空'},
78
+							{pattern:'^[1-9]\\d{5}(18|19|([23]\\d))\\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\\d{3}[0-9Xx]$',errorMessage:'申请人身份证格式错误'}]">
79
+									<uni-easyinput v-model="formData.affiliate[index].applicant.idCard"  type="text"
80
+										placeholder="请输入证件号码" />
81
+								</uni-forms-item>
82
+						
83
+						<uni-forms-item label="申请人邮箱:" key="email" v-if="formData.organizeFlag==0"
84
+							:name="['affiliate',index,'applicant','email']" label-width="120px" required :rules="[
85
+							{required: true,errorMessage: '被申请人邮箱不能为空'},
86
+							{pattern:'^\\S+?@\\S+?\\.\\S+?$',errorMessage:'邮箱格式不正确'}
87
+							]">
88
+							<uni-easyinput v-model="formData.affiliate[index].applicant.email" 
89
+								type="text" placeholder="请输入申请人邮箱" />
90
+						</uni-forms-item>
91
+						<uni-forms-item label="申请人电话:" key="phone" v-if="formData.organizeFlag==0"
92
+							:name="['affiliate',index,'applicant','phone']" label-width="120px" :required="testVerify" :rules="rulesRespondentPhone">
93
+							<uni-easyinput v-model="formData.affiliate[index].applicant.phone" 
94
+								type="text" placeholder="请输入申请人电话" />
95
+						</uni-forms-item>
96
+						<uni-forms-item label="法定代表人:" v-if="formData.organizeFlag==1"
97
+							:name="['affiliate',index,'applicant','compLegalPerson']" key="compLegalPerson" label-width="120px" required :rules="[{required: true,errorMessage: '法定代表人不能为空'}]">
98
+							<uni-easyinput v-model="formData.affiliate[index].applicant.compLegalPerson" type="text" placeholder="请输入法定代表人" />
99
+						</uni-forms-item>
100
+						<uni-forms-item label="申请人住所:" :name="['affiliate',index,'applicant','home']" label-width="120px" required
101
+							:rules="[{required: true,errorMessage: '申请人住所不能为空'}]">
102
+							<uni-easyinput v-model="formData.affiliate[index].applicant.home" type="text" placeholder="请输入申请人住所" />
103
+						</uni-forms-item>
104
+						<uni-forms-item label="申请人联系地址:" :name="['affiliate',index,'applicant','address']" label-width="120px" required
105
+							:rules="[{required: true,errorMessage: '申请人联系地址不能为空'}]">
106
+							<uni-easyinput v-model="formData.affiliate[index].applicant.address" type="text" placeholder="请输入申请人联系地址" />
107
+						</uni-forms-item>
108
+						<uni-section title="申请代理人" type="line" padding></uni-section>
109
+						<uni-forms-item label="是否操作人" label-width="120px">
110
+							 <uni-data-checkbox
111
+									v-model="formData.affiliate[index].applicantAgent.operatorFlag"
112
+							        :localdata="isProxyApplicant"
113
+							      ></uni-data-checkbox>
114
+						</uni-forms-item>
115
+						<uni-forms-item label="代理人联系电话:" label-width="120px">
116
+							<uni-easyinput v-model="formData.affiliate[index].applicantAgent.phone"  type="text"
117
+								placeholder="请输入代理人联系电话" />
118
+						</uni-forms-item>
119
+						<uni-forms-item label="代理人姓名:" label-width="120px">
120
+							<uni-easyinput v-model="formData.affiliate[index].applicantAgent.name"  type="text"
121
+								placeholder="请输入委托代理人姓名" />
122
+						</uni-forms-item>
123
+						<uni-forms-item label="代理人邮箱:" label-width="120px">
124
+							<uni-easyinput v-model="formData.affiliate[index].applicantAgent.email"  type="text"
125
+								placeholder="请输入代理人邮箱" />
126
+						</uni-forms-item>
127
+						<uni-section title="被申请人" type="line" padding></uni-section>
128
+						<uni-forms-item label="是否操作人" label-width="120px">
129
+							 <uni-data-checkbox
130
+									v-model="formData.affiliate[index].res.operatorFlag"
131
+							        :localdata="isRespondent"
132
+							      ></uni-data-checkbox>
133
+						</uni-forms-item>
134
+						<uni-forms-item label="被申请人姓名:" :name="['affiliate',index,'res','name']" label-width="120px" required
135
+							:rules="[{required: true,errorMessage: '被申请人姓名不能为空'}]">
136
+							<uni-easyinput v-model="formData.affiliate[index].res.name" type="text" placeholder="请输入被申请人姓名" />
137
+						</uni-forms-item>
138
+						<uni-forms-item label="被申请人联系电话:" :name="['affiliate',index,'res','phone']" label-width="120px" :required="testVerify" :rules="rulesRespondentPhone">
139
+							<uni-easyinput v-model="formData.affiliate[index].res.phone" type="text" placeholder="请输入被申请人联系电话" />
140
+						</uni-forms-item>
141
+						<uni-forms-item label="被申请人身份证号:" :name="['affiliate',index,'res','idCard']" label-width="120px" required
142
+							:rules="[
143
+							{required: true,errorMessage: '被申请人身份证号不能为空'},
144
+							{pattern:'^[1-9]\\d{5}(18|19|([23]\\d))\\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\\d{3}[0-9Xx]$',errorMessage:'被申请人身份证格式错误'}
145
+							
146
+							]">
147
+							<uni-easyinput v-model="formData.affiliate[index].res.idCard" @blur="handleBlur(index)" type="text"
148
+								placeholder="请输入被申请人身份证号" />
149
+						</uni-forms-item>
150
+						<uni-forms-item label="被申请人性别" label-width="120px" required>
151
+							<uni-data-checkbox class='checkbox' :disabled='true' v-model="formData.affiliate[index].res.sex"
152
+								:localdata="respondentSexy"></uni-data-checkbox>
153
+						</uni-forms-item>
154
+						<uni-forms-item label="被申请人出生年月日" label-width="120px">
155
+							<uni-datetime-picker v-model="formData.affiliate[index].res.birth" :disabled='true' type="date"
156
+								:clear-icon="false" />
157
+						</uni-forms-item>
158
+						<uni-forms-item label="被申请人住所:" :name="['affiliate',index,'res','home']" label-width="120px" required
159
+							:rules="[{required: true,errorMessage: '被申请人住所不能为空'}]">
160
+							<uni-easyinput v-model="formData.affiliate[index].res.home" type="text" placeholder="请输入被申请人住所" />
161
+						</uni-forms-item>
162
+						<uni-forms-item label="被申请人邮箱:" :name="['affiliate',index,'res','email']" label-width="120px" required :rules="[
163
+							{required: true,errorMessage: '被申请人邮箱不能为空'},
164
+							{pattern:'^\\S+?@\\S+?\\.\\S+?$',errorMessage:'邮箱格式不正确'}
165
+							
166
+							]">
167
+							<uni-easyinput v-model="formData.affiliate[index].res.email" type="text" placeholder="请输入被申请人邮箱" />
168
+						</uni-forms-item>
169
+						<uni-section title="被申请代理人" type="line" padding></uni-section>
170
+						<uni-forms-item label="是否操作人" label-width="120px">
171
+							 <uni-data-checkbox
172
+									v-model="formData.affiliate[index].resAgent.operatorFlag"
173
+							        :localdata="isResApplicant"
174
+							      ></uni-data-checkbox>
175
+						</uni-forms-item>
176
+						<uni-forms-item label="代理人联系电话:" label-width="120px">
177
+							<uni-easyinput v-model="formData.affiliate[index].resAgent.phone"  type="text"
178
+								placeholder="请输入代理人联系电话" />
179
+						</uni-forms-item>
180
+						<uni-forms-item label="代理人姓名:" label-width="120px">
181
+							<uni-easyinput v-model="formData.affiliate[index].resAgent.name"  type="text"
182
+								placeholder="请输入委托代理人姓名" />
183
+						</uni-forms-item>
184
+						<uni-forms-item label="代理人邮箱:" label-width="120px">
185
+							<uni-easyinput v-model="formData.affiliate[index].resAgent.email"  type="text"
186
+								placeholder="请输入代理人邮箱" />
187
+						</uni-forms-item>
188
+				</view>	
149 189
 			</uni-forms>
150 190
 			<view class="determine" style="text-align: center;">
151 191
 				<button class="mini-btn" type="primary" size="mini" @tap="submitReasont">确定</button>
@@ -170,26 +210,115 @@
170 210
 		getToken
171 211
 	} from '@/utils/auth'
172 212
 	import config from '@/config'
213
+import constant from '../../../utils/constant.js'
173 214
 	export default {
174 215
 		data() {
175 216
 			return {
176 217
 				baseUrl: config.baseUrlTJ,
177 218
 				certificate: [],
219
+				dynamicLists: [],
178 220
 				nationality: [
179
-					{ value: 0, text: "内" },
180
-					{ value: 1, text: "外" },
221
+					{ value: 0, text: "内" },
222
+					{ value: 1, text: "外" },
181 223
 				],
224
+				isOperate:[
225
+					{ value: 1, text: "是" },
226
+					{ value: 0, text: "否" },
227
+				],
228
+				isProxyApplicant:[
229
+					{ value: 1, text: "是" },
230
+					{ value: 0, text: "否" },
231
+				],
232
+				isRespondent:[
233
+					{ value: 1, text: "是" },
234
+					{ value: 0, text: "否" },
235
+				],
236
+				isResApplicant:[
237
+					{ value: 1, text: "是" },
238
+					{ value: 0, text: "否" },
239
+				],
240
+				delShow:false,
182 241
 				formZipData: {},
183 242
 				formData: {
184
-					affiliate: {
185
-						organizeFlag: 0,
186
-						respondentSex: 0,
187
-						idType:0,
188
-						nationality:0
189
-					},
243
+					organizeFlag: 0,
244
+					// affiliate: {
245
+					// 	roleType:1,	
246
+					// 	respondentSex: 0,
247
+					// },
248
+					affiliate:[{
249
+								applicant: {
250
+						        roleType: 1,
251
+						        name: "",
252
+						        idCard: "",
253
+						        code: "",
254
+						        phone: "",
255
+						        compLegalPerson: "",
256
+						        email: "",
257
+						        home: "",
258
+						        address: "",
259
+						        idType: 0,
260
+						        nationality: 1,
261
+						        birth: "",
262
+						        sex: "",
263
+						        group_order: 1,
264
+								operatorFlag:1
265
+						      },
266
+							  applicantAgent: {
267
+							          roleType: 2,
268
+							          name: "",
269
+							          idCard: "",
270
+							          code: "",
271
+							          phone: "",
272
+							          compLegalPerson: "",
273
+							          email: "",
274
+							          home: "",
275
+							          address: "",
276
+							          idType: 0,
277
+							          nationality: 1,
278
+							          birth: "",
279
+							          sex: "",
280
+							          group_order: 1,
281
+									  operatorFlag:1
282
+							        },
283
+									res:{
284
+										roleTyp: 3,
285
+										name: "",
286
+										idCard: "",
287
+										code: "",
288
+										phone: "",
289
+										compLegalPerson: "",
290
+										email: "",
291
+										home: "",
292
+										address: "",
293
+										idType: 0,
294
+										nationality: 1,
295
+										birth: "",
296
+										sex: "0",
297
+										group_order: 1,
298
+										operatorFlag:1
299
+									},
300
+									 resAgent: {
301
+									        roleType: 4,
302
+									        name: "",
303
+									        idCard: "",
304
+									        code: "",
305
+									        phone: "",
306
+									        compLegalPerson: "",
307
+									        email: "",
308
+									        home: "",
309
+									        address: "",
310
+									        idType: 0,
311
+									        nationality: 1,
312
+									        birth: "",
313
+									        sex: "",
314
+									        group_order: 1,
315
+											operatorFlag:1
316
+									      }
317
+					}],
190 318
 					columnValueList: [],
191 319
 					caseAttachList: [],
192 320
 				},
321
+				testVerify:true,
193 322
 				getUserInfoList: {},
194 323
 				ids: null,
195 324
 				tempFilePaths: null,
@@ -214,24 +343,11 @@
214 343
 				fileList: {},
215 344
 				fileListZip: {},
216 345
 				rules: {},
217
-				rulesappName: [{
218
-					required: true,
219
-					errorMessage: '输入信息不能为空',
220
-				}, {
221
-
222
-					validateFunction: (rule, value, data, callback) => {
223
-						//判断手机号格式时候正确
224
-						if (value.length < 1) {
225
-							if (this.formData.affiliate.organizeFlag == 0) {
226
-								callback('请输入申请人姓名')
227
-							} else {
228
-								callback('请输入机构名称')
229
-							}
230
-						}
231
-						return true
232
-					}
233
-
234
-				}],
346
+				rulesRespondentPhone:[
347
+					{required:true ,errorMessage: '被申请人联系电话不能为空'},
348
+					{pattern:'^[1][3,4,5,6,7,8,9][0-9]{9}$',errorMessage:'被申请人联系电话格式不正确'}
349
+				],
350
+				rulesPersonName:[{'required': true,errorMessage: '不能为空'}],
235 351
 				rulesappNo: [{
236 352
 					required: true,
237 353
 					errorMessage: '输入信息不能为空',
@@ -239,7 +355,7 @@
239 355
 
240 356
 					validateFunction: (rule, value, data, callback) => {
241 357
 						//判断手机号格
242
-						if (this.formData.affiliate.organizeFlag == 0) {
358
+						if (this.formData.organizeFlag == 0) {
243 359
 							let pNoReg =
244 360
 								/^[1-9]\d{5}(18|19|([23]\d))\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/
245 361
 							if (!pNoReg.test(value)) {
@@ -261,7 +377,7 @@
261 377
 		methods: {
262 378
 			submitReasont() {
263 379
 				this.$refs.form.validate().then(res => {
264
-					console.log(this.ids)
380
+					console.log("pppppppppppp")
265 381
 					if (this.ids) {
266 382
 						this.modifyData(this.formData)
267 383
 					} else {
@@ -269,42 +385,44 @@
269 385
 					}
270 386
 
271 387
 				}).catch(err => {
272
-
388
+					console.log(err)
273 389
 				})
274 390
 			},
275 391
 			// 获取新增默认值
276 392
 			getUserInfoNumber() {
393
+				let indexs = ""
394
+				this.formData.affiliate.forEach((item,index)=>{
395
+					indexs = index
396
+				})
277 397
 				getUserInfo().then(res => {
278 398
 					this.getUserInfoList = res.data
279
-					console.log(res.data)
280
-					if (this.formData.affiliate.organizeFlag == 0) {
281
-						this.$set(this.formData.affiliate, 'applicationName', res.data.nickName)
282
-						this.$set(this.formData.affiliate, 'code', res.data.idCard)
283
-						this.$set(this.formData.affiliate, 'applicationEmail', res.data.email)
284
-						this.$set(this.formData.affiliate, 'applicationPhone', res.data.phonenumber)
285
-						this.$set(this.formData.affiliate, 'idType', res.data.idType)
286
-						this.$set(this.formData.affiliate, 'nationality', res.data.nationality)
287
-						// this.$set(this.formData.affiliate, 'nameAgent', res.data.nickName)
288
-						this.disabledVal = false
289
-						this.disabledApplicat = true
290
-					} else if (this.formData.affiliate.organizeFlag == 1) {
291
-						console.log(this.formData.affiliate.organizeFlag)
292
-						this.$set(this.formData.affiliate, 'nameAgent', res.data.nickName)
293
-						this.$set(this.formData.affiliate, 'agentEmail', res.data.email)
294
-						this.$set(this.formData.affiliate, 'contactTelphoneAgent', res.data.phonenumber)
295
-						this.$set(this.formData.affiliate, 'nationality', res.data.nationality)
296
-						this.disabledVal = true
297
-						this.disabledApplicat = false
399
+					if (this.formData.organizeFlag == 0) {
400
+						this.$set(this.formData.affiliate[indexs].applicant, 'name', res.data.nickName)
401
+						this.$set(this.formData.affiliate[indexs].applicant, 'idCard', res.data.idCard)
402
+						this.$set(this.formData.affiliate[indexs].applicant, 'email', res.data.email)
403
+						this.$set(this.formData.affiliate[indexs].applicant, 'phone', res.data.phonenumber)
404
+						this.$set(this.formData.affiliate[indexs].applicant, 'idType', res.data.idType)
405
+						this.$set(this.formData.affiliate[indexs].applicant, 'nationality', res.data.nationality)
406
+					} else if (this.formData.organizeFlag == 1) {
407
+						console.log(this.formData.organizeFlag)
408
+						this.$set(this.formData.affiliate[indexs].applicantAgent, 'name', res.data.nickName)
409
+						this.$set(this.formData.affiliate[indexs].applicantAgent, 'email', res.data.email)
410
+						this.$set(this.formData.affiliate[indexs].applicantAgent, 'phone', res.data.phonenumber)
411
+						this.$set(this.formData.affiliate[indexs].applicantAgent, 'nationality', res.data.nationality)
298 412
 					}
299 413
 
300 414
 				})
301 415
 			},
302 416
 			clearValidate(val) {
303
-				if (this.formData.affiliate.organizeFlag == 0) {
304
-					this.$set(this.formData.affiliate, 'applicationName', this.getUserInfoList.nickName)
305
-					this.$set(this.formData.affiliate, 'code', this.getUserInfoList.idCard)
306
-					this.$set(this.formData.affiliate, 'applicationEmail', this.getUserInfoList.email)
307
-					this.$set(this.formData.affiliate, 'applicationPhone', this.getUserInfoList.phonenumber)
417
+				let indexs = ""
418
+				this.formData.affiliate.forEach((item,index)=>{
419
+					indexs = index
420
+				})
421
+				if (this.formData.organizeFlag == 0) {
422
+					this.$set(this.formData.affiliate[indexs].applicant, 'name', this.getUserInfoList.nickName)
423
+					this.$set(this.formData.affiliate[indexs].applicant, 'idCard', this.getUserInfoList.idCard)
424
+					this.$set(this.formData.affiliate[indexs].applicant, 'email', this.getUserInfoList.email)
425
+					this.$set(this.formData.affiliate[indexs].applicant, 'phone', this.getUserInfoList.phonenumber)
308 426
 					if (this.formZipData.affiliate) {
309 427
 						this.$set(this.formData, 'arbitratClaims', this.formZipData.arbitratClaims);
310 428
 						this.$set(this.formData, 'facts', this.formZipData.facts);
@@ -335,16 +453,16 @@
335 453
 						this.$set(this.formData.affiliate, 'compLegalPerson', this.formZipData.affiliate
336 454
 							.compLegalPerson);
337 455
 					} else {
338
-						this.$set(this.formData.affiliate, 'nameAgent', null)
339
-						this.$set(this.formData.affiliate, 'agentEmail', null)
340
-						this.$set(this.formData.affiliate, 'contactTelphoneAgent', null)
456
+						this.$set(this.formData.affiliate[indexs].applicantAgent, 'name', null)
457
+						this.$set(this.formData.affiliate[indexs].applicantAgent, 'email', null)
458
+						this.$set(this.formData.affiliate[indexs].applicantAgent, 'phone', null)
341 459
 					}
342 460
 					this.disabledVal = false
343 461
 					this.disabledApplicat = true
344
-				} else if (this.formData.affiliate.organizeFlag == 1) {
345
-					this.$set(this.formData.affiliate, 'nameAgent', this.getUserInfoList.nickName)
346
-					this.$set(this.formData.affiliate, 'agentEmail', this.getUserInfoList.email)
347
-					this.$set(this.formData.affiliate, 'contactTelphoneAgent', this.getUserInfoList.phonenumber)
462
+				} else if (this.formData.organizeFlag == 1) {
463
+					this.$set(this.formData.affiliate[indexs].applicantAgent, 'name', this.getUserInfoList.nickName)
464
+					this.$set(this.formData.affiliate[indexs].applicantAgent, 'email', this.getUserInfoList.email)
465
+					this.$set(this.formData.affiliate[indexs].applicantAgent, 'phone', this.getUserInfoList.phonenumber)
348 466
 					if (this.formZipData.affiliate) {
349 467
 						this.$set(this.formData, 'arbitratClaims', this.formZipData.arbitratClaims);
350 468
 						this.$set(this.formData, 'facts', this.formZipData.facts);
@@ -376,10 +494,10 @@
376 494
 						this.$set(this.formData.affiliate, 'respondentEmail', this.formZipData.affiliate
377 495
 							.respondentEmail);
378 496
 					} else {
379
-						this.$set(this.formData.affiliate, 'applicationName', null)
380
-						this.$set(this.formData.affiliate, 'code', null)
381
-						this.$set(this.formData.affiliate, 'applicationEmail', null)
382
-						this.$set(this.formData.affiliate, 'applicationPhone', null)
497
+						this.$set(this.formData.affiliate[indexs].applicant, 'name', null)
498
+						this.$set(this.formData.affiliate[indexs].applicant, 'idCard', null)
499
+						this.$set(this.formData.affiliate[indexs].applicant, 'email', null)
500
+						this.$set(this.formData.affiliate[indexs].applicant, 'phone', null)
383 501
 					}
384 502
 					this.disabledVal = true
385 503
 					this.disabledApplicat = false
@@ -409,13 +527,15 @@
409 527
 				})
410 528
 			},
411 529
 			// 被申请人获取性别出生年月
412
-			handleBlur() {
530
+			handleBlur(index) {
531
+				console.log(this.formData.affiliate[index].res.idCard)
413 532
 				let idCards = {
414
-					idCard: this.formData.affiliate.respondentIdentityNum,
533
+					idCard: this.formData.affiliate[index].res.idCard,
415 534
 				};
416
-				getInfoByIdCard(idCards).then(res => {
417
-					this.formData.affiliate.respondentSex = Number(res.respondentSex);
418
-					this.formData.affiliate.respondentBirth = res.respondentBirth;
535
+				
536
+				getInfoByIdCard(idCards).then(res => {	
537
+					this.formData.affiliate[index].res.sex = Number(res.respondentSex);
538
+					this.formData.affiliate[index].res.birth= res.respondentBirth;
419 539
 				})
420 540
 			},
421 541
 			// 新增案件
@@ -475,7 +595,7 @@
475 595
 							duration: 1000
476 596
 						})
477 597
 						this.formZipData = result.data;
478
-						if (this.formData.affiliate.organizeFlag == 0) {
598
+						if (this.formData.organizeFlag == 0) {
479 599
 							this.$set(this.formData, 'arbitratClaims', this.formZipData.arbitratClaims);
480 600
 							this.$set(this.formData, 'facts', this.formZipData.facts);
481 601
 							this.$set(this.formData.affiliate, 'applicantHome', this.formZipData.affiliate
@@ -504,7 +624,7 @@
504 624
 								.respondentEmail);
505 625
 							this.$set(this.formData.affiliate, 'compLegalPerson', this.formZipData.affiliate
506 626
 								.compLegalPerson);
507
-						} else if (this.formData.affiliate.organizeFlag == 1) {
627
+						} else if (this.formData.organizeFlag == 1) {
508 628
 							this.$set(this.formData, 'arbitratClaims', this.formZipData.arbitratClaims);
509 629
 							this.$set(this.formData, 'facts', this.formZipData.facts);
510 630
 							this.$set(this.formData.affiliate, 'applicationName', this.formZipData.affiliate
@@ -598,6 +718,16 @@
598 718
 			changeDocment(e){
599 719
 				console.log(e)
600 720
 			},
721
+			//改变地区类型
722
+			changeArea(e){
723
+				if(e==0){
724
+					this.testVerify = true
725
+					this.rulesRespondentPhone[0].required = true;
726
+				}else if(e==1){
727
+					this.testVerify = false
728
+					this.rulesRespondentPhone[0].required = false;
729
+				}
730
+			},
601 731
 			// 获取证件类型
602 732
 			getIdType(){
603 733
 				idType().then(res =>{
@@ -606,7 +736,108 @@
606 736
 						this.certificate.push({value:item.dictSort,text:item.dictLabel})
607 737
 					})
608 738
 				})
739
+			},
740
+			// 新增多个申请代理人
741
+			addMultiple(){
742
+				this.delShow =true
743
+				this.formData.affiliate.push({
744
+					applicant:{
745
+					  roleType: 1,
746
+					  name: "",
747
+					  idCard: "",
748
+					  code: "",
749
+					  phone: "",
750
+					  compLegalPerson: "",
751
+					  email: "",
752
+					  home: "",
753
+					  address: "",
754
+					  idType: 0,
755
+					  nationality: 1,
756
+					  birth: "",
757
+					  sex: "",
758
+					  group_order: 1,
759
+					  operatorFlag:1
760
+					},
761
+					applicantAgent: {
762
+					        roleType: 2,
763
+					        name: "",
764
+					        idCard: "",
765
+					        code: "",
766
+					        phone: "",
767
+					        compLegalPerson: "",
768
+					        email: "",
769
+					        home: "",
770
+					        address: "",
771
+					        idType: 0,
772
+					        nationality: 1,
773
+					        birth: "",
774
+					        sex: "",
775
+					        group_order: 1,
776
+							operatorFlag:1
777
+					      },
778
+						  res:{
779
+						  	roleTyp: 3,
780
+						  	name: "",
781
+						  	idCard: "",
782
+						  	code: "",
783
+						  	phone: "",
784
+						  	compLegalPerson: "",
785
+						  	email: "",
786
+						  	home: "",
787
+						  	address: "",
788
+						  	idType: 0,
789
+						  	nationality: 1,
790
+						  	birth: "",
791
+						  	sex: "0",
792
+						  	group_order: 1,
793
+							operatorFlag:1
794
+						  },
795
+						   resAgent: {
796
+						          roleType: 4,
797
+						          name: "",
798
+						          idCard: "",
799
+						          code: "",
800
+						          phone: "",
801
+						          compLegalPerson: "",
802
+						          email: "",
803
+						          home: "",
804
+						          address: "",
805
+						          idType: 0,
806
+						          nationality: 1,
807
+						          birth: "",
808
+						          sex: "",
809
+						          group_order: 1,
810
+								  operatorFlag:1
811
+						        }
812
+				})
813
+				let idnexVal = ""
814
+				this.formData.affiliate.forEach((item,index)=>{
815
+					idnexVal = index
816
+				})
817
+				getUserInfo().then(res => {
818
+					this.getUserInfoList = res.data
819
+					if (this.formData.organizeFlag == 0) {
820
+						this.$set(this.formData.affiliate[idnexVal].applicant, 'name', res.data.nickName)
821
+						this.$set(this.formData.affiliate[idnexVal].applicant, 'idCard', res.data.idCard)
822
+						this.$set(this.formData.affiliate[idnexVal].applicant, 'email', res.data.email)
823
+						this.$set(this.formData.affiliate[idnexVal].applicant, 'phone', res.data.phonenumber)
824
+						this.$set(this.formData.affiliate[idnexVal].applicant, 'idType', res.data.idType)
825
+						this.$set(this.formData.affiliate[idnexVal].applicant, 'nationality', res.data.nationality)
826
+					} else if (this.formData.organizeFlag == 1) {
827
+						this.$set(this.formData.affiliate[idnexVal].applicantAgent, 'name', res.data.nickName)
828
+						this.$set(this.formData.affiliate[idnexVal].applicantAgent, 'email', res.data.email)
829
+						this.$set(this.formData.affiliate[idnexVal].applicantAgent, 'phone', res.data.phonenumber)
830
+						this.$set(this.formData.affiliate[idnexVal].applicantAgent, 'nationality', res.data.nationality)
831
+					}
832
+				
833
+				})
834
+			},
835
+			//删除新增的多个申请代理人
836
+			delValue(id){
837
+				let index = this.formData.affiliate.findIndex(v => v.id === id)
838
+				this.formData.affiliate.splice(index, 1)
609 839
 			}
840
+			
610 841
 		},
611 842
 		onLoad(data) {
612 843
 			this.ids = data.id
@@ -622,6 +853,13 @@
622 853
 					title: "案件新增"
623 854
 				})
624 855
 			}
856
+			if(this.formData.affiliate.nationality == 0){
857
+				this.testVerify = true
858
+				this.rulesRespondentPhone[0].required = true;
859
+			}else if(this.formData.affiliate.idType==1){
860
+				this.testVerify = false
861
+				this.rulesRespondentPhone[0].required = false;
862
+			}
625 863
 			this.getTemplateFn()
626 864
 			this.getUserInfoNumber()
627 865
 			this.getIdType() //获取证件类型

+ 2
- 2
pages/register.vue Ver fichero

@@ -112,8 +112,8 @@ import constant from '../utils/constant'
112 112
 				sysType:null,
113 113
 				certificate: [],
114 114
 				nationality: [
115
-					{ value: 0, text: "内" },
116
-					{ value: 1, text: "外" },
115
+					{ value: 0, text: "内" },
116
+					{ value: 1, text: "外" },
117 117
 				],
118 118
 				passportVal:{}
119 119
 			}

+ 2
- 2
uni_modules/uni-data-select/components/uni-data-select/uni-data-select.vue Ver fichero

@@ -348,7 +348,7 @@
348 348
 
349 349
 	.uni-select {
350 350
 		font-size: 14px;
351
-		// border: 1px solid $uni-border-3;
351
+		border: 1px solid $uni-border-3;
352 352
 		box-sizing: border-box;
353 353
 		border-radius: 4px;
354 354
 		padding: 0 5px;
@@ -360,7 +360,7 @@
360 360
 		/* #endif */
361 361
 		flex-direction: row;
362 362
 		align-items: center;
363
-		// border-bottom: solid 1px $uni-border-3;
363
+		border-bottom: solid 1px $uni-border-3;
364 364
 		width: 100%;
365 365
 		flex: 1;
366 366
 		height: 35px;