Blame view

admin-web-master/src/views/scheme/samXin.vue 33.6 KB
3f535f30   杨鑫   '初始'
1
2
  <template>
    <el-dialog title="新增页" :visible.sync="xinShow" custom-class='bian_css' style="padding: 0;" width="65%" center
90d96766   wesley88   1
3
      :close-on-click-modal="false" @close="close">
3f535f30   杨鑫   '初始'
4
      <div style="padding:20px;" class="xinFrom">
90d96766   wesley88   1
5
        <el-form :model="form" :rules="rulesform" ref="ruleForm" label-width="80px">
3f535f30   杨鑫   '初始'
6
          <el-form-item label="策略名称" prop="policyName">
90d96766   wesley88   1
7
8
            <el-input v-model="form.policyName" placeholder="请输入" style="width: 87%;margin-right: 15px"
              maxlength="50"></el-input>
3f535f30   杨鑫   '初始'
9
10
11
12
13
14
15
16
17
          </el-form-item>
          <el-form-item label="适用资源" prop="applicableResources">
            <el-radio-group v-model="form.applicableResources">
              <el-radio label="商铺" value="商铺">商铺</el-radio>
              <el-radio label="场地" value="场地">场地</el-radio>
              <el-radio label="广告位" value="广告位">广告位</el-radio>
            </el-radio-group>
          </el-form-item>
          <el-form-item label="策略模板" prop="policyTemplate">
90d96766   wesley88   1
18
19
            <el-select v-model="form.policyTemplate" placeholder="请选择" style="width: 87%;margin-right: 15px"
              @change="changeMode">
3f535f30   杨鑫   '初始'
20
21
22
23
24
25
26
27
28
              <el-option :label="item.policyName" :value="item.id" v-for="(item,index) in tableData" />
            </el-select>
            <el-button style="background-color: #3F9B6A;color: #fff" @click="modeCode = true">管理模板
            </el-button>
          </el-form-item>
          <el-row>
            <el-col :span="12">
              <el-form-item label="是否出租" prop="isRental">
                <el-select v-model="form.isRental" placeholder="请选择" style="width: 72%;margin-right: 15px">
4394f7f2   杨鑫   '策略'
29
                  <el-option label="自营" value="0" />
3f535f30   杨鑫   '初始'
30
31
32
33
34
                  <el-option label="是" value="1" />
                </el-select>
              </el-form-item>
            </el-col>
            <el-col :span="12">
4394f7f2   杨鑫   '策略'
35
              <el-form-item label="经营类型" prop="businessType" v-if="form.applicableResources == '商铺'">
90d96766   wesley88   1
36
37
                <el-input v-model="form.businessType" placeholder="请输入" style="width:  72%;margin-right: 15px"
                  maxlength="50"></el-input>
3f535f30   杨鑫   '初始'
38
39
40
41
              </el-form-item>
            </el-col>
          </el-row>
          <el-row>
4394f7f2   杨鑫   '策略'
42
  
3f535f30   杨鑫   '初始'
43
44
            <el-col :span="12">
              <el-form-item label="租金价格" prop="rentalPrice">
90d96766   wesley88   1
45
46
                <el-input v-model.number="form.rentalPrice" placeholder="请输入" style="width: 72%;margin-right: 15px;"
                  maxlength="30">
3f535f30   杨鑫   '初始'
47
48
49
50
51
52
53
                  <template slot="suffix"><span
                      style="position: absolute;top: 19px;right: 1px;width: 50px;">元/m<sup>2</sup></span></template>
                  <!-- <i slot="suffix" class="el-input__icon el-icon-date"></i> -->
                </el-input>
  
              </el-form-item>
            </el-col>
4394f7f2   杨鑫   '策略'
54
55
56
57
58
59
60
61
62
63
            <el-col :span="12">
              <el-form-item label="付款周期" prop="leaseTerm">
                <el-select v-model="form.leaseTerm" placeholder="请选择" style="width: 72%;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-col>
3f535f30   杨鑫   '初始'
64
65
          </el-row>
          <el-row>
4394f7f2   杨鑫   '策略'
66
            <!-- <el-col :span="12">
3f535f30   杨鑫   '初始'
67
              <el-form-item label="商铺租期" prop="leaseTerm">
ba37c587   杨鑫   '最新版本'
68
                <el-input v-model="form.leaseTerm" style="width: 72%;"  placeholder="请输入/年或/月" maxlength="20"></el-input>
3f535f30   杨鑫   '初始'
69
70
  
              </el-form-item>
4394f7f2   杨鑫   '策略'
71
            </el-col> -->
3f535f30   杨鑫   '初始'
72
73
74
75
76
77
78
            <el-col :span="12">
              <el-form-item label="租赁时段" prop="leaseDate">
                <el-date-picker v-model="leaseDate" value-format="yyyy-MM-dd" type="daterange" range-separator="至"
                  start-placeholder="开始日期" end-placeholder="结束日期" style="width: 72%;">
                </el-date-picker>
              </el-form-item>
            </el-col>
