Blame view

admin-web-master/src/views/customer/icManagement/index.vue 7.83 KB
3f535f30   杨鑫   '初始'
1
2
  <template>
    <div style="background-color:#f7f7f7;padding:10px 10px;">
813b166e   wesley88   1
3
      <div class="zhuti" v-if="onaction == '1'">
3f535f30   杨鑫   '初始'
4
        <div style="height:58px;line-height:58px;">
ab1ffdd3   杨鑫   '更新'
5
          <div style="color:#0006"> <span>商户意向管理</span> <span style="padding:0 5px;">></span> <span
3f535f30   杨鑫   '初始'
6
7
              style="color:#000000e6">意向客户管理</span></div>
        </div>
813b166e   wesley88   1
8
        <!-- 线上 -->
3f535f30   杨鑫   '初始'
9
10
11
        <div>
          <!-- 搜索 -->
          <div class="formSearch">
813b166e   wesley88   1
12
13
14
15
16
17
18
19
20
            <el-form :inline="true" :model="pagequery">
              <el-form-item label="意向客户名称" prop="intentCustomerName">
                <el-input v-model="pagequery.intentCustomerName" placeholder="请输入" maxlength="50"></el-input>
              </el-form-item>
              <el-form-item label="手机号" prop="phone">
                <el-input v-model="pagequery.phone" placeholder="请输入" maxlength="50"></el-input>
              </el-form-item>
            </el-form>
  
3f535f30   杨鑫   '初始'
21
22
23
24
25
26
27
            <div>
              <el-button @click="onSubmit" style="background-color: #3F9B6A;color: #fff">查询
              </el-button>
              <el-button @click="resetting" class="buttonHover"
                style="color: #606266;border: 1px solid #dddfe5;background-color: #fff;">重置
              </el-button>
            </div>
3f535f30   杨鑫   '初始'
28
          </div>
813b166e   wesley88   1
29
30
31
32
          <div style="margin-bottom: 20px;">
            <el-button @click="removeonaction('2')" style="background-color: #3F9B6A;color: #fff;padding:8px 15px;"
              icon="el-icon-circle-plus-outline">新增</el-button>
            <!-- <el-button @click="" style="background-color: #3F9B6A;color: #fff">批量导入</el-button> -->
3f535f30   杨鑫   '初始'
33
34
          </div>
          <!-- 表格 -->
813b166e   wesley88   1
35
36
37
  
          <el-table :data="tableData" :header-cell-style="{fontSize: '14px',color:'#0009',fontWeight: 'normal',backgroundColor:'#F2F3F5'}">
            <el-table-column label="序号" width="50">
eaa0f084   杨鑫   '1111'
38
              <template slot-scope="scope">
813b166e   wesley88   1
39
                {{scope.$index +1 }}
eaa0f084   杨鑫   '1111'
40
              </template>
3f535f30   杨鑫   '初始'
41
            </el-table-column>
813b166e   wesley88   1
42
43
44
45
46
47
48
            <el-table-column label="意向客户名称" prop="intentCustomerName"/>
            <el-table-column label="手机号" prop="phone"/>
            <el-table-column label="意向租赁类型" prop="leaseType"/>
            <el-table-column label="主体名称" prop="leaseCycle" />
            <el-table-column label="主体类型" prop="operationType" />
            <el-table-column label="经营范围" prop="idCardNumber"  />
            <el-table-column label="操作" >
3f535f30   杨鑫   '初始'
49
              <template slot-scope="scope">
813b166e   wesley88   1
50
51
52
                <div @click="details(scope.row)" class="tableBtn greens">查看</div>
                <div class="tableBtn greens"  @click="removeinfo(scope.row,'编辑')">编辑</div>
                <div class="tableBtn greens"  @click="closemsg(scope.row)">删除</div>
3f535f30   杨鑫   '初始'
53
54
55
              </template>
            </el-table-column>
          </el-table>
813b166e   wesley88   1
56
57
58
59
60
61
          <div style="display: flex;justify-content: space-between;" class="bom">
            <div style="font-size: 14px;">共 <span style="color: #3F9B6A;">{{total}}</span> 项数据</div>
            <el-pagination :current-page="pagequery.pageNumber+1" :page-sizes="[10, 20, 50, 100]" :page-size="pagequery.pageSize"
              background small layout="prev, pager, next" :total="total" @size-change="handleSizeChange"
              @current-change="handleCurrentChange">
            </el-pagination>
