3f535f30
杨鑫
'初始'
|
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
294
295
296
297
298
299
300
301
302
303
304
305
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
335
336
337
338
339
340
341
342
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
375
376
377
378
379
380
381
382
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
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
453
454
455
456
457
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
484
485
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
575
576
577
578
579
580
581
582
583
584
585
586
|
</template>
</el-table-column>
</el-table>
</div>
</div>
<el-form ref="form" :model="formInline" label-width="120px">
<el-form-item label="往期活动展示">
<upimg v-model="formInline.previousEvents" :limit="1" :fileSize="1" :isShowTip="false"></upimg>
</el-form-item>
<el-form-item label="合作类型" prop="cooperationType">
<el-select v-model="formInline.cooperationType" placeholder="请选择" style="width:168px;margin-right: 15px">
<el-option label="品牌推广合作" value="品牌推广合作" />
<el-option label="场地租赁合作" value="场地租赁合作" />
<el-option label="文化旅游合作" value="文化旅游合作" />
<el-option label="健康生活产品合作" value="健康生活产品合作" />
</el-select>
</el-form-item>
<el-form-item label="联系人" prop="contactPerson">
<el-input placeholder="请输入" v-model="formInline.contactPerson" ></el-input>
</el-form-item>
<el-form-item label="联系电话" prop="contactPhone">
<el-input placeholder="请输入" v-model="formInline.contactPhone" ></el-input>
</el-form-item>
<el-form-item label="邮箱" prop="email">
<el-input placeholder="请输入" v-model="formInline.email" ></el-input>
</el-form-item>
<el-form-item label="封面图片" prop="coverImage">
<upimg v-model="formInline.coverImage" :limit="1" :fileSize="1" :isShowTip="false"></upimg>
</el-form-item>
</el-form>
<div style="display: flex;justify-content: flex-end;">
<el-button @click="closeFn(1)" class="buttonHover"
style="color: #606266;border: 1px solid #dddfe5;background-color: #fff;">返回</el-button>
<el-button @click="addCheck(4)" style="background-color: #3F9B6A;color: #fff">确定</el-button>
</div>
<!-- 场地选择 -->
<el-dialog :visible.sync="addziyuan" custom-class='XDD_css' style="padding: 0;" width="50%"
append-to-body center :close-on-click-modal="false" :close-on-press-escape="false" :show-close="false">
<div style="padding: 10px 13px;font-size: 14px;border-bottom: 1px solid #E5E5E5;display: flex;justify-content: space-between;">
<div>添加</div>
</div>
<div style="padding: 15px;width:100%">
<div style="border: 1px solid #E5E5E5;padding: 1px" id="huodong">
<div style="padding: 10px 13px;font-size: 14px;border-bottom: 1px solid #E5E5E5;display: flex;justify-content: space-between;">
<div>选择场地</div>
</div>
<div style="padding: 15px;">
<div style="padding: 0px 20px 0px 0px">
<el-table :data="ziyuanData"
highlight-current-row
@current-change="handleSelectionChange"
:header-cell-style="{fontSize: '14px',color:'#0009',fontWeight: 'normal',backgroundColor:'#F2F3F5'}"
>
<el-table-column label="序号" min-width="8%" >
<template slot-scope="scope">
{{scope.$index + 1}}
</template>
</el-table-column>
<el-table-column label="编号" prop="id" min-width="22%">
</el-table-column>
<el-table-column label="场地名称" prop="venueName" min-width="15%">
</el-table-column>
<el-table-column label="场地类型" prop="venueType" min-width="15%">
</el-table-column>
<el-table-column prop="notes" label="对应策略" min-width="15%">
</el-table-column>
</el-table>
</div>
</div>
</div>
</div>
<div style="display: flex;justify-content: flex-end;padding: 10px 20px 10px 0">
<el-button @click="mingClose" class="buttonHover"
style="color: #606266;border: 1px solid #dddfe5;background-color: #fff;">取消
</el-button>
<el-button @click="minSev" style="background-color: #3F9B6A;color: #fff;">确定
</el-button>
</div>
</el-dialog>
</el-dialog>
</div>
</template>
<script>
import {
async
} from 'q'
import axios from 'axios'
import wangEditor from "@/components/editor/index";
import {
MerGetAll,
MerAdd,
MerEdit,
MerDel
} from '../../../api/Merchant.js'
import upimg from "@/components/ImageUpload/index"
import {
changAlls
} from '../../../api/information.js'
export default {
components: {
upimg,
wangEditor
},
data() {
return {
hetongBox: false,
detbox: false, //详情
leixing: true, //切换
currentPage: 1,
total: 10,
flag: false,
pageSize: 10,
ggXin: false,
formInline: {
title:'',
venue:'',
contactPerson:'',
contactPhone:'',
cooperationType:'',
},
plan_Time:[],
followUpTime:[],
tableData: [],
secondData: {},
formSel: {
title:'',
venue:'',
contactPerson:'',
contactPhone:'',
cooperationType:'',
},
pageindex: {
pageNumber: 1,
pageSize: 10,
},
bianjiBox: 1,
chengeTatle: 1,
zhong: {},
edit: true, //编辑切换
xiangTabs:'first',
addkehu:false,
addziyuan:false,
ziyuanData:[],//资源
addziyuanData:[],
multipleSelection:[],
xiangData:{},//详情
}
},
created() {
this.getAll()
},
computed: {
},
methods: {
chenge(val) {
this.formSel = {
affiliation: '',
createUser: '',
createDate: '',
contacts: ''
}
this.leixing = !this.leixing
this.chengeTatle = val
},
async getAll() {
const res = await MerGetAll(this.pageindex)
this.tableData = res.data.content
this.total = res.data.content.length
const ziyuan = await changAlls(this.pageindex)
this.ziyuanData = [...ziyuan.data.content]
},
// 新增确定按钮
async addCheck(val) {
if(this.addziyuanData.length !=0){
this.formInline.venue = this.addziyuanData.map(item => item.id).join(',');
}
this.formInline.status = '2'
await MerAdd(this.formInline)
this.ggXin = false
this.formInline = {
title:'',
venue:'',
contactPerson:'',
contactPhone:'',
cooperationType:'',
}
this.plan_Time =[]
this.addziyuanData =[]
this.getAll()
},
// 获取时间
currentTime() {
let date = new Date();
let year = date.getFullYear(); //月份从0~11,所以加一
let month = date.getMonth();
let dateArr = [date.getMonth() + 1, date.getDate(), date.getHours()]
for (let i = 0; i < dateArr.length; i++) {
if (dateArr[i] >= 1 && dateArr[i] <= 9) {
dateArr[i] = '0' + dateArr[i]
}
}
let strDate = year + '-' + dateArr[0] + '-' + dateArr[1]
return strDate
},
//详情
details(item) {
this.edit = true
this.xiangData = item
this.detbox = true
},
async addbuss() {
await MerEdit(this.xiangData)
this.detbox = false
this.getAll()
// this.ggXin = true
},
handleSizeChange(val) {
this.pageSize = val
},
handleCurrentChange(val) {
this.currentPage = val
},
closeFn(val) {
this.plan_Time =[]
this.addziyuanData =[]
this.bianjiBox = 1
if (val == 1) {
this.ggXin = false
} else {
this.detbox = false
}
},
//查看合同
lookHetong(val) {
this.hetongBox = true
},
// 查询按钮
async onSubmit() {
this.formSel.pageNumber = 1
this.formSel.pageSize = 10
const res = await MerGetAll(this.formSel)
this.tableData = res.data.content
this.total = res.data.content.length
this.formSel = {
title:'',
venue:'',
contactPerson:'',
contactPhone:'',
cooperationType:'',
}
},
//重置按钮
resetting() {
this.formSel = {
title:'',
venue:'',
contactPerson:'',
contactPhone:'',
cooperationType:'',
},
this.getAll()
},
zhongzhi(item){
this.edit = false
this.xiangData = item
this.detbox = true
},
minSev() {
this.addziyuanData = this.multipleSelection
this.addziyuan = false
this.multipleSelection =[]
},
mingClose(){
this.multipleSelection =[]
this.addziyuan = false
},
handleSelectionChange(val) {
this.multipleSelection.push(val)
},
deltab(item){
const h = this.$createElement;
this.$msgbox({
title: '消息',
message: h('p', null, [
h('span', null, '是否删除 '),
]),
showCancelButton: true,
showClose:false,
confirmButtonText: '确定',
cancelButtonText: '取消',
customClass:'oe-dialog-btn',
beforeClose: (action, instance, done) => {
if (action === 'confirm') {
MerDel({id:item.id}).then(res=>{
this.getAll()
done();
})
} else {
done();
}
}
})
},
fabu(item,val){
const h = this.$createElement;
this.$msgbox({
title: '消息',
message: h('p', null, [
h('span', null, '是否处理'),
]),
showCancelButton: true,
showClose:false,
confirmButtonText: '确定',
cancelButtonText: '取消',
customClass:'oe-dialog-btn',
beforeClose: (action, instance, done) => {
if (action === 'confirm') {
MerEdit({id:item.id,status:val}).then(res=>{
this.getAll()
done();
})
} else {
done();
}
}
})
|