3f535f30   杨鑫   '初始'
79
80
            <el-col :span="12">
              <el-form-item label="免租条件" prop="rentFreeCondition">
90d96766   wesley88   1
81
82
                <el-input v-model="form.rentFreeCondition" placeholder="请输入" style="width: 72%;"
                  maxlength="50"></el-input>
3f535f30   杨鑫   '初始'
83
84
              </el-form-item>
            </el-col>
4394f7f2   杨鑫   '策略'
85
86
87
          </el-row>
          <el-row>
  
3f535f30   杨鑫   '初始'
88
89
            <el-col :span="12">
              <el-form-item label="免租期" prop="rentFreePeriod">
4394f7f2   杨鑫   '策略'
90
91
92
93
94
95
96
97
98
99
100
101
                <!-- <el-input v-model="form.rentFreePeriod" placeholder="请输入/天" style="width: 72%;" maxlength="20"></el-input> -->
                <el-select v-model="form.rentFreePeriod" placeholder="请选择" style="width: 72%;margin-right: 15px">
                  <el-option :label="item" :value="item" v-for="item in 31" />
                </el-select>
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item label="付款日" prop="payDay">
                <!-- <el-input v-model="form.payDay" placeholder="请输入" style="width: 72%;" maxlength="50"></el-input> -->
                <el-select v-model="form.payDay" placeholder="请选择" style="width: 72%;margin-right: 15px">
                  <el-option :label="item" :value="item" v-for="item in 31" />
                </el-select>
3f535f30   杨鑫   '初始'
102
103
104
105
              </el-form-item>
            </el-col>
          </el-row>
          <el-row>
4394f7f2   杨鑫   '策略'
106
107
108
109
110
111
  
            <el-col :span="24">
              <el-form-item label="优惠政策" prop="preferentialPolicy">
  
                <wangEditor v-model="form.preferentialPolicy" ref="editor" :height="100"></wangEditor>
  
3f535f30   杨鑫   '初始'
112
113
              </el-form-item>
            </el-col>
4394f7f2   杨鑫   '策略'
114
115
116
117
118
119
120
121
  
          </el-row>
          <el-row>
  
            <el-col :span="24">
              <el-form-item label="其他说明" prop="otherDescription">
  
                <wangEditor v-model="form.otherDescription" ref="editor" :height="100"></wangEditor>
3f535f30   杨鑫   '初始'
122
123
              </el-form-item>
            </el-col>
4394f7f2   杨鑫   '策略'
124
  
3f535f30   杨鑫   '初始'
125
          </el-row>
4394f7f2   杨鑫   '策略'
126
  
3f535f30   杨鑫   '初始'
127
128
129
130
131
132
133
134
135
136
137
        </el-form>
        <div style="display: flex;justify-content: flex-end;margin-top:20px;">
          <el-button @click="closeFn()" style="background-color: #fff;color: #000;border: 1px solid #B1B1B1;"
            class="buttonHover">取 消</el-button>
          <el-button type="primary" @click="addCheck(1)"
            style="background-color: #3F9B6A;color: #fff;border-color:#3F9B6A;">确 定</el-button>
  
        </div>
      </div>
  
      <el-dialog title="模板管理" :visible.sync="modeCode" custom-class='bian_css' style="padding: 0;" width="65%" center
90d96766   wesley88   1
138
        :close-on-click-modal="false" append-to-body>
3f535f30   杨鑫   '初始'
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
        <div style="padding:20px;">
          <div style="margin-bottom:15px;">
            <el-button type="primary" @click="addM(1)"
              style="background-color: #3F9B6A;color: #fff;border-color:#3F9B6A;">新增模板</el-button>
          </div>
          <div>
            <div style="border: 1px solid #E5E5E5;padding: 1px">
              <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="tableData"
                    :header-cell-style="{fontSize: '14px',color:'#0009',fontWeight: 'normal',backgroundColor:'#F2F3F5'}">
                    <el-table-column label="策略名称" width="250" prop="policyName">
                    </el-table-column>
                    <el-table-column label="适用资源" width="120" prop="applicableResources">
                    </el-table-column>
                    <el-table-column label="是否出租" prop="isRental" width="120">
                      <template slot-scope="scope">
4394f7f2   杨鑫   '策略'
160
                        {{scope.row.isrental == '0'?'自营':'是'}}
3f535f30   杨鑫   '初始'
161
162
                      </template>
                    </el-table-column>
4394f7f2   杨鑫   '策略'
163
  