3f535f30   杨鑫   '初始'
62
          </div>
3f535f30   杨鑫   '初始'
63
  
8550d958   杨鑫   '最新'
64
        </div>
813b166e   wesley88   1
65
  
8550d958   杨鑫   '最新'
66
      </div>
cfcb44ef   杨鑫   '改bug版'
67
  
8550d958   杨鑫   '最新'
68
  
8550d958   杨鑫   '最新'
69
  
b1fef010   杨鑫   '最新代码'
70
  
3f535f30   杨鑫   '初始'
71
  
8550d958   杨鑫   '最新'
72
  
813b166e   wesley88   1
73
74
75
76
77
      <div class="zhuti" v-if="onaction == '2'">
        <div style="height:58px;line-height:58px;">
          <div style="color:#0006"> <span>意向客户管理</span> <span style="padding:0 5px;">></span> <span
              style="color:#000000e6">新增</span></div>
        </div>
3f535f30   杨鑫   '初始'
78
  
813b166e   wesley88   1
79
80
        <div style="padding: 20px 20px 20px 0;">
          <addyx @removeonaction="removeonaction"></addyx>
3f535f30   杨鑫   '初始'
81
82
        </div>
      </div>
813b166e   wesley88   1
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
      <div class="zhuti" v-if="onaction == '3'">
        <div style="height:58px;line-height:58px;">
          <div style="color:#0006"> <span>意向客户管理</span> <span style="padding:0 5px;">></span> <span
              style="color:#000000e6">查看</span></div>
        </div>
        <div>
          <yx :info="detailsinfo" @removeonaction="removeonaction"></yx>
        </div>
      </div>
      <div class="zhuti" v-if="onaction == '4'">
        <div style="height:58px;line-height:58px;">
          <div style="color:#0006"> <span>意向客户管理</span> <span style="padding:0 5px;">></span> <span
              style="color:#000000e6">编辑</span></div>
        </div>
        <div style="padding: 20px 20px 20px 0;">
          <addyx :info="detailsinfo" @removeonaction="removeonaction"></addyx>
        </div>
      </div>
    </div>
b1fef010   杨鑫   '最新代码'
102
  
8550d958   杨鑫   '最新'
103
  
3f535f30   杨鑫   '初始'
104
105
106
  </template>
  
  <script>
eaa0f084   杨鑫   '1111'
107
    import {
eaa0f084   杨鑫   '1111'
108
109
110
111
      icManAll,
      icManAdd,
      icManEdit,
      icManDel,
813b166e   wesley88   1
112
113
114
    } from '@/api/icManagement';
    import  addyx from '@/components/add/addyx'
      import yx from '@/components/chakan/yx'
