Browse Source

页面上传

页面上传
Liao 1 year ago
parent
commit
74362af9dd

+ 194 - 0
src/pages/index/components/pay_configuration.vue

@@ -0,0 +1,194 @@
1
+<template>
2
+  <div class="body-wrapper">
3
+    <div style="display: flex; justify-content: space-between;">
4
+      <div style="width: 100%">
5
+        <h4>应用配置</h4>
6
+        <br>
7
+        <el-form class="form-wrapper" :inline="true" :model="formInline" style="margin-bottom: 20px;">
8
+          <el-row>
9
+            <el-col :span="6">
10
+              <el-form-item label="商户ID:">
11
+                <el-input v-model="parkName" placeholder="请输入"></el-input>
12
+              </el-form-item>
13
+            </el-col>
14
+            <el-col :span="6">
15
+              <el-form-item label="商户名称:">
16
+                <el-input v-model="berthCode" placeholder="请输入"></el-input>
17
+              </el-form-item>
18
+            </el-col>
19
+            <el-col :span="6">
20
+              <el-form-item label="停车场名称:">
21
+                <el-input v-model="berthCode" placeholder="请输入"></el-input>
22
+              </el-form-item>
23
+            </el-col>
24
+            <el-col :span="4">
25
+              <el-form-item>
26
+                <el-button type="primary" class="query-btn" @click="onSubmit">查询</el-button>
27
+              </el-form-item>
28
+              <el-form-item>
29
+                <el-button type="primary" class="query-btn" @click="handleAdd">添加</el-button>
30
+              </el-form-item>
31
+            </el-col>
32
+          </el-row>
33
+        </el-form>
34
+        <br>
35
+        <el-table :data="tableData">
36
+          <el-table-column v-for="(item, index) in columns" :key="index" :label="item.label" :prop="item.key">
37
+          </el-table-column>
38
+          <el-table-column
39
+            label="操作"
40
+            width="200">
41
+            <template slot-scope="scope" style="display: inline-block">
42
+              <el-button type="primary" @click="handleEdit(scope.row)" slot="reference">修改</el-button>
43
+              <el-popconfirm title="确定删除吗?" @confirm="deleteRow2(scope.row)">
44
+                <el-button type="danger" slot="reference">删除</el-button>
45
+              </el-popconfirm>
46
+            </template>
47
+          </el-table-column>
48
+        </el-table>
49
+
50
+        <div class="table-pagination">
51
+          <el-pagination :background="false" layout="total, prev, pager, next" :total="total" @current-change="handlePageChange"
52
+                         :current-page.sync="pageNum" :page-size.sync="pageSize">
53
+          </el-pagination>
54
+        </div>
55
+      </div>
56
+    </div>
57
+
58
+    <el-dialog
59
+      :title="title"
60
+      :visible.sync="dialogVisible"
61
+      width="45%"
62
+      custom-class="audit-dialog">
63
+      <div class="form-div">
64
+        <el-form label-position="left" label-width="100px" :model="formInline">
65
+          <el-form-item label="商户ID:">
66
+            <el-input v-model="formInline.parkName" placeholder="请输入"></el-input>
67
+          </el-form-item>
68
+          <el-form-item label="商户名称:">
69
+            <el-input v-model="formInline.berthCode" placeholder="请输入"></el-input>
70
+          </el-form-item>
71
+          <el-form-item label="停车场名称:">
72
+            <el-input v-model="formInline.berthIsorno" placeholder="请输入"></el-input>
73
+          </el-form-item>
74
+        </el-form>
75
+      </div>
76
+      <span slot="footer" class="dialog-footer">
77
+            <el-button @click="dialogVisible = false">取 消</el-button>
78
+            <el-button type="primary" @click="handleConfirm">确 定</el-button>
79
+        </span>
80
+    </el-dialog>
81
+
82
+  </div>
83
+</template>
84
+<script>
85
+import api from "@/api/audit";
86
+
87
+
88
+export default {
89
+  components: {
90
+
91
+  },
92
+  data() {
93
+    return {
94
+      formInline: {
95
+        parkName: '',
96
+        berthCode: '',
97
+        berthIsorno:''
98
+      },
99
+      columns: [
100
+        {
101
+          label: '商户ID',
102
+          key: 'parkName'
103
+        },
104
+        {
105
+          label: '商户名称',
106
+          key: 'berthCode'
107
+        },
108
+        {
109
+          label: '停车场',
110
+          key: 'berthIsorno'
111
+        },
112
+        {
113
+          label: '创建人',
114
+          key: 'isTidalPark'
115
+        },
116
+        {
117
+          label: '创建日期',
118
+          key: 'hasChargingPile'
119
+        },
120
+      ],
121
+      tableData:[],
122
+      parkName: '',
123
+      berthCode: '',
124
+      berthIsorno:'',
125
+      title:'',
126
+      dialogVisible: false,
127
+      formLabelAlign: {
128
+        parkName: '',
129
+        berthCode: '',
130
+        berthIsorno:'',
131
+      },
132
+      total: 0,
133
+      pageSize: 5,
134
+      pageNum: 1,
135
+    }
136
+  },
137
+  mounted() {
138
+    this.getTableData()
139
+  },
140
+  watch: {},
141
+  methods: {
142
+    onSubmit() {
143
+      this.pageNum = 1
144
+      this.getTableData()
145
+    },
146
+    handlePageChange() {
147
+      this.getTableData()
148
+    },
149
+    handleAdd() {
150
+      this.title = '添加配置'
151
+      this.formLabelAlign.parkName = ''
152
+      this.formLabelAlign.berthCode = ''
153
+      this.formLabelAlign.berthIsorno = ''
154
+      this.dialogVisible = true
155
+    },
156
+    handleEdit(row) {
157
+      this.title = '修改车场'
158
+      this.formInline = {...row}
159
+      this.dialogVisible = true
160
+    },
161
+    getTableData() {
162
+      const {pageNum, pageSize} = this
163
+      api.berthListByPage({current: pageNum, size: pageSize, ...this.formInline}).then(res => {
164
+        this.tableData = (res.data.records || []).map(item => ({...item, berthIsorno: (item.berthIsorno === '0' ? '否':'是'),isTidalPark: (item.isTidalPark === '0' ? '否':'是'),hasChargingPile: (item.hasChargingPile === '0' ? '否':'是'),isSharePark: (item.isSharePark === '0' ? '否':'是'),}))
165
+        this.total = res.data.total
166
+      })
167
+    },
168
+  }
169
+}
170
+</script>
171
+<style lang="scss" scoped>
172
+.body-wrapper {
173
+  padding: 20px;
174
+
175
+  .button-block {
176
+    text-align: right;
177
+    margin-bottom: 20px;
178
+  }
179
+
180
+  .table-pagination {
181
+    text-align: right;
182
+  }
183
+
184
+  .search-card {
185
+    margin-bottom: 20px;
186
+    text-align: center;
187
+
188
+    .input-wrapper {
189
+      width: 40%;
190
+    }
191
+  }
192
+}
193
+
194
+</style>

