Blame view

pages/intentionApply/intentionApply.vue 15.4 KB
abd11604   monkeyhouyi   物业缴费
1
2
3
4
5
6
7
8
9
10
11
12
13
  <template>
  </template>
  
  <script>
  </script>
  
  <style>
  </style><template>
  	<view class="page">
  		<view class="steps-box">
  			<u-steps :list="numList" :current="active"></u-steps>
  		</view>
  		<view>
354e3811   杨鑫   '验收'
14
  			<view class="add-list" v-show="active == 0">
abd11604   monkeyhouyi   物业缴费
15
  				<u-form labelPosition="left" :model="model1" :rules="rules" ref="uForm" :labelWidth="250">
354e3811   杨鑫   '验收'
16
17
18
19
  					<u-form-item label="租用开始时间" prop="rentalPeriodStartTime" borderBottom>
  						
  				<u-input v-model="model1.rentalPeriodStartTime" type="select" @click="TimeStratshow = true" placeholder="请选择"/>
  				<u-picker mode="time" v-model="TimeStratshow" :params="params" @confirm="startTimeChange"></u-picker>			
abd11604   monkeyhouyi   物业缴费
20
  					</u-form-item>
354e3811   杨鑫   '验收'
21
22
23
24
25
26
27
  					<u-form-item label="租用结束时间" prop="rentalPeriodEndTime" borderBottom>	
  					<u-input v-model="model1.rentalPeriodEndTime" type="select" @click="TimeEndshow = true" placeholder="请选择"/>
  					<u-picker mode="time" v-model="TimeEndshow" :params="params" @confirm="EndTimeChange"></u-picker>			
  
  					</u-form-item>
  					<u-form-item label="租期" prop="leaseTerm" borderBottom>
  						<u-input v-model="model1.leaseTerm" placeholder="请输入/年或/月或/日" ></u-input>
abd11604   monkeyhouyi   物业缴费
28
  					</u-form-item>
354e3811   杨鑫   '验收'
29
30
  					<u-form-item label="意向经营类型" prop="intentionalBusinessType" borderBottom>
  						<u-input v-model="model1.intentionalBusinessType" type="select" @click="leiXpopup = true" placeholder="请选择"/>
abd11604   monkeyhouyi   物业缴费
31
  					</u-form-item>
354e3811   杨鑫   '验收'
32
33
  					<u-form-item label="意向区域(如有)" prop="intendedArea" borderBottom>
  						<u-input v-model="model1.intendedArea" ></u-input>
abd11604   monkeyhouyi   物业缴费
34
  					</u-form-item>
354e3811   杨鑫   '验收'
35
36
  					<u-form-item label="意向商铺位置(如有)" prop="intentionalStoreLocation" borderBottom>
  						<u-input v-model="model1.intentionalStoreLocation" ></u-input>
abd11604   monkeyhouyi   物业缴费
37
  					</u-form-item>
354e3811   杨鑫   '验收'
38
39
  					<u-form-item label="意向商铺名称(如有)" prop="intentionalStoreName" borderBottom>
  						<u-input v-model="model1.intentionalStoreName" ></u-input>
abd11604   monkeyhouyi   物业缴费
40
41
42
  					</u-form-item>
  				</u-form>
  			</view>
354e3811   杨鑫   '验收'
43
44
  			
  			<view class="add-list" v-show='active == 1'>
abd11604   monkeyhouyi   物业缴费
45
  				<u-form labelPosition="left" :model="model1" :rules="rules" ref="uForm" :labelWidth="250">
354e3811   杨鑫   '验收'
46
47
  					<u-form-item label="主体名称" prop="subjectName" borderBottom>
  						<u-input v-model="model1.subjectName" ></u-input>
abd11604   monkeyhouyi   物业缴费
48
  					</u-form-item>
354e3811   杨鑫   '验收'
49
50
  					<u-form-item label="统一社会信用代码" prop="unifiedSocialCreditCode" borderBottom>
  						<u-input v-model="model1.unifiedSocialCreditCode" ></u-input>
abd11604   monkeyhouyi   物业缴费
51
52
  					</u-form-item>
  					<u-form-item label="类型" prop="type" borderBottom>
354e3811   杨鑫   '验收'
53
54
55
56
  						<u-input v-model="model1.type" type="select" @click="typeShow = true" placeholder='请选择类型'/>
  					</u-form-item>
  					<u-form-item label="法定代表人" prop="legalRepresentative" borderBottom>
  						<u-input v-model="model1.legalRepresentative" ></u-input>
