Blame view

src/views/payback/index.vue 8.47 KB
83a1b563   Andy   add 欠费补缴 前端页面
1
2
3
4
5
6
  <template>
    <div>
      <div class="serch-wrap">
        <el-row :gutter="20">
          <el-form ref="form" :model="form" label-width="60px" label-position="left">
            <el-col :xs="8" :sm="6" :md="7" :lg="7" :xl="1">
255542b3   王飞   补缴
7
8
9
10
11
12
13
14
15
16
  
              <el-form-item label="公司">
                <el-select v-model="form.orgId" placeholder="请选择公司">
                <el-option v-for="item in orgs" :label="item.orgName" :value="item.orgId"/>
  
                </el-select>
              </el-form-item>
  
            </el-col>
            <el-col :xs="8" :sm="6" :md="7" :lg="7" :xl="1">
83a1b563   Andy   add 欠费补缴 前端页面
17
18
19
20
21
22
23
24
25
26
27
28
              <el-form-item label="车牌">
                <el-input v-model="form.name" maxlength="10" />
              </el-form-item>
            </el-col>
            <el-col :xs="8" :sm="6" :md="3" :lg="3" :xl="1">
              <el-button type="primary" @click="onSubmit">查询</el-button>
            </el-col>
          </el-form>
        </el-row>
      </div>
  
      <div class="table-wrap">
83e23298   王飞   补缴
29
30
31
32
33
34
35
36
        <el-row :gutter="20">
          <el-col :xs="8" :sm="6" :md="3" :lg="22" :xl="1">
            <p class="table-title">订单详情</p>
          </el-col>
          <el-col :xs="8" :sm="3" :md="3" :lg="2" :xl="1">
            <el-button style="margin-top: 8px" size="small" type="primary" @click="toBackSubmit">补缴</el-button>
          </el-col>
        </el-row>
83a1b563   Andy   add 欠费补缴 前端页面
37
38
39
        <el-table
          :data="orderData"
          style="width: 100%;"
83e23298   王飞   补缴
40
41
42
43
44
          :show-overflow-tooltip="true"
          @selection-change="handleSelectionChange">
          <el-table-column
            type="selection">
          </el-table-column>
83a1b563   Andy   add 欠费补缴 前端页面
45
          <el-table-column
83e23298   王飞   补缴
46
            prop="plName"
83a1b563   Andy   add 欠费补缴 前端页面
47
48
49
50
            label="停车场"
            :show-overflow-tooltip="true">
          </el-table-column>
          <el-table-column
83e23298   王飞   补缴
51
            prop="carNumber"
83a1b563   Andy   add 欠费补缴 前端页面
52
53
54
55
            label="车牌"
            :show-overflow-tooltip="true">
          </el-table-column>
          <el-table-column
255542b3   王飞   补缴
56
57
            prop="arrearageFee"
            label="欠费金额">
83e23298   王飞   补缴
58
            <template slot-scope="scope">
255542b3   王飞   补缴
59
              <span>{{(scope.row.arrearageFee) |fen2Yuan}} </span>
83e23298   王飞   补缴
60
            </template>
83a1b563   Andy   add 欠费补缴 前端页面
61
62
          </el-table-column>
          <el-table-column
83e23298   王飞   补缴
63
64
            prop="parkInTime"
            label="入场时间"
83a1b563   Andy   add 欠费补缴 前端页面
65
            :show-overflow-tooltip="true">
83e23298   王飞   补缴
66
67
68
            <template slot-scope="scope">
              <span>{{(scope.row.parkInTime) |string2Date(7)}} </span>
            </template>
83a1b563   Andy   add 欠费补缴 前端页面
69
70
          </el-table-column>
          <el-table-column
83e23298   王飞   补缴
71
            prop="parkOutTime"
83a1b563   Andy   add 欠费补缴 前端页面
72
73
            label="出场时间"
            :show-overflow-tooltip="true">
83e23298   王飞   补缴
74
75
76
            <template slot-scope="scope">
              <span>{{(scope.row.parkOutTime) |string2Date(7)}} </span>
            </template>
83a1b563   Andy   add 欠费补缴 前端页面
77
78
          </el-table-column>
          <el-table-column
83e23298   王飞   补缴
79
            prop="parkingDuration"
83a1b563   Andy   add 欠费补缴 前端页面
80
81
            label="停车时长"
            :show-overflow-tooltip="true">
