Blame view

lvdao-miniapp/pages/leaseAdd/leaseAdd.vue 20.1 KB
3f535f30   杨鑫   '初始'
1
2
  <template>
  	<view class="page">
e5b57447   杨鑫   '分包问卷'
3
4
5
6
7
8
  		<view class="steps-box">
  			<u-steps :list="numList" :current="active"></u-steps>
  		</view>
  		<view>
  			<view class="add-list" v-show="active == 0">
  				<u-form labelPosition="left" :model="model1" :rules="rules" ref="uForm" :labelWidth="250">
d64cd58f   wesley88   上传验收小程序
9
  					<u-form-item label="*经营用途" prop="businessPurpose" borderBottom>
e5b57447   杨鑫   '分包问卷'
10
11
  						<u-input v-model="model1.businessPurpose"></u-input>
  					</u-form-item>
d64cd58f   wesley88   上传验收小程序
12
  					<u-form-item label="*意向租期" prop="intendedLeaseTerm" placeholder="请输入月、年" borderBottom>
e5b57447   杨鑫   '分包问卷'
13
14
  						<u-input v-model="model1.intendedLeaseTerm"></u-input>
  					</u-form-item>
d64cd58f   wesley88   上传验收小程序
15
  					<u-form-item label="*经营主体" prop="operatingEntity" borderBottom>
e5b57447   杨鑫   '分包问卷'
16
17
18
  						<u-input v-model="model1.operatingEntity"></u-input>
  					</u-form-item>
  				</u-form>
3f535f30   杨鑫   '初始'
19
  			</view>
77d98715   杨鑫   '小程序'
20
21
  			<view class="add-list" v-show="active == 0">
  				<u-form labelPosition="left" :model="model1" :rules="rules" ref="uForm" :labelWidth="250">
d64cd58f   wesley88   上传验收小程序
22
23
  					<u-form-item label="*租金方案" prop="businessPurpose" borderBottom>
  						<u-input v-model="model1.fangan" type="select" @click="celueShow = true" placeholder='请选择类型' />
77d98715   杨鑫   '小程序'
24
  					</u-form-item>
d64cd58f   wesley88   上传验收小程序
25
26
27
28
29
  					<view style="padding: 10rpx; color: #31AA6A;font-size: 18px;">
  						{{zujin}}
  					</view>
  					<u-form-item v-if="zhengce" label="优惠政策" prop="intendedLeaseTerm" borderBottom>
  
77d98715   杨鑫   '小程序'
30
31
  						<u-parse :html="zhengce"></u-parse>
  					</u-form-item>
d64cd58f   wesley88   上传验收小程序
32
33
  					<u-form-item v-if="shuoming" label="其他说明" prop="operatingEntity" borderBottom>
  
77d98715   杨鑫   '小程序'
34
35
36
37
  						<u-parse :html="shuoming"></u-parse>
  					</u-form-item>
  				</u-form>
  			</view>
e5b57447   杨鑫   '分包问卷'
38
39
  			<view class="add-list" v-show='active == 1'>
  				<u-form labelPosition="left" :model="model1" :rules="rules" ref="uForm" :labelWidth="250">
d64cd58f   wesley88   上传验收小程序
40
  					<u-form-item label="*主体名称" prop="entityName" borderBottom>
e5b57447   杨鑫   '分包问卷'
41
42
  						<u-input v-model="model1.entityName"></u-input>
  					</u-form-item>
d64cd58f   wesley88   上传验收小程序
43
  					<u-form-item label="*统一社会信用代码" prop="unifiedSocialCreditCode" borderBottom>
e5b57447   杨鑫   '分包问卷'
44
45
  						<u-input v-model="model1.unifiedSocialCreditCode"></u-input>
  					</u-form-item>
d64cd58f   wesley88   上传验收小程序
46
  					<u-form-item label="*主体类型" prop="entityType" borderBottom>
e5b57447   杨鑫   '分包问卷'
47
48
49
  						<u-input v-model="model1.entityType" type="select" @click="typeShow = true"
  							placeholder='请选择类型' />
  					</u-form-item>