abd11604   monkeyhouyi   物业缴费
57
  					</u-form-item>
354e3811   杨鑫   '验收'
58
59
  					<u-form-item label="经营范围" prop="businessScope" borderBottom>
  						<u-input v-model="model1.businessScope" ></u-input>
abd11604   monkeyhouyi   物业缴费
60
  					</u-form-item>
354e3811   杨鑫   '验收'
61
62
  					<u-form-item label="注册资本" prop="registeredCapital" borderBottom>
  						<u-input v-model="model1.registeredCapital" ></u-input>
abd11604   monkeyhouyi   物业缴费
63
  					</u-form-item>
354e3811   杨鑫   '验收'
64
65
  					<u-form-item label="成立日期" prop="establishmentDate" borderBottom>
  						<u-input v-model="model1.establishmentDate" ></u-input>
abd11604   monkeyhouyi   物业缴费
66
  					</u-form-item>
354e3811   杨鑫   '验收'
67
68
  					<u-form-item label="住所" prop="address" borderBottom>
  						<u-input v-model="model1.address" ></u-input>
abd11604   monkeyhouyi   物业缴费
69
  					</u-form-item>
354e3811   杨鑫   '验收'
70
71
  					<u-form-item label="邮箱地址" prop="emailAddress" borderBottom>
  						<u-input v-model="model1.emailAddress" ></u-input>
abd11604   monkeyhouyi   物业缴费
72
  					</u-form-item>
354e3811   杨鑫   '验收'
73
74
75
  					<u-form-item label="经营开始时间" prop="businessStartTime" borderBottom>
  						<u-input v-model="model1.businessStartTime" type="select" @click="busStartshow = true" placeholder="请选择"/>
  						<u-picker mode="time" v-model="busStartshow" :params="params" @confirm="busStTimeChange"></u-picker>	
abd11604   monkeyhouyi   物业缴费
76
  					</u-form-item>
354e3811   杨鑫   '验收'
77
78
79
  					<u-form-item label="经营结束时间" prop="businessEndTime" borderBottom>
  						<u-input v-model="model1.businessEndTime" type="select" @click="busEndtshow = true" placeholder="请选择"/>
  						<u-picker mode="time" v-model="busEndtshow" :params="params" @confirm="busEndTimeChange"></u-picker>	
abd11604   monkeyhouyi   物业缴费
80
  					</u-form-item>
354e3811   杨鑫   '验收'
81
82
83
  					
  					<u-form-item label="营业执照" prop="businessLicense" borderBottom labelPosition="top">
  						<u-upload :action="$upload"  :auto-upload="true"  ref="businessLicense" :max-count="1" ></u-upload>
abd11604   monkeyhouyi   物业缴费
84
85
86
  					</u-form-item>
  				</u-form>
  			</view>
354e3811   杨鑫   '验收'
87
  			<view v-show='active == 2'>
abd11604   monkeyhouyi   物业缴费
88
89
  				<u-form labelPosition="left" :model="model1" :rules="rules" ref="uForm" :labelWidth="250">
  					<view class="add-list">
354e3811   杨鑫   '验收'
90
91
  						<u-form-item label="经营者姓名" prop="intentCustomerName" borderBottom>
  							<u-input v-model="model1.intentCustomerName" ></u-input>
abd11604   monkeyhouyi   物业缴费
92
  						</u-form-item>
354e3811   杨鑫   '验收'
93
94
95
  						<u-form-item label="证件类型" prop="idCardType" borderBottom>
  							<u-input v-model="model1.idCardType" type="select" @click="IdtypeShow = true" placeholder='请选择类型'/>
  							
abd11604   monkeyhouyi   物业缴费
96
  						</u-form-item>
354e3811   杨鑫   '验收'
97
98
  						<u-form-item label="身份证号码" prop="idCardNumber" borderBottom>
  							<u-input v-model="model1.idCardNumber" ></u-input>
abd11604   monkeyhouyi   物业缴费
99
  						</u-form-item>
354e3811   杨鑫   '验收'
100
101
102
103
104
105
106
107
  						
  						<u-form-item label="身份证有效开始时间" prop="idCardValidStart" borderBottom>
  							<u-input v-model="model1.idCardValidStart" type="select" @click="idCardStartshow = true" placeholder="请选择"/>
  							<u-picker mode="time" v-model="idCardStartshow" :params="params1" @confirm="idCardStTimeChange"></u-picker>	
  						</u-form-item>
  						<u-form-item label="身份证有效结束时间" prop="idCardValidEnd" borderBottom>
  							<u-input v-model="model1.idCardValidEnd" type="select" @click="idCardEndtshow = true" placeholder="请选择"/>
  							<u-picker mode="time" v-model="idCardEndtshow" :params="params1" @confirm="idCardEndTimeChange"></u-picker>	
