正在显示
6 个修改的文件
包含
602 行增加
和
1 行删除
src/api/consigner/sort.js
0 → 100644
1 | +import http from "../http"; | ||
2 | + | ||
3 | + | ||
4 | +let baseUrl = 'wlpt-custom-service-charge/feeTypeConfig' | ||
5 | + | ||
6 | + | ||
7 | +//折扣配置 | ||
8 | +export const list = params => { return http.get(`${baseUrl}/list`, params); }; | ||
9 | +export const save = params => { return http.post(`${baseUrl}/save`, params); }; | ||
10 | +export const edit = params => { return http.put(`${baseUrl}/edit`, params); }; | ||
11 | +export const remove = params => { return http.delByParam(`${baseUrl}/remove`, params); }; | ||
12 | + |
src/api/consigner/work.js
0 → 100644
1 | +import http from "../http"; | ||
2 | + | ||
3 | + | ||
4 | +let baseUrl = 'wlpt-custom-service-charge/busneeTypeConfig' | ||
5 | + | ||
6 | + | ||
7 | +//折扣配置 | ||
8 | +export const list = params => { return http.get(`${baseUrl}/list`, params); }; | ||
9 | +export const save = params => { return http.post(`${baseUrl}/save`, params); }; | ||
10 | +export const edit = params => { return http.put(`${baseUrl}/edit`, params); }; | ||
11 | +export const remove = params => { return http.delByParam(`${baseUrl}/remove`, params); }; |
@@ -78,6 +78,16 @@ export default { | @@ -78,6 +78,16 @@ export default { | ||
78 | } | 78 | } |
79 | }) | 79 | }) |
80 | }, | 80 | }, |
81 | + delByParam: (url,params) => { | ||
82 | + return axios({ | ||
83 | + method: 'DELETE', | ||
84 | + url: url, | ||
85 | + params: params, | ||
86 | + headers: { | ||
87 | + 'Content-Type': 'application/x-www-form-urlencoded' | ||
88 | + } | ||
89 | + }) | ||
90 | + }, | ||
81 | login: data =>{ | 91 | login: data =>{ |
82 | return axios({ | 92 | return axios({ |
83 | method: 'POST', // 请求协议 | 93 | method: 'POST', // 请求协议 |
@@ -121,6 +121,8 @@ import area from './views/deploy/area.vue' | @@ -121,6 +121,8 @@ import area from './views/deploy/area.vue' | ||
121 | import discount from './views/charging/discount.vue' | 121 | import discount from './views/charging/discount.vue' |
122 | import goods from './views/charging/goods.vue' | 122 | import goods from './views/charging/goods.vue' |
123 | import check from './views/charging/check.vue' | 123 | import check from './views/charging/check.vue' |
124 | +import sort from './views/charging/sort.vue' | ||
125 | +import work from './views/charging/work.vue' | ||
124 | 126 | ||
125 | import departure from './views/airtransport/departure.vue' | 127 | import departure from './views/airtransport/departure.vue' |
126 | import declare from './views/airtransport/declare.vue' | 128 | import declare from './views/airtransport/declare.vue' |
@@ -549,7 +551,9 @@ let routes = [ | @@ -549,7 +551,9 @@ let routes = [ | ||
549 | children: [ | 551 | children: [ |
550 | {path:'/discount',component:discount,name:'折扣配置'}, | 552 | {path:'/discount',component:discount,name:'折扣配置'}, |
551 | {path:'/goods',component:goods,name:'订单列表'}, | 553 | {path:'/goods',component:goods,name:'订单列表'}, |
552 | - {path:'/check',component:check,name:'账单接口'}, | 554 | + {path:'/check',component:check,name:'账单列表'}, |
555 | + {path:'/sort',component:sort,name:'费用类别'}, | ||
556 | + {path:'/work',component:work,name:'业务类型'}, | ||
553 | ] | 557 | ] |
554 | }, | 558 | }, |
555 | { | 559 | { |
src/views/charging/sort.vue
0 → 100644
1 | +<template> | ||
2 | + <el-row> | ||
3 | + <el-card style="background-color: #F5F7FA"> | ||
4 | + <!-- 搜索区域--> | ||
5 | + <el-row class="toolbar"> | ||
6 | + <el-col :span="7"> | ||
7 | + <el-input v-model="queryInfo.billTypeName" prefix-icon="el-icon-search" size="small" style="width: 280px" | ||
8 | + placeholder="费用类别名称" clearable> | ||
9 | + <template slot="prepend">费用类别名称</template> | ||
10 | + </el-input> | ||
11 | + </el-col> | ||
12 | + <el-col :span="5"> | ||
13 | + <el-button type="primary" icon="el-icon-search" size="small" @click="getList()"> | ||
14 | + 查询 | ||
15 | + </el-button> | ||
16 | + <el-button type="success" icon="el-icon-edit" size="small" @click="applyAdd()">新增</el-button> | ||
17 | + </el-col> | ||
18 | + </el-row> | ||
19 | + <!-- 列表区域--> | ||
20 | + <el-row> | ||
21 | + <template> | ||
22 | + <el-table | ||
23 | + :data="tableData" | ||
24 | + border | ||
25 | + :cell-style="{textAlign:'center'}" | ||
26 | + style="border-radius: 10px 10px 0px 0px;line-height: 25px" | ||
27 | + :header-cell-style="{background:'#6F8294',color:'#FFFFFF'}" size="small" | ||
28 | + > | ||
29 | + <el-table-column | ||
30 | + prop="billTypeName" | ||
31 | + label="费用类别名称"> | ||
32 | + </el-table-column> | ||
33 | + <el-table-column | ||
34 | + prop="billRateUnit" | ||
35 | + label="计费单位"> | ||
36 | + </el-table-column> | ||
37 | + <el-table-column | ||
38 | + prop="billRate" | ||
39 | + label="费率"> | ||
40 | + </el-table-column> | ||
41 | + <el-table-column | ||
42 | + fixed="right" | ||
43 | + label="操作" | ||
44 | + width="160"> | ||
45 | + <template slot-scope="scope"> | ||
46 | + <el-button type="success" size="mini" @click="applyEdit(scope.row)">编辑</el-button> | ||
47 | + <el-button type="danger" size="mini" @click="applyDel(scope.row)">删除</el-button> | ||
48 | + </template> | ||
49 | + </el-table-column> | ||
50 | + </el-table> | ||
51 | + </template> | ||
52 | + </el-row> | ||
53 | + <el-row style="margin-top: 10px" class="toolbar"> | ||
54 | + <el-pagination | ||
55 | + @size-change="handleSizeChange" | ||
56 | + @current-change="handleCurrentChange" | ||
57 | + :current-page="queryInfo.limitSize" | ||
58 | + :page-size="queryInfo.pageSize" | ||
59 | + :page-sizes="[10, 50, 100, 500]" | ||
60 | + layout="total, sizes, prev, pager, next, jumper" | ||
61 | + :total="total"> | ||
62 | + </el-pagination> | ||
63 | + </el-row> | ||
64 | + <el-row> | ||
65 | + <el-dialog :title="dialogMap[dialogApply]" :visible.sync="apply_dialog" width="50%" > | ||
66 | + <el-form :model="addForm" :rules="rules" ref="addForm" style="margin-top: 40px"> | ||
67 | + <el-row> | ||
68 | + <el-col :span="11"> | ||
69 | + <el-form-item label=" " :label-width="formLabelWidth" prop="billTypeName"> | ||
70 | + <el-input v-model="addForm.billTypeName" autocomplete="off" size="small" style="width: 260px"> | ||
71 | + <template slot="prepend">费用类别名称</template> | ||
72 | + </el-input> | ||
73 | + </el-form-item> | ||
74 | + </el-col> | ||
75 | + </el-row> | ||
76 | + <el-row> | ||
77 | + <el-col :span="11"> | ||
78 | + <el-form-item label=" " :label-width="formLabelWidth" prop="billRateUnit"> | ||
79 | + <el-input v-model="addForm.billRateUnit" autocomplete="off" size="small" style="width: 260px"> | ||
80 | + <template slot="prepend">计费单位</template> | ||
81 | + </el-input> | ||
82 | + </el-form-item> | ||
83 | + </el-col> | ||
84 | + </el-row> | ||
85 | + <el-row> | ||
86 | + <el-col :span="11"> | ||
87 | + <el-form-item label=" " :label-width="formLabelWidth" prop="billRate"> | ||
88 | + <el-input v-model="addForm.billRate" autocomplete="off" size="small" style="width: 260px"> | ||
89 | + <template slot="prepend">费率</template> | ||
90 | + </el-input> | ||
91 | + </el-form-item> | ||
92 | + </el-col> | ||
93 | + | ||
94 | + </el-row> | ||
95 | + </el-form> | ||
96 | + <div slot="footer" class="dialog-footer"> | ||
97 | + <el-button @click="apply_dialog = false" size="small">取 消</el-button> | ||
98 | + <el-button type="primary" @click="dialogApply==='create'?add():edit()" size="small">提 交</el-button> | ||
99 | + </div> | ||
100 | + </el-dialog> | ||
101 | + </el-row> | ||
102 | + </el-card> | ||
103 | + </el-row> | ||
104 | +</template> | ||
105 | + | ||
106 | +<script> | ||
107 | + import {list,save,edit,remove} from '../../api/consigner/sort'; | ||
108 | + | ||
109 | + export default { | ||
110 | + name: "sort", | ||
111 | + data() { | ||
112 | + return { | ||
113 | + queryInfo: { | ||
114 | + billTypeName:'', | ||
115 | + // 当前页数 | ||
116 | + limitSize: 10, | ||
117 | + // 每页大小 | ||
118 | + pageSize: 1, | ||
119 | + }, | ||
120 | + total: 0, | ||
121 | + tableData:[], | ||
122 | + dialogMap: { | ||
123 | + update: '编辑', | ||
124 | + create: '新增' | ||
125 | + }, | ||
126 | + dis: undefined, | ||
127 | + dialogApply: 'create', | ||
128 | + apply_dialog: false, | ||
129 | + addForm: { | ||
130 | + billTypeName: '', | ||
131 | + billTypeId: '', | ||
132 | + billRateUnit: '', | ||
133 | + billRate: '', | ||
134 | + }, | ||
135 | + formLabelWidth: '220px', | ||
136 | + rules: { | ||
137 | + billTypeName: [ | ||
138 | + { required: true, message: '必填', trigger: 'change' } | ||
139 | + ], | ||
140 | + // needCount: [ | ||
141 | + // { required: true, message: '请输入需要车辆数量', trigger: 'blur' }, | ||
142 | + // ], | ||
143 | + // orginStation: [ | ||
144 | + // { required: true, message: '请输入起始场站', trigger: 'blur' }, | ||
145 | + // ], | ||
146 | + // endStation: [ | ||
147 | + // { required: true, message: '请输入目的场站', trigger: 'blur' }, | ||
148 | + // ], | ||
149 | + }, | ||
150 | + } | ||
151 | + }, | ||
152 | + methods: { | ||
153 | + handleSizeChange(val) { | ||
154 | + this.queryInfo.limitSize = val | ||
155 | + this.getList() | ||
156 | + }, | ||
157 | + handleCurrentChange(val) { | ||
158 | + this.queryInfo.pageSize = val | ||
159 | + this.getList() | ||
160 | + }, | ||
161 | + getList() { | ||
162 | + const _this = this | ||
163 | + list(this.queryInfo).then((response) => { | ||
164 | + const res = response.data | ||
165 | + console.log(response.data) | ||
166 | + if (res.code !== '200') { | ||
167 | + return _this.$message.error('获取消息收发记录,失败!') | ||
168 | + } | ||
169 | + // 获取列表数据 | ||
170 | + _this.tableData = res.data.list | ||
171 | + // 获取列表的总记录数 | ||
172 | + _this.total = res.data.total | ||
173 | + _this.$message.success('获取消息收发记录,成功!') | ||
174 | + }).catch(error => { | ||
175 | + // 关闭加载 | ||
176 | + _this.$message.error(error.toString()) | ||
177 | + }) | ||
178 | + }, | ||
179 | + // 添加对话框,打开事件 | ||
180 | + applyAdd() { | ||
181 | + this.addForm = { | ||
182 | + billTypeName: '', | ||
183 | + billTypeId: '', | ||
184 | + billRateUnit: '', | ||
185 | + billRate: '', | ||
186 | + }; | ||
187 | + this.dialogApply= 'create'; | ||
188 | + this.dis= 'create'; | ||
189 | + this.apply_dialog = true; | ||
190 | + }, | ||
191 | + // 添加功能 | ||
192 | + add() { | ||
193 | + this.$refs.addForm.validate(valid => { | ||
194 | + // 未通过,表单预校验 | ||
195 | + if (!valid) return; | ||
196 | + save(this.addForm).then((response) => { | ||
197 | + let res = response.data; | ||
198 | + // 添加失败 | ||
199 | + if (res.code !== '200') { | ||
200 | + return this.$message.error(res.msg); | ||
201 | + } | ||
202 | + // 添加,成功 | ||
203 | + this.$message.success(res.msg); | ||
204 | + // 隐藏对话框 | ||
205 | + this.apply_dialog = false; | ||
206 | + // 刷新列表 | ||
207 | + this.getList(); | ||
208 | + }).catch(error => { | ||
209 | + this.$message.error(error.toString()); | ||
210 | + }); | ||
211 | + }) | ||
212 | + }, | ||
213 | +// 打开编辑 | ||
214 | + applyEdit(row) { | ||
215 | + this.apply_dialog = true; | ||
216 | + this.dialogApply = 'update'; | ||
217 | + this.dis= 'update'; | ||
218 | + this.addForm=row; | ||
219 | + }, | ||
220 | + // 编辑功能 | ||
221 | + edit() { | ||
222 | + // 进行表单的预验证 | ||
223 | + this.$refs.addForm.validate(valid => { | ||
224 | + // 未通过,表单预校验 | ||
225 | + if (!valid) return | ||
226 | + edit(this.addForm).then((response) => { | ||
227 | + // console.log(row) | ||
228 | + const res = response.data | ||
229 | + if (res.code != '200') { | ||
230 | + return this.$message.error(res.msg) | ||
231 | + } | ||
232 | + this.$message.success(res.msg) | ||
233 | + // 隐藏对话框 | ||
234 | + this.apply_dialog = false | ||
235 | + // 刷新列表 | ||
236 | + this.getList() | ||
237 | + }).catch(error => { | ||
238 | + this.$message.error(error.toString()) | ||
239 | + }) | ||
240 | + }) | ||
241 | + }, | ||
242 | + // 删除 | ||
243 | + applyDel(row) { | ||
244 | + // 弹框询问是否删除? | ||
245 | + this.$confirm('此操作永久删除该消息收发记录, 是否继续?', '警告', { | ||
246 | + confirmButtonText: '确定删除', | ||
247 | + cancelButtonText: '取消', | ||
248 | + type: 'warning' | ||
249 | + } | ||
250 | + ).then(() => { | ||
251 | + remove(row).then((response) => { | ||
252 | + // console.log(row) | ||
253 | + const res = response.data | ||
254 | + this.$message.success(res.msg) | ||
255 | + this.getList() | ||
256 | + }).catch(error => { | ||
257 | + this.$message.error(error) | ||
258 | + }) | ||
259 | + }).catch(() => { | ||
260 | + }) | ||
261 | + }, | ||
262 | + }, | ||
263 | + mounted() { | ||
264 | + this.getList(); | ||
265 | + // this.getYardList(); | ||
266 | + | ||
267 | + } | ||
268 | + | ||
269 | + } | ||
270 | +</script> | ||
271 | + | ||
272 | +<style scoped> | ||
273 | + .toolbar{ | ||
274 | + height: 60px; | ||
275 | + background-color: white; | ||
276 | + /*line-height: 60px;*/ | ||
277 | + vertical-align: middle; | ||
278 | + border-radius: 5px 5px 5px 5px; | ||
279 | + padding: 15px 0 0 20px; | ||
280 | + box-shadow: 0px 5px 5px #e5e8eb; | ||
281 | + } | ||
282 | + .my-text-area .prepand{ | ||
283 | + float: left; | ||
284 | + width:89px; | ||
285 | + height: 28px; | ||
286 | + font-size: 12px; | ||
287 | + line-height: 28px; | ||
288 | + } | ||
289 | +</style> | ||
290 | +<style> | ||
291 | + .my-text-area .el-textarea__inner{ | ||
292 | + min-height: 28px; | ||
293 | + height: 28px; | ||
294 | + border-bottom-left-radius: 0; | ||
295 | + border-top-left-radius: 0; | ||
296 | + } | ||
297 | +</style> |
src/views/charging/work.vue
0 → 100644
1 | +<template> | ||
2 | + <el-row> | ||
3 | + <el-card style="background-color: #F5F7FA"> | ||
4 | + <!-- 搜索区域--> | ||
5 | + <el-row class="toolbar"> | ||
6 | + <el-col :span="5"> | ||
7 | + <el-input v-model="queryInfo.busnessType" prefix-icon="el-icon-search" size="small" style="width: 240px" | ||
8 | + placeholder="业务类型" clearable> | ||
9 | + <template slot="prepend">业务类型</template> | ||
10 | + </el-input> | ||
11 | + </el-col> | ||
12 | + <el-col :span="5"> | ||
13 | + <el-button type="primary" icon="el-icon-search" size="small" @click="getList()"> | ||
14 | + 查询 | ||
15 | + </el-button> | ||
16 | + <el-button type="success" icon="el-icon-edit" size="small" @click="applyAdd()">新增</el-button> | ||
17 | + </el-col> | ||
18 | + </el-row> | ||
19 | + <!-- 列表区域--> | ||
20 | + <el-row> | ||
21 | + <template> | ||
22 | + <el-table | ||
23 | + :data="tableData" | ||
24 | + border | ||
25 | + :cell-style="{textAlign:'center'}" | ||
26 | + style="border-radius: 10px 10px 0px 0px;line-height: 25px" | ||
27 | + :header-cell-style="{background:'#6F8294',color:'#FFFFFF'}" size="small" | ||
28 | + > | ||
29 | + <el-table-column | ||
30 | + prop="busnessType" | ||
31 | + label="业务类型" | ||
32 | + width="140"> | ||
33 | + </el-table-column> | ||
34 | + <el-table-column | ||
35 | + fixed="right" | ||
36 | + label="操作" | ||
37 | + width="160"> | ||
38 | + <template slot-scope="scope"> | ||
39 | + <el-button type="success" size="mini" @click="applyEdit(scope.row)">编辑</el-button> | ||
40 | + <el-button type="danger" size="mini" @click="applyDel(scope.row)">删除</el-button> | ||
41 | + </template> | ||
42 | + </el-table-column> | ||
43 | + </el-table> | ||
44 | + </template> | ||
45 | + </el-row> | ||
46 | + <el-row style="margin-top: 10px" class="toolbar"> | ||
47 | + <el-pagination | ||
48 | + @size-change="handleSizeChange" | ||
49 | + @current-change="handleCurrentChange" | ||
50 | + :current-page="queryInfo.limitSize" | ||
51 | + :page-size="queryInfo.pageSize" | ||
52 | + :page-sizes="[10, 50, 100, 500]" | ||
53 | + layout="total, sizes, prev, pager, next, jumper" | ||
54 | + :total="total"> | ||
55 | + </el-pagination> | ||
56 | + </el-row> | ||
57 | + <el-row> | ||
58 | + <el-dialog :title="dialogMap[dialogApply]" :visible.sync="apply_dialog" width="50%" > | ||
59 | + <el-form :model="addForm" :rules="rules" ref="addForm" style="margin-top: 40px"> | ||
60 | + <el-row> | ||
61 | + <el-col :span="11"> | ||
62 | + <el-form-item label=" " :label-width="formLabelWidth" prop="busnessType"> | ||
63 | + <el-input v-model="addForm.busnessType" autocomplete="off" size="small" style="width: 260px"> | ||
64 | + <template slot="prepend">业务类型</template> | ||
65 | + </el-input> | ||
66 | + </el-form-item> | ||
67 | + </el-col> | ||
68 | + </el-row> | ||
69 | + </el-form> | ||
70 | + <div slot="footer" class="dialog-footer"> | ||
71 | + <el-button @click="apply_dialog = false" size="small">取 消</el-button> | ||
72 | + <el-button type="primary" @click="dialogApply==='create'?add():edit()" size="small">提 交</el-button> | ||
73 | + </div> | ||
74 | + </el-dialog> | ||
75 | + </el-row> | ||
76 | + </el-card> | ||
77 | + </el-row> | ||
78 | +</template> | ||
79 | + | ||
80 | +<script> | ||
81 | + import {list,save,edit,remove} from '../../api/consigner/work'; | ||
82 | + | ||
83 | + export default { | ||
84 | + name: "work", | ||
85 | + data() { | ||
86 | + return { | ||
87 | + queryInfo: { | ||
88 | + busnessType:'', | ||
89 | + // 当前页数 | ||
90 | + limitSize: 10, | ||
91 | + // 每页大小 | ||
92 | + pageSize: 1, | ||
93 | + }, | ||
94 | + total: 0, | ||
95 | + tableData:[], | ||
96 | + dialogMap: { | ||
97 | + update: '编辑', | ||
98 | + create: '新增' | ||
99 | + }, | ||
100 | + dis: undefined, | ||
101 | + dialogApply: 'create', | ||
102 | + apply_dialog: false, | ||
103 | + addForm: { | ||
104 | + busnessType: '', | ||
105 | + id:'', | ||
106 | + }, | ||
107 | + formLabelWidth: '220px', | ||
108 | + rules: { | ||
109 | + busnessType: [ | ||
110 | + { required: true, message: '必填', trigger: 'change' } | ||
111 | + ], | ||
112 | + // needCount: [ | ||
113 | + // { required: true, message: '请输入需要车辆数量', trigger: 'blur' }, | ||
114 | + // ], | ||
115 | + // orginStation: [ | ||
116 | + // { required: true, message: '请输入起始场站', trigger: 'blur' }, | ||
117 | + // ], | ||
118 | + // endStation: [ | ||
119 | + // { required: true, message: '请输入目的场站', trigger: 'blur' }, | ||
120 | + // ], | ||
121 | + }, | ||
122 | + } | ||
123 | + }, | ||
124 | + methods: { | ||
125 | + handleSizeChange(val) { | ||
126 | + this.queryInfo.limitSize = val | ||
127 | + this.getList() | ||
128 | + }, | ||
129 | + handleCurrentChange(val) { | ||
130 | + this.queryInfo.pageSize = val | ||
131 | + this.getList() | ||
132 | + }, | ||
133 | + getList() { | ||
134 | + const _this = this | ||
135 | + list(this.queryInfo).then((response) => { | ||
136 | + const res = response.data | ||
137 | + console.log(response.data) | ||
138 | + if (res.code !== '200') { | ||
139 | + return _this.$message.error('获取消息收发记录,失败!') | ||
140 | + } | ||
141 | + // 获取列表数据 | ||
142 | + _this.tableData = res.data.list | ||
143 | + // 获取列表的总记录数 | ||
144 | + _this.total = res.data.total | ||
145 | + _this.$message.success('获取消息收发记录,成功!') | ||
146 | + }).catch(error => { | ||
147 | + // 关闭加载 | ||
148 | + _this.$message.error(error.toString()) | ||
149 | + }) | ||
150 | + }, | ||
151 | + // 添加对话框,打开事件 | ||
152 | + applyAdd() { | ||
153 | + this.addForm = { | ||
154 | + busnessType: '', | ||
155 | + id:'', | ||
156 | + }; | ||
157 | + this.dialogApply= 'create'; | ||
158 | + this.dis= 'create'; | ||
159 | + this.apply_dialog = true; | ||
160 | + }, | ||
161 | + // 添加功能 | ||
162 | + add() { | ||
163 | + this.$refs.addForm.validate(valid => { | ||
164 | + // 未通过,表单预校验 | ||
165 | + if (!valid) return; | ||
166 | + save(this.addForm).then((response) => { | ||
167 | + let res = response.data; | ||
168 | + // 添加失败 | ||
169 | + if (res.code !== '200') { | ||
170 | + return this.$message.error(res.msg); | ||
171 | + } | ||
172 | + // 添加,成功 | ||
173 | + this.$message.success(res.msg); | ||
174 | + // 隐藏对话框 | ||
175 | + this.apply_dialog = false; | ||
176 | + // 刷新列表 | ||
177 | + this.getList(); | ||
178 | + }).catch(error => { | ||
179 | + this.$message.error(error.toString()); | ||
180 | + }); | ||
181 | + }) | ||
182 | + }, | ||
183 | +// 打开编辑 | ||
184 | + applyEdit(row) { | ||
185 | + this.apply_dialog = true; | ||
186 | + this.dialogApply = 'update'; | ||
187 | + this.dis= 'update'; | ||
188 | + this.addForm=row; | ||
189 | + }, | ||
190 | + // 编辑功能 | ||
191 | + edit() { | ||
192 | + // 进行表单的预验证 | ||
193 | + this.$refs.addForm.validate(valid => { | ||
194 | + // 未通过,表单预校验 | ||
195 | + if (!valid) return | ||
196 | + edit(this.addForm).then((response) => { | ||
197 | + // console.log(row) | ||
198 | + const res = response.data | ||
199 | + if (res.code != '200') { | ||
200 | + return this.$message.error(res.msg) | ||
201 | + } | ||
202 | + this.$message.success(res.msg) | ||
203 | + // 隐藏对话框 | ||
204 | + this.apply_dialog = false | ||
205 | + // 刷新列表 | ||
206 | + this.getList() | ||
207 | + }).catch(error => { | ||
208 | + this.$message.error(error.toString()) | ||
209 | + }) | ||
210 | + }) | ||
211 | + }, | ||
212 | + // 删除 | ||
213 | + applyDel(row) { | ||
214 | + // 弹框询问是否删除? | ||
215 | + this.$confirm('此操作永久删除该消息收发记录, 是否继续?', '警告', { | ||
216 | + confirmButtonText: '确定删除', | ||
217 | + cancelButtonText: '取消', | ||
218 | + type: 'warning' | ||
219 | + } | ||
220 | + ).then(() => { | ||
221 | + remove(row).then((response) => { | ||
222 | + // console.log(row) | ||
223 | + const res = response.data | ||
224 | + this.$message.success(res.msg) | ||
225 | + this.getList() | ||
226 | + }).catch(error => { | ||
227 | + this.$message.error(error) | ||
228 | + }) | ||
229 | + }).catch(() => { | ||
230 | + }) | ||
231 | + }, | ||
232 | + }, | ||
233 | + mounted() { | ||
234 | + this.getList(); | ||
235 | + // this.getYardList(); | ||
236 | + | ||
237 | + } | ||
238 | + | ||
239 | + } | ||
240 | +</script> | ||
241 | + | ||
242 | +<style scoped> | ||
243 | + .toolbar{ | ||
244 | + height: 60px; | ||
245 | + background-color: white; | ||
246 | + /*line-height: 60px;*/ | ||
247 | + vertical-align: middle; | ||
248 | + border-radius: 5px 5px 5px 5px; | ||
249 | + padding: 15px 0 0 20px; | ||
250 | + box-shadow: 0px 5px 5px #e5e8eb; | ||
251 | + } | ||
252 | + .my-text-area .prepand{ | ||
253 | + float: left; | ||
254 | + width:89px; | ||
255 | + height: 28px; | ||
256 | + font-size: 12px; | ||
257 | + line-height: 28px; | ||
258 | + } | ||
259 | +</style> | ||
260 | +<style> | ||
261 | + .my-text-area .el-textarea__inner{ | ||
262 | + min-height: 28px; | ||
263 | + height: 28px; | ||
264 | + border-bottom-left-radius: 0; | ||
265 | + border-top-left-radius: 0; | ||
266 | + } | ||
267 | +</style> |
-
请 注册 或 登录 后发表评论