d64cd58f   wesley88   上传验收小程序
50
  					<u-form-item label="*法定代表人" prop="legalRepresentative" borderBottom>
e5b57447   杨鑫   '分包问卷'
51
52
  						<u-input v-model="model1.legalRepresentative"></u-input>
  					</u-form-item>
d64cd58f   wesley88   上传验收小程序
53
  					<u-form-item label="*经营范围" prop="businessScope" borderBottom>
e5b57447   杨鑫   '分包问卷'
54
55
  						<u-input v-model="model1.businessScope"></u-input>
  					</u-form-item>
d64cd58f   wesley88   上传验收小程序
56
  					<u-form-item label="*注册资本" prop="registeredCapital" borderBottom>
e5b57447   杨鑫   '分包问卷'
57
58
  						<u-input v-model="model1.registeredCapital"></u-input>
  					</u-form-item>
d64cd58f   wesley88   上传验收小程序
59
  					<u-form-item label="*成立日期" prop="establishmentDate" borderBottom>
e5b57447   杨鑫   '分包问卷'
60
61
  						<u-input v-model="model1.establishmentDate"></u-input>
  					</u-form-item>
d64cd58f   wesley88   上传验收小程序
62
  					<u-form-item label="*住所" prop="residence" borderBottom>
e5b57447   杨鑫   '分包问卷'
63
64
  						<u-input v-model="model1.residence"></u-input>
  					</u-form-item>
d64cd58f   wesley88   上传验收小程序
65
  					<u-form-item label="*邮箱地址" prop="emailAddress" borderBottom>
e5b57447   杨鑫   '分包问卷'
66
67
  						<u-input v-model="model1.emailAddress"></u-input>
  					</u-form-item>
d64cd58f   wesley88   上传验收小程序
68
  					<u-form-item label="*经营开始时间" prop="businessStartDate" borderBottom>
e5b57447   杨鑫   '分包问卷'
69
70
71
72
73
  						<u-input v-model="model1.businessStartDate" type="select" @click="busStartshow = true"
  							placeholder="请选择" />
  						<u-picker mode="time" v-model="busStartshow" :params="params"
  							@confirm="busStTimeChange"></u-picker>
  					</u-form-item>
d64cd58f   wesley88   上传验收小程序
74
  					<u-form-item label="*经营结束时间" prop="businessEndDate" borderBottom>
e5b57447   杨鑫   '分包问卷'
75
76
77
78
79
  						<u-input v-model="model1.businessEndDate" type="select" @click="busEndtshow = true"
  							placeholder="请选择" />
  						<u-picker mode="time" v-model="busEndtshow" :params="params"
  							@confirm="busEndTimeChange"></u-picker>
  					</u-form-item>
d64cd58f   wesley88   上传验收小程序
80
81
82
  					<u-form-item label="*营业执照" prop="businessLicense" borderBottom labelPosition="top">
  						<u-upload :action="$upload" :auto-upload="false" ref="businessLicense" :max-count="1"
  							@on-choose-complete="(response, file, fileList) => onsuccess1(response, file, fileList, 'businessLicense')"></u-upload>
e5b57447   杨鑫   '分包问卷'
83
84
  					</u-form-item>
  				</u-form>
3f535f30   杨鑫   '初始'
85
  			</view>
e5b57447   杨鑫   '分包问卷'
86
87
88
  			<view v-show="active==2">
  				<u-form labelPosition="left" :model="model1" :rules="rules" ref="uForm" :labelWidth="250">
  					<view class="add-list">
d64cd58f   wesley88   上传验收小程序
89
  						<u-form-item label="*经营者姓名" prop="operatorName" borderBottom>
e5b57447   杨鑫   '分包问卷'
90
91
  							<u-input v-model="model1.operatorName"></u-input>
  						</u-form-item>
d64cd58f   wesley88   上传验收小程序
92
  						<u-form-item label="*证件类型" prop="idCardType" borderBottom>