eaa0f084   杨鑫   '1111'
115
    export default {
eaa0f084   杨鑫   '1111'
116
117
      data() {
        return {
813b166e   wesley88   1
118
119
          detailsinfo: {},
          pagequery: {
b1fef010   杨鑫   '最新代码'
120
            pageNumber: 0,
eaa0f084   杨鑫   '1111'
121
            pageSize: 10,
813b166e   wesley88   1
122
123
            intentCustomerName:'',
            phone:''
eaa0f084   杨鑫   '1111'
124
          },
eaa0f084   杨鑫   '1111'
125
          tableData: [],
813b166e   wesley88   1
126
127
128
          total: 0,
          onaction: '1',
          formInline: {
8550d958   杨鑫   '最新'
129
          },
8550d958   杨鑫   '最新'
130
        }
eaa0f084   杨鑫   '1111'
131
      },
813b166e   wesley88   1
132
133
134
135
136
137
      components: {
        addyx,
        yx
      },
      async created() {
        this.getAll()
eaa0f084   杨鑫   '1111'
138
      },
eaa0f084   杨鑫   '1111'
139
      methods: {
813b166e   wesley88   1
140
141
142
        details(row) {
          this.detailsinfo = row
          this.onaction = '3'
b1fef010   杨鑫   '最新代码'
143
        },
813b166e   wesley88   1
144
145
146
147
        removeinfo(row, e) {
          this.contractChangeReason = e
          this.detailsinfo = row
          this.onaction = '4'
3f535f30   杨鑫   '初始'
148
        },
eaa0f084   杨鑫   '1111'
149
        async getAll() {
813b166e   wesley88   1
150
          const res = await icManAll(this.pagequery)
eaa0f084   杨鑫   '1111'
151
          this.tableData = res.data.content
813b166e   wesley88   1
152
          this.total = res.data.totalElements
eaa0f084   杨鑫   '1111'
153
        },
813b166e   wesley88   1
154
155
156
157
        removeonaction(e) {
          console.error(e)
          this.onaction = e
          this.pagequery.pageNumber = 0
b1fef010   杨鑫   '最新代码'
158
          this.getAll()
eaa0f084   杨鑫   '1111'
159
        },
eaa0f084   杨鑫   '1111'
160
        handleCurrentChange(val) {
813b166e   wesley88   1
161
162
          this.pagequery.pageNumber = val - 1
          this.getAll()
eaa0f084   杨鑫   '1111'
163
164
        },
        handleSizeChange(val) {
813b166e   wesley88   1
165
166
167
          this.pagequery.pageSize = val
          this.pagequery.pageNumber = 0
          this.getAll()
eaa0f084   杨鑫   '1111'
168
        },
813b166e   wesley88   1
169
170
171
172
        // 查询按钮
        async onSubmit() {
          this.pagequery.pageNumber = 0
          this.getAll()
eaa0f084   杨鑫   '1111'
173
        },
813b166e   wesley88   1
174
175
176
177
178
179
180
181
182
183
184
185
        //重置按钮
        resetting() {
          this.pagequery = {
              pageNumber: 0,
              pageSize: 10,
              intentCustomerName:'',
              phone:''
            },
            this.getAll()
        },
        //删除
        closemsg(item) {
eaa0f084   杨鑫   '1111'
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
          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') {
                icManDel({
                  id: item.id
                }).then(res => {
cfcb44ef   杨鑫   '改bug版'
202
203
204
205
                  this.$message({
                    message: '删除成功',
                    type: 'success'
                  })
eaa0f084   杨鑫   '1111'
206
207
208
209
210
211
212
213
                  this.getAll()
                  done();
                })
              } else {
                done();
              }
            }
          })
eaa0f084   杨鑫   '1111'
214
215
        },
      }
813b166e   wesley88   1
216
  
3f535f30   杨鑫   '初始'
217
    }
3f535f30   杨鑫   '初始'
218
  </script>
3f535f30   杨鑫   '初始'
219
  
813b166e   wesley88   1
220
  <style scoped>
eaa0f084   杨鑫   '1111'
221
    .zhuti {
3f535f30   杨鑫   '初始'
222
223
224
225
226
      padding: 0 20px 20px 20px;
      min-height: calc(100vh - 50px - 20px);
      background-color: #Fff;
  
    }
813b166e   wesley88   1
227
228
229
230
231
    .chengeXia {
      border-bottom: 6px solid #3F9B6A;
      padding-bottom: 4px;
      color: #3F9B6A;
    }
b1fef010   杨鑫   '最新代码'
232
  
3f535f30   杨鑫   '初始'
233
  
eaa0f084   杨鑫   '1111'
234
    .formSearch {
3f535f30   杨鑫   '初始'
235
236
237
238
239
      display: flex;
      width: 100%;
      font-size: 14px;
      justify-content: space-between;
    }
eaa0f084   杨鑫   '1111'
240
    .greens {
813b166e   wesley88   1
241
      color: #3F9B6A;
eaa0f084   杨鑫   '1111'
242
    }
eaa0f084   杨鑫   '1111'
243
244
245
246
247
    .bg-purple-dark {
      background: #99a9bf;
    }
  
    .bg-purple {
813b166e   wesley88   1
248
      background: #d3dce6;
eaa0f084   杨鑫   '1111'
249
250
251
252
253
    }
  
    .bg-purple-light {
      background: #e5e9f2;
    }
eaa0f084   杨鑫   '1111'
254
255
256
257
258
    .grid-content {
      border-radius: 4px;
      min-height: 36px;
    }
  
3f535f30   杨鑫   '初始'
259
260
  </style>
  <style lang="scss" scoped>
813b166e   wesley88   1
261
262
    ::v-deep .el-dialog__body {
      padding: 0 0 !important;
3f535f30   杨鑫   '初始'
263
    }
813b166e   wesley88   1
264
265
266
    .el-dialog__header{
      padding: 0;
      display: none;
3f535f30   杨鑫   '初始'
267
268
    }
  </style>