gyj 2 gadus atpakaļ
vecāks
revīzija
e988fe6407

+ 8
- 0
api/handlecase/index.js Parādīt failu

120
     method: "post",
120
     method: "post",
121
     data: data,
121
     data: data,
122
   })
122
   })
123
+}
124
+/** 根据id查询案件信息 */
125
+export function caseApplicationSelectById(data) {
126
+  return request({
127
+    url: '/caseApplication/selectById',
128
+    method: 'get',
129
+    params: data
130
+  })
123
 }
131
 }

+ 7
- 0
pages/handlecase/component/list.vue Parādīt failu

41
 			</view>
41
 			</view>
42
 		</view>
42
 		</view>
43
 		<view class="btn" v-if="sysType == 2">
43
 		<view class="btn" v-if="sysType == 2">
44
+			<button class="btnItem" type="primary" size="mini" @tap="modify">修改</button>
44
 			<!-- <button class="btnItem" type="primary" size="mini" @tap="clickPay">申请人缴费</button>
45
 			<!-- <button class="btnItem" type="primary" size="mini" @tap="clickPay">申请人缴费</button>
45
 			<button class="btnItem" type="primary" size="mini" @tap="caseDetail">选择调解员</button> -->
46
 			<button class="btnItem" type="primary" size="mini" @tap="caseDetail">选择调解员</button> -->
46
 			<button class="btnItem" type="primary" size="mini" v-for="(item) in buttonList" :key="item.id"
47
 			<button class="btnItem" type="primary" size="mini" v-for="(item) in buttonList" :key="item.id"
85
 					url: `/pages/handlecase/component/payList?id=${this.defalutVal.id}`
86
 					url: `/pages/handlecase/component/payList?id=${this.defalutVal.id}`
86
 				})
87
 				})
87
 			},
88
 			},
89
+			// 修改
90
+			modify(){
91
+				uni.redirectTo({
92
+					url: `/pages/handlecase/component/newlyAddedCase?id=${this.defalutVal.id}`,
93
+				})
94
+			},
88
 			/**查询按钮列表 */
95
 			/**查询按钮列表 */
89
 			getButtonList() {
96
 			getButtonList() {
90
 				queryCaseFlowInfo({
97
 				queryCaseFlowInfo({

+ 23
- 3
pages/handlecase/component/newlyAddedCase.vue Parādīt failu

167
 </template>
167
 </template>
168
 
168
 
169
 <script>
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
 	import {
171
 	import {
172
 		getToken
172
 		getToken
173
 	} from '@/utils/auth'
173
 	} from '@/utils/auth'
183
 						columnValueList: [],
183
 						columnValueList: [],
184
 						caseAttachList: [],
184
 						caseAttachList: [],
185
 					},
185
 					},
186
+					ids:null,
186
 					tempFilePaths: null,
187
 					tempFilePaths: null,
187
 					templateList:[],
188
 					templateList:[],
188
 					objectiJurisArr: [{
189
 					objectiJurisArr: [{
210
 							
211
 							
211
 							validateFunction: (rule, value, data, callback) => {
212
 							validateFunction: (rule, value, data, callback) => {
212
 								//判断手机号格式时候正确
213
 								//判断手机号格式时候正确
213
-								if (value.length<3) {
214
+								if (value.length<1) {
214
 									if(this.formData.affiliate.organizeFlag == 0){
215
 									if(this.formData.affiliate.organizeFlag == 0){
215
 										callback('请输入申请人姓名')
216
 										callback('请输入申请人姓名')
216
 									}else{
217
 									}else{
257
 			},
258
 			},
258
 			submitReasont(){
259
 			submitReasont(){
259
 				this.$refs.form.validate().then(res=>{
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
 					}).catch(err =>{
267
 					}).catch(err =>{
262
 						
268
 						
263
 				})
269
 				})
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
 			handleBlur(){
288
 			handleBlur(){
276
 				let idCards = {
289
 				let idCards = {
355
 			}
368
 			}
356
 		},
369
 		},
357
 		onLoad(data) {
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
 			this.getTemplateFn()
378
 			this.getTemplateFn()
359
 		},
379
 		},
360
 		onReady() {
380
 		onReady() {