abd11604   monkeyhouyi   物业缴费
108
109
110
111
112
  						</u-form-item>
  					</view>
  					<view class="add-list">
  						<view class="deom-box">
  							<view class="img-deom">
354e3811   杨鑫   '验收'
113
  								<u-upload :action="$upload"  :custom-btn="true" :max-count="1" ref="idCardzhen">
abd11604   monkeyhouyi   物业缴费
114
  									<view slot="addBtn" class="slot-btn" hover-class="slot-btn__hover" hover-stay-time="150">
354e3811   杨鑫   '验收'
115
  										<u-image width="304rpx" height="182rpx"  :src="$imgUrl('/uploadID1.png')"></u-image>
abd11604   monkeyhouyi   物业缴费
116
117
118
119
  									</view>
  								</u-upload>
  								<text>点击上传证件人像面</text>
  							</view>
354e3811   杨鑫   '验收'
120
121
  							<view class="img-deom">	
  								<u-upload :action="$upload"  :custom-btn="true" :max-count="1"  ref="idCardFan">
abd11604   monkeyhouyi   物业缴费
122
  									<view slot="addBtn" class="slot-btn" hover-class="slot-btn__hover" hover-stay-time="150">
354e3811   杨鑫   '验收'
123
  										<u-image width="304rpx" height="182rpx"  :src="$imgUrl('/uploadID2.png')" ></u-image>
abd11604   monkeyhouyi   物业缴费
124
125
126
127
128
129
130
131
132
133
  									</view>
  								</u-upload>
  								<text>点击上传证件国徽面</text>
  							</view>
  						</view>
  					</view>	
  					<view class="add-list">
  						<view style="line-height: 60rpx;">上传示例</view>
  						<view class="deom-box">
  							<view class="img-deom">
354e3811   杨鑫   '验收'
134
  								<u-image width="304rpx" height="182rpx"  :src="$imgUrl('/front-icon.png')"></u-image>
abd11604   monkeyhouyi   物业缴费
135
136
137
  								<text>人脸示例图</text>
  							</view>
  							<view class="img-deom">
354e3811   杨鑫   '验收'
138
  								<u-image width="304rpx" height="182rpx"  :src="$imgUrl('/back-icon.png')"></u-image>
abd11604   monkeyhouyi   物业缴费
139
140
141
142
143
144
  								<text>国徽面示例图</text>
  							</view>
  						</view>
  					</view>
  					<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">
354e3811   杨鑫   '验收'
145
146
  						<u-form-item label="是否为法人" prop="isLegalPerson" borderBottom>
  							<u-radio-group v-model="model1.isLegalPerson">
abd11604   monkeyhouyi   物业缴费
147
  								<u-radio :name="1">是</u-radio>
354e3811   杨鑫   '验收'
148
  								<u-radio :name="0">否</u-radio>
abd11604   monkeyhouyi   物业缴费
149
150
  							</u-radio-group>
  						</u-form-item>
354e3811   杨鑫   '验收'
151
152
  						<u-form-item label="企业授权书" prop="enter" borderBottom labelPosition="top">
  							<u-upload :action="$upload"  :auto-upload="true"  ref="enter" :max-count="1" ></u-upload>
abd11604   monkeyhouyi   物业缴费
153
154
155
156
157
  						</u-form-item>
  					</view>
  				</u-form>
  			</view>
  		</view>
354e3811   杨鑫   '验收'
158
159
160
161
162
  		<u-toast ref="uToast" />
  		<u-select v-model="leiXpopup" mode="mutil-column-auto" :list="leiXinglist" @confirm="leiXpops" label-name="label" value-name="value"></u-select>
  		<u-select v-model="typeShow" :list="activesType" @confirm="typeChange"></u-select>
  		<u-select v-model="IdtypeShow" :list="idType" @confirm="IdtypeChange"></u-select>
  		
