|
|
@@ -167,7 +167,7 @@
|
|
167
|
167
|
</template>
|
|
168
|
168
|
|
|
169
|
169
|
<script>
|
|
170
|
|
- import {getTemplate,getInfoByIdCard,caseApplicationInsert,updateComfire} from '../../../api/handlecase/index.js'
|
|
|
170
|
+ import {getTemplate,getInfoByIdCard,caseApplicationInsert,updateComfire,caseApplicationSelectById} from '../../../api/handlecase/index.js'
|
|
171
|
171
|
import {
|
|
172
|
172
|
getToken
|
|
173
|
173
|
} from '@/utils/auth'
|
|
|
@@ -183,6 +183,7 @@
|
|
183
|
183
|
columnValueList: [],
|
|
184
|
184
|
caseAttachList: [],
|
|
185
|
185
|
},
|
|
|
186
|
+ ids:null,
|
|
186
|
187
|
tempFilePaths: null,
|
|
187
|
188
|
templateList:[],
|
|
188
|
189
|
objectiJurisArr: [{
|
|
|
@@ -210,7 +211,7 @@
|
|
210
|
211
|
|
|
211
|
212
|
validateFunction: (rule, value, data, callback) => {
|
|
212
|
213
|
//判断手机号格式时候正确
|
|
213
|
|
- if (value.length<3) {
|
|
|
214
|
+ if (value.length<1) {
|
|
214
|
215
|
if(this.formData.affiliate.organizeFlag == 0){
|
|
215
|
216
|
callback('请输入申请人姓名')
|
|
216
|
217
|
}else{
|
|
|
@@ -257,7 +258,12 @@
|
|
257
|
258
|
},
|
|
258
|
259
|
submitReasont(){
|
|
259
|
260
|
this.$refs.form.validate().then(res=>{
|
|
260
|
|
- this.insertFn(this.formData)
|
|
|
261
|
+ if(this.ids){
|
|
|
262
|
+ this.modifyData(this.formData)
|
|
|
263
|
+ }else{
|
|
|
264
|
+ this.insertFn(this.formData)
|
|
|
265
|
+ }
|
|
|
266
|
+
|
|
261
|
267
|
}).catch(err =>{
|
|
262
|
268
|
|
|
263
|
269
|
})
|
|
|
@@ -271,6 +277,13 @@
|
|
271
|
277
|
})
|
|
272
|
278
|
});
|
|
273
|
279
|
},
|
|
|
280
|
+ /** 根据案件id获取对应信息 */
|
|
|
281
|
+ caseApplicationSelectByIdFn(data) {
|
|
|
282
|
+ caseApplicationSelectById(data).then(res=>{
|
|
|
283
|
+ res.data.affiliate.respondentSex = Number(res.data.affiliate.respondentSex)
|
|
|
284
|
+ this.formData = res.data
|
|
|
285
|
+ })
|
|
|
286
|
+ },
|
|
274
|
287
|
// 被申请人获取性别出生年月
|
|
275
|
288
|
handleBlur(){
|
|
276
|
289
|
let idCards = {
|
|
|
@@ -355,6 +368,13 @@
|
|
355
|
368
|
}
|
|
356
|
369
|
},
|
|
357
|
370
|
onLoad(data) {
|
|
|
371
|
+ this.ids = data.id
|
|
|
372
|
+ if(this.ids){
|
|
|
373
|
+ this.caseApplicationSelectByIdFn({id:data.id})
|
|
|
374
|
+ uni.setNavigationBarTitle({title:"案件修改"})
|
|
|
375
|
+ }else{
|
|
|
376
|
+ uni.setNavigationBarTitle({title:"案件新增"})
|
|
|
377
|
+ }
|
|
358
|
378
|
this.getTemplateFn()
|
|
359
|
379
|
},
|
|
360
|
380
|
onReady() {
|