|
|
@@ -13,7 +13,7 @@
|
|
13
|
13
|
>
|
|
14
|
14
|
<uni-easyinput v-model="formData.facts" type="textarea" placeholder="请输入事实和理由" />
|
|
15
|
15
|
</uni-forms-item>
|
|
16
|
|
- <uni-forms-item label="案件标的:" name="caseSubjectAmount" label-width="120px" required
|
|
|
16
|
+ <!-- <uni-forms-item label="案件标的:" name="caseSubjectAmount" label-width="120px" required
|
|
17
|
17
|
:rules="[{'required': true,errorMessage: '案件标的不能为空'}]"
|
|
18
|
18
|
>
|
|
19
|
19
|
<uni-easyinput v-model="formData.caseSubjectAmount" type="text" placeholder="请输入案件标的" />
|
|
|
@@ -22,7 +22,7 @@
|
|
22
|
22
|
:rules="[{'required': true,errorMessage: '模板不能为空'}]"
|
|
23
|
23
|
>
|
|
24
|
24
|
<uni-data-select :localdata="templateList" v-model="formData.templateId"></uni-data-select>
|
|
25
|
|
- </uni-forms-item>
|
|
|
25
|
+ </uni-forms-item> -->
|
|
26
|
26
|
<uni-forms-item label="申请人案件证据资料上传:" name="headImage" label-width="120px">
|
|
27
|
27
|
<uni-file-picker ref="files" file-mediatype="all" return-type='object' v-model="fileList" :auto-upload="false" @select="select" :limit='9' />
|
|
28
|
28
|
</uni-forms-item>
|
|
|
@@ -34,29 +34,30 @@
|
|
34
|
34
|
@change='clearValidate'></uni-data-checkbox>
|
|
35
|
35
|
</uni-forms-item>
|
|
36
|
36
|
<uni-forms-item :label="formData.affiliate.organizeFlag==0 ? '申请人':'申请机构'" :rules="rulesappName" name="affiliate.applicationName" label-width="120px" required >
|
|
37
|
|
- <uni-easyinput v-model="formData.affiliate.applicationName" type="text" :placeholder="formData.affiliate.organizeFlag==0 ? '请输入申请人姓名':'请输入申请机构名称'"/>
|
|
|
37
|
+ <uni-easyinput v-model="formData.affiliate.applicationName" :disabled="disabledApplicat" type="text" :placeholder="formData.affiliate.organizeFlag==0 ? '请输入申请人姓名':'请输入申请机构名称'"/>
|
|
38
|
38
|
</uni-forms-item>
|
|
39
|
39
|
<uni-forms-item :label="formData.affiliate.organizeFlag==0 ? '身份证号码':'机构代码'" name="affiliate.code" label-width="120px" required
|
|
40
|
40
|
:rules="rulesappNo">
|
|
41
|
|
- <uni-easyinput v-model="formData.affiliate.code" type="text" :placeholder="formData.affiliate.organizeFlag==0 ? '请输入身份证号码':'请输入统一社会代码'" />
|
|
|
41
|
+ <uni-easyinput v-model="formData.affiliate.code" :disabled="disabledApplicat" type="text" :placeholder="formData.affiliate.organizeFlag==0 ? '请输入身份证号码':'请输入统一社会代码'" />
|
|
42
|
42
|
</uni-forms-item>
|
|
43
|
43
|
|
|
44
|
|
- <uni-forms-item label="申请人邮箱:" name="affiliate.applicationEmail" label-width="120px" required
|
|
|
44
|
+ <uni-forms-item label="申请人邮箱:" v-if="formData.affiliate.organizeFlag==0" name="affiliate.applicationEmail" label-width="120px" required
|
|
45
|
45
|
:rules="[
|
|
46
|
46
|
{'required': true,errorMessage: '申请人邮箱不能为空'},
|
|
47
|
47
|
{pattern:'^\\S+?@\\S+?\\.\\S+?$',errorMessage:'邮箱格式不正确'}
|
|
48
|
48
|
]"
|
|
49
|
49
|
>
|
|
50
|
50
|
<uni-easyinput v-model="formData.affiliate.applicationEmail"
|
|
|
51
|
+ :disabled="disabledApplicat"
|
|
51
|
52
|
type="text" placeholder="请输入申请人邮箱" />
|
|
52
|
53
|
</uni-forms-item>
|
|
53
|
|
- <uni-forms-item label="申请人电话:" name="affiliate.applicationPhone" label-width="120px" required
|
|
|
54
|
+ <uni-forms-item label="申请人电话:" v-if="formData.affiliate.organizeFlag==0" name="affiliate.applicationPhone" label-width="120px" required
|
|
54
|
55
|
:rules="[
|
|
55
|
56
|
{'required': true,errorMessage: '申请人电话不能为空'},
|
|
56
|
57
|
{pattern:'^[1][3,4,5,6,7,8,9][0-9]{9}$',errorMessage:'申请人电话格式不正确'}
|
|
57
|
58
|
]"
|
|
58
|
59
|
>
|
|
59
|
|
- <uni-easyinput v-model="formData.affiliate.applicationPhone" type="text" placeholder="请输入申请人电话" />
|
|
|
60
|
+ <uni-easyinput v-model="formData.affiliate.applicationPhone" :disabled="disabledApplicat" type="text" placeholder="请输入申请人电话" />
|
|
60
|
61
|
</uni-forms-item>
|
|
61
|
62
|
<uni-forms-item label="法定代表人:" name="affiliate.compLegalPerson" label-width="120px" required
|
|
62
|
63
|
:rules="[{'required': true,errorMessage: '法定代表人不能为空'}]"
|
|
|
@@ -73,40 +74,14 @@
|
|
73
|
74
|
>
|
|
74
|
75
|
<uni-easyinput v-model="formData.affiliate.applicantAddress" type="text" placeholder="请输入申请人联系地址" />
|
|
75
|
76
|
</uni-forms-item>
|
|
76
|
|
- <uni-forms-item label="代理人联系电话:" name="affiliate.contactTelphoneAgent" label-width="120px"
|
|
77
|
|
-
|
|
78
|
|
- v-if="formData.affiliate.organizeFlag==0">
|
|
79
|
|
- <uni-easyinput v-model="formData.affiliate.contactTelphoneAgent" type="text" placeholder="请输入代理人联系电话" />
|
|
80
|
|
- </uni-forms-item>
|
|
81
|
|
- <uni-forms-item label="代理人联系电话:" name="affiliate.contactTelphoneAgent" label-width="120px" required
|
|
82
|
|
- :rules="[
|
|
83
|
|
- {'required': true,errorMessage: '代理人联系电话不能为空'},
|
|
84
|
|
- {pattern:'^[1][3,4,5,6,7,8,9][0-9]{9}$',errorMessage:'代理人联系电话格式不正确'}
|
|
85
|
|
- ]"
|
|
86
|
|
- v-if="formData.affiliate.organizeFlag==1"
|
|
87
|
|
- >
|
|
88
|
|
- <uni-easyinput v-model="formData.affiliate.contactTelphoneAgent" type="text" placeholder="请输入代理人联系电话" />
|
|
89
|
|
- </uni-forms-item>
|
|
90
|
|
- <uni-forms-item label="委托代理人姓名:" name="affiliate.nameAgent" label-width="120px" v-if="formData.affiliate.organizeFlag==0">
|
|
91
|
|
- <uni-easyinput v-model="formData.affiliate.nameAgent" type="text" placeholder="请输入委托代理人姓名" />
|
|
92
|
|
- </uni-forms-item>
|
|
93
|
|
- <uni-forms-item label="委托代理人姓名:" name="affiliate.nameAgent" label-width="120px" required
|
|
94
|
|
- :rules="[{'required': true,errorMessage: '委托代理人姓名不能为空'}]"
|
|
95
|
|
- v-if="formData.affiliate.organizeFlag==1"
|
|
96
|
|
- >
|
|
97
|
|
- <uni-easyinput v-model="formData.affiliate.nameAgent" type="text" placeholder="请输入委托代理人姓名" />
|
|
|
77
|
+ <uni-forms-item label="代理人联系电话:" label-width="120px">
|
|
|
78
|
+ <uni-easyinput v-model="formData.affiliate.contactTelphoneAgent" :disabled="disabledVal" type="text" placeholder="请输入代理人联系电话" />
|
|
98
|
79
|
</uni-forms-item>
|
|
99
|
|
- <uni-forms-item label="代理人邮箱:" name="affiliate.agentEmail" label-width="120px" v-if="formData.affiliate.organizeFlag==0">
|
|
100
|
|
- <uni-easyinput v-model="formData.affiliate.agentEmail" type="text" placeholder="请输入代理人邮箱" />
|
|
|
80
|
+ <uni-forms-item label="代理人姓名:" label-width="120px">
|
|
|
81
|
+ <uni-easyinput v-model="formData.affiliate.nameAgent" :disabled="disabledVal" type="text" placeholder="请输入委托代理人姓名" />
|
|
101
|
82
|
</uni-forms-item>
|
|
102
|
|
- <uni-forms-item label="代理人邮箱:" name="affiliate.agentEmail" label-width="120px" required
|
|
103
|
|
- :rules="[
|
|
104
|
|
- {'required': true,errorMessage: '代理人邮箱不能为空'},
|
|
105
|
|
- {pattern:'^\\S+?@\\S+?\\.\\S+?$',errorMessage:'邮箱格式不正确'}
|
|
106
|
|
- ]"
|
|
107
|
|
- v-if="formData.affiliate.organizeFlag==1"
|
|
108
|
|
- >
|
|
109
|
|
- <uni-easyinput v-model="formData.affiliate.agentEmail" type="text" placeholder="请输入代理人邮箱" />
|
|
|
83
|
+ <uni-forms-item label="代理人邮箱:" label-width="120px">
|
|
|
84
|
+ <uni-easyinput v-model="formData.affiliate.agentEmail" :disabled="disabledVal" type="text" placeholder="请输入代理人邮箱" />
|
|
110
|
85
|
</uni-forms-item>
|
|
111
|
86
|
<uni-forms-item label="被申请人姓名:" name="affiliate.respondentName" label-width="120px" required
|
|
112
|
87
|
:rules="[{'required': true,errorMessage: '被申请人姓名不能为空'}]"
|
|
|
@@ -167,7 +142,7 @@
|
|
167
|
142
|
</template>
|
|
168
|
143
|
|
|
169
|
144
|
<script>
|
|
170
|
|
- import {getTemplate,getInfoByIdCard,caseApplicationInsert,updateComfire,caseApplicationSelectById} from '../../../api/handlecase/index.js'
|
|
|
145
|
+ import {getTemplate,getInfoByIdCard,caseApplicationInsert,updateComfire,caseApplicationSelectById,getUserInfo} from '../../../api/handlecase/index.js'
|
|
171
|
146
|
import {
|
|
172
|
147
|
getToken
|
|
173
|
148
|
} from '@/utils/auth'
|
|
|
@@ -183,6 +158,7 @@
|
|
183
|
158
|
columnValueList: [],
|
|
184
|
159
|
caseAttachList: [],
|
|
185
|
160
|
},
|
|
|
161
|
+ getUserInfoList:{},
|
|
186
|
162
|
ids:null,
|
|
187
|
163
|
tempFilePaths: null,
|
|
188
|
164
|
templateList:[],
|
|
|
@@ -202,6 +178,8 @@
|
|
202
|
178
|
value: 0
|
|
203
|
179
|
}
|
|
204
|
180
|
],
|
|
|
181
|
+ disabledVal:false,
|
|
|
182
|
+ disabledApplicat:false,
|
|
205
|
183
|
fileList: {},
|
|
206
|
184
|
rules:{},
|
|
207
|
185
|
rulesappName: [
|
|
|
@@ -252,11 +230,6 @@
|
|
252
|
230
|
|
|
253
|
231
|
},
|
|
254
|
232
|
methods:{
|
|
255
|
|
- clearValidate(val){
|
|
256
|
|
- this.formData.affiliate.applicationName = null
|
|
257
|
|
- this.formData.affiliate.code = null
|
|
258
|
|
- this.$refs["form"].clearValidate()
|
|
259
|
|
- },
|
|
260
|
233
|
submitReasont(){
|
|
261
|
234
|
this.$refs.form.validate().then(res=>{
|
|
262
|
235
|
if(this.ids){
|
|
|
@@ -269,6 +242,55 @@
|
|
269
|
242
|
|
|
270
|
243
|
})
|
|
271
|
244
|
},
|
|
|
245
|
+ // 获取新增默认值
|
|
|
246
|
+ getUserInfoNumber(){
|
|
|
247
|
+ getUserInfo().then(res =>{
|
|
|
248
|
+ this.getUserInfoList = res.data
|
|
|
249
|
+ if(this.formData.affiliate.organizeFlag == 0){
|
|
|
250
|
+ this.$set(this.formData.affiliate, 'applicationName', res.data.nickName)
|
|
|
251
|
+ this.$set(this.formData.affiliate, 'code', res.data.idCard)
|
|
|
252
|
+ this.$set(this.formData.affiliate, 'applicationEmail', res.data.email)
|
|
|
253
|
+ this.$set(this.formData.affiliate, 'applicationPhone', res.data.phonenumber)
|
|
|
254
|
+ // this.$set(this.formData.affiliate, 'nameAgent', res.data.nickName)
|
|
|
255
|
+ this.disabledVal = false
|
|
|
256
|
+ this.disabledApplicat = true
|
|
|
257
|
+ }else if(this.formData.affiliate.organizeFlag == 1){
|
|
|
258
|
+ console.log(this.formData.affiliate.organizeFlag)
|
|
|
259
|
+ this.$set(this.formData.affiliate, 'nameAgent', res.data.nickName)
|
|
|
260
|
+ this.$set(this.formData.affiliate, 'agentEmail', res.data.email)
|
|
|
261
|
+ this.$set(this.formData.affiliate, 'contactTelphoneAgent', res.data.phonenumber)
|
|
|
262
|
+ this.disabledVal = true
|
|
|
263
|
+ this.disabledApplicat = false
|
|
|
264
|
+ }
|
|
|
265
|
+
|
|
|
266
|
+ })
|
|
|
267
|
+ },
|
|
|
268
|
+ clearValidate(val){
|
|
|
269
|
+ if(this.formData.affiliate.organizeFlag == 0){
|
|
|
270
|
+ this.$set(this.formData.affiliate, 'applicationName', this.getUserInfoList.nickName)
|
|
|
271
|
+ this.$set(this.formData.affiliate, 'code', this.getUserInfoList.idCard)
|
|
|
272
|
+ this.$set(this.formData.affiliate, 'applicationEmail', this.getUserInfoList.email)
|
|
|
273
|
+ this.$set(this.formData.affiliate, 'applicationPhone', this.getUserInfoList.phonenumber)
|
|
|
274
|
+ this.$set(this.formData.affiliate, 'nameAgent', null)
|
|
|
275
|
+ this.$set(this.formData.affiliate, 'agentEmail', null)
|
|
|
276
|
+ this.$set(this.formData.affiliate, 'contactTelphoneAgent', null)
|
|
|
277
|
+ this.disabledVal = false
|
|
|
278
|
+ this.disabledApplicat = true
|
|
|
279
|
+ }else if(this.formData.affiliate.organizeFlag == 1){
|
|
|
280
|
+ this.$set(this.formData.affiliate, 'nameAgent', this.getUserInfoList.nickName)
|
|
|
281
|
+ this.$set(this.formData.affiliate, 'agentEmail', this.getUserInfoList.email)
|
|
|
282
|
+ this.$set(this.formData.affiliate, 'contactTelphoneAgent', this.getUserInfoList.phonenumber)
|
|
|
283
|
+ this.$set(this.formData.affiliate, 'applicationName', null)
|
|
|
284
|
+ this.$set(this.formData.affiliate, 'code', null)
|
|
|
285
|
+ this.$set(this.formData.affiliate, 'applicationEmail', null)
|
|
|
286
|
+ this.$set(this.formData.affiliate, 'applicationPhone', null)
|
|
|
287
|
+ this.disabledVal = true
|
|
|
288
|
+ this.disabledApplicat = false
|
|
|
289
|
+ }
|
|
|
290
|
+ // this.formData.affiliate.applicationName =null
|
|
|
291
|
+ // this.formData.affiliate.code =null
|
|
|
292
|
+ this.$refs["form"].clearValidate()
|
|
|
293
|
+ },
|
|
272
|
294
|
/** 获取裁决书模板 */
|
|
273
|
295
|
getTemplateFn(data) {
|
|
274
|
296
|
getTemplate(data).then((res) => {
|
|
|
@@ -299,7 +321,7 @@
|
|
299
|
321
|
insertFn(data) {
|
|
300
|
322
|
caseApplicationInsert(data).then((res) => {
|
|
301
|
323
|
uni.showToast({
|
|
302
|
|
- title: '成功',
|
|
|
324
|
+ title: '新增成功',
|
|
303
|
325
|
icon: 'none',
|
|
304
|
326
|
duration: 1000
|
|
305
|
327
|
})
|
|
|
@@ -312,7 +334,7 @@
|
|
312
|
334
|
modifyData(data) {
|
|
313
|
335
|
updateComfire(data).then((res) => {
|
|
314
|
336
|
uni.showToast({
|
|
315
|
|
- title: '成功',
|
|
|
337
|
+ title: '修改成功',
|
|
316
|
338
|
icon: 'none',
|
|
317
|
339
|
duration: 1000
|
|
318
|
340
|
})
|
|
|
@@ -378,6 +400,7 @@
|
|
378
|
400
|
uni.setNavigationBarTitle({title:"案件新增"})
|
|
379
|
401
|
}
|
|
380
|
402
|
this.getTemplateFn()
|
|
|
403
|
+ this.getUserInfoNumber()
|
|
381
|
404
|
},
|
|
382
|
405
|
onReady() {
|
|
383
|
406
|
this.$refs.form.setRules(this.rules)
|