3f535f30   杨鑫   '初始'
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
                    <el-table-column label="经营类型" prop="businessType" width="150">
                    </el-table-column>
                    <el-table-column prop="rentalPrice" label="租金价格" width="150">
                    </el-table-column>
                    <el-table-column prop="leaseTerm" label="商铺租期" width="120">
                    </el-table-column>
                    <el-table-column label="租赁时段" width="250">
                      <template slot-scope="scope">
                        {{scope.row.leaseStartDate}}至{{scope.row.leaseEndDate}}
                      </template>
                    </el-table-column>
                    <el-table-column prop="rentFreeCondition" label="免租条件" width="150">
                    </el-table-column>
                    <el-table-column prop="rentFreePeriod" label="免租期" width="150">
                    </el-table-column>
                    <el-table-column prop="paymentTerms" label="付款条件" width="200">
                    </el-table-column>
                    <el-table-column label="付款日期" width="200">
                      <template slot-scope="scope">
                        {{scope.row.paymentStartDate}}至{{scope.row.paymentEndDate}}
                      </template>
                    </el-table-column>
                    <el-table-column label="操作" width="200">
                      <template slot-scope="scope">
                        <!-- <div @click="" class="tableBtn greens">复制模板</div> -->
                        <div @click="addM(2,scope.row)" class="tableBtn greens">编辑</div>
                        <div @click="delM(scope.row.id)" class="tableBtn greens">删除</div>
                      </template>
                    </el-table-column>
                  </el-table>
                </div>
              </div>
            </div>
          </div>
        </div>
        <el-dialog :title="modeAdd?'新增模板':'编辑模板'" :visible.sync="addMing" custom-class='bian_css' style="padding: 0;"
          width="65%" center :close-on-click-modal="false" :show-close="false" append-to-body>
          <div style="padding:20px;">
            <el-form :model="formInline" :rules="formInlineRules" ref="formInlineRules" label-width="80px">
90d96766   wesley88   1
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
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
              <el-form-item label="策略名称" prop="policyName">
                <el-input v-model="formInline.policyName" placeholder="请输入" style="width: 87%;margin-right: 15px"
                  maxlength="50"></el-input>
              </el-form-item>
              <el-form-item label="适用资源" prop="applicableResources">
                <el-radio-group v-model="formInline.applicableResources">
                  <el-radio label="商铺" value="商铺">商铺</el-radio>
                  <el-radio label="场地" value="场地">场地</el-radio>
                  <el-radio label="广告位" value="广告位">广告位</el-radio>
                </el-radio-group>
              </el-form-item>
  
              <el-row>
                <el-col :span="12">
                  <el-form-item label="是否出租" prop="isRental">
                    <el-select v-model="formInline.isRental" placeholder="请选择" style="width: 72%;margin-right: 15px">
                      <el-option label="自营" value="0" />
                      <el-option label="是" value="1" />
                    </el-select>
                  </el-form-item>
                </el-col>
                <el-col :span="12">
                  <el-form-item label="经营类型" prop="businessType" v-if="formInline.applicableResources == '商铺'">
                    <el-input v-model="formInline.businessType" placeholder="请输入" style="width:  72%;margin-right: 15px"
                      maxlength="50"></el-input>
                  </el-form-item>
                </el-col>
              </el-row>
              <el-row>
  
                <el-col :span="12">
                  <el-form-item label="租金价格" prop="rentalPrice">
                    <el-input v-model.number="formInline.rentalPrice" placeholder="请输入"
                      style="width: 72%;margin-right: 15px;" maxlength="30">
                      <template slot="suffix"><span
                          style="position: absolute;top: 19px;right: 1px;width: 50px;">元/m<sup>2</sup></span></template>
  
                    </el-input>
  
                  </el-form-item>
                </el-col>
                <el-col :span="12">
                  <el-form-item label="付款周期" prop="leaseTerm">
                    <el-select v-model="formInline.leaseTerm" placeholder="请选择" style="width: 72%;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-col>
              </el-row>
              <el-row>
  
                <el-col :span="12">
                  <el-form-item label="租赁时段" prop="leaseDate">
                    <el-date-picker v-model="leaseDate" value-format="yyyy-MM-dd" type="daterange" range-separator="至"
                      start-placeholder="开始日期" end-placeholder="结束日期" style="width: 72%;">
                    </el-date-picker>
                  </el-form-item>
                </el-col>
                <el-col :span="12">
                  <el-form-item label="免租条件" prop="rentFreeCondition">
                    <el-input v-model="formInline.rentFreeCondition" placeholder="请输入" style="width: 72%;"
                      maxlength="50"></el-input>
                  </el-form-item>
                </el-col>
              </el-row>
              <el-row>
  
                <el-col :span="12">
                  <el-form-item label="免租期" prop="rentFreePeriod">
  
                    <el-select v-model="formInline.rentFreePeriod" placeholder="请选择"
                      style="width: 72%;margin-right: 15px">
                      <el-option :label="item" :value="item" v-for="item in 31" />
                    </el-select>
                  </el-form-item>
                </el-col>
                <el-col :span="12">
                  <el-form-item label="付款日" prop="payDay">
  
                    <el-select v-model="formInline.payDay" placeholder="请选择" style="width: 72%;margin-right: 15px">
                      <el-option :label="item" :value="item" v-for="item in 31" />
                    </el-select>
                  </el-form-item>
                </el-col>
              </el-row>
              <el-row>