83e23298   王飞   补缴
82
83
84
            <template slot-scope="scope">
              <span>{{(scope.row) |parkingDurationFormatter(scope.row.parkingDuration)}} </span>
            </template>
83a1b563   Andy   add 欠费补缴 前端页面
85
86
          </el-table-column>
          <el-table-column
83e23298   王飞   补缴
87
            prop="berthNo"
83a1b563   Andy   add 欠费补缴 前端页面
88
89
90
            label="泊位编号">
          </el-table-column>
          <el-table-column
83e23298   王飞   补缴
91
            prop="orderState"
83a1b563   Andy   add 欠费补缴 前端页面
92
            label="订单状态">
83e23298   王飞   补缴
93
94
95
            <template slot-scope="scope">
              <span>{{(scope.row) |inOutStateFormatter}} </span>
            </template>
83a1b563   Andy   add 欠费补缴 前端页面
96
97
98
99
100
101
          </el-table-column>
        </el-table>
        <el-pagination
          :page-size="10"
          :pager-count="11"
          layout="prev, pager, next"
83e23298   王飞   补缴
102
103
104
105
106
107
          :total="total"
          @size-change="handleSizeChange"
          @current-change="handleSizeChange"
          @prev-click="handleSizeChange"
          @next-click="handleSizeChange"
        >
83a1b563   Andy   add 欠费补缴 前端页面
108
109
        </el-pagination>
      </div>
83e23298   王飞   补缴
110
111
112
113
114
115
      <!--补缴对话框-->
      <el-dialog
        title="补缴"
        :visible.sync="dialogVisible"
        width="30%"
        :close-on-click-modal="false">
255542b3   王飞   补缴
116
117
118
119
        <div>
          <el-image style="display: block;width: 100%" :src="url" >
          </el-image>
        </div>
83e23298   王飞   补缴
120
121
122
123
124
        <span slot="footer" class="dialog-footer">
          <el-button type="primary" @click="dialogVisible = false">确 定</el-button>
        </span>
      </el-dialog>
  
83a1b563   Andy   add 欠费补缴 前端页面
125
126
127
128
    </div>
  </template>
  
  <script>
255542b3   王飞   补缴
129
    import {pageQueryArrearRecordByCondition,selectAllAppOrg,personOrderBackWxPay } from '@/api/index';