e5b57447   杨鑫   '分包问卷'
93
94
95
  							<u-input v-model="model1.idCardType" type="select" @click="IdtypeShow = true"
  								placeholder='请选择类型' />
  						</u-form-item>
d64cd58f   wesley88   上传验收小程序
96
  						<u-form-item label="*身份证号码" prop="idNumber" borderBottom>
e5b57447   杨鑫   '分包问卷'
97
98
  							<u-input v-model="model1.idNumber"></u-input>
  						</u-form-item>
d64cd58f   wesley88   上传验收小程序
99
  						<u-form-item label="*有效开始时间" prop="idValidStart" borderBottom>
e5b57447   杨鑫   '分包问卷'
100
101
102
103
104
  							<u-input v-model="model1.idValidStart" type="select" @click="idCardStartshow = true"
  								placeholder="请选择" />
  							<u-picker mode="time" v-model="idCardStartshow" :params="params1"
  								@confirm="idCardStTimeChange"></u-picker>
  						</u-form-item>
d64cd58f   wesley88   上传验收小程序
105
  						<u-form-item label="*有效结束时间" prop="idValidEnd" borderBottom>
e5b57447   杨鑫   '分包问卷'
106
107
108
109
110
  							<u-input v-model="model1.idValidEnd" type="select" @click="idCardEndtshow = true"
  								placeholder="请选择" />
  							<u-picker mode="time" v-model="idCardEndtshow" :params="params1"
  								@confirm="idCardEndTimeChange"></u-picker>
  						</u-form-item>
3f535f30   杨鑫   '初始'
111
  					</view>
e5b57447   杨鑫   '分包问卷'
112
113
114
  					<view class="add-list">
  						<view class="deom-box">
  							<view class="img-deom">
d64cd58f   wesley88   上传验收小程序
115
116
117
  								<u-upload :action="$upload" :custom-btn="true"
  									@on-choose-complete="(response, file, fileList) => onsuccess1(response, file, fileList, 'idPhotoFront')"
  									:auto-upload="false" :max-count="1" ref="idPhotoFront">
e5b57447   杨鑫   '分包问卷'
118
119
120
121
122
123
124
125
126
  									<view slot="addBtn" class="slot-btn" hover-class="slot-btn__hover"
  										hover-stay-time="150">
  										<u-image width="304rpx" height="182rpx"
  											:src="$imgUrl('/uploadID1.png')"></u-image>
  									</view>
  								</u-upload>
  								<text>点击上传证件人像面</text>
  							</view>
  							<view class="img-deom">
d64cd58f   wesley88   上传验收小程序
127
128
129
  								<u-upload :action="$upload" :custom-btn="true"
  									@on-choose-complete="(response, file, fileList) => onsuccess1(response, file, fileList, 'idPhotoBack')"
  									:auto-upload="false" :max-count="1" ref="idPhotoBack">
e5b57447   杨鑫   '分包问卷'
130
131
132
133
134
135
136
137
138
  									<view slot="addBtn" class="slot-btn" hover-class="slot-btn__hover"
  										hover-stay-time="150">
  										<u-image width="304rpx" height="182rpx"
  											:src="$imgUrl('/uploadID2.png')"></u-image>
  									</view>
  								</u-upload>
  								<text>点击上传证件国徽面</text>
  							</view>
  						</view>
3f535f30   杨鑫   '初始'
139
  					</view>
e5b57447   杨鑫   '分包问卷'
140
141
142
143
144
145
146
147
148
149
150
151
  					<view class="add-list">
  						<view style="line-height: 60rpx;">上传示例</view>
  						<view class="deom-box">
  							<view class="img-deom">
  								<u-image width="304rpx" height="182rpx" :src="$imgUrl('/front-icon.png')"></u-image>
  								<text>人脸示例图</text>
  							</view>
  							<view class="img-deom">
  								<u-image width="304rpx" height="182rpx" :src="$imgUrl('/back-icon.png')"></u-image>
  								<text>国徽面示例图</text>
  							</view>
  						</view>