+ 224 - 0
src/pages/index/components/payment_merchant.vue

@@ -0,0 +1,224 @@
1
+<template>
2
+  <div class="body-wrapper">
3
+    <div style="display: flex; justify-content: space-between;">
4
+      <div style="width: 100%">
5
+        <h4>应用配置</h4>
6
+        <br>
7
+        <el-form class="form-wrapper" :inline="true" :model="formInline" style="margin-bottom: 20px;">
8
+          <el-row>
9
+            <el-col :span="6">
10
+              <el-form-item label="商户ID:">
11
+                <el-input v-model="parkName" placeholder="请输入"></el-input>
12
+              </el-form-item>
13
+            </el-col>
14
+            <el-col :span="6">
15
+              <el-form-item label="商户名称:">
16
+                <el-input v-model="berthCode" placeholder="请输入"></el-input>
17
+              </el-form-item>
18
+            </el-col>
19
+            <el-col :span="6">
20
+              <el-form-item label="停车场名称:">
21
+                <el-input v-model="berthCode" placeholder="请输入"></el-input>
22
+              </el-form-item>
23
+            </el-col>
24
+            <el-col :span="4">
25
+              <el-form-item>
26
+                <el-button type="primary" class="query-btn" @click="onSubmit">查询</el-button>
27
+              </el-form-item>
28
+              <el-form-item>
29
+                <el-button type="primary" class="query-btn" @click="handleAdd">添加</el-button>
30
+              </el-form-item>
31
+            </el-col>
32
+          </el-row>
33
+        </el-form>
34
+        <br>
35
+        <el-table :data="tableData">
36
+          <el-table-column v-for="(item, index) in columns" :key="index" :label="item.label" :prop="item.key">
37
+          </el-table-column>
38
+          <el-table-column
39
+            label="操作"
40
+            width="200">
41
+            <template slot-scope="scope" style="display: inline-block">
42
+              <el-button type="primary" @click="handleEdit(scope.row)" slot="reference">修改</el-button>
43
+              <el-popconfirm title="确定删除吗?" @confirm="deleteRow2(scope.row)">
44
+                <el-button type="danger" slot="reference">删除</el-button>
45
+              </el-popconfirm>
46
+            </template>
47
+          </el-table-column>
48
+        </el-table>
49
+
50
+        <div class="table-pagination">
51
+          <el-pagination :background="false" layout="total, prev, pager, next" :total="total" @current-change="handlePageChange"
52
+                         :current-page.sync="pageNum" :page-size.sync="pageSize">
53
+          </el-pagination>
54
+        </div>
55
+      </div>
56
+    </div>
57
+
58
+    <el-dialog
59
+      :title="title"
60
+      :visible.sync="dialogVisible"
61
+      width="45%"
62
+      custom-class="audit-dialog">
63
+      <div class="form-div">
64
+        <el-form label-position="left" label-width="100px" :model="formInline">
65
+          <el-form-item label="商户ID:">
66
+            <el-input v-model="formInline.parkName" placeholder="请输入"></el-input>
67
+          </el-form-item>
68
+          <el-form-item label="商户名称:">
69
+            <el-input v-model="formInline.berthCode" placeholder="请输入"></el-input>
70
+          </el-form-item>
71
+          <el-form-item label="支付渠道:">
72
+            <el-input v-model="formInline.berthIsorno" placeholder="请输入"></el-input>
73
+          </el-form-item>
74
+          <el-form-item label="APP ID">
75
+            <el-input v-model="formInline.app_id" placeholder="请输入"></el-input>
76
+          </el-form-item>
77
+          <el-form-item label="App Secret">
78
+            <el-input v-model="formInline.app_secret" placeholder="请输入"></el-input>
79
+          </el-form-item>
80
+          <el-form-item label="API KEY">
81
+            <el-input v-model="formInline.api_key" placeholder="请输入"></el-input>
82
+          </el-form-item>
83
+        </el-form>
84
+      </div>
85
+      <span slot="footer" class="dialog-footer">
86
+            <el-button @click="dialogVisible = false">取 消</el-button>
87
+            <el-button type="primary" @click="handleConfirm">确 定</el-button>
88
+        </span>
89
+    </el-dialog>
90
+
91
+  </div>
92
+</template>
93
+<script>
94
+import api from "@/api/audit";
95
+
96
+
97
+export default {
98
+  components: {
99
+
100
+  },
101
+  data() {
102
+    return {
103
+      formInline: {
104
+        parkName: '',
105
+        berthCode: '',
106
+        berthIsorno:'',
107
+        app_id:'',
108
+        app_secret:'',
109
+        api_key:''
110
+      },
111
+      columns: [
112
+        {
113
+          label: '商户ID',
114
+          key: 'parkName'
115
+        },
116
+        {
117
+          label: '商户名称',
118
+          key: 'berthCode'
119
+        },
120
+        {
121
+          label: '停车场',
122
+          key: 'berthIsorno'
123
+        },
124
+        {
125
+          label: 'APP ID',
126
+          key: 'app_id'
127
+        },
128
+        {
129
+          label: 'APP Secret',
130
+          key: 'app_secret'
131
+        },
132
+        {
133
+          label: 'API Key',
134
+          key: 'api_key'
135
+        },
136
+        {
137
+          label: '创建人',
138
+          key: 'isTidalPark'
139
+        },
140
+        {
141
+          label: '创建日期',
142
+          key: 'hasChargingPile'
143
+        },
144
+      ],
145
+      tableData:[],
146
+      parkName: '',
147
+      berthCode: '',
148
+      berthIsorno:'',
149
+      title:'',
150
+      dialogVisible: false,
151
+      formLabelAlign: {
152
+        parkName: '',
153
+        berthCode: '',
154
+        berthIsorno:'',
155
+        app_id:'',
156
+        app_secret:'',
157
+        api_key:''
158
+      },
159
+      total: 0,
160
+      pageSize: 5,
161
+      pageNum: 1,
162
+    }
163
+  },
164
+  mounted() {
165
+    this.getTableData()
166
+  },
167
+  watch: {},
168
+  methods: {
169
+    onSubmit() {
170
+      this.pageNum = 1
171
+      this.getTableData()
172
+    },
173
+    handlePageChange() {
174
+      this.getTableData()
175
+    },
176
+    handleAdd() {
177
+      this.title = '添加配置'
178
+      this.formInline.parkName = ''
179
+      this.formInline.berthCode = ''
180
+      this.formInline.berthIsorno = ''
181
+      this.formInline.app_id=''
182
+      this.formInline.app_secret=''
183
+      this.formInline.api_key=''
184
+      this.dialogVisible = true
185
+    },
186
+    handleEdit(row) {
187
+      this.title = '修改车场'
188
+      this.formInline = {...row}
189
+      this.dialogVisible = true
190
+    },
191
+    getTableData() {
192
+      const {pageNum, pageSize} = this
193
+      api.berthListByPage({current: pageNum, size: pageSize, ...this.formInline}).then(res => {
194
+        this.tableData = (res.data.records || []).map(item => ({...item, berthIsorno: (item.berthIsorno === '0' ? '否':'是'),isTidalPark: (item.isTidalPark === '0' ? '否':'是'),hasChargingPile: (item.hasChargingPile === '0' ? '否':'是'),isSharePark: (item.isSharePark === '0' ? '否':'是'),}))
195
+        this.total = res.data.total
196
+      })
197
+    },
198
+  }
199
+}
200
+</script>
201
+<style lang="scss" scoped>
202
+.body-wrapper {
203
+  padding: 20px;
204
+
205
+  .button-block {
206
+    text-align: right;
207
+    margin-bottom: 20px;
208
+  }
209
+
210
+  .table-pagination {
211
+    text-align: right;
212
+  }
213
+
214
+  .search-card {
215
+    margin-bottom: 20px;
216
+    text-align: center;
217
+
218
+    .input-wrapper {
219
+      width: 40%;
220
+    }
221
+  }
222
+}
223
+
224
+</style>

