Blame view

lvdao-miniapp/pages/advertisementAdd/advertisementAdd.vue 21.7 KB
3f535f30   杨鑫   '初始'
1
2
  <template>
  	<view class="page">
e5b57447   杨鑫   '分包问卷'
3
4
5
6
7
  		<view class="steps-box">
  			<u-steps :list="numList" :current="active"></u-steps>
  		</view>
  		<view>
  			<view v-show="active == 0">
0fd8b750   杨鑫   '最新落地1'
8
  				<view style="padding:15px;margin-top:10px;">
1dbc0b2d   wesley88   1
9
10
  					<!-- :endDate="endDate" -->
  						<wu-calendar :insert="true" @change="calendarChange" slideSwitchMode="horizontal" mode="range" :selected="selected"  color="#3f9b6a" style="border-radius: 10px;" :data="today" :startDate="startDate" ></wu-calendar>
0fd8b750   杨鑫   '最新落地1'
11
12
  					</view>
  				
e5b57447   杨鑫   '分包问卷'
13
14
  				<u-form labelPosition="left" :model="model1" :rules="rules" ref="uForm" :labelWidth="250">
  					<view class="add-list">
440bccda   wesley88   1
15
  						<u-form-item :required="true" label="投放时段" prop="scheduleTime" borderBottom>
0fd8b750   杨鑫   '最新落地1'
16
17
18
19
20
  							<u-input v-model="model1.scheduleTime" type="select" placeholder="请选择上面时间" ></u-input>
  							<!-- <u-input v-model="model1.scheduleTime" type="select" @click="TimeStratshow = true"
  								placeholder="请选择" /> -->
  							<!-- <u-picker mode="time" v-model="TimeStratshow" :params="params"
  								@confirm="startTimeChange"></u-picker> -->
e5b57447   杨鑫   '分包问卷'
21
22
23
  						</u-form-item>
  					</view>
  					<view class="add-list">
440bccda   wesley88   1
24
  						<u-form-item :required="true" label="跳转类型" prop="advertisementContent" borderBottom>
e5b57447   杨鑫   '分包问卷'
25
26
  							<u-input v-model="model1.advertisementContent"></u-input>
  						</u-form-item>
440bccda   wesley88   1
27
  						<u-form-item :required="true" label="链接" prop="redirectUrl" borderBottom>
e5b57447   杨鑫   '分包问卷'
28
29
30
31
  							<u-input v-model="model1.redirectUrl"></u-input>
  						</u-form-item>
  					</view>
  					<view class="add-list">
440bccda   wesley88   1
32
  						<u-form-item :required="true" label="封面图片" prop="coverImage" borderBottom labelPosition="top">
0fd8b750   杨鑫   '最新落地1'
33
34
  							<u-upload :action="$upload" :auto-upload="false" ref="coverImage" :max-count="1"
  								@on-choose-complete="(response, file, fileList) => onsuccess1(response, file, fileList, 'coverImage')"></u-upload>
e5b57447   杨鑫   '分包问卷'
35
  						</u-form-item>
0fd8b750   杨鑫   '最新落地1'
36
37
38
  						<!-- <u-form-item label="封面图片" prop="coverImage" borderBottom labelPosition="top">
  							<u-upload :action="$upload" :auto-upload="true" ref="coverImage" :max-count="1"></u-upload>
  						</u-form-item> -->
e5b57447   杨鑫   '分包问卷'
39
40
  					</view>
  					<view class="add-list">
440bccda   wesley88   1
41
  						<u-form-item :required="true" label="广告标题" prop="adTitle" borderBottom labelPosition="top">
e5b57447   杨鑫   '分包问卷'
42
43
44
45
46
  							<u-input v-model="model1.adTitle" />
  						</u-form-item>
  					</view>
  
  				</u-form>
3f535f30   杨鑫   '初始'
47
  			</view>
e5b57447   杨鑫   '分包问卷'
48
49
50
51
52
53
  
  
  
  
  			<view class="add-list" v-show='active == 1'>
  				<u-form labelPosition="left" :model="model1" :rules="rules" ref="uForm" :labelWidth="250">
440bccda   wesley88   1
54
  					<u-form-item :required="true" label="主体名称" prop="subjectName" borderBottom>
e5b57447   杨鑫   '分包问卷'
55
56
  						<u-input v-model="model1.subjectName"></u-input>
  					</u-form-item>