83e23298   王飞   补缴
130
131
132
133
134
    import {fen2Yuan,string2Date,inOutStateFormatter,parkingDurationFormatter} from '@/filters/index';
    export default {
      data() {
        return {
          form: {
255542b3   王飞   补缴
135
            orgId:null,
83e23298   王飞   补缴
136
137
138
            plNos: null,
            carNum: null,
  
83a1b563   Andy   add 欠费补缴 前端页面
139
          },
255542b3   王飞   补缴
140
          orgs:[],
83e23298   王飞   补缴
141
142
143
144
145
146
147
          total: 0,
          currentPage: 1,
          pageSize: 10,
          orderData: [
          ],
          multipleSelection:[],
          dialogVisible:false,
255542b3   王飞   补缴
148
          url:'http://106.15.186.134:9090/group1/M00/20/F3/rBMAsV0exOmAH91dAAZpQUTBbps512.jpg',
83e23298   王飞   补缴
149
        }
83a1b563   Andy   add 欠费补缴 前端页面
150
      },
83e23298   王飞   补缴
151
      mounted: function() {
255542b3   王飞   补缴
152
        this.selectAllAppOrg();
83e23298   王飞   补缴
153
  
83e23298   王飞   补缴
154
155
156
      },
      methods: {
        /**
255542b3   王飞   补缴
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
         *获取所有组织下拉框
         */
        selectAllAppOrg:function(){
          let req = {};
          selectAllAppOrg (req).then(response =>{
            if(response.code=='8888'){
              this.orgs = response.data;
              this.form.orgId = response.data[0].orgId;
              this.pageQueryArrearRecordByCondition();
            }else{
              console.log(response);
            }
  
          });
        },
        /**
83e23298   王飞   补缴
173
174
175
         * 获取查询参数
         */
        getQueryParams: function() {
255542b3   王飞   补缴
176
177
178
179
          if(this.form.orgId == undefined || this.form.orgId == null){
            console.log("orgId为空");
            return;
          }
83e23298   王飞   补缴
180
181
182
183
184
185
186
187
188
189
          let userInfo = this.$store.state.user.userInfo;
          let plNos = [];
          if(this.form.plNos != null && this.form.plNos != ''){
            plNos.push(this.form.plNos);
          }
          let req = {
            //custId:userInfo.custId,
            custId:'501519113641649119232',
            orderStates:[52],
            plNos:plNos,
255542b3   王飞   补缴
190
            orgId:this.form.orgId,
83e23298   王飞   补缴
191
192
193
194
195
196
197
            carNum:this.form.carNum,
          }
          return req;
        },
        /**
         * 查询订单信息
         */
255542b3   王飞   补缴
198
        pageQueryArrearRecordByCondition: function() {
83e23298   王飞   补缴
199
200
201
202
203
204
          let req = this.getQueryParams();
  
          req.baseRequest={
            pageNum:this.currentPage,
            pageSize:this.pageSize,
          },
255542b3   王飞   补缴
205
            pageQueryArrearRecordByCondition (req).then(response =>{
83e23298   王飞   补缴
206
207
208
209
210
211
212
213
214
215
216
217
218
219
              if(response.code=='8888'){
                this.orderData = response.data.dataList;
                this.total = response.data.pageTotals;
              }else{
                console.log(response);
              }
  
            });
        },
        // 获取子组件页码方法
        handleSizeChange: function(page) {
          console.log(page)
          this.currentPage = page;
          /** 调用表格数据.*/
255542b3   王飞   补缴
220
          this.pageQueryArrearRecordByCondition();
83e23298   王飞   补缴
221
222
223
224
225
226
227
228
229
  
        },
        //多选
        handleSelectionChange:function(val) {
          this.multipleSelection = val;
  
        },
        toBackSubmit:function(){
          let selects = this.multipleSelection;
2f924783   王富生   提交登陆
230
          /*if(selects == null || selects.length < 1){
83e23298   王飞   补缴
231
232
233
234
235
            this.$message({
              message: '请至少选择一行数据!',
              type: 'warning'
            });
            return;
2f924783   王富生   提交登陆
236
          }*/
255542b3   王飞   补缴
237
238
          let orders = [];
          let orgIds = [];
2f924783   王富生   提交登陆
239
          /*selects.forEach(item=>{
255542b3   王飞   补缴
240
241
            orders.push({orderId:item.orderId,parkId:item.plNo,orderNotPayFee:item.arrearageFee});
            orgIds.push(item.orgId);
2f924783   王富生   提交登陆
242
243
244
          });*/
          orders.push({orderId:'101519114989403303936',parkId:'P320211005',orderNotPayFee:'72275'});
          orgIds.push('10005');
255542b3   王飞   补缴
245
246
247
248
249
250
251
252
253
254
255
256
          if(orders == null || orders.length < 1){
            this.$message({
              message: '请至少选择一行数据!',
              type: 'warning'
            });
            return;
          }
  
          let req ={
            sysCode:'10003',
            payType:2,
            paySrcType:103,
2f924783   王富生   提交登陆
257
            carNumber:'京A12333',
255542b3   王飞   补缴
258
259
260
261
262
263
264
265
266
            terminalSource:9,
            recordArreaInfos:JSON.stringify(orders)
          };
          // req = JSON.stringify(req);
          //调用后台接口获取二维码信息
          personOrderBackWxPay(req).then(response =>{
            if(response.code=='8888'){
              console.log(response.data);
              this.url = response.data;
83e23298   王飞   补缴
267
  
255542b3   王飞   补缴
268
269
270
271
272
273
            }else{
              console.log(response);
              this.url = "http://106.15.186.134:9090/group1/M00/20/F3/rBMAsV0exOmAH91dAAZpQUTBbps512.jpg";
            }
  
          });
83e23298   王飞   补缴
274
275
276
277
          this.dialogVisible = true;
        },
  
        onSubmit:function() {
255542b3   王飞   补缴
278
          this.pageQueryArrearRecordByCondition();
83e23298   王飞   补缴
279
280
281
282
283
284
285
        },
        onCancel:function() {
          this.$message({
            message: 'cancel!',
            type: 'warning'
          })
        }
83a1b563   Andy   add 欠费补缴 前端页面
286
287
      }
    }
83a1b563   Andy   add 欠费补缴 前端页面
288
289
290
291
292
293
294
295
296
  </script>
  
  <style scoped>
    .serch-wrap{
      background-color: #FFF;
      padding: 15px;
    }
  
  </style>