abd11604   monkeyhouyi   物业缴费
163
164
165
166
167
168
169
170
171
172
173
174
175
  		<!-- 保存按钮 -->
  		<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>
  		</view>
  	</view>
  </template>
  
  <script>
  	export default {
  		data() {
  			return {
354e3811   杨鑫   '验收'
176
  				active: 0,
abd11604   monkeyhouyi   物业缴费
177
  				numList: [{name: '意向申请'}, {name: '主体信息'}, {name: '经营者信息'}],
354e3811   杨鑫   '验收'
178
179
180
181
182
183
  				// model1: {
  				// 	name: '',
  				// 	type: '',
  				// 	typeShow: false,
  				// 	fileList: [], // 文件列表
  				// },
abd11604   monkeyhouyi   物业缴费
184
  				model1: {
354e3811   杨鑫   '验收'
185
186
187
188
189
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
218
  				  intentCustomerName: '', //意向客户名称
  				  contactPhone: '', //联系电话
  				  entityType: '', //主体类型
  				  customerLevel: '', //客户级别
  				  isLegalPerson: '', //是否为法人(0:否,1:是)
  				  enterpriseAuthorization: '', //企业授权书
  				  idCardNumber: '', //身份证号
  				  idCardType: '', //证件类型
  				  idCardValidStart: '', //身份证有效开始时间
  				  idCardValidEnd: '', //身份证有效结束时间
  				  idCardPhotoFront: '', //身份证照片(正面)
  				  idCardPhotoBack: '', //身份证照片(反面)
  				  subjectName: '', //主体名称
  				  unifiedSocialCreditCode: '', //统一社会信用代码
  				  type: '', //类型(可能是企业类型等)
  				  legalRepresentative: '', //法定代表人
  				  businessScope: '', //经营范围
  				  registeredCapital: '', //注册资本
  				  establishmentDate: '', //成立日期
  				  address: '', //住所
  				  emailAddress: '', //邮箱地址
  				  businessStartTime: '', //营业开始时间(如果为全天,则可为NULL或指定默认时
  				  businessEndTime: '', //营业结束时间(如果为全天,则可为NULL或指定默认时
  				  businessLicense: '', //营业执照(存储路径或URL)
  				  intendedResources: '', //意向资源
  				  auditStatus:'1',
  				  rentalPeriodStartTime:'',
  				  rentalPeriodEndTime:'',
  				  leaseTerm:'',
  				  rent:'',
  				  intentionalBusinessType:'',
  				  intendedArea:'',
  				  intentionalStoreLocation:'',
  				  intentionalStoreName:''
abd11604   monkeyhouyi   物业缴费
219
  				},
354e3811   杨鑫   '验收'
220
221
  				TimeStratshow:false,
  				TimeEndshow:false,
abd11604   monkeyhouyi   物业缴费
222
223
224
225
  				rules: {},
  				// 类型
  				showType: false,
  				activesType: [
354e3811   杨鑫   '验收'
226
227
  					{value:1 , label: '个人'},
  					{value:2 , label: '企业'},
abd11604   monkeyhouyi   物业缴费
228
  				],
354e3811   杨鑫   '验收'
229
230
231
232
  				idType: [
  					{value:1 , label: '身份证'},
  				],
  				
abd11604   monkeyhouyi   物业缴费
233
234
  				// 上传文件
  				active: '', // 地址
354e3811   杨鑫   '验收'
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
  				ziyuanId:'',
  				params: {
  					year: true,
  					month: true,
  					day: true,
  				},
  				params1: {
  					year: true,
  					month: true,
  					day: true
  				},
  				leiXinglist: [{
  						value: '商铺',
  						label: '商铺'
  					},
  					{
  						value: '场地',
  						label: '场地'
  					},
  					{
  						value: '广告位',
  						label: '广告位'
  					}
  				],
  				leiXpopup :false,
  				typeShow:false,
  				IdtypeShow:false,
  				busStartshow:false,
  				busEndtshow:false,
  				idCardStartshow:false,
abd11604   monkeyhouyi   物业缴费
265
  				
354e3811   杨鑫   '验收'
266
267
268
  				idCardEndtshow:false,
  				
  			}
abd11604   monkeyhouyi   物业缴费
269
270
  		},
  		onLoad(option) {
354e3811   杨鑫   '验收'
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
  			this.ziyuanId = option.ids
  		},
  		onShow() {
  		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'
  					 })
  				 }
  			 })
  		  }		
  		