440bccda   wesley88   1
57
  					<u-form-item :required="true" label="统一社会信用代码" prop="unifiedSocialCreditCode" borderBottom>
e5b57447   杨鑫   '分包问卷'
58
59
  						<u-input v-model="model1.unifiedSocialCreditCode"></u-input>
  					</u-form-item>
440bccda   wesley88   1
60
  					<u-form-item :required="true" label="类型" prop="type" borderBottom>
e5b57447   杨鑫   '分包问卷'
61
62
  						<u-input v-model="model1.type" type="select" @click="typeShow = true" placeholder='请选择类型' />
  					</u-form-item>
440bccda   wesley88   1
63
  					<u-form-item :required="true" label="法定代表人" prop="legalRepresentative" borderBottom>
e5b57447   杨鑫   '分包问卷'
64
65
  						<u-input v-model="model1.legalRepresentative"></u-input>
  					</u-form-item>
440bccda   wesley88   1
66
  					<u-form-item :required="true" label="经营范围" prop="businessScope" borderBottom>
e5b57447   杨鑫   '分包问卷'
67
68
  						<u-input v-model="model1.businessScope"></u-input>
  					</u-form-item>
440bccda   wesley88   1
69
  					<u-form-item :required="true" label="注册资本" prop="registeredCapital" borderBottom>
e5b57447   杨鑫   '分包问卷'
70
71
  						<u-input v-model="model1.registeredCapital"></u-input>
  					</u-form-item>
440bccda   wesley88   1
72
  					<u-form-item :required="true" label="成立日期" prop="establishmentDate" borderBottom>
0fd8b750   杨鑫   '最新落地1'
73
74
75
76
77
  						<!-- <u-input v-model="model1.establishmentDate"></u-input> -->
  						<u-input v-model="model1.establishmentDate" type="select" @click="establishow = true"
  							placeholder="请选择" />
  						<u-picker mode="time" v-model="establishow" :params="params"
  							@confirm="establiChange"></u-picker>
e5b57447   杨鑫   '分包问卷'
78
  					</u-form-item>
440bccda   wesley88   1
79
  					<u-form-item :required="true" label="住所" prop="address" borderBottom>
e5b57447   杨鑫   '分包问卷'
80
81
  						<u-input v-model="model1.address"></u-input>
  					</u-form-item>
440bccda   wesley88   1
82
  					<u-form-item :required="true" label="邮箱地址" prop="emailAddress" borderBottom>
e5b57447   杨鑫   '分包问卷'
83
84
  						<u-input v-model="model1.emailAddress"></u-input>
  					</u-form-item>
440bccda   wesley88   1
85
  					<u-form-item :required="true" label="经营开始时间" prop="businessStartDate" borderBottom>
e5b57447   杨鑫   '分包问卷'
86
87
88
89
90
  						<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>
440bccda   wesley88   1
91
  					<u-form-item :required="true" label="经营结束时间" prop="businessEndDate" borderBottom>
e5b57447   杨鑫   '分包问卷'
92
93
94
95
96
  						<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>
440bccda   wesley88   1
97
  					<u-form-item :required="true" label="营业执照" prop="businessLicense" borderBottom labelPosition="top">
0fd8b750   杨鑫   '最新落地1'
98
99
100
  						<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>
  						<!-- <u-upload :action="$upload" :auto-upload="true" ref="businessLicense" :max-count="1"></u-upload> -->
e5b57447   杨鑫   '分包问卷'
101
102
  					</u-form-item>
  				</u-form>
3f535f30   杨鑫   '初始'
103
  			</view>
e5b57447   杨鑫   '分包问卷'
104
105
106
107
108
  
  
  			<view v-show="active == 2">
  				<u-form labelPosition="left" :model="model1" :rules="rules" ref="uForm" :labelWidth="250">
  					<view class="add-list">
440bccda   wesley88   1
109
  						<u-form-item :required="true" label="经营者姓名" prop="lesseeName" borderBottom>
e5b57447   杨鑫   '分包问卷'
110
111
  							<u-input v-model="model1.lesseeName"></u-input>
  						</u-form-item>
440bccda   wesley88   1
112
  						<u-form-item :required="true" label="证件类型" prop="idCardType" borderBottom>
e5b57447   杨鑫   '分包问卷'
113
114
115
  							<u-input v-model="model1.idCardType" type="select" @click="IdtypeShow = true"
  								placeholder='请选择类型' />
  						</u-form-item>