4394f7f2   杨鑫   '策略'
292
293
294
295
296
  
                <el-col :span="24">
                  <el-form-item label="优惠政策" prop="preferentialPolicy">
  
                    <wangEditor v-model="formInline.preferentialPolicy" ref="editor" :height="100"></wangEditor>
3f535f30   杨鑫   '初始'
297
298
299
  
                  </el-form-item>
                </el-col>
4394f7f2   杨鑫   '策略'
300
  
3f535f30   杨鑫   '初始'
301
302
              </el-row>
              <el-row>
4394f7f2   杨鑫   '策略'
303
304
305
306
307
  
                <el-col :span="24">
                  <el-form-item label="其他说明" prop="otherDescription">
  
                    <wangEditor v-model="formInline.otherDescription" ref="editor" :height="100"></wangEditor>
3f535f30   杨鑫   '初始'
308
309
                  </el-form-item>
                </el-col>
4394f7f2   杨鑫   '策略'
310
  
3f535f30   杨鑫   '初始'
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
              </el-row>
            </el-form>
            <div style="display: flex;justify-content: flex-end;margin-top:20px;">
              <el-button @click="MingClose()" style="background-color: #fff;color: #000;border: 1px solid #B1B1B1;"
                class="buttonHover">取 消</el-button>
              <el-button type="primary" @click="addCheck(2)"
                style="background-color: #3F9B6A;color: #fff;border-color:#3F9B6A;">确 定</el-button>
  
            </div>
          </div>
  
        </el-dialog>
      </el-dialog>
    </el-dialog>
  
  </template>
  
  <script>
    import {
      ceGetAll,
      ceAdd,
      ceEdit,
      ceDel,
    } from '../../api/sam.js'
    import wangEditor from "@/components/editor/index"
    import upimg from "@/components/ImageUpload/index"
    export default {
      components: {
        wangEditor,
        upimg
      },
      props: {
        xinShow: {
          type: Boolean,
          default: false
        },
      },
      data() {
        return {
          form: {
            policyName: '', //策略名称
            applicableResources: '商铺', //适用资源
            policyTemplate: null, //策略模板
4394f7f2   杨鑫   '策略'
354
            isRental: '', //是否出租 (0:白营,1:是)
3f535f30   杨鑫   '初始'
355
            businessType: '', //经营类型
4394f7f2   杨鑫   '策略'
356
            rentalPrice: null, //租金价格
3f535f30   杨鑫   '初始'
357
358
359
360
361
            leaseTerm: '', //商铺租期
            leaseStartDate: '', //租赁开始日期
            leaseEndDate: '', //租赁结束日期
            rentFreeCondition: '', //免租条件
            rentFreePeriod: '', //免租期(单位:天)
4394f7f2   杨鑫   '策略'
362
            payDay: '', //付款日
3f535f30   杨鑫   '初始'
363
364
            createDate: '', //创建时间
            isTemplate: '1', //是否为模板(0.是 1.否)
90d96766   wesley88   1
365
366
            preferentialPolicy: '',
            otherDescription: ''
3f535f30   杨鑫   '初始'
367
368
369
370
371
372
          },
          modeCode: false, //模板管理框
          tableData: [],
          addMing: false, //新增模板框
          modeAdd: true, //新增编辑模板 状态切换
          formInline: {
90d96766   wesley88   1
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
            policyName: '', //策略名称
            applicableResources: '商铺', //适用资源
            policyTemplate: null, //策略模板
            isRental: '', //是否出租 (0:白营,1:是)
            businessType: '', //经营类型
            rentalPrice: null, //租金价格
            leaseTerm: '', //商铺租期
            leaseStartDate: '', //租赁开始日期
            leaseEndDate: '', //租赁结束日期
            rentFreeCondition: '', //免租条件
            rentFreePeriod: '', //免租期(单位:天)
            payDay: '', //付款日
            createDate: '', //创建时间
            preferentialPolicy: '',
            otherDescription: '',
3f535f30   杨鑫   '初始'
388
389
390
391
392
393
394
395
396
397
398
399
400
401
            isTemplate: '0', //是否为模板(0.是 1.否)
          },
          leaseDate: [], //租赁时段
          paymentDate: [], //付款日期
          pageindex: {
            pageNumber: 1,
            pageSize: 10,
            isTemplate: '0'
          },
          rulesform: {
            policyName: [{
              required: true,
              message: '请输入策略名称',
              trigger: 'blur'
90d96766   wesley88   1
402
            }, ],
3f535f30   杨鑫   '初始'
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
            applicableResources: [{
              required: true,
              message: '请选择适用资源',
              trigger: 'change'
            }],
            isRental: [{
              required: true,
              message: '请选择是否出租',
              trigger: 'change'
            }],
            isSelfOperated: [{
              required: true,
              message: '请选择是否出租',
              trigger: 'change'
            }],
            businessType: [{
              required: true,
              message: '请选择经营类型',
              trigger: 'change'
            }],
            rentalPrice: [{
7ab02d9a   杨鑫   问卷完成,最新
424
425
426
427
428
429
                required: true,
                message: '请输入租金价格'
              },
              {
                type: 'number',
                message: '必须为数字值'
ba37c587   杨鑫   '最新版本'
430
431
432
433
434
435
436
437
438
              },
              {
                validator: (rule, value, callback) => {
                  if (value <= 0) {
                    callback(new Error('租金价格必须大于0'));
                  } else {
                    callback();
                  }
                }
90d96766   wesley88   1
439
440
              }
            ],
3f535f30   杨鑫   '初始'
441
          },
90d96766   wesley88   1
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
          formInlineRules: {
            policyName: [{
              required: true,
              message: '请输入策略名称',
              trigger: 'blur'
            }],
            applicableResources: [{
              required: true,
              message: '请选择适用资源',
              trigger: 'change'
            }],
            isRental: [{
              required: true,
              message: '请选择是否出租',
              trigger: 'change'
            }],
            businessType: [{
              required: true,
              message: '请选择经营类型',
              trigger: 'change'
            }],
            rentalPrice: [{
3f535f30   杨鑫   '初始'
464
                required: true,
7ab02d9a   杨鑫   问卷完成,最新
465
466
467
468
469
                message: '请输入租金价格'
              },
              {
                type: 'number',
                message: '必须为数字值'
ba37c587   杨鑫   '最新版本'
470
471
472
473
474
475
476
477
478
              },
              {
                validator: (rule, value, callback) => {
                  if (value <= 0) {
                    callback(new Error('租金价格必须大于0'));
                  } else {
                    callback();
                  }
                }
90d96766   wesley88   1
479
480
              }
            ],
3f535f30   杨鑫   '初始'
481
482
483
484
485
  
          }
        }
      },
      mounted() {
90d96766   wesley88   1
486
        this.getAll()
3f535f30   杨鑫   '初始'
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
      },
  
      methods: {
        updateCurrentTime() {
          const now = new Date();
          const year = now.getFullYear();
          const month = (now.getMonth() + 1).toString().padStart(2, '0');
          const day = now.getDate().toString().padStart(2, '0');
          const hours = now.getHours().toString().padStart(2, '0');
          const minutes = now.getMinutes().toString().padStart(2, '0');
          const seconds = now.getSeconds().toString().padStart(2, '0');
  
          return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`;
        },
        //查询模板全数据
        async getAll() {
          const res = await ceGetAll(this.pageindex)
          this.tableData = res.data.content
        },
        guanLi() {
          this.modeCode = true
        },
        addM(val, item) {
          this.leaseDate = []
          this.paymentDate = []
          if (val == 1) {
            this.formInline = {
90d96766   wesley88   1
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
              policyName: '', //策略名称
              applicableResources: '商铺', //适用资源
              policyTemplate: null, //策略模板
              isRental: '', //是否出租 (0:白营,1:是)
              businessType: '', //经营类型
              rentalPrice: null, //租金价格
              leaseTerm: '', //商铺租期
              leaseStartDate: '', //租赁开始日期
              leaseEndDate: '', //租赁结束日期
              rentFreeCondition: '', //免租条件
              rentFreePeriod: '', //免租期(单位:天)
              payDay: '', //付款日
              createDate: '', //创建时间
              preferentialPolicy: '',
              otherDescription: '',
              isTemplate: '0', //是否为模板(0.是 1.否)
            }
3f535f30   杨鑫   '初始'
531
532
          } else {
            this.leaseDate[0] = item.leaseStartDate
90d96766   wesley88   1
533
534
535
            this.leaseDate[1] = item.leaseEndDate
            this.paymentDate[0] = item.paymentStartDate
            this.paymentDate[1] = item.paymentEndDate
3f535f30   杨鑫   '初始'
536
            this.formInline = item
90d96766   wesley88   1
537
            this.modeAdd = false
3f535f30   杨鑫   '初始'
538
539
540
541
          }
          this.addMing = true
        },
        closeFn() {
3f535f30   杨鑫   '初始'
542
          this.form = {
4394f7f2   杨鑫   '策略'
543
544
545
546
547
548
549
550
551
552
553
554
555
556
            policyName: '', //策略名称
            applicableResources: '商铺', //适用资源
            policyTemplate: null, //策略模板
            isRental: '', //是否出租 (0:白营,1:是)
            businessType: '', //经营类型
            rentalPrice: null, //租金价格
            leaseTerm: '', //商铺租期
            leaseStartDate: '', //租赁开始日期
            leaseEndDate: '', //租赁结束日期
            rentFreeCondition: '', //免租条件
            rentFreePeriod: '', //免租期(单位:天)
            payDay: '', //付款日
            createDate: '', //创建时间
            isTemplate: '1', //是否为模板(0.是 1.否)
90d96766   wesley88   1
557
558
            preferentialPolicy: '',
            otherDescription: ''
4394f7f2   杨鑫   '策略'
559
          }
90d96766   wesley88   1
560
          this.paymentDate = []
eaa0f084   杨鑫   '1111'
561
562
563
          this.leaseDate = []
          this.$emit('childClose', false);
  
3f535f30   杨鑫   '初始'
564
        },
90d96766   wesley88   1
565
        close() {
ab818baa   杨鑫   '1'
566
  
90d96766   wesley88   1
567
          this.form = {
4394f7f2   杨鑫   '策略'
568
569
570
571
572
573
574
575
576
577
578
579
580
581
            policyName: '', //策略名称
            applicableResources: '商铺', //适用资源
            policyTemplate: null, //策略模板
            isRental: '', //是否出租 (0:白营,1:是)
            businessType: '', //经营类型
            rentalPrice: null, //租金价格
            leaseTerm: '', //商铺租期
            leaseStartDate: '', //租赁开始日期
            leaseEndDate: '', //租赁结束日期
            rentFreeCondition: '', //免租条件
            rentFreePeriod: '', //免租期(单位:天)
            payDay: '', //付款日
            createDate: '', //创建时间
            isTemplate: '1', //是否为模板(0.是 1.否)
90d96766   wesley88   1
582
583
            preferentialPolicy: '',
            otherDescription: ''
4394f7f2   杨鑫   '策略'
584
          }
90d96766   wesley88   1
585
586
587
          this.paymentDate = []
          this.leaseDate = []
          this.$emit('childClose', false);
ab818baa   杨鑫   '1'
588
589
590
  
  
        },
90d96766   wesley88   1
591
        MingClose() {
3f535f30   杨鑫   '初始'
592
          this.addMing = false
90d96766   wesley88   1
593
          this.paymentDate = []
3f535f30   杨鑫   '初始'
594
595
596
597
598
599
          this.leaseDate = []
        },
        addCheck(val) {
          if (val == 1) {
            this.form.isTemplate = '1'
            console.log(this.form)
90d96766   wesley88   1
600
            if (this.leaseDate.length != 0) {
3f535f30   杨鑫   '初始'
601
602
603
              this.form.leaseStartDate = this.leaseDate[0]
              this.form.leaseEndDate = this.leaseDate[1]
            }
90d96766   wesley88   1
604
            if (this.paymentDate.length != 0) {
3f535f30   杨鑫   '初始'
605
606
607
608
              this.form.paymentStartDate = this.paymentDate[0]
              this.form.paymentEndDate = this.paymentDate[1]
            }
            this.$refs.ruleForm.validate((valid) => {
90d96766   wesley88   1
609
610
611
612
613
614
615
616
617
618
619
620
621
              if (valid) {
                this.form.createDate = this.updateCurrentTime()
                ceAdd(this.form).then(res => {
                  this.$emit('childClose', false);
                })
              } else {
                this.$message({
                  message: '请填写完整信息',
                  type: 'error'
                })
                return false;
              }
            })
3f535f30   杨鑫   '初始'
622
623
624
  
          } else {
            this.form.isTemplate = '0'
90d96766   wesley88   1
625
            if (this.leaseDate.length != 0) {
3f535f30   杨鑫   '初始'
626
627
628
              this.formInline.leaseStartDate = this.leaseDate[0]
              this.formInline.leaseEndDate = this.leaseDate[1]
            }
90d96766   wesley88   1
629
            if (this.paymentDate.length != 0) {
3f535f30   杨鑫   '初始'
630
631
632
633
              this.formInline.paymentStartDate = this.paymentDate[0]
              this.formInline.paymentEndDate = this.paymentDate[1]
            }
            this.$refs.formInlineRules.validate((valid) => {
90d96766   wesley88   1
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
667
668
669
670
671
672
673
674
675
676
              if (valid) {
                if (this.modeAdd) {
                  this.formInline.createDate = this.updateCurrentTime()
                  ceAdd(this.formInline).then(res => {
                    this.addMing = false
                    this.getAll()
                  })
                } else {
                  ceEdit(this.formInline).then(res => {
                    this.form = {
                      policyName: '', //策略名称
                      applicableResources: '商铺', //适用资源
                      policyTemplate: null, //策略模板
                      isRental: '', //是否出租 (0:否,1:是)
                      isSelfOperated: '', //是否白营 (0: 否, 1: 是)
                      businessType: '', //经营类型
                      rentalPrice: '', //租金价格
                      leaseTerm: '', //商铺租期
                      leaseStartDate: '', //租赁开始日期
                      leaseEndDate: '', //租赁结束日期
                      rentFreeCondition: '', //免租条件
                      rentFreePeriod: '', //免租期(单位:天)
                      paymentTerms: '', //付款条件
                      paymentStartDate: '', //付款开始日期
                      paymentEndDate: '', //付款结束日期
                      createDate: '', //创建时间
                      isTemplate: '1', //是否为模板(0.是 1.否)
                    }
                    this.paymentDate = []
                    this.leaseDate = []
                    this.addMing = false
                    this.getAll()
                  })
                }
  
              } else {
                this.$message({
                  message: '请填写完整信息',
                  type: 'error'
                })
                return false;
              }
            })
3f535f30   杨鑫   '初始'
677
678
  
          }
90d96766   wesley88   1
679
680
          this.leaseDate = []
          this.paymentDate = []
3f535f30   杨鑫   '初始'
681
682
  
        },
90d96766   wesley88   1
683
        changeMode(value) {
3f535f30   杨鑫   '初始'
684
685
686
687
          console.log(value)
          const pageindex = {
            pageNumber: 1,
            pageSize: 10,
90d96766   wesley88   1
688
            id: value
3f535f30   杨鑫   '初始'
689
          }
90d96766   wesley88   1
690
691
692
693
694
695
696
697
698
699
700
701
          ceGetAll(pageindex).then(res => {
  
            const {
              id,
              createDate,
              policyTemplate,
              pageNumber,
              pageSize,
              updateDate,
              ...rest
            } = res.data.content[0]
            this.form = rest
3f535f30   杨鑫   '初始'
702
            this.form.policyTemplate = value
d64cd58f   wesley88   上传验收小程序
703
            this.form.rentalPrice = Number(res.data.content[0].rentalPrice)
3f535f30   杨鑫   '初始'
704
            this.$set(this.leaseDate, 0, res.data.content[0].leaseStartDate);
90d96766   wesley88   1
705
706
707
            this.$set(this.leaseDate, 1, res.data.content[0].leaseEndDate);
            this.$set(this.paymentDate, 0, res.data.content[0].paymentStartDate);
            this.$set(this.paymentDate, 1, res.data.content[0].paymentEndDate);
3f535f30   杨鑫   '初始'
708
  
90d96766   wesley88   1
709
          })
3f535f30   杨鑫   '初始'
710
        },
90d96766   wesley88   1
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
        delM(ids) {
          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') {
                ceDel({
                  id: ids
                }).then(res => {
                  this.getAll()
                  done();
                })
              } else {
                done();
              }
            }
          })
7ab02d9a   杨鑫   问卷完成,最新
736
  
3f535f30   杨鑫   '初始'
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
        }
      }
    }
  </script>
  
  <style scoped>
    /deep/ .first-column-bg {
      background-color: #f4f4f5 !important;
    }
  
    .zhuti {
      padding: 10px;
      min-height: calc(100vh - 50px - 20px);
      background-color: #Fff;
  
    }
  
    /deep/ .el-form-item__content {
      line-height: 0;
    }
  
    ::v-deep .xinForm .el-form-item__content {
      line-height: 3;
    }
  
    .tableBtn {
      display: inline-block;
      margin-right: 10px;
7ab02d9a   杨鑫   问卷完成,最新
765
      cursor: pointer;
3f535f30   杨鑫   '初始'
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
    }
  
  
  
    .greens {
      color: #3F9B6A;
    }
  
  
    .fenye {
      margin-top: 20px;
      display: flex;
      justify-content: flex-start;
      position: relative;
    }
  
    /deep/ .el-pagination.is-background .el-pager li:not(.disabled).active {
      background-color: #3F9B6A;
    }
  
    .el-row {
      margin-bottom: 20px;
    }
  
    :last-child {
      margin-bottom: 0;
    }
  
    .el-col {
      border-radius: 4px;
    }
  
    .bg-purple-dark {
      background: #99a9bf;
    }
  
    .bg-purple {
      /* background: #d3dce6; */
    }
  
    .bg-purple-light {
      background: #e5e9f2;
    }
  
    .grid-content {
      border-radius: 4px;
      min-height: 36px;
    }
  
    .row-bg {
      padding: 10px 0;
      background-color: #f9fafc;
    }
  
    /deep/ .bg-purple[data-v-0e3fe4ec] {
      background: #fff;
      height: 50px;
    }
  
    /deep/ .el-form--label-top .el-form-item__label {
      padding: 0;
    }
  
    .demo-input-suffix {
      display: flex;
      margin-right: 20px;
      width: 83%;
  
      .el-input__inner {
        height: 32px;
      }
    }
  
    .pagination {
      text-align: right;
      line-height: 20px;
    }
  
    /deep/ .el-pagination__total {
      margin-top: 4px;
    }
  
    /deep/ .btn-prev {
      position: absolute;
      top: 4px;
      right: 69px;
    }
  
    /deep/ .el-pager {
      position: absolute;
      top: 4px;
      right: 40px;
    }
  
    /deep/ .btn-next {
      position: absolute;
      top: 4px;
      right: 10px;
    }
  
    /deep/ .dialog_css {
      margin-top: 11vh;
      margin-left: 13%;
      padding: 0px;
  
      .el-dialog__title {
        font-size: 12px;
      }
    }
  
    /deep/.el-dialog__body {
      padding: 0px;
    }
  
    /deep/ .el-dialog__header {
      background-color: #fff;
    }
  
    /deep/.el-dialog__title {
      color: #000;
    }
  
    .el-row {
      margin-bottom: 20px;
  
      &:last-child {
        margin-bottom: 0;
      }
    }
  
    /deep/ .avatar-uploader .el-upload {
      border: 1px dashed #d9d9d9;
      border-radius: 6px;
      cursor: pointer;
      position: relative;
      overflow: hidden;
    }
  
    .avatar-uploader .el-upload:hover {
      border-color: #409EFF;
    }
  
    .avatar-uploader-icon {
      font-size: 28px;
      color: #8c939d;
      width: 108px;
      height: 108px;
      line-height: 108px;
      /*text-align: center;*/
    }
  
    .avatar {
      width: 108px;
      height: 108px;
      display: block;
    }
  
    ::v-deep .el-tabs__item.is-active {
      color: #3F9B6A;
      opacity: 1;
    }
  
    /deep/ .el-tabs__nav-wrap::after {
      background-color: #fff;
    }
  
    ::v-deep .el-tabs__item:hover {
      color: #3F9B6A;
      cursor: pointer;
      opacity: 1;
    }
  
    /deep/ .el-tabs__active-bar {
      background-color: #389865;
    }
  
    /deep/ .el-table_2_column_13 {
      font-weight: 100;
    }
  
    ::v-deep .el-input__inner:focus {
      border: #3F9B6A 1px solid;
    }
  
    ::v-deep .el-input__inner:hover {
      border: #3F9B6A 1px solid;
    }
  
    ::v-deep .el-select .el-input.is-focus .el-input__inner {
      border-color: #3F9B6A
    }
  
  
    /* ::v-deep .el-steps .el-step__head.is-wait {
    background-color: red; /* 修改为你想要的颜色 */
  
    /* 修改未进行步骤的描述文字颜色 */
    ::v-deep .el-steps .el-step__description.is-wait {
      color: #999;
      /* 修改为你想要的颜色 */
    }
  
    /* 修改未进行步骤的图标颜色 */
    ::v-deep .el-steps .el-step__icon.is-text.is-wait {
      color: #999;
      /* 修改为你想要的颜色 */
    }
  
    /* 修改未进行步骤的边框色 */
    ::v-deep .el-steps .el-step__line.is-wait {
      border-color: #eee;
      /* 修改为你想要的颜色 */
    }
  
    ::v-deep .el-steps .is-process .el-step__line {
      background-color: #3F9B6A;
      /* 修改线的颜色 */
    }
  
    ::v-deep .el-steps .is-process .el-step__title {
      color: #fe7b6a;
      /* 修改进行中步骤的标题颜色 */
    }
  
    ::v-deep .el-steps .is-process .el-step__icon {
      color: #fff;
      /* 修改进行中步骤的图标颜色 */
      background: #3F9B6A;
      /* 修改进行中步骤图标的边框颜色 */
      border: 0px;
    }
  
    ::v-deep .el-step__icon-inner {
      line-height: 0
    }
  
    /* 线条长度 */
    ::v-deep .el-step.is-vertical .el-step__line {
      top: 30px;
      height: 60px;
    }
  
    ::v-deep .el-date-editor .el-range-separator {
      line-height: 24px;
    }
  </style>
  <style lang="scss" scoped>
    ::v-deep .xinFrom {
      padding-top: 20px;
  
      .el-input--mini .el-input__inner {
        height: 36px;
        line-height: 36px;
      }
  
      .el-range-editor--mini.el-input__inner {
        height: 36px;
        width: 100%;
      }
    }
  
    ::v-deep .buttonHover:hover {
      color: #3f9b6a !important;
      border-color: #c5e1d2 !important;
      background-color: #ecf5f0 !important;
      outline: none;
    }
  
    ::v-deep .formSearch {
      margin-top: 30px;
      display: flex;
      width: 100%;
      font-size: 14px;
      justify-content: space-between;
      padding-bottom: 10px;
      align-items: center;
  
      .el-input__icon el-range__icon el-icon-time {
        line-height: 26px;
      }
    }
  
    ::v-deep .el-radio-group {
      padding-top: 14px;
    }
  
    ::v-deep .el-radio {
      font-weight: 100 !important;
    }
  </style>