3f535f30   杨鑫   '初始'
152
  					</view>
e5b57447   杨鑫   '分包问卷'
153
154
155
156
  					<text
  						style="display: inline-block; font-size: 24rpx; line-height: 30px; margin: 24rpx 30rpx 0;">请拍摄证件原件,保证照片拍摄清晰,取图完整,不反光。</text>
  					<view class="add-list" labelPosition="left" :model="model1" :rules="rules" ref="uForm"
  						:labelWidth="250">
d64cd58f   wesley88   上传验收小程序
157
  						<u-form-item label="*是否为法人" prop="isLegalPerson" borderBottom>
e5b57447   杨鑫   '分包问卷'
158
159
160
161
162
  							<u-radio-group v-model="model1.isLegalPerson">
  								<u-radio :name="1">是</u-radio>
  								<u-radio :name="0">否</u-radio>
  							</u-radio-group>
  						</u-form-item>
d64cd58f   wesley88   上传验收小程序
163
  						<u-form-item label="*企业授权书" prop="enter" borderBottom labelPosition="top">
e5b57447   杨鑫   '分包问卷'
164
  
d64cd58f   wesley88   上传验收小程序
165
166
167
  							<u-upload :action="$upload" ref="enter" :max-count="1"
  								@on-choose-complete="(response, file, fileList) => onsuccess1(response, file, fileList, 'enterpriseAuthorization')"
  								:auto-upload="false"></u-upload>
e5b57447   杨鑫   '分包问卷'
168
  						</u-form-item>
3f535f30   杨鑫   '初始'
169
  					</view>
e5b57447   杨鑫   '分包问卷'
170
  				</u-form>
3f535f30   杨鑫   '初始'
171
172
  			</view>
  		</view>
e5b57447   杨鑫   '分包问卷'
173
  		<u-select v-model="typeShow" :list="activesType" @confirm="typeChange"></u-select>
77d98715   杨鑫   '小程序'
174
  		<u-select v-model="celueShow" :list="celueType" @confirm="celueChange"></u-select>
e5b57447   杨鑫   '分包问卷'
175
  		<u-select v-model="IdtypeShow" :list="idType" @confirm="IdtypeChange"></u-select>
3f535f30   杨鑫   '初始'
176
  		<!-- 保存按钮 -->
e5b57447   杨鑫   '分包问卷'
177
178
179
180
181
  		<view class="page-footer">
  			<u-button style="background-color: #DFE0E4; flex: 1; margin: 0 10px;" @click="toBefor"
  				v-if="active != 0">上一步</u-button>
  			<u-button type="success" style="flex: 1; margin: 0 10px;" @click="toNext" v-if="active != 2">下一步</u-button>
  			<u-button type="success" style="flex: 1; margin: 0 10px;" @click="go" v-if="active == 2">提交申请</u-button>