440bccda   wesley88   1
116
  						<u-form-item :required="true" label="身份证号码" prop="idCardNumber" borderBottom>
e5b57447   杨鑫   '分包问卷'
117
118
  							<u-input v-model="model1.idCardNumber"></u-input>
  						</u-form-item>
440bccda   wesley88   1
119
  						<u-form-item :required="true" label="身份证有效开始时间" prop="idCardValidStart" borderBottom>
e5b57447   杨鑫   '分包问卷'
120
121
122
123
124
  							<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>
440bccda   wesley88   1
125
  						<u-form-item :required="true" label="身份证有效结束时间" prop="idCardValidEnd" borderBottom>
e5b57447   杨鑫   '分包问卷'
126
127
128
129
130
131
132
133
134
  							<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>
  						</u-form-item>
  					</view>
  					<view class="add-list">
  						<view class="deom-box">
  							<view class="img-deom">
0fd8b750   杨鑫   '最新落地1'
135
136
137
138
  								
  									<u-upload :action="$upload" :custom-btn="true"
  										@on-choose-complete="(response, file, fileList) => onsuccess1(response, file, fileList, 'idCardPhotoFront')"
  										:auto-upload="false" :max-count="1" ref="idCardPhotoFront">
e5b57447   杨鑫   '分包问卷'
139
140
141
142
143
144
145
146
147
  									<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">
0fd8b750   杨鑫   '最新落地1'
148
149
150
151
  								
  									<u-upload :action="$upload" :custom-btn="true"
  										@on-choose-complete="(response, file, fileList) => onsuccess1(response, file, fileList, 'idCardPhotoBack')"
  										:auto-upload="false" :max-count="1" ref="idCardPhotoBack">
e5b57447   杨鑫   '分包问卷'
152
153
154
155
156
157
158
159
160
  									<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>
0fd8b750   杨鑫   '最新落地1'
161
  					</view> 
e5b57447   杨鑫   '分包问卷'
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
  					<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>
  					</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">
440bccda   wesley88   1
179
  						<u-form-item :required="true" label="是否为法人" prop="isLegalPerson" borderBottom>
e5b57447   杨鑫   '分包问卷'
180
181
182
183
184
  							<u-radio-group v-model="model1.isLegalPerson">
  								<u-radio name="1" value="1">是</u-radio>
  								<u-radio name="0" value="0">否</u-radio>
  							</u-radio-group>
  						</u-form-item>
440bccda   wesley88   1
185
  						<u-form-item :required="true" label="企业授权书" prop="enterpriseAuthorization" borderBottom labelPosition="top">
e5b57447   杨鑫   '分包问卷'
186
187
188
  
  							<u-upload :action="$upload" :auto-upload="true" ref="enter" :max-count="1"></u-upload>
  						</u-form-item>
3f535f30   杨鑫   '初始'
189
  					</view>
e5b57447   杨鑫   '分包问卷'
190
  				</u-form>
3f535f30   杨鑫   '初始'
191
192
  			</view>
  		</view>
e5b57447   杨鑫   '分包问卷'
193
194
195
  
  		<u-select v-model="typeShow" :list="activesType" @confirm="typeChange"></u-select>
  		<u-select v-model="IdtypeShow" :list="idType" @confirm="IdtypeChange"></u-select>
3f535f30   杨鑫   '初始'
196
  		<!-- 保存按钮 -->
e5b57447   杨鑫   '分包问卷'
197
198
199
  		<view class="page-footer">
  			<u-button style="background-color: #DFE0E4; flex: 1; margin: 0 10px;" @click="toBefor"
  				v-if="active != 0">上一步</u-button>
0fd8b750   杨鑫   '最新落地1'
200
201
  			<u-button type="success" style="flex: 1; margin: 0 10px;" @click="toNext" v-if="active != 1">下一步</u-button>
  			<u-button type="success" style="flex: 1; margin: 0 10px;" @click="go" v-if="active == 1">提交申请</u-button>
3f535f30   杨鑫   '初始'
202
203
204
205
206
  		</view>
  	</view>
  </template>
  
  <script>
0fd8b750   杨鑫   '最新落地1'
207
  	