abd11604   monkeyhouyi   物业缴费
303
304
  		},
  		methods:{
354e3811   杨鑫   '验收'
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
  			startTimeChange(val) {
  				this.model1.rentalPeriodStartTime = this.timeChange(val)
  				this.model1.rentalPeriodEndTime = ''
  			},
  			EndTimeChange(val){
  				const time = this.timeChange(val);
  				if(new Date(time).getTime() > new Date(this.model1.rentalPeriodStartTime).getTime()) {
  					this.model1.rentalPeriodEndTime= time
  				} else {
  					this.$refs.uToast.show({
  						title: '结束时间不能小于开始时间',
  						type: 'error',
  					})
  				}
  			},
  			timeChange(val) {
  				const { year, month, day} = val;
  				return `${year}-${month}-${day}`;	
  			},
  			timeChange1(val) {
  				const { year, month, day } = val;
  				return `${year}-${month}-${day}`;
  			},
abd11604   monkeyhouyi   物业缴费
328
329
330
  			typeChange(e) {
  				this.model1.type = e[0].label;
  			},
354e3811   杨鑫   '验收'
331
332
333
  			IdtypeChange(e) {
  				this.model1.idCardType = e[0].label;
  			},
abd11604   monkeyhouyi   物业缴费
334
  			go(){
354e3811   杨鑫   '验收'
335
336
337
338
339
340
341
  				let  busfiles = []
  				let idfilesz = []
  				let idfilesf= []
  				let enterper= []
  				// 通过filter,筛选出上传进度为100的文件(因为某些上传失败的文件,进度值不为100,这个是可选的操作)
  				busfiles = this.$refs.businessLicense.lists.filter(val => {
  					return val.progress == 100;
abd11604   monkeyhouyi   物业缴费
342
  				})
354e3811   杨鑫   '验收'
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
  				idfilesz = this.$refs.idCardzhen.lists.filter(val => {
  					return val.progress == 100;
  				})
  				idfilesf = this.$refs.idCardFan.lists.filter(val => {
  					return val.progress == 100;
  				})
  				enterper = this.$refs.enter.lists.filter(val => {
  					return val.progress == 100;
  				})
  				
  				busfiles.map(item=>{
  					this.model1.businessLicense  = item.response.data.url
  				})
  				idfilesz.map(item=>{
  					this.model1.idCardPhotoFront  = item.response.data.url
  				})
  				idfilesf.map(item=>{
  					this.model1.idCardPhotoBack  = item.response.data.url
  				})
  				enterper.map(item=>{
  					this.model1.enterpriseAuthorization  = item.response.data.url
  				})
  				   this.model1.intendedResources  =  this.ziyuanId
  				 this.model1.createUser =  uni.getStorageSync('shopId')
  				this.$http.sendRequest('/cereCustomerInfo/add', 'POST',this.model1,1).then(res => {
  				     uni.switchTab({
  				     	url: '/pages/home/home'
  				     })
  				})
  				// uni.navigateTo({
  				// 	url: '/pages/record/record'
  				// })
abd11604   monkeyhouyi   物业缴费
375
376
377
378
379
380
381
382
  			},
  			// 上一步
  			toBefor() {
  				this.active = +this.active - 1;
  			},
  			// 下一步
  			toNext() {
  				this.active = +this.active + 1;
354e3811   杨鑫   '验收'
383
384
385
386
387
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
  			},
  			leiXpops(val){	
  				this.model1.intentionalBusinessType =  val[0].label
  			},
  			busStTimeChange(val){
  				this.model1.businessStartTime = this.timeChange(val)
  				this.model1.businessEndTime = ''
  			},
  			busEndTimeChange(val){
  				const time = this.timeChange(val);
  				
  				if(new Date(time).getTime() > new Date(this.model1.businessStartTime).getTime()) {
  					this.model1.businessEndTime= time
  				} else {
  					this.$refs.uToast.show({
  						title: '结束时间不能小于开始时间',
  						type: 'error',
  					})
  				}
  			},
  			idCardStTimeChange(val){
  				this.model1.idCardValidStart = this.timeChange1(val)
  				this.model1.idCardValidEnd = ''
  			},
  			idCardEndTimeChange(val){
  			const time = this.timeChange1(val);
  			
  			if(new Date(time).getTime() > new Date(this.model1.idCardValidStart).getTime()) {
  				this.model1.idCardValidEnd= time
  			} else {
  				this.$refs.uToast.show({
  					title: '结束时间不能小于开始时间',
  					type: 'error',
  				})
  			}	
  			},
  			
abd11604   monkeyhouyi   物业缴费
420
421
422
423
424
425
426
  		}
  	}
  </script>
  
  <style scoped lang="scss">
  	@import 'intentionApply.scss';
  </style>