+ 210 - 0
src/pages/index/components/platform_merchant.vue

@@ -0,0 +1,210 @@
1
+<template>
2
+  <div class="body-wrapper">
3
+    <div style="display: flex; justify-content: space-between;">
4
+      <div style="width: 100%">
5
+        <h4>应用配置</h4>
6
+        <br>
7
+        <el-form class="form-wrapper" :inline="true" :model="formInline" style="margin-bottom: 20px;">
8
+          <el-row>
9
+            <el-col :span="6">
10
+              <el-form-item label="平台商户名称:">
11
+                <el-input v-model="parkName" placeholder="请输入"></el-input>
12
+              </el-form-item>
13
+            </el-col>
14
+            <el-col :span="6">
15
+              <el-form-item label="支付商户名称:">
16
+                <el-input v-model="berthCode" placeholder="请输入"></el-input>
17
+              </el-form-item>
18
+            </el-col>
19
+            <el-col :span="6">
20
+              <el-form-item label="停车场名称:">
21
+                <el-input v-model="berthCode" placeholder="请输入"></el-input>
22
+              </el-form-item>
23
+            </el-col>
24
+            <el-col :span="4">
25
+              <el-form-item>
26
+                <el-button type="primary" class="query-btn" @click="onSubmit">查询</el-button>
27
+              </el-form-item>
28
+              <el-form-item>
29
+                <el-button type="primary" class="query-btn" @click="handleAdd">添加</el-button>
30
+              </el-form-item>
31
+            </el-col>
32
+          </el-row>
33
+        </el-form>
34
+        <br>
35
+        <el-table :data="tableData">
36
+          <el-table-column v-for="(item, index) in columns" :key="index" :label="item.label" :prop="item.key">
37
+          </el-table-column>
38
+          <el-table-column
39
+            label="操作"
40
+            width="200">
41
+            <template slot-scope="scope" style="display: inline-block">
42
+              <el-button type="primary" @click="handleEdit(scope.row)" slot="reference">修改</el-button>
43
+              <el-popconfirm title="确定删除吗?" @confirm="deleteRow2(scope.row)">
44
+                <el-button type="danger" slot="reference">删除</el-button>
45
+              </el-popconfirm>
46
+            </template>
47
+          </el-table-column>
48
+        </el-table>
49
+
50
+        <div class="table-pagination">
51
+          <el-pagination :background="false" layout="total, prev, pager, next" :total="total" @current-change="handlePageChange"
52
+                         :current-page.sync="pageNum" :page-size.sync="pageSize">
53
+          </el-pagination>
54
+        </div>
55
+      </div>
56
+    </div>
57
+
58
+    <el-dialog
59
+      :title="title"
60
+      :visible.sync="dialogVisible"
61
+      width="45%"
62
+      custom-class="audit-dialog">
63
+      <div class="form-div">
64
+        <el-form label-position="left" label-width="100px" :model="formInline">
65
+          <el-form-item label="平台商户ID:">
66
+            <el-input v-model="formInline.parkName" placeholder="请输入"></el-input>
67
+          </el-form-item>
68
+          <el-form-item label="平台商户名称:">
69
+            <el-input v-model="formInline.berthCode" placeholder="请输入"></el-input>
70
+          </el-form-item>
71
+          <el-form-item label="支付商户ID:">
72
+            <el-input v-model="formInline.berthIsorno" placeholder="请输入"></el-input>
73
+          </el-form-item>
74
+          <el-form-item label="支付商户名称">
75
+            <el-input v-model="formInline.app_id" placeholder="请输入"></el-input>
76
+          </el-form-item>
77
+        </el-form>
78
+      </div>
79
+      <span slot="footer" class="dialog-footer">
80
+            <el-button @click="dialogVisible = false">取 消</el-button>
81
+            <el-button type="primary" @click="handleConfirm">确 定</el-button>
82
+        </span>
83
+    </el-dialog>
84
+
85
+  </div>
86
+</template>
87
+<script>
88
+import api from "@/api/audit";
89
+
90
+
91
+export default {
92
+  components: {
93
+
94
+  },
95
+  data() {
96
+    return {
97
+      formInline: {
98
+        parkName: '',
99
+        berthCode: '',
100
+        berthIsorno:'',
101
+        app_id:'',
102
+        app_secret:'',
103
+        api_key:''
104
+      },
105
+      columns: [
106
+        {
107
+          label: '平台商户ID',
108
+          key: 'parkName'
109
+        },
110
+        {
111
+          label: '平台商户名称',
112
+          key: 'berthCode'
113
+        },
114
+        {
115
+          label: '支付商户ID',
116
+          key: 'app_id'
117
+        },
118
+        {
119
+          label: '支付商户名称',
120
+          key: 'app_secret'
121
+        },
122
+        {
123
+          label: '创建人',
124
+          key: 'isTidalPark'
125
+        },
126
+        {
127
+          label: '创建日期',
128
+          key: 'hasChargingPile'
129
+        },
130
+      ],
131
+      tableData:[],
132
+      parkName: '',
133
+      berthCode: '',
134
+      berthIsorno:'',
135
+      title:'',
136
+      dialogVisible: false,
137
+      formLabelAlign: {
138
+        parkName: '',
139
+        berthCode: '',
140
+        berthIsorno:'',
141
+        app_id:'',
142
+        app_secret:'',
143
+        api_key:''
144
+      },
145
+      total: 0,
146
+      pageSize: 5,
147
+      pageNum: 1,
148
+    }
149
+  },
150
+  mounted() {
151
+    this.getTableData()
152
+  },
153
+  watch: {},
154
+  methods: {
155
+    onSubmit() {
156
+      this.pageNum = 1
157
+      this.getTableData()
158
+    },
159
+    handlePageChange() {
160
+      this.getTableData()
161
+    },
162
+    handleAdd() {
163
+      this.title = '添加配置'
164
+      this.formInline.parkName = ''
165
+      this.formInline.berthCode = ''
166
+      this.formInline.berthIsorno = ''
167
+      this.formInline.app_id=''
168
+      this.formInline.app_secret=''
169
+      this.formInline.api_key=''
170
+      this.dialogVisible = true
171
+    },
172
+    handleEdit(row) {
173
+      this.title = '修改车场'
174
+      this.formInline = {...row}
175
+      this.dialogVisible = true
176
+    },
177
+    getTableData() {
178
+      const {pageNum, pageSize} = this
179
+      api.berthListByPage({current: pageNum, size: pageSize, ...this.formInline}).then(res => {
180
+        this.tableData = (res.data.records || []).map(item => ({...item, berthIsorno: (item.berthIsorno === '0' ? '否':'是'),isTidalPark: (item.isTidalPark === '0' ? '否':'是'),hasChargingPile: (item.hasChargingPile === '0' ? '否':'是'),isSharePark: (item.isSharePark === '0' ? '否':'是'),}))
181
+        this.total = res.data.total
182
+      })
183
+    },
184
+  }
185
+}
186
+</script>
187
+<style lang="scss" scoped>
188
+.body-wrapper {
189
+  padding: 20px;
190
+
191
+  .button-block {
192
+    text-align: right;
193
+    margin-bottom: 20px;
194
+  }
195
+
196
+  .table-pagination {
197
+    text-align: right;
198
+  }
199
+
200
+  .search-card {
201
+    margin-bottom: 20px;
202
+    text-align: center;
203
+
204
+    .input-wrapper {
205
+      width: 40%;
206
+    }
207
+  }
208
+}
209
+
210
+</style>