3f535f30   杨鑫   '初始'
208
209
210
  	export default {
  		data() {
  			return {
e5b57447   杨鑫   '分包问卷'
211
  				active: 0,
0fd8b750   杨鑫   '最新落地1'
212
213
214
215
216
217
218
  				// numList: [{
  				// 	name: '租赁信息'
  				// }, {
  				// 	name: '主体信息'
  				// }, {
  				// 	name: '经营者信息'
  				// }],
e5b57447   杨鑫   '分包问卷'
219
220
221
  				numList: [{
  					name: '租赁信息'
  				}, {
0fd8b750   杨鑫   '最新落地1'
222
  					name: '营业执照信息'
e5b57447   杨鑫   '分包问卷'
223
224
225
226
227
228
229
230
231
232
233
234
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
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
  				}],
  				model1: {
  					scheduleTime: '',
  					advertisementContent: '',
  					redirectUrl: '',
  					coverImage: '',
  					adTitle: '',
  					subjectName: '',
  					unifiedSocialCreditCode: '',
  					type: '',
  					legalRepresentative: '',
  					businessScope: '',
  					registeredCapital: '',
  					establishmentDate: '',
  					address: '',
  					emailAddress: '',
  					businessStartDate: '',
  					businessEndDate: '',
  					businessLicense: '',
  					lesseeName: '',
  					idCardType: '',
  					idCardNumber: '',
  					idCardValidStart: '',
  					idCardValidEnd: '',
  					isLegalPerson: '0',
  					idCardPhotoFront:'',
  					idCardPhotoBack:'',
  					enterpriseAuthorization: '',
  					auditStatus: '1'
  				},
  				rules: {},
  				// 类型
  				showType: false,
  				params: {
  					year: true,
  					month: true,
  					day: true,
  					hour: true,
  					minute: true,
  					second: true
  				},
  				params1: {
  					year: true,
  					month: true,
  					day: true
  				},
  				TimeStratshow: false,
  				typeShow: false,
  				activesType: [{
  					value: 1,
  					label: '个人'
  				}, {
  					value: 2,
  					label: '企业'
  				}],
  				idType: [{
  					value: 1,
  					label: '身份证'
  				}, ],
  				IdtypeShow: false,
  				busStartshow: false,
  				busEndtshow: false,
  				idCardStartshow: false,
  				idCardEndtshow: false,
  				params: {
  					year: true,
  					month: true,
  					day: true,
  				},
  				ziyuanId: '',
  				ziyuanType:'',
0fd8b750   杨鑫   '最新落地1'
294
  					selected: [
0fd8b750   杨鑫   '最新落地1'
295
  				                ],
2a109046   杨鑫   '最新小程序'
296
297
298
299
  								establishow:false,
  								today:['',''],
  								startDate:'',
  								endDate:''
0fd8b750   杨鑫   '最新落地1'
300
  								
e5b57447   杨鑫   '分包问卷'
301
302
303
304
305
  			}
  		},
  		onLoad(option) {
  			this.ziyuanId = option.ids
  			this.ziyuanType = option.type
0fd8b750   杨鑫   '最新落地1'
306
  			this.showlendar = true
3f535f30   杨鑫   '初始'
307
  		},
0fd8b750   杨鑫   '最新落地1'
308
  		onReady() {
3f535f30   杨鑫   '初始'
309
  		
0fd8b750   杨鑫   '最新落地1'
310
311
  				},
  		onShow() {
2a109046   杨鑫   '最新小程序'
312
313
314
315
316
317
318
319
320
321
322
323
324
  		this.calculateDates()
  	let pageHe={
  		pageNumber: 0,
  		pageSize: 10,
  		shopNumber:`gg${this.ziyuanId}`,
  		dataStatus:1
  	}
  			this.$http.sendRequest('/cereContractInformation/getPage', 'POST', pageHe,1).then(res => {
  				if(res.data.data.content.length !=0){
  					res.data.data.content.map(item=>{
  						this.generateDateRange([item.contractTerminationDate,item.leaseStartDate])
  					})
  					
0fd8b750   杨鑫   '最新落地1'
325
  				}
2a109046   杨鑫   '最新小程序'
326
  			})
3f535f30   杨鑫   '初始'
327
  		},
e5b57447   杨鑫   '分包问卷'
328
  		methods: {
0fd8b750   杨鑫   '最新落地1'
329
330
331
332
333
334
335
336
337
338
339
340
341
  			 generateDateRange(datas) {
  			      const result = [];
  			      const startDate = new Date(datas[0])
  			      const endDate = new Date(datas[1])
  			      if (startDate > endDate) {
  			        [startDate, endDate] = [endDate, startDate]
  			      }
  			      let currentDate = new Date(startDate);
  			      while (currentDate <= endDate) {
  			        const year = currentDate.getFullYear();
  			        const month = String(currentDate.getMonth() + 1).padStart(1, '0');
  			        const day = String(currentDate.getDate()).padStart(1, '0');
  			        const dateString = `${year}-${month}-${day}`;
2a109046   杨鑫   '最新小程序'
342
  			        this.selected.push({
0fd8b750   杨鑫   '最新落地1'
343
  			          date: dateString,
2a109046   杨鑫   '最新小程序'
344
  			          info: '已租',
0fd8b750   杨鑫   '最新落地1'
345
346
347
348
  			          disable: true
  			        });
  			        currentDate.setDate(currentDate.getDate() + 1);
  			      }
2a109046   杨鑫   '最新小程序'
349
  				  console.log( this.selected)
0fd8b750   杨鑫   '最新落地1'
350
351
352
353
354
355
356
357
358
359
  			      return result;
  			    },
  				calendarChange(e){
  					if(e.range.after == ''){
  						uni.showToast({
  							icon: 'none',
  							title: '请选择结束时间'
  						})
  						return
  					}
cfcb44ef   杨鑫   '改bug版'
360
  					this.model1.scheduleTime =e.range.before+'至'+e.range.after
0fd8b750   杨鑫   '最新落地1'
361
  				},
e5b57447   杨鑫   '分包问卷'
362
363
364
  			typeChange(e) {
  				this.model1.type = e[0].label;
  			},
0fd8b750   杨鑫   '最新落地1'
365
366
367
  			establiChange(val){
  				this.model1.establishmentDate = this.timeChange(val)
  			},
2a109046   杨鑫   '最新小程序'
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
  			calculateDates() {
  			  const today = new Date();
  			       const year = today.getFullYear();
  			       const month = today.getMonth();
  			     this.startDate =  this.formatDate(today);
  						
  			     // 获取后一个月的最后一天
  			     const nextMonthLastDay = new Date(year, month + 2, 0);
  			     this.endDate = this.formatDate(nextMonthLastDay);
  			   },
  			   formatDate(date) {
  			     const year = date.getFullYear();
  			     const month = ('0' + (date.getMonth() + 1)).slice(-2); // 月份是从0开始的
  			     const day = ('0' + date.getDate()).slice(-2);
  			     return `${year}-${month}-${day}`;
  			   },
0fd8b750   杨鑫   '最新落地1'
384
385
386
387
388
389
390
391
392
393
394
  				formatter(day) {
  							const d = new Date()
  							let month = d.getMonth() + 1
  							const date = d.getDate()
  							if(day.month == month && day.day == date + 3)
  							{
  								day.bottomInfo = '有优惠'
  								day.dot = true
  							}
  							return day
  					    },
e5b57447   杨鑫   '分包问卷'
395
396
397
398
399
400
401
402
  			 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);
3f535f30   杨鑫   '初始'
403
  			
e5b57447   杨鑫   '分包问卷'
404
405
406
  			      return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`;
  			    },
  			go() {
0fd8b750   杨鑫   '最新落地1'
407
408
409
410
411
  		
  				let show = this.chek()
  					if(show == false){
  						return
  					}
e5b57447   杨鑫   '分包问卷'
412
413
  				this.model1.rentalResourcesId = this.ziyuanId
  				this.model1.advertisingSpaceType = this.ziyuanType
0fd8b750   杨鑫   '最新落地1'
414
  				this.model1.applicant =uni.getStorageSync('user').phone
e5b57447   杨鑫   '分包问卷'
415
  				this.model1.applicationTime = this.getCurrentTime()
0fd8b750   杨鑫   '最新落地1'
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
  				let info = {
  					...this.model1,
  					coverImage : this.model1.coverImage.replace(this.$img,''),
  					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,''),
  				}
  				this.$http.sendRequest('/cereAdvertiserInfo/add', 'POST', info, 1).then(res => {
  					uni.showToast({
  						title: '提交成功',
  						icon: 'none',
  					});
  					setTimeout(() => {
  						uni.navigateBack()
  					}, 1000)
e5b57447   杨鑫   '分包问卷'
432
433
434
435
436
437
438
439
440
441
442
443
444
  				})
  			},
  			// toChangeTime(val) {
  			// 	uni.navigateTo({
  			// 		url: `/pages/advertisementTime/advertisementTime?val=${val}`
  			// 	})
  			// },
  			// 上一步
  			toBefor() {
  				this.active = +this.active - 1;
  			},
  			// 下一步
  			toNext() {
0fd8b750   杨鑫   '最新落地1'
445
446
447
448
449
450
451
452
453
454
455
456
  				if(this.active == '0') {
  					if (!this.model1.scheduleTime) {
  						uni.showToast({
  							icon: 'none',
  							title: '请选择投放时段'
  						});
  						return;
  					}
  					
  					if (!this.model1.advertisementContent) {
  						uni.showToast({
  							icon: 'none',
f1b706dd   杨鑫   '最新'
457
  							title: '请输入跳转类型'
0fd8b750   杨鑫   '最新落地1'
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
  						});
  						return;
  					}
  					if (!this.model1.redirectUrl) {
  						uni.showToast({
  							icon: 'none',
  							title: '请输入跳转链接'
  						});
  						return;
  					}
  					if (!this.model1.coverImage) {
  						uni.showToast({
  							icon: 'none',
  							title: '请选择封面图片'
  						});
  						return;
  					}
  					if (!this.model1.adTitle) {
  						uni.showToast({
  							icon: 'none',
  							title: '请输入广告标题'
  						});
  						return;
  					}
  				} 
  				
e5b57447   杨鑫   '分包问卷'
484
485
  				this.active = +this.active + 1;
  			},
0fd8b750   杨鑫   '最新落地1'
486
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
  			chek() {
  				
  				
  					if (!this.model1.subjectName) {
  						uni.showToast({
  							icon: 'none',
  							title: '请输入主体名称'
  						});
  						return false;
  					}
  					if (!this.model1.unifiedSocialCreditCode) {
  						uni.showToast({
  							icon: 'none',
  							title: '请输入统一社会信用代码'
  						});
  						return false;
  					}
  					if (!this.model1.type) {
  						uni.showToast({
  							icon: 'none',
  							title: '请选择主体类型'
  						});
  						return false;
  					}
  					if (!this.model1.legalRepresentative) {
  						uni.showToast({
  							icon: 'none',
  							title: '请输入法定代表人'
  						});
  						return false;
  					}
  					if (!this.model1.businessScope) {
  						uni.showToast({
  							icon: 'none',
  							title: '请输入经营范围'
  						});
  						return false;
  					}
  					if (!this.model1.registeredCapital) {
  						uni.showToast({
  							icon: 'none',
  							title: '请输入注册资本'
  						});
  						return false;
  					}
  					if (!this.model1.establishmentDate) {
  						uni.showToast({
  							icon: 'none',
  							title: '请输入成立日期'
  						});
  						return false;
  					}
  					if (!this.model1.address) {
  						uni.showToast({
  							icon: 'none',
  							title: '请输入住所'
  						});
  						return false;
  					}
  					if (!this.model1.emailAddress) {
  						uni.showToast({
  							icon: 'none',
  							title: '请输入邮箱地址'
  						});
  						return false;
  					}
  					if (!this.model1.businessStartDate) {
  						uni.showToast({
  							icon: 'none',
  							title: '请选择经营开始时间'
  						});
  						return false;
  					}
  					if (!this.model1.businessEndDate) {
  						uni.showToast({
  							icon: 'none',
  							title: '请选择经营结束时间'
  						});
  						return false;
  					}
  					if (!this.model1.businessLicense) {
  						uni.showToast({
  							icon: 'none',
  							title: '请上传营业执照'
  						});
  						return false;
  					}
  				return true;
  			},
e5b57447   杨鑫   '分包问卷'
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
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
  			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
  			},
  			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 {
  					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',
  					})
  				}
  			},
  			IdtypeChange(e) {
  				this.model1.idCardType = e[0].label;
  			},
  			timeChange1(val) {
  				const {
  					year,
  					month,
  					day
  				} = val;
  				return `${year}-${month}-${day}`;
  			},
0fd8b750   杨鑫   '最新落地1'
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
  			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 if(ziduan == 'coverImage'){
  							this.model1.coverImage = 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',
  						});
  					},
  				});
  			},
3f535f30   杨鑫   '初始'
667
668
669
670
671
672
  		}
  	}
  </script>
  
  <style scoped lang="scss">
  	@import 'advertisementAdd.scss';
e5b57447   杨鑫   '分包问卷'
673
  </style>