3f535f30   杨鑫   '初始'
182
183
184
185
186
187
188
189
  		</view>
  	</view>
  </template>
  
  <script>
  	export default {
  		data() {
  			return {
e5b57447   杨鑫   '分包问卷'
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
  				active: 0,
  				numList: [{
  					name: '租赁信息'
  				}, {
  					name: '主体信息'
  				}, {
  					name: '经营者信息'
  				}],
  				model1: {
  					businessPurpose: '',
  					intendedLeaseTerm: '',
  					operatingEntity: '',
  					entityName: '',
  					unifiedSocialCreditCode: '',
  					entityType: '',
  					legalRepresentative: '',
  					businessScope: '',
  					registeredCapital: '',
  					establishmentDate: '',
  					residence: '',
  					emailAddress: '',
  					businessStartDate: '',
  					businessEndDate: '',
  					operatorName: '',
  					idCardType: '',
  					idNumber: '',
  					idValidStart: '',
  					idValidEnd: '',
d64cd58f   wesley88   上传验收小程序
218
  					idPhotoFront: '',
e5b57447   杨鑫   '分包问卷'
219
220
221
  					idPhotoBack: '',
  					isLegalPerson: '',
  					enterpriseAuthorization: '',
77d98715   杨鑫   '小程序'
222
  					auditStatus: '1',
d64cd58f   wesley88   上传验收小程序
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
  					fangan: ''
  				},
  				rules: {
  					businessPurpose: [{
  						required: true,
  						message: '请输入经营用途',
  						trigger: 'blur'
  					}],
  					intendedLeaseTerm: [{
  						required: true,
  						message: '请输入意向租期',
  						trigger: 'blur'
  					}],
  					operatingEntity: [{
  						required: true,
  						message: '请输入经营主体',
  						trigger: 'blur'
  					}]
e5b57447   杨鑫   '分包问卷'
241
  				},
e5b57447   杨鑫   '分包问卷'
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
  				// 类型
  				showType: false,
  				params: {
  					year: true,
  					month: true,
  					day: true,
  				},
  				params1: {
  					year: true,
  					month: true,
  					day: true
  				},
  				TimeStratshow: false,
  				typeShow: false,
  				activesType: [{
  						value: 1,
0306d452   杨鑫   'x小程序'
258
  						label: '个体'
e5b57447   杨鑫   '分包问卷'
259
260
261
262
263
264
265
266
267
  					},
  					{
  						value: 2,
  						label: '企业'
  					},
  				],
  				idType: [{
  					value: 1,
  					label: '身份证'
77d98715   杨鑫   '小程序'
268
  				}],
d64cd58f   wesley88   上传验收小程序
269
  				celueType: [],
77d98715   杨鑫   '小程序'
270
  				celueShow: false,
e5b57447   杨鑫   '分包问卷'
271
272
273
274
275
  				IdtypeShow: false,
  				busStartshow: false,
  				busEndtshow: false,
  				idCardStartshow: false,
  				idCardEndtshow: false,
0306d452   杨鑫   'x小程序'
276
  				ziyuanId: '',
d64cd58f   wesley88   上传验收小程序
277
278
279
280
  				moban: [],
  				zhengce: '',
  				shuoming: '',
  				zujin: ''
3f535f30   杨鑫   '初始'
281
282
  			};
  		},
e5b57447   杨鑫   '分包问卷'
283
284
  		onLoad(option) {
  			this.ziyuanId = option.ids
77d98715   杨鑫   '小程序'
285
  			let paesize = {
d64cd58f   wesley88   上传验收小程序
286
287
288
  				pageNumber: 0,
  				pageSize: 10,
  				resourcesId: option.ids
77d98715   杨鑫   '小程序'
289
  			}
d64cd58f   wesley88   上传验收小程序
290
291
  			this.$http.sendRequest('/cereResourceStrategy/queryByResources', 'POST', paesize, 1).then(res => {
  
77d98715   杨鑫   '小程序'
292
  				this.moban = res.data.data
d64cd58f   wesley88   上传验收小程序
293
294
295
296
  				this.moban.map((item, index) => {
  					let obj = {
  						value: index,
  						label: item.policyName
77d98715   杨鑫   '小程序'
297
298
299
300
301
302
303
  					}
  					this.celueType.push(obj)
  				})
  			}).catch(err => {
  				console.log(err)
  				//请求失败
  			})
e5b57447   杨鑫   '分包问卷'
304
305
  		},
  		onShow() {
d64cd58f   wesley88   上传验收小程序
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
  			let shopId = {
  				shopId: uni.getStorageSync('shopId') || ''
  			}
  			const isLogin = uni.getStorageSync('token');
  			if (isLogin == '') {
  				// 如果未登录,跳转到登录页面
  				uni.navigateTo({
  					url: '/pages/login/login'
  				})
  			} else {
  				let page = {
  					condition: 2
  				}
  				this.$http.sendRequest('/shop/getById', 'POST', shopId).then(res => {
  					if (res.data.code != "20004") {
  						this.shopMsg = res.data.data
  						this.Islogin = false
  						this.$http.sendRequest('/index/index', 'POST', page).then(res => {
  							//成功回调
  							this.tongji = res.data.data
  						})
  					} else {
  						uni.navigateTo({
  							url: '/pages/login/login'
  						})
  					}
  				})
  			}
  
e5b57447   杨鑫   '分包问卷'
335
336
337
338
339
  		},
  		methods: {
  			typeChange(e) {
  				this.model1.entityType = e[0].label;
  			},
d64cd58f   wesley88   上传验收小程序
340
341
342
343
344
345
346
347
  			getCurrentTime() {
  				const now = new Date();
  				const year = now.getFullYear();
  				const month = ('0' + (now.getMonth() + 1)).slice(-2);
  				const day = ('0' + now.getDate()).slice(-2);
  				const hours = ('0' + now.getHours()).slice(-2);
  				const minutes = ('0' + now.getMinutes()).slice(-2);
  				const seconds = ('0' + now.getSeconds()).slice(-2);
e5b57447   杨鑫   '分包问卷'
348
  
d64cd58f   wesley88   上传验收小程序
349
  				return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`;
1ab21b43   杨鑫   '策略'
350
  			},
d64cd58f   wesley88   上传验收小程序
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
  			onsuccess1(e, file, fileList, ziduan) {
  				console.error(e, file, fileList, ziduan)
  				uni.uploadFile({
  					url: this.$upload, // 仅为示例,请替换为您的服务器上传接口
  					filePath: e[0].url,
  					name: 'file', // 后端接收的文件参数名
  					formData: {
  						filePath: 'xcx', // 其他表单数据
  					},
  					success: (uploadFileRes) => {
  						if (ziduan == 'businessLicense') {
  							this.model1.businessLicense = this.$img + JSON.parse(uploadFileRes.data).data
  						} else if (ziduan == 'idPhotoFront') {
  							this.model1.idPhotoFront = this.$img + JSON.parse(uploadFileRes.data).data
  						} else if (ziduan == 'idPhotoBack') {
  							this.model1.idPhotoBack = this.$img + JSON.parse(uploadFileRes.data).data
  						} else {
  							this.model1.enterpriseAuthorization = this.$img + JSON.parse(uploadFileRes.data).data
  						}
  
  						console.log('上传成功', this.model1);
  						uni.showToast({
  							title: '上传成功',
  							icon: 'success',
  						});
  					},
  					fail: (err) => {
  						console.error('上传失败', err);
  						uni.showToast({
  							title: '上传失败',
  							icon: 'none',
  						});
  					},
1ab21b43   杨鑫   '策略'
384
385
  				});
  			},
d64cd58f   wesley88   上传验收小程序
386
  			chek() {
e5b57447   杨鑫   '分包问卷'
387
  
d64cd58f   wesley88   上传验收小程序
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
  				if (!this.model1.operatorName) {
  					uni.showToast({
  						icon: 'none',
  						title: '请输入经营者姓名'
  					});
  					return;
  				}
  				if (!this.model1.idCardType) {
  					uni.showToast({
  						icon: 'none',
  						title: '请选择证件类型'
  					});
  					return;
  				}
  				if (!this.model1.idNumber) {
  					uni.showToast({
  						icon: 'none',
  						title: '请输入身份证号码'
  					});
  					return;
  				}
  				if (!this.model1.idValidStart) {
  					uni.showToast({
  						icon: 'none',
  						title: '请选择有效开始时间'
  					});
  					return;
  				}
  				if (!this.model1.idValidEnd) {
  					uni.showToast({
  						icon: 'none',
  						title: '请选择有效结束时间'
  					});
  					return;
  				}
  				if (!this.model1.idPhotoFront.length) {
  					uni.showToast({
  						icon: 'none',
  						title: '请上传证件人像面'
  					});
  					return;
  				}
  				if (!this.model1.idPhotoBack.length) {
  					uni.showToast({
  						icon: 'none',
  						title: '请上传证件国徽面'
  					});
  					return;
  				}
  				if (this.model1.isLegalPerson === null || this.model1.isLegalPerson === undefined) {
  					uni.showToast({
  						icon: 'none',
  						title: '请选择是否为法人'
  					});
  					return;
  				}
  				if (!this.model1.enterpriseAuthorization.length) {
  					uni.showToast({
  						icon: 'none',
  						title: '请上传企业授权书'
  					});
  					return;
  				}
  			},
  			go() {
e5b57447   杨鑫   '分包问卷'
453
454
455
  				this.model1.rentalResourcesId = this.ziyuanId
  				this.model1.applicant = uni.getStorageSync('shopId')
  				this.model1.applicationTime = this.getCurrentTime()
d64cd58f   wesley88   上传验收小程序
456
  				this.chek()
1ab21b43   杨鑫   '策略'
457
  				console.log(this.model1)
d64cd58f   wesley88   上传验收小程序
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
  				let info = {
  					...this.model1,
  					businessLicense:this.model1.businessLicense.replace(this.$img,''),
  					idPhotoFront:this.model1.idPhotoFront.replace(this.$img,''),
  					idPhotoBack:this.model1.idPhotoBack.replace(this.$img,''),
  					enterpriseAuthorization:this.model1.enterpriseAuthorization.replace(this.$img,''),
  				}
  				console.log(info)
  				// return
  				this.$http.sendRequest('/cereBusinessInfo/add', 'POST',info, 1).then(res => {
  					// uni.redirectTo({
  					// 	url: '/pages/record/record'
  					// })
  					uni.showToast({
  						title: '提交成功',
  						icon: 'none',
  					});
  					setTimeout(() => {
  						uni.navigateBack()
  					}, 1000)
  
e5b57447   杨鑫   '分包问卷'
479
480
481
482
483
484
485
486
  				})
  			},
  			// 上一步
  			toBefor() {
  				this.active = +this.active - 1;
  			},
  			// 下一步
  			toNext() {
d64cd58f   wesley88   上传验收小程序
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
  				if(this.active == '0') {
  					if (!this.model1.businessPurpose) {
  						uni.showToast({
  							icon: 'none',
  							title: '请输入经营用途'
  						});
  						return;
  					}
  					if (!this.model1.intendedLeaseTerm) {
  						uni.showToast({
  							icon: 'none',
  							title: '请输入意向租期'
  						});
  						return;
  					}
  					if (!this.model1.operatingEntity) {
  						uni.showToast({
  							icon: 'none',
  							title: '请输入经营主体'
  						});
  						return;
  					}
  					if (!this.model1.fangan) {
  						uni.showToast({
  							icon: 'none',
  							title: '请选择租金方案'
  						});
  						return;
  					}
  				} else if(this.active == '1') {
  					if (!this.model1.entityName) {
  						uni.showToast({
  							icon: 'none',
  							title: '请输入主体名称'
  						});
  						return;
  					}
  					if (!this.model1.unifiedSocialCreditCode) {
  						uni.showToast({
  							icon: 'none',
  							title: '请输入统一社会信用代码'
  						});
  						return;
  					}
  					if (!this.model1.entityType) {
  						uni.showToast({
  							icon: 'none',
  							title: '请选择主体类型'
  						});
  						return;
  					}
  					if (!this.model1.legalRepresentative) {
  						uni.showToast({
  							icon: 'none',
  							title: '请输入法定代表人'
  						});
  						return;
  					}
  					if (!this.model1.businessScope) {
  						uni.showToast({
  							icon: 'none',
  							title: '请输入经营范围'
  						});
  						return;
  					}
  					if (!this.model1.registeredCapital) {
  						uni.showToast({
  							icon: 'none',
  							title: '请输入注册资本'
  						});
  						return;
  					}
  					if (!this.model1.establishmentDate) {
  						uni.showToast({
  							icon: 'none',
  							title: '请输入成立日期'
  						});
  						return;
  					}
  					if (!this.model1.residence) {
  						uni.showToast({
  							icon: 'none',
  							title: '请输入住所'
  						});
  						return;
  					}
  					if (!this.model1.emailAddress) {
  						uni.showToast({
  							icon: 'none',
  							title: '请输入邮箱地址'
  						});
  						return;
  					}
  					if (!this.model1.businessStartDate) {
  						uni.showToast({
  							icon: 'none',
  							title: '请选择经营开始时间'
  						});
  						return;
  					}
  					if (!this.model1.businessEndDate) {
  						uni.showToast({
  							icon: 'none',
  							title: '请选择经营结束时间'
  						});
  						return;
  					}
  					if (!this.model1.businessLicense) {
  						uni.showToast({
  							icon: 'none',
  							title: '请上传营业执照'
  						});
  						return;
  					}
  				}
e5b57447   杨鑫   '分包问卷'
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
  				this.active = +this.active + 1;
  			},
  			startTimeChange(val) {
  				this.model1.scheduleTime = this.timeChange(val)
  			},
  			timeChange(val) {
  				const {
  					year,
  					month,
  					day,
  				} = val;
  				return `${year}-${month}-${day}`;
  			},
  			leiXpops(val) {
  				this.model1.intentionalBusinessType = val[0].label
  			},
d64cd58f   wesley88   上传验收小程序
618
  			celueChange(val) {
77d98715   杨鑫   '小程序'
619
  				this.model1.fangan = val[0].label
d64cd58f   wesley88   上传验收小程序
620
621
622
623
  				if (this.moban.length != 0) {
  					this.zhengce = this.moban[val[0].value].preferentialPolicy
  					this.shuoming = this.moban[val[0].value].otherDescription
  					this.zujin = this.moban[val[0].value].rentalPrice + '元/' + this.moban[val[0].value].leaseTerm
77d98715   杨鑫   '小程序'
624
  				}
d64cd58f   wesley88   上传验收小程序
625
  
77d98715   杨鑫   '小程序'
626
  			},
e5b57447   杨鑫   '分包问卷'
627
628
629
630
631
632
633
634
635
  			busStTimeChange(val) {
  				this.model1.businessStartDate = this.timeChange(val)
  				this.model1.businessEndDate = ''
  			},
  			busEndTimeChange(val) {
  				const time = this.timeChange(val);
  				if (new Date(time).getTime() > new Date(this.model1.businessStartDate).getTime()) {
  					this.model1.businessEndDate = time
  				} else {
d64cd58f   wesley88   上传验收小程序
636
637
638
  					uni.showToast({
  						icon: 'none',
  						title: '结束时间不能小于开始时间'
e5b57447   杨鑫   '分包问卷'
639
640
641
642
643
644
645
646
647
648
649
650
651
  					})
  				}
  			},
  			idCardStTimeChange(val) {
  				this.model1.idValidStart = this.timeChange1(val)
  				this.model1.idValidEnd = ''
  
  			},
  			idCardEndTimeChange(val) {
  				const time = this.timeChange1(val);
  				if (new Date(time).getTime() > new Date(this.model1.idValidStart).getTime()) {
  					this.model1.idValidEnd = time
  				} else {
d64cd58f   wesley88   上传验收小程序
652
653
654
  					uni.showToast({
  						icon: 'none',
  						title: '结束时间不能小于开始时间'
e5b57447   杨鑫   '分包问卷'
655
656
657
658
659
660
661
662
663
664
665
666
667
668
  					})
  				}
  			},
  			IdtypeChange(e) {
  				this.model1.idCardType = e[0].label;
  			},
  			timeChange1(val) {
  				const {
  					year,
  					month,
  					day
  				} = val;
  				return `${year}-${month}-${day}`;
  			},
3f535f30   杨鑫   '初始'
669
670
671
672
673
674
  		}
  	}
  </script>
  
  <style scoped lang="scss">
  	@import 'leaseAdd.scss';
e5b57447   杨鑫   '分包问卷'
675
  </style>