Просмотр исходного кода

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

gaogaoyujie 2 лет назад
Родитель
Сommit
0ace11d1d5

+ 8
- 0
api/handlecase/index.js Просмотреть файл

@@ -161,3 +161,11 @@ export function confirmPaid(data) {
161 161
 		data: data
162 162
 	})
163 163
 }
164
+//默认新增显示
165
+export function getUserInfo(data) {
166
+  return request({
167
+    url: '/caseApplication/getUserInfo',
168
+    method: 'get',
169
+    params: data
170
+  })
171
+}

+ 12
- 3
pages/handlecase/component/confirmPayment.vue Просмотреть файл

@@ -11,13 +11,13 @@
11 11
 				<uni-forms-item label="缴费金额:" name="feePayable" label-width="80px">
12 12
 					<uni-easyinput v-model="formData.feePayable" type="text" :disabled='true' placeholder="请输入缴费金额" />
13 13
 				</uni-forms-item>
14
-				<uni-forms-item label="申请人缴费:" name="feePayable" label-width="90px">
14
+				<uni-forms-item label="申请人缴费:" name="feePayable" label-width="90px" v-if="annexTypeS">
15 15
 					<view v-for="item in formData.caseAttachList">
16 16
 						<uni-link v-if="item.annexType==4" :href="item.annexPath" color="#007BFF"
17 17
 							:text="item.annexName"></uni-link>
18 18
 					</view>
19 19
 				</uni-forms-item>	
20
-				<uni-forms-item label="被申请人缴费:" name="feePayable" label-width="100px">
20
+				<uni-forms-item label="被申请人缴费:" name="feePayable" label-width="100px" v-if="annexTypeB">
21 21
 					<view v-for="item in formData.caseAttachList">
22 22
 						<uni-link v-if="item.annexType==9" :href="item.annexPath" color="#007BFF"
23 23
 							:text="item.annexName"></uni-link>
@@ -43,7 +43,9 @@
43 43
 			return {
44 44
 				formData:{},
45 45
 				rules:{},
46
-				paymentConfirm:{}
46
+				paymentConfirm:{},
47
+				annexTypeS:false,
48
+				annexTypeB:false
47 49
 			}
48 50
 		},
49 51
 		methods:{
@@ -69,6 +71,13 @@
69 71
 			paymentDetails(val) {
70 72
 			    selectPaymentDetail(val).then(res => {
71 73
 			        this.formData = res.data;
74
+					this.formData.caseAttachList.forEach(res =>{
75
+						if(res.annexType==4){
76
+							this.annexTypeS = true
77
+						}else if(res.annexType==9){
78
+							this.annexTypeB = true
79
+						}
80
+					})
72 81
 			    })
73 82
 			},        
74 83
 		},

+ 10
- 5
pages/handlecase/component/list.vue Просмотреть файл

@@ -90,7 +90,7 @@
90 90
 					this.onsubmitRow()
91 91
 				} else if (type == 2) {
92 92
 					// 缴费
93
-					this.clickPay()
93
+					this.clickPay(4)
94 94
 				} else if (type == 3 || type == 45) {
95 95
 					this.confirmPayments()
96 96
 					// 确认缴费
@@ -125,7 +125,7 @@
125 125
 					//结束
126 126
 				} else if (type == 44) {
127 127
 					// 被申请人缴费
128
-					this.clickPay()
128
+					this.clickPay(9)
129 129
 				}
130 130
 			},
131 131
 			// 案件详情以及操作
@@ -135,9 +135,9 @@
135 135
 				})
136 136
 			},
137 137
 			// 缴费
138
-			clickPay() {
138
+			clickPay(type) {
139 139
 				uni.navigateTo({
140
-					url: `/pages/handlecase/component/payList?id=${this.defalutVal.id}`
140
+					url: `/pages/handlecase/component/payList?id=${this.defalutVal.id}&type=${type}`
141 141
 				})
142 142
 			},
143 143
 			// 确认缴费
@@ -148,7 +148,12 @@
148 148
 			},
149 149
 			/**提交案件*/
150 150
 			onsubmitRow() {
151
-				caseAppSubmit().then(res => {
151
+				let onsubmitVal ={
152
+					id : this.defalutVal.id,
153
+					batchNumber:"",
154
+					caseFlowId:this.defalutVal.caseFlowId
155
+				}
156
+				caseAppSubmit(onsubmitVal).then(res => {
152 157
 					uni.showToast({
153 158
 						title: '提交成功',
154 159
 						icon: 'none',

+ 70
- 47
pages/handlecase/component/newlyAddedCase.vue Просмотреть файл

@@ -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)

+ 18
- 7
pages/handlecase/component/payList.vue Просмотреть файл

@@ -86,14 +86,27 @@
86 86
 					payType: 1,
87 87
 					payOrderList: [],
88 88
 					caseId: null
89
-				}
89
+				},
90
+				dataType:{},
91
+				formDataVal:{}
90 92
 			}
91 93
 		},
92 94
 		methods: {
93 95
 			/**获取案件缴费信息*/
94 96
 			getData(parms) {
95 97
 				selectById(parms).then(res => {
96
-					this.formData = res.data
98
+					this.formData = res.data
99
+					if(this.dataType.type==4){
100
+						this.formDataVal ={
101
+							annexType: 4,
102
+							id: this.formData.id
103
+						}
104
+					}else if(this.dataType.type==9){
105
+						this.formDataVal ={
106
+							annexType: 9,
107
+							id: this.formData.id
108
+						}
109
+					}
97 110
 				})
98 111
 			},
99 112
 			/**生成二维码*/
@@ -130,10 +143,7 @@
130 143
 					header: {
131 144
 						Authorization: getToken() || '',
132 145
 					},
133
-					formData: {
134
-						annexType: 4,
135
-						id: this.formData.id
136
-					},
146
+					formData:this.formDataVal,
137 147
 					name: 'file',
138 148
 					success: (res) => {
139 149
 						let {
@@ -216,7 +226,8 @@
216 226
 				this.confirmPaymentFn(this.submitForm);
217 227
 			}
218 228
 		},
219
-		onLoad(data) {
229
+		onLoad(data) {
230
+			this.dataType = data
220 231
 			this.getData({
221 232
 				id: data.